OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Test rendering horizontal line-positioned cues (reference).</title> |
| 3 <script src="../media-file.js"></script> |
| 4 <video></video> |
| 5 <script> |
| 6 var video = document.querySelector("video"); |
| 7 video.src = findMediaFile("video", "../content/test"); |
| 8 video.currentTime = 0.25; |
| 9 var track = video.addTextTrack("captions"); |
| 10 |
| 11 var cue = new VTTCue(0, 1, "Cue 1: should be positioned at the top of the video.
"); |
| 12 cue.line = 0; |
| 13 track.addCue(cue); |
| 14 |
| 15 cue = new VTTCue(0, 1, "Cue 2: should be the second cue and not overlap cue 1.")
; |
| 16 cue.line = 1; |
| 17 track.addCue(cue); |
| 18 |
| 19 cue = new VTTCue(0, 1, "Cue 3: should become the third line from top to bottom."
); |
| 20 cue.line = 2; |
| 21 track.addCue(cue); |
| 22 |
| 23 cue = new VTTCue(0, 1, "Cue 4: should be fixed positioned around the middle."); |
| 24 cue.line = 5; |
| 25 track.addCue(cue); |
| 26 |
| 27 cue = new VTTCue(0, 1, "Cue 5: should be displayed at the bottom of the video.")
; |
| 28 cue.line = -1; |
| 29 track.addCue(cue); |
| 30 |
| 31 cue = new VTTCue(0, 1, "Cue 6: should be on top of bottom positioned cue 5."); |
| 32 cue.line = -2; |
| 33 track.addCue(cue); |
| 34 |
| 35 track.mode = "showing"; |
| 36 </script> |
OLD | NEW |