Bug 1362165: P2. Don't expect that all data has been processed after metadata. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 28 Apr 2017 00:52:44 +0200
changeset 409394 c89c6c8630f132296b2e2edbba4239a8ad7a1075
parent 409393 20e01cb7989d63219c2acfb611cf9b25a0135cee
child 409395 bc1e56d5cb9ba2d563981973573cf3b10fc0abdb
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1362165
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1362165: P2. Don't expect that all data has been processed after metadata. r=gerald Assuming that the buffered range has been updated when loadedmetadata was fired was wrong. Only once the data has been fully appended to the source buffer, can seeking complete. MozReview-Commit-ID: LRY0PRaMEw9
dom/media/mediasource/test/test_BufferedSeek.html
dom/media/mediasource/test/test_BufferedSeek_mp4.html
--- a/dom/media/mediasource/test/test_BufferedSeek.html
+++ b/dom/media/mediasource/test/test_BufferedSeek.html
@@ -29,22 +29,17 @@ runWithMSE(function (ms, v) {
           ms.endOfStream();
         };
       });
     });
 
     var target = 2;
 
     v.addEventListener("loadedmetadata", function () {
-      if (v.currentTime != target &&
-          v.buffered.length &&
-          target >= v.buffered.start(0) &&
-          target < v.buffered.end(0)) {
-        v.currentTime = target;
-      }
+      v.currentTime = target;
     });
 
     var wasSeeking = false;
 
     v.addEventListener("seeking", function () {
       wasSeeking = true;
       is(v.currentTime, target, "Video currentTime at target");
     });
--- a/dom/media/mediasource/test/test_BufferedSeek_mp4.html
+++ b/dom/media/mediasource/test/test_BufferedSeek_mp4.html
@@ -29,22 +29,17 @@ runWithMSE(function (ms, v) {
           ms.endOfStream();
         };
       });
     });
 
     var target = 1.3;
 
     v.addEventListener("loadedmetadata", function () {
-      if (v.currentTime != target &&
-          v.buffered.length &&
-          target >= v.buffered.start(0) &&
-          target < v.buffered.end(0)) {
-        v.currentTime = target;
-      }
+      v.currentTime = target;
     });
 
     var wasSeeking = false;
 
     v.addEventListener("seeking", function () {
       wasSeeking = true;
       is(v.currentTime, target, "Video currentTime at target");
     });