-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[Stream] Various Updates #19980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Stream] Various Updates #19980
Changes from all commits
01f1e61
227e565
e60ef7d
496e4f0
cc06a10
fef8519
503428d
412a9a3
8ec7812
65eefb1
a522947
5ae8a78
cb743d4
0248e86
1929773
c7731fe
7442394
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| --- | ||
| title: "Rewind, Replay, Resume: Introducing DVR for Stream Live" | ||
| description: > | ||
| Stream has added support for DVR for Live broadcasts. In other words, for those | ||
| who didn’t witness the magic of TiVo, you can now allow your viewers to rewind | ||
| and replay Live content during broadcasts. | ||
| date: 2025-02-14T12:00:00Z | ||
| --- | ||
|
|
||
| Previously, all viewers watched "the live edge," or the latest content of the | ||
| broadcast, synchronously. If a viewer paused for more than a few seconds, | ||
| the player would automatically "catch up" when playback started again. Seeking | ||
| through the broadcast was only available once the recording was available after | ||
| it conluded. | ||
|
|
||
| Starting today, customers can make a small adjustment to the player | ||
| embed or manifest URL to enable the DVR experience for their viewers. By | ||
| offering this feature as an opt-in adjustment, our customers are empowered to | ||
| pick the best experiences for their applications. | ||
|
|
||
| When building a player embed code or manifest URL, just add `dvrEnabled=true` as | ||
| a query parameter. There are some things to be aware of when using this option. | ||
| For more information, refer to [DVR for Live](/stream/stream-live/dvr-for-live/). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| --- | ||
| pcx_content_type: how-to | ||
| title: DVR for Live | ||
| sidebar: | ||
| badge: | ||
| text: Beta | ||
| --- | ||
|
|
||
| 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. | ||
|
|
||
| ## Stream Player | ||
|
|
||
| ``` html title="Stream Player embed format" | ||
| <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. | ||
|
|
||
| ## HLS manifest for custom players | ||
|
|
||
| ``` text title="HLS manifest URL format" | ||
| 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. | ||
|
|
||
| ## Video ID or Input ID | ||
|
|
||
| Stream Live allows loading the Player or HLS manifest by Video ID or Live Input | ||
| ID. Refer to [Watch a live stream](/stream/stream-live/watch-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](/stream/stream-live/watch-live-stream/#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. | ||
|
|
||
| ## Known Limitations | ||
|
|
||
| - 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this temporary? Is the solution also going to go live w/ the feature? (I may be remembering incorrectly!)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would depend on if the player had pre-fetched a rendition manifest that it wasn't playing. Because the Live Input ID does not refer to a past broadcast, fetching an updated manifest after the broadcast concludes will result in an HTTP 204. We will go forward with this limitation accepted, and see if folks run into it. This is why we recommend using DVR with a Video ID when possible. |
||
| - 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 usesW | ||
| 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. | ||
Uh oh!
There was an error while loading. Please reload this page.