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

fix(seeking): don't always pause in mouse down #3886

Merged
merged 1 commit into from
Dec 22, 2016
Merged

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Dec 22, 2016

In chrome 55, something changed which introduced a bug in videojs where
if you seeked back, it wouldn't work. This is because we always paused
the video in the mousedown handler.

Instead, we should create a timer for pausing that is cleared in the
mouseup handler or in the mouse move handler. This is so that if someone
is seeking by clicking and waiting the video pauses. As soon as we start
moving and we get a mousemove event, we can know that it's safe to pause
as well.

Fixes #3839.

In chrome 55, something changed which introduced a bug in videojs where
if you seeked back, it wouldn't work. This is because we always paused
the video in the mousedown handler.

Instead, we should create a timer for pausing that is cleared in the
mouseup handler or in the mouse move handler. This is so that if someone
is seeking by clicking and waiting the video pauses. As soon as we start
moving and we get a mousemove event, we can know that it's safe to pause
as well.

Fixes #3839.
Copy link
Member

@misteroneill misteroneill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and seems to work as expected. Tested across major browsers.

@gkatsev gkatsev merged commit e92db4f into master Dec 22, 2016
@gkatsev gkatsev deleted the fix-back-seek branch December 22, 2016 20:19
mehmettaskiner pushed a commit to dogusdigital/video.js that referenced this pull request Dec 26, 2016
In chrome 55, something changed which introduced a bug in videojs where
if you seeked back, it wouldn't work. This is because we always paused
the video in the mousedown handler.

Instead, we should create a timer for pausing that is cleared in the
mouseup handler or in the mouse move handler. This is so that if someone
is seeking by clicking and waiting the video pauses. As soon as we start
moving and we get a mousemove event, we can know that it's safe to pause
as well.

Fixes videojs#3839.
MattiasBuelens added a commit to MattiasBuelens/video.js that referenced this pull request Jan 6, 2017
gkatsev pushed a commit that referenced this pull request Jan 11, 2017
Previously, seek bar's mousedown handler would first seek the video,
then pause it. This can trigger a bug in Chrome 55 where seeking
backwards and then immediately pausing can break the video player.

Instead, call the super handler last so that we pause the video before
we start seeking.

Fixes #3839. This reverts commit e92db4f (#3886)
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

Successfully merging this pull request may close these issues.

2 participants