Closed Bug 1865748 Opened 2 years ago Closed 2 years ago

disablePictureInPicture is only respected if set to "true"

Categories

(Toolkit :: Picture-in-Picture, defect, P3)

Firefox 118
defect

Tracking

()

RESOLVED DUPLICATE of bug 1863583

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:

  1. Create a <video> element with the disablePictureInPicture attribute set to "" (the empty string)
  2. 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.

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.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Not sure how much of this pip spec we actually support. My guess is this bug is invalid. Molly, can you confirm?

Flags: needinfo?(mhowell)

For reference, here is the bug where basic support for this attribute was added: https://bugzilla.mozilla.org/show_bug.cgi?id=1811321

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.

Component: Audio/Video: Playback → Picture-in-Picture
Product: Core → Toolkit
See Also: → 1863583

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.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Depends on: 1863583
Ever confirmed: true
Flags: needinfo?(mhowell)
Priority: -- → P3
See Also: 1863583

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.

This was actually fixed by bug 1863583. And now works correctly in Firefox 122. Here is a test case: https://jsfiddle.net/4kdmrf8y/.

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1863583
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.