W3cubDocs

/DOM

navigator.mediaDevices

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 compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 51 Yes 36 Yes No No
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support 51 51 Yes 36 No No ?

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/navigator/mediaDevices