Window: documentPictureInPicture property
The documentPictureInPicture
read-only property of the Window
interface returns a reference to the DocumentPictureInPicture
object for the current document context.
Value
Examples
const videoPlayer = document.getElementById("player");
await window.documentPictureInPicture.requestWindow({
width: videoPlayer.clientWidth,
height: videoPlayer.clientHeight,
});
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
documentPictureInPicture |
116 |
116 |
No |
No |
102 |
No |
No |
No |
No |
No |
No |
No |
See also