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

timeupdate event is fired even when video is stalled due to buffering #1641

Closed
jpfranco opened this issue Nov 4, 2014 · 5 comments
Closed

Comments

@jpfranco
Copy link

jpfranco commented Nov 4, 2014

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:

screen shot 2014-11-04 at 2 55 47 pm

This is how it usually looks:

screen shot 2014-11-04 at 2 55 59 pm

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?

@heff
Copy link
Member

heff commented Nov 17, 2014

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.

this.off('play', this.trackCurrentTime);

Instead it should be from the player to match when we turn manual time updates on.

this.on(player, 'play', this.trackCurrentTime);

I haven't had a chance to create a pull request for this yet if you (or anyone) want to give it a shot.

@itsjamie
Copy link

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.

@itsjamie
Copy link

"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.

@heff
Copy link
Member

heff commented Nov 18, 2014

Thanks for the details @jamie-stackhouse. It's very possible that both issues are happening here.

@gkatsev
Copy link
Member

gkatsev commented Jul 25, 2016

I believe this is fixed in videojs 5. We no longer attach the play/pause events for manualTimeUpdatesOn to the player.

@gkatsev gkatsev closed this as completed Jul 25, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants