Skip to content

Keep native tracks from interrupting VHS audio - #1624

Open
yucheng-du wants to merge 1 commit into
videojs:mainfrom
yucheng-du:fix/native-tracks-during-vhs
Open

yucheng-du wants to merge 1 commit into
videojs:mainfrom
yucheng-du:fix/native-tracks-during-vhs

Conversation

@yucheng-du

@yucheng-du yucheng-du commented Dec 2, 2026 •

Copy link
Copy Markdown

Description

Fixes #1622. When a browser exposes native audio tracks, the first MediaSource append adds a native track to the player's list. That deselects the manifest rendition and VHS stops loading its audio while video playback continues.

Specific Changes proposed

Use emulated audio and video tracks whenever VHS handles a source. Restore the tech's previous track settings when the source changes so a subsequent native video can expose its own tracks.

I reproduced this with VHS 3.17.6, Video.js 8.23.9 and Chrome's AudioVideoTracks flag. On a 12-second clip with English and French audio, the audio buffer stopped at 2.02 seconds for HLS and 2.00 seconds for DASH. With this change both buffered to the end, including after switching to French. Switching from VHS to a plain MP4 restored its two native tracks.

Requirements Checklist

  • Bug fixed
  • Added a regression test covering track emulation and restoration
  • Reviewed by Two Core Contributors

Run Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@welcome

welcome Bot commented Dec 2, 2026

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

This branch has not been deployed

No deployments
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.

Audio stops buffering when the media element exposes audioTracks

1 participant