feat: parse mp4 webvtt segments
Description
Feature
This pull request adds support for parsing mp4 encapsulated webvtt segments by modifying the existing vtt-segment-loader and associated functions to interface with the transmuxer to parse fmp4 webvtt initialization and content segments.
Specific Changes proposed
- Update mux.js to include the WebVttParser for use in the transmuxer worker.
- Modify the
vtt-segment-loaderto be able to handle fragmented mp4 segments. - Parse
wvttinitialization segments and content segments with the help of the transmuxer. - Parse the cues provided by the transmuxer into
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
- [x] 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
Codecov Report
Attention: Patch coverage is 98.11321% with 1 line in your changes missing coverage. Please review.
Project coverage is 84.06%. Comparing base (
8456cb3) to head (3618bdc). Report is 1 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/transmuxer-worker.js | 80.00% | 1 Missing :warning: |
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.