Skip to main content

Video Room Embed Demo

What you build

You wire the published @devotel-orbit/web OrbitVideoRoom widget into a page you control. The widget needs two values your backend hands it: a server-minted join token and the media-server WebSocket endpoint. The Video Room Embed Demo page in the dashboard runs that exact sequence against one of your live rooms, then shows you the finished snippet — so you build and verify the integration in your tenant before a single line reaches your own site. Work through the four steps below. Each step ends with something you can check before you move on.

Prerequisites

Before you start:
  1. A scheduled video room exists in your organization. Create one under Rooms → scheduled rooms (see Video meetings). The demo joins real rooms; it does not create them.
  2. A server-side endpoint that can call POST /api/v1/video/rooms/:id/join. Tokens are minted server-side with your API credentials — the browser never sees an API key. The demo page exercises this route for you; for your own page you proxy the same call through your backend.
  3. The @devotel-orbit/web package installed on the site you plan to embed into (OrbitVideoRoom is exported from that package). The demo page already carries it, so this prerequisite applies to the page you ship, not the demo itself.
Access to the demo page matches the SDK Live Demo softphone gate: the dashboard owner, admin, and developer roles can open it. Every other role sees an access-denied notice. Open the demo at Developer → Video Room Embed Demo, or navigate directly to /developer/video-embed-demo.

Step 1 — Pick a room and mint the join token

  1. Pick a room from the picker (it lists your organization’s scheduled rooms) and optionally set a display name — that name becomes the label under your tile.
  2. Click Join via SDK widget. The page calls POST /api/v1/video/rooms/:id/join — the same route your production backend will call — and the response carries both the token and the media-server endpoint (livekit_url, or its ws_url alias; either fills the widget).
  3. The widget code loads only after you click Join, so opening the page costs no media bandwidth.
Check: the join succeeds without an error banner. If it fails, the page surfaces a mapped error (“Couldn’t mint a join token” or “video room connection dropped”) rather than a raw transport string — retry, or pick a different room.

Step 2 — Mount the widget

On success the page mounts the OrbitVideoRoom widget into the SDK widget card with the token and endpoint from Step 1. This is the same OrbitVideoRoom class and the same admin-free participant path your website visitors will use — nothing is dashboard-only. Check: the widget mounts and paints its own tile grid and control bar — mute, camera, screen share, device picker, and leave.

Step 3 — Confirm the connection state

The page badge tracks the widget state: connecting, connected, error, disconnected. Check: the tile grid paints and the badge lands on connected. Toggle mute and camera once to confirm the control bar is live. Then leave — the page tears the widget down on leave, re-join, or navigation away, so no camera or mic stays open.

Step 4 — Copy the snippet into your page

Once joined, the Embed snippet a developer copies card renders the assembly verbatim:
Copy it, then wire the placeholders on your backend: mint a fresh token per join, pass the join response’s livekit_url as serverUrl, and give the container any id you like.

Snippet-to-production checklist

The demo proves the integration in your tenant. Before you ship the snippet on your own site, confirm each of these still holds there:
  • Server-side token mint. Your backend calls the join route and returns only the token plus endpoint to the browser. An API key never appears in page source.
  • livekit_url passthrough. You forward the join response’s livekit_url (or ws_url) verbatim as the widget’s serverUrl — do not hardcode an endpoint.
  • Sane display name. The name you pass reads sensibly under the participant tile; it is what other participants see.
  • Cleanup on leave. Your page destroys the widget on leave and on navigation away, the same teardown the demo performs — no lingering camera or mic.
For the full production pattern — waiting room with host admit, recordings on your storage, and a tenant-controlled retention window — follow the embed video consultation button guide.

See also