The Navigator.mediaDevices
read-only property returns a MediaDevices
object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing.
Syntax
var mediaDevices = navigator.mediaDevices;
Return value
The MediaDevices
singleton object. Usually, you just use this object's members directly, such as by calling navigator.mediaDevices.getUserMedia()
.
Specifications
Specification | Status | Comment |
---|---|---|
Media Capture and Streams The definition of 'NavigatorUserMedia.mediaDevices' in that specification. |
Editor's Draft | Initial definition. |
Browser compatibility
Feature | Chrome | Edge | Firefox (Gecko) | Microsoft Edge | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|---|
Basic support | 51.0 | (Yes) | 36.0 (36.0) | (Yes) | (Yes) | No support | No support |
Feature | Android | Android Webview | Edge | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|---|---|
Basic support | No support | No support | (Yes) | 36.0 (36.0) | 36.0 (36.0) | No support | No support | No support | No support |
See also
- Media Capture and Streams API: The entry point to the documentation about the entire media stream API.
- WebRTC API: Documentation about the WebRTC API, which is closely related.
Document Tags and Contributors
Tags:
Contributors to this page:
abbycar,
chrisdavidmills,
Mr0Lz,
Sheppy,
jpmedley,
Sebastianz,
teoli,
Jib
Last updated by:
abbycar,