coderef

Document picture-in-pictureLimited availability

The document picture-in-picture API creates an always-on-top window from arbitrary HTML content.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–129Not supported
130+Supportedsince Oct 15, 2024
Current: 155
Edge
12–129Not supported
130+Supportedsince Oct 17, 2024
Current: 154
Firefox
1–150Not supported
151+Supportedsince May 19, 2026
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
✕Not supportedup to 155
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Safari, Chrome Android, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: DocumentPictureInPicture.

Feature detection

JS · check before using
if ("DocumentPictureInPicture" in globalThis) {
  // DocumentPictureInPicture is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (10). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
DocumentPictureInPicture116116151✕✕✕✕
DocumentPictureInPicture.enter_event116116151✕✕✕✕
DocumentPictureInPicture.requestWindow116116151✕✕✕✕
DocumentPictureInPicture.requestWindow.option_disallowReturnToOpener124124151✕✕✕✕
DocumentPictureInPicture.requestWindow.option_preferInitialWindowPlacement130130151✕✕✕✕
DocumentPictureInPicture.window116116151✕✕✕✕
DocumentPictureInPictureEvent116116151✕✕✕✕
DocumentPictureInPictureEvent.DocumentPictureInPictureEvent116116151✕✕✕✕
DocumentPictureInPictureEvent.window116116151✕✕✕✕
Window.documentPictureInPicture116116151✕✕✕✕