Closed Bug 1609470 Opened 6 years ago Closed 6 years ago

Controls bar's behaviour is wrong after combining mouse-clicking and spacebar while watching a youtube video

Categories

(Toolkit :: Video/Audio Controls, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1491256

People

(Reporter: clara.guerrero, Unassigned)

Details

(Keywords: regressionwindow-wanted)

Attachments

(1 file)

Reproduced in firefox nightly version 74.0a1 (2020-01-13) (64-bit) Beta 73.0b2 (64-bit) and Release 72.0.1 (64-bit), in Ubuntu 18.04.2 LTS, and Windows 8.1, 64-bit
Please see issue https://bugzilla.mozilla.org/show_bug.cgi?id=1325594 as reference (this was verified as fixed in firefox53)

Steps to reproduce:

1- Visit www.youtube.com and select any video.
2- Press spacebar to play/pause video and notice that both actions are performed (play/pause)
3- Now click play/pause button and notice that both actions are also performed without issues.
4- After clicking, immediately use spacebar again. Now the video won't play/pause as before, hitting the space bar does nothing (you can notice it's attempting to, given that it kind of flickrs,but fails to do so). So for example if you had clicked the button and video is running, "pause button" is enabled and is stuck there. Same thing if clicking the button, the video paused, then the "play" button is stuck.

See attachment for further details.

Hey Bogdan, do you have time to help us try to find a regression range here?

Flags: needinfo?(bogdan.maris)

Actually, I just found the STR and can reproduce easily, so I'll see if I can find us a range.

Flags: needinfo?(bogdan.maris)

This doesn't appear to be a recent regression, at least not in Firefox Desktop. I was able to reproduce this back to 2018-01-01's Nightly, and even further. Perhaps YouTube changed something on their side?

I suspect what's happening is that the spacebar is telling the page to play / pause, but is also firing the command on the play / pause button that is focused by the mouse, so the toggle is requested twice per spacebar hit, which effectively pauses and then plays.

As a workaround, one can tab away from the play pause button. Still, we should probably figure out what we're doing wrong here (I can't reproduce the bug with Chrome or Edge).

Hey DenSchub, do you have time to help us figure out how YouTube handles the spacebar button, and whether or not my hypothesis (that two separate event handlers are handling the spacebar to toggle playback) has any merit?

Flags: needinfo?(dschubert)
Priority: -- → P3

Hi,
I did a mozregression for all versions from FF74 through 65 and the issue is triggered in all of them, I also tested on 60 and even 55 and it's still reproducible. Should I go further with the investigation?
Best,
Clara.

(In reply to Mike Conley (:mconley) (:⚙️) (Catching up on needinfos) from comment #3)

Hey DenSchub, do you have time to help us figure out how YouTube handles the spacebar button, and whether or not my hypothesis (that two separate event handlers are handling the spacebar to toggle playback) has any merit?

YouTube's code is generally not very friendly to any debug attempts. Luckily, we don't even need to do that here! This issue is already known, see bug 1491256.

Your assumption is not wrong - the spacebar is clicking the button while also triggering the pause/unpause logic. However, we're not convinced that this is our fault - if we spoof as Chrome, everything works as expected. Back then, we had a hard time figuring out where the code paths differ. I gave it another shot and it's still not entirely clear. Instead of spending hours on trying to understand heavily compressed source, I re-pinged our YouTube contacts and asked for an update. If that doesn't result in something productive, I can dig again and see if we can attempt a fix via our system addon.

However, this is a clear duplicate of bug 1491256, so let's close this as such. If anyone has new details or more insight, the older bug is a good place for that. :)

Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(dschubert)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: