-
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
Better timeout handling #1541
Comments
Is there any work around for these issues in the interim? I'm having a pretty big problem with this in my application as users switch between states after i .dispose() the player and try to re-create one later. |
Same here. I'm trying to use video.js in an Ember app and running into this as I dynamically create and remove players. |
I realized that the problem is mostly caused by timers that don't get cleaned up, so a simple fix is just to pause the video first before dispose. player.pause(); Found here: http://stackoverflow.com/questions/25493887/videojs-return-vdata-error-when-dispose-is-call |
@deweydb Interesting. I tried |
In a context worked for me. Now again I had the issues. I could fix it by forcing in vjs lib to exit, like this: vjs.trigger = function(elem, event) { and also: vjs.trigger = function(elem, event) { |
@toru-sean The original context of this issue was resolved with #1642. If you're seeing this issue again, it could be a regression or an entirely different problem altogether, but we need some context here. Please use the issue template so folks can take a look. Thanks! |
Hey I'm here 5 years after the last activity, with at the very least a very similar issue. I'll try deferring dispose but a) that's disgusting and b) my error is coming from the line where I call videojs(). |
yeah it didn't help |
It's really difficult to determine whether this is the same, new, or implementation issue without seeing a reduced test case that shows the problem. Think you could put something together there and we can take a look? |
I've left this comment on a few issues, so it's probably time to create a new catch-all for this one.
@heff and I talked this over, and we think it makes sense to have a
setTimeout
utility method that is identical towindow.setTimeout
, but adds the timeout to an array on the player instance so we can dispose all of them at once when the player is disposed.This would clean up all the instances of having to create a dispose listener each time a timeout is created, and help us avoid accidentally missing one (which seems to happen pretty often) and allows plugins to utilize the same functionality.
Other (potential) references: #1521, #1484, #1505, #1431
The text was updated successfully, but these errors were encountered: