| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <title>WebVTT rendering, cue should repaint after hiding a covering abspos box</
title> | 2 <title>WebVTT rendering, cue should repaint after hiding a covering abspos box</
title> |
| 3 <style> | 3 <style> |
| 4 #wrapper { | 4 #wrapper { |
| 5 position: relative; | 5 position: relative; |
| 6 } | 6 } |
| 7 #cover { | 7 #cover { |
| 8 position: absolute; | 8 position: absolute; |
| 9 left: 0px; | 9 left: 0px; |
| 10 top: 180px; | 10 top: 180px; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 <source src="media/white.webm" type="video/webm"> | 28 <source src="media/white.webm" type="video/webm"> |
| 29 <source src="media/white.mp4" type="video/mp4"> | 29 <source src="media/white.mp4" type="video/mp4"> |
| 30 </video> | 30 </video> |
| 31 <div id=cover></div> | 31 <div id=cover></div> |
| 32 </div> | 32 </div> |
| 33 <script> | 33 <script> |
| 34 var v = document.querySelector('video'); | 34 var v = document.querySelector('video'); |
| 35 var c = document.getElementById('cover'); | 35 var c = document.getElementById('cover'); |
| 36 var t = v.addTextTrack('subtitles'); | 36 var t = v.addTextTrack('subtitles'); |
| 37 t.mode = "showing"; | 37 t.mode = "showing"; |
| 38 t.addCue(new TextTrackCue(0, 100, 'PASS')); | 38 t.addCue(new VTTCue(0, 100, 'PASS')); |
| 39 v.onplaying = function() { | 39 v.onplaying = function() { |
| 40 setTimeout(function() { | 40 setTimeout(function() { |
| 41 v.pause(); | 41 v.pause(); |
| 42 setTimeout(function() { | 42 setTimeout(function() { |
| 43 c.style.visibility = 'hidden'; | 43 c.style.visibility = 'hidden'; |
| 44 setTimeout(takeScreenshot, 100); | 44 setTimeout(takeScreenshot, 100); |
| 45 }, 100); | 45 }, 100); |
| 46 }, 100); | 46 }, 100); |
| 47 }; | 47 }; |
| 48 v.play(); | 48 v.play(); |
| 49 </script> | 49 </script> |
| OLD | NEW |