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 Navigator.mediaDevices #17089

Merged
merged 3 commits into from
Nov 24, 2023
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
20 changes: 12 additions & 8 deletions files/zh-cn/web/api/navigator/mediadevices/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
---
title: Navigator.mediaDevices
title: NavigatormediaDevices 属性
slug: Web/API/Navigator/mediaDevices
l10n:
sourceCommit: ef75c1741b450c2331204be5563ee964ad5f4c48
---

{{APIRef("Media Capture and Streams")}}mediaDevices 是 Navigator 只读属性,返回一个 {{domxref("MediaDevices")}} 对象,该对象可提供对相机和麦克风等媒体输入设备的连接访问,也包括屏幕共享。
{{APIRef("Media Capture and Streams")}}{{securecontext_header}}

**`Navigator.mediaDevices`** 只读属性返回一个 {{domxref("MediaDevices")}} 对象,该对象可提供对相机和麦克风等媒体输入设备以及屏幕共享的连接访问。

## 语法

```plain
var mediaDevices = navigator.mediaDevices;
```js-nolint
navigator.mediaDevices
```

### 返回值

{{domxref("MediaDevices")}} 是一个单例对象。通常,你只需直接使用此对象的成员,例如通过调用{{domxref("navigator.mediaDevices.getUserMedia()")}}。
{{domxref("MediaDevices")}} 单例对象。通常,你只需直接使用此对象的成员,例如调用 {{domxref("navigator.mediaDevices.getUserMedia()")}}。

## 规范

Expand All @@ -23,7 +27,7 @@ var mediaDevices = navigator.mediaDevices;

{{Compat}}

## 参考阅读
## 参见

- [Media Capture and Streams API](/zh-CN/docs/Web/API/Media_Streams_API): The entry point to the documentation about the entire media stream API.
- [WebRTC API](/zh-CN/docs/Web/API/WebRTC_API): Documentation about the WebRTC API, which is closely related.
- [媒体捕捉与媒体流 API](/zh-CN/docs/Web/API/Media_Streams_API):有关整个媒体捕捉与媒体流 API 的文档的入口点。
jasonren0403 marked this conversation as resolved.
Show resolved Hide resolved
- [WebRTC API](/zh-CN/docs/Web/API/WebRTC_API):密切相关的 WebRTC API 的相关文档。
yin1999 marked this conversation as resolved.
Show resolved Hide resolved