Skip to main content

DyteParticipants

This module represents all the participants in the meeting (except the local user). It consists of 4 maps:

  • joined: A map of all participants that have joined the meeting.
  • waitlisted: A map of all participants that have been added to the waitlist.
  • active: A map of active participants who should be displayed in the meeting grid.
  • pinned: A map of pinned participants.

participants.waitlisted

Returns a list of participants waiting to join the meeting.

participants.joined

Returns a list of all participants in the meeting.

participants.active

Returns a list of participants whose streams are currently consumed.

participants.pinned

Returns a list of participants who have been pinned.

participants.all

Returns all added participants irrespective of whether they are currently in the meeting or not

participants.pip

Return the controls for Picture-in-Picture

participants.roomJoined

Returns true if the local participant has joined the meeting.

participants.viewMode

Indicates whether the meeting is in 'ACTIVE_GRID' mode or 'PAGINATED' mode.

In 'ACTIVE_GRID' mode, participants are populated in the participants.active map dynamically. The participants present in the map will keep changing when other participants unmute their audio or turn on their videos.

In 'PAGINATED' mode, participants are populated in the participants.active map just once, and the participants in the map will only change if the page number is changed by the user using setPage(page).

participants.currentPage

This indicates the current page that has been set by the user in PAGINATED mode. If the meeting is in ACTIVE_GRID mode, this value will be 0.

participants.lastActiveSpeaker

This stores the participantId of the last participant who spoke in the meeting.

participants.selectedPeers

Keeps a list of all participants who have been present in the selected peers list.

participants.count

Returns the number of participants who are joined in the meeting.

participants.maxActiveParticipantsCount

Returns the maximum number of participants that can be present in the active map.

participants.pageCount

Returns the number of pages that are available in the meeting in PAGINATED mode. If the meeting is in ACTIVE_GRID mode, this value will be 0.

participants.setMaxActiveParticipantsCount(limit:)

Updates the maximum number of participants that are populated in the active map.

ParamDescription
limit:Updated max limit

participants.acceptWaitingRoomRequest(id)

Accepts requests from waitlisted participants if user has appropriate permissions.

ParamDescription
idpeerId or userId of the waitlisted participant.

participants.acceptAllWaitingRoomRequest()

We need a new event for socket service events since if we send them all together, sequence of events can be unreliable

participants.rejectWaitingRoomRequest(id)

Rejects requests from waitlisted participants if user has appropriate permissions.

ParamDescription
idparticipantId of the waitlisted participant.

participants.setViewMode(viewMode)

Sets the view mode of the meeting to either ACTIVE_GRID or PAGINATED.

ParamDescription
viewModeThe mode in which the active map should be populated

participants.setPage(page)

Populates the active map with participants present in the page number indicated by the parameter page in PAGINATED mode. Does not do anything in ACTIVE_GRID mode.

ParamDescription
pageThe page number to be set.

participants.disableAllAudio(allowUnmute)

Disables audio for all participants in the meeting.

ParamDescription
allowUnmuteAllow participants to unmute after they are muted.

participants.disableAllVideo()

Disables video for all participants in the meeting.

participants.disableAudio(participantId)

Deprecated

ParamDescription
participantIdID of participant to be muted.

participants.disableVideo(participantId)

Deprecated

ParamDescription
participantIdID of participant to be muted.

participants.kick(participantId)

Deprecated

ParamDescription
participantIdID of participant to be kicked.

participants.kickAll()

Kicks all participants from the meeting.

participants.broadcastMessage(target)

Broadcasts the message to participants

If no target is specified it is sent to all participants including self.

ParamDescription
targetobject containing a list of participantIds or object containing presetName - every user with that preset will be sent the message

participants.acceptAllRequestToJoinStageRequests()

Deprecated

participants.getAllJoinedPeers()

Returns all peers currently present in the room If you are in a group call, use meeting.participants.joined instead

participants.getParticipantsInMeetingPreJoin()

Returns all peers currently in the room, is a non paginated call and should only be used if you are in a non room joined state, if in a joined group call, use meeting.participants.joined