| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| 5 | |
| 6 <script src=../media-file.js></script> | |
| 7 <script src=../video-test.js></script> | |
| 8 <script src=../media-controls.js></script> | |
| 9 | |
| 10 <script> | |
| 11 | |
| 12 function seeked() | |
| 13 { | |
| 14 consoleWrite("<br><i>** Test current cue colors<" + "/i>"); | |
| 15 | |
| 16 cueDisplayElement = textTrackDisplayElement(video, 'display'
, 0); | |
| 17 testExpected("getComputedStyle(cueDisplayElement).color", "r
gb(255, 255, 255)"); | |
| 18 | |
| 19 cueNode = textTrackDisplayElement(video, 'cue'); | |
| 20 testExpected("getComputedStyle(cueNode).backgroundColor", "r
gb(0, 0, 0)"); | |
| 21 | |
| 22 endTest(); | |
| 23 } | |
| 24 | |
| 25 function canplaythrough() | |
| 26 { | |
| 27 consoleWrite("<br><i>** Check initial in-band track states<"
+ "/i>"); | |
| 28 run("inbandTrack1 = video.textTracks[0]"); | |
| 29 testExpected("video.textTracks.length", 1); | |
| 30 testExpected("inbandTrack1.language", "en"); | |
| 31 testExpected("inbandTrack1.kind", "captions"); | |
| 32 inbandTrack1.mode = 'showing'; | |
| 33 run("video.play()"); | |
| 34 setTimeout(function() { video.pause(); video.currentTime = 0
.3; }, 1500); | |
| 35 } | |
| 36 | |
| 37 function loaded() | |
| 38 { | |
| 39 consoleWrite("Test that style to all cues is applied correctly."
); | |
| 40 findMediaElement(); | |
| 41 video.src = '../content/counting-captioned.mov'; | |
| 42 waitForEvent('seeked', seeked); | |
| 43 waitForEvent('canplaythrough', canplaythrough); | |
| 44 } | |
| 45 | |
| 46 </script> | |
| 47 </head> | |
| 48 <body onload="loaded()"> | |
| 49 <video controls > | |
| 50 </video> | |
| 51 </body> | |
| 52 </html> | |
| OLD | NEW |