useWaitingParticipants

useWaitingParticipants(params?): Object

Returns an object containing an array of all participants waiting for access to the call, along with methods to grant or deny access.

useWaitingParticipants can also be used to set up optional callbacks for waiting-participant-added, waiting-participant-updated, and waiting-participant-removed events.

Params (optional)

An object with the following properties:

ParameterRequiredTypeDescription
onWaitingParticipantAddedFunctionCallback for the waiting-participant-added event
onWaitingParticipantUpdatedFunctionCallback for the waiting-participant-updated event
onWaitingParticipantRemovedFunctionCallback for the waiting-participant-removed event

Return type

An object with the following properties:

NameTypeDescription
waitingParticipantsObject[]Details waiting participants, see waitingParticipants()
grantAccess(id: '*' | string)FunctionCan be used to admit entry to waiting participants. Admits all participants if '*' is passed, or a specific participant if a string session_id is specified
denyAccess(id: '*' | string)FunctionCan be used to deny entry to waiting participants. Denies all participants if '*' is passed, or a specific participant if a string session_id is specified

Sample code

Related references