summaryrefslogtreecommitdiffstats
path: root/dom/media/mediasource/test/test_trackidchange_mp4.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /dom/media/mediasource/test/test_trackidchange_mp4.html
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/mediasource/test/test_trackidchange_mp4.html')
-rw-r--r--dom/media/mediasource/test/test_trackidchange_mp4.html32
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>