--- title: Navigator.mediaDevices slug: Web/API/Navigator/mediaDevices tags: - Media - Media Capture and Streams API - Media Streams API - MediaDevices - Navigator - Reference - Web - 只读 - 属性 translation_of: Web/API/Navigator/mediaDevices ---
var mediaDevices = navigator.mediaDevices;
{{domxref("MediaDevices")}} 是一个单例对象。通常,您只需直接使用此对象的成员,例如通过调用{{domxref("navigator.mediaDevices.getUserMedia()")}}。
Specification | Status | Comment |
---|---|---|
{{SpecName('Media Capture', '#widl-NavigatorUserMedia-mediaDevices', 'NavigatorUserMedia.mediaDevices')}} | {{Spec2('Media Capture')}} | Initial definition. |