[PiP] The Ctrl + Shift + ] keyboard shortcut tries to open PiP on <video> with a NaN duration
Categories
(Toolkit :: Video/Audio Controls, defect, P3)
Tracking
()
People
(Reporter: cfat, Assigned: katkoor2, NeedInfo)
References
(Blocks 2 open bugs)
Details
Attachments
(4 files, 2 obsolete files)
[Affected versions]:
- Firefox Release 83
- Firefox Beta 84.0b4
- Firefox Nightly 85.0a1
[Affected platforms]:
- Windows 10 x64
- Ubuntu 20.04 x64
- macOS 10.15
[Prerequisites]:
- Have the Firefox browser installed.
[Steps to reproduce]:
- Open the Firefox browser and navigate to the https://www.pornhub.com page.
- Open a video.
- Make sure the video is paused.
- Press "Ctrl+Shift+]" keys.
- Observe what happens next.
[Expected result]:
- The PiP window is opened.
[Actual result]:
- The PiP window is not opened.
[Notes]:
- The PiP button changes its state as if the PiP window was opened.
- I didn't notice this issue on other video platforms such as Youtube, Twitch, Netflix, Hulu, HBO, or Amazon Prime.
- Attached a screen recording of the issue.
Comment 1•4 years ago
|
||
The problem here is that a number of the <video>
elements on the site are "lazy", and so the video metadata hasn't loaded, and the durations are NaN
when sorting here: https://searchfox.org/mozilla-central/rev/168c45a7acc44e9904cfd4eebcb9eb080e05699c/toolkit/actors/PictureInPictureChild.jsm#156-158
This sorting puts the NaN
durations before any videos with durations. Thanks, JavaScript!
I think what we'd want to do is filter out any videos that have no durations before we do any of these calculations.
To whoever from MSU looks at this - you can reproduce this without needing to go to PornHub. I believe you can do this by putting a <video> element with no src
attribute set earlier in the DOM than the "target" video.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Here's another test case that actually has a <video> with no src attribute set before the target video.
Interestingly, we can also reproduce the issue in the first test case I attached though. The first <video> there also has a NaN
duration, so the proposed solution should also filter that out.
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
Depends on D105065
Updated•4 years ago
|
Updated•4 years ago
|
Comment 8•4 years ago
|
||
bugherder |
Comment 9•4 years ago
|
||
Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 10•4 years ago
|
||
- I have verified that this issue is no longer reproducible with the latest Firefox Beta (87.0b6 Build ID - 20210304190020) installed, on Windows 10 x64, Ubuntu 20.04 x64, and Mac 11.1.
- I can confirm that the Pip window is now opened using the shortcut when the videos attached are paused.
Description
•