mirror of
https://github.com/videojs/video.js.git
synced 2024-12-10 11:10:19 +02:00
fix(fs): make sure handlers are unique per player (#7035)
Using Video.js's .bind still makes us attach prototype methods as handlers. Then when one is removed, all handlers are removed. Instead, use arrow methods to make these methods unique. Fixes #7013.
This commit is contained in:
parent
db46578ac6
commit
dceedb6746
@ -351,8 +351,8 @@ class Player extends Component {
|
||||
super(null, options, ready);
|
||||
|
||||
// Create bound methods for document listeners.
|
||||
this.boundDocumentFullscreenChange_ = Fn.bind(this, this.documentFullscreenChange_);
|
||||
this.boundFullWindowOnEscKey_ = Fn.bind(this, this.fullWindowOnEscKey);
|
||||
this.boundDocumentFullscreenChange_ = (e) => this.documentFullscreenChange_(e);
|
||||
this.boundFullWindowOnEscKey_ = (e) => this.fullWindowOnEscKey(e);
|
||||
|
||||
// default isFullscreen_ to false
|
||||
this.isFullscreen_ = false;
|
||||
|
Loading…
Reference in New Issue
Block a user