Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-non-snap-to-lines.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<title>Position is not adjusted for non snap-to-lines cues</title>
<link rel="match" href="track-webvtt-non-snap-to-lines-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="/common/media.js"></script>
<style>
::cue {
background: green;
}
</style>
<video autoplay onplaying="this.onplaying = null; this.pause(); takeScreenshot();"></video>
<script>
var video = document.querySelector("video");
var track = video.addTextTrack("captions");
var cue = new VTTCue(0, 1, "Bear is Coming!!!!!");
cue.snapToLines = false;
cue.line = 20;
cue.align = "left";
track.addCue(cue);
track.mode = "showing";
video.src = getVideoURI("/media/test");
</script>
</html>