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

zh-cn: update the translation of HTMLMediaElement.controlsList #24867

Merged
merged 2 commits into from
Dec 3, 2024
Merged
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
40 changes: 11 additions & 29 deletions files/zh-cn/web/api/htmlmediaelement/controlslist/index.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,26 @@
---
title: HTMLMediaElement.controlsList
title: HTMLMediaElementcontrolsList 属性
slug: Web/API/HTMLMediaElement/controlsList
l10n:
sourceCommit: 595cba0e07c70eda7f08a12890e00ea0281933d3
---

{{SeeCompatTable}}{{APIRef("HTML DOM")}}
{{APIRef("HTML DOM")}}

[`HTMLMediaElement`](/zh-CN/docs/Web/API/HTMLMediaElement)接口的**`controlsList`** 属性返回 DOMTokenList,帮助用户在显示其自己的控件集时选择要在媒体元素上显示的控件。DOMTokenList 可以设置以下三个可能值中的一个或多个:nodownloadnofullscreen 和 noremoteplayback(值是一组[无序的空格分隔标记](https://wicg.github.io/controls-list/html-output/multipage/infrastructure.html#unordered-set-of-unique-space-separated-tokens),这些[标记](https://wicg.github.io/controls-list/html-output/multipage/infrastructure.html#unordered-set-of-unique-space-separated-tokens)是[ASCII 不区分大小写的](https://infra.spec.whatwg.org/#ascii-case-insensitive))
{{domxref("HTMLMediaElement")}} 接口的 **`controlsList`** 属性返回一个 DOMTokenList,其用于帮助用户代理在显示自有的一组控件时,决定应在媒体元素上显示哪些控件。DOMTokenList 接受三个可能的值中的一个或多个:`nodownload`、`nofullscreen``noremoteplayback`

1. [`nodownload`](https://wicg.github.io/controls-list/html-output/multipage/embedded-content.html#attr-media-controlslist-nodownload)关键字暗示的下载控制应使用用户代理自己的一套媒体元素控件时被隐藏。
2. [`nofullscreen`](https://wicg.github.io/controls-list/html-output/multipage/embedded-content.html#attr-media-controlslist-nofullscreen)关键字暗示在使用用户代理自己的媒体元素控件集时,应隐藏全屏模式控件。
3. [`noremoteplayback`](https://wicg.github.io/controls-list/html-output/multipage/embedded-content.html#attr-media-controlslist-noremoteplayback)关键字暗示当使用用户代理自己的媒体元素控件集时,应隐藏远程播放控件。
## 值

## 语法
{{domxref("DOMTokenList")}}。

```plain
var domTokenList = HTMLMediaElement.controlsList;
```
## 规范

### Value

A {{domxref("DOMTokenList")}}.

## 示例

```plain
<video controls controlslist="nodownload" id="video" src=""></video>
```

```plain
<video controls controlslist="nodownload nofullscreen noremoteplayback" id="video" src=""></video>
```

## 规格

<https://wicg.github.io/controls-list/html-output/multipage/embedded-content.html#attr-media-controlslist>.
{{Specifications}}

## 浏览器兼容性

{{Compat}}

## 参阅
## 参见

- [Chrome HTMLMediaElement controlsList Sample](https://googlechrome.github.io/samples/media/controlslist.html) 示例
- [Chrome HTMLMediaElement controlsList 示例](https://googlechrome.github.io/samples/media/controlslist.html)