Window:documentPictureInPicture 属性
Window 接口中只读属性 documentPictureInPicture 返回对当前文档上下文中 DocumentPictureInPicture 对象的引用。
值
DocumentPictureInPicture 对象实例。
示例
js
const videoPlayer = document.getElementById("player");
// …
// Open a Picture-in-Picture window.
await window.documentPictureInPicture.requestWindow({
width: videoPlayer.clientWidth,
height: videoPlayer.clientHeight,
});
// …
规范
| 规范 |
|---|
| 文档画中画规范 # dom-window-documentpictureinpicture |
浏览器兼容性
加载中…