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

destroy method not working as expected #684

Closed
4 tasks done
casjonker opened this issue Oct 12, 2017 · 1 comment
Closed
4 tasks done

destroy method not working as expected #684

casjonker opened this issue Oct 12, 2017 · 1 comment

Comments

@casjonker
Copy link

casjonker commented Oct 12, 2017

Expected behaviour

Would expect plyr instances to be destroyed after calling instances.forEach(function(instance) { instance.destroy(); }

Actual behaviour

Unforunately the js instances are still there, the method only destroys the DOM elements. Because of the instance still existing, the entire plyr DOM elements can still be found as detached elements in the memory.

Environment

  • Browser: Chrome
  • Version: latest
  • Operating System: Windows
  • Version: latest

Players affected:

  • HTML5 Video
  • HTML5 Audio
  • YouTube
  • Vimeo

Steps to reproduce

Instantiate player(s), call destroy() method on it and then try and access the instance. For example call the play() method on it. Even though the initial DOM elements are destroyed, you're still able to play the audio file...

Relevant links

#77

@ashkanhosseini
Copy link

@sampotts it seems that this issue is with plyr.container not getting garbage collected. I've created a PR for this, could you please assign someone for review and get it merged if it's fine? We really need this as well for our project.

Thanks.

sampotts pushed a commit that referenced this issue Nov 4, 2017
fix #684 memory leaks issues after destroy.
filips123 pushed a commit to filips123/plyr that referenced this issue Nov 22, 2018
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

No branches or pull requests

2 participants