diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /dom/media/mediasource/test/test_SeekToLastFrame_mp4.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.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_SeekToLastFrame_mp4.html')
-rw-r--r-- | dom/media/mediasource/test/test_SeekToLastFrame_mp4.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dom/media/mediasource/test/test_SeekToLastFrame_mp4.html b/dom/media/mediasource/test/test_SeekToLastFrame_mp4.html new file mode 100644 index 0000000000..edbfdff0a0 --- /dev/null +++ b/dom/media/mediasource/test/test_SeekToLastFrame_mp4.html @@ -0,0 +1,34 @@ +<!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"); + const sb = ms.addSourceBuffer("video/mp4"); + await fetchAndLoad(sb, "bipbop/bipbop_480_624kbps-video", ["init"], ".mp4"); + 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(); +}); + +</script> +</pre> +</body> +</html> |