Automatically destroy removed instances#150
Conversation
With multiple instances of jplayer, if one got removed from the dom without being destroyed, the others would cause a javascript error on play. This was caused by keeping a list of instances ($.jPlayer.prototype.instances) that would get out of sync with the page. With this patch, jPlayer clears the list of any nonexistent instances before iterating over the list. The error was triggered from pauseOthers() and $.jPlayer.pause().
|
This is generic notification that all users issuing pull requests must sign our CLA before we can consider merging with the jPlayer project. |
|
Reviewing... That call from Still considering with a fix for that |
|
Scratch that... The |
|
Going to merge this. i expect some conflict, since |
|
Something is going wrong with our git repo and the merge is happening with the wrong file. I am halting all merges until I can figure out what the problem is, otherwise all I am doing is copying and pasting in your code and contributor blame would be in the built dist files, instead of the source files. |
|
Just a suggestion, but if you're going this way you should combine the multiple step commits into one before pushing, to avoid too much noise on git history. |
With multiple instances of jplayer, if one got removed from the dom without being destroyed, the others would cause a javascript error on play. This was caused by keeping a list of instances ($.jPlayer.prototype.instances) that would get out of sync with the page. With this patch, jPlayer clears the list of any nonexistent instances before iterating over the list.
The error was triggered from pauseOthers() and $.jPlayer.pause().