1<!DOCTYPE html>
2<html>
3<head>
4<meta charset="utf-8" />
5<!-- Website Design By: www.happyworm.com -->
6<title>jPlayer Development Tester</title>
7<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
8<link href="../../dist/skin/pink.flag/css/jplayer.pink.flag.min.css" rel="stylesheet" type="text/css" />
9<script type="text/javascript" src="../../lib/jquery.min.js"></script>
10<script type="text/javascript" src="../../dist/jplayer/jquery.jplayer.min.js"></script>
11<script type="text/javascript" src="../../dist/add-on/jquery.jplayer.inspector.min.js"></script>
12<script type="text/javascript">
13//<![CDATA[
14
15$(document).ready(function(){
16
17	$("#addHtmlFlash").click( function() {
18		$("#jquery_jplayer").jPlayer({
19			swfPath: "../../dist/jplayer",
20			supplied: "m4v, ogv, m4a, mp3, oga",
21			errorAlerts:true,
22			warningAlerts:true
23		});
24
25		$("#jplayer_inspector").jPlayerInspector( {
26			jPlayer: $("#jquery_jplayer"),
27			visible: true
28		});
29
30		return false;
31	});
32
33	$("#addFlashHtml").click( function() {
34		$("#jquery_jplayer").jPlayer({
35			swfPath: "../../dist/jplayer",
36			supplied: "m4v, ogv, m4a, mp3, oga",
37			solution: "flash, html",
38			errorAlerts:true,
39			warningAlerts:true
40		});
41
42		$("#jplayer_inspector").jPlayerInspector( {
43			jPlayer: $("#jquery_jplayer"),
44			visible: true
45		});
46
47		return false;
48	});
49
50	$("#addCurrentTest").click( function() {
51		$("#jquery_jplayer").jPlayer({
52			swfPath: "../../dist/jplayer",
53			// swfPath: "../../dist/jplayer/", // Check trailing slash
54			// swfPath: "../../dist/jplayer/broken", // Check broken swfPath errors.
55			// swfPath: "../../dist/jplayer/Jplayer.swf", // Check URLs work
56			// swfPath: "../../dist/jplayer/Jplayer.SWF", // Check URLs extension case insensative (Apache did not mind the extension's case not matching and worked too.)
57			// swfPath: "/", // Checks various
58			// supplied: "flv",
59			supplied: "flv,m4v,webmv",
60			// supplied: "m4v, ogv, m4a, mp3, oga",
61			// supplied: "ogv, m4v, oga, mp3, m4a",
62			// supplied: "m4v, ogv, mp3, oga",
63			// supplied: "oga, mp3",
64			// supplied: "m4v, ogv",
65			// supplied: "m4a, mp3, m4v",
66			// supplied: "m4v, mp3",
67			// supplied: "mp3, m4v",
68			// supplied: "m4v",
69			// supplied: "rtmpv",
70
71			// solution: "flash, html",
72			// solution: "", // To test no solution error event info.
73/*
74			ready: function() {
75				alert("Ready!");
76			},
77
78			cssSelector: {
79				duration: "" // To test destroy() bug fix on empty selectors
80			},
81
82			timeupdate: function(event) {
83				if(event.jPlayer.status.currentTime > 15) {
84					$(this).jPlayer("pause", 20);
85				}
86			},
87
88			click: function(event) {
89				// alert("click: paused = " + event.jPlayer.status.paused);
90				if(event.jPlayer.status.paused) {
91					$(this).jPlayer("play");
92				} else {
93					$(this).jPlayer("pause");
94				}
95			},
96
97			flashreset: function() {
98				alert("flashreset");
99			},
100*/
101
102			keyEnabled: true,
103			audioFullScreen: true,
104/*
105			keyBindings: {
106				play: null
107			},
108			keyBindings: {
109				play: {
110					key: 32,
111					fn: function(f) {
112						alert("This jPlayer instance is " + (f.status.paused ? "paused" : "playing"));
113					}
114				}
115			},
116*/
117
118
119			// preload: "auto",
120			// preload: "metadata",
121			// volume: 0.2,
122			errorAlerts:true,
123			warningAlerts:true
124		});
125
126		$("#jplayer_inspector").jPlayerInspector( {
127			jPlayer: $("#jquery_jplayer"),
128			visible: true
129		});
130
131		return false;
132	});
133
134	$("#jPlayerDestroy").click( function() {
135		$("#jplayer_inspector").jPlayerInspector("destroy"); // Destroy the inspector 1st.
136		$("#jquery_jplayer").jPlayer("destroy");
137		return false;
138	});
139
140
141	// The static player at the bottom
142	$("#jquery_jplayer_2").jPlayer({
143		ready: function (event) {
144			$(this).jPlayer("setMedia", {
145				m4a: "http://www.jplayer.org/audio/m4a/Miaow-07-Bubble.m4a",
146				oga: "http://www.jplayer.org/audio/ogg/Miaow-07-Bubble.ogg"
147			});
148		},
149		play: function() {
150			// $(this).jPlayer("pauseOthers");
151		},
152		swfPath: "../../dist/jplayer",
153		supplied: "m4a, oga",
154		cssSelectorAncestor: "#jp_container_2",
155		useStateClassSkin: true,
156		autoBlur: false
157	});
158
159	$("#breakCssPlay").click(function() {
160			$("#jquery_jplayer").jPlayer("option", "cssSelector.play", ".X-Broken-X"); // Triggered warning
161			// $("#jquery_jplayer").jPlayer("option", "cssSelector", {play:".X-Broken-X"});
162			return false;
163	});
164	$("#emptyCssPlay").click(function() {
165			$("#jquery_jplayer").jPlayer("option", "cssSelector.play", "");
166			// $("#jquery_jplayer").jPlayer("option", "cssSelector", {play:""});
167			return false;
168	});
169	$("#fixCssPlay").click(function() {
170			$("#jquery_jplayer").jPlayer("option", "cssSelector.play", ".jp-play");
171			// $("#jquery_jplayer").jPlayer("option", "cssSelector", {play:".jp-play"});
172			return false;
173	});
174
175	$("#breakCssAncestor").click(function() {
176			$("#jquery_jplayer").jPlayer("option", "cssSelectorAncestor", "#X-Broken-X"); // Triggers many warnings
177			return false;
178	});
179	$("#emptyCssAncestor").click(function() {
180			$("#jquery_jplayer").jPlayer("option", "cssSelectorAncestor", ""); // Still works via class selectors. NB: Would affect multiple instances though. Well, it depends.
181			return false;
182	});
183	$("#fixCssAncestor").click(function() {
184			$("#jquery_jplayer").jPlayer("option", "cssSelectorAncestor", "#jp_container_1");
185			return false;
186	});
187
188	$("#addEndedRepeat").click(function() {
189		$("#jquery_jplayer").bind($.jPlayer.event.ended + ".repeat", function(event) {
190			$(this).jPlayer("play");
191		});
192		return false;
193	});
194	$("#addEndedAlert").click(function() {
195		$("#jquery_jplayer").bind($.jPlayer.event.ended + ".alert", function(event) {
196			alert("jPlayer_ended");
197		});
198		return false;
199	});
200	$("#removeAlert").click(function() {
201		$("#jquery_jplayer").unbind(".alert");
202		return false;
203	});
204	$("#removeRepeat").click(function() {
205		$("#jquery_jplayer").unbind(".repeat");
206		return false;
207	});
208
209	$("#setMedia_broken").click(function() {
210		$("#jquery_jplayer").jPlayer("setMedia", {
211			mp3: "banana.mp3",
212			m4a: "banana.m4a",
213			oga: "banana.oga",
214			m4v: "banana.m4v",
215			ogv: "banana.ogv",
216			poster: "http://www.jplayer.org/audio/poster/Miaow_132x132.jpg" // Valid link helps see behaviour
217		});
218		$("#jp_container_1 .jp-title ul").html("<li>Bubble - MP3</li>");
219		return false;
220	});
221
222	$("#setMedia_empty").click(function() {
223		$("#jquery_jplayer").jPlayer("setMedia", {
224			mp3: "",
225			m4a: "",
226			oga: "",
227			m4v: "",
228			ogv: ""
229		});
230		$("#jp_container_1 .jp-title ul").html("<li>Bubble - MP3</li>");
231		return false;
232	});
233
234	$("#setMedia_wrong").click(function() {
235		$("#jquery_jplayer").jPlayer("setMedia", {
236			mp3: 1,
237			m4a: true,
238			oga: function() { return "banana.oga"; },
239			m4v: {url: "banana.m4v"},
240			ogv: false
241		});
242		$("#jp_container_1 .jp-title ul").html("<li>Bubble - MP3</li>");
243		return false;
244	});
245
246	$("#setAudio_a1").click(function() {
247		$("#jquery_jplayer").jPlayer("setMedia", {
248			mp3: "http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3"
249		});
250		$("#jp_container_1 .jp-title ul").html("<li>Bubble - MP3</li>");
251		return false;
252	});
253	$("#setAudio_b1").click(function() {
254		$("#jquery_jplayer").jPlayer("setMedia", {
255			mp3: "http://www.jplayer.org/audio/mp3/Miaow-04-Lismore.mp3"
256		});
257		$("#jp_container_1 .jp-title ul").html("<li>Lismore - MP3</li>");
258		return false;
259	});
260
261	$("#setAudio_a2").click(function() {
262		$("#jquery_jplayer").jPlayer("setMedia", {
263			mp3: "http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3",
264			oga: "http://www.jplayer.org/audio/ogg/Miaow-07-Bubble.ogg"
265		});
266		$("#jp_container_1 .jp-title ul").html("<li>Bubble - MP3 + OGG</li>");
267		return false;
268	});
269	$("#setAudio_b2").click(function() {
270		$("#jquery_jplayer").jPlayer("setMedia", {
271			mp3: "http://www.jplayer.org/audio/mp3/Miaow-04-Lismore.mp3",
272			oga: "http://www.jplayer.org/audio/ogg/Miaow-04-Lismore.ogg"
273		});
274		$("#jp_container_1 .jp-title ul").html("<li>Lismore - MP3 + OGG</li>");
275		return false;
276	});
277
278	$("#setAudio_a3").click(function() {
279		$("#jquery_jplayer").jPlayer("setMedia", {
280			mp3: "http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3",
281			oga: "http://www.jplayer.org/audio/ogg/Miaow-07-Bubble.ogg",
282			m4a: "http://www.jplayer.org/audio/m4a/Miaow-07-Bubble.m4a"
283		});
284		$("#jp_container_1 .jp-title ul").html("<li>Bubble - MP3 + OGG + M4A</li>");
285		return false;
286	});
287	$("#setAudio_b3").click(function() {
288		$("#jquery_jplayer").jPlayer("setMedia", {
289			mp3: "http://www.jplayer.org/audio/mp3/Miaow-04-Lismore.mp3",
290			oga: "http://www.jplayer.org/audio/ogg/Miaow-04-Lismore.ogg",
291			m4a: "http://www.jplayer.org/audio/m4a/Miaow-04-Lismore.m4a"
292		});
293		$("#jp_container_1 .jp-title ul").html("<li>Lismore - MP3 + OGG + M4A</li>");
294		return false;
295	});
296
297	$("#setAudio_a4").click(function() {
298		$("#jquery_jplayer").jPlayer("setMedia", {
299			mp3: "http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3",
300			poster: "http://www.jplayer.org/audio/poster/Miaow_132x132.jpg"
301		});
302		$("#jp_container_1 .jp-title ul").html("<li>Bubble - MP3 - Poster</li>");
303		return false;
304	});
305	$("#setAudio_b4").click(function() {
306		$("#jquery_jplayer").jPlayer("setMedia", {
307			mp3: "http://www.jplayer.org/audio/mp3/Miaow-04-Lismore.mp3",
308			poster: "http://www.jplayer.org/audio/poster/Miaow_132x132.jpg"
309		});
310		$("#jp_container_1 .jp-title ul").html("<li>Lismore - MP3 - Poster</li>");
311		return false;
312	});
313
314	$("#setAudio_a5").click(function() {
315		$("#jquery_jplayer").jPlayer("setMedia", {
316			mp3: "http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3",
317			oga: "http://www.jplayer.org/audio/ogg/Miaow-07-Bubble.ogg",
318			poster: "http://www.jplayer.org/audio/poster/Miaow_132x132.jpg"
319		});
320		$("#jp_container_1 .jp-title ul").html("<li>Bubble - MP3 + OGG - Poster</li>");
321		return false;
322	});
323	$("#setAudio_b5").click(function() {
324		$("#jquery_jplayer").jPlayer("setMedia", {
325			mp3: "http://www.jplayer.org/audio/mp3/Miaow-04-Lismore.mp3",
326			oga: "http://www.jplayer.org/audio/ogg/Miaow-04-Lismore.ogg",
327			poster: "http://www.jplayer.org/audio/poster/Miaow_132x132.jpg"
328		});
329		$("#jp_container_1 .jp-title ul").html("<li>Lismore - MP3 + OGG - Poster</li>");
330		return false;
331	});
332
333	$("#setAudio_a6").click(function() {
334		$("#jquery_jplayer").jPlayer("setMedia", {
335			mp3: "http://www.jplayer.org/audio/mp3/Miaow-07-Bubble.mp3",
336			oga: "http://www.jplayer.org/audio/ogg/Miaow-07-Bubble.ogg",
337			m4a: "http://www.jplayer.org/audio/m4a/Miaow-07-Bubble.m4a",
338			poster: "http://www.jplayer.org/audio/poster/Miaow_132x132.jpg"
339		});
340		$("#jp_container_1 .jp-title ul").html("<li>Bubble - MP3 + OGG + M4A - Poster</li>");
341		return false;
342	});
343	$("#setAudio_b6").click(function() {
344		$("#jquery_jplayer").jPlayer("setMedia", {
345			mp3: "http://www.jplayer.org/audio/mp3/Miaow-04-Lismore.mp3",
346			oga: "http://www.jplayer.org/audio/ogg/Miaow-04-Lismore.ogg",
347			m4a: "http://www.jplayer.org/audio/m4a/Miaow-04-Lismore.m4a",
348			poster: "http://www.jplayer.org/audio/poster/Miaow_132x132.jpg"
349		});
350		$("#jp_container_1 .jp-title ul").html("<li>Lismore - MP3 + OGG + M4A - Poster</li>");
351		return false;
352	});
353
354	$("#setVideo_a1").click(function() {
355		$("#jquery_jplayer").jPlayer("setMedia", {
356			m4v: "http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v"
357		});
358		$("#jp_container_1 .jp-title ul").html("<li>Big Buck Bunny Trailer - M4V</li>");
359		return false;
360	});
361	$("#setVideo_b1").click(function() {
362		$("#jquery_jplayer").jPlayer("setMedia", {
363			m4v: "http://www.jplayer.org/video/m4v/Finding_Nemo_Teaser.m4v"
364		});
365		$("#jp_container_1 .jp-title ul").html("<li>Finding Nemo Teaser - M4V</li>");
366		return false;
367	});
368	$("#setVideo_c1").click(function() {
369		$("#jquery_jplayer").jPlayer("setMedia", {
370			m4v: "http://www.jplayer.org/video/m4v/Incredibles_Teaser.m4v"
371		});
372		$("#jp_container_1 .jp-title ul").html("<li>Incredibles Teaser - M4V</li>");
373		return false;
374	});
375
376	$("#setVideo_a2").click(function() {
377		$("#jquery_jplayer").jPlayer("setMedia", {
378			m4v: "http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v",
379			ogv: "http://www.jplayer.org/video/ogv/Big_Buck_Bunny_Trailer.ogv"
380		});
381		$("#jp_container_1 .jp-title ul").html("<li>Big Buck Bunny Trailer - M4V + OGV</li>");
382		return false;
383	});
384	$("#setVideo_b2").click(function() {
385		$("#jquery_jplayer").jPlayer("setMedia", {
386			m4v: "http://www.jplayer.org/video/m4v/Finding_Nemo_Teaser.m4v",
387			ogv: "http://www.jplayer.org/video/ogv/Finding_Nemo_Teaser.ogv"
388		});
389		$("#jp_container_1 .jp-title ul").html("<li>Finding Nemo Teaser - M4V + OGV</li>");
390		return false;
391	});
392	$("#setVideo_c2").click(function() {
393		$("#jquery_jplayer").jPlayer("setMedia", {
394			m4v: "http://www.jplayer.org/video/m4v/Incredibles_Teaser.m4v",
395			ogv: "http://www.jplayer.org/video/ogv/Incredibles_Teaser.ogv"
396		});
397		$("#jp_container_1 .jp-title ul").html("<li>Incredibles Teaser - M4V + OGV</li>");
398		return false;
399	});
400
401	$("#setVideo_a3").click(function() {
402		$("#jquery_jplayer").jPlayer("setMedia", {
403			m4v: "http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v",
404			poster: "http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"
405		});
406		$("#jp_container_1 .jp-title ul").html("<li>Big Buck Bunny Trailer - M4V - Poster</li>");
407		return false;
408	});
409	$("#setVideo_b3").click(function() {
410		$("#jquery_jplayer").jPlayer("setMedia", {
411			m4v: "http://www.jplayer.org/video/m4v/Finding_Nemo_Teaser.m4v",
412			poster: "http://www.jplayer.org/video/poster/Finding_Nemo_Teaser_640x352.png"
413		});
414		$("#jp_container_1 .jp-title ul").html("<li>Finding Nemo Teaser - M4V - Poster</li>");
415		return false;
416	});
417	$("#setVideo_c3").click(function() {
418		$("#jquery_jplayer").jPlayer("setMedia", {
419			m4v: "http://www.jplayer.org/video/m4v/Incredibles_Teaser.m4v",
420			poster: "http://www.jplayer.org/video/poster/Incredibles_Teaser_640x272.png"
421		});
422		$("#jp_container_1 .jp-title ul").html("<li>Incredibles Teaser - M4V - Poster</li>");
423		return false;
424	});
425
426	$("#setVideo_a4").click(function() {
427		$("#jquery_jplayer").jPlayer("setMedia", {
428			m4v: "http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v",
429			ogv: "http://www.jplayer.org/video/ogv/Big_Buck_Bunny_Trailer.ogv",
430			poster: "http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"
431		});
432		$("#jp_container_1 .jp-title ul").html("<li>Big Buck Bunny Trailer - M4V + OGV - Poster</li>");
433		return false;
434	});
435	$("#setVideo_b4").click(function() {
436		$("#jquery_jplayer").jPlayer("setMedia", {
437			m4v: "http://www.jplayer.org/video/m4v/Finding_Nemo_Teaser.m4v",
438			ogv: "http://www.jplayer.org/video/ogv/Finding_Nemo_Teaser.ogv",
439			poster: "http://www.jplayer.org/video/poster/Finding_Nemo_Teaser_640x352.png"
440		});
441		$("#jp_container_1 .jp-title ul").html("<li>Finding Nemo Teaser - M4V + OGV - Poster</li>");
442		return false;
443	});
444	$("#setVideo_c4").click(function() {
445		$("#jquery_jplayer").jPlayer("setMedia", {
446			m4v: "http://www.jplayer.org/video/m4v/Incredibles_Teaser.m4v",
447			ogv: "http://www.jplayer.org/video/ogv/Incredibles_Teaser.ogv",
448			poster: "http://www.jplayer.org/video/poster/Incredibles_Teaser_640x272.png"
449		});
450		$("#jp_container_1 .jp-title ul").html("<li>Incredibles Teaser - M4V + OGV - Poster</li>");
451		return false;
452	});
453
454	// http://www.youtube.com/watch?v=22nBBiDprRA
455
456
457	$("#setRtmp_a1").click(function() {
458		$("#jquery_jplayer").jPlayer("setMedia", {
459			rtmpv: "rtmp://cp67126.edgefcs.net/ondemand/mp4:mediapm/ovp/content/test/video/spacealonehd_sounas_640_300.mp4",
460			poster: "http://www.jplayer.org/video/poster/space_alone.jpg"
461		});
462		$("#jp_container_1 .jp-title ul").html("<li>Enable RTMP Player</li>");
463		return false;
464	});
465
466
467	$("#setFlash_a1").click(function() {
468		$("#jquery_jplayer").jPlayer("setMedia", {
469			flv: "http://v1.lscache7.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor&algorithm=throttle-factor&itag=34&ipbits=8&burst=40&sver=3&signature=C1475B31591C54E246AC7EA41B113F6762C2211E.67833A7B6B40087B1B1F6DBE501905EE7D5BC8C4&expire=1306540800&key=yt1&ip=86.0.0.0&factor=1.25&id=db69c10620e9ad10"
470		});
471		$("#jp_container_1 .jp-title ul").html("<li>Enable YouTube HTML5 video player - FLV</li>");
472		return false;
473	});
474	$("#setFlash_a2").click(function() {
475		$("#jquery_jplayer").jPlayer("setMedia", {
476			flv: "http://v1.lscache7.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor&algorithm=throttle-factor&itag=34&ipbits=8&burst=40&sver=3&signature=C1475B31591C54E246AC7EA41B113F6762C2211E.67833A7B6B40087B1B1F6DBE501905EE7D5BC8C4&expire=1306540800&key=yt1&ip=86.0.0.0&factor=1.25&id=db69c10620e9ad10",
477			webmv: "http://v13.lscache7.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPS1VPTl9FSkNOOV9NSVJJ&fexp=903103%2C912502&itag=43&ipbits=0&signature=8E22AC37F5A4AD8D415AE94D6B1BA7643803FF4B.271224C8B05A70F40A44D9AF99FBCAF2C6E9A974&sver=3&ratebypass=yes&expire=1306540800&key=yt1&ip=0.0.0.0&id=db69c10620e9ad10",
478			m4v: "http://v10.lscache7.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPS1VPTl9FSkNOOV9NSVJJ&itag=18&ipbits=0&signature=555786A0A318BCF098D4341D546874A79D160DA1.C99270087B569832A8F935ECCEA1D8430AB125DF&sver=3&ratebypass=yes&expire=1306540800&key=yt1&ip=0.0.0.0&id=db69c10620e9ad10"
479		});
480		$("#jp_container_1 .jp-title ul").html("<li>Enable YouTube HTML5 video player - FLV + WEMBV + M4V</li>");
481		return false;
482	});
483
484
485	$("#clearMedia").click(function() {
486			$("#jquery_jplayer").jPlayer("clearMedia");
487			return false;
488	});
489
490	$("#load").click(function() {
491			$("#jquery_jplayer").jPlayer("load");
492			return false;
493	});
494
495	$("#pause").click(function() {
496			$("#jquery_jplayer").jPlayer("pause");
497			// $("#jquery_jplayer").data("jPlayer").pause(); // This works too!
498			return false;
499	});
500
501	$("#globalPause").click(function() {
502			$.jPlayer.pause();
503			return false;
504	});
505
506	$("#stop").click(function() {
507			$("#jquery_jplayer").jPlayer("stop");
508			return false;
509	});
510
511	$("#mute").click(function() {
512			$("#jquery_jplayer").jPlayer("mute");
513			return false;
514	});
515
516	$("#unmute").click(function() {
517			$("#jquery_jplayer").jPlayer("unmute");
518			return false;
519	});
520
521	$("#volume_a").click(function() {
522			$("#jquery_jplayer").jPlayer("volume", 0.5);
523			return false;
524	});
525
526	$("#play_a").click(function() {
527			$("#jquery_jplayer").jPlayer("play");
528			return false;
529	});
530	$("#play_b").click(function() {
531			$("#jquery_jplayer").jPlayer("play", 0);
532			return false;
533	});
534	$("#play_c").click(function() {
535			$("#jquery_jplayer").jPlayer("play", 15);
536			return false;
537	});
538	$("#play_d").click(function() {
539			$("#jquery_jplayer").jPlayer("play", 30);
540			// $("#jquery_jplayer").jPlayer("play", 30).jPlayer("pause"); // MJP: Test, the pause immediate after play
541			return false;
542	});
543	$("#play_e").click(function() {
544			$("#jquery_jplayer").jPlayer("play", 1e9);
545			return false;
546	});
547
548	$("#pause_a").click(function() {
549			$("#jquery_jplayer").jPlayer("pause");
550			return false;
551	});
552	$("#pause_b").click(function() {
553			$("#jquery_jplayer").jPlayer("pause", 0);
554			return false;
555	});
556	$("#pause_c").click(function() {
557			$("#jquery_jplayer").jPlayer("pause", 15);
558			return false;
559	});
560	$("#pause_d").click(function() {
561			$("#jquery_jplayer").jPlayer("pause", 30);
562			// $("#jquery_jplayer").jPlayer("pause", 30).jPlayer("play"); // MJP: Test, the play immediate after pause
563			return false;
564	});
565	$("#pause_e").click(function() {
566			$("#jquery_jplayer").jPlayer("pause", 1e9);
567			return false;
568	});
569
570	$("#playHead_a").click(function() {
571			$("#jquery_jplayer").jPlayer("playHead", 0);
572			return false;
573	});
574	$("#playHead_b").click(function() {
575			$("#jquery_jplayer").jPlayer("playHead", 50);
576			return false;
577	});
578	$("#playHead_c").click(function() {
579			$("#jquery_jplayer").jPlayer("playHead", 99.9);
580			return false;
581	});
582	$("#playHead_d").click(function() {
583			$("#jquery_jplayer").jPlayer("playHead", 100);
584			return false;
585	});
586	$("#playHead_e").click(function() {
587			$("#jquery_jplayer").jPlayer("playHead", 101);
588			return false;
589	});
590
591	$("#option_size_270p").click(function() {
592		$("#jquery_jplayer").jPlayer("option", "size", {
593			width: "480px",
594			height: "270px",
595			cssClass: "jp-video-270p"
596		});
597		return false;
598	});
599	$("#option_size_360p").click(function() {
600		$("#jquery_jplayer").jPlayer("option", "size", {
601			width: "640px",
602			height: "360px",
603			cssClass: "jp-video-360p"
604		});
605		return false;
606	});
607
608	$("#option_sizeFull_270p").click(function() {
609		$("#jquery_jplayer").jPlayer("option", "sizeFull", {
610			width: "480px",
611			height: "270px",
612			cssClass: "jp-video-270p"
613		});
614		return false;
615	});
616	$("#option_sizeFull_360p").click(function() {
617		$("#jquery_jplayer").jPlayer("option", "sizeFull", {
618			width: "640px",
619			height: "360px",
620			cssClass: "jp-video-360p"
621		});
622		return false;
623	});
624	$("#option_sizeFull_full").click(function() {
625		$("#jquery_jplayer").jPlayer("option", "sizeFull", {
626			width: "100%",
627			height: "90%",
628			cssClass: "jp-video-full"
629		});
630		return false;
631	});
632
633	$("#option_fullScreen_true").click(function() {
634		$("#jquery_jplayer").jPlayer("option", "fullScreen", true);
635		return false;
636	});
637	$("#option_fullScreen_false").click(function() {
638		$("#jquery_jplayer").jPlayer("option", "fullScreen", false);
639		return false;
640	});
641
642	$("#fullScreen").click(function() {
643		$("#jquery_jplayer").jPlayer("fullScreen");
644		return false;
645	});
646	$("#restoreScreen").click(function() {
647		$("#jquery_jplayer").jPlayer("restoreScreen");
648		return false;
649	});
650
651	$("#option_autohide_neither").click(function() {
652		$("#jquery_jplayer").jPlayer("option", "autohide", {
653			restored: false,
654			full: false
655		});
656		return false;
657	});
658	$("#option_autohide_full").click(function() {
659		$("#jquery_jplayer").jPlayer("option", "autohide", {
660			restored: false,
661			full: true
662		});
663		return false;
664	});
665	$("#option_autohide_restored").click(function() {
666		$("#jquery_jplayer").jPlayer("option", "autohide", {
667			restored: true,
668			full: false
669		});
670		return false;
671	});
672	$("#option_autohide_both").click(function() {
673		$("#jquery_jplayer").jPlayer("option", "autohide", {
674			restored: true,
675			full: true
676		});
677		return false;
678	});
679
680	$("#option_autohide_slow").click(function() {
681		$("#jquery_jplayer").jPlayer("option", "autohide", {
682			fadeIn: 2000,
683			fadeOut: 2000,
684			hold: 4000
685		});
686		return false;
687	});
688	$("#option_autohide_fast").click(function() {
689		$("#jquery_jplayer").jPlayer("option", "autohide", {
690			fadeIn: 200,
691			fadeOut: 200,
692			hold: 1000
693		});
694		return false;
695	});
696	$("#option_autohide_instant").click(function() {
697		$("#jquery_jplayer").jPlayer("option", "autohide", {
698			fadeIn: 0,
699			fadeOut: 0,
700			hold: 1000
701		});
702		return false;
703	});
704
705	$("#option_loop_true").click(function() {
706		$("#jquery_jplayer").jPlayer("option", "loop", true);
707		return false;
708	});
709	$("#option_loop_false").click(function() {
710		$("#jquery_jplayer").jPlayer("option", "loop", false);
711		return false;
712	});
713
714	var nativeVideoControlsNone = {};
715	$.each($.jPlayer.prototype.options.nativeVideoControls, function(prop, value) {
716		nativeVideoControlsNone[prop] = false;
717	});
718	nativeVideoControlsNone.all = false;
719
720	$("#option_nativeVideoControls_all").click(function() {
721		$("#jquery_jplayer").jPlayer("option", "nativeVideoControls", {
722			all: /./
723		});
724		return false;
725	});
726
727	$("#option_nativeVideoControls_none").click(function() {
728		$("#jquery_jplayer").jPlayer("option", "nativeVideoControls", nativeVideoControlsNone);
729		return false;
730	});
731
732	var noFullWindowNone = {};
733	$.each($.jPlayer.prototype.options.noFullWindow, function(prop, value) {
734		noFullWindowNone[prop] = false;
735	});
736	noFullWindowNone.all = false;
737
738	$("#option_noFullWindow_all").click(function() {
739		$("#jquery_jplayer").jPlayer("option", "noFullWindow", {
740			all: /./
741		});
742		return false;
743	});
744
745	$("#option_noFullWindow_none").click(function() {
746		$("#jquery_jplayer").jPlayer("option", "noFullWindow", noFullWindowNone);
747		return false;
748	});
749
750	var noVolumeNone = {};
751	$.each($.jPlayer.prototype.options.noVolume, function(prop, value) {
752		noVolumeNone[prop] = false;
753	});
754	noVolumeNone.all = false;
755
756	$("#option_noVolume_all").click(function() {
757		$("#jquery_jplayer").jPlayer("option", "noVolume", {
758			all: /./
759		});
760		return false;
761	});
762
763	$("#option_noVolume_none").click(function() {
764		$("#jquery_jplayer").jPlayer("option", "noVolume", noVolumeNone);
765		return false;
766	});
767
768	// Key bindings tests
769
770	$("#option_keyEnabled_true").click(function() {
771		$("#jquery_jplayer").jPlayer("option", "keyEnabled", true);
772		return false;
773	});
774	$("#option_keyEnabled_false").click(function() {
775		$("#jquery_jplayer").jPlayer("option", "keyEnabled", false);
776		return false;
777	});
778
779	$("#option_keyBindings_default").click(function() {
780		// NB: Could still have properties added that are not in default prototype object.
781		$("#jquery_jplayer").jPlayer("option", "keyBindings", $.jPlayer.prototype.options.keyBindings);
782		return false;
783	});
784	$("#option_keyBindings_alert").click(function() {
785		$("#jquery_jplayer").jPlayer("option", "keyBindings", {
786			play: {
787				key: 32,
788				fn: function(f) {
789					alert("This jPlayer instance is " + (f.status.paused ? "paused" : "playing"));
790				}
791			}
792		});
793		return false;
794	});
795	$("#option_keyBindings_disable").click(function() {
796		$("#jquery_jplayer").jPlayer("option", "keyBindings", {
797			play: null
798		});
799		return false;
800	});
801
802
803/*
804	$("#jp_container_1").hover(
805		function(e) {
806			$("#test").css("background-color","#ff0000");
807		},
808		function(e) {
809			$("#test").css("background-color","#00ff00");
810	});
811	$("#jp_container_1").mousemove(function(e) {
812		var offset = $(this).offset();
813		var x = e.pageX - offset.left;
814		var y = e.pageY - offset.top;
815		$("#test").text("x: " + x + " | y = " + y);
816	});
817	$("#jp_container_1").click(function(e) {
818		$("#option_fullScreen_false").click();
819		return false;
820	});
821*/
822
823	$("#test_flv_as_m4v").click(function() {
824		$("#jquery_jplayer").jPlayer("setMedia", {
825			// m4v: "/jquery/video/flv/epic-fail.flv"
826			m4v: "http://v12.lscache3.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor&fexp=901026%2C907302&algorithm=throttle-factor&itag=34&ipbits=8&burst=40&sver=3&signature=4DFBE547740D10CB935D286FB563B70F56F32AE2.1858751FC1790AA171B05DE6F8A4C6A3FABCB2BA&expire=1298419200&key=yt1&ip=86.0.0.0&factor=1.25&id=ddd5920c28e56a87"
827		});
828		return false;
829	});
830
831	$("#show-jplayer").click(function() {
832		$("#jp_container_1").show();
833	});
834	$("#hide-jplayer").click(function() {
835		$("#jp_container_1").hide();
836	});
837
838/*
839	var dom = document.getElementById("jquery_jplayer_1");
840
841	if(dom.addEventListener) {
842		$.each($.jPlayer.event, function(name, type) {
843			dom.addEventListener(name, function() {
844				console.log("DOM: " + name + " | duration = " + this.duration + " | currentTime = " + this.currentTime);
845			}, false);
846		});
847	}
848*/
849
850});
851
852//]]>
853</script>
854</head>
855<body>
856			<h2>jPlayer's Development Tester</h2>
857			<p>Screen size is set through CSS to: 270p {width:"480px"; height:"270px";}</p>
858
859			<a id="test_flv_as_m4v" href="javascript:void(0)">FLV Test from youtube</a>
860
861			<p>
862			Use a constructor option below to instance jPlayer.
863			<br />Otherwise the commands and artwork interface do nothing.
864			<br /><code>jPlayer( {<a href="javascript:void(0)" id="addHtmlFlash">solution:"html, flash"</a>} | {<a href="javascript:void(0)" id="addFlashHtml">solution:"flash, html"</a>} | <a href="javascript:void(0)" id="addCurrentTest">currentTest</a> )</code>
865			<br />Use <a href="javascript:void(0)" id="jPlayerDestroy">jPlayer("destroy")</a> to destroy the jPlayer instance before changing the instance above. Otherwise they try and change the options, which do not support such an action.
866
867			<hr />
868			<code>jPlayer("option", "cssSelector", <a href="javascript:void(0)" id="breakCssPlay">"play", "broken"</a> | <a href="javascript:void(0)" id="emptyCssPlay">"play", ""</a> | <a href="javascript:void(0)" id="fixCssPlay">"play", "fixed"</a>)</code>
869			<br /><code>jPlayer("option", "cssSelectorAncestor", <a href="javascript:void(0)" id="breakCssAncestor">"broken"</a> | <a href="javascript:void(0)" id="emptyCssAncestor">""</a> | <a href="javascript:void(0)" id="fixCssAncestor">"fixed"</a>)</code>
870			<br /><a href="javascript:void(0)" id="addEndedRepeat">bind($.jPlayer.event.ended + ".repeat")</a> | <a href="javascript:void(0)" id="addEndedAlert">bind($.jPlayer.event.ended + ".alert")</a>
871			<br /><a href="javascript:void(0)" id="removeRepeat">unbind(".repeat")</a> | <a href="javascript:void(0)" id="removeAlert">unbind(".alert")</a> | <a href="javascript:void(0)" id="globalPause">$.jPlayer.pause()</a>
872			<!-- <br /><a href="javascript:void(0)" id="resize_a">resize(0x0)</a> | <a href="javascript:void(0)" id="resize_b">resize(480x270):270p</a> | <a href="javascript:void(0)" id="resize_c">resize(640x360):360p</a> -->
873
874			<hr />
875			<a href="javascript:void(0)" id="setMedia_broken">setMedia(BrokenLinks:{mp3,m4a,oga,m4v,ogv})</a>
876			<br /><a href="javascript:void(0)" id="setMedia_empty">setMedia(EmptyStrings:{mp3,m4a,oga,m4v,ogv})</a>
877			<br /><a href="javascript:void(0)" id="setMedia_wrong">setMedia(WrongType:{mp3,m4a,oga,m4v,ogv})</a>
878
879			<hr />
880			<a href="javascript:void(0)" id="setRtmp_a1">setMedia(A:{rtmpv})</a>
881
882			<hr />
883			<a href="javascript:void(0)" id="setFlash_a1">setMedia(A:{flv})</a> | <a href="javascript:void(0)" id="setFlash_b1">setMedia(B:{flv})</a>
884			<br /><a href="javascript:void(0)" id="setFlash_a2">setMedia(A:{flv,m4v,webmv})</a> | <a href="javascript:void(0)" id="setFlash_b2">setMedia(B:{flv,m4v,webmv})</a>
885
886			<hr />
887			<a href="javascript:void(0)" id="setAudio_a1">setMedia(A:{mp3})</a> | <a href="javascript:void(0)" id="setAudio_b1">setMedia(B:{mp3})</a>
888			<br /><a href="javascript:void(0)" id="setAudio_a2">setMedia(A:{mp3,oga})</a> | <a href="javascript:void(0)" id="setAudio_b2">setMedia(B:{mp3,oga})</a>
889			<br /><a href="javascript:void(0)" id="setAudio_a3">setMedia(A:{mp3,oga,m4a})</a> | <a href="javascript:void(0)" id="setAudio_b3">setMedia(B:{mp3,oga,m4a})</a>
890
891			<br /><a href="javascript:void(0)" id="setAudio_a4">setMedia(A:{mp3,poster})</a> | <a href="javascript:void(0)" id="setAudio_b4">setMedia(B:{mp3,poster})</a>
892			<br /><a href="javascript:void(0)" id="setAudio_a5">setMedia(A:{mp3,oga,poster})</a> | <a href="javascript:void(0)" id="setAudio_b5">setMedia(B:{mp3,oga,poster})</a>
893			<br /><a href="javascript:void(0)" id="setAudio_a6">setMedia(A:{mp3,oga,m4a,poster})</a> | <a href="javascript:void(0)" id="setAudio_b6">setMedia(B:{mp3,oga,m4a,poster})</a>
894
895			<hr />
896
897			<a href="javascript:void(0)" id="setVideo_a1">setMedia(A:{m4v})</a> | <a href="javascript:void(0)" id="setVideo_b1">setMedia(B:{m4v})</a> | <a href="javascript:void(0)" id="setVideo_c1">setMedia(C:{m4v})</a>
898			<br /><a href="javascript:void(0)" id="setVideo_a2">setMedia(A:{m4v,ogv})</a> | <a href="javascript:void(0)" id="setVideo_b2">setMedia(B:{m4v,ogv})</a> | <a href="javascript:void(0)" id="setVideo_c2">setMedia(C:{m4v,ogv})</a>
899
900			<br /><a href="javascript:void(0)" id="setVideo_a3">setMedia(A:{m4v,poster})</a> | <a href="javascript:void(0)" id="setVideo_b3">setMedia(B:{m4v,poster})</a> | <a href="javascript:void(0)" id="setVideo_c3">setMedia(C:{m4v,poster})</a>
901			<br /><a href="javascript:void(0)" id="setVideo_a4">setMedia(A:{m4v,ogv,poster})</a> | <a href="javascript:void(0)" id="setVideo_b4">setMedia(B:{m4v,ogv,poster})</a> | <a href="javascript:void(0)" id="setVideo_c4">setMedia(C:{m4v,ogv,poster})</a>
902
903			<hr />
904
905			Set <code>size</code> option object to that for (<a href="javascript:void(0)" id="option_size_270p">270p</a> | <a href="javascript:void(0)" id="option_size_360p">360p</a>) | Set <code>fullScreen</code> option to (<a href="javascript:void(0)" id="option_fullScreen_false">false</a> | <a href="javascript:void(0)" id="option_fullScreen_true">true</a>)
906			<br />Set <code>sizeFull</code> option object to that for (<a href="javascript:void(0)" id="option_sizeFull_270p">270p</a> | <a href="javascript:void(0)" id="option_sizeFull_360p">360p</a> | <a href="javascript:void(0)" id="option_sizeFull_full">full</a>) | <a href="javascript:void(0)" id="restoreScreen">restoreScreen</a> | <a href="javascript:void(0)" id="fullScreen">fullScreen</a>
907			<br />Set <code>autohide</code> option object to that for (<a href="javascript:void(0)" id="option_autohide_neither">neither</a> | <a href="javascript:void(0)" id="option_autohide_full">full</a> | <a href="javascript:void(0)" id="option_autohide_restored">restored</a> | <a href="javascript:void(0)" id="option_autohide_both">both</a>) | (<a href="javascript:void(0)" id="option_autohide_slow">slow</a> | <a href="javascript:void(0)" id="option_autohide_fast">fast</a> | <a href="javascript:void(0)" id="option_autohide_instant">instant</a>)
908			<br />Set <code>loop</code> option to (<a href="javascript:void(0)" id="option_loop_true">true</a> | <a href="javascript:void(0)" id="option_loop_false">false</a>)
909
910			<br /><code>nativeVideoControls</code> (<a href="javascript:void(0)" id="option_nativeVideoControls_all">all</a> | <a href="javascript:void(0)" id="option_nativeVideoControls_none">none</a>)
911			| <code>noFullWindow</code> (<a href="javascript:void(0)" id="option_noFullWindow_all">all</a> | <a href="javascript:void(0)" id="option_noFullWindow_none">none</a>)
912			| <code>noVolume</code> (<a href="javascript:void(0)" id="option_noVolume_all">all</a> | <a href="javascript:void(0)" id="option_noVolume_none">none</a>)
913
914			<br /><code>keyEnabled</code> (<a href="javascript:void(0)" id="option_keyEnabled_true">true</a> | <a href="javascript:void(0)" id="option_keyEnabled_false">false</a>)
915			<code>keyBindings</code> (<a href="javascript:void(0)" id="option_keyBindings_default">default</a> | <a href="javascript:void(0)" id="option_keyBindings_alert">alert</a> | <a href="javascript:void(0)" id="option_keyBindings_disable">disable play/space</a>)
916
917			<hr />
918
919			<a href="javascript:void(0)" id="clearMedia">clearMedia()</a> | <a href="javascript:void(0)" id="load">load()</a> | <a href="javascript:void(0)" id="play_a">play()</a> | <a href="javascript:void(0)" id="pause_a">pause()</a> | <a href="javascript:void(0)" id="stop">stop()</a> | <a href="javascript:void(0)" id="mute">mute()</a> | <a href="javascript:void(0)" id="unmute">unmute()</a> | <a href="javascript:void(0)" id="volume_a">volume(0.5)</a>
920			<br /><a href="javascript:void(0)" id="play_b">play(0)</a> | <a href="javascript:void(0)" id="play_c">play(15)</a> | <a href="javascript:void(0)" id="play_d">play(30)</a> | <a href="javascript:void(0)" id="play_e">play(1e9)</a> | <a href="javascript:void(0)" id="pause_b">pause(0)</a> | <a href="javascript:void(0)" id="pause_c">pause(15)</a> | <a href="javascript:void(0)" id="pause_d">pause(30)</a> | <a href="javascript:void(0)" id="pause_e">pause(1e9)</a>
921			<br /><a href="javascript:void(0)" id="playHead_a">playHead(0)</a> | <a href="javascript:void(0)" id="playHead_b">playHead(50)</a> | <a href="javascript:void(0)" id="playHead_c">playHead(99.9)</a> | <a href="javascript:void(0)" id="playHead_d">playHead(100)</a> | <a href="javascript:void(0)" id="playHead_e">playHead(101)</a>
922			</p>
923		</div>
924
925<div id="jp_container_1" class="jp-video jp-video-270p" role="application" aria-label="media player">
926	<div class="jp-type-single">
927		<div id="jquery_jplayer" class="jp-jplayer"></div>
928		<div class="jp-gui">
929			<div class="jp-video-play">
930				<button class="jp-video-play-icon" role="button" tabindex="0">play</button>
931			</div>
932			<div class="jp-interface">
933				<div class="jp-progress">
934					<div class="jp-seek-bar">
935						<div class="jp-play-bar"></div>
936					</div>
937				</div>
938				<div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
939				<div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
940				<div class="jp-details">
941					<div class="jp-title" aria-label="title">&nbsp;</div>
942				</div>
943				<div class="jp-controls-holder">
944					<div class="jp-volume-controls">
945						<button class="jp-mute" role="button" tabindex="0">mute</button>
946						<button class="jp-volume-max" role="button" tabindex="0">max volume</button>
947						<div class="jp-volume-bar">
948							<div class="jp-volume-bar-value"></div>
949						</div>
950					</div>
951					<div class="jp-controls">
952						<button class="jp-play" role="button" tabindex="0">play</button>
953						<button class="jp-stop" role="button" tabindex="0">stop</button>
954					</div>
955					<div class="jp-toggles">
956						<button class="jp-repeat" role="button" tabindex="0">repeat</button>
957						<button class="jp-full-screen" role="button" tabindex="0">full screen</button>
958					</div>
959				</div>
960			</div>
961		</div>
962		<div class="jp-no-solution">
963			<span>Update Required</span>
964			To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
965		</div>
966	</div>
967</div>
968		<!-- <div id="test">Test output</div> -->
969			<p><a href="javascript:void(0)" id="show-jplayer">show()</a> | <a href="javascript:void(0)" id="hide-jplayer">hide()</a></p>
970
971			<div id="jplayer_inspector"></div>
972			<p>The player below is set up to play a single audio track. It is included here to test any interactions between the players. In particular the pauseOthers command.</p>
973
974<div id="jquery_jplayer_2" class="jp-jplayer"></div>
975<div id="jp_container_2" class="jp-audio" role="application" aria-label="media player">
976	<div class="jp-type-single">
977		<div class="jp-gui jp-interface">
978			<div class="jp-volume-controls">
979				<button class="jp-mute" role="button" tabindex="0">mute</button>
980				<button class="jp-volume-max" role="button" tabindex="0">max volume</button>
981				<div class="jp-volume-bar">
982					<div class="jp-volume-bar-value"></div>
983				</div>
984			</div>
985			<div class="jp-controls-holder">
986				<div class="jp-controls">
987					<button class="jp-play" role="button" tabindex="0">play</button>
988					<button class="jp-stop" role="button" tabindex="0">stop</button>
989				</div>
990				<div class="jp-progress">
991					<div class="jp-seek-bar">
992						<div class="jp-play-bar"></div>
993					</div>
994				</div>
995				<div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
996				<div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
997				<div class="jp-toggles">
998					<button class="jp-repeat" role="button" tabindex="0">repeat</button>
999				</div>
1000			</div>
1001		</div>
1002		<div class="jp-details">
1003			<div class="jp-title" aria-label="title">&nbsp;</div>
1004		</div>
1005		<div class="jp-no-solution">
1006			<span>Update Required</span>
1007			To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
1008		</div>
1009	</div>
1010</div>
1011
1012			<div id="jplayer_inspector_2"></div>
1013</body>
1014
1015</html>
1016