Recipes← all recipesView on GitHub

Create a video room and join from the browser

VideoWebRTC video rooms

A room is created over REST, a token is minted per participant, and the browser joins with layouts and screen share.

video

The claim

A video room is a Fabric Conference Room resource: one REST call creates it and gives it an address, /public/<name>. A participant needs no account, because your server mints a Guest token pinned to that one address. The browser uses the Browser SDK v4 to dial it with audio and video. SignalWire’s video is an MCU, so each participant receives one mixed stream; layouts and screen share are call-level controls.

How it works

Server (python/app.py):

client.fabric.conference_rooms.create(name="team-standup", max_members=25, layout="grid-responsive",
                                      quality="720p", record_on_start=False, enable_room_previews=True)
client.fabric.tokens.create_guest_token(allowed_addresses=["/public/team-standup"])

Browser (typescript/index.ts):

const { token, destination } = await (await fetch("/token", { method: "POST", ... })).json();
const client = new SignalWire(new StaticCredentialProvider({ token }));
await client.connect();
const call = await client.dial(destination, { audio: true, video: true });
call.remoteStream$.subscribe((s) => { if (s) video.srcObject = s; });
call.setLayout({ name: "grid-responsive" });     // layouts
call.self.startScreenShare();                    // screen share

The Guest token can dial only the room, and the project API token never leaves the server. A signed-in user would get a Subscriber Access Token instead (call-from-a-browser), which can also receive calls. Adding a phone caller to the same room is add-a-phone-caller-to-a-video-room; recording and RTMP are their own REST controls (record-a-video-room, stream-a-video-room-to-rtmp).

What to change first

Mint the token with an expire_at a few minutes out, and turn record_on_start on to get a recording of every session.