From 3b02f176d2fc0415d3903a94b303b4816ad167ff Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Sat, 14 Sep 2024 14:05:16 +0800 Subject: [PATCH 1/6] fix --- files/en-us/web/api/picture-in-picture_api/index.md | 2 ++ .../web/api/shadowroot/pictureinpictureelement/index.md | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) 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..233fe2b0cbf5b24 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 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 From 3fd62b52261526d3783d9ca8a71f76b38e1ce114 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Sat, 14 Sep 2024 14:05:33 +0800 Subject: [PATCH 2/6] update --- files/jsondata/GroupData.json | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/files/jsondata/GroupData.json b/files/jsondata/GroupData.json index 1bd627d2a20efb0..4e7b24331d3e67e 100644 --- a/files/jsondata/GroupData.json +++ b/files/jsondata/GroupData.json @@ -1161,8 +1161,11 @@ }, "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 +1173,12 @@ "properties": [ "HTMLVideoElement.disablePictureInPicture", "Document.pictureInPictureEnabled", - "Document.pictureInPictureElement" + "Document.pictureInPictureElement", + "ShadowRoot.pictureInPictureElement" ], "events": [ "HTMLVideoElement: enterpictureinpicture", - "HTMLVideoElement: leavepictureinpicture", - "PictureInPictureWindow: resize" + "HTMLVideoElement: leavepictureinpicture" ] }, "Pointer Events": { From 5452acb130b9916c33825a918d48c159ce435cf6 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Sat, 14 Sep 2024 14:06:43 +0800 Subject: [PATCH 3/6] update --- files/en-us/web/api/pictureinpictureevent/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}} From 5a0f3c3b80d0591e4d65d538e0985b44782acdec Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Sat, 14 Sep 2024 14:42:32 +0800 Subject: [PATCH 4/6] Update files/jsondata/GroupData.json --- files/jsondata/GroupData.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/files/jsondata/GroupData.json b/files/jsondata/GroupData.json index 4e7b24331d3e67e..264130b25527d9e 100644 --- a/files/jsondata/GroupData.json +++ b/files/jsondata/GroupData.json @@ -1162,10 +1162,7 @@ "Picture-in-Picture API": { "overview": ["Picture-in-Picture API"], "guides": [], - "interfaces": [ - "PictureInPictureWindow", - "PictureInPictureEvent" - ], + "interfaces": ["PictureInPictureWindow", "PictureInPictureEvent"], "methods": [ "HTMLVideoElement.requestPictureInPicture()", "Document.exitPictureInPicture()" From 166ad5ecfdb6cbebf686be7249e5b290baed4c02 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Sat, 14 Sep 2024 20:08:10 +0800 Subject: [PATCH 5/6] Update index.md --- files/en-us/web/api/picture-in-picture_api/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 233fe2b0cbf5b24..4cb81869ca0c51e 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 @@ -73,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 From e6edb7831e5d3fa8b47384eb5d85b93d579ff7bb Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Sat, 21 Sep 2024 01:36:01 +0800 Subject: [PATCH 6/6] Update files/en-us/web/api/picture-in-picture_api/index.md --- files/en-us/web/api/picture-in-picture_api/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4cb81869ca0c51e..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 @@ -73,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 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. +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