mirror of
https://gitea.invidious.io/iv-org/videojs-quality-selector.git
synced 2024-08-15 00:43:13 +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
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue