Navigator.mediaDevices

You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!

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.
Candidate Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
mediaDevicesChrome Full support 51Edge Full support 12Firefox Full support 36IE Full support YesOpera No support NoSafari No support NoWebView Android Full support 51Chrome Android Full support 51Firefox Android Full support 36Opera Android No support NoSafari iOS No support NoSamsung Internet Android Full support Yes
Secure context requiredChrome Full support 74Edge No support NoFirefox Full support 69IE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also