Closed Bug 1832154 Opened 1 years ago Closed 1 year ago

Enable media.videocontrols.picture-in-picture.respect-disablePictureInPicture

Categories

(Toolkit :: Picture-in-Picture, task, P2)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: niklas, Assigned: niklas)

References

Details

Attachments

(1 file)

Currently (when bug 1811321 lands) media.videocontrols.picture-in-picture.respect-disablePictureInPicture is enabled for Nightly only. We will want to enable for all

Severity: -- → S4
Priority: -- → P2
Assignee: nobody → nbaumgardner
Status: NEW → ASSIGNED
Pushed by nbaumgardner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/acb746bb1801 Enable media.videocontrols.picture-in-picture.respect-disablePictureInPicture. r=pip-reviewers,kpatenio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Regressions: 1845048

Hi, The property HTMLVideoElement.disablePictureInPicture is not showing up/passing the WPT live tests or the bcd collector test: https://mdn-bcd-collector.gooborg.com/tests/api/HTMLVideoElement/disablePictureInPicture

There is a comment here "While the flag mentioned in that PR is indeed enabled by default, the property is not defined in the WebIDL.". I can see in https://searchfox.org/mozilla-central/source/dom/webidl/HTMLVideoElement.webidl it appears as an "InstrumentedProps".

[Exposed=Window,
 InstrumentedProps=(cancelVideoFrameCallback,
               >>>>>>>>>>  disablePictureInPicture,
                    onenterpictureinpicture,
                    onleavepictureinpicture,
                    playsInline,
                    requestPictureInPicture,
                    requestVideoFrameCallback)]
interface HTMLVideoElement : HTMLMediaElement {
  [HTMLConstructor] constructor();
...

So the question is "should this work" and if so, what do we need to get our tests to show that it works?

Discussion follows from https://github.com/mdn/browser-compat-data/pull/21029

Flags: needinfo?(nbaumgardner)

Ping! Can we please have a response to this ^^^. As far as we can tell disablePictureInPicture is NOT supported - according to WPT and bcd collector tests. If you can't confirm, the intent is to mark this as not supported.

Flags: needinfo?(mhowell)

OK. We have undone the indication that this feature is supported in compatibility data.

Hi, sorry about the delay, I was out for a couple days. As far as I can tell, we do intend to be passing this test. We'll file a separate bug to update the appropriate WebIDL, and I think that should take care of this.

Note though that we provide an implementation of the attribute behavior that is deliberately not spec-compliant, and we have no plans to change that. I would assume that the compatibility data needs to reflect this fact.

Flags: needinfo?(mhowell)

Note though that we provide an implementation of the attribute behavior that is deliberately not spec-compliant, and we have no plans to change that. I would assume that the compatibility data needs to reflect this fact.

Hi Molly,
The compatibility data was reverted to mention the version this was provided in. However it doesn't capture that the behaviour is non-spec-compliant. We could add this as a note if you can provide information about what it actually does that differs?

Flags: needinfo?(mhowell)

So, there's two things:

  1. We implement the disablePictureInPicture attribute, but none of the rest of the PIP spec.
  2. Our implementation of disablePictureInPicture does not fully disable picture-in-picture; we'll hide our usual button that overlays the video, but still allow the user to override.

Thanks!

Flags: needinfo?(nbaumgardner)
Flags: needinfo?(mhowell)

Thanks @molly. The BCD team are asking the hard questions in https://github.com/mdn/browser-compat-data/pull/21263 about how this can work if it is undefined:

"HTMLVideoElement.prototype.disablePictureInPicture is undefined, so how is it supported? Is it simply that setting the property to true has an effect?"

Is that the case? i.e. setting the property, even though it is undefined initially, hides the overlay button?

That is what I assumed, but would be good to have it "said".

Flags: needinfo?(mhowell)

(In reply to Hamish Willee from comment #10)

Is that the case? i.e. setting the property, even though it is undefined initially, hides the overlay button?

That is exactly correct, yes.

Flags: needinfo?(mhowell)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: