Bug 1219711 - Ensure MediaStreamTrack.enabled propagates across peerconnections. r=jesup a=ritu
authorAndreas Pehrson <pehrsons@gmail.com>
Fri, 30 Oct 2015 14:13:15 +0800
changeset 305399 35e183dfdd7a3197317fa1c1be3f88e636e8a72d
parent 305398 09ed4ec6ff76e86ca845cae1e0b36677bee3828c
child 305400 3ec252297a490c0008243de5c2ba57d75ccc3c03
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, ritu
bugs1219711
milestone44.0a2
Bug 1219711 - Ensure MediaStreamTrack.enabled propagates across peerconnections. r=jesup a=ritu
dom/media/DOMMediaStream.cpp
--- a/dom/media/DOMMediaStream.cpp
+++ b/dom/media/DOMMediaStream.cpp
@@ -693,18 +693,19 @@ DOMMediaStream::CreateAudioCaptureStream
   RefPtr<DOMMediaStream> stream = new DOMMediaStream();
   stream->InitAudioCaptureStream(aWindow, aGraph);
   return stream.forget();
 }
 
 void
 DOMMediaStream::SetTrackEnabled(TrackID aTrackID, bool aEnabled)
 {
-  if (mOwnedStream) {
-    mOwnedStream->SetTrackEnabled(aTrackID, aEnabled);
+  // XXX Bug 1208371 - This enables/disables the track across clones.
+  if (mInputStream) {
+    mInputStream->SetTrackEnabled(aTrackID, aEnabled);
   }
 }
 
 void
 DOMMediaStream::StopTrack(TrackID aTrackID)
 {
   if (mInputStream && mInputStream->AsSourceStream()) {
     mInputStream->AsSourceStream()->EndTrack(aTrackID);