| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 5 | 5 |
| 6 <script src=../media-file.js></script> | 6 <script src=../media-file.js></script> |
| 7 <script src=../video-test.js></script> | 7 <script src=../video-test.js></script> |
| 8 <script> | 8 <script> |
| 9 var videoCanPlayThrough = false; | 9 var videoCanPlayThrough = false; |
| 10 var trackLoaded = false; | 10 var trackLoaded = false; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 testExpected("testTrack.track.cues.getCueById(cueCount).text", c
urrentCue.text, "=="); | 41 testExpected("testTrack.track.cues.getCueById(cueCount).text", c
urrentCue.text, "=="); |
| 42 testExpected("currentCue.id", cueCount); | 42 testExpected("currentCue.id", cueCount); |
| 43 | 43 |
| 44 if (event.type == 'exit') { | 44 if (event.type == 'exit') { |
| 45 cueCount++; | 45 cueCount++; |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 | 48 |
| 49 waitForEvent('ended', endTest); | 49 waitForEvent('ended', endTest); |
| 50 | 50 |
| 51 waitForEvent('canplaythrough', function() { | 51 waitForEventOnce('canplaythrough', function() { |
| 52 video.currentTime = 5.00; | 52 video.currentTime = 5.00; |
| 53 videoCanPlayThrough = true; | 53 videoCanPlayThrough = true; |
| 54 | 54 |
| 55 runTests(); | 55 runTests(); |
| 56 }); | 56 }); |
| 57 | 57 |
| 58 function loaded() | 58 function loaded() |
| 59 { | 59 { |
| 60 trackLoaded = true; | 60 trackLoaded = true; |
| 61 | 61 |
| 62 runTests(); | 62 runTests(); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 function bodyLoaded() | 65 function bodyLoaded() |
| 66 { | 66 { |
| 67 findMediaElement(); | 67 findMediaElement(); |
| 68 video.src = findMediaFile("video", "../content/test"); | 68 video.src = findMediaFile("video", "../content/test"); |
| 69 } | 69 } |
| 70 </script> | 70 </script> |
| 71 </head> | 71 </head> |
| 72 <body onload="bodyLoaded()"> | 72 <body onload="bodyLoaded()"> |
| 73 <p>Tests that events are triggered for missed (skipped) cues during norm
al playback.</p> | 73 <p>Tests that events are triggered for missed (skipped) cues during norm
al playback.</p> |
| 74 <video controls> | 74 <video controls> |
| 75 <track id="testTrack" src="captions-webvtt/missed-cues.vtt" onload="
loaded()" default> | 75 <track id="testTrack" src="captions-webvtt/missed-cues.vtt" onload="
loaded()" default> |
| 76 </video> | 76 </video> |
| 77 </body> | 77 </body> |
| 78 </html> | 78 </html> |
| OLD | NEW |