Waitlisted Participants
Participants in the waiting room are represented by DyteRemoteParticipant
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 DyteParticipants
object:
- Kotlin
- Java
val waitlistedParticipant = meeting.participants.waitlisted[0]
meeting.participants.acceptWaitingRoomRequest(waitlistedParticipant.id)
DyteRemoteParticipant waitlistedParticipant = meeting.getParticipants().getWaitlisted().get(0);
meeting.getParticipants().acceptWaitingRoomRequest(waitlistedParticipant.id);
Rejecting Requests
To deny a waiting room request, use the rejectWaitingRoomRequest(String)
method on a DyteParticipants
object:
- Kotlin
- Java
val waitlistedParticipant = meeting.participants.waitlisted[0]
meeting.participants.rejectWaitingRoomRequest(waitlistedParticipant.id)
DyteRemoteParticipant waitlistedParticipant = meeting.getParticipants().getWaitlisted().get(0);
meeting.getParticipants().rejectWaitingRoomRequest(waitlistedParticipant.id);
Waiting Room Events
Implement the DyteWaitlistEventsListener
interface to listen for events related to the waiting room:
- Kotlin
- Java
meeting.addWaitlistEventsListener(object: DyteWaitlistEventsListener {
override fun onWaitListParticipantJoined(participant: DyteRemoteParticipant) {
// Triggered when a new participant joins the waiting room
}
override fun onWaitListParticipantAccepted(participant: DyteRemoteParticipant) {
// Triggered when a waitlisted participant is accepted into the meeting
}
override fun onWaitListParticipantRejected(participant: DyteRemoteParticipant) {
// Triggered when a waitlisted participant is denied entry into the meeting
}
override fun onWaitListParticipantClosed(participant: DyteRemoteParticipant) {
// Triggered when a waitlisted participant leaves the waiting room
}
})
meeting.addWaitlistEventsListener(new DyteWaitlistEventsListener() {
@Override
public void onWaitListParticipantJoined(DyteRemoteParticipant participant) {
// Triggered when a new participant joins the waiting room
}
@Override
public void onWaitListParticipantAccepted(DyteRemoteParticipant participant) {
// Triggered when a waitlisted participant is accepted into the meeting
}
@Override
public void onWaitListParticipantRejected(DyteRemoteParticipant participant) {
// Triggered when a waitlisted participant is denied entry into the meeting
}
@Override
public void onWaitListParticipantClosed(DyteRemoteParticipant participant) {
// Triggered when a waitlisted participant leaves the waiting room
}
})