Using the Livepeer Player (recommended)
The Livepeer Player handles WebRTC (low latency) and HLS fallback. Fetch playback info on the server, then pass the parsed source to the Player:Using your own player
- Fetch playback info from the Playback Info API with the
playbackId. - The response includes sources such as:
- HLS —
application/vnd.apple.mpegurlURL (e.g.https://livepeercdn.studio/hls/{playbackId}/index.m3u8). - WebRTC — For low latency; use a WebRTC/WHEP-capable player. The API may return a WebRTC source; STUN/TURN are provided in the SDP response.
- HLS —
- Pass the chosen URL (or SDP) to a player that supports HLS or WebRTC (e.g. Video.js, HLS.js, or a WHEP client).
If the stream contains B-frames, WebRTC playback may not be available; playback will fall back to HLS. Instruct OBS users to use keyframe interval 1 and disable B-frames. See Stream via OBS.
Embeddable player
You can embed the hosted player with an iframe:- Low latency — Livestreams use WebRTC by default. Use
&lowLatency=falseto force HLS, or&lowLatency=forceto force WebRTC. - Clipping — Add
&clipLength=60(max 120 seconds) to allow viewers to clip. - Other —
&muted=false,&autoplay=false,&loop=true,constant=true(for constant playback, e.g. music).