disablePictureInPicture is only respected if set to "true"
Categories
(Toolkit :: Picture-in-Picture, defect, P3)
Tracking
()
People
(Reporter: robin, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
Steps to reproduce:
- Create a <video> element with the disablePictureInPicture attribute set to "" (the empty string)
- Hover over the <video>
Actual results:
The button to open picture-in-picture view appears. It only hides if you set the attribute to "true".
Expected results:
The button to open picture-in-picture view should not appear, because according to the spec (https://w3c.github.io/picture-in-picture/#disable-pip), the presence of disablePictureInPicture should be enough to turn it off.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Not sure how much of this pip spec we actually support. My guess is this bug is invalid. Molly, can you confirm?
For reference, here is the bug where basic support for this attribute was added: https://bugzilla.mozilla.org/show_bug.cgi?id=1811321
Comment 4•2 years ago
|
||
This is because the code currently uses getAttribute("disablePictureInPicture") === "true" sx. I would recommend just implementing bug 1863583 and using the property disablePictureInPicture. That should just make it work.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
I agree with :evilpie, and I do think this is a valid bug; it's true that we don't implement most of the PiP spec, but there's no reason we should differ on this particular detail.
Comment 6•2 years ago
|
||
It remains to be seen whether YouTube and Twitch will start to use this for simple PiP blocking.
Surely this should not disable the implemented pop-up "strana does not recommend the use of PiP" with an unblock switch nevertheless.
Just came across this today. React provides this attribute on video elements and outputs it as disablepictureinpicture="", which doesn't work with the way Firefox currently has this implemented. Had to do an override. Would be nice if this was kept consistent.
Comment 8•2 years ago
|
||
This was actually fixed by bug 1863583. And now works correctly in Firefox 122. Here is a test case: https://jsfiddle.net/4kdmrf8y/.
Description
•