participants()
participants()
Returns an object detailing the current meeting participants:
The object keys are local
for the local participant and the participant's session_id
for remote participants.
Participant properties
All participant objects include:
session_id
- a unique id generated each time a participant joins a meetinguser_id
- the user's id if set by a meeting token, otherwise thesession_id
user_name
- the user's name if set by a meeting token or set from the account if the user is logged into a Daily accountlocal
-true
for the local userowner
-true
if set by a meeting token or the user is logged into a Daily account and is a member of the room's teamjoined_at
- js Date object, the time that the user joined the roomvideo_width
andvideo_height
- the current width and height of the live video stream.video_width
andvideo_height
can change as network conditions change. If there is no current camera stream, this will be an empty object.record
- indicates whether a participant is recording a meeting (Note: Server-based recording (cloud
andrtp-tracks
) is a paid feature.)tracks
- an object whose keys are participant track types -audio
,video
,screenAudio
andscreenVideo
- and whose values are objects with detailed information about each track.
Each track includes:
Key | Description | Possible values |
---|---|---|
subscribed | Whether you (the local participant) are subscribed to a track |
|
state | The values represent the complete set of mutually exclusive states a track can be in, from the user's point of view. |
|
off | If the track is off, why it's off (this field only acquires a value if the track is off). | An optional object with the properties byUser and/or byBandwidth , representing the possible reasons the track is off. |
blocked | If the track is blocked, why it's blocked (this field only acquires a value if the track is blocked). | An optional object with the properties byMissingDevice or byPermissions or byDeviceInUse representing the possible reasons the track is blocked. |
track * | *Only available when using the Daily call object. | A MediaStreamTrack that is ready to be played. |
tracks in action
Additional properties we don't recommend using
A note about the audio
, video
, and screen
properties
These properties include the direct MediaStreamTrack that a participant is sending, if available.
While we detail these properties below, we recommend using the tracks
property's key for each kind of track instead for more accurate, detailed tracks state.
videoTrack
- the camera video track this participant is sending, if available.
audioTrack
- the microphone audio track this participant is sending, if available. Contains the same information asvideoTrack
, with only thekind
value differing in that it specifies "video".screenVideoTrack
: the screenshare video track this participant is sending, if available.
These tracks can be wrapped in a MediaStream and assigned directly to an element's audio or video srcObject property. See an example in our React call object demo app.