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 AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 51Edge Full support YesFirefox Full support 36IE Full support YesOpera No support NoSafari No support NoWebView Android Full support 51Chrome Android Full support 51Edge Mobile Full support YesFirefox Android Full support 36Opera 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

Document Tags and Contributors

Last updated by: connorshea,