Bug 230819 - applyConstraints throws OverconstrainedError if specify exact for deviceId
Summary: applyConstraints throws OverconstrainedError if specify exact for deviceId
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari Technology Preview
Hardware: Mac (Intel) macOS 11
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-26 23:19 PDT by Trung Le
Modified: 2022-03-29 02:32 PDT (History)
11 users (show)

See Also:


Attachments
Patch (5.54 KB, patch)
2021-09-28 07:13 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trung Le 2021-09-26 23:19:56 PDT
It seems in the latest Safari 15.0, calling applyConstraints for a video media stream track with exact for deviceId will results in OverconstrainedError - Constraint not supported. This works in Safari 14.
Comment 1 Kevin Neal 2021-09-27 09:41:57 PDT
Thanks for filing. Please attach a file, or link to a demo, that documents the bug.
Comment 2 Radar WebKit Bug Importer 2021-09-27 09:42:10 PDT
<rdar://problem/83577361>
Comment 3 Trung Le 2021-09-27 10:08:57 PDT
I have been able to reproduce this issue with just use navigator.mediaDevices.getUserMedia() and applyConstraints() API.
Repo steps:

- Call stream = navigator.mediaDevices.getUserMedia({ video: { deviceId: { exact: <deviceId string> }}}); <- exact here works.
- Call stream.getVideoTracks()[0].applyConstraints({ deviceId: { exact: <deviceId string> }}); <- throw OverconstrainedError error in Safari 15 but not Safari 14.
Comment 4 youenn fablet 2021-09-28 07:09:44 PDT
Thanks for the report, I'll fix it soon but would like to understand the impact for your application.
Thanks,
   Y
Comment 5 youenn fablet 2021-09-28 07:13:20 PDT
Created attachment 439472 [details]
Patch
Comment 6 EWS 2021-09-28 09:20:34 PDT
Committed r283173 (242221@main): <https://commits.webkit.org/242221@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439472 [details].
Comment 7 Trung Le 2021-09-28 09:35:37 PDT
Thanks. That was quick. This completely breaks our video filter when we try to apply video constraints.
Will this be released in the next Safari patch version?
Comment 8 Trung Le 2021-12-16 11:08:20 PST
This is still an issue in Safari 15.2.
Comment 9 Trung Le 2022-03-24 19:21:56 PDT
The issue is still reproducible in Safari 15.3 but seems to be fixed in Technology Preview version. Will it be available in 15.4?
Comment 10 youenn fablet 2022-03-29 02:32:36 PDT
Yes, it should be fixed in Safari 15.4, can you validate this?