Skip to main content
Version: 2.0.x

Waiting Screen - iOS

To create a smoother and more polished entry experience for audience members, it's important not to immediately render the meeting room when they join. Instead, show a waiting screen until at least one host is present in the room.

Why This Matters?​

  • Hosts are typically responsible for driving the meeting, and their presence is essential before audience members should be able to view or interact in the room.

  • Allowing audience members (in RECV_ONLY mode) to enter a meeting with no active hosts (in SEND_AND_RECV mode) can result in confusion and a poor user experience.

Participant Modes​

  • Hosts must join the meeting with the SEND_AND_RECV mode.
  • Audience members should join with the RECV_ONLY mode.

Implementation Guide​

You can achieve this behavior by using the participants list and onParticipantJoined event from the useMeeting hook.

  1. Check if a Host is Present On initial render, use the participants object to determine if there's already a host in the room:
func hasHost(participants: [String: Participant]) -> Bool {
return participants.values.contains { $0.mode == "SEND_AND_RECV" }
}

If hasHost is true, render the meeting view. Otherwise, show the waiting screen.

  1. Listen for Host Join Always listen for the onParticipantJoined event in case a host joins after the audience participant:

extension LiveStreamViewController: MeetingEventListener {

func onParticipantJoined(_ participant: Participant) {
if participant.mode == "SEND_AND_RECV" {
// Update your UI or state to show the meeting view
DispatchQueue.main.async {
self.showMeetingView()
}
}
}
}

This ensures that as soon as a host joins, the waiting audience members are transitioned smoothly into the meeting view.

Waiting Screen

Got a Question? Ask us on discord