According https://bugs.webkit.org/show_bug.cgi?id=178109, WebKit might not always handle properly 'ideal' constraints.
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?
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?
Actually, https://bugs.webkit.org/show_bug.cgi?id=210932 might be one issue along those lines.
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.
> 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.
Closing as configuration changed.
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.