diff options
Diffstat (limited to 'dom/media/mediasource/test/test_trackidchange_mp4.html')
-rw-r--r-- | dom/media/mediasource/test/test_trackidchange_mp4.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dom/media/mediasource/test/test_trackidchange_mp4.html b/dom/media/mediasource/test/test_trackidchange_mp4.html new file mode 100644 index 0000000000..fdbeece3cd --- /dev/null +++ b/dom/media/mediasource/test/test_trackidchange_mp4.html @@ -0,0 +1,32 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>MSE: test append of audio with similar init segments that have different track ids</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"); + const audiosb = ms.addSourceBuffer("audio/mp4"); + await fetchAndLoad(audiosb, "init-trackid2", [''], ".mp4"); + await fetchAndLoad(audiosb, "segment-2.0001", [''], ".m4s"); + await fetchAndLoad(audiosb, "init-trackid3", [''], ".mp4"); + await fetchAndLoad(audiosb, "segment-3.0002", [''], ".m4s"); + is(el.buffered.length, 1, "data is buffered"); + is(el.buffered.end(0), 8, "all data got appended"); + SimpleTest.finish(); +}); + +</script> +</pre> +</body> +</html> |