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

Error when calling remove() function on YouTube video #1269

Closed
Zero-K opened this issue Aug 7, 2014 · 2 comments
Closed

Error when calling remove() function on YouTube video #1269

Zero-K opened this issue Aug 7, 2014 · 2 comments

Comments

@Zero-K
Copy link

Zero-K commented Aug 7, 2014

I have YouTube videos on a page that I remove and re-initialize if they rotate the screen so I can show them at a different size.

I initialize the videos and store them in an array so I can remove them later
_loadedMediaElements.push(new MediaElementPlayer('#' + _mediaElementsIDList[mediaCount], media.mediaOptions));
And later call
_loadedMediaElements[mediaCount].remove();

This works fine when using the flash player, but when it's called on native HTML5 it throws the error
"TypeError: 'null' is not an object (evaluating 'this.pluginElement.id')"
on mediaelement-and-player.min.js:38:530
Which is the mejs.Utility.removeSwf(this.pluginElement.id); line
The loaded object of course doesn't have a pluginElement object within it.

@rafa8626
Copy link
Contributor

rafa8626 commented Aug 1, 2016

@Zero-K Is this still an issue?

@Zero-K
Copy link
Author

Zero-K commented Aug 2, 2016

I've actually had to change the way we handled removing objects because of the error. So I really don't know.

@rafa8626 rafa8626 closed this as completed Aug 2, 2016
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