Repository navigation
Keep native tracks from interrupting VHS audio - #1624
Open
yucheng-du wants to merge 1 commit into
Open
yucheng-du wants to merge 1 commit into
yucheng-du wants to merge 1 commit into
Conversation
|
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.