diff --git a/files/en-us/web/api/picture-in-picture_api/index.md b/files/en-us/web/api/picture-in-picture_api/index.md index 18439200b709e77..b3699ac5b54c2d9 100644 --- a/files/en-us/web/api/picture-in-picture_api/index.md +++ b/files/en-us/web/api/picture-in-picture_api/index.md @@ -16,6 +16,8 @@ The **Picture-in-Picture API** allow websites to create a floating, always-on-to - {{DOMxRef("PictureInPictureWindow")}} - : Represents the floating video window; contains {{domxref("PictureInPictureWindow/width", "width")}} and {{domxref("PictureInPictureWindow/height", "height")}} properties, and an {{domxref("PictureInPictureWindow/resize_event", "onresize")}} event handler property. +- {{DOMxRef("PictureInPictureEvent")}} + - : Represents picture-in-picture-related events, including {{domxref("HTMLVideoElement/enterpictureinpicture_event", "enterpictureinpicture")}}, {{domxref("HTMLVideoElement/leavepictureinpicture_event", "leavepictureinpicture")}} and {{domxref("PictureInPictureWindow/resize_event", "resize")}}. ## Instance methods @@ -71,7 +73,7 @@ The [`:picture-in-picture`](/en-US/docs/Web/CSS/:picture-in-picture) [CSS](/en-U ## Controlling access -The availability of picture-in-picture mode can be controlled using [Permissions Policy](/en-US/docs/Web/HTTP/Permissions_Policy). The fullscreen mode feature is identified by the string `"picture-in-picture"`, with a default allowlist value of `"self"`, meaning that picture-in-picture mode is permitted in top-level document contexts, as well as to nested browsing contexts loaded from the same origin as the top-most document. +The availability of picture-in-picture mode can be controlled using [Permissions Policy](/en-US/docs/Web/HTTP/Permissions_Policy). The picture-in-picture mode feature is identified by the string `"picture-in-picture"`, with a default allowlist value of `*`, meaning that picture-in-picture mode is permitted in top-level document contexts, as well as to nested browsing contexts loaded from the same origin as the top-most document. ## Examples diff --git a/files/en-us/web/api/pictureinpictureevent/index.md b/files/en-us/web/api/pictureinpictureevent/index.md index b10c3b45ff5e3b4..583496641e9a1a9 100644 --- a/files/en-us/web/api/pictureinpictureevent/index.md +++ b/files/en-us/web/api/pictureinpictureevent/index.md @@ -7,7 +7,7 @@ browser-compat: api.PictureInPictureEvent {{APIRef("Picture-in-Picture API")}} -The **`PictureInPictureEvent`** interface represents picture-in-picture-related events, including {{domxref("HTMLVideoElement/enterpictureinpicture_event", "enterpictureinpicture")}}, {{domxref("HTMLVideoElement/leavepictureinpicture_event", "leavepictureinpicture")}} and {{domxref("PictureInPictureWindow/resize_event", "resize")}} +The **`PictureInPictureEvent`** interface represents picture-in-picture-related events, including {{domxref("HTMLVideoElement/enterpictureinpicture_event", "enterpictureinpicture")}}, {{domxref("HTMLVideoElement/leavepictureinpicture_event", "leavepictureinpicture")}} and {{domxref("PictureInPictureWindow/resize_event", "resize")}}. {{InheritanceDiagram}} diff --git a/files/en-us/web/api/shadowroot/pictureinpictureelement/index.md b/files/en-us/web/api/shadowroot/pictureinpictureelement/index.md index 6de140e74de9190..3306035c8642c4b 100644 --- a/files/en-us/web/api/shadowroot/pictureinpictureelement/index.md +++ b/files/en-us/web/api/shadowroot/pictureinpictureelement/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.ShadowRoot.pictureInPictureElement --- -{{APIRef("Shadow DOM")}} +{{APIRef("Picture-in-Picture API")}} The **`pictureInPictureElement`** read-only property of the {{domxref("ShadowRoot")}} interface returns the {{domxref("Element")}} that is currently being @@ -15,9 +15,9 @@ picture-in-picture mode is not currently in use. ## Value -A reference to the {{domxref("Element")}} object that's currently in -picture-in-picture mode, or, if picture-in-picture mode isn't currently in use by the -shadow tree, the returned value is `null`. +A reference to the {{domxref("Element")}} object that's currently in picture-in-picture mode. + +Returns `null` if the shadow tree has no associated element in picture-in-picture mode. For example, there's no picture-in-picture element, or the element is not in the shadow tree. ## Examples diff --git a/files/jsondata/GroupData.json b/files/jsondata/GroupData.json index 1bd627d2a20efb0..264130b25527d9e 100644 --- a/files/jsondata/GroupData.json +++ b/files/jsondata/GroupData.json @@ -1161,8 +1161,8 @@ }, "Picture-in-Picture API": { "overview": ["Picture-in-Picture API"], - "guides": ["/docs/Web/API/Picture-in-Picture_API/Guide"], - "interfaces": ["PictureInPictureWindow"], + "guides": [], + "interfaces": ["PictureInPictureWindow", "PictureInPictureEvent"], "methods": [ "HTMLVideoElement.requestPictureInPicture()", "Document.exitPictureInPicture()" @@ -1170,12 +1170,12 @@ "properties": [ "HTMLVideoElement.disablePictureInPicture", "Document.pictureInPictureEnabled", - "Document.pictureInPictureElement" + "Document.pictureInPictureElement", + "ShadowRoot.pictureInPictureElement" ], "events": [ "HTMLVideoElement: enterpictureinpicture", - "HTMLVideoElement: leavepictureinpicture", - "PictureInPictureWindow: resize" + "HTMLVideoElement: leavepictureinpicture" ] }, "Pointer Events": {