PSA: We're updating how Chrome handles device selection when getUserMedia is called with an "ideal" constraint for the device ID. This change is being rolled out by Finch. It can be temporarily disabled by disabling chrome://flags/#camera-mic-preview and chrome://flags/#get-user-media-deferred-device-settings-selection.
What's changing?
Currently, when you use an "ideal" constraint for a device ID, Chrome prioritizes this preference when requesting camera or microphone access. With this change, if the user has previously expressed a device preference (through the new permission bubble), Chrome will prioritize the user's preference over the "ideal" constraint provided in your code. This aims to improve user experience by respecting the user's explicit device choice.
If your application needs to use a specific camera or microphone, you should switch from using "ideal" constraints to using "exact" constraints for the device ID. This ensures that your application will always get the specified device if available.
How to test this change:
Enable the chrome://flags/#camera-mic-preview and chrome://flags/#get-user-media-deferred-device-settings-selection flags in Chrome.
Use a website that calls getUserMedia with an "ideal" device ID constraint.
Observe the new permission bubble, which allows users to select their preferred devices.