Skip to main content

Introduction - Participants

The data regarding all meeting participants is stored under participants objects of DyteMobileClient() instance. To get all the objects and methods related to participants:

  final participants = dyteClient.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 = dyteClient.participants.joined;

The dyteClient.participants object has the following properties.

  • waitlisted: A list that contains all the participants waiting to join the meeting. All elements of this array are of type DyteWaitlistedParticipant.
  • joined: A list that contains all the participants who have joined the meeting. All elements of this array are of type DyteJoinedMeetingParticipant.
  • active: A list that contains all the participants except the local user who are supposed to be on the screen at the moment. All elements of this array are of type DyteJoinedMeetingParticipant.
  • screenshares: A list that contains all the participants who have shared screen in the meeting. All elements of this array are of type DyteJoinedMeetingParticipant.
  • pinned: Pinned participant of the meeting. It can be nullable as well. This is of type DyteJoinedMeetingParticipant.

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.

  • dyteClient.pinned is of type DyteJoinedMeetingParticipant.
  • All participant in each of the joined, waitlisted, active, and screenshares list is of type DyteJoinedMeetingParticipant.

Grid info for the room​

DyteGridPagesInfo object is designed to help you with pagination decisions. It is returned with onGridUpdated event. It contains the following properties:

  • currentPageNumber: Int, returns the current page number (currently displayed by the client).
  • pageCount: Int, max pages possible with current number of participants.
  • isNextPagePossible: bool, if the next page of participants is available.
  • isPreviousPagePossible: bool, if previous page of participants is available.

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);

Move between pages in paginated mode​

The setPage(int pageNumber) method allows you to switch between pages of participants present in the meeting.

Note: Indexing of page starts from 0

// switch to page 1
dyteClient.setPage(1);

Broadcast Message to all participants​

// payload is a Map<String, dynamic>
const payload = {
"message": "Hello World",
};
dyteClient.broadcastMessage("type", payload);

Video update for all participants​

Triggered when any participant of the meeting enable/disable it's video. It also passes the participant details who has updated it's video status.

class ParticipantNotifier implements DyteParticipantEventsListener{

...

void onVideoUpdate(
bool videoEnabled,
DyteJoinedMeetingParticipant participant,
) {
//
}
...
}


Audio update​

Triggered when any participant of the meeting enable/disable it's audio. It also passes the participant details who has updated it's audio status.


class ParticipantNotifier implements DyteParticipantEventsListener{

...

void onAudioUpdate(
bool audioEnabled,
DyteJoinedMeetingParticipant participant,
) {
//
}
...
}