Media captureBaseline · Widely available
The navigator.mediaDevices.getUserMedia() API requests access to devices that produce audio or video streams, such as microphones or video cameras.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 19, 2017. Widely available since Mar 19, 2020.
Browser support
DesktopChrome
1–52Not supported
53+Supportedsince Aug 31, 2016
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–35Not supported
36+Supportedsince Feb 24, 2015
Current: 157Safari
1–10.1Not supported
11+Supportedsince Sep 19, 2017
Current: 27MobileChrome Android
18–52Not supported
53+Supportedsince Sep 7, 2016
Current: 155Firefox Android
4–35Not supported
36+Supportedsince Feb 27, 2015
Current: 157Safari iOS
1–10.3Not supported
11+Supportedsince Sep 19, 2017
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: InputDeviceInfo.
Feature detection
JS · check before using
if ("MediaDeviceInfo" in globalThis) {
// MediaDeviceInfo is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (72). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| InputDeviceInfo | 47 | 79 | ✕ | 11 | 47 | ✕ | 11 |
| InputDeviceInfo.getCapabilities | 67 | 79 | ✕ | 17 | 67 | ✕ | 17 |
| MediaDeviceInfo | 47 | 12 | 39 | 11 | 47 | 39 | 11 |
| MediaDeviceInfo.deviceId | 47 | 12 | 39 | 11 | 47 | 39 | 11 |
| MediaDeviceInfo.groupId | 47 | 12 | 39 | 11 | 47 | 39 | 11 |
| MediaDeviceInfo.kind | 47 | 12 | 39 | 11 | 47 | 39 | 11 |
| MediaDeviceInfo.label | 47 | 12 | 39 | 11 | 47 | 39 | 11 |
| MediaDeviceInfo.toJSON | 47 | 18 | 42 | 11 | 47 | 42 | 11 |
| MediaDevices | 47 | 12 | 33 | 11 | 47 | 36 | 11 |
| MediaDevices.devicechange_event | 57 | 12 | 52 | 11 | 132 | 52 | 11 |
| MediaDevices.enumerateDevices | 47 | 12 | 116 | 11 | 47 | 116 | 11 |
| MediaDevices.getSupportedConstraints | 53 | 12 | 44 | 11 | 52 | 50 | 11 |
| MediaDevices.getUserMedia | 53 | 12 | 36 | 11 | 53 | 36 | 11 |
| MediaDevices.getUserMedia.secure_context_required | 53 | 79 | 68 | 11 | 53 | 68 | 11 |
| MediaStream | 55 | 12 | 15 | 11 | 55 | 15 | 11 |
| MediaStream.MediaStream | 55 | 12 | 44 | 11 | 55 | 42 | 11 |
| MediaStream.active | 55 | 12 | 52 | 11 | 55 | 52 | 11 |
| MediaStream.addTrack | 55 | 12 | 44 | 11 | 55 | 44 | 11 |
| MediaStream.addtrack_event | 55 | 12 | 50 | 11 | 55 | 50 | 11 |
| MediaStream.clone | 55 | 12 | 48 | 11 | 55 | 48 | 11 |