Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html class="reftest-wait">
<title>Reference for WebVTT rendering, cue reposition after enabling controls</title>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
video {
position: absolute;
width:320px;
height:240px;
}
.cue {
position: absolute;
bottom: 50px;
left: 0;
right: 0;
text-align: center
}
.cue > span {
font-family: Ahem, sans-serif;
background: rgba(0,0,0,0.8);
color: green;
font-size: 50px;
}
.media-container {
display: inline-block;
position: relative;
border: solid black 1px;
border-box: content-box;
width: 320px;
height: 240px;
}
</style>
<div class="media-container">
<span class="cue"><span>Foo</span></span>
<video controls autoplay onplaying="runTest()">
<source src="/media/sound_5.mp3" type="audio/mp3">
<source src="/media/sound_5.oga" type="audio/ogg">
</video>
</div>
<script src="/common/reftest-wait.js"></script>
<script>
async function runTest() {
let media = document.getElementsByTagName("video")[0];
media.pause();
media.currentTime = 0;
media.addEventListener("seeked", (event) => {
takeScreenshot();
});
}
</script>
</html>