Waiting Room Management
Remote participants who need approval wait in the waiting room before joining the meeting. If the local user has the "Accept Requests" permission (meeting.permissions.host.canAcceptRequests
) enabled in their preset, they can access the waiting list and manage participant entry.
Accessing Waitlisted Participants
You can access the list of waitlisted participants via the meeting.participants.waitlisted
property.
// Get the list of waitlisted participants
final waitlistedParticipants = meeting.participants.waitlisted;
if (meeting.permissions.waitingRoom.canAcceptRequests) {
// User can manage waiting room
showWaitingRoomControls(waitlistedParticipants);
} else {
// User cannot manage waiting room
hideWaitingRoomControls();
}
Note: If the local user lacks the necessary permission, the waitlisted
property will return an empty list.
Accepting Requests
To accept a waiting room request, use the acceptWaitlistedParticipant()
method on meeting.participants
object:
// Accept the first waitlisted participant
final waitlistedParticipant = meeting.participants.waitlisted[0];
meeting.participants.acceptWaitlistedParticipant(waitlistedParticipant);
Rejecting Requests
To deny a waiting room request, use the rejectWaitlistedParticipant()
method on meeting.participants
object:
// Reject a waitlisted participant
final waitlistedParticipant = meeting.participants.waitlisted[0];
meeting.participants.rejectWaitlistedParticipant(waitlistedParticipant);
Waiting Room Events
To listen to waiting room changes, implement the RtkWaitlistEventListener
interface.
class WaitlistStatusNotifier extends RtkWaitlistEventListener {
void onWaitListParticipantJoined(RtkRemoteParticipant participant) {
// Called when a new participant joins the waiting room
}
void onWaitListParticipantAccepted(RtkRemoteParticipant participant) {
// Called when a waitlisted participant is accepted into the meeting
}
void onWaitListParticipantRejected(RtkRemoteParticipant participant) {
// Called when a waitlisted participant is denied entry into the meeting
}
void onWaitListParticipantClosed(RtkRemoteParticipant participant) {
// Called when a waitlisted participant leaves the waiting room
}
}
// Register the listener
final listener = WaitlistStatusNotifier()
meeting.addWaitlistEventListener(listener);