fix: Change quality selector update for items to solve VideoJS7 issue

Since VideoJS 7, once the player has started, any subsequent calls to the update() function on MenuOption will prevent the playback menu from fading out. The workaround I found was to remove the call to update() when a new quality is selected. The selection behavior was already handled by the MenuOption handleClick function so I just had to remove the previously selected option.
This commit is contained in:
Maxime Carrière 2019-05-31 13:05:29 -04:00
parent 1d7dbdcdbb
commit 1f8d2b22b4

View File

@ -59,7 +59,11 @@ module.exports = function(videojs) {
if (this.selectedSrc !== src) {
this.selectedSrc = src;
this.update();
_.each(this.items, function(item) {
if (item.source.src !== src) {
item.selected(item.source.src === src);
}
});
}
},