Closed Bug 1547795 Opened 5 years ago Closed 5 years ago

Hide the Picture-in-Picture toggles on videos where it'll likely be more annoying than not

Categories

(Toolkit :: Video/Audio Controls, enhancement, P2)

68 Branch
enhancement

Tracking

()

VERIFIED FIXED
mozilla69
Tracking Status
firefox68 --- disabled
firefox69 --- verified

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:

  1. Either the width or height dimensions are less than 160px
  2. There is no audio track for the video
  3. The video is less than 45 seconds long
Type: defect → enhancement
Priority: -- → P3
Blocks: 1546634
Priority: P3 → P2

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.

This makes our video controls bindings check on loadedmetadata events whether or not to display
the toggle.

Assignee: nobody → mconley
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
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
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
See Also: → 1554585
Flags: needinfo?(mconley)
Depends on: 1555834
Regressions: 1560416
Flags: qe-verify+

When verifying this bug, make sure to also verify the scenario from bug 1553435:

STR:

  1. View a reddit video, eg https://www.reddit.com/r/firefox/comments/bqojzh/firefox_focus_remembering_history/
  2. Drag video seekbar and while still dragging, move cursor into thumbnail.
  3. 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.

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.

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.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1613160
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: