Skip to main content

Build a live guest queue

A host is live. Viewers ask to come on, the host picks who joins the stage, talks with them, then sends them back to the audience. The format behind live shopping, creator Q&As and call-in shows.

A host presenting a product on a live stream from a phone on a tripod
Approval
setting turns every mic or camera into a request
Host decides
who goes live, from the request list
HLS
carries the show to viewers outside the room

How it fits together​

  1. HostGoes liveJoins the room your server created.
  2. ViewerAsks to joinTurning on the mic or camera sends a request instead.
  3. MediaSFUQueues the requestThe host sees who is waiting and what they asked for.
  4. HostBrings them onAccepts, talks, then mutes or removes the guest.

What MediaSFU handles​

You needMediaSFU gives youRead
Viewers who must ask before going liveMic, camera and screen-share set to approvalRooms API
A queue the host can act onThe request list, with accept and reject for each requestLarge rooms and moderation
A waiting area before people enterThe waiting room, where the host admits each personLarge rooms and moderation
Sending a guest backMuting or removing a participant from the host controlsLarge rooms and moderation
Chat alongside the stageRoom chat, which you can turn off per roomRooms API
Viewers outside the roomHLS output of the stageHLS broadcast

Set it up​

  1. Create the room from your server with every media type on approval:

    curl -X POST https://mediasfu.com/v1/rooms \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
    -d '{"action":"create","userName":"host","duration":60,"capacity":200,"eventType":"webinar","meetingRoomParams":{"audioSetting":"approval","videoSetting":"approval","screenshareSetting":"approval","chatSetting":"allow"}}'
  2. For an audience larger than the room, add "recordingParams":{"recordingHLSSupport":true} and play the stream with the HLS guide.

  3. Let the host and viewers join from your app (below). Your server hands out the room details; the API key stays there (Secure backend).

Build it in your SDK​

Check it works​

  • Join as the host, then as two viewers on other devices.
  • Each viewer turns on their microphone. Two requests appear for the host; neither viewer is heard yet.
  • Accept one: that viewer is now on stage and audible. Reject the other: they stay in the audience.
  • Remove the guest from the stage, then end the session as the host.

Go further​