Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: content/renderer/media/user_media_client_impl.cc

Issue 1741553003: Fix for chromeRenderToAssociatedSink optional constraint calculation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/user_media_client_impl.cc
diff --git a/content/renderer/media/user_media_client_impl.cc b/content/renderer/media/user_media_client_impl.cc
index 15e096b6469d9b1bc061d68be7d41c99bb18666c..16d1427bb0cc4c4eaf4337c695d05350d8076bb3 100644
--- a/content/renderer/media/user_media_client_impl.cc
+++ b/content/renderer/media/user_media_client_impl.cc
@@ -179,10 +179,14 @@ void UserMediaClientImpl::requestUserMedia(
controls.audio.requested = true;
// Check if this input device should be used to select a matching output
// device for audio rendering.
- if (!user_media_request.audioConstraints()
- .basic()
- .renderToAssociatedSink.matches(false)) {
- enable_automatic_output_device_selection = true;
+ enable_automatic_output_device_selection = true; // On by default.
+ for (const auto& advanced_constraint :
+ user_media_request.audioConstraints().advanced()) {
+ if (advanced_constraint.renderToAssociatedSink.hasExact()) {
+ enable_automatic_output_device_selection =
+ advanced_constraint.renderToAssociatedSink.exact();
+ break;
+ }
}
}
if (user_media_request.video()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698