DVR for Live
Stream Live supports "DVR mode" on an opt-in basis to allow viewers to rewind,
resume, and fast-forward a live broadcast. To enable DVR mode, add the
dvrEnabled=true
query parameter to the Stream Player embed source or the HLS
manifest URL.
<div style="position: relative; padding-top: 56.25%;"> <iframe src="https://customer-<CODE>.cloudflarestream.com/<INPUT_ID|VIDEO_ID>/iframe?dvrEnabled=true" style="border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true" ></iframe></div>
When DVR mode is enabled the Stream Player will:
- Show a timeline the viewer can scrub/seek, similar to watching an on-demand video. The timeline will automatically scale to show the growing duration of the broadcast while it is live.
- The "LIVE" indicator will show grey if the viewer is behind the live edge or red if they are watching the latest content. Clicking that indicator will jump forward to the live edge.
- If the viewer pauses the player, it will resume playback from that time instead of jumping forward to the live edge.
https://customer-<CODE>.cloudflarestream.com/<INPUT_ID|VIDEO_ID>/manifest/video.m3u8?dvrEnabled=true
Custom players using a DVR-capable HLS manifest may need additional configuration to surface helpful controls or information. Refer to your player library for additional information.
Stream Live allows loading the Player or HLS manifest by Video ID or Live Input ID. Refer to Watch a live stream for how to retrieve these URLs and compare these options. There are additional considerations when using DVR mode:
Recommended: Use DVR Mode on a Video ID URL:
- When the player loads, it will start playing the active broadcast if it is still live or play the recording if the broadcast has concluded.
DVR Mode on a Live Input ID URL:
- When the player loads, it will start playing the currently live broadcast if there is one (refer to Live Input Status).
- If the viewer is still watching after the broadcast ends, they can continue
to watch. However, if the player or manifest is then reloaded, it will show the
latest broadcast or "Stream has not yet started" (
HTTP 204
). Past broadcasts are not available by Live Input ID.
- When using DVR Mode and a player/manifest created using a Live Input ID, the player may stall when trying to switch quality levels if a viewer is still watching after a broadcast has concluded.
- Performance may be degraded for DVR-enabled broadcasts longer than three hours. Manifests are limited to a maxiumum of 7,200 segments. Segment length is determined by the keyframe interval, also called GOP size.
- DVR Mode relies on Version 8 of the HLS manifest specification. Stream uses HLS Version 6 in all other contexts. HLS v8 offers extremely broad compatibility but may not work with certain old player libraries or older devices.
- DVR Mode is not available for DASH manifests.