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 #1360

Closed dzianis-dashkevich closed 1 year ago

dzianis-dashkevich commented 1 year ago

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 #1360 (5b877a9) into main (d7e8713) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1360      +/-   ##
==========================================
+ Coverage   86.01%   86.03%   +0.01%     
==========================================
  Files          40       40              
  Lines        9842     9855      +13     
  Branches     2294     2295       +1     
==========================================
+ Hits         8466     8479      +13     
  Misses       1376     1376              
Impacted Files Coverage Δ
src/playlist-controller.js 95.18% <100.00%> (+0.06%) :arrow_up:
src/videojs-http-streaming.js 90.61% <100.00%> (+0.13%) :arrow_up:
src/vtt-segment-loader.js 80.79% <100.00%> (-0.33%) :arrow_down:

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