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

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

Issue 2291893002: Let Contraints Controll Mute/Unmute Audio Local Playback For Desktop Sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename To DisableLocalEcho Created 4 years, 3 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
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 10122a048a4468a368fd10747996b159811a8868..698fe47b1506c6a632727f60a96e58442f7c3a94 100644
--- a/content/renderer/media/user_media_client_impl.cc
+++ b/content/renderer/media/user_media_client_impl.cc
@@ -85,6 +85,18 @@ void CopyBlinkRequestToStreamControls(const blink::WebUserMediaRequest& request,
}
}
}
+
+ bool exact =
+ request.audioConstraints().basic().googDisableLocalEcho.exact();
+ bool has_exact =
+ request.audioConstraints().basic().googDisableLocalEcho.hasExact();
+
+ if (has_exact) {
+ controls->disable_local_echo = exact;
+ } else {
+ controls->disable_local_echo =
+ controls->audio.stream_source != kMediaStreamSourceDesktop;
+ }
}
if (!request.videoConstraints().isNull()) {
const blink::WebMediaTrackConstraintSet& video_basic =

Powered by Google App Engine
This is Rietveld 408576698