Skip to main content

Waitlisted Participants

Participants in the waiting room are represented by RtkRemoteParticipant objects. If the local user has the permission to accept waiting room requests (selfPermissions.host.canAcceptRequests is true), you can manage pending waiting room requests, accepting or rejecting them as needed. You can access the list of waitlisted participants via the meeting.participants.waitlisted property.

NOTE

If the local user is not a host, meeting.participants.waitlisted property returns an empty list.

Accepting Requests

To accept a waiting room request, use the acceptWaitingRoomRequest(String) method on a RtkParticipants object:

val waitlistedParticipant = meeting.participants.waitlisted[0]
meeting.participants.acceptWaitingRoomRequest(waitlistedParticipant.id)

Rejecting Requests

To deny a waiting room request, use the rejectWaitingRoomRequest(String) method on a RtkParticipants object:

val waitlistedParticipant = meeting.participants.waitlisted[0]
meeting.participants.rejectWaitingRoomRequest(waitlistedParticipant.id)

Waiting Room Events

Implement the RtkWaitlistEventListener interface to listen for events related to the waiting room:

meeting.addWaitlistEventListener(object: RtkWaitlistEventListener {
override fun onWaitListParticipantJoined(participant: RtkRemoteParticipant) {
// Called when a new participant joins the waiting room
}

override fun onWaitListParticipantAccepted(participant: RtkRemoteParticipant) {
// Called when a waitlisted participant is accepted into the meeting
}

override fun onWaitListParticipantRejected(participant: RtkRemoteParticipant) {
// Called when a waitlisted participant is denied entry into the meeting
}

override fun onWaitListParticipantClosed(participant: RtkRemoteParticipant) {
// Called when a waitlisted participant leaves the waiting room
}
})