Support containerless formats
See original GitHub issueHave you read the FAQ and checked for duplicate open issues? Yes
Is your feature request related to a problem? Please describe.
Some HLS content uses containerless formats, such as raw AAC or raw MP3. In these formats, there is no timestamp information. This not only complicates the building of the segment index in the HLS parser, but it requires special timestamp management at the MediaSource level because these formats implicitly force their SourceBuffer into sequence
mode.
Without special handling, the timestamps are never right after seeking, even if we synthesize correct SegmentReference timestamps during the playlist parsing.
Describe the solution you’d like
We should skip these formats in the HLS parser’s timestamp discovery stage. We should also mark these streams as being containerless. Finally, StreamingEngine should use this containerless flag to manage timestamps at the MediaSource level (set timestampOffset every time the buffer is cleared, and include the first appended segment reference’s start time).
Describe alternatives you’ve considered
We could reject containerless formats, but I’d prefer to improve our support for them for the sake of legacy HLS content.
Additional context
Related to #1083 (raw AAC). Sequence mode docs: https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/mode Spec text around sequence mode: https://www.w3.org/TR/media-source/#dom-appendmode-sequence
Issue Analytics
- State:
- Created 4 years ago
- Comments:25 (8 by maintainers)
Top GitHub Comments
The bulk of this feature work should be merged very soon. We may need to follow up with a couple minor changes after that, and of course, we’ll need testing and feedback from the community. Looking forward to releasing this in v3.4!
Great news! Thank you. We will close this issue, then.
If anyone has content that doesn’t work correctly after v4 is released, please file a new issue with links to playlists.