-
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
timeupdate event is fired even when video is stalled due to buffering #1641
Comments
Thanks for providing and example! I believe I've found the error. When we turn manual timeupdates off, we remove the play/pause listeners from the tech. video.js/src/js/media/media.js Line 221 in caf44a4
Instead it should be from the player to match when we turn manual time updates on. video.js/src/js/media/media.js Line 205 in caf44a4
I haven't had a chance to create a pull request for this yet if you (or anyone) want to give it a shot. |
The issue is not limited to video.js. I was building a small demo player in Safari on OSX 10.10 when I saw this issue. My bet is the bug is linked in some way to MediaControllers, and their synchronization aspect. As I did not have this issue with the timeupdate continuing to fire a year or so ago on the Apple platforms. I've submitted a bug report here: https://bugs.webkit.org/show_bug.cgi?id=138820 I tested in Firefox and Chrome and Safari on videojs.com homepage, and received the waiting events properly during playback with Firefox and entered a buffering state, while in Chrome I did not receive the waiting events, however the native timeupdates did stop firing. |
"The issue" being that native timeupdate's are firing while the MediaElement is buffering. I apologize I seem to have posted on a issue that may purely be related to VideoJS that by happenstance is very similar to an issue I was running into. |
Thanks for the details @jamie-stackhouse. It's very possible that both issues are happening here. |
I believe this is fixed in videojs 5. We no longer attach the |
So this is a bit tricky to reproduce. I think the easiest way is to use Network Throttling on Chrome dev tools' mobile emulator (3G setting seems to work best), and this fiddle which prints the event object every time the event is fired:
http://jsfiddle.net/z1vqrs8y/2/
If you just let the video play without interfering, everything will work as expected. The event will stop firing every time that playback stalls. However, once you seek to another time you'll notice that the event will keep on being fired even when playback stops due to buffering.
The event object seems to be much smaller when the event is fired while playback is stalled:
This is how it usually looks:
Btw, earlier today I commented on #1431 which seems to also occur only after seeking. Maybe it's all related to stuff not being properly reset after seeking?
The text was updated successfully, but these errors were encountered: