Skip to content

Commit c1d2960

Browse files
committed
fix: Safari playback stall with overrideNative and experimentalUseMMS
Safari playback does not start when using overrideNative together with experimentalUseMMS. This appears to be caused by setting the segment metadata track mode to 'hidden', which can stall playback in Safari when using Managed Media Source. Disable the metadata track in this specific scenario to prevent Safari from processing it and allow playback to start normally. Fixes #1600
1 parent 6da45b0 commit c1d2960

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/playlist-controller.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,15 @@ export class PlaylistController extends videojs.EventTarget {
254254
label: 'segment-metadata'
255255
}, false).track;
256256

257-
this.segmentMetadataTrack_.mode = 'hidden';
257+
// Only disable segment metadata track in Safari/iOS when using overrideNative HLS
258+
if ((videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS) &&
259+
options.overrideNative &&
260+
options.experimentalUseMMS &&
261+
this.sourceType_ === 'hls') {
262+
this.segmentMetadataTrack_.mode = 'disabled';
263+
} else {
264+
this.segmentMetadataTrack_.mode = 'hidden';
265+
}
258266

259267
this.decrypter_ = new Decrypter();
260268
this.sourceUpdater_ = new SourceUpdater(this.mediaSource);

0 commit comments

Comments
 (0)