blob: b3b89e046d1da5b3f6f5fa12cd303aba7a1c22a3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>media-source-abort-resets-parser</title>
<script src="media-source-loader.js"></script>
<script src="../video-test.js"></script>
<script>
var loader;
var source;
var sourceBuffer;
window.addEventListener('load', event => {
findMediaElement();
loader = new MediaSourceLoader('content/test-fragmented-manifest.json');
loader.onload = async () => {
source = new MediaSource();
run('video.src = URL.createObjectURL(source)');
await waitFor(source, 'sourceopen');
run('sourceBuffer = source.addSourceBuffer(loader.type())');
run('sourceBuffer.appendBuffer(loader.initSegment())');
await waitFor(sourceBuffer, 'update');
run('sourceBuffer.appendBuffer(loader.mediaSegment(0))');
await waitFor(sourceBuffer, 'update');
run('video.currentTime = 0.50000000001');
await waitFor(video, 'seeked');
run('video.currentTime = 0.50000000001');
await waitFor(video, 'seeked');
endTest();
};
loader.onerror = () => {
failTest('Media data loading failed');
};
});
</script>
</head>
<body>
<video controls></video>
</body>
</html>