DailyParticipant object. Daily keeps these objects up to date as media states, permissions, and network conditions change.
The DailyParticipant Object
DailyParticipant type reference for the full field listing with types and descriptions.
Listing Participants
participants()
Returns a DailyParticipantsObject — a flat map of all participants currently visible to the local client.
The
local key is always present. Remote participants are keyed by their session_id.participantCounts()
Returns aggregate counts without full participant data — more accurate than counting participants manually as participant data can come in delayed on join, whereas the counts are provided immediately. Also, hidden participants are not included in participants(), but are included in the counts returned by participantCounts().
participant-counts-updated to keep this value current.
waitingParticipants()
call object mode only
Returns a map of participants waiting in a knock-to-join lobby, keyed by their id. Use updateWaitingParticipant() to admit or deny them.
Updating Participants
updateParticipant(sessionId, options)
Send a change request for a single participant. Returns the DailyCall instance for chaining.
Mute (
false) or unmute (true) for the participant’s microphone. Only admins can mute remote participants’ audio. Note: while you can use this to mute/unmute the local participant, setLocalAudio() is the preferred method.Mute (
false) or unmute (true) for the participant’s camera. Only admins can mute remote participants’ video. Note: while you can use this to mute/unmute the local participant, setLocalVideo() is the preferred method.Stop a remote participant’s screen share. Can only be set to
false (you can only stop, not start, a remote screen share). Requires admin permissions.Control which of this participant’s tracks the local client receives. See Track Subscription.
Remove the participant from the call. Can only be set to
true. Requires admin permissions.Change the participant’s
hasPresence, canSend, canReceive, or canAdmin permissions. Requires admin permissions.Prebuilt only
Apply CSS overrides to this participant’s video tiles.
updateParticipants(updates)
Apply updates to multiple participants in a single call. This method takes the same options as updateParticipant() but in a map keyed by session_id. You can use '*' as a wildcard key to apply the same update to all remote participants.
Code Examples
Participant Events
React to participant state changes by subscribing to these events:| Event | Fires when |
|---|---|
participant-joined | A remote participant enters the room |
participant-updated | Any field on a participant changes (mute, network quality, etc.) |
participant-left | A remote participant leaves or is ejected |
participant-counts-updated | The aggregate counts returned by participantCounts() change |
waiting-participant-added | A participant enters the knock-to-join lobby |
waiting-participant-updated | A waiting participant’s state changes |
waiting-participant-removed | A waiting participant leaves the lobby or is admitted |