Skip to main content

The participant object

The participant object consists of all the information related to a particular participant. For instance, it contains a participants video/audio/screenshare stream, and the participant's name. It also contains state variables that indicate whether a participant's camera is on or off, and whether they are muted or unmuted.

The participant object has the following properties.

  • id: The participantId of the participant (aka peerId).
  • userId: The userId of the participant.
  • name: The participant's name.
  • picture: The participant's picture (if any).
  • clientSpecificId: An arbitrary ID that can be set to identify the participant.
  • videoEnabled: Set to true if the participant's camera is on.
  • audioEnabled: Set to true if the participant is unmuted.

To be able to listen to participant updates you can use DyteParticipantEventsListener, pass object of this call using meeting.addParticipantEventsListener(dyteParticipantEventsListener).



void onVideoUpdate(bool videoEnabled) {
if (videoEnabled) {
// video is enabled, and other participants in room can see local user
} else {
// video is disabled, and other participants in room can not see local user.
}
}


void audioUpdate({
required bool audioEnabled,
required DyteMeetingParticipant participant,
}) {
if (audioEnabled) {
// audio is enabled, and other participants in room can hear local user
} else {
// audio is disabled, and other participants in room can not hear local user.
}
}