Waiting Room

Overview

Waiting rooms (waiting for the host to join) are a common requirement in many businesses. The waiting room is where participants join a session and wait for their turn to connect with the host. For example, patients can hang out in the waiting room until their doctor arrives. This guide will help you implement a waiting room using roles on the 100ms platform. Waiting room is vital in telehealth, ed-tech, or webinar space.

Try waiting room

TL;DR - Check out this video to implement waiting room using video conferencing starter kit.


Implementing waiting room using roles in 100ms involves the following steps:

  1. Create a new app
  2. Understand roles (host, guest, waiting room)
  3. Understand publish/subscribe strategies and permissions
  4. Fetch room join (joinedAt) timestamp for each waiting room participant
  5. Move participants from waiting room to main room based on their join time (First Come, First Served)

Create a new app

Create a new app

  1. Make sure that you have an account with 100ms and can access the 100ms dashboard
  2. On the dashboard, create a new app using the Video Conferencing Starter Kit
  3. Specify a subdomain and region to deploy the app

Understand roles to set up waiting room

  • This starter kit configures your new app with two roles:

    Join URLs

  • host: This role represents a host,
    • Who publishes their audio/video/screen tracks
    • Subscribes to the "guest" and "waiting-room" roles
    • And has various permissions to perform actions on the participants such as remove a participant, mute a participant, etc,.

Try it out

  1. To test the waiting room, go to your dashboard home and use the roles URLs for host to join the room as a host and start the session.

  2. Once the session has started, use the roles URLs for waiting room to join the room as a waiting room participant.

  3. Go to the peer list in the host view and click on the three-dots menu > change role > waiting room to the guest.


Note: Force the role change action rather than requesting the participant. Change role action leverages the change role client-side API.

Implement it using server-side API

You can follow the same steps you followed in the previous section to implement waiting rooms and manage participants from server-side completely.

  • Create a template with host, guest and waiting room roles
    • You can set the publish/subscribe strategies and permissions using the publishParams, subscribeParams and permissions objects.
    • If you're trying to use an existing template, you can create a new role waiting room using the create a role API to allow participants to join a waiting room.
  • Once the template is set up and a session has started with a host participant as a host and waiting room participants, fetch the room join (joined_at) timestamp for each participant.
  • Use the update a peer API with the value for role argument as guest to move the participant from waiting room to main room.

Have a suggestion? Recommend changes ->

Was this helpful?

1234