Navigator.mediaDevices 只读特性返回 MediaDevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing.

句法

var mediaDevices = navigator.mediaDevices;
					

返回值

MediaDevices singleton object. Usually, you just use this object's members directly, such as by calling navigator.mediaDevices.getUserMedia() .

规范

规范 状态 注释
媒体捕获和流
The definition of 'NavigatorUserMedia.mediaDevices' in that specification.
候选推荐 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
mediaDevices Chrome 51 Edge 12 Firefox 36 IE Yes Opera No Safari No WebView Android 51 Chrome Android 51 Firefox Android 36 Opera Android No Safari iOS No Samsung Internet Android 5.0
Secure context required Chrome 74 Edge 79 Firefox 69 IE No Opera No Safari No WebView Android 74 Chrome Android 74 Firefox Android No Opera Android No Safari iOS No Samsung Internet Android 11.0

图例

完整支持

完整支持

不支持

不支持

另请参阅

元数据

  • 最后修改: