Window: documentPictureInPicture-Eigenschaft
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimentell: Dies ist eine experimentelle Technologie
Überprüfen Sie die Browser-Kompatibilitätstabelle sorgfältig vor der Verwendung auf produktiven Webseiten.
Sicherer Kontext: Diese Funktion ist nur in sicheren Kontexten (HTTPS) in einigen oder allen unterstützenden Browsern verfügbar.
Die documentPictureInPicture
-Eigenschaft des Window
-Interfaces ist eine schreibgeschützte Eigenschaft, die eine Referenz auf das DocumentPictureInPicture
-Objekt des aktuellen Dokumentkontexts zurückgibt.
Wert
Eine Instanz eines DocumentPictureInPicture
-Objekts.
Beispiele
const videoPlayer = document.getElementById("player");
// ...
// Open a Picture-in-Picture window.
await window.documentPictureInPicture.requestWindow({
width: videoPlayer.clientWidth,
height: videoPlayer.clientHeight,
});
// ...
Spezifikationen
Specification |
---|
Document Picture-in-Picture Specification # dom-window-documentpictureinpicture |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
documentPictureInPicture |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.