| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|---|
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 3 | <head> |
|---|
| 4 | |
|---|
| 5 | <title>HTML controlbar</title> |
|---|
| 6 | <style type="text/css"> |
|---|
| 7 | body { background-color: #fff; padding: 20px; color:#000; font: 13px/18px Arial, sans-serif; } |
|---|
| 8 | a,h1 { color: #B00; } |
|---|
| 9 | h1,h3 { padding-top: 20px; } |
|---|
| 10 | ul { margin:15px 0 15px 16px; padding:0; list-style-type:square; } |
|---|
| 11 | pre { font-family: monospace; color: #B00; } |
|---|
| 12 | </style> |
|---|
| 13 | |
|---|
| 14 | <script type="text/javascript" src="lib/jquery.js"></script> |
|---|
| 15 | <script type="text/javascript" src="jquery.jwplayer.js"></script> |
|---|
| 16 | |
|---|
| 17 | </head> |
|---|
| 18 | <body> |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | <h3>HTML5 Player</h3> |
|---|
| 22 | |
|---|
| 23 | <h4>Test 1: $.document.ready embed</h4> |
|---|
| 24 | <video |
|---|
| 25 | height="270" |
|---|
| 26 | id="player1" |
|---|
| 27 | poster="http://developer.longtailvideo.com/player/trunk/html5/test/files/bunny.jpg" |
|---|
| 28 | width="480" |
|---|
| 29 | > |
|---|
| 30 | <source src='test/files/bunny.mp4''> |
|---|
| 31 | |
|---|
| 32 | </video> |
|---|
| 33 | |
|---|
| 34 | <script type="text/javascript"> |
|---|
| 35 | $('#player1').jwplayer({ |
|---|
| 36 | skin:'assets/five/five.xml', |
|---|
| 37 | repeat: 'list', |
|---|
| 38 | debug: 'CONSOLE' |
|---|
| 39 | }); |
|---|
| 40 | </script> |
|---|
| 41 | |
|---|
| 42 | <h4>Test 2: manual embed</h4> |
|---|
| 43 | <video |
|---|
| 44 | height="270" |
|---|
| 45 | id="player2" |
|---|
| 46 | poster="test/files/bunny.jpg" |
|---|
| 47 | src="test/files/bunny.mp4" |
|---|
| 48 | width="480" |
|---|
| 49 | > |
|---|
| 50 | </video> |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | <script type="text/javascript"> |
|---|
| 54 | $('#player2').jwplayer({ |
|---|
| 55 | skin:'assets/five/five.xml' |
|---|
| 56 | }); |
|---|
| 57 | </script> |
|---|
| 58 | <h4>Test 3: Theora</h4> |
|---|
| 59 | <video |
|---|
| 60 | id="player3" |
|---|
| 61 | class="jwplayer" |
|---|
| 62 | width="480" |
|---|
| 63 | height="270" |
|---|
| 64 | poster="test/files/bunny.jpg" |
|---|
| 65 | > |
|---|
| 66 | <source src='test/files/bunny.ogv' type='video/ogg; codecs="theora, vorbis"'> |
|---|
| 67 | </video> |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | <h4>Test 4: Using multiple sources</h4> |
|---|
| 71 | <video |
|---|
| 72 | id="player4" |
|---|
| 73 | class="jwplayer" |
|---|
| 74 | width="480" |
|---|
| 75 | height="270" |
|---|
| 76 | poster="test/files/bunny.jpg" |
|---|
| 77 | > |
|---|
| 78 | <source src='test/files/bunny.ogv' type='video/ogg; codecs="theora, vorbis"'> |
|---|
| 79 | <source src='test/files/bunny.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> |
|---|
| 80 | </video> |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | <h4>Test 5: Events</h4> |
|---|
| 84 | <video |
|---|
| 85 | id="player5" |
|---|
| 86 | class="jwplayer" |
|---|
| 87 | width="480" |
|---|
| 88 | height="270" |
|---|
| 89 | poster="test/files/bunny.jpg" |
|---|
| 90 | > |
|---|
| 91 | <source src='test/files/bunny.ogv' type='video/ogg; codecs="theora, vorbis"'> |
|---|
| 92 | <source src='test/files/bunny.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> |
|---|
| 93 | </video> |
|---|
| 94 | |
|---|
| 95 | <!--<a id="play">play</a> |
|---|
| 96 | <a id="pause">pause</a> |
|---|
| 97 | <a id="stop">stop</a> |
|---|
| 98 | <a id="mute">mute</a> |
|---|
| 99 | <a id="unmute">unmute</a> |
|---|
| 100 | <input type="text" id="seekposition" /> |
|---|
| 101 | <a id="seek">seek</a> |
|---|
| 102 | <input type="text" id="volumeposition" /> |
|---|
| 103 | <a id="volume">volume</a> |
|---|
| 104 | <input type="text" id="currenttime" /> |
|---|
| 105 | <input type="text" id="currentbuffer" /> |
|---|
| 106 | |
|---|
| 107 | <script type="text/javascript"> |
|---|
| 108 | $('#player5').jwplayer(); |
|---|
| 109 | |
|---|
| 110 | /*$.jwplayer('#player5').buffer(function(parameters, extra){ |
|---|
| 111 | $("#currentbuffer")[0].value = Math.round(extra.buffer*10)/10; |
|---|
| 112 | }); |
|---|
| 113 | |
|---|
| 114 | $.jwplayer('#player5').time(function(parameters, extra){ |
|---|
| 115 | $("#currenttime")[0].value = Math.round(extra.position*10)/10; |
|---|
| 116 | });*/ |
|---|
| 117 | |
|---|
| 118 | $("#play").click(function(){ |
|---|
| 119 | $.jwplayer('player5').play(); |
|---|
| 120 | }); |
|---|
| 121 | |
|---|
| 122 | $("#pause").click(function(){ |
|---|
| 123 | $.jwplayer('#player5').pause(); |
|---|
| 124 | }); |
|---|
| 125 | |
|---|
| 126 | $("#stop").click(function(){ |
|---|
| 127 | $.jwplayer('#player5').stop(); |
|---|
| 128 | }); |
|---|
| 129 | |
|---|
| 130 | $("#seek").click(function(){ |
|---|
| 131 | $.jwplayer('#player5').seek($("#seekposition")[0].value); |
|---|
| 132 | }); |
|---|
| 133 | |
|---|
| 134 | $("#volume").click(function(){ |
|---|
| 135 | $.jwplayer('#player5').volume($("#volumeposition")[0].value); |
|---|
| 136 | }); |
|---|
| 137 | |
|---|
| 138 | $("#mute").click(function(){ |
|---|
| 139 | $.jwplayer('#player5').mute(true); |
|---|
| 140 | }); |
|---|
| 141 | |
|---|
| 142 | $("#unmute").click(function(){ |
|---|
| 143 | $.jwplayer('#player5').mute(false); |
|---|
| 144 | }); |
|---|
| 145 | |
|---|
| 146 | |
|---|
| 147 | </script>--> |
|---|
| 148 | |
|---|
| 149 | </body> |
|---|
| 150 | </html> |
|---|