Introduction - Participants
The data regarding all meeting participants is stored under
meeting.participants
. Use the methods and events to consume the participants
data. For example, to get all the participants who joined the meeting:
// get all joined participants
final joinedParticipants = meeting.participants.joined;
The meeting.participants
object has the following properties.
joined
: A list that contains all the participants who have joined the meeting.waitlisted
: A list that contains all the participants waiting to join the meeting.active
: A list that contains all the participants except the local user who are supposed to be on the screen at the momentpinned
: A list that contains all the pinned participants of the meeting.screenshares
: A list that contains all the participants who have shared screen in the meeting.
Therefore, if you were to make a grid of participants, you'd use the active
list, but to display all participants in the meeting you'd use the joined
list.
Each participant in each of the joined
, waitlisted
, active
, pinned
and
screenshares
list is of type DyteMeetingParticipant
.
You can subscribe to various events on the participants by implementing
DyteParticipantEventsListener
and passing the object to
meeting.addParticipantEventsListener(dyteParticipantEventsListener)
.
Video update
Triggered when the user starts / stops the video using enableVideo
or
disableVideo
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.
}
}
Audio update
Triggered when the user starts / stops the audio using enableAudio
or
disableAudio
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.
}
}