Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added keyboard support to the minPlayer.

  • Loading branch information...
commit 571a4a30be1e1e8b5ce710352bf0de13d37796f0 1 parent c85c315
@travist authored
Showing with 1,152 additions and 775 deletions.
  1. +16 −13 bin/minplayer.compressed.js
  2. +141 −35 bin/minplayer.js
  3. +1 −1  doc/files.html
  4. +1 −1  doc/index.html
  5. +1 −1  doc/symbols/_global_.html
  6. +1 −1  doc/symbols/jQuery.fn.minplayer.html
  7. +1 −1  doc/symbols/minplayer.async.html
  8. +1 −1  doc/symbols/minplayer.compatibility.html
  9. +1 −1  doc/symbols/minplayer.controller.base.html
  10. +1 −1  doc/symbols/minplayer.display.html
  11. +1 −1  doc/symbols/minplayer.file.html
  12. +1 −1  doc/symbols/minplayer.flags.html
  13. +1 −1  doc/symbols/minplayer.image.html
  14. +1 −1  doc/symbols/minplayer.playLoader.base.html
  15. +91 −35 doc/symbols/minplayer.players.base.html
  16. +1 −1  doc/symbols/minplayer.players.flash.html
  17. +1 −1  doc/symbols/minplayer.players.html5.html
  18. +1 −1  doc/symbols/minplayer.players.minplayer.html
  19. +2 −2 doc/symbols/minplayer.players.vimeo.html
  20. +2 −2 doc/symbols/minplayer.players.youtube.html
  21. +1 −1  doc/symbols/minplayer.plugin.html
  22. +57 −53 doc/symbols/src/src_minplayer.controller.base.js.html
  23. +219 −221 doc/symbols/src/src_minplayer.js.html
  24. +464 −360 doc/symbols/src/src_minplayer.players.base.js.html
  25. +3 −3 doc/symbols/src/src_minplayer.plugin.js.html
  26. +4 −0 src/minplayer.controller.base.js
  27. +8 −10 src/minplayer.js
  28. +126 −22 src/minplayer.players.base.js
  29. +3 −3 src/minplayer.plugin.js
View
29 bin/minplayer.compressed.js
@@ -3,7 +3,7 @@ minplayer.compatibility=function(){var a=null,a=document.createElement("video");
minplayer.async=function(){this.value=null;this.queue=[]};minplayer.async.prototype.get=function(a){null!==this.value?a(this.value):this.queue.push(a)};minplayer.async.prototype.set=function(a){this.value=a;var b=this.queue.length;if(b){for(;b--;)this.queue[b](a);this.queue=[]}};minplayer=minplayer||{};minplayer.flags=function(){this.flag=0;this.ids={};this.numFlags=0};
minplayer.flags.prototype.setFlag=function(a,b){this.ids.hasOwnProperty(a)||(this.ids[a]=this.numFlags,this.numFlags++);this.flag=b?this.flag|1<<this.ids[a]:this.flag&~(1<<this.ids[a])};minplayer=minplayer||{};minplayer.plugins=minplayer.plugins||{};minplayer.queue=minplayer.queue||[];minplayer.lock=!1;minplayer.plugin=function(a,b,c){this.name=a;this.pluginReady=!1;this.options=c;this.queue={};this.triggered={};this.lock=!1;b&&this.construct()};minplayer.plugin.prototype.construct=function(){this.addPlugin()};
minplayer.plugin.prototype.destroy=function(){this.unbind()};minplayer.plugin.prototype.loadPlugins=function(){var a="",b;for(b in this.options.plugins)minplayer.plugins[this.options.id][b]||(a=this.options.plugins[b],minplayer[b][a]&&new minplayer[b][a](this.display,this.options))};minplayer.plugin.prototype.ready=function(){this.pluginReady||(this.pluginReady=!0,this.trigger("ready"),this.checkQueue())};
-minplayer.plugin.prototype.addPlugin=function(a,b){a=a||this.name;b=b||this;b.isValid()&&(minplayer.plugins[this.options.id]||(minplayer.plugins[this.options.id]={}),minplayer.plugins[this.options.id][a]=b)};minplayer.plugin.prototype.get=function(a,b){if("function"===typeof a)this.get(this.name,a);else return minplayer.get.call(this,this.options.id,a,b)};
+minplayer.plugin.prototype.addPlugin=function(a,b){a=a||this.name;b=b||this;b.isValid()&&(minplayer.plugins[this.options.id]||(minplayer.plugins[this.options.id]={}),minplayer.plugins[this.options.id][a]=b)};minplayer.plugin.prototype.get=function(a,b){"function"===typeof a&&(b=a,a=null);return minplayer.get.call(this,this.options.id,a,b)};
minplayer.plugin.prototype.checkQueue=function(){var a=null,b=0,c=!1,d=[];minplayer.lock=!0;for(var e=minplayer.queue.length,b=0;b<e;b++)a=minplayer.queue[b],c=!a.id&&!a.plugin,(c|=a.plugin==this.name&&(!a.id||a.id==this.options.id))&&(c=minplayer.bind.call(a.context,a.event,this.options.id,this.name,a.callback)),c||d.push(a);minplayer.queue=d;minplayer.lock=!1};
minplayer.plugin.prototype.trigger=function(a,b){b=b||{};b.plugin=this;this.triggered[a]=b;if(this.queue[a]){var c=0,d={};for(c in this.queue[a])d=this.queue[a][c],d.callback({target:this,data:d.data},b)}return this};minplayer.plugin.prototype.bind=function(a,b,c){"function"===typeof b&&(c=b,b=null);if(a&&c)return this.queue[a]=this.queue[a]||[],this.unbind(a,c),this.queue[a].push({callback:c,data:b}),this.triggered[a]&&c({target:this,data:b},this.triggered[a]),this};
minplayer.plugin.prototype.unbind=function(a,b){if(this.lock){var c=this;setTimeout(function(){c.unbind(a,b)},10)}this.lock=!0;if(a)if(b){var d=0,e={};for(d in this.queue[a])this.queue[a][d].callback===b&&(e=this.queue[a].splice(1,1),delete e)}else this.queue[a]=[];else this.queue={};this.lock=!1;return this};minplayer.addQueue=function(a,b,c,d,e){minplayer.lock?setTimeout(function(){minplayer.addQueue(a,c,b,d,e)},10):minplayer.queue.push({context:a,id:c,event:b,plugin:d,callback:e})};
@@ -14,12 +14,12 @@ minplayer.display.prototype.construct=function(){minplayer.plugin.prototype.cons
minplayer.display.prototype.getScaledRect=function(a,b){var c={};c.x=b.x?b.x:0;c.y=b.y?b.y:0;c.width=b.width?b.width:0;c.height=b.height?b.height:0;a&&(b.width/b.height>a?(c.height=b.height,c.width=Math.floor(b.height*a)):(c.height=Math.floor(b.width/a),c.width=b.width),c.x=Math.floor((b.width-c.width)/2),c.y=Math.floor((b.height-c.height)/2));return c};minplayer.display.prototype.getElements=function(){return{}};minplayer.display.prototype.isValid=function(){return 0<this.display.length};
jQuery.fn.minplayer||(jQuery.fn.minplayer=function(a){return jQuery(this).each(function(){a=a||{};a.id=a.id||$(this).attr("id")||Math.random();if(!minplayer.plugins[a.id]){var b=a.template||"default";minplayer[b]?new minplayer[b](jQuery(this),a):new minplayer(jQuery(this),a)}})});
minplayer=jQuery.extend(function(a,b){b=jQuery.extend({id:"player",swfplayer:"",wmode:"transparent",preload:!0,autoplay:!1,loop:!1,width:"100%",height:"350px",debug:!1,volume:80,files:[],file:"",preview:"",attributes:{}},b);b.plugins=jQuery.extend({controller:"default",playLoader:"default"},b.plugins);minplayer.display.call(this,"player",a,b)},minplayer);minplayer.prototype=new minplayer.display;minplayer.prototype.constructor=minplayer;minplayer.console=console||{log:function(){}};
-minplayer.prototype.construct=function(){minplayer.display.prototype.construct.call(this);this.loadPlugins();this.currentPlayer="html5";this.addKeyEvents();this.load(this.getFiles());this.addEvents();this.ready()};minplayer.prototype.addEvents=function(){var a=this;minplayer.get.call(this,this.options.id,null,function(b){b.bind("error",function(b,d){minplayer.console.log(d);"html5"==a.currentPlayer?(a.options.file.player="minplayer",a.loadPlayer()):a.error(d)});b.bind("fullscreen",function(){a.resize()})})};
-minplayer.prototype.error=function(a){a=a||"";this.elements.error&&(this.elements.error.text(a),a?this.elements.error.show():this.elements.error.hide())};minplayer.prototype.addKeyEvents=function(){jQuery(window).bind("keyup",{obj:this},function(a){a.data.obj.display.hasClass("fullscreen")&&(113===a.keyCode||27===a.keyCode)&&a.data.obj.display.removeClass("fullscreen")})};
+minplayer.prototype.construct=function(){minplayer.display.prototype.construct.call(this);this.loadPlugins();this.currentPlayer="html5";this.addKeyEvents();this.load(this.getFiles());this.addEvents();this.ready()};minplayer.prototype.addEvents=function(){var a=this;minplayer.get.call(this,this.options.id,null,function(b){b.bind("error",function(b,d){"html5"==a.currentPlayer?(a.options.file.player="minplayer",a.loadPlayer()):a.error(d)});b.bind("fullscreen",function(){a.resize()})})};
+minplayer.prototype.error=function(a){a=a||"";this.elements.error&&(this.elements.error.text(a),a?this.elements.error.show():this.elements.error.hide())};minplayer.prototype.addKeyEvents=function(){jQuery(document).bind("keydown",{obj:this},function(a){switch(a.keyCode){case 113:case 27:a.data.obj.display.removeClass("fullscreen")}})};
minplayer.prototype.getFiles=function(){var a=[],b=null;this.elements.media&&((b=this.elements.media.attr("src"))&&a.push({path:b}),jQuery("source",this.elements.media).each(function(){a.push({path:jQuery(this).attr("src"),mimetype:jQuery(this).attr("type"),codecs:jQuery(this).attr("codecs")})}));return a};
minplayer.prototype.getMediaFile=function(a){if(!a)return null;if("string"===typeof a)return new minplayer.file({path:a});if(a.path)return new minplayer.file(a);for(var b=a.length,c=null,d=null;b--;)d=a[b],d="string"===typeof d?new minplayer.file({path:d}):new minplayer.file(d),0<d.priority&&(c=d);return c};
minplayer.prototype.loadPlayer=function(){if(this.options.file)if(this.options.file.player){this.error();var a=this.options.file.player.toString();!this.media||a!==this.currentPlayer?(this.currentPlayer=a,this.elements.display?(a=this.media?this.media.queue:{},this.media&&this.media.destroy(),pClass=minplayer.players[this.options.file.player],this.media=new pClass(this.elements.display,this.options),this.media.queue=a,this.get("media",function(a){a.load()})):this.error("No media display found.")):
-this.media&&this.media.load(this.options.file)}else this.error("Cannot play media: "+this.options.file.mimetype);else this.error("No media found.")};minplayer.prototype.load=function(a){this.options.files=a||this.options.files;this.options.file=this.getMediaFile(this.options.files);this.loadPlayer()};minplayer.prototype.resize=function(){this.eachPlugin(function(a,b){b.onResize()})};minplayer=minplayer||{};
+this.media&&this.media.load(this.options.file)}else this.error("Cannot play media: "+this.options.file.mimetype);else this.error("No media found.")};minplayer.prototype.load=function(a){this.options.files=a||this.options.files;this.options.file=this.getMediaFile(this.options.files);this.loadPlayer()};minplayer.prototype.resize=function(){this.get(function(a){a.onResize()})};minplayer=minplayer||{};
minplayer.image=function(a,b){this.loaded=!1;this.loader=null;this.ratio=0;this.img=null;minplayer.display.call(this,"image",a,b)};minplayer.image.prototype=new minplayer.display;minplayer.image.prototype.constructor=minplayer.image;
minplayer.image.prototype.construct=function(){this.allowResize=!0;minplayer.display.prototype.construct.call(this);this.display.css("overflow","hidden");var a=this;this.loader=new Image;this.loader.onload=function(){a.loaded=!0;a.ratio=a.loader.width/a.loader.height;a.resize();a.trigger("loaded")};this.ready()};minplayer.image.prototype.load=function(a){this.clear(function(){this.img=jQuery(document.createElement("img")).attr({src:""}).hide();this.display.append(this.img);this.loader.src=a})};
minplayer.image.prototype.clear=function(a){this.loaded=!1;if(this.img){var b=this;this.img.fadeOut(function(){b.img.attr("src","");b.loader.src="";$(this).remove();a.call(b)})}else a.call(this)};minplayer.image.prototype.resize=function(a,b){a=a||this.display.width();b=b||this.display.height();if(a&&b&&this.loaded){var c=this.getScaledRect(this.ratio,{width:a,height:b});this.img&&this.img.attr("src",this.loader.src).css({marginLeft:c.x,marginTop:c.y,width:c.width,height:c.height});this.img.fadeIn()}};
@@ -35,13 +35,15 @@ minplayer.playLoader.base.prototype.construct=function(){minplayer.display.proto
a.data.obj.checkVisibility()}),a.bind("pause",{obj:this},function(a){a.data.obj.bigPlay.setFlag("media",!0);a.data.obj.checkVisibility()}))});this.ready()};
minplayer.playLoader.base.prototype.loadPreview=function(){this.elements.preview&&(this.options.preview||(this.options.preview=this.elements.media.attr("poster")),this.elements.media.attr("poster",""),this.options.preview?(this.elements.preview.addClass("has-preview").show(),this.preview=new minplayer.image(this.elements.preview,this.options),this.preview.load(this.options.preview)):this.elements.preview.hide())};
minplayer.playLoader.base.prototype.checkVisibility=function(){this.busy.flag?this.elements.busy.show():this.elements.busy.hide();this.bigPlay.flag?this.elements.bigPlay.show():this.elements.bigPlay.hide();(this.bigPlay.flag||this.busy.flag)&&this.display.show();!this.bigPlay.flag&&!this.busy.flag&&this.display.hide()};minplayer=minplayer||{};minplayer.players=minplayer.players||{};minplayer.players.base=function(a,b){minplayer.display.call(this,"media",a,b)};minplayer.players.base.prototype=new minplayer.display;
-minplayer.players.base.prototype.constructor=minplayer.players.base;minplayer.players.base.getPriority=function(){return 0};minplayer.players.base.getMediaId=function(){return""};minplayer.players.base.canPlay=function(){return!1};minplayer.players.base.prototype.construct=function(){minplayer.display.prototype.construct.call(this);this.reset();this.mediaFile=this.options.file;this.playerFound()||(this.elements.media&&this.elements.media.remove(),this.display.html(this.create()));this.player=this.getPlayer()};
-minplayer.players.base.prototype.destroy=function(){minplayer.plugin.prototype.destroy.call(this);this.reset()};minplayer.players.base.prototype.clearIntervals=function(){this.progressInterval=this.playInterval=!1};
-minplayer.players.base.prototype.reset=function(){this.playerReady=!1;this.duration=new minplayer.async;this.currentTime=new minplayer.async;this.bytesLoaded=new minplayer.async;this.bytesTotal=new minplayer.async;this.bytesStart=new minplayer.async;this.volume=new minplayer.async;this.clearIntervals();this.player&&jQuery(this.player).unbind()};minplayer.players.base.prototype.poll=function(a){var b=this;setTimeout(function d(){a.call(b)&&setTimeout(d,1E3)},1E3)};
-minplayer.players.base.prototype.onReady=function(){var a=this;this.playerReady=!0;this.setVolume(this.options.volume/100);this.progressInterval=!0;this.poll(function(){a.progressInterval&&a.getBytesLoaded(function(b){a.getBytesTotal(function(c){if(b||c){var d=0;a.getBytesStart(function(a){d=a});a.trigger("progress",{loaded:b,total:c,start:d})}})});return a.progressInterval});this.ready();this.trigger("loadstart")};
-minplayer.players.base.prototype.onPlaying=function(){var a=this;this.trigger("playing");this.playInterval=!0;this.poll(function(){a.playInterval&&a.getCurrentTime(function(b){a.getDuration(function(c){b=parseFloat(b);c=parseFloat(c);(b||c)&&a.trigger("timeupdate",{currentTime:b,duration:c})})});return a.playInterval})};minplayer.players.base.prototype.onPaused=function(){this.trigger("pause");this.playInterval=!1};minplayer.players.base.prototype.onComplete=function(){this.clearIntervals();this.trigger("ended")};
-minplayer.players.base.prototype.onLoaded=function(){this.trigger("loadeddata")};minplayer.players.base.prototype.onWaiting=function(){this.trigger("waiting")};minplayer.players.base.prototype.onError=function(a){this.trigger("error",a)};minplayer.players.base.prototype.isReady=function(){return this.player&&this.playerReady};minplayer.players.base.prototype.hasPlayLoader=function(){return!1};minplayer.players.base.prototype.playerFound=function(){return!1};
-minplayer.players.base.prototype.create=function(){this.reset();return null};minplayer.players.base.prototype.getPlayer=function(){return this.player};minplayer.players.base.prototype.load=function(a){a&&(this.reset(),this.mediaFile=a)};minplayer.players.base.prototype.play=function(){};minplayer.players.base.prototype.pause=function(){};minplayer.players.base.prototype.stop=function(){this.clearIntervals()};minplayer.players.base.prototype.seek=function(){};
+minplayer.players.base.prototype.constructor=minplayer.players.base;minplayer.players.base.getPriority=function(){return 0};minplayer.players.base.getMediaId=function(){return""};minplayer.players.base.canPlay=function(){return!1};
+minplayer.players.base.prototype.construct=function(){minplayer.display.prototype.construct.call(this);this.reset();this.mediaFile=this.options.file;this.playerFound()||(this.elements.media&&this.elements.media.remove(),this.display.html(this.create()));this.player=this.getPlayer();var a=this;jQuery(document).bind("click",function(b){a.hasFocus=0==jQuery(b.target).closest("#"+a.options.id).length?!1:!0});jQuery(document).bind("keydown",{obj:this},function(a){if(a.data.obj.hasFocus)switch(a.preventDefault(),
+a.keyCode){case 32:case 179:a.data.obj.playing?a.data.obj.pause():a.data.obj.play();break;case 38:a.data.obj.setVolumeRelative(0.1);break;case 40:a.data.obj.setVolumeRelative(-0.1);break;case 37:case 227:a.data.obj.seekRelative(-0.05);break;case 39:case 228:a.data.obj.seekRelative(0.05)}})};minplayer.players.base.prototype.destroy=function(){minplayer.plugin.prototype.destroy.call(this);this.reset()};
+minplayer.players.base.prototype.reset=function(){this.playerReady=!1;this.duration=new minplayer.async;this.currentTime=new minplayer.async;this.bytesLoaded=new minplayer.async;this.bytesTotal=new minplayer.async;this.bytesStart=new minplayer.async;this.volume=new minplayer.async;this.loading=this.playing=this.hasFocus=!1;this.player&&jQuery(this.player).unbind()};minplayer.players.base.prototype.poll=function(a){var b=this;setTimeout(function d(){a.call(b)&&setTimeout(d,1E3)},1E3)};
+minplayer.players.base.prototype.onReady=function(){var a=this;this.playerReady=!0;this.setVolume(this.options.volume/100);this.loading=!0;this.poll(function(){a.loading&&a.getBytesLoaded(function(b){a.getBytesTotal(function(c){if(b||c){var d=0;a.getBytesStart(function(a){d=a});a.trigger("progress",{loaded:b,total:c,start:d});b>=c&&(a.loading=!1)}})});return a.loading});this.ready();this.trigger("loadstart")};
+minplayer.players.base.prototype.onPlaying=function(){var a=this;this.trigger("playing");this.playing=this.hasFocus=!0;this.poll(function(){a.playing&&a.getCurrentTime(function(b){a.getDuration(function(c){b=parseFloat(b);c=parseFloat(c);(b||c)&&a.trigger("timeupdate",{currentTime:b,duration:c})})});return a.playing})};minplayer.players.base.prototype.onPaused=function(){this.trigger("pause");this.playing=this.hasFocus=!1};
+minplayer.players.base.prototype.onComplete=function(){this.hasFocus=this.loading=this.playing=!1;this.trigger("ended")};minplayer.players.base.prototype.onLoaded=function(){this.trigger("loadeddata")};minplayer.players.base.prototype.onWaiting=function(){this.trigger("waiting")};minplayer.players.base.prototype.onError=function(a){this.hasFocus=!1;this.trigger("error",a)};minplayer.players.base.prototype.isReady=function(){return this.player&&this.playerReady};
+minplayer.players.base.prototype.hasPlayLoader=function(){return!1};minplayer.players.base.prototype.playerFound=function(){return!1};minplayer.players.base.prototype.create=function(){this.reset();return null};minplayer.players.base.prototype.getPlayer=function(){return this.player};minplayer.players.base.prototype.load=function(a){a&&(this.reset(),this.mediaFile=a)};minplayer.players.base.prototype.play=function(){};minplayer.players.base.prototype.pause=function(){};
+minplayer.players.base.prototype.stop=function(){this.hasFocus=this.loading=this.playing=!1};minplayer.players.base.prototype.seekRelative=function(a){var b=this;this.getCurrentTime(function(c){b.getDuration(function(d){if(d){var e=0,e=-1<a&&1>a?c/d+parseFloat(a):(c+parseFloat(a))/d;b.seek(e)}})})};minplayer.players.base.prototype.seek=function(){};minplayer.players.base.prototype.setVolumeRelative=function(a){var b=this;this.getVolume(function(c){c+=parseFloat(a);c=0>c?0:c;b.setVolume(1<c?1:c)})};
minplayer.players.base.prototype.setVolume=function(a){this.trigger("volumeupdate",a)};minplayer.players.base.prototype.getVolume=function(a){return this.volume.get(a)};minplayer.players.base.prototype.getCurrentTime=function(a){return this.currentTime.get(a)};minplayer.players.base.prototype.getDuration=function(a){return this.duration.get(a)};minplayer.players.base.prototype.getBytesStart=function(a){return this.bytesStart.get(a)};minplayer.players.base.prototype.getBytesLoaded=function(a){return this.bytesLoaded.get(a)};
minplayer.players.base.prototype.getBytesTotal=function(a){return this.bytesTotal.get(a)};minplayer=minplayer||{};minplayer.players=minplayer.players||{};minplayer.players.html5=function(a,b){minplayer.players.base.call(this,a,b)};minplayer.players.html5.prototype=new minplayer.players.base;minplayer.players.html5.prototype.constructor=minplayer.players.html5;minplayer.players.html5.getPriority=function(){return 10};
minplayer.players.html5.canPlay=function(a){switch(a.mimetype){case "video/ogg":return minplayer.playTypes.videoOGG;case "video/mp4":return minplayer.playTypes.videoH264;case "video/x-webm":return minplayer.playTypes.videoWEBM;case "audio/ogg":return minplayer.playTypes.audioOGG;case "audio/mpeg":return minplayer.playTypes.audioMP3;case "audio/mp4":return minplayer.playTypes.audioMP4;default:return!1}};
@@ -88,5 +90,6 @@ minplayer.controller.base.prototype.getElements=function(){var a=minplayer.displ
minplayer.controller.base.prototype.construct=function(){minplayer.display.prototype.construct.call(this);this.elements.fullscreen&&this.elements.fullscreen.bind("click",{obj:this},function(a){var b=a.data.obj.elements.player.hasClass("fullscreen");b?a.data.obj.elements.player.removeClass("fullscreen"):a.data.obj.elements.player.addClass("fullscreen");a.data.obj.trigger("fullscreen",!b)}).css({pointer:"hand"});this.dragging=!1;this.elements.seek&&(this.seekBar=this.elements.seek.slider({range:"min"}));
this.elements.volume&&(this.volumeBar=this.elements.volume.slider({range:"min",orientation:"vertical"}));this.get("media",function(a){var b=this;this.elements.pause&&(this.elements.pause.unbind().bind("click",{obj:this},function(b){b.preventDefault();b.data.obj.playPause(!1,a)}),a.bind("pause",{obj:this},function(a){a.data.obj.setPlayPause(!0)}));this.elements.play&&(this.elements.play.unbind().bind("click",{obj:this},function(b){b.preventDefault();b.data.obj.playPause(!0,a)}),a.bind("playing",{obj:this},
function(a){a.data.obj.setPlayPause(!1)}));this.elements.duration&&(a.bind("durationchange",{obj:this},function(a,b){a.data.obj.setTimeString("duration",b.duration)}),a.getDuration(function(a){b.setTimeString("duration",a)}));this.elements.progress&&a.bind("progress",{obj:this},function(a,b){a.data.obj.elements.progress.width((b.total?100*(b.loaded/b.total):0)+"%")});(this.seekBar||this.elements.timer)&&a.bind("timeupdate",{obj:this},function(a,b){if(!a.data.obj.dragging){var e=0;b.duration&&(e=100*
-(b.currentTime/b.duration));a.data.obj.seekBar&&a.data.obj.seekBar.slider("option","value",e);a.data.obj.setTimeString("timer",b.currentTime)}});this.seekBar&&this.seekBar.slider({start:function(){b.dragging=!0},stop:function(c,d){b.dragging=!1;a.getDuration(function(b){a.seek(d.value/100*b)})},slide:function(c,d){a.getDuration(function(c){c*=d.value/100;b.dragging||a.seek(c);b.setTimeString("timer",c)})}});this.volumeBar&&(this.volumeBar.slider({slide:function(b,d){a.setVolume(d.value/100)}}),a.getVolume(function(a){b.volumeBar.slider("option",
-"value",100*a)}))});this.ready()};minplayer.controller.base.prototype.setPlayPause=function(a){this.elements.play&&this.elements.play.css("display",a?"inherit":"none");this.elements.pause&&this.elements.pause.css("display",a?"none":"inherit")};minplayer.controller.base.prototype.playPause=function(a,b){var c=a?"play":"pause";this.display.trigger(c);this.setPlayPause(!a);if(b)b[c]()};minplayer.controller.base.prototype.setTimeString=function(a,b){this.elements[a]&&this.elements[a].text(minplayer.formatTime(b).time)};
+(b.currentTime/b.duration));a.data.obj.seekBar&&a.data.obj.seekBar.slider("option","value",e);a.data.obj.setTimeString("timer",b.currentTime)}});this.seekBar&&this.seekBar.slider({start:function(){b.dragging=!0},stop:function(c,d){b.dragging=!1;a.getDuration(function(b){a.seek(d.value/100*b)})},slide:function(c,d){a.getDuration(function(c){c*=d.value/100;b.dragging||a.seek(c);b.setTimeString("timer",c)})}});this.volumeBar&&(this.volumeBar.slider({slide:function(b,d){a.setVolume(d.value/100)}}),a.bind("volumeupdate",
+{obj:this},function(a,b){a.data.obj.volumeBar.slider("option","value",100*b)}),a.getVolume(function(a){b.volumeBar.slider("option","value",100*a)}))});this.ready()};minplayer.controller.base.prototype.setPlayPause=function(a){this.elements.play&&this.elements.play.css("display",a?"inherit":"none");this.elements.pause&&this.elements.pause.css("display",a?"none":"inherit")};
+minplayer.controller.base.prototype.playPause=function(a,b){var c=a?"play":"pause";this.display.trigger(c);this.setPlayPause(!a);if(b)b[c]()};minplayer.controller.base.prototype.setTimeString=function(a,b){this.elements[a]&&this.elements[a].text(minplayer.formatTime(b).time)};
View
176 bin/minplayer.js
@@ -361,10 +361,10 @@ minplayer.plugin.prototype.addPlugin = function(name, plugin) {
*/
minplayer.plugin.prototype.get = function(plugin, callback) {
- // Allow this to be called on itself with a single callback.
+ // If they pass just a callback, then return all plugins when ready.
if (typeof plugin === 'function') {
- this.get(this.name, plugin);
- return;
+ callback = plugin;
+ plugin = null;
}
// Return the minplayer.get equivalent.
@@ -984,9 +984,6 @@ minplayer.prototype.addEvents = function() {
// Bind to the error event.
plugin.bind('error', function(event, data) {
- // Log this to console.
- minplayer.console.log(data);
-
// If an error occurs within the html5 media player, then try
// to fall back to the flash player.
if (_this.currentPlayer == 'html5') {
@@ -1030,12 +1027,13 @@ minplayer.prototype.error = function(error) {
*/
minplayer.prototype.addKeyEvents = function() {
- // Bind keyup to the current window.
- jQuery(window).bind('keyup', {obj: this}, function(event) {
- // Escape out of fullscreen if they press ESC or Q.
- var isFull = event.data.obj.display.hasClass('fullscreen');
- if (isFull && (event.keyCode === 113 || event.keyCode === 27)) {
- event.data.obj.display.removeClass('fullscreen');
+ // Bind to key events...
+ jQuery(document).bind('keydown', {obj: this}, function(e) {
+ switch (e.keyCode) {
+ case 113: // ESC
+ case 27: // Q
+ e.data.obj.display.removeClass('fullscreen');
+ break;
}
});
};
@@ -1202,7 +1200,7 @@ minplayer.prototype.load = function(files) {
minplayer.prototype.resize = function() {
// Call onRezie for each plugin.
- this.eachPlugin(function(name, plugin) {
+ this.get(function(plugin) {
plugin.onResize();
});
};
@@ -1776,6 +1774,49 @@ minplayer.players.base.prototype.construct = function() {
// Get the player object...
this.player = this.getPlayer();
+
+ // Set the focus of the element based on if they click in or outside of it.
+ var _this = this;
+ jQuery(document).bind('click', function(e) {
+ if (jQuery(e.target).closest('#' + _this.options.id).length == 0) {
+ _this.hasFocus = false;
+ }
+ else {
+ _this.hasFocus = true;
+ }
+ });
+
+ // Bind to key events...
+ jQuery(document).bind('keydown', {obj: this}, function(e) {
+ if (e.data.obj.hasFocus) {
+ e.preventDefault();
+ switch (e.keyCode) {
+ case 32: // SPACE
+ case 179: // GOOGLE play/pause button.
+ if (e.data.obj.playing) {
+ e.data.obj.pause();
+ }
+ else {
+ e.data.obj.play();
+ }
+ break;
+ case 38: // UP
+ e.data.obj.setVolumeRelative(0.1);
+ break;
+ case 40: // DOWN
+ e.data.obj.setVolumeRelative(-0.1);
+ break;
+ case 37: // LEFT
+ case 227: // GOOGLE TV REW
+ e.data.obj.seekRelative(-0.05);
+ break;
+ case 39: // RIGHT
+ case 228: // GOOGLE TV FW
+ e.data.obj.seekRelative(0.05);
+ break;
+ }
+ }
+ });
};
/**
@@ -1789,15 +1830,6 @@ minplayer.players.base.prototype.destroy = function() {
};
/**
- * Clears all the intervals.
- */
-minplayer.players.base.prototype.clearIntervals = function() {
- // Stop the intervals.
- this.playInterval = false;
- this.progressInterval = false;
-};
-
-/**
* Resets all variables.
*/
minplayer.players.base.prototype.reset = function() {
@@ -1823,8 +1855,14 @@ minplayer.players.base.prototype.reset = function() {
// The current volume of the player.
this.volume = new minplayer.async();
- // Stop the intervals.
- this.clearIntervals();
+ // Reset focus.
+ this.hasFocus = false;
+
+ // We are not playing.
+ this.playing = false;
+
+ // We are not loading.
+ this.loading = false;
// If the player exists, then unbind all events.
if (this.player) {
@@ -1859,13 +1897,13 @@ minplayer.players.base.prototype.onReady = function() {
this.setVolume(this.options.volume / 100);
// Setup the progress interval.
- this.progressInterval = true;
+ this.loading = true;
// Create a poll to get the progress.
this.poll(function() {
// Only do this if the play interval is set.
- if (_this.progressInterval) {
+ if (_this.loading) {
// Get the bytes loaded asynchronously.
_this.getBytesLoaded(function(bytesLoaded) {
@@ -1888,12 +1926,17 @@ minplayer.players.base.prototype.onReady = function() {
total: bytesTotal,
start: bytesStart
});
+
+ // Say we are not longer loading if they are equal.
+ if (bytesLoaded >= bytesTotal) {
+ _this.loading = false;
+ }
}
});
});
}
- return _this.progressInterval;
+ return _this.loading;
});
// We are now ready.
@@ -1913,14 +1956,17 @@ minplayer.players.base.prototype.onPlaying = function() {
// Trigger an event that we are playing.
this.trigger('playing');
+ // Say that this player has focus.
+ this.hasFocus = true;
+
// Set the playInterval to true.
- this.playInterval = true;
+ this.playing = true;
// Create a poll to get the timeupate.
this.poll(function() {
// Only do this if the play interval is set.
- if (_this.playInterval) {
+ if (_this.playing) {
// Get the current time asyncrhonously.
_this.getCurrentTime(function(currentTime) {
@@ -1945,7 +1991,7 @@ minplayer.players.base.prototype.onPlaying = function() {
});
}
- return _this.playInterval;
+ return _this.playing;
});
};
@@ -1957,8 +2003,11 @@ minplayer.players.base.prototype.onPaused = function() {
// Trigger an event that we are paused.
this.trigger('pause');
- // Stop the play interval.
- this.playInterval = false;
+ // Remove focus.
+ this.hasFocus = false;
+
+ // Say we are not playing.
+ this.playing = false;
};
/**
@@ -1966,7 +2015,9 @@ minplayer.players.base.prototype.onPaused = function() {
*/
minplayer.players.base.prototype.onComplete = function() {
// Stop the intervals.
- this.clearIntervals();
+ this.playing = false;
+ this.loading = false;
+ this.hasFocus = false;
this.trigger('ended');
};
@@ -1990,6 +2041,7 @@ minplayer.players.base.prototype.onWaiting = function() {
* @param {string} errorCode The error that was triggered.
*/
minplayer.players.base.prototype.onError = function(errorCode) {
+ this.hasFocus = false;
this.trigger('error', errorCode);
};
@@ -2070,8 +2122,42 @@ minplayer.players.base.prototype.pause = function() {
* Stop the loaded media file.
*/
minplayer.players.base.prototype.stop = function() {
- // Stop the intervals.
- this.clearIntervals();
+ this.playing = false;
+ this.loading = false;
+ this.hasFocus = false;
+};
+
+/**
+ * Seeks to relative position.
+ *
+ * @param {number} pos Relative position. -1 to 1 (percent), > 1 (seconds).
+ */
+minplayer.players.base.prototype.seekRelative = function(pos) {
+
+ // Get the current time asyncrhonously.
+ var _this = this;
+ this.getCurrentTime(function(currentTime) {
+
+ // Get the duration asynchronously.
+ _this.getDuration(function(duration) {
+
+ // Only do this if we have a duration.
+ if (duration) {
+
+ // Get the position.
+ var seekPos = 0;
+ if ((pos > -1) && (pos < 1)) {
+ seekPos = (currentTime / duration) + parseFloat(pos);
+ }
+ else {
+ seekPos = (currentTime + parseFloat(pos)) / duration;
+ }
+
+ // Set the seek value.
+ _this.seek(seekPos);
+ }
+ });
+ });
};
/**
@@ -2080,7 +2166,23 @@ minplayer.players.base.prototype.stop = function() {
* @param {number} pos The position to seek the minplayer. 0 to 1.
*/
minplayer.players.base.prototype.seek = function(pos) {
+};
+/**
+ * Set the volume of the loaded minplayer.
+ *
+ * @param {number} vol -1 to 1 - The relative amount to increase or decrease.
+ */
+minplayer.players.base.prototype.setVolumeRelative = function(vol) {
+
+ // Get the volume
+ var _this = this;
+ this.getVolume(function(newVol) {
+ newVol += parseFloat(vol);
+ newVol = (newVol < 0) ? 0 : newVol;
+ newVol = (newVol > 1) ? 1 : newVol;
+ _this.setVolume(newVol);
+ });
};
/**
@@ -3668,6 +3770,10 @@ minplayer.controller.base.prototype.construct = function() {
}
});
+ media.bind('volumeupdate', {obj: this}, function(event, vol) {
+ event.data.obj.volumeBar.slider('option', 'value', (vol * 100));
+ });
+
// Set the volume to match that of the player.
media.getVolume(function(vol) {
_this.volumeBar.slider('option', 'value', (vol * 100));
View
2  doc/files.html
@@ -422,7 +422,7 @@ <h1 class="classTitle">File Index</h1>
</div>
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:34 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/index.html
@@ -341,7 +341,7 @@ <h1 class="classTitle">Class Index</h1>
</div>
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:34 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/_global_.html
@@ -410,7 +410,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:57 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/jQuery.fn.minplayer.html
@@ -343,7 +343,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:57 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.async.html
@@ -533,7 +533,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.compatibility.html
@@ -570,7 +570,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.controller.base.html
@@ -668,7 +668,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.display.html
@@ -712,7 +712,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.file.html
@@ -609,7 +609,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.flags.html
@@ -548,7 +548,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.image.html
@@ -675,7 +675,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.playLoader.base.html
@@ -568,7 +568,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:34 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
126 doc/symbols/minplayer.players.base.html
@@ -344,15 +344,6 @@ <h1 class="classTitle">
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/minplayer.players.base.html#clearIntervals">clearIntervals</a></b>()
- </div>
- <div class="description">Clears all the intervals.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes">&nbsp;</td>
- <td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/minplayer.players.base.html#construct">construct</a></b>()
</div>
<div class="description"></div>
@@ -605,6 +596,15 @@ <h1 class="classTitle">
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
+ <div class="fixedFont"><b><a href="../symbols/minplayer.players.base.html#seekRelative">seekRelative</a></b>(pos)
+ </div>
+ <div class="description">Seeks to relative position.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="attributes">&nbsp;</td>
+ <td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/minplayer.players.base.html#setVolume">setVolume</a></b>(vol)
</div>
<div class="description">Set the volume of the loaded minplayer.</div>
@@ -614,6 +614,15 @@ <h1 class="classTitle">
<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
+ <div class="fixedFont"><b><a href="../symbols/minplayer.players.base.html#setVolumeRelative">setVolumeRelative</a></b>(vol)
+ </div>
+ <div class="description">Set the volume of the loaded minplayer.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="attributes">&nbsp;</td>
+ <td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/minplayer.players.base.html#stop">stop</a></b>()
</div>
<div class="description">Stop the loaded media file.</div>
@@ -781,31 +790,6 @@ <h1 class="classTitle">
<hr />
- <a name="clearIntervals"> </a>
- <div class="fixedFont">
-
-
- <b>clearIntervals</b>()
-
- </div>
- <div class="description">
- Clears all the intervals.
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
-
- <hr />
-
<a name="construct"> </a>
<div class="fixedFont">
@@ -1739,6 +1723,42 @@ <h1 class="classTitle">
<hr />
+ <a name="seekRelative"> </a>
+ <div class="fixedFont">
+
+
+ <b>seekRelative</b>(pos)
+
+ </div>
+ <div class="description">
+ Seeks to relative position.
+
+
+ </div>
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="light fixedFont">{number}</span> <b>pos</b>
+
+ </dt>
+ <dd>Relative position. -1 to 1 (percent), > 1 (seconds).</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+ <hr />
+
<a name="setVolume"> </a>
<div class="fixedFont">
@@ -1775,6 +1795,42 @@ <h1 class="classTitle">
<hr />
+ <a name="setVolumeRelative"> </a>
+ <div class="fixedFont">
+
+
+ <b>setVolumeRelative</b>(vol)
+
+ </div>
+ <div class="description">
+ Set the volume of the loaded minplayer.
+
+
+ </div>
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="light fixedFont">{number}</span> <b>vol</b>
+
+ </dt>
+ <dd>-1 to 1 - The relative amount to increase or decrease.</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+ <hr />
+
<a name="stop"> </a>
<div class="fixedFont">
@@ -1812,7 +1868,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.players.flash.html
@@ -685,7 +685,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:33 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.players.html5.html
@@ -1261,7 +1261,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:34 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.players.minplayer.html
@@ -1169,7 +1169,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:34 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
4 doc/symbols/minplayer.players.vimeo.html
@@ -454,7 +454,7 @@ <h1 class="classTitle">
<dl class="inheritsList">
- <dt>Methods borrowed from class <a href="../symbols/minplayer.players.base.html">minplayer.players.base</a>: </dt><dd><a href="../symbols/minplayer.players.base.html#clearIntervals">clearIntervals</a>, <a href="../symbols/minplayer.players.base.html#construct">construct</a>, <a href="../symbols/minplayer.players.base.html#destroy">destroy</a>, <a href="../symbols/minplayer.players.base.html#getBytesLoaded">getBytesLoaded</a>, <a href="../symbols/minplayer.players.base.html#getBytesStart">getBytesStart</a>, <a href="../symbols/minplayer.players.base.html#getBytesTotal">getBytesTotal</a>, <a href="../symbols/minplayer.players.base.html#getCurrentTime">getCurrentTime</a>, <a href="../symbols/minplayer.players.base.html#getPlayer">getPlayer</a>, <a href="../symbols/minplayer.players.base.html#hasPlayLoader">hasPlayLoader</a>, <a href="../symbols/minplayer.players.base.html#isReady">isReady</a>, <a href="../symbols/minplayer.players.base.html#load">load</a>, <a href="../symbols/minplayer.players.base.html#onComplete">onComplete</a>, <a href="../symbols/minplayer.players.base.html#onError">onError</a>, <a href="../symbols/minplayer.players.base.html#onLoaded">onLoaded</a>, <a href="../symbols/minplayer.players.base.html#onPaused">onPaused</a>, <a href="../symbols/minplayer.players.base.html#onPlaying">onPlaying</a>, <a href="../symbols/minplayer.players.base.html#onWaiting">onWaiting</a>, <a href="../symbols/minplayer.players.base.html#poll">poll</a></dd><dt>Methods borrowed from class <a href="../symbols/minplayer.display.html">minplayer.display</a>: </dt><dd><a href="../symbols/minplayer.display.html#getDisplay">getDisplay</a>, <a href="../symbols/minplayer.display.html#getElements">getElements</a>, <a href="../symbols/minplayer.display.html#getScaledRect">getScaledRect</a>, <a href="../symbols/minplayer.display.html#isValid">isValid</a>, <a href="../symbols/minplayer.display.html#onResize">onResize</a></dd><dt>Methods borrowed from class <a href="../symbols/minplayer.plugin.html">minplayer.plugin</a>: </dt><dd><a href="../symbols/minplayer.plugin.html#addPlugin">addPlugin</a>, <a href="../symbols/minplayer.plugin.html#bind">bind</a>, <a href="../symbols/minplayer.plugin.html#checkQueue">checkQueue</a>, <a href="../symbols/minplayer.plugin.html#get">get</a>, <a href="../symbols/minplayer.plugin.html#loadPlugins">loadPlugins</a>, <a href="../symbols/minplayer.plugin.html#ready">ready</a>, <a href="../symbols/minplayer.plugin.html#trigger">trigger</a>, <a href="../symbols/minplayer.plugin.html#unbind">unbind</a></dd>
+ <dt>Methods borrowed from class <a href="../symbols/minplayer.players.base.html">minplayer.players.base</a>: </dt><dd><a href="../symbols/minplayer.players.base.html#construct">construct</a>, <a href="../symbols/minplayer.players.base.html#destroy">destroy</a>, <a href="../symbols/minplayer.players.base.html#getBytesLoaded">getBytesLoaded</a>, <a href="../symbols/minplayer.players.base.html#getBytesStart">getBytesStart</a>, <a href="../symbols/minplayer.players.base.html#getBytesTotal">getBytesTotal</a>, <a href="../symbols/minplayer.players.base.html#getCurrentTime">getCurrentTime</a>, <a href="../symbols/minplayer.players.base.html#getPlayer">getPlayer</a>, <a href="../symbols/minplayer.players.base.html#hasPlayLoader">hasPlayLoader</a>, <a href="../symbols/minplayer.players.base.html#isReady">isReady</a>, <a href="../symbols/minplayer.players.base.html#load">load</a>, <a href="../symbols/minplayer.players.base.html#onComplete">onComplete</a>, <a href="../symbols/minplayer.players.base.html#onError">onError</a>, <a href="../symbols/minplayer.players.base.html#onLoaded">onLoaded</a>, <a href="../symbols/minplayer.players.base.html#onPaused">onPaused</a>, <a href="../symbols/minplayer.players.base.html#onPlaying">onPlaying</a>, <a href="../symbols/minplayer.players.base.html#onWaiting">onWaiting</a>, <a href="../symbols/minplayer.players.base.html#poll">poll</a>, <a href="../symbols/minplayer.players.base.html#seekRelative">seekRelative</a>, <a href="../symbols/minplayer.players.base.html#setVolumeRelative">setVolumeRelative</a></dd><dt>Methods borrowed from class <a href="../symbols/minplayer.display.html">minplayer.display</a>: </dt><dd><a href="../symbols/minplayer.display.html#getDisplay">getDisplay</a>, <a href="../symbols/minplayer.display.html#getElements">getElements</a>, <a href="../symbols/minplayer.display.html#getScaledRect">getScaledRect</a>, <a href="../symbols/minplayer.display.html#isValid">isValid</a>, <a href="../symbols/minplayer.display.html#onResize">onResize</a></dd><dt>Methods borrowed from class <a href="../symbols/minplayer.plugin.html">minplayer.plugin</a>: </dt><dd><a href="../symbols/minplayer.plugin.html#addPlugin">addPlugin</a>, <a href="../symbols/minplayer.plugin.html#bind">bind</a>, <a href="../symbols/minplayer.plugin.html#checkQueue">checkQueue</a>, <a href="../symbols/minplayer.plugin.html#get">get</a>, <a href="../symbols/minplayer.plugin.html#loadPlugins">loadPlugins</a>, <a href="../symbols/minplayer.plugin.html#ready">ready</a>, <a href="../symbols/minplayer.plugin.html#trigger">trigger</a>, <a href="../symbols/minplayer.plugin.html#unbind">unbind</a></dd>
</dl>
@@ -1102,7 +1102,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:34 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
4 doc/symbols/minplayer.players.youtube.html
@@ -546,7 +546,7 @@ <h1 class="classTitle">
<dl class="inheritsList">
- <dt>Methods borrowed from class <a href="../symbols/minplayer.players.base.html">minplayer.players.base</a>: </dt><dd><a href="../symbols/minplayer.players.base.html#clearIntervals">clearIntervals</a>, <a href="../symbols/minplayer.players.base.html#construct">construct</a>, <a href="../symbols/minplayer.players.base.html#destroy">destroy</a>, <a href="../symbols/minplayer.players.base.html#getPlayer">getPlayer</a>, <a href="../symbols/minplayer.players.base.html#isReady">isReady</a>, <a href="../symbols/minplayer.players.base.html#onComplete">onComplete</a>, <a href="../symbols/minplayer.players.base.html#onError">onError</a>, <a href="../symbols/minplayer.players.base.html#onLoaded">onLoaded</a>, <a href="../symbols/minplayer.players.base.html#onPaused">onPaused</a>, <a href="../symbols/minplayer.players.base.html#onPlaying">onPlaying</a>, <a href="../symbols/minplayer.players.base.html#onWaiting">onWaiting</a>, <a href="../symbols/minplayer.players.base.html#poll">poll</a>, <a href="../symbols/minplayer.players.base.html#reset">reset</a></dd><dt>Methods borrowed from class <a href="../symbols/minplayer.display.html">minplayer.display</a>: </dt><dd><a href="../symbols/minplayer.display.html#getDisplay">getDisplay</a>, <a href="../symbols/minplayer.display.html#getElements">getElements</a>, <a href="../symbols/minplayer.display.html#getScaledRect">getScaledRect</a>, <a href="../symbols/minplayer.display.html#isValid">isValid</a>, <a href="../symbols/minplayer.display.html#onResize">onResize</a></dd><dt>Methods borrowed from class <a href="../symbols/minplayer.plugin.html">minplayer.plugin</a>: </dt><dd><a href="../symbols/minplayer.plugin.html#addPlugin">addPlugin</a>, <a href="../symbols/minplayer.plugin.html#bind">bind</a>, <a href="../symbols/minplayer.plugin.html#checkQueue">checkQueue</a>, <a href="../symbols/minplayer.plugin.html#get">get</a>, <a href="../symbols/minplayer.plugin.html#loadPlugins">loadPlugins</a>, <a href="../symbols/minplayer.plugin.html#ready">ready</a>, <a href="../symbols/minplayer.plugin.html#trigger">trigger</a>, <a href="../symbols/minplayer.plugin.html#unbind">unbind</a></dd>
+ <dt>Methods borrowed from class <a href="../symbols/minplayer.players.base.html">minplayer.players.base</a>: </dt><dd><a href="../symbols/minplayer.players.base.html#construct">construct</a>, <a href="../symbols/minplayer.players.base.html#destroy">destroy</a>, <a href="../symbols/minplayer.players.base.html#getPlayer">getPlayer</a>, <a href="../symbols/minplayer.players.base.html#isReady">isReady</a>, <a href="../symbols/minplayer.players.base.html#onComplete">onComplete</a>, <a href="../symbols/minplayer.players.base.html#onError">onError</a>, <a href="../symbols/minplayer.players.base.html#onLoaded">onLoaded</a>, <a href="../symbols/minplayer.players.base.html#onPaused">onPaused</a>, <a href="../symbols/minplayer.players.base.html#onPlaying">onPlaying</a>, <a href="../symbols/minplayer.players.base.html#onWaiting">onWaiting</a>, <a href="../symbols/minplayer.players.base.html#poll">poll</a>, <a href="../symbols/minplayer.players.base.html#reset">reset</a>, <a href="../symbols/minplayer.players.base.html#seekRelative">seekRelative</a>, <a href="../symbols/minplayer.players.base.html#setVolumeRelative">setVolumeRelative</a></dd><dt>Methods borrowed from class <a href="../symbols/minplayer.display.html">minplayer.display</a>: </dt><dd><a href="../symbols/minplayer.display.html#getDisplay">getDisplay</a>, <a href="../symbols/minplayer.display.html#getElements">getElements</a>, <a href="../symbols/minplayer.display.html#getScaledRect">getScaledRect</a>, <a href="../symbols/minplayer.display.html#isValid">isValid</a>, <a href="../symbols/minplayer.display.html#onResize">onResize</a></dd><dt>Methods borrowed from class <a href="../symbols/minplayer.plugin.html">minplayer.plugin</a>: </dt><dd><a href="../symbols/minplayer.plugin.html#addPlugin">addPlugin</a>, <a href="../symbols/minplayer.plugin.html#bind">bind</a>, <a href="../symbols/minplayer.plugin.html#checkQueue">checkQueue</a>, <a href="../symbols/minplayer.plugin.html#get">get</a>, <a href="../symbols/minplayer.plugin.html#loadPlugins">loadPlugins</a>, <a href="../symbols/minplayer.plugin.html#ready">ready</a>, <a href="../symbols/minplayer.plugin.html#trigger">trigger</a>, <a href="../symbols/minplayer.plugin.html#unbind">unbind</a></dd>
</dl>
@@ -1558,7 +1558,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:34 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
2  doc/symbols/minplayer.plugin.html
@@ -1049,7 +1049,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 12:46:34 GMT-0800 (PST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Feb 27 2012 18:11:58 GMT-0800 (PST)
</div>
</body>
</html>
View
110 doc/symbols/src/src_minplayer.controller.base.js.html
@@ -242,58 +242,62 @@
<span class='line'>235</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>236</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>237</span>
-<span class='line'>238</span> </span><span class="WHIT"> </span><span class="COMM">// Set the volume to match that of the player.</span><span class="WHIT">
-<span class='line'>239</span> </span><span class="WHIT"> </span><span class="NAME">media.getVolume</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">vol</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>240</span> </span><span class="WHIT"> </span><span class="NAME">_this.volumeBar.slider</span><span class="PUNC">(</span><span class="STRN">'option'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'value'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">vol</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>241</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>242</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>243</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>244</span>
-<span class='line'>245</span> </span><span class="WHIT"> </span><span class="COMM">// We are now ready.</span><span class="WHIT">
-<span class='line'>246</span> </span><span class="WHIT"> </span><span class="NAME">this.ready</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>247</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>238</span> </span><span class="WHIT"> </span><span class="NAME">media.bind</span><span class="PUNC">(</span><span class="STRN">'volumeupdate'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">vol</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>239</span> </span><span class="WHIT"> </span><span class="NAME">event.data.obj.volumeBar.slider</span><span class="PUNC">(</span><span class="STRN">'option'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'value'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">vol</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>240</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>241</span>
+<span class='line'>242</span> </span><span class="WHIT"> </span><span class="COMM">// Set the volume to match that of the player.</span><span class="WHIT">
+<span class='line'>243</span> </span><span class="WHIT"> </span><span class="NAME">media.getVolume</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">vol</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>244</span> </span><span class="WHIT"> </span><span class="NAME">_this.volumeBar.slider</span><span class="PUNC">(</span><span class="STRN">'option'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'value'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">vol</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>245</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>246</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
+<span class='line'>247</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>248</span>
-<span class='line'>249</span> </span><span class="COMM">/**
-<span class='line'>250</span> * Sets the play and pause state of the control bar.
-<span class='line'>251</span> *
-<span class='line'>252</span> * @param {boolean} state TRUE - Show Play, FALSE - Show Pause.
-<span class='line'>253</span> */</span><span class="WHIT">
-<span class='line'>254</span> </span><span class="NAME">minplayer.controller.base.prototype.setPlayPause</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">state</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>255</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">css</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>256</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.elements.play</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>257</span> </span><span class="WHIT"> </span><span class="NAME">css</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">state</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'inherit'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'none'</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>258</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.play.css</span><span class="PUNC">(</span><span class="STRN">'display'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">css</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>259</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>260</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.elements.pause</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>261</span> </span><span class="WHIT"> </span><span class="NAME">css</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">state</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'none'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'inherit'</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>262</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.pause.css</span><span class="PUNC">(</span><span class="STRN">'display'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">css</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>249</span> </span><span class="WHIT"> </span><span class="COMM">// We are now ready.</span><span class="WHIT">
+<span class='line'>250</span> </span><span class="WHIT"> </span><span class="NAME">this.ready</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>251</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>252</span>
+<span class='line'>253</span> </span><span class="COMM">/**
+<span class='line'>254</span> * Sets the play and pause state of the control bar.
+<span class='line'>255</span> *
+<span class='line'>256</span> * @param {boolean} state TRUE - Show Play, FALSE - Show Pause.
+<span class='line'>257</span> */</span><span class="WHIT">
+<span class='line'>258</span> </span><span class="NAME">minplayer.controller.base.prototype.setPlayPause</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">state</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>259</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">css</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>260</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.elements.play</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>261</span> </span><span class="WHIT"> </span><span class="NAME">css</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">state</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'inherit'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'none'</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>262</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.play.css</span><span class="PUNC">(</span><span class="STRN">'display'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">css</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>263</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>264</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>265</span>
-<span class='line'>266</span> </span><span class="COMM">/**
-<span class='line'>267</span> * Plays or pauses the media.
-<span class='line'>268</span> *
-<span class='line'>269</span> * @param {bool} state true => play, false => pause.
-<span class='line'>270</span> * @param {object} media The media player object.
-<span class='line'>271</span> */</span><span class="WHIT">
-<span class='line'>272</span> </span><span class="NAME">minplayer.controller.base.prototype.playPause</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">state</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">media</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>273</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">state</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'play'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'pause'</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>274</span> </span><span class="WHIT"> </span><span class="NAME">this.display.trigger</span><span class="PUNC">(</span><span class="NAME">type</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>275</span> </span><span class="WHIT"> </span><span class="NAME">this.setPlayPause</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">state</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>276</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">media</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>277</span> </span><span class="WHIT"> </span><span class="NAME">media</span><span class="PUNC">[</span><span class="NAME">type</span><span class="PUNC">]</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>278</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>279</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>280</span>
-<span class='line'>281</span> </span><span class="COMM">/**
-<span class='line'>282</span> * Sets the time string on the control bar.
-<span class='line'>283</span> *
-<span class='line'>284</span> * @param {string} element The name of the element to set.
-<span class='line'>285</span> * @param {number} time The total time amount to set.
-<span class='line'>286</span> */</span><span class="WHIT">
-<span class='line'>287</span> </span><span class="NAME">minplayer.controller.base.prototype.setTimeString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">element</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">time</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>288</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.elements</span><span class="PUNC">[</span><span class="NAME">element</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>289</span> </span><span class="WHIT"> </span><span class="NAME">this.elements</span><span class="PUNC">[</span><span class="NAME">element</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">text</span><span class="PUNC">(</span><span class="NAME">minplayer.formatTime</span><span class="PUNC">(</span><span class="NAME">time</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">time</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>290</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>291</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>292</span> </span></pre></body></html>
+<span class='line'>264</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.elements.pause</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>265</span> </span><span class="WHIT"> </span><span class="NAME">css</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">state</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'none'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'inherit'</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>266</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.pause.css</span><span class="PUNC">(</span><span class="STRN">'display'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">css</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>267</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
+<span class='line'>268</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>269</span>
+<span class='line'>270</span> </span><span class="COMM">/**
+<span class='line'>271</span> * Plays or pauses the media.
+<span class='line'>272</span> *
+<span class='line'>273</span> * @param {bool} state true => play, false => pause.
+<span class='line'>274</span> * @param {object} media The media player object.
+<span class='line'>275</span> */</span><span class="WHIT">
+<span class='line'>276</span> </span><span class="NAME">minplayer.controller.base.prototype.playPause</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">state</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">media</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>277</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">state</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'play'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'pause'</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>278</span> </span><span class="WHIT"> </span><span class="NAME">this.display.trigger</span><span class="PUNC">(</span><span class="NAME">type</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>279</span> </span><span class="WHIT"> </span><span class="NAME">this.setPlayPause</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">state</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>280</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">media</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>281</span> </span><span class="WHIT"> </span><span class="NAME">media</span><span class="PUNC">[</span><span class="NAME">type</span><span class="PUNC">]</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>282</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
+<span class='line'>283</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>284</span>
+<span class='line'>285</span> </span><span class="COMM">/**
+<span class='line'>286</span> * Sets the time string on the control bar.
+<span class='line'>287</span> *
+<span class='line'>288</span> * @param {string} element The name of the element to set.
+<span class='line'>289</span> * @param {number} time The total time amount to set.
+<span class='line'>290</span> */</span><span class="WHIT">
+<span class='line'>291</span> </span><span class="NAME">minplayer.controller.base.prototype.setTimeString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">element</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">time</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>292</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.elements</span><span class="PUNC">[</span><span class="NAME">element</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>293</span> </span><span class="WHIT"> </span><span class="NAME">this.elements</span><span class="PUNC">[</span><span class="NAME">element</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">text</span><span class="PUNC">(</span><span class="NAME">minplayer.formatTime</span><span class="PUNC">(</span><span class="NAME">time</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">time</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>294</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
+<span class='line'>295</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>296</span> </span></pre></body></html>
View
440 doc/symbols/src/src_minplayer.js.html
@@ -131,226 +131,224 @@
<span class='line'>124</span> </span><span class="WHIT"> </span><span class="COMM">// Bind to the error event.</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT"> </span><span class="NAME">plugin.bind</span><span class="PUNC">(</span><span class="STRN">'error'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>126</span>
-<span class='line'>127</span> </span><span class="WHIT"> </span><span class="COMM">// Log this to console.</span><span class="WHIT">
-<span class='line'>128</span> </span><span class="WHIT"> </span><span class="NAME">minplayer.console.log</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>129</span>
-<span class='line'>130</span> </span><span class="WHIT"> </span><span class="COMM">// If an error occurs within the html5 media player, then try</span><span class="WHIT">
-<span class='line'>131</span> </span><span class="WHIT"> </span><span class="COMM">// to fall back to the flash player.</span><span class="WHIT">
-<span class='line'>132</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">_this.currentPlayer</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'html5'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>133</span> </span><span class="WHIT"> </span><span class="NAME">_this.options.file.player</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'minplayer'</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>134</span> </span><span class="WHIT"> </span><span class="NAME">_this.loadPlayer</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>127</span> </span><span class="WHIT"> </span><span class="COMM">// If an error occurs within the html5 media player, then try</span><span class="WHIT">
+<span class='line'>128</span> </span><span class="WHIT"> </span><span class="COMM">// to fall back to the flash player.</span><span class="WHIT">
+<span class='line'>129</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">_this.currentPlayer</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'html5'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>130</span> </span><span class="WHIT"> </span><span class="NAME">_this.options.file.player</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'minplayer'</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>131</span> </span><span class="WHIT"> </span><span class="NAME">_this.loadPlayer</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>132</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
+<span class='line'>133</span> </span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>134</span> </span><span class="WHIT"> </span><span class="NAME">_this.error</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>136</span> </span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>137</span> </span><span class="WHIT"> </span><span class="NAME">_this.error</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>138</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>139</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>140</span>
-<span class='line'>141</span> </span><span class="WHIT"> </span><span class="COMM">// Bind to the fullscreen event.</span><span class="WHIT">
-<span class='line'>142</span> </span><span class="WHIT"> </span><span class="NAME">plugin.bind</span><span class="PUNC">(</span><span class="STRN">'fullscreen'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>143</span> </span><span class="WHIT"> </span><span class="NAME">_this.resize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>144</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>145</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>146</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>147</span>
-<span class='line'>148</span> </span><span class="COMM">/**
-<span class='line'>149</span> * Sets an error on the player.
-<span class='line'>150</span> *
-<span class='line'>151</span> * @param {string} error The error to display on the player.
-<span class='line'>152</span> */</span><span class="WHIT">
-<span class='line'>153</span> </span><span class="NAME">minplayer.prototype.error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">error</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>154</span> </span><span class="WHIT"> </span><span class="NAME">error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">error</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>155</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.elements.error</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>156</span>
-<span class='line'>157</span> </span><span class="WHIT"> </span><span class="COMM">// Set the error text.</span><span class="WHIT">
-<span class='line'>158</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.error.text</span><span class="PUNC">(</span><span class="NAME">error</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>159</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">error</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>160</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.error.show</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>136</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>137</span>
+<span class='line'>138</span> </span><span class="WHIT"> </span><span class="COMM">// Bind to the fullscreen event.</span><span class="WHIT">
+<span class='line'>139</span> </span><span class="WHIT"> </span><span class="NAME">plugin.bind</span><span class="PUNC">(</span><span class="STRN">'fullscreen'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>140</span> </span><span class="WHIT"> </span><span class="NAME">_this.resize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>141</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>142</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>143</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>144</span>
+<span class='line'>145</span> </span><span class="COMM">/**
+<span class='line'>146</span> * Sets an error on the player.
+<span class='line'>147</span> *
+<span class='line'>148</span> * @param {string} error The error to display on the player.
+<span class='line'>149</span> */</span><span class="WHIT">
+<span class='line'>150</span> </span><span class="NAME">minplayer.prototype.error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">error</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>151</span> </span><span class="WHIT"> </span><span class="NAME">error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">error</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>152</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.elements.error</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>153</span>
+<span class='line'>154</span> </span><span class="WHIT"> </span><span class="COMM">// Set the error text.</span><span class="WHIT">
+<span class='line'>155</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.error.text</span><span class="PUNC">(</span><span class="NAME">error</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>156</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">error</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>157</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.error.show</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
+<span class='line'>158</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
+<span class='line'>159</span> </span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>160</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.error.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>162</span> </span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>163</span> </span><span class="WHIT"> </span><span class="NAME">this.elements.error.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>164</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>165</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>166</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>167</span>
-<span class='line'>168</span> </span><span class="COMM">/**
-<span class='line'>169</span> * Adds key events to the player.
-<span class='line'>170</span> */</span><span class="WHIT">
-<span class='line'>171</span> </span><span class="NAME">minplayer.prototype.addKeyEvents</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>172</span>
-<span class='line'>173</span> </span><span class="WHIT"> </span><span class="COMM">// Bind keyup to the current window.</span><span class="WHIT">
-<span class='line'>174</span> </span><span class="WHIT"> </span><span class="NAME">jQuery</span><span class="PUNC">(</span><span class="NAME">window</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">bind</span><span class="PUNC">(</span><span class="STRN">'keyup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>175</span> </span><span class="WHIT"> </span><span class="COMM">// Escape out of fullscreen if they press ESC or Q.</span><span class="WHIT">
-<span class='line'>176</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isFull</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">event.data.obj.display.hasClass</span><span class="PUNC">(</span><span class="STRN">'fullscreen'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>177</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">isFull</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">event.keyCode</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">113</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">event.keyCode</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">27</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>178</span> </span><span class="WHIT"> </span><span class="NAME">event.data.obj.display.removeClass</span><span class="PUNC">(</span><span class="STRN">'fullscreen'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>179</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>180</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>181</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>182</span>
-<span class='line'>183</span> </span><span class="COMM">/**
-<span class='line'>184</span> * Returns all the media files available for this player.
-<span class='line'>185</span> *
-<span class='line'>186</span> * @return {array} All the media files for this player.
-<span class='line'>187</span> */</span><span class="WHIT">
-<span class='line'>188</span> </span><span class="NAME">minplayer.prototype.getFiles</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>189</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">files</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>190</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mediaSrc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>191</span>
-<span class='line'>192</span> </span><span class="WHIT"> </span><span class="COMM">// Get the files involved...</span><span class="WHIT">
-<span class='line'>193</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.elements.media</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>194</span> </span><span class="WHIT"> </span><span class="NAME">mediaSrc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.elements.media.attr</span><span class="PUNC">(</span><span class="STRN">'src'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>195</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">mediaSrc</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>196</span> </span><span class="WHIT"> </span><span class="NAME">files.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'path'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">mediaSrc</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>197</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>198</span> </span><span class="WHIT"> </span><span class="NAME">jQuery</span><span class="PUNC">(</span><span class="STRN">'source'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.elements.media</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">each</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>199</span> </span><span class="WHIT"> </span><span class="NAME">files.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>200</span> </span><span class="WHIT"> </span><span class="STRN">'path'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jQuery</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'src'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>201</span> </span><span class="WHIT"> </span><span class="STRN">'mimetype'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jQuery</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'type'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>202</span> </span><span class="WHIT"> </span><span class="STRN">'codecs'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jQuery</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'codecs'</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>203</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>204</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>205</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>206</span>
-<span class='line'>207</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">files</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>208</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>209</span>
-<span class='line'>210</span> </span><span class="COMM">/**
-<span class='line'>211</span> * Returns the full media player object.
-<span class='line'>212</span> * @param {array} files An array of files to chose from.
-<span class='line'>213</span> * @return {object} The best media file to play in the current browser.
-<span class='line'>214</span> */</span><span class="WHIT">
-<span class='line'>215</span> </span><span class="NAME">minplayer.prototype.getMediaFile</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">files</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>216</span>
-<span class='line'>217</span> </span><span class="WHIT"> </span><span class="COMM">// If there are no files then return null.</span><span class="WHIT">
-<span class='line'>218</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">files</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>219</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>220</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>221</span>
-<span class='line'>222</span> </span><span class="WHIT"> </span><span class="COMM">// If the file is a single string, then return the file object.</span><span class="WHIT">
-<span class='line'>223</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">files</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>224</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">minplayer.file</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'path'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">files</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>225</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>226</span>
-<span class='line'>227</span> </span><span class="WHIT"> </span><span class="COMM">// If the file is already a file object then just return.</span><span class="WHIT">
-<span class='line'>228</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">files.path</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>229</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">minplayer.file</span><span class="PUNC">(</span><span class="NAME">files</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>230</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>231</span>
-<span class='line'>232</span> </span><span class="WHIT"> </span><span class="COMM">// Add the files and get the best player to play.</span><span class="WHIT">
-<span class='line'>233</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">files.length</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bestPriority</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mFile</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">file</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>234</span> </span><span class="WHIT"> </span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">--</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>235</span> </span><span class="WHIT"> </span><span class="NAME">file</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">files</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>236</span>
-<span class='line'>237</span> </span><span class="WHIT"> </span><span class="COMM">// Get the minplayer file object.</span><span class="WHIT">
-<span class='line'>238</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">file</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>239</span> </span><span class="WHIT"> </span><span class="NAME">file</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">minplayer.file</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'path'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">file</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>240</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>241</span> </span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>242</span> </span><span class="WHIT"> </span><span class="NAME">file</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">minplayer.file</span><span class="PUNC">(</span><span class="NAME">file</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>243</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>244</