2017-03-09 01:09:52 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html><head>
|
|
|
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
|
|
|
|
<title>MSE: Can seek to last frame</title>
|
2019-04-16 06:53:28 +03:00
|
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
2017-03-09 01:09:52 +03:00
|
|
|
<script type="text/javascript" src="mediasource.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();
|
|
|
|
|
2018-05-21 23:40:13 +03:00
|
|
|
runWithMSE(async (ms, el) => {
|
2017-03-09 01:09:52 +03:00
|
|
|
el.controls = true;
|
2018-05-21 23:40:13 +03:00
|
|
|
await once(ms, "sourceopen");
|
|
|
|
ok(true, "Receive a sourceopen event");
|
|
|
|
const sb = ms.addSourceBuffer("video/mp4");
|
2018-05-30 15:18:54 +03:00
|
|
|
await fetchAndLoad(sb, "bipbop/bipbop_480_624kbps-video", ["init"], ".mp4");
|
2018-05-21 23:40:13 +03:00
|
|
|
await fetchAndLoad(sb, "bipbop/bipbop_480_624kbps-video", range(1, 3), ".m4s");
|
|
|
|
el.play();
|
|
|
|
// let seek to the last audio frame.
|
|
|
|
el.currentTime = 1.532517;
|
|
|
|
await once(el, "seeked");
|
|
|
|
ok(true, "seek completed");
|
|
|
|
ms.endOfStream();
|
|
|
|
await once(el, "ended");
|
|
|
|
SimpleTest.finish();
|
2017-03-09 01:09:52 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|