Live Streaming
Stage and roles
How hosts, guests, admins and viewers work in a live room.
Roles
The server decides a user's role, and a client can't give itself a better one.
| Role | Publishes | Moderates | How you get it |
|---|---|---|---|
host | Yes | Yes | You're the verified room owner: userId == roomOwnerId |
guest | Yes | No | A host or admin adds you to the stage |
admin | No | Yes | The owner makes you a moderator |
audience | No | No | The default for everyone else |
Publishing and moderating are separate. Being on stage only lets you publish, and being an admin only lets you moderate. Adding an admin to the stage returns 409.
Going on stage
- A viewer raises a hand. This sends a notification to the host and admins, and nothing is queued on the server.
- A host or admin adds the viewer, whose role becomes
guest. - The host can remove a guest, or the guest can step down. Either way, they return to
audience.
The kit's UI handles this. For your own UI, use the controller:
await controller.requestToSpeak(); // a viewer raises a hand
await controller.approveSpeakerRequest(targetId); // the host accepts
await controller.inviteToSpeak(targetId); // the host invites someonecontroller.stageApi exposes the stage endpoints directly. They're listed in Stage.
Moderators
Admins are saved on the room, so the owner can assign someone before they join:
await controller.assignAdmin(targetIdentity: targetId, name: 'Moderator');
final admins = await controller.listAdmins(); // each row has isOnline
final offline = await controller.listAdmins(presence: 'offline');
await controller.revokeAdmin(targetId);Guest tiles
maxGuestTiles, 3 by default, only sets how many tiles the kit draws. It isn't a limit on the stage. If you add more guests than that, they still publish, but the kit doesn't show a tile for them.