Hide the Picture-in-Picture toggles on videos where it'll likely be more annoying than not
Categories
(Toolkit :: Video/Audio Controls, enhancement, P2)
Tracking
()
People
(Reporter: mconley, Assigned: mconley)
References
Details
Attachments
(1 file)
Having spoken with abovens today, we're going to use the following heuristics to start:
Hide the toggle if a video meets any of the following criteria:
- Either the width or height dimensions are less than 160px
- There is no audio track for the video
- The video is less than 45 seconds long
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Checking if the playsInLine
(not presently supported by Firefox) attribute is true
or if the playsinline
/webkit-playsinline
content attributes are present is likely a good indicator that the pip toggle should not be shown.
Checking if the combination of the video's autoplay
, loop
, and defaultMuted
attributes are true
, with the controls
attribute being false
may also be a good indicator of the video being used as an ad, animated background, or something that the user generally isn't interested in, unless they interact with it. Of course, this assumes that the video element was not created using document.createElement
since the defaultMuted
attribute would never be true
in that case.
Assignee | ||
Comment 3•5 years ago
|
||
This makes our video controls bindings check on loadedmetadata events whether or not to display
the toggle.
Assignee | ||
Updated•5 years ago
|
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9b60f95e81da Hide Picture-in-Picture toggle on videos where its probably more annoying than not. r=JSON_voorhees
Comment 5•5 years ago
|
||
Backed out for failing a11y at test_media.html
Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&group_state=expanded&selectedJob=248041841&revision=9b60f95e81dae91129af4eb80863010cedf4ca57
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=248049505&repo=autoland&lineNumber=1552
Backout: https://hg.mozilla.org/integration/autoland/rev/d697540809add645ca5ada471c0f94f4773734b0
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a18731ceef1c Hide Picture-in-Picture toggle on videos where its probably more annoying than not. r=JSON_voorhees
Comment 7•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 9•5 years ago
|
||
When verifying this bug, make sure to also verify the scenario from bug 1553435:
STR:
- View a reddit video, eg https://www.reddit.com/r/firefox/comments/bqojzh/firefox_focus_remembering_history/
- Drag video seekbar and while still dragging, move cursor into thumbnail.
- Release drag and move cursor over PiP toggle.
The PiP toggle appears in the thumbnail preview when the cursor is over it and expands on hover, covering the thumbnail. Clicking on the toggle creates a tiny PiP window for the thumbnail.
Comment 10•5 years ago
|
||
When verifying this bug, make sure to also verify the scenario from bug Bug 1545872 - The Picture-in-Picture UI button can't be clicked during ad playback on CBC.ca :
See for example https://www.cbc.ca/news/thenational/what-jason-kenney-s-win-means-for-ottawa-at-issue-1.5105007. Play the video and try clicking on the PiP UI button on the video during ad playback. The click opens the advertiser's page instead of the PiP UI.
Comment 11•5 years ago
|
||
Build ID 20190627214735
User Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
Verified as fixed on the latest Nightly build on Windows 7.
We covered all the scenarios from Description, Comment 9 and Comment 10.
Description
•