| 1 | <!DOCTYPE html> |
|---|
| 2 | <html lang="en"> |
|---|
| 3 | <head> |
|---|
| 4 | |
|---|
| 5 | <meta charset="UTF-8"> |
|---|
| 6 | <script type="text/javascript" src="assets/jwplayer.min.js"></script> |
|---|
| 7 | <title>Captions Styling</title> |
|---|
| 8 | <style> |
|---|
| 9 | body { padding: 50px; font: 13px/20px Arial; background: #EEE; } |
|---|
| 10 | form,p, ul { margin-top: 20px; } |
|---|
| 11 | #player { -webkit-box-shadow: 0 0 5px #999; background: #000; color:#FFF; line-height:270px; text-align: center; } |
|---|
| 12 | </style> |
|---|
| 13 | |
|---|
| 14 | </head> |
|---|
| 15 | <body> |
|---|
| 16 | |
|---|
| 17 | <h2>Captions Styling</h2> |
|---|
| 18 | |
|---|
| 19 | <div id="player"></div> |
|---|
| 20 | <script type="text/javascript"> |
|---|
| 21 | function loadPlayer(options) { |
|---|
| 22 | jwplayer("player").setup({ |
|---|
| 23 | file: 'http://content.bitsontherun.com/videos/7OCSON1y.mp4', |
|---|
| 24 | height: 300, |
|---|
| 25 | plugins: { |
|---|
| 26 | '../captions.js': options |
|---|
| 27 | }, |
|---|
| 28 | flashplayer: 'assets/player.swf', |
|---|
| 29 | stretching: 'fill', |
|---|
| 30 | width: 600 |
|---|
| 31 | }); |
|---|
| 32 | } |
|---|
| 33 | </script> |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | <ul> |
|---|
| 37 | <li><a href="javascript:loadPlayer({color:'FFCC00',file:'assets/corrie.srt',fontFamily:'Georgia',fontSize:18,fontStyle:'italic',fontWeight:'bold',textDecoration:'underline'})">config styling</a> (srt)</li> |
|---|
| 38 | <li><a href="javascript:loadPlayer({color:'FFCC00',file:'assets/corrie.xml',fontFamily:'Georgia',fontSize:18,fontStyle:'italic',fontWeight:'bold',textDecoration:'underline'})">config styling</a> (dfxp)</li> |
|---|
| 39 | <li><a href="javascript:loadPlayer({file:'assets/corrie-styled.srt'})">srt styling</a></li> |
|---|
| 40 | <li><a href="javascript:loadPlayer({file:'assets/corrie-styled.xml'})">dfxp styling</a></li> |
|---|
| 41 | <li><a href="javascript:loadPlayer({file:'assets/corrie-speakers.xml',fontFamily:'Georgia',fontSize:18,fontStyle:'italic',fontWeight:'bold'})">config & dfxp styling</a></li> |
|---|
| 42 | </ul> |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | <p>Test whether the captions are correctly styled.<br/> |
|---|
| 46 | In the last example, each speaker should get a distinct captions color. |
|---|
| 47 | </p> |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | </body> |
|---|
| 51 | </html> |
|---|