proposals
proposals copied to clipboard
Document Picture-in-Picture
Introduction
There currently exists a Web API for putting an HTMLVideoElement
into a
Picture-in-Picture window (HTMLVideoElement.requestPictureInPicture()
). This
limits a website's ability to provide a custom picture-in-picture experience
(PiP). We want to expand upon that functionality by giving websites the ability
to open a picture-in-picture (i.e., always-on-top) window with a blank document
that can be populated with arbitrary HTMLElement
s instead of only a single
HTMLVideoElement
.
This new window will be much like a blank same-origin window opened via the
existing window.open()
API, with some differences:
- The PiP window will float on top of other windows.
- The PiP window will never outlive the opening window.
- The website cannot set the position of the PiP window.
- The PiP window cannot be navigated (any
window.history
orwindow.location
calls that change to a new document will close the PiP window). - The PiP window cannot open more windows.
Feedback
I welcome feedback in this thread, but encourage you to file bugs against the Explainer.