ShadowRoot: pictureInPictureElement プロパティ

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

pictureInPictureElementShadowRoot インターフェイスの読み取り専用プロパティで、このシャドウツリー内で現在、ピクチャインピクチャモードで表示されている要素 (Element) を返します。現在、ピクチャインピクチャモードが使用されていない場合は null を返します。

現在ピクチャインピクチャモードになっている Element オブジェクトへの参照、またはピクチャインピクチャモードが現在シャドウツリーで使われていない場合は null が返されます。

js
let customElem = document.querySelector("my-shadow-dom-element");
let shadow = customElem.shadowRoot;
let pipElem = shadow.pictureInPictureElement;

仕様書

Specification
Picture-in-Picture
# ref-for-dom-documentorshadowroot-pictureinpictureelement①⑤

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
pictureInPictureElement

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

関連情報