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(fs): make sure handlers are unique per player #7035

Merged
merged 1 commit into from
Jan 22, 2021
Merged

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Jan 12, 2021

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.

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.
@brandonocasey
Copy link
Contributor

Code looks good we probably want to do this for visiblity change handles that we have:

this.on(document, 'visibilitychange', this.handleVisibilityChange);

this.on(document, 'visibilitychange', this.toggleVisibility_);

@gkatsev
Copy link
Member Author

gkatsev commented Jan 21, 2021

That makes sense, I'll make a separate PR for that.

@gkatsev gkatsev merged commit dceedb6 into main Jan 22, 2021
@gkatsev gkatsev deleted the ie11-fs-dispose branch January 22, 2021 18:07
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
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 videojs#7013.
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.

IE11 - Fullscreen doesn't work when disposing of another player on the same page
2 participants