From 0c425b029d4fbc34bd6aaa4800d2225a72c96d70 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 16 Sep 2025 12:16:24 +1000 Subject: [PATCH 1/5] MediaDevices.getUserMedia() add constraints --- api/MediaDevices.json | 525 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 525 insertions(+) diff --git a/api/MediaDevices.json b/api/MediaDevices.json index 31632e91200514..6448be04083c5c 100644 --- a/api/MediaDevices.json +++ b/api/MediaDevices.json @@ -585,6 +585,531 @@ "deprecated": false } } + }, + "constraints_aspectRatio_parameter": { + "__compat": { + "description": "`constraints.aspectRatio` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-aspectratio", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": false + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "≤12.1" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_autoGainControl_parameter": { + "__compat": { + "description": "`constraints.autoGainControl` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-autogaincontrol", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "≤65" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": false + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_channelCount_parameter": { + "__compat": { + "description": "`constraints.channelCount` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-channelcount", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "≤65" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": false + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_deviceId_parameter": { + "__compat": { + "description": "`constraints.deviceId` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-deviceid", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "≤65" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "≤12.1" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_echoCancellation_parameter": { + "__compat": { + "description": "`constraints.echoCancellation` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-echocancellation", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "≤65" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "13.1" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_facingMode_parameter": { + "__compat": { + "description": "`constraints.facingMode` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-facingmode", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "≤65" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "≤12.1" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_frameRate_parameter": { + "__compat": { + "description": "`constraints.frameRate` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-framerate", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "≤65" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "≤12.1" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_groupId_parameter": { + "__compat": { + "description": "`constraints.groupId` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-groupId", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "70" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "18.6" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_height_parameter": { + "__compat": { + "description": "`constraints.height` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-height", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "≤65" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "≤12.1" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_latency_parameter": { + "__compat": { + "description": "`constraints.latency` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-latency", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": false + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": false + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_noiseSuppression_parameter": { + "__compat": { + "description": "`constraints.noiseSuppression` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-noisesuppression", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "≤65" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": false + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_resizeMode_parameter": { + "__compat": { + "description": "`constraints.resizeMode` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-resizemode", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "144" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": false + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_sampleRate_parameter": { + "__compat": { + "description": "`constraints.sampleRate` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-samplerate", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": false + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "18.6" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_sampleSize_parameter": { + "__compat": { + "description": "`constraints.sampleSize` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-samplesize", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": false + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "18.6" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } + }, + "constraints_width_parameter": { + "__compat": { + "description": "`constraints.width` parameter", + "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset-width", + "tags": [ + "web-features:web-audio" + ], + "support": { + "chrome": { + "version_added": "≤75" + }, + "chrome_android": "mirror", + "edge": "mirror", + "firefox": { + "version_added": "≤65" + }, + "firefox_android": "mirror", + "oculus": "mirror", + "opera": "mirror", + "opera_android": "mirror", + "safari": { + "version_added": "≤12.1" + }, + "safari_ios": "mirror", + "samsunginternet_android": "mirror", + "webview_android": "mirror", + "webview_ios": "mirror" + }, + "status": { + "experimental": false, + "standard_track": true, + "deprecated": false + } + } } }, "selectAudioOutput": { From f5d02777fcb03816300b0dc63e436bfb9fe5f1dc Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Mon, 22 Sep 2025 11:00:57 +1000 Subject: [PATCH 2/5] MOve constraints under getSupportedConstraints --- api/MediaDevices.json | 164 +++++++++++++++++++++--------------------- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/api/MediaDevices.json b/api/MediaDevices.json index 6448be04083c5c..e4aa1ccdcd9294 100644 --- a/api/MediaDevices.json +++ b/api/MediaDevices.json @@ -503,88 +503,6 @@ "standard_track": true, "deprecated": false } - } - }, - "getUserMedia": { - "__compat": { - "mdn_url": "https://developer.mozilla.org/docs/Web/API/MediaDevices/getUserMedia", - "spec_url": "https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia", - "tags": [ - "web-features:media-capture" - ], - "support": { - "chrome": { - "version_added": "53", - "notes": "If you need this capability before version 53, refer to `navigator.webkitGetUserMedia`, a prefixed form of the deprecated [`navigator.getUserMedia`](https://developer.mozilla.org/docs/Web/API/Navigator/getUserMedia) API." - }, - "chrome_android": "mirror", - "edge": { - "version_added": "12" - }, - "firefox": { - "version_added": "36", - "notes": [ - "If you need this capability before version 36, refer to `navigator.mozGetUserMedia`, a prefixed form of the deprecated [`navigator.getUserMedia`](https://developer.mozilla.org/docs/Web/API/Navigator/getUserMedia) API.", - "Before Firefox 55, `getUserMedia()` incorrectly returns `NotSupportedError` when the list of constraints specified is empty, or has all constraints set to `false`. Starting in Firefox 55, this situation now correctly calls the failure handler with a `TypeError`.", - "When using the Firefox-specific `video` constraint called `mediaSource` to request display capture, Firefox 66 and later consider values of `screen` and `window` to both cause a list of screens _and_ windows to be shown.", - "Starting in Firefox 66, `getUserMedia()` can no longer be used in sandboxed `