LiveKit LogoDocs
Real-timeEgress/IngressCloudReference

useEnsureParticipant

Ensures that a participant is provided, either via context or explicitly as a parameter. If not inside a ParticipantContext and no participant is provided, an error is thrown.

Import

import { useEnsureParticipant } from '@livekit/components-react';

Parameters

#
participant?Participant

Returns

Participant;

On this page

ImportParametersReturns

Previous

Chevron IconuseEnsureLayoutContext
LiveKit Logo

Product

SFU

SDKs

Cloud Dashboard

Cloud Status

GitHub Logo