-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
(doc) Adds guide for removing players from the page #1803
Conversation
Added a guide to explain how to safely remove players from the page
Added link to removing players guide
LGTM. @mmcc? |
Or...Use Unique Ids | ||
------------------- | ||
|
||
If you prefer not to call `dispose()` on a player, you can always create new players with unique ids for that page load. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably suggest just removing this bit altogether. Any time you remove a player from the DOM (or hide it, or just don't need it anymore), it's a good idea to remove it, even if just from a resource management perspective.
Looks great! The only other thing I'd suggest is adding a section about hiding / showing a player. For instance, if you've got a modal that a player pops up in, you should create and dispose the player when the player shows / hides. If the Flash tech is used and you try to hide it, things will go poorly because, Flash. Thanks for the PR! |
Thanks for the extra info! I'll update the branch with your feedback. |
Probably no need, since we squash it up during out merge process. |
okey-dokey! |
Added a guide to explain how to safely remove players from the page.
Ran into a situation like this:
http://jsbin.com/gahususoju
I couldn't find this info anywhere in the guides or documentation, so thought I'd chip in :-)