Skip to main content

Participant Events

Participant joined

Trigger an event when any participant joins the meeting.

class ParticipantsEventListener extends DytePartcipantEventsListener {
...

void onParticipantJoin(DyteMeetingParticipant participant) {
// your code here to handle new participant
}
...
}

Participant updated

Trigger an event when any participant update in meeting. For example, when a participant changes their name.

...


void onParticipantUpdated(DyteMeetingParticipant participant) {
// your code here to handle new participant
}

...

Participant left

Trigger an event when any participant leaves the meeting.

...


void onParticipantLeave(DyteMeetingParticipant participant) {
// your code here to handle participant left from meeting
}

...

Video update

Trigger an event when any participant starts or stops the video.

...


void onVideoUpdate({
required bool videoEnabled,
required DyteMeetingParticipant participant,
}) {
// your code here to handle participant video toggle update
}

...

Video view

To access the video view of a participant, create an object of the VideoView class.

// To show the video of a participant
final videoView = VideoView(meetingParticipant: participant);
// To get video view for a local user
final selfVideoView = VideoView(isSelfTrue: true);

Audio update

Triggers an event when a participant starts or stops the audio.

...


void onAudioUpdate({
required bool audioEnabled,
required DyteMeetingParticipant participant,
}) {
// your code here to handle participant audio toggle update
}

...

Screen share update

Triggers an event when a participant starts or stops screen share.

...


void onScreenShareStarted(DyteMeetingParticipant participant) {
/// handle screen share started of `DyteMeetingParticipant` participant
}


void onScreenShareEnded(DyteMeetingParticipant participant) {
/// handle screen share ended of `DyteMeetingParticipant` participant
}

...

Screen share participants list

Obtain the list of the screenshare participants, using the participants.screenshares function which returns a DyteRoomParticipants object that maintains a record of participants who have joined, pinned, and screenshared. This object updates with each onUpdate call.

Screen share view

To get the screenshare widget, create an object of the ScreenshareView class.

// To show screenshare of a participant
final screenshareView = ScreenShareView(meetingParticipant);

Active Participants changed

This event is triggered when the active participant changes, for example, when the user moves to the next page of participants. It provides the list of participants on the current page.

...


void onActiveParticipantsChanged(List<DyteMeetingParticipant> active) {
/// handle active participants changed
}

...

Other callbacks:

  • onActiveSpeakerChanged(DyteMeetingParticipant participant): Triggered when active speaker is changed to participant.
  • onNoActiveSpeaker(): Triggered when there is no active participant.
  • onParticipantPinned(DyteMeetingParticipant participant): Triggered when the participant is pinned.
  • onParticipantUnpinned(DyteMeetingParticipant participant): Trigerred when participant is unpinned.