Bug 178115 - Support ideal constraints for getUserMedia
Summary: Support ideal constraints for getUserMedia
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-09 20:30 PDT by youenn fablet
Modified: 2020-07-29 05:52 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2017-10-09 20:30:54 PDT
According https://bugs.webkit.org/show_bug.cgi?id=178109, WebKit might not always handle properly 'ideal' constraints.
Comment 1 daginge 2019-09-02 04:27:38 PDT
Just wanted to bump this. All the other browsers support ideal, which makes switching camera effortless for us, as our users frequently change from laptop mode to docked mode (with external camera attached). We could pick up the error here and re-run getUserMedia with the default camera, but it would have to be a workaround just for Safari, so I would rather prefer spec-compliance here.

Is there any timeline for implementing the ideal constraint?
Comment 2 youenn fablet 2020-06-26 05:59:37 PDT
Since we now have resizing being done, I would hope ideal constraints are correctly supported now.
Daginge, do you still have issues with ideal constraints or can we close that issue?
Comment 3 youenn fablet 2020-06-26 07:51:25 PDT
Actually, https://bugs.webkit.org/show_bug.cgi?id=210932 might be one issue along those lines.
Comment 4 daginge 2020-07-29 04:52:35 PDT
As far as I can see, ideal constraints when selecting getUserMedia works as expected now. If I have selected a camera by deviceId, and it doesn't match, I get the default device available.

Kinda annoying that deviceIds are not persistent across sessions, so if the user refreshes, you have to select the device you want again in that session. Usually we would store the preferred deviceId in localStorage and attempt to use that next session.

Separate bug I guess? There are ofc. some privacy concerns here also.
Comment 5 youenn fablet 2020-07-29 05:51:29 PDT
> Kinda annoying that deviceIds are not persistent across sessions, so if the
> user refreshes, you have to select the device you want again in that
> session. Usually we would store the preferred deviceId in localStorage and
> attempt to use that next session.

This should work as you expect, with IDB instead of localStorage if possible :)
Not sure exactly why this is not working for you. third party iframe?
Might be worth another bug.
Comment 6 youenn fablet 2020-07-29 05:51:55 PDT
Closing as configuration changed.
Comment 7 youenn fablet 2020-07-29 05:52:43 PDT
I think there might still be some corner cases with ideal constraints but we can treat them as follow-up bugs if it becomes a practical issue.