Bug 1208316 - Do not stop the local MediaStream in mediaStreamPlayback.js. r?jib draft
authorAndreas Pehrson <pehrsons@gmail.com>
Fri, 09 Sep 2016 14:21:32 +0200
changeset 432204 cd0307e27d12bb48b68849e16158498cdfc1e1e0
parent 432203 4e50aac5cd66b7633bd70b7f4c4a8afee3f7003c
child 432205 46de8a01f5e66a8c5d9b43c50c24ab0ea47610ea
push id34233
push userbmo:pehrson@telenordigital.com
push dateTue, 01 Nov 2016 13:21:40 +0000
reviewersjib
bugs1208316
milestone52.0a1
Bug 1208316 - Do not stop the local MediaStream in mediaStreamPlayback.js. r?jib No need to do this since a media element playing the stream will now end when all tracks have ended. MozReview-Commit-ID: DXPY3G36gkw
dom/media/tests/mochitest/mediaStreamPlayback.js
--- a/dom/media/tests/mochitest/mediaStreamPlayback.js
+++ b/dom/media/tests/mochitest/mediaStreamPlayback.js
@@ -62,22 +62,16 @@ MediaStreamPlayback.prototype = {
         haveEvent(t, "ended", onNextLoop)
           .then(() => Promise.reject("Unexpected ended event for track " + t.id),
                 () => Promise.resolve())
       ]);
       t.stop();
       return p;
     }));
 
-    // XXX (bug 1208316) When we implement MediaStream.active, do not stop
-    // the stream. We just do it now so the media element will raise 'ended'.
-    if (!this.mediaStream.stop) {
-      return;
-    }
-    this.mediaStream.stop();
     return timeout(waitForEnded(), ENDED_TIMEOUT_LENGTH, "ended event never fired")
              .then(() => ok(true, "ended event successfully fired"))
              .then(() => noTrackEnded);
   },
 
   /**
    * Starts media with a media stream, runs it until a canplaythrough and
    * timeupdate event fires, and detaches from the element without stopping media.