OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>WebVTT two-cue layout after the first cue has ended</title> |
| 3 <video style="border:1px solid gray"> |
| 4 <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"> |
| 6 </video> |
| 7 <script> |
| 8 // Without testRunner.displayAsyncThen there is no guarantee for when the first |
| 9 // cue layout is done, so make no attempt to work without testRunner. |
| 10 testRunner.waitUntilDone(); |
| 11 |
| 12 // Add two cues, where the first cue ends before the second. |
| 13 var video = document.querySelector("video"); |
| 14 var track = video.addTextTrack("captions"); |
| 15 track.addCue(new VTTCue(0, 1, "cue 1")); |
| 16 track.addCue(new VTTCue(0, 3, "cue 2")); |
| 17 track.mode = "showing"; |
| 18 |
| 19 video.onloadeddata = function() { |
| 20 testRunner.displayAsyncThen(function() { |
| 21 // Seek past the end of the first cue. The second cue should not move. |
| 22 video.currentTime = 2; |
| 23 video.onseeked = function() { testRunner.notifyDone(); }; |
| 24 }); |
| 25 }; |
| 26 </script> |
OLD | NEW |