Navigator: mediaDevices property

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The mediaDevices read-only property of the Navigator interface returns a MediaDevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing.


The MediaDevices singleton object. Usually, you just use this object's members directly, such as by calling navigator.mediaDevices.getUserMedia().


Media Capture and Streams
# mediadevices

Browser compatibility

BCD tables only load in the browser

See also