Picture-and-Picture toggle is not responsive for videos that fire their canplay events outside of the document
Categories
(Toolkit :: Video/Audio Controls, defect, P2)
Tracking
()
People
(Reporter: mconley, Assigned: mconley)
References
Details
Attachments
(3 files)
PictureInPictureToggleChild inside of PictureInPictureChild.jsm uses the "canplay" event to register videos for tracking mouse movement, and hearing about clicks that might be on the toggle.
I've found an example case[1] where clicking on the toggle does nothing - this is because the "canplay" event is fired at a point where the <video> element is disconnected from the DOM tree, so the PictureInPictureToggleChild (which attaches the "canplay" listener to the message manager) doesn't hear about it.
This means that we never end up tracking the video.
I've attached a test case.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
I suspect this also affects Netflix (bug 1546639), so increasing priority.
Assignee | ||
Comment 2•5 years ago
|
||
Videos can fire their "canplay" events even when they're not part of the DOM. This
means that videos that have already fired that event won't get the
PictureInPictureToggleChild properly attached after being inserted.
The UAWidgetSetupOrChange event, however, is fired for video events once they've
been bound to the DOM, so we can use that instead.
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D44541
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/11b2692199c2 Attach Picture-in-Picture toggle on UAWidgetSetupOrChange event rather than canplay. r=JSON_voorhees https://hg.mozilla.org/integration/autoland/rev/78e7e7cb5073 Regression test. r=JSON_voorhees
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/11b2692199c2
https://hg.mozilla.org/mozilla-central/rev/78e7e7cb5073
Updated•5 years ago
|
Comment 6•5 years ago
|
||
Build ID 20190906094324
User Agent Mozilla/5.0 (Windows NT 10.0; rv:71.0) Gecko/20100101 Firefox/71.0
Verified as fixed on the latest Nightly build. The PiP toggle is now displayed for the Netflix videos (bug 1546639).
Updated•5 years ago
|
Description
•