Account for MPEGTS rollover when adjusting vtt cues
Description
This fixes an issue with a long running stream where the cue start times are larger than the maximum mpegts timestamp of ~27 hours.
Specific Changes proposed
VTT cue start and end times are adjusted to ensure that they are within the range of mpeg ts PTS which has a max size of 2^33.
Requirements Checklist
- [ ] Feature implemented / Bug fixed
- [ ] If necessary, more likely in a feature request than a bug fix
- [ ] Unit Tests updated or fixed
- [ ] Docs/guides updated
- [ ] Example created (starter template on JSBin)
- [ ] Reviewed by Two Core Contributors
💖 Thanks for opening this pull request! 💖
Things that will help get your PR across the finish line:
- Run
npm run lint -- --errorslocally to catch formatting errors earlier. - Include tests when adding/changing behavior.
- Include screenshots and animated GIFs whenever possible.
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.
Codecov Report
Merging #1334 (49df5b0) into main (9db9e99) will increase coverage by
0.00%. The diff coverage is100.00%.
@@ Coverage Diff @@
## main #1334 +/- ##
=======================================
Coverage 86.31% 86.31%
=======================================
Files 39 39
Lines 9856 9857 +1
Branches 2298 2298
=======================================
+ Hits 8507 8508 +1
Misses 1349 1349
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/vtt-segment-loader.js | 81.21% <100.00%> (+0.10%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@gkatsev / @gesinger - Any thoughts on what I can do to get this in? Thanks!
I assume that this PR should handle this case as well: https://github.com/videojs/http-streaming/pull/1472
PS: it is not related to TS segments only. There might be cases when we have CMAF for video/audio, and VTT might still have an MPEGTS timestamp map.
I think this was handled in this PR https://github.com/videojs/http-streaming/pull/1472. @raytiley please let me know if this doesn't fix your rollover issue. Closing for now.