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 controls property #25440

Merged
merged 3 commits into from
Jan 18, 2025
Merged
Changes from 1 commit
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
25 changes: 10 additions & 15 deletions files/zh-cn/web/api/htmlmediaelement/controls/index.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
---
title: HTMLMediaElement.controls
title: HTMLMediaElementcontrols 属性
slug: Web/API/HTMLMediaElement/controls
l10n:
sourceCommit: 595cba0e07c70eda7f08a12890e00ea0281933d3
---

{{APIRef("HTML DOM")}}

**`HTMLMediaElement.controls`** 这个负责控制 html 中的[`controls`](/zh-CN/docs/Web/HTML/Element/video#attr-controls)HTML 属性,它负责控制播放的媒体 (视频或音频) 的控制条是否显示。.
**`HTMLMediaElement.controls`** 属性反映了 [`controls`](/zh-CN/docs/Web/HTML/Element/video#controls) HTML 属性,该属性控制是否显示用于播放媒体项的用户界面控件。

## 语法
##

```plain
var ctrls = video.controls;
audio.controls = true;
```

### 返回值

类型 {{domxref("Boolean")}}. 是否成功
一个布尔值。`true` 值表示将显示控制项。
yin1999 marked this conversation as resolved.
Show resolved Hide resolved

## 例子
## 示例

```js
var obj = document.createElement("video");
const obj = document.createElement("video");
obj.controls = true;
```

Expand All @@ -33,6 +28,6 @@ obj.controls = true;

{{Compat}}

## 产考文档
## 参见

- The interface defining it, {{domxref("HTMLMediaElement")}}.
- {{domxref("HTMLMediaElement")}}:用于定义 `HTMLMediaElement.controls` 属性的接口
Loading