From db62124a387621f88321cd4e07c30e24af4e2827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=9C=EB=A7=8C=EC=9A=B1?= <98882987+manNomi@users.noreply.github.com> Date: Wed, 30 Sep 2026 16:36:18 +0900 Subject: [PATCH] feat: allow disabling the segment metadata track --- README.md | 25 +++++++++++++ index.html | 5 +++ scripts/index.js | 7 ++-- src/playlist-controller.js | 12 ++++--- src/videojs-http-streaming.js | 2 ++ test/playlist-controller.test.js | 15 ++++++++ test/segment-loader.test.js | 24 +++++++++++++ test/videojs-http-streaming.test.js | 56 +++++++++++++++++++++++++++++ 8 files changed, 139 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 88dee8b06..564c43195 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ Video.js Compatibility: 7.x, 8.x - [List](#list) - [withCredentials](#withcredentials) - [useCueTags](#usecuetags) + - [useSegmentMetadataTrack](#usesegmentmetadatatrack) - [parse708captions](#parse708captions) - [overrideNative](#overridenative) - [experimentalUseMMS](#experimentalusemms) @@ -317,6 +318,30 @@ cuesTrack.addEventListener('cuechange', function() { }); ``` +##### useSegmentMetadataTrack +* Type: `boolean` +* Default: `true` +* can be used as an initialization option or a source option + +When set to `false`, VHS does not create the `segment-metadata` text track. +Segment metadata cues and `cuechange` events from that track are unavailable. +Other text tracks, including subtitles and in-band metadata, are not affected. + +This can be used to work around playback stalls on affected Safari/iOS versions +when using `overrideNative` with native text tracks. See [#1600](https://github.com/videojs/http-streaming/issues/1600). +Applications that need the segment metadata track should leave this option enabled. + +```javascript +var player = videojs('playerId', { + html5: { + vhs: { + overrideNative: true, + useSegmentMetadataTrack: false + } + } +}); +``` + ##### parse708captions * Type: `boolean` * Default: `true` diff --git a/index.html b/index.html index d8f42d7e5..f1e7f0021 100644 --- a/index.html +++ b/index.html @@ -202,6 +202,11 @@ +
+ + +
+