Introduction - Room participants
The data regarding all meeting participants is stored under meeting.participants
. Use the methods and events to consume the participants data.
Room participants object
joined
: A list that contains all the participants who have joined the meeting.active
: A list that contains all the participants for the current page in the meeting. Its a subset ofjoined
array.screenShares
: A list that contains all the participants who have shared screen in the meeting.waitlisted
: A list that contains all the participants waiting to join the meeting.broadcastMessage
: Broadcasts the message to all participants includingself
.pinned
: A nullable participant object represeting the participant who is pinned else it is set to null.activeSpeaker
: A nullable participant object represting latest active speaker in the meeting.maxNumberOnScreen
: A int showing the maximum number of people set for this meeting.currentPageNumber
: A int showing the current page in this meeting. Participants from this page are filled in theactive
list.pageCount
: A int showing total number of pages available in the meeting.canGoNextPage
: A boolean indicating if next page of joined participants is available to show.canGoPreviousPage
: A boolean indicating if previous page of joined participants is available to show.
Each participant in the joined
, waitlisted
, active
and
screenShares
is type list containing objects of DyteMeetingParticipant
.
// all joined participants in the meeting
val joined = meeting.participants.joined
// all active participants in the meeting.
// this should be used to show participants on the screen
val active = meeting.participants.active
// participants who are in the waiting room
val waitlisted = meeting.participants.waitlisted
// participants who have shared screen
val screenShares = meeting.participants.screenShares
// latest active speaker in the meeting
val activeSpeaker = meeting.participants.activeSpeaker
Similarely you can access the pagination related information like follows:
val maxNumberOnScreen = meeting.participants.maxNumberOnScreen
val currentPageNumber = meeting.participants.currentPageNumber
val pageCount = meeting.participants.pageCount
val canGoNextPage = meeting.participants.canGoNextPage
val canGoPreviousPage = meeting.participants.canGoPreviousPage
Move between pages in paginated mode
The setPage(pageNumber: Int)
method allows you to switch between pages of participants present in the meeting.
// switch to 1st page
meeting.participants.setPage(1)
Host control methods
The meeting.participants
object has host control methods that allow you to disable the audio and video streams of other users in the meeting (given that the user preset has the right permissions).
// mute all participants
meeting.participants.disableAllAudio();
// mute a single participant
val participantToUpdate = meeting.participants.joined.first()
participantToUpdate.disableAudio()
// disable video for all participants
meeting.participants.disableAllVideo();
// disable video for a single participant
val participantToUpdate = meeting.participants.joined.first()
participantToUpdate.disableVideo()
Operations related to waiting room
// to accept all waiting room requests for participants in `waitlisted` list
meeting.participants.acceptAllWaitingRequests()
To remove all participants from a meeting, you can call the kickAll()
method.
// remove all participants from the meeting
meeting.participants.kickAll();
// remove a single participant
val participantToRemove = meeting.participants.joined.first()
participantToRemove.kick()
Broadcast message to all participants
// broadcast message
meeting.participants.broadcastMessage(type, payload)