Bug 293949
| Summary: | OverconstrainedError in getUserMedia on iOS 18.1 Simulator | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | milen <milen.yordanov> |
| Component: | WebRTC | Assignee: | youenn fablet <youennf> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer, youennf |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
milen
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
Thank you for the report! Does this reproduce with the latest simulator?
milen
I tested it on the latest iOS 18.5 Simulator, iPhone 16, and the result remains the same.
Radar WebKit Bug Importer
<rdar://problem/152938326>
youenn fablet
Pull request: https://github.com/WebKit/WebKit/pull/46594
EWS
Committed 296083@main (22a5e4f2aa67): <https://commits.webkit.org/296083@main>
Reviewed commits have been landed. Closing PR #46594 and removing active labels.