-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add Support for EXT-X-DATERANGE Metadata #4720
Conversation
Without testing and not high familiarity with hls.js's code, this seems reasonable to me. I think my main two points of thought are:
|
HLS.js is not a stream validation tool. We try to follow the spec, but generally favor performance and interoperability over strict compliance. It is the duty of the stream author to follow the spec. Not doing so may result in unexpected client behavior. A few things we are not checking with this change request:
That these rules are followed is expected not validated by HLS.js. The unit tests should cover what we are validating, and the rule is to ignore invalid tags:
I think what has been added is pretty good in terms of preventing issues with bad updates related to duration and merging DATERANGES with the same ID. Let me know if there's anything not covered here that you think we should add. |
Yeah, being looser in accepting things makes sense to me. Just wasn't sure how far hls.js takes it. |
Recently (~2 years?), the main thing has been trying to maintain behaviour with Safari native |
Resolves #2218 Other changes: - Remove cues on buffer flush based on track type associated with metadata schema (video: emsg, audio: org.id3) - Handle Delta Playlist Update Date Range updates - Parse and validate DateRange tags - Add hls.playingDate to API: gets program date time at media playhead (video.currentTime) - Fix code formatting with prettier
7a7acc5
to
370e00c
Compare
This PR will...
Parse and validate Date Range tags in HLS playlists on playlist load. Date Range tags are converted to cues on the HTMLMediaElement's metadata text track on level update. In addition, the presence and duration of Date Range cues (as well as inband ID3 and emsg metadata cues already supported by HLS.js) are updated to reflect the Date Range content of the active playlist and inband metadata found in buffered audio/video tracks.
Why is this Pull Request needed?
These updates should more closely match the metadata text track cues produced by Safari when playing the same HLS stream natively in Safari.
Additional changes
hls.playingDate
to API: gets program date time at media playhead (video.currentTime
)Resolves issues:
Resolves #2218
Checklist