← 返回首页
Window: documentPictureInPicture プロパティ - Web API | MDN

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

Window: documentPictureInPicture プロパティ

利用可能性は限定的

この機能はベースラインではありません。最も広く使用されているブラウザーの一部で動作しません。

Want more support for this feature? Tell us why.

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。

documentPictureInPictureWindow インターフェイスの読み取り専用プロパティで、現在の文書コンテキストの DocumentPictureInPicture オブジェクトへの参照を返します。

目次

DocumentPictureInPicture オブジェクトインスタンスです。

js
const videoPlayer = document.getElementById("player"); // ... // Open a Picture-in-Picture window. await window.documentPictureInPicture.requestWindow({ width: videoPlayer.clientWidth, height: videoPlayer.clientHeight, }); // ...

仕様書

仕様書
Document Picture-in-Picture Specification
# dom-window-documentpictureinpicture

ブラウザーの互換性

ブラウザー互換性一覧表を表示するには、JavaScript を有効にしてください。

関連情報