Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
skyclouds2001 and github-actions[bot] authored Sep 23, 2024
1 parent 6cb40c0 commit c264d79
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ l10n:
本指南提供了 {{domxref("Document Picture-in-Picture API", "Document Picture-in-Picture API", "", "nocode")}} 典型用法的详细指导。

> [!NOTE]
> 你可以在 [Document Picture-in-Picture API 示例](https://mdn.github.io/dom-examples/document-picture-in-picture/)中看到特色演示(另请参阅完整的 [源代码](https://github.com/mdn/dom-examples/tree/main/document-picture-in-picture))。
> 你可以在 [Document Picture-in-Picture API 示例](https://mdn.github.io/dom-examples/document-picture-in-picture/)中看到特色演示(另请参阅完整的[源代码](https://github.com/mdn/dom-examples/tree/main/document-picture-in-picture))。
## 示例 HTML

以下 HTML 设置了一个基本的视频播放器。

```html
<div id="container">
<p class="in-pip-message">
视频播放器当前位于单独的画中画窗口中。
</p>
<p class="in-pip-message">视频播放器当前位于单独的画中画窗口中。</p>
<div id="player">
<video
src="assets/bigbuckbunny.mp4"
Expand Down Expand Up @@ -176,8 +174,7 @@ documentPictureInPicture.addEventListener("enter", (event) => {
});
```

> [!NOTE]
> {{domxref("DocumentPictureInPictureEvent")}} 事件对象包含一个 `window` 属性,用于访问画中画窗口。
> **备注:** {{domxref("DocumentPictureInPictureEvent")}} 事件对象包含一个 `window` 属性,用于访问画中画窗口。
## 访问元素并处理事件

Expand Down

0 comments on commit c264d79

Please sign in to comment.