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 src=../media-controls.js></script> | 8 <script src=../media-controls.js></script> |
9 | 9 |
10 <script> | 10 <script> |
11 | 11 |
12 var testTrackArabic; | 12 var testTrackArabic; |
13 var testTrackEnglish; | 13 var testTrackEnglish; |
14 var testCueDisplayBox; | 14 var testCueDisplayBox; |
15 | 15 |
16 function addTracks() | 16 function addTracks() |
17 { | 17 { |
18 consoleWrite(""); | 18 consoleWrite(""); |
19 | 19 |
20 consoleWrite("Add 'Arabic' text track with one cue"); | 20 consoleWrite("Add 'Arabic' text track with one cue"); |
21 testTrackArabic = video.addTextTrack('captions', 'Arabic', 'ar'); | 21 testTrackArabic = video.addTextTrack('captions', 'Arabic', 'ar'); |
22 testTrackArabic.addCue(new TextTrackCue(0.0, 10.0, 'Arabic')); | 22 testTrackArabic.addCue(new VTTCue(0.0, 10.0, 'Arabic')); |
23 | 23 |
24 consoleWrite("Add 'English' text track with one cue"); | 24 consoleWrite("Add 'English' text track with one cue"); |
25 testTrackEnglish = video.addTextTrack('captions', 'English', 'en'); | 25 testTrackEnglish = video.addTextTrack('captions', 'English', 'en'); |
26 testTrackEnglish.addCue(new TextTrackCue(0.0, 10.0, 'English')); | 26 testTrackEnglish.addCue(new VTTCue(0.0, 10.0, 'English')); |
27 | 27 |
28 consoleWrite(""); | 28 consoleWrite(""); |
29 consoleWrite("Set the mode of the 'Arabic' track to showing"); | 29 consoleWrite("Set the mode of the 'Arabic' track to showing"); |
30 testTrackArabic.mode = "showing"; | 30 testTrackArabic.mode = "showing"; |
31 | 31 |
32 consoleWrite("Set the mode of the 'English' track to hidden"); | 32 consoleWrite("Set the mode of the 'English' track to hidden"); |
33 testTrackEnglish.mode = "hidden"; | 33 testTrackEnglish.mode = "hidden"; |
34 } | 34 } |
35 | 35 |
36 function testCueActiveState() | 36 function testCueActiveState() |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 waitForEvent('canplaythrough', runTests); | 82 waitForEvent('canplaythrough', runTests); |
83 } | 83 } |
84 | 84 |
85 </script> | 85 </script> |
86 </head> | 86 </head> |
87 <body onload="loaded()"> | 87 <body onload="loaded()"> |
88 <video controls ></video> | 88 <video controls ></video> |
89 </body> | 89 </body> |
90 </html> | 90 </html> |
OLD | NEW |