mediastream.ended seems to be now readonly, so using stop() method on track to trigger onended event (although spec currently says it shouldn't, spec isn't very clear on this in the first place http://dev.w3.org/2011/webrtc/editor/getusermedia.html#dfn-finished )
authorDominique Hazael-Massieux <dom@w3.org>
Thu, 30 May 2013 16:06:16 +0200
changeset 41 9864a60c24a4
parent 40 dd43e3cbd9ee
child 42 2a310d1bb1da
mediastream.ended seems to be now readonly, so using stop() method on track to trigger onended event (although spec currently says it shouldn't, spec isn't very clear on this in the first place http://dev.w3.org/2011/webrtc/editor/getusermedia.html#dfn-finished )
submitted/W3C/stream-ended.html
--- a/submitted/W3C/stream-ended.html	Thu May 30 15:57:20 2013 +0200
+++ b/submitted/W3C/stream-ended.html	Thu May 30 16:06:16 2013 +0200
@@ -26,6 +26,8 @@
       t.done();
       }), false);
     stream.ended = true;
+    assert_true(!stream.ended, "stream.ended should remain false");
+    stream.getVideoTracks()[0].stop();
   }), function (error) {});
 });
 </script>