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() (en-US).

Specifications

Specification Status Comment
Media Capture and Streams
La definición de 'NavigatorUserMedia.mediaDevices' en esta especificación.
Candidate Recommendation Initial definition.

Browser compatibility

BCD tables only load in the browser

See also