Closed Bug 1858562 Opened 2 years ago Closed 1 month ago

Implement Document Picture-in-Picture API

Categories

(Core :: DOM: Core & HTML, enhancement)

Firefox 120
Desktop
Unspecified
enhancement

Tracking

()

RESOLVED FIXED
148 Branch
Tracking Status
relnote-firefox --- nightly+
firefox148 --- fixed

People

(Reporter: 709922234, Assigned: vhilla)

References

(Depends on 1 open bug, Blocks 11 open bugs, )

Details

(Keywords: dev-doc-complete, parity-chrome, webcompat:platform-bug, Whiteboard: webcompat:risk-moderate , [wptsync upstream])

User Story

platform-scheduled:2025-12-31
user-impact-score:900

Attachments

(7 files, 2 obsolete files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/120.0

The linked doc is for Chrome's Picture-in-Picture Web API, which is unrelated to the Picture-in-Picture browser feature that we ship. This bug is likely meant for the DOM team.

Severity: -- → N/A
Priority: -- → P3
See Also: → 1861546
Status: UNCONFIRMED → NEW
Type: enhancement → task
Component: Picture-in-Picture → DOM: Core & HTML
Ever confirmed: true
Priority: P3 → --
Product: Toolkit → Core
Hardware: Unspecified → Desktop
Summary: Implement Document Picture-in-Picture API → Implement Picture-in-Picture API
Depends on: 1547894

Oops, I changed this to the general older PiP API we don't implement either (except partially disable) instead of the document PiP API specifically which this was originally filed for. Seems fine to leave as is since I couldn't find a bug for it and it is more widely implemented/essentially a precursor anyway.

Type: task → enhancement
Whiteboard: webcompat:risk-moderate
See Also: → pip-api
Summary: Implement Picture-in-Picture API → Implement Document Picture-in-Picture API
Blocks: 1895949
Blocks: 1981464
Alias: doc-pip-api
No longer blocks: 1981464
Duplicate of this bug: 1984891
No longer duplicate of this bug: 1984891
Depends on: wayland-pip
User Story: (updated)
User Story: (updated)
Assignee: nobody → vhilla
Attachment #9514045 - Attachment description: WIP: Bug 1858562 - Part 1: Add more WPTs for Document Picture in Picture → Bug 1858562 - Part 1: Add more WPTs for Document Picture in Picture. r=edgar,#dom-core
Status: NEW → ASSIGNED
Attachment #9514046 - Attachment description: WIP: Bug 1858562 - Part 2: Implement Document Picture-in-Picture Spec → Bug 1858562 - Part 2: Implement Document Picture-in-Picture Spec. r=edgar,smaug,#dom-core
Attachment #9514047 - Attachment description: WIP: Bug 1858562 - Part 3: Platform-specific Document Picture-in-Picture adjustments → Bug 1858562 - Part 3: Platform or browser-specific Document Picture-in-Picture adjustments. r=edgar,emilio,#dom-core
Attachment #9514047 - Attachment description: Bug 1858562 - Part 3: Platform or browser-specific Document Picture-in-Picture adjustments. r=edgar,emilio,#dom-core → Bug 1858562 - Part 3: Platform specific Document Picture-in-Picture adjustments. r=edgar,emilio,#dom-core
Attachment #9514047 - Attachment description: Bug 1858562 - Part 3: Platform specific Document Picture-in-Picture adjustments. r=edgar,emilio,#dom-core → Bug 1858562 - Part 4: Platform specific Document Picture-in-Picture adjustments. r=edgar,emilio,#dom-core
Attachment #9517791 - Attachment description: Bug 1858562 - Part 4: Browser Chrome Document Picture-in-Picture adjustments. r=mconley,smaug,sthompson,#dom-core → Bug 1858562 - Part 5: Browser Chrome Document Picture-in-Picture adjustments. r=mconley,smaug,sthompson,#dom-core
Attached file WIP: Bug 1858562 - Tab PiP indicator (obsolete) β€”

Dao pointed out that the PiP indicator is a inconsistent
since it's not used on some locales nor for vertical
tabs. Instead of introducing it to document PiP,
we might rather remove the indicator. Thus I keep my
patch to show the indicator for document PiP as WIP.

Depends on: 1997073

Once the patches land, this should be added to the dev release notes and added to https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Experimental_features.

Sebastian

User Story: (updated)
Keywords: dev-doc-needed

Comment on attachment 9514045 [details]
Bug 1858562 - Part 1: Add more WPTs for Document Picture in Picture. r=edgar,#dom-core

Revision D265289 was moved to bug 1997073. Setting attachment 9514045 [details] to obsolete.

Attachment #9514045 - Attachment is obsolete: true
Attachment #9514046 - Attachment description: Bug 1858562 - Part 2: Implement Document Picture-in-Picture Spec. r=edgar,smaug,#dom-core → Bug 1858562 - Part 1: Implement Document Picture-in-Picture Spec. r=edgar,smaug,#dom-core
Attachment #9523143 - Attachment description: Bug 1858562 - Part 3: Replace mIsPIPWindow with a new nsBaseWidget::mPiPType. r=smaug → Bug 1858562 - Part 2: Replace mIsPIPWindow with a new nsIWidget::mPiPType. r=smaug
Attachment #9514047 - Attachment description: Bug 1858562 - Part 4: Platform specific Document Picture-in-Picture adjustments. r=edgar,emilio,#dom-core → Bug 1858562 - Part 3: Platform specific Document Picture-in-Picture adjustments. r=edgar,emilio,#dom-core
Attachment #9517791 - Attachment description: Bug 1858562 - Part 5: Browser Chrome Document Picture-in-Picture adjustments. r=mconley,smaug,sthompson,#dom-core → Bug 1858562 - Part 4: Browser Chrome Document Picture-in-Picture adjustments. r=mconley,smaug,sthompson,#dom-core
Attachment #9523146 - Attachment description: WIP: Bug 1858562 - Enable Document Picture-in-Picture on nightly. r=smaug → Bug 1858562 - Part 5: Enable Document Picture-in-Picture on nightly. r=smaug

Comment on attachment 9523145 [details]
WIP: Bug 1858562 - Tab PiP indicator

Revision D270473 was moved to bug 1997522. Setting attachment 9523145 [details] to obsolete.

Attachment #9523145 - Attachment is obsolete: true
Blocks: 1997522
Depends on: 2004407
Attachment #9523146 - Attachment description: Bug 1858562 - Part 5: Enable Document Picture-in-Picture on nightly. r=smaug → Bug 1858562 - Part 6: Enable Document Picture-in-Picture on nightly. r=smaug
Attachment #9523146 - Attachment description: Bug 1858562 - Part 6: Enable Document Picture-in-Picture on nightly. r=smaug → Bug 1858562 - Part 5: Enable Document Picture-in-Picture on nightly. r=smaug

( I added the WIP patch in case bug 543435 gets backed out again. )

Pushed by vhilla@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1d7618633a0e https://hg.mozilla.org/integration/autoland/rev/8ea1af4c441e Part 1: Implement Document Picture-in-Picture Spec. r=edgar,smaug,dom-core,webidl,firefox-style-system-reviewers,layout-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/a3047a1c85a5 https://hg.mozilla.org/integration/autoland/rev/59e896322809 Part 2: Replace mIsPIPWindow with a new nsIWidget::mPiPType. r=smaug,win-reviewers,emilio,gstoll https://github.com/mozilla-firefox/firefox/commit/8bf1985cc5d1 https://hg.mozilla.org/integration/autoland/rev/bb2448db345f Part 3: Platform specific Document Picture-in-Picture adjustments. r=emilio,dom-core,win-reviewers,gstoll,smaug https://github.com/mozilla-firefox/firefox/commit/182bb259bfc7 https://hg.mozilla.org/integration/autoland/rev/ef4ea0d8c6e6 Part 4: Browser Chrome Document Picture-in-Picture adjustments. r=mconley,smaug,sthompson,dom-core,webidl,sessionstore-reviewers,dao,urlbar-reviewers https://github.com/mozilla-firefox/firefox/commit/cc548da55c12 https://hg.mozilla.org/integration/autoland/rev/bd58411bb2eb Part 5: Enable Document Picture-in-Picture on nightly. r=smaug,webidl
Whiteboard: webcompat:risk-moderate → webcompat:risk-moderate , [wptsync upstream]
Upstream PR merged by moz-wptsync-bot

For MDN browser compat data, we support all features except for disallowReturnToOpener.

Release Note Request (optional, but appreciated)
[Why is this notable]: New web API
[Affects Firefox for Android]: No
[Suggested wording]: Nightly now supports the Document Picture-in-Picture API, which allows web pages to place content in an always-on-top popup.
[Links (documentation, blog post, etc)]: https://developer.mozilla.org/en-US/docs/Web/API/Document_Picture-in-Picture_API

relnote-firefox: --- → ?
Blocks: 2006594
Blocks: 2006597

Added to the Fx148 nightly release notes, please allow 30 minutes for the site to update.
The nightly-only note will be removed after three cycles or when it is enabled by default, whichever comes earlier.

See Also: → 2006642
Blocks: 2008334
Regressions: 2008394
No longer depends on: 1547894
Blocks: 2009660
QA Whiteboard: [qa-triage-done-c149/b148]

Hi there! Does Document PiP Firefox support have a flag to turn it on in non-Nightly browsers?

Flags: needinfo?(vhilla)

(In reply to Chris Mills [:cmills] from comment #24)

Hi there! Does Document PiP Firefox support have a flag to turn it on in non-Nightly browsers?

Yes, it's dom.documentpip.enabled and is available since Fx 148. So while disabled by default, it just reached Beta and isn't in Release yet. Also, we saw TikTok and Spotify only use the API for Chrome user agents.

Flags: needinfo?(vhilla)

The API is already documented on MDN; I've created a PR to add the necessary MDN rel notes for the Firefox support (https://github.com/mdn/content/pull/42825), so I think we can now consider this one complete in terms of the required MDN docs.

See Also: → 2012726
Alias: doc-pip-api
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: