REOPENED Bug 264610
OverconstrainedError in getUserMedia on iOS 17 with Default Video Track Request
https://bugs.webkit.org/show_bug.cgi?id=264610
Summary OverconstrainedError in getUserMedia on iOS 17 with Default Video Track Request
matías lópez
Reported 2023-11-10 11:02:41 PST
# Summary When using navigator.mediaDevices.getUserMedia with default video settings on iOS 17, an OverconstrainedError is triggered regardless of video constraints. The issue, not present in previous iOS versions, prevents access to the video stream without specific width or height constraints. # Details When attempting to use navigator.mediaDevices.getUserMedia with default video constraints in iOS 17, an OverconstrainedError is triggered regardless of the video constraint being set to true or false. This error occurs without specifying any width or height constraints for the video track. The issue can be replicated using the following code snippet: Not works: ``` navigator.mediaDevices.getUserMedia({ audio: true, video: true }) .then(console.log) .catch(console.error); ``` Works (without video key): ``` navigator.mediaDevices.getUserMedia({ audio: true }) .then(console.log) .catch(console.error); ``` # Expected Behavior: The expected behavior is that the getUserMedia method should successfully access the user's camera and microphone with default settings when the video constraint is set to true. # Actual Behavior: The method triggers an OverconstrainedError, preventing access to the video stream, despite not having specific width or height constraints set. Works if you only set audio but not video as key in the constraints. Steps to Reproduce: 1. Open the DevTools. 2. Execute the above code snippet. 3. Observe the OverconstrainedError being thrown. # Environment: Device: iPhone 15 Pro Max OS: iOS 17 User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1 # Additional Information: This issue does not seem to occur on previous iOS versions. The error persists regardless of the video constraint being true or false. Consider was tested on real and emulated iOS.
Attachments
iOS debugging overconstrained error (3.35 MB, video/webm)
2023-11-10 14:04 PST, matías lópez
no flags
matías lópez
Comment 1 2023-11-10 14:04:14 PST
Created attachment 468558 [details] iOS debugging overconstrained error
Radar WebKit Bug Importer
Comment 2 2023-11-10 14:32:31 PST
matías lópez
Comment 3 2023-11-10 15:04:07 PST
Tested in iOS 17.1.1, works!
matías lópez
Comment 4 2023-11-10 15:11:58 PST
The affected iOS versions are between 17.0 and 17.1.0.
matías lópez
Comment 5 2023-11-21 15:22:05 PST
Sorry is not resolved, please test here again: https://8xxv58.csb.app/ This simple code should not throw an OverconstrainedError navigator.mediaDevices.getUserMedia({ audio: true, video: true }) The bug is still active from iOS 17. Is critical!! Today iOS users from version 17 can't access the camera (video) on the web. You can use any video app on the web to check. Basic example: https://webrtc.github.io/samples/src/content/getusermedia/gum/
youenn fablet
Comment 6 2023-11-22 01:17:13 PST
This might by iPhone 15 Pro Max specific. Can you provide a sysdiagnose privately with the timestamp where you reproduce the issue to youenn@apple.com?
Note You need to log in before you can comment on or make changes to this bug.