mirror of
https://github.com/iv-org/videojs-quality-selector.git
synced 2024-11-23 05:39:44 +00:00
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:
parent
1d7dbdcdbb
commit
1f8d2b22b4
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user