Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1545 +/- ##
==========================================
- Coverage 86.39% 84.06% -2.34%
==========================================
Files 43 43
Lines 11165 11627 +462
Branches 2552 2604 +52
==========================================
+ Hits 9646 9774 +128
- Misses 1519 1853 +334 ☔ View full report in Codecov by Sentry. |
| } | ||
|
|
||
| const segmentInfo = this.pendingSegment_; | ||
| const isMp4WebVttSegment = result.mp4VttCues && result.mp4VttCues.length; |
There was a problem hiding this comment.
minor but would isMp4WebVttSegmentWithCues be a more accurate name?
There was a problem hiding this comment.
Good call, much more descriptive.
| segmentInfo.mp4VttCues.forEach((cue) => { | ||
| const start = cue.start + timestampOffset; | ||
| const end = cue.end + timestampOffset; | ||
| const vttCue = new window.VTTCue(start, end, cue.cueText); |
There was a problem hiding this comment.
Is it worth confirming the existence/data type of these cue values or are we guaranteed they will be correct at this point?
There was a problem hiding this comment.
The sample duration and cueText must be defined coming from the transmuxer, so I think we're guaranteed these values will be correct with regards to type at this point. https://github.com/videojs/mux.js/blob/e1b4d161f51782e4712d020b66d5087bd6febb3d/lib/mp4/webvtt-parser.js#L107
Description
Feature
This pull request adds support for parsing mp4 encapsulated webvtt segments by modifying the existing
vtt-segment-loaderand associated functions to interface with the transmuxer to parse fmp4 webvtt initialization and content segments.Specific Changes proposed
vtt-segment-loaderto be able to handle fragmented mp4 segments.wvttinitialization segments and content segments with the help of the transmuxer.VTTCueobjects and add them to the subtitles text tracks.Demo
See the deployed demo page here
with the simulated live DASH manifest from DASH-IF with mp4 encapsulated webvtt: https://livesim2.dashif.org/livesim2/timesubswvtt_en/testpic_2s/Manifest.mpd
Requirements Checklist