Waitlisted Participants
Participants in the waiting room are represented by DyteWaitlistedParticipant
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 acceptWaitListedRequest() method on a DyteWaitlistedParticipant
object:
let waitlistedParticipant = meeting.participants.waitlisted[0]
waitlistedParticipant.acceptWaitListedRequest()
Rejecting Requests
To deny a waiting room request, use the rejectWaitListedRequest()
method on a DyteWaitlistedParticipant
object:
let waitlistedParticipant = meeting.participants.waitlisted[0]
waitlistedParticipant.rejectWaitListedRequest()
Waiting Room Events
Implement the DyteWaitlistEventsListener
interface to listen for events related to the waiting room:
extension MeetingViewModel: DyteWaitlistEventsListener {
func onWaitListParticipantJoined(participant: DyteMeetingParticipant) {
// triggered when waitList peer is joined
}
func onWaitListParticipantAccepted(participant: DyteMeetingParticipant) {
// triggered when waitListed peer is accepted by host
}
func onWaitListParticipantRejected(participant: DyteMeetingParticipant) {
// triggered when entry of waitListed peer declined by host
}
func onWaitListParticipantClosed(participant: DyteMeetingParticipant) {
// triggered when waitListed peer get's disconnected
}
}