videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.53k stars 425 forks source link

fix: in manifest vtt ios mse issue (2.x) #1364

Closed dzianis-dashkevich closed 1 year ago

dzianis-dashkevich commented 1 year ago

These are cherry-picked commits from this PR: https://github.com/videojs/http-streaming/pull/1360 with fixed conflicts for 2.x

...

Description

We have a bug with default options setup for HLS in-manifest VTT in chrome iOS (and I assume other non-safari Webkit-based iOS browsers). The problem is that we do not load vtt.js, but we use VHS to handle playback. vtt-segment-loader implicitly depends on window.WebVTT.Parser. Since vtt.js is not loaded - window.WebVTT is undefined. It means that we are not able to parse received VTT cues.

Specific Changes proposed

Note Tested Chrome on iPadOS 16.2: default run: (native playback and apple's native text tracks are shown) set override Native to true (VHS playback and apple's native text tracks are shown) set override Native to true and set native text tracks to false (VHS playback and styled text tracks are shown)

Requirements Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #1364 (b11684f) into 2.x (1ed5343) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              2.x    #1364   +/-   ##
=======================================
  Coverage   86.34%   86.35%           
=======================================
  Files          39       39           
  Lines        9859     9871   +12     
  Branches     2299     2301    +2     
=======================================
+ Hits         8513     8524   +11     
- Misses       1346     1347    +1     
Impacted Files Coverage Δ
src/master-playlist-controller.js 94.86% <100.00%> (+0.06%) :arrow_up:
src/videojs-http-streaming.js 91.17% <100.00%> (+0.09%) :arrow_up:
src/vtt-segment-loader.js 81.35% <100.00%> (-0.32%) :arrow_down:
src/source-updater.js 94.19% <0.00%> (-0.33%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more