Picture in Picture button doesn't show up on BBC iplayer and other BBC uses of the SMPToucan player
Categories
(Toolkit :: Picture-in-Picture, defect, P2)
Tracking
()
People
(Reporter: Gijs, Assigned: molly)
References
Details
(Whiteboard: [fidefe-MR1-2022])
Attachments
(2 files, 1 obsolete file)
This is a recent regression caused by changes in the iPlayer website.
I don't really know what happened but it appears that their player has changed and now the icon doesn't show up. The context menu also doesn't indicate we're dealing with a video element, so I suspect iplayer is doing something other than just using a <video>
element. The custom site context menu says "SMPToucan 1.9.8", and the actual video element is inside a shadow DOM, which perhaps is why we're not finding it and overlaying PiP on it?
This is a pretty big deal given that BBC, the UK's public broadcaster, gets billions of streams a quarter - https://www.bbc.co.uk/mediacentre/2021/iplayer-record-breaking-start-to-2021 .
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
More internationally usable links: https://www.bbc.co.uk/food/techniques/julienne and https://www.bbc.co.uk/weather both have videos that should show PiP toggles.
Assignee | ||
Comment 2•2 years ago
|
||
As Gijs surmised, the issue appears to be that the <video> element is housed inside the shadow DOM of a component (<smp-playback>
) which is itself housed within the shadow DOM of a higher-level component (<smp-toucan-player>
). That means that this nodesFromRect
call returns only that <smp-toucan-player>
custom element, and none of its shadow children or grandchildren, so PIP never really sees the <video> element when it gets moused over. We'll have to find a way to drill through those two shadow layers if we want to fix this.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Comment 4•2 years ago
|
||
This is a ChromeOnly method so it makes sense to avoid retargetting to
the root scope and just return the raw elements.
Updated•2 years ago
|
Updated•2 years ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0cec4dbebc87 Avoid retargeting in NodesFromRect. r=mconley
Comment 6•2 years ago
|
||
Backed out changeset 0cec4dbebc87 (bug 1762042) for causing perma mochitest failures in browser_toggleTransparentOverlay.
Backout link: https://hg.mozilla.org/integration/autoland/rev/11692659edaa84dea699a87eed43e12915c37864
Assignee | ||
Comment 7•2 years ago
|
||
:emilio, I don't really understand what's happening here, but somehow this patch has changed the behavior when the visibility threshold parameter to NodesFromRect is used, such that we're no longer drilling through a fully transparent element when this test sets the threshold to 0.4. Any ideas?
Comment 8•2 years ago
|
||
Before, these nodes were being retargeted and the video element was
being returned instead. Now we return the clickable control directly.
Since we pass aOnlyVisible, when the toggle is fully opaque we don't
return the video element itself otherwise, and this code was bailing
out.
Updated•2 years ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e709dbc43832 Avoid retargeting in NodesFromRect. r=mconley https://hg.mozilla.org/integration/autoland/rev/1b4ac129a74b Deal with nodesFromRect returning elements inside the video controls but not the video itself in PictureInPictureChild. r=mconley
Comment 10•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e709dbc43832
https://hg.mozilla.org/mozilla-central/rev/1b4ac129a74b
Updated•2 years ago
|
Comment 11•2 years ago
|
||
This fix was verified on Nightly v102.0a1 and Beta v101.0b3 (20220504181604) on Windows 10, Ubuntu 20.04.4 LTS, Windows 7 and Mac OS 11.
The PiP toggle is displayed correctly.
Updated•2 years ago
|
Description
•