Fwd: [blink-dev] PSA: Chrome getUserMedia "ideal" Constraint Change

117 views
Skip to first unread message

Philipp Hancke

unread,
Oct 28, 2024, 1:39:29 PMOct 28
to discuss...@googlegroups.com
relevant for this list too
---------- Forwarded message ---------
Von: Bryant Chandler
Date: Mo., 28. Okt. 2024 um 10:24 Uhr
Subject: [blink-dev] PSA: Chrome getUserMedia "ideal" Constraint Change
To: blink-dev <blin...@chromium.org>


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:

  1. Enable the chrome://flags/#camera-mic-preview and chrome://flags/#get-user-media-deferred-device-settings-selection flags in Chrome.

  2. Use a website that calls getUserMedia with an "ideal" device ID constraint.

  3. Observe the new permission bubble, which allows users to select their preferred devices.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2BOqQzNL%2BTFcwp7DpnCVwqPB_iFFTruQv8jLBjLFbWcW3FhWsg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages