зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1362165: P5. Don't assume that when stalling all data has been loaded. r=gerald
The stalled event can be fired as playback is starting and data has yet to be processed. So instead we wait for playback to reach the end. MozReview-Commit-ID: 4W3M5tee2HD --HG-- extra : rebase_source : 349321452f8e1cc3307e8cedb6ebf44949694661
This commit is contained in:
Родитель
6643614f8c
Коммит
10fa46be38
|
@ -14,7 +14,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
|
||||
runWithMSE(function (ms, v) {
|
||||
// Test that memory reporting works once we've played a video.
|
||||
once(v, "stalled", () => {
|
||||
once(v, "ended", () => {
|
||||
// Grab a memory report.
|
||||
var mgr = SpecialPowers.Cc["@mozilla.org/memory-reporter-manager;1"]
|
||||
.getService(SpecialPowers.Ci.nsIMemoryReporterManager);
|
||||
|
@ -41,7 +41,10 @@ runWithMSE(function (ms, v) {
|
|||
// Load a webm video and play it.
|
||||
ms.addEventListener("sourceopen", () => {
|
||||
var sb = ms.addSourceBuffer("video/webm");
|
||||
fetchAndLoad(sb, 'seek', [''], '.webm').then(() => v.play());
|
||||
fetchAndLoad(sb, 'seek', [''], '.webm').then(function() {
|
||||
ms.endOfStream();
|
||||
v.play()
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче