dom/media/test/test_vp9_superframes.html
author Jean-Yves Avenard <jyavenard@mozilla.com>
Mon, 17 Dec 2018 20:30:46 +0000
changeset 509073 a475f96d74721bf5bfd62ef33dd2c4b186faea03
permissions -rw-r--r--
Bug 1513511 - P2. Ensure all frames are decoded. r=bryce, a=lizzard vp9 streams contains superframes. Ensure they are all properly handled. Differential Revision: https://phabricator.services.mozilla.com/D14699

<!DOCTYPE HTML>
<html>
<head>
  <title>Test that all VP9 frames are decoded (contains superframes)</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">

SimpleTest.waitForExplicitFinish();

function test() {
  var video = document.createElement("video");
  video.src = "vp9-superframes.webm";
  video.play();
  video.addEventListener("ended", function () {
    vpq = video.getVideoPlaybackQuality();
    is(vpq.totalVideoFrames, 120, "totalVideoFrames must contains 120 frames");
    SimpleTest.finish();
  });
}

addLoadEvent(function() {
  test();
});
</script>
</pre>
</body>
</html>