mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
26 lines
727 B
HTML
26 lines
727 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<video id="video"></video>
|
|
<script>
|
|
const video = document.getElementById("video");
|
|
|
|
function logEvent(name) {
|
|
let entry = `${name}: readyState=${video.readyState}`;
|
|
if (name === "durationchange")
|
|
entry += ` duration=${video.duration}`;
|
|
println(entry);
|
|
}
|
|
|
|
for (const name of [
|
|
"loadstart", "durationchange", "loadedmetadata",
|
|
"loadeddata", "canplay", "canplaythrough",
|
|
]) {
|
|
video.addEventListener(name, () => logEvent(name));
|
|
}
|
|
|
|
asyncTest(done => {
|
|
video.addEventListener("canplaythrough", () => done());
|
|
video.src = "../../../Assets/test-webm.webm";
|
|
});
|
|
</script>
|