Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update groupdata of Picture-In-Picture API & some other update #35887

Merged
merged 6 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion files/en-us/web/api/picture-in-picture_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/pictureinpictureevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
10 changes: 5 additions & 5 deletions files/jsondata/GroupData.json
Original file line number Diff line number Diff line change
Expand Up @@ -1161,21 +1161,21 @@
},
"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()"
],
"properties": [
"HTMLVideoElement.disablePictureInPicture",
"Document.pictureInPictureEnabled",
"Document.pictureInPictureElement"
"Document.pictureInPictureElement",
"ShadowRoot.pictureInPictureElement"
],
"events": [
"HTMLVideoElement: enterpictureinpicture",
"HTMLVideoElement: leavepictureinpicture",
"PictureInPictureWindow: resize"
"HTMLVideoElement: leavepictureinpicture"
]
},
"Pointer Events": {
Expand Down