Playback
Every live stream is available two ways at once, from the same ingest. You do not choose at publish time.
| WebRTC (WHEP) | HLS | |
|---|---|---|
| Latency | Typically under a second | Several seconds |
| Reach | Modern browsers | Everything, including smart TVs |
| Best for | Auctions, betting, anything where the audience talks back | Scale, and long-tail devices |
The built-in player
Section titled “The built-in player”http://your-host:9001/watch/<application>/<stream>Public and unauthenticated, meant to be shared. It prefers WebRTC and falls back to HLS. If the broadcast ends, the page says so and reconnects on its own if it starts again.
HLS in your own player
Section titled “HLS in your own player”http://your-host:9001/live/<application>/<stream>/playlist.m3u8A standard media playlist. Segment length and how much of the live window is
retained are set in [hls].
Ad breaks appear as discontinuities, which conforming players handle without special support.
WebRTC in your own player
Section titled “WebRTC in your own player”Jadarit speaks WHEP. POST an SDP offer and play the answer:
POST /api/v1/apps/<application>/streams/<stream>/whepContent-Type: application/sdpconst pc = new RTCPeerConnection();pc.addTransceiver('video', { direction: 'recvonly' });pc.addTransceiver('audio', { direction: 'recvonly' });
const offer = await pc.createOffer();await pc.setLocalDescription(offer);
const res = await fetch( `/api/v1/apps/${app}/streams/${stream}/whep`, { method: 'POST', headers: { 'Content-Type': 'application/sdp' }, body: offer.sdp },);await pc.setRemoteDescription({ type: 'answer', sdp: await res.text() });Serving WebRTC beyond the LAN
Section titled “Serving WebRTC beyond the LAN”WebRTC media is UDP and does not travel over an HTTP reverse proxy or a Cloudflare Tunnel. To reach viewers outside your network you need:
public_ipset, so the server advertises a reachable ICE candidate- a fixed
udp_port_min/udp_port_maxrange, forwarded on your router
Both are in [webrtc]. Leaving the
range at 0/0 uses ephemeral ports, which works on a LAN and nowhere else.