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

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: 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..bba06bc27d36b69ce4e31286316c2483ecc499db 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 (auto advanced_constraint :
tommi (sloooow) - chröme 2016/02/26 13:12:56 const auto&
o1ka 2016/02/26 13:21:06 Done.
+ 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