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

remove method does not cleanup mejs.players array #670

Closed
Fab1en opened this issue Nov 29, 2012 · 2 comments
Closed

remove method does not cleanup mejs.players array #670

Fab1en opened this issue Nov 29, 2012 · 2 comments

Comments

@Fab1en
Copy link
Contributor

Fab1en commented Nov 29, 2012

The issue is fully explained in this stackoverflow post.

When you call player.remove(), the mejs.players array still contains a reference to the removed player, so if you create a new player from the same video tag, you end up with two entries in mejs.players where you sould have only one.

The solution could be to call mejs.players.slice(index) with the good index value in the remove() method.

@msgilligan
Copy link
Contributor

Any suggestions on how to fix this one? I might be up for trying a patch?

msgilligan added a commit to msgilligan/mediaelement that referenced this issue Feb 26, 2013
 * SpecRunner-Player runs some basic tests on the player
 * SpecRunner-CreateRemove tests for Issue mediaelement#670

Note: the tests run directly on the individual .js files rather than
on the catenated or minified files.  That could be easily changed,
but it's nice to be able to run a test, make a fix, and just reload
the browser.
phuongdh pushed a commit to avalonmediasystem/mediaelement that referenced this issue Oct 18, 2013
 * SpecRunner-Player runs some basic tests on the player
 * SpecRunner-CreateRemove tests for Issue mediaelement#670

Note: the tests run directly on the individual .js files rather than
on the catenated or minified files.  That could be easily changed,
but it's nice to be able to run a test, make a fix, and just reload
the browser.
rexblack pushed a commit to rexblack/mediaelement that referenced this issue May 22, 2014
 * SpecRunner-Player runs some basic tests on the player
 * SpecRunner-CreateRemove tests for Issue mediaelement#670

Note: the tests run directly on the individual .js files rather than
on the catenated or minified files.  That could be easily changed,
but it's nice to be able to run a test, make a fix, and just reload
the browser.
rexblack pushed a commit to rexblack/mediaelement that referenced this issue May 22, 2014
 * SpecRunner-Player runs some basic tests on the player
 * SpecRunner-CreateRemove tests for Issue mediaelement#670

Note: the tests run directly on the individual .js files rather than
on the catenated or minified files.  That could be easily changed,
but it's nice to be able to run a test, make a fix, and just reload
the browser.
@Fab1en
Copy link
Contributor Author

Fab1en commented Mar 24, 2015

This is now working in version 2.16.2 (might be fixed in previous versions as well)

@Fab1en Fab1en closed this as completed Mar 24, 2015
marmite22 pushed a commit to elucidat/mediaelement that referenced this issue Dec 16, 2016
 * SpecRunner-Player runs some basic tests on the player
 * SpecRunner-CreateRemove tests for Issue mediaelement#670

Note: the tests run directly on the individual .js files rather than
on the catenated or minified files.  That could be easily changed,
but it's nice to be able to run a test, make a fix, and just reload
the browser.
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