Skip to main content
useWaitingParticipants(params?): Object useWaitingParticipants can also be used to set up optional callbacks for waiting-participant-added, waiting-participant-updated, and waiting-participant-removed events.

Parameters (optional)

An object with the following properties:
onWaitingParticipantAdded
Function
Callback for the waiting-participant-added event.
onWaitingParticipantUpdated
Function
Callback for the waiting-participant-updated event.
onWaitingParticipantRemoved
Function
Callback for the waiting-participant-removed event.

Return value

An object with the following properties:
waitingParticipants
Object[]
Details waiting participants, see waitingParticipants().
grantAccess
Function
Can be used to admit entry to waiting participants. Accepts '*' to admit all participants, or a string session_id to admit a specific participant.
denyAccess
Function
Can be used to deny entry to waiting participants. Accepts '*' to deny all participants, or a string session_id to deny a specific participant.

Example

import { useWaitingParticipants } from '@daily-co/daily-react';

export const UseWaitingParticipantsDemo = () => {
  const { waitingParticipants } = useWaitingParticipants();

  return <div>Waiting participants: {waitingParticipants.length}</div>;
};

See also