Is your feature request related to a problem? Please describe.
Hls.js currently supports alternate renditions for audio (TYPE=AUDIO) and subtitles (TYPE=SUBTITLES) as defined in the HLS spec. However, alternate video renditions (TYPE=VIDEO) are not supported. This prevents users from switching between multiple camera angles or video streams when they are defined in the manifest.
Describe the solution you'd like
I would like Hls.js to support the #EXT-X-MEDIA:TYPE=VIDEO tag, in the same way it already does for audio and subtitle tracks. Specifically:
- Expose video tracks in the API, similar to audio tracks.
- Provide the ability to programmatically select a video track at runtime.
- Keep the existing levels feature (bitrate/quality switching) available within each video track, so users can still benefit from adaptive bitrate streaming for every video angle.
Additional context
The HLS specification explicitly defines support for alternate video tracks:
https://developer.apple.com/documentation/http-live-streaming/adding-alternate-media-to-a-playlist
For a practical example, I have created the following stream, which includes multiple video tracks:
https://danihorvath.github.io/hls-multivideo/master.m3u8
I found a related issue (hls.js #1825), but it has been closed.
Is your feature request related to a problem? Please describe.
Hls.js currently supports alternate renditions for audio (TYPE=AUDIO) and subtitles (TYPE=SUBTITLES) as defined in the HLS spec. However, alternate video renditions (TYPE=VIDEO) are not supported. This prevents users from switching between multiple camera angles or video streams when they are defined in the manifest.
Describe the solution you'd like
I would like Hls.js to support the #EXT-X-MEDIA:TYPE=VIDEO tag, in the same way it already does for audio and subtitle tracks. Specifically:
Additional context
The HLS specification explicitly defines support for alternate video tracks:
https://developer.apple.com/documentation/http-live-streaming/adding-alternate-media-to-a-playlist
For a practical example, I have created the following stream, which includes multiple video tracks:
https://danihorvath.github.io/hls-multivideo/master.m3u8
I found a related issue (hls.js #1825), but it has been closed.