1. 開発者向けのウェブ技術
  2. Web API
  3. Window
  4. documentPictureInPicture

このページはコミュニティーの尽力で英語から翻訳されました。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

ブラウザーの互換性

関連情報

MDN の改良に協力

協力方法を知る

このページは MDN の貢献者によって に最終更新されました。

AltStyle によって変換されたページ (->オリジナル) /