-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Is your feature request related to a problem? Please describe.
Support the time dimension of the Media Fragments URI specification
Describe the solution you'd like
When calling loadSource( ), the HLS player should respect the Media Fragments URI if it exists in the source url.
e.g.
const hls = new Hls();
hls.loadSource( "http://my.streamURL.com/playlist.m3u8#t=5,10" );
Would confine the playback of the stream with a start time of 5 seconds, and an end time of 10 seconds. More specifically: the player would automatically seek to the 5 second mark initially, and would automatically pause at the 10 second mark.
Additional context
This has been requested before here and it was closed by @robwalch stating that "...[editing streams] is not a feature HLS players or the HTMLMediaElement..."
A few words on the use case: it's often the case that a video player client wants to control aspects of the stream, without having to actually edit the media, or control aspects of the stream from the server, i.e. a manifest. I believe that is one of the intents of the Media Fragment URI spec.
My experience with HLS.js is that it's often used as a bridge to bring HLS playback parity between Safari and other browsers. Safari seems to support the time dimension of Media Fragment URIs for HLS: you can simply append #t=5,10 to the end of a video element's src attribute (an m3u8 manifest) and it will confine playback to the region specified (start at 5, end at 10.) It's also worth nothing that current versions Safari, Edge, Chrome and Firefox seem to support the time dimension of Media Fragment URIs for non-HLS sources, i.e. you can append the fragment to the source attribute of a non-HLS video asset (e.g. an MP4 file), and it will be respected.
This feature would bring parity so that an application using Media Fragment URIs could use them for HLS and non-HLS assets alike, across major current browsers.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status