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

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: Remove Debug Code 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 bda19f7a6c3e87554a2b1f3cea2f253b38287e39..2518da1bb73686e6896febcca94449813190af3b 100644
--- a/content/renderer/media/user_media_client_impl.cc
+++ b/content/renderer/media/user_media_client_impl.cc
@@ -85,6 +85,17 @@ void CopyBlinkRequestToStreamControls(const blink::WebUserMediaRequest& request,
}
}
}
+
+ bool exact = request.audioConstraints().basic().muteSourceAudio.exact();
+ bool has_exact =
+ request.audioConstraints().basic().muteSourceAudio.hasExact();
+
+ if (has_exact) {
+ controls->mute_source_audio = exact;
+ } else {
+ controls->mute_source_audio =
+ controls->audio.stream_source != kMediaStreamSourceDesktop;
+ }
}
if (!request.videoConstraints().isNull()) {
const blink::WebMediaTrackConstraintSet& video_basic =

Powered by Google App Engine
This is Rietveld 408576698