Skip to content

fix: Safari playback stall with overrideNative and experimentalUseMMS#1601

Open
Demenus wants to merge 1 commit intovideojs:mainfrom
Demenus:fix/Safari-stall-with-overrideNative-experimentalUseMMS
Open

fix: Safari playback stall with overrideNative and experimentalUseMMS#1601
Demenus wants to merge 1 commit intovideojs:mainfrom
Demenus:fix/Safari-stall-with-overrideNative-experimentalUseMMS

Conversation

@Demenus
Copy link

@Demenus Demenus commented Mar 12, 2026

Description

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.

Disabling the metadata track in this specific scenario prevents Safari from processing it and allows playback to start normally.

Fixes #1600

This behavior seems specific to Safari when using MMS. Other browsers (Chrome, Firefox) do not appear to be affected by this issue.

Specific Changes proposed

  • Detect Safari/iOS when using overrideNative + experimentalUseMMS
  • Set segmentMetadataTrack_.mode = 'disabled' instead of hidden in this specific scenario
  • Keep the existing behavior (hidden) for all other browsers and configurations

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

Comment on lines +259 to +260
options.overrideNative &&
options.experimentalUseMMS &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
options.overrideNative &&
options.experimentalUseMMS &&

I think these can be removed. If this code is reached, it's not native playback. And without the MMS check this seems to fix videojs/video.js#9117 too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right — at that point in the code we are no longer using native playback.

I have removed those flags from the condition.

Thank you for the fast review 👍🏻

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 videojs#1600
@Demenus Demenus force-pushed the fix/Safari-stall-with-overrideNative-experimentalUseMMS branch from c1d2960 to 84a44ef Compare March 12, 2026 17:14
@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.01%. Comparing base (6da45b0) to head (84a44ef).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1601   +/-   ##
=======================================
  Coverage   84.00%   84.01%           
=======================================
  Files          44       44           
  Lines       11713    11716    +3     
  Branches     2625     2627    +2     
=======================================
+ Hits         9840     9843    +3     
  Misses       1873     1873           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Safari: media playback does not start when using overrideNative + experimentalUseMMS

2 participants