diff options
Diffstat (limited to 'dom/media/mediasource/test/test_MediaSource_flac_mp4.html')
-rw-r--r-- | dom/media/mediasource/test/test_MediaSource_flac_mp4.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dom/media/mediasource/test/test_MediaSource_flac_mp4.html b/dom/media/mediasource/test/test_MediaSource_flac_mp4.html new file mode 100644 index 0000000000..9cc159e467 --- /dev/null +++ b/dom/media/mediasource/test/test_MediaSource_flac_mp4.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html><head> +<meta http-equiv="content-type" content="text/html; charset=windows-1252"> + <title>MSE: Can seek to last frame</title> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <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(); + +runWithMSE(async (ms, el) => { + el.controls = true; + await once(ms, "sourceopen"); + ok(true, "Receive a sourceopen event"); + is(ms.readyState, "open", "MediaSource must be in open state after sourceopen"); + const sb = ms.addSourceBuffer("audio/mp4; codecs=\"flac\""); + ok(sb, "Create a SourceBuffer"); + + await fetchAndLoad(sb, "flac/IS", [""], ".mp4"); + await fetchAndLoad(sb, "flac/0000", range(1, 3), ".m4s"); + el.play(); + ms.endOfStream(); + await once(el, "ended"); + SimpleTest.finish(); +}); + +</script> +</pre> +</body> +</html> |