This page gives longer, end-to-end walkthroughs. They combine the control plane and data plane into realistic flows. Each recipe assumes a control-plane Streams client constructed with baseUrl/apiKey/orgId.

Recipe 1 — Go live from the browser, watch with a signed URL

This is a complete “create input → publish a webcam → watch” loop. It runs entirely in the browser with the SDK’s MoQT publisher and viewer.
1

Create a live input

2

Publish a webcam over MoQT

3

Mint a signed playback URL for viewers

4

Play it into a <video>

5

Tear down

On a warm same-region path, this loop is sub-second glass-to-glass. Across an internet RTT, latency is approximately one RTT plus one MoQT group time. Keep the publisher’s timesliceMs short (250–500 ms) for tighter latency, at the cost of slightly higher overhead.

Recipe 2 — RTMP event to thousands of viewers

A hardware/OBS encoder contributes over RTMP. The engine transcodes and fans the stream out to every viewer over MoQT. The control plane mints per-viewer signed URLs.
1

Provision the input and rotate a fresh key

2

Point the encoder at the RTMP endpoint

The engine ingests, transcodes to multiple ABR renditions, and publishes the catalog in-band on the .catalog track.
3

Issue a signed URL per viewer (server side)

4

Each browser plays the URL

Late joiners start at the most recent group boundary (keyframe). Under loss, the relay drops by priority. It does not block the stream.
The relay mesh fans out each group. Thus the encoder uploads once, whatever number of viewers attach. Fan-out cost lives at the edge POPs, not on the contribution link.

Recipe 3 — TUS2 upload to VOD playback

Upload a recorded file with resumable chunks. Let the engine package it to CMAF. Then play the resulting asset from the same viewer that the live path uses.
1

Start a resumable upload

2

Upload in resumable chunks

3

Wait for packaging, then play the asset

On completion the engine packages the file to CMAF/fMP4 and assigns a playback id (pb_…). The same viewer plays VOD over HTTPS from the catalog:
VOD reuses the live stream/<org>/… namespace and the same catalog format. Thus a single player component handles both live (lv_…) and on-demand (pb_…) ids. The only difference is the delivery framing (MoQT vs HTTPS). The viewer picks the framing by id prefix.

Recipe 4 — Headless capture of a live stream (Python)

Record a live broadcast to disk on the server side. Handle signing-key rotation before the token expires.
A bad or expired playback JWT closes the session with auth_failed (reported through on_close). For captures longer than the token TTL, re-mint with inp.signed_playback_url(...). Re-open the viewer before expires_at.