Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: auto-removal remote text tracks being removed when not supposed to #4450

Merged
merged 8 commits into from
Jun 28, 2017

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Jun 28, 2017

Description

We added a feature so that remote text tracks can auto-removed when a source changes. However, in 6.x we changed the source behavior to be asynchronous meaning that some text tracks were accidentally being removed when they weren't supposed to be.
For example:

var player = videojs('my-player');
player.src({src: 'video.mp4', type: 'video/mp4'});
 // set second arg to false so that they get auto-removed on source change
player.addRemoteTextTrack({kind: 'captions', src: 'text.vtt', srclang: 'en'}, false);

Now when the player loads, this captions track is actually missing because it was removed.

Specific Changes proposed

Instead of adding auto-removal tracks immediately to the list, wait until we've selected a source before adding them in.
This probably needs a test.

Fixes #4403 and #4315.

@gkatsev
Copy link
Member Author

gkatsev commented Jun 28, 2017

#4434 was already approved and there have not been any changes here.

@gkatsev gkatsev merged commit 82c8b80 into master Jun 28, 2017
@gkatsev gkatsev deleted the fix-auto-removed-tracks-being-auto-removed branch June 28, 2017 06:38
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.

1 participant