| 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>Rendering Modes</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; } |
|---|
| 12 | </style> |
|---|
| 13 | |
|---|
| 14 | </head> |
|---|
| 15 | <body> |
|---|
| 16 | |
|---|
| 17 | <h2>Rendering Modes</h2> |
|---|
| 18 | |
|---|
| 19 | <div id="player"></div> |
|---|
| 20 | <script type="text/javascript"> |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | function loadPlayer(html5first) { |
|---|
| 24 | var options = { |
|---|
| 25 | image: 'http://content.bitsontherun.com/thumbs/q1fx20VZ-720.jpg', |
|---|
| 26 | height: 324, |
|---|
| 27 | controlbar: 'bottom', |
|---|
| 28 | plugins: { |
|---|
| 29 | '../captions.js': { |
|---|
| 30 | file: 'assets/sintel-eng.txt', |
|---|
| 31 | back: true |
|---|
| 32 | } |
|---|
| 33 | }, |
|---|
| 34 | width: 640, |
|---|
| 35 | stretching: 'exactfit' |
|---|
| 36 | }; |
|---|
| 37 | var html5 = { |
|---|
| 38 | type: 'html5', |
|---|
| 39 | config: { levels: [ |
|---|
| 40 | { file: 'http://content.bitsontherun.com/videos/q1fx20VZ-52qL9xLP.mp4' }, |
|---|
| 41 | { file: 'http://content.bitsontherun.com/videos/q1fx20VZ-27m5HpIu.webm' } |
|---|
| 42 | ] } |
|---|
| 43 | } |
|---|
| 44 | var flash = { |
|---|
| 45 | type: 'flash', |
|---|
| 46 | src: 'assets/player.swf', |
|---|
| 47 | config: { file: 'http://content.bitsontherun.com/jwp/q1fx20VZ.xml' } |
|---|
| 48 | } |
|---|
| 49 | if(html5first) { |
|---|
| 50 | options.modes = [html5,flash]; |
|---|
| 51 | } else { |
|---|
| 52 | options.modes = [flash,html5]; |
|---|
| 53 | } |
|---|
| 54 | jwplayer("player").setup(options); |
|---|
| 55 | }; |
|---|
| 56 | </script> |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | <ul> |
|---|
| 60 | <li><a href="javascript:loadPlayer(true)">HTML5 first</a></li> |
|---|
| 61 | <li><a href="javascript:loadPlayer(false)">Flash first</a></li> |
|---|
| 62 | </ul> |
|---|
| 63 | |
|---|
| 64 | <p> |
|---|
| 65 | Check if the plugin works correctly in both rendering modes.<br/> |
|---|
| 66 | Check IE 7/8/9, Firefox/Safari/Chrome and the iPad.<br/> |
|---|
| 67 | Captions won't show on iPad fullscreen and Safari/HTML5 fullscreen. |
|---|
| 68 | </p> |
|---|
| 69 | <p> |
|---|
| 70 | Captions won't show on iPhone and Android/HTML5 at all.<br/> |
|---|
| 71 | Therefore, the dock button shouldn't display on those devices. |
|---|
| 72 | </p> |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | </body> |
|---|
| 76 | </html> |
|---|