-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zh-CN]: sync&add translation for
PictureInPictureEvent
(#23561)
Co-authored-by: A1lo <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6e2c396
commit 6bc2cd6
Showing
4 changed files
with
112 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: PictureInPictureEvent | ||
slug: Web/API/PictureInPictureEvent | ||
l10n: | ||
sourceCommit: bb4d21e3c6e71db4e0ba983a450d6ed628e82670 | ||
--- | ||
|
||
{{APIRef("Picture-in-Picture API")}} | ||
|
||
**`PictureInPictureEvent`** 接口表示画中画相关的事件,包括 {{domxref("HTMLVideoElement/enterpictureinpicture_event", "enterpictureinpicture")}}、{{domxref("HTMLVideoElement/leavepictureinpicture_event", "leavepictureinpicture")}} 和 {{domxref("PictureInPictureWindow/resize_event", "resize")}}。 | ||
|
||
{{InheritanceDiagram}} | ||
|
||
## 构造函数 | ||
|
||
- {{domxref("PictureInPictureEvent.PictureInPictureEvent", "PictureInPictureEvent()")}} | ||
- : 使用给定的参数创建一个 `PictureInPictureEvent` 事件。 | ||
|
||
## 实例属性 | ||
|
||
_此接口还从其父级 {{domxref("Event")}} 继承了属性_。 | ||
|
||
- {{domxref("PictureInPictureEvent.pictureInPictureWindow")}} | ||
- : 返回与事件相关的 {{domxref("PictureInPictureWindow")}}。 | ||
|
||
## 实例方法 | ||
|
||
_此接口还从其父级 {{domxref("Event")}} 继承了方法_。 | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- {{domxref("Event")}} 父接口 |
41 changes: 41 additions & 0 deletions
41
files/zh-cn/web/api/pictureinpictureevent/pictureinpictureevent/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: PictureInPictureEvent:PictureInPictureEvent() 构造函数 | ||
slug: Web/API/PictureInPictureEvent/PictureInPictureEvent | ||
l10n: | ||
sourceCommit: ee99bfdebd8f9c691a06afec0895285a3bf2da2a | ||
--- | ||
|
||
{{APIRef("Picture-in-Picture API")}} | ||
|
||
**`PictureInPictureEvent()`** 构造函数返回一个新的 {{domxref("PictureInPictureEvent")}} 对象。 | ||
|
||
## 语法 | ||
|
||
```js-nolint | ||
new PictureInPictureEvent(type, options) | ||
``` | ||
|
||
### 参数 | ||
|
||
- `type` | ||
- : 表示事件名称的字符串。它区分大小写,浏览器将其设置为 `enterpictureinpicture`、`leavepictureinpicture` 或 `resize`。 | ||
- `options` | ||
- : _除了 {{domxref("Event/Event", "Event()")}} 中定义的属性外_,该对象还可以具有以下属性: | ||
- `pictureInPictureWindow` | ||
- : 一个 {{domxref("PictureInPictureWindow")}} 对象。 | ||
|
||
### 返回值 | ||
|
||
一个新的 {{domxref("PictureInPictureEvent")}} 对象。 | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- 它所属的 {{domxref("PictureInPictureEvent")}} 接口。 |
26 changes: 26 additions & 0 deletions
26
files/zh-cn/web/api/pictureinpictureevent/pictureinpicturewindow/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: PictureInPictureEvent:pictureInPictureWindow 属性 | ||
slug: Web/API/PictureInPictureEvent/pictureInPictureWindow | ||
l10n: | ||
sourceCommit: ee99bfdebd8f9c691a06afec0895285a3bf2da2a | ||
--- | ||
|
||
{{APIRef("Picture-in-Picture API")}} | ||
|
||
{{domxref("PictureInPictureEvent")}} 接口的 **`pictureInPictureWindow`** 只读属性返回与事件相关的 {{domxref("PictureInPictureWindow")}}。 | ||
|
||
## 值 | ||
|
||
{{domxref("PictureInPictureWindow")}}。 | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- [Picture-in-Picture API](/zh-CN/docs/Web/API/Picture-in-Picture_API) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters