| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | |
|---|
| 4 | <meta charset="UTF-8"> |
|---|
| 5 | <script type="text/javascript" src="assets/jwplayer.min.js"></script> |
|---|
| 6 | <title>Multiple Tracks</title> |
|---|
| 7 | <style> |
|---|
| 8 | body { padding: 50px; font: 13px/20px Arial; background: #EEE; } |
|---|
| 9 | form,p, ul { margin-top: 20px; } |
|---|
| 10 | #player { -webkit-box-shadow: 0 0 5px #999; background: #000; color:#FFF; } |
|---|
| 11 | </style> |
|---|
| 12 | |
|---|
| 13 | </head> |
|---|
| 14 | <body> |
|---|
| 15 | |
|---|
| 16 | <h2>Multiple Tracks</h2> |
|---|
| 17 | |
|---|
| 18 | <div id="player"></div> |
|---|
| 19 | <script type="text/javascript"> |
|---|
| 20 | function loadPlayer(options,captions) { |
|---|
| 21 | var defaults = { |
|---|
| 22 | controlbar: 'bottom', |
|---|
| 23 | flashplayer: 'assets/player.swf', |
|---|
| 24 | height: 300, |
|---|
| 25 | plugins: { |
|---|
| 26 | '../captions.swf': { |
|---|
| 27 | back: true |
|---|
| 28 | } |
|---|
| 29 | }, |
|---|
| 30 | stretching: 'fill', |
|---|
| 31 | width: 480 |
|---|
| 32 | }; |
|---|
| 33 | for(var param in options) { |
|---|
| 34 | defaults[param] = options[param]; |
|---|
| 35 | } |
|---|
| 36 | for(var param in captions) { |
|---|
| 37 | defaults.plugins['../captions.swf'][param] = captions[param]; |
|---|
| 38 | } |
|---|
| 39 | jwplayer("player").setup(defaults); |
|---|
| 40 | } |
|---|
| 41 | </script> |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | <ul> |
|---|
| 45 | <li><a href="javascript:loadPlayer({file:'http://content.bitsontherun.com/videos/w5VkaqJ1-393434.mp4',image:'http://content.bitsontherun.com/thumbs/w5VkaqJ1-480.jpg'},{})">6 embedded mp4 tracks</a></li> |
|---|
| 46 | <li><a href="javascript:loadPlayer({file:'http://content.bitsontherun.com/videos/q1fx20VZ-364765.mp4',image:'http://content.bitsontherun.com/thumbs/q1fx20VZ-480.jpg'},{files:'assets/sintel-fra.txt,assets/sintel-deu.txt,assets/sintel-pol.txt,assets/sintel-por.txt,assets/sintel-rus.txt,assets/sintel-spa.txt',labels:'Français,Deutsch,Polska,Português,РПÑÑОÑ,Español'})">6 external srt tracks</a></li> |
|---|
| 47 | <li><a href="javascript:loadPlayer({file:'CD1EWGQDUTQ',provider:'youtube'},{usubs:'TMB3orKgnFQy'})">18 Usubs tracks</a></li> |
|---|
| 48 | <li><a href="javascript:loadPlayer({file:'http://content.bitsontherun.com/jwp/a95zAVN1.xml'},{files:'assets/sintel-fra.txt,assets/sintel-deu.txt,assets/sintel-pol.txt,assets/sintel-por.txt,assets/sintel-rus.txt,assets/sintel-spa.txt'})">6 external srt tracks</a> (no labels)</li> |
|---|
| 49 | </ul> |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | <p>Check whether the text tracks are correctly shown and rendered.<br /> |
|---|
| 55 | Also check whether the selection menu is correctly rendered. |
|---|
| 56 | </p> |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | </body> |
|---|
| 60 | </html> |
|---|