Bug 1293015 - Call mozCapturedStreamXXX in onloadedmetadata callback. r=pehrsons. draft
authorChia-hung Tai <ctai@mozilla.com>
Mon, 15 Aug 2016 13:24:48 +0800
changeset 401025 a7eab5b0d105b0f4b8e39f7742dadbb8bd4da341
parent 401014 3c01b6e649e3ccc3c270097d82b40e780822797f
child 401026 dd1ca2147e0e8842c7575ca20de329c2440a5282
push id26340
push userbmo:ctai@mozilla.com
push dateTue, 16 Aug 2016 05:44:32 +0000
reviewerspehrsons
bugs1293015
milestone51.0a1
Bug 1293015 - Call mozCapturedStreamXXX in onloadedmetadata callback. r=pehrsons. MozReview-Commit-ID: JtY28kQVOM3
dom/media/test/test_bug879717.html
--- a/dom/media/test/test_bug879717.html
+++ b/dom/media/test/test_bug879717.html
@@ -115,16 +115,20 @@ var startTest = function(media, token) {
   v3.onended = onended;
 
   document.body.appendChild(v1);
   document.body.appendChild(v2);
   document.body.appendChild(v3);
 
   v1.src = media.name;
   v2.src = media.name;
-  v3.srcObject = v2.mozCaptureStreamUntilEnded();
+  v2.preload = 'metadata';
+
+  v2.onloadedmetadata = function () {
+    v3.srcObject = v2.mozCaptureStreamUntilEnded();
+  };
 }
 
 manager.runTests(getPlayableVideos(gSmallTests), startTest);
 </script>
 </pre>
 </body>
 </html>