OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>WebVTT two-cue layout after the first cue has ended (reference)</title> | 2 <title>Text track cue layout after controls are added (reference)</title> |
3 <video style="border:1px solid gray"> | 3 <style> |
| 4 ::cue { |
| 5 font-size: 50px; |
| 6 } |
| 7 </style> |
| 8 <video controls style="border:1px solid gray"> |
4 <source src="opera/track/webvtt/rendering/reftest/media/white.webm" type="vide
o/webm"> | 9 <source src="opera/track/webvtt/rendering/reftest/media/white.webm" type="vide
o/webm"> |
5 <source src="opera/track/webvtt/rendering/reftest/media/white.mp4" type="video
/mp4"> | 10 <source src="opera/track/webvtt/rendering/reftest/media/white.mp4" type="video
/mp4"> |
6 </video> | 11 </video> |
7 <script> | 12 <script> |
8 // Add a single cue at line -2, where it would be if there was a first | 13 // Add a single cue at line -2, where it would be if there were controls visible |
| 14 // at the bottom. (This assumes that those controls are less than 50px high.) |
9 // cue at line -1. | 15 // cue at line -1. |
10 var video = document.querySelector("video"); | 16 var video = document.querySelector("video"); |
11 var track = video.addTextTrack("captions"); | 17 var track = video.addTextTrack("captions"); |
12 var cue = new VTTCue(0, 3, "cue 2"); | 18 var cue = new VTTCue(0, 1, "text"); |
13 cue.line = -2; | 19 cue.line = -2; |
14 track.addCue(cue); | 20 track.addCue(cue); |
15 track.mode = "showing"; | 21 track.mode = "showing"; |
16 </script> | 22 </script> |
OLD | NEW |