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

Unified Diff: third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp

Issue 2919793002: Detect AudioInputStream muting and propagate to MediaStreamAudioSource. (Closed)
Patch Set: Added logging to AIRH. Put timer in Optional. Created 3 years, 7 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: third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
index 10c2e52354652c43602fb7dd5f62b5aeb090598b..10fb1add97279ffc66ea7e544b61d9c079eced15 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
@@ -72,6 +72,11 @@ MediaStreamTrack::MediaStreamTrack(ExecutionContext* context,
constraints_() {
component_->Source()->AddObserver(this);
+ // If the source is already non-live at this point, the observer won't have
+ // been called. Check the state manually.
+ if (ready_state_ != component_->Source()->GetReadyState())
+ SourceChangedState();
Guido Urdaneta 2017/06/02 13:45:34 Perhaps you should postpone the blink work to a fo
ossu-chromium 2017/06/02 13:53:19 Sounds good. I believe this should work as intende
ossu-chromium 2017/06/02 14:07:21 Just checked: readyState goes to "muted" with this
Guido Urdaneta 2017/06/02 14:16:40 MediaStreamSource was probably designed for an old
+
if (component_->Source() &&
component_->Source()->GetType() == MediaStreamSource::kTypeVideo) {
// ImageCapture::create() only throws if |this| track is not of video type.
« media/audio/audio_input_controller.cc ('K') | « media/base/audio_capturer_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698