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

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

Issue 2922733002: Propagate muted state from MediaStreamAudioSource into JS. (Closed)
Patch Set: Made SetMuted call unconditional. Rebased. Created 3 years, 6 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 | « content/renderer/media/media_stream_audio_source.cc ('k') | content/test/data/media/getusermedia.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_source.cc
diff --git a/content/renderer/media/media_stream_source.cc b/content/renderer/media/media_stream_source.cc
index 3334bfd57120d66fa4bbd13cac1a12a50d968479..890cc69a66e484683cdf33424193d43f13a7fdc8 100644
--- a/content/renderer/media/media_stream_source.cc
+++ b/content/renderer/media/media_stream_source.cc
@@ -26,6 +26,16 @@ void MediaStreamSource::StopSource() {
Owner().SetReadyState(blink::WebMediaStreamSource::kReadyStateEnded);
}
+void MediaStreamSource::SetSourceMuted(bool is_muted) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ // Although this change is valid only if the ready state isn't already Ended,
+ // there's code further along (like in blink::MediaStreamTrack) which filters
+ // that out alredy.
+ Owner().SetReadyState(is_muted
+ ? blink::WebMediaStreamSource::kReadyStateMuted
+ : blink::WebMediaStreamSource::kReadyStateLive);
+}
+
void MediaStreamSource::SetDeviceInfo(const StreamDeviceInfo& device_info) {
DCHECK(thread_checker_.CalledOnValidThread());
device_info_ = device_info;
« no previous file with comments | « content/renderer/media/media_stream_audio_source.cc ('k') | content/test/data/media/getusermedia.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698