RESOLVED FIXED293949
OverconstrainedError in getUserMedia on iOS 18.1 Simulator
https://bugs.webkit.org/show_bug.cgi?id=293949
Summary OverconstrainedError in getUserMedia on iOS 18.1 Simulator
milen
Reported 2025-06-03 04:35:18 PDT
I'm testing an app in iOS 18.1 Simulator, iPhone 16. 1) Call `await navigator.mediaDevices.enumerateDevices()`. Returns two input devices: InputDeviceInfo {deviceId: "", kind: "audioinput", label: "", groupId: "", …} InputDeviceInfo {deviceId: "", kind: "videoinput", label: "", groupId: "", …} 2) Call `stream = await navigator.mediaDevices.getUserMedia({video: true})` This fails with the following error: OverconstrainedError {message: "Invalid constraint", constraint: "", name: "OverconstrainedError"} 3) Call `stream = await navigator.mediaDevices.getUserMedia({audio: true})`. The user grants microphone access. The call succeeds and returns a stream. No errors. 4) Call `await navigator.mediaDevices.enumerateDevices()`. Returns ONE input device: InputDeviceInfo {deviceId: "18D5FE168D21164D9C4ED78C74A6A6D2A572513C", kind: "audioinput", label: "MicrophoneBuiltIn", groupId: "FD080DBDD6AA6F6F23AE94E8627078192F0F58C3", …} Expected behavior: If no camera is available, then enumerateDevices() should not return a device of kind "videoinput".
Attachments
Alexey Proskuryakov
Comment 1 2025-06-03 15:29:29 PDT
Thank you for the report! Does this reproduce with the latest simulator?
milen
Comment 2 2025-06-04 00:33:23 PDT
I tested it on the latest iOS 18.5 Simulator, iPhone 16, and the result remains the same.
Radar WebKit Bug Importer
Comment 3 2025-06-10 04:36:12 PDT
youenn fablet
Comment 4 2025-06-11 01:55:25 PDT
EWS
Comment 5 2025-06-11 04:15:20 PDT
Committed 296083@main (22a5e4f2aa67): <https://commits.webkit.org/296083@main> Reviewed commits have been landed. Closing PR #46594 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.