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 ui.player.destroy() #62

Merged
merged 8 commits into from
Apr 18, 2024
Merged

Fix ui.player.destroy() #62

merged 8 commits into from
Apr 18, 2024

Conversation

MattiasBuelens
Copy link
Collaborator

Web UI wasn't correctly removing all its event listeners when THEOplayer is destroyed through ui.player.destroy() (where ui is a <theoplayer-default-ui> or <theoplayer-ui>). This caused a whole bunch of errors when those event listeners fire while the player is being destroyed.

React UI now calls player.destroy() during unmount, if for some reason that didn't happen yet. (Normally, this happens automatically when the custom element is disconnected from the DOM.)

Fixes #59

@MattiasBuelens MattiasBuelens changed the base branch from main to next April 17, 2024 06:54
src/UIContainer.ts Show resolved Hide resolved
@MattiasBuelens MattiasBuelens merged commit 6747b1f into develop Apr 18, 2024
1 check passed
@MattiasBuelens MattiasBuelens deleted the fix-destroy branch April 18, 2024 13:19
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.

Destroy UI
2 participants