jquery.jplayer.min.js 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. (function(c,j){if(typeof define==="function"&&define.amd)define(["jquery"],j);else if(typeof exports==="object")j(require("jquery"));else c.jQuery?j(c.jQuery):j(c.Zepto)})(this,function(c,j){c.fn.jPlayer=function(a){var b=typeof a==="string",d=Array.prototype.slice.call(arguments,1),e=this;a=!b&&d.length?c.extend.apply(null,[true,a].concat(d)):a;if(b&&a.charAt(0)==="_")return e;b?this.each(function(){var f=c(this).data("jPlayer"),g=f&&c.isFunction(f[a])?f[a].apply(f,d):f;if(g!==f&&g!==j){e=g;return false}}):
  2. this.each(function(){var f=c(this).data("jPlayer");f?f.option(a||{}):c(this).data("jPlayer",new c.jPlayer(a,this))});return e};c.jPlayer=function(a,b){if(arguments.length){this.element=c(b);this.options=c.extend(true,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};if(typeof c.fn.stop!=="function")c.fn.stop=function(){};c.jPlayer.emulateMethods="load play pause";c.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";
  3. c.jPlayer.emulateOptions="muted volume";c.jPlayer.reservedEvent="ready flashreset resize repeat error warning";c.jPlayer.event={};c.each(["ready","setmedia","flashreset","resize","repeat","click","error","warning","loadstart","progress","suspend","abort","emptied","stalled","play","pause","loadedmetadata","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange"],function(){c.jPlayer.event[this]="jPlayer_"+this});
  4. c.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","canplay","canplaythrough"];c.jPlayer.pause=function(){c.jPlayer.prototype.destroyRemoved();c.each(c.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})};c.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};var n=function(){this.init()};n.prototype={init:function(){this.options={timeFormat:c.jPlayer.timeFormat}},
  5. time:function(a){a=a&&typeof a==="number"?a:0;var b=new Date(a*1E3);a=b.getUTCHours();var d=this.options.timeFormat.showHour?b.getUTCMinutes():b.getUTCMinutes()+a*60;b=this.options.timeFormat.showMin?b.getUTCSeconds():b.getUTCSeconds()+d*60;a=this.options.timeFormat.padHour&&a<10?"0"+a:a;d=this.options.timeFormat.padMin&&d<10?"0"+d:d;b=this.options.timeFormat.padSec&&b<10?"0"+b:b;var e="";e+=this.options.timeFormat.showHour?a+this.options.timeFormat.sepHour:"";e+=this.options.timeFormat.showMin?d+
  6. this.options.timeFormat.sepMin:"";e+=this.options.timeFormat.showSec?b+this.options.timeFormat.sepSec:"";return e}};var o=new n;c.jPlayer.convertTime=function(a){return o.time(a)};c.jPlayer.uaBrowser=function(a){a=a.toLowerCase();var b=/(opera)(?:.*version)?[ \/]([\w.]+)/,d=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||b.exec(a)||d.exec(a)||a.indexOf("compatible")<0&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};c.jPlayer.uaPlatform=function(a){var b=
  7. a.toLowerCase(),d=/(android)/,e=/(mobile)/;a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(b)||[];b=/(ipad|playbook)/.exec(b)||!e.exec(b)&&d.exec(b)||[];if(a[1])a[1]=a[1].replace(/\s/g,"_");return{platform:a[1]||"",tablet:b[1]||""}};c.jPlayer.browser={};c.jPlayer.platform={};var l=c.jPlayer.uaBrowser(navigator.userAgent);if(l.browser){c.jPlayer.browser[l.browser]=true;c.jPlayer.browser.version=l.version}l=c.jPlayer.uaPlatform(navigator.userAgent);if(l.platform){c.jPlayer.platform[l.platform]=
  8. true;c.jPlayer.platform.mobile=!l.tablet;c.jPlayer.platform.tablet=!!l.tablet}c.jPlayer.getDocMode=function(){var a;if(c.jPlayer.browser.msie)if(document.documentMode)a=document.documentMode;else{a=5;if(document.compatMode)if(document.compatMode==="CSS1Compat")a=7}return a};c.jPlayer.browser.documentMode=c.jPlayer.getDocMode();c.jPlayer.nativeFeatures={init:function(){var a=document,b=a.createElement("video"),d={w3c:["fullscreenEnabled","fullscreenElement","requestFullscreen","exitFullscreen","fullscreenchange",
  9. "fullscreenerror"],moz:["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror"],webkit:["","webkitCurrentFullScreenElement","webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange",""],webkitVideo:["webkitSupportsFullscreen","webkitDisplayingFullscreen","webkitEnterFullscreen","webkitExitFullscreen","",""],ms:["","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError"]},
  10. e=["w3c","moz","webkit","webkitVideo","ms"],f,g;this.fullscreen=b={support:{w3c:!!a[d.w3c[0]],moz:!!a[d.moz[0]],webkit:typeof a[d.webkit[3]]==="function",webkitVideo:typeof b[d.webkitVideo[2]]==="function",ms:typeof b[d.ms[2]]==="function"},used:{}};f=0;for(g=e.length;f<g;f++){var i=e[f];if(b.support[i]){b.spec=i;b.used[i]=true;break}}if(b.spec){var h=d[b.spec];b.api={fullscreenEnabled:true,fullscreenElement:function(k){k=k?k:a;return k[h[1]]},requestFullscreen:function(k){return k[h[2]]()},exitFullscreen:function(k){k=
  11. k?k:a;return k[h[3]]()}};b.event={fullscreenchange:h[4],fullscreenerror:h[5]}}else{b.api={fullscreenEnabled:false,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}};b.event={}}}};c.jPlayer.nativeFeatures.init();c.jPlayer.focus=null;c.jPlayer.keyIgnoreElementNames="A INPUT TEXTAREA SELECT BUTTON";var p=function(a){var b=c.jPlayer.focus,d;if(b){c.each(c.jPlayer.keyIgnoreElementNames.split(/\s+/g),function(e,f){if(a.target.nodeName.toUpperCase()===f.toUpperCase()){d=
  12. true;return false}});d||c.each(b.options.keyBindings,function(e,f){if(f&&c.isFunction(f.fn)&&(typeof f.key==="number"&&a.which===f.key||typeof f.key==="string"&&a.key===f.key)){a.preventDefault();f.fn(b);return false}})}};c.jPlayer.keys=function(a){c(document.documentElement).unbind("keydown.jPlayer");a&&c(document.documentElement).bind("keydown.jPlayer",p)};c.jPlayer.keys(true);c.jPlayer.prototype={count:0,version:{script:"2.9.2",needFlash:"2.9.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",
  13. supplied:"mp3",auroraFormats:"wav",preload:"metadata",volume:0.8,muted:false,remainingDuration:false,toggleDuration:false,captureDuration:true,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:0.5,maxPlaybackRate:4,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",
  14. volumeMax:".jp-volume-max",playbackRateBar:".jp-playback-rate-bar",playbackRateBarValue:".jp-playback-rate-bar-value",currentTime:".jp-current-time",duration:".jp-duration",title:".jp-title",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},stateClass:{playing:"jp-state-playing",seeking:"jp-state-seeking",muted:"jp-state-muted",looped:"jp-state-looped",fullScreen:"jp-state-full-screen",noVolume:"jp-state-no-volume"},
  15. useStateClassSkin:false,autoBlur:true,smoothPlayBar:false,fullScreen:false,fullWindow:false,autohide:{restored:false,full:true,fadeIn:200,fadeOut:600,hold:1E3},loop:false,repeat:function(a){a.jPlayer.options.loop?c(this).unbind(".jPlayerRepeat").bind(c.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){c(this).jPlayer("play")}):c(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullWindow:{msie:/msie [0-6]\./,ipad:/ipad.*?os [0-4]\./,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3]\.(?!.*?mobile)/,
  16. android_phone:/(?=.*android)(?!.*chrome)(?=.*mobile)/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/,playbook:/playbook/},timeFormat:{},keyEnabled:false,audioFullScreen:false,keyBindings:{play:{key:80,fn:function(a){a.status.paused?a.play():a.pause()}},fullScreen:{key:70,
  17. fn:function(a){if(a.status.video||a.options.audioFullScreen)a._setOption("fullScreen",!a.options.fullScreen)}},muted:{key:77,fn:function(a){a._muted(!a.options.muted)}},volumeUp:{key:190,fn:function(a){a.volume(a.options.volume+0.1)}},volumeDown:{key:188,fn:function(a){a.volume(a.options.volume-0.1)}},loop:{key:76,fn:function(a){a._loop(!a.options.loop)}}},verticalVolume:false,verticalPlaybackRate:false,globalVolume:false,idPrefix:"jp",noConflict:"jQuery",emulateHtml:false,consoleAlerts:true,errorAlerts:false,
  18. warningAlerts:false},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:true,format:{},formatType:"",waitForPlay:true,waitForLoad:true,srcSet:false,video:false,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,remaining:0,videoWidth:0,
  19. videoHeight:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:false},solution:{html:true,aurora:true,flash:true},format:{mp3:{codec:"audio/mpeg",flashCanPlay:true,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:true,media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',flashCanPlay:false,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:false,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:false,media:"audio"},
  20. flac:{codec:"audio/x-flac",flashCanPlay:false,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:false,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:false,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:true,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:true,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:true,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',
  21. flashCanPlay:false,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:false,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:false,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:false,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:true,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:true,media:"video"}},_init:function(){var a=this;this.element.empty();this.status=c.extend({},this.status);this.internal=c.extend({},
  22. this.internal);this.options.timeFormat=c.extend({},c.jPlayer.timeFormat,this.options.timeFormat);this.internal.cmdsIgnored=c.jPlayer.platform.ipad||c.jPlayer.platform.iphone||c.jPlayer.platform.ipod;this.internal.domNode=this.element.get(0);if(this.options.keyEnabled&&!c.jPlayer.focus)c.jPlayer.focus=this;this.androidFix={setMedia:false,play:false,pause:false,time:NaN};if(c.jPlayer.platform.android)this.options.preload=this.options.preload!=="auto"?"metadata":"auto";this.formats=[];this.solutions=
  23. [];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.aurora={};this.aurora.formats=[];this.aurora.properties=[];this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);c.each(this.options.supplied.toLowerCase().split(","),function(f,g){var i=g.replace(/^\s+|\s+$/g,"");if(a.format[i]){var h=false;c.each(a.formats,function(k,m){if(i===m){h=true;return false}});h||a.formats.push(i)}});
  24. c.each(this.options.solution.toLowerCase().split(","),function(f,g){var i=g.replace(/^\s+|\s+$/g,"");if(a.solution[i]){var h=false;c.each(a.solutions,function(k,m){if(i===m){h=true;return false}});h||a.solutions.push(i)}});c.each(this.options.auroraFormats.toLowerCase().split(","),function(f,g){var i=g.replace(/^\s+|\s+$/g,"");if(a.format[i]){var h=false;c.each(a.aurora.formats,function(k,m){if(i===m){h=true;return false}});h||a.aurora.formats.push(i)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=
  25. this.element;this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=c.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=c.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:j});this.internal.video=c.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:j});this.internal.flash=c.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:j,swf:this.options.swfPath+(this.options.swfPath.toLowerCase().slice(-4)!==
  26. ".swf"?(this.options.swfPath&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"jquery.jplayer.swf":"")});this.internal.poster=c.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:j});c.each(c.jPlayer.event,function(f,g){if(a.options[f]!==j){a.element.bind(g+".jPlayer",a.options[f]);a.options[f]=j}});this.require.audio=false;this.require.video=false;c.each(this.formats,function(f,g){a.require[a.format[g].media]=true});this.options=this.require.video?c.extend(true,{},this.optionsVideo,this.options):
  27. c.extend(true,{},this.optionsAudio,this.options);this._setSize();this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow);this.status.noVolume=this._uaBlocklist(this.options.noVolume);c.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled&&this._fullscreenAddEventListeners();this._restrictNativeVideoControls();this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=this.internal.poster.id;
  28. this.htmlElement.poster.onload=function(){if(!a.status.video||a.status.waitForPlay)a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=c("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.internal.poster.jq.bind("click.jPlayer",function(){a._trigger(c.jPlayer.event.click)});this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=document.createElement("audio");
  29. this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)}this.flash.available=this._checkForFlash(10.1);this.html.canPlay={};this.aurora.canPlay=
  30. {};this.flash.canPlay={};c.each(this.formats,function(f,g){a.html.canPlay[g]=a.html[a.format[g].media].available&&""!==a.htmlElement[a.format[g].media].canPlayType(a.format[g].codec);a.aurora.canPlay[g]=c.inArray(g,a.aurora.formats)>-1;a.flash.canPlay[g]=a.format[g].flashCanPlay&&a.flash.available});this.html.desired=false;this.aurora.desired=false;this.flash.desired=false;c.each(this.solutions,function(f,g){if(f===0)a[g].desired=true;else{var i=false,h=false;c.each(a.formats,function(k,m){if(a[a.solutions[0]].canPlay[m])if(a.format[m].media===
  31. "video")h=true;else i=true});a[g].desired=a.require.audio&&!i||a.require.video&&!h}});this.html.support={};this.aurora.support={};this.flash.support={};c.each(this.formats,function(f,g){a.html.support[g]=a.html.canPlay[g]&&a.html.desired;a.aurora.support[g]=a.aurora.canPlay[g]&&a.aurora.desired;a.flash.support[g]=a.flash.canPlay[g]&&a.flash.desired});this.html.used=false;this.aurora.used=false;this.flash.used=false;c.each(this.solutions,function(f,g){c.each(a.formats,function(i,h){if(a[g].support[h]){a[g].used=
  32. true;return false}})});this._resetActive();this._resetGate();this._cssSelectorAncestor(this.options.cssSelectorAncestor);if(this.html.used||this.aurora.used||this.flash.used)this.css.jq.noSolution.length&&this.css.jq.noSolution.hide();else{this._error({type:c.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:c.jPlayer.errorMsg.NO_SOLUTION,hint:c.jPlayer.errorHint.NO_SOLUTION});this.css.jq.noSolution.length&&this.css.jq.noSolution.show()}if(this.flash.used){var b,
  33. d="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(c.jPlayer.browser.msie&&(Number(c.jPlayer.browser.version)<9||c.jPlayer.browser.documentMode<9)){d=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+d+'" />','<param name="allowScriptAccess" value="always" />','<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+
  34. this.options.wmode+'" />'];b=document.createElement('<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0" tabindex="-1"></object>');for(var e=0;e<d.length;e++)b.appendChild(document.createElement(d[e]))}else{e=function(f,g,i){var h=document.createElement("param");h.setAttribute("name",g);h.setAttribute("value",i);f.appendChild(h)};b=document.createElement("object");b.setAttribute("id",this.internal.flash.id);b.setAttribute("name",this.internal.flash.id);
  35. b.setAttribute("data",this.internal.flash.swf);b.setAttribute("type","application/x-shockwave-flash");b.setAttribute("width","1");b.setAttribute("height","1");b.setAttribute("tabindex","-1");e(b,"flashvars",d);e(b,"allowscriptaccess","always");e(b,"bgcolor",this.options.backgroundColor);e(b,"wmode",this.options.wmode)}this.element.append(b);this.internal.flash.jq=c(b)}this.status.playbackRateEnabled=this.html.used&&!this.flash.used?this._testPlaybackRate("audio"):false;this._updatePlaybackRate();
  36. if(this.html.used){if(this.html.audio.available){this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio);this.element.append(this.htmlElement.audio);this.internal.audio.jq=c("#"+this.internal.audio.id)}if(this.html.video.available){this._addHtmlEventListeners(this.htmlElement.video,this.html.video);this.element.append(this.htmlElement.video);this.internal.video.jq=c("#"+this.internal.video.id);this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):
  37. this.internal.video.jq.css({width:"0px",height:"0px"});this.internal.video.jq.bind("click.jPlayer",function(){a._trigger(c.jPlayer.event.click)})}}this.options.emulateHtml&&this._emulateHtmlBridge();if((this.html.used||this.aurora.used)&&!this.flash.used)setTimeout(function(){a.internal.ready=true;a.version.flash="n/a";a._trigger(c.jPlayer.event.repeat);a._trigger(c.jPlayer.event.ready)},100);this._updateNativeVideoControls();this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();c.jPlayer.prototype.count++},
  38. destroy:function(){this.clearMedia();this._removeUiClass();this.css.jq.currentTime.length&&this.css.jq.currentTime.text("");this.css.jq.duration.length&&this.css.jq.duration.text("");c.each(this.css.jq,function(a,b){b.length&&b.unbind(".jPlayer")});this.internal.poster.jq.unbind(".jPlayer");this.internal.video.jq&&this.internal.video.jq.unbind(".jPlayer");this._fullscreenRemoveEventListeners();if(this===c.jPlayer.focus)c.jPlayer.focus=null;this.options.emulateHtml&&this._destroyHtmlBridge();this.element.removeData("jPlayer");
  39. this.element.unbind(".jPlayer");this.element.empty();delete this.instances[this.internal.instance]},destroyRemoved:function(){var a=this;c.each(this.instances,function(b,d){if(a.element!==d)if(!d.data("jPlayer")){d.jPlayer("destroy");delete a.instances[b]}})},enable:function(){},disable:function(){},_testCanPlayType:function(a){try{a.canPlayType(this.format.mp3.codec);return true}catch(b){return false}},_testPlaybackRate:function(a){a=typeof a==="string"?a:"audio";a=document.createElement(a);try{if("playbackRate"in
  40. a){a.playbackRate=0.5;return a.playbackRate===0.5}else return false}catch(b){return false}},_uaBlocklist:function(a){var b=navigator.userAgent.toLowerCase(),d=false;c.each(a,function(e,f){if(f&&f.test(b)){d=true;return false}});return d},_restrictNativeVideoControls:function(){if(this.require.audio)if(this.status.nativeVideoControls){this.status.nativeVideoControls=false;this.status.noFullWindow=true}},_updateNativeVideoControls:function(){if(this.html.video.available&&this.html.used){this.htmlElement.video.controls=
  41. this.status.nativeVideoControls;this._updateAutohide();if(this.status.nativeVideoControls&&this.require.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}else if(this.status.waitForPlay&&this.status.video){this.internal.poster.jq.show();this.internal.video.jq.css({width:"0px",height:"0px"})}}},_addHtmlEventListeners:function(a,b){var d=this;a.preload=this.options.preload;a.muted=this.options.muted;a.volume=this.options.volume;if(this.status.playbackRateEnabled){a.defaultPlaybackRate=
  42. this.options.defaultPlaybackRate;a.playbackRate=this.options.playbackRate}a.addEventListener("progress",function(){if(b.gate){if(d.internal.cmdsIgnored&&this.readyState>0)d.internal.cmdsIgnored=false;d._getHtmlStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.progress)}},false);a.addEventListener("loadeddata",function(){if(b.gate){d.androidFix.setMedia=false;if(d.androidFix.play){d.androidFix.play=false;d.play(d.androidFix.time)}if(d.androidFix.pause){d.androidFix.pause=false;d.pause(d.androidFix.time)}d._trigger(c.jPlayer.event.loadeddata)}},
  43. false);a.addEventListener("timeupdate",function(){if(b.gate){d._getHtmlStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.timeupdate)}},false);a.addEventListener("durationchange",function(){if(b.gate){d._getHtmlStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.durationchange)}},false);a.addEventListener("play",function(){if(b.gate){d._updateButtons(true);d._html_checkWaitForPlay();d._trigger(c.jPlayer.event.play)}},false);a.addEventListener("playing",function(){if(b.gate){d._updateButtons(true);
  44. d._seeked();d._trigger(c.jPlayer.event.playing)}},false);a.addEventListener("pause",function(){if(b.gate){d._updateButtons(false);d._trigger(c.jPlayer.event.pause)}},false);a.addEventListener("waiting",function(){if(b.gate){d._seeking();d._trigger(c.jPlayer.event.waiting)}},false);a.addEventListener("seeking",function(){if(b.gate){d._seeking();d._trigger(c.jPlayer.event.seeking)}},false);a.addEventListener("seeked",function(){if(b.gate){d._seeked();d._trigger(c.jPlayer.event.seeked)}},false);a.addEventListener("volumechange",
  45. function(){if(b.gate){d.options.volume=a.volume;d.options.muted=a.muted;d._updateMute();d._updateVolume();d._trigger(c.jPlayer.event.volumechange)}},false);a.addEventListener("ratechange",function(){if(b.gate){d.options.defaultPlaybackRate=a.defaultPlaybackRate;d.options.playbackRate=a.playbackRate;d._updatePlaybackRate();d._trigger(c.jPlayer.event.ratechange)}},false);a.addEventListener("suspend",function(){if(b.gate){d._seeked();d._trigger(c.jPlayer.event.suspend)}},false);a.addEventListener("ended",
  46. function(){if(b.gate){if(!c.jPlayer.browser.webkit)d.htmlElement.media.currentTime=0;d.htmlElement.media.pause();d._updateButtons(false);d._getHtmlStatus(a,true);d._updateInterface();d._trigger(c.jPlayer.event.ended)}},false);a.addEventListener("error",function(){if(b.gate){d._updateButtons(false);d._seeked();if(d.status.srcSet){clearTimeout(d.internal.htmlDlyCmdId);d.status.waitForLoad=true;d.status.waitForPlay=true;d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",
  47. height:"0px"});d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show();d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show();d._error({type:c.jPlayer.error.URL,context:d.status.src,message:c.jPlayer.errorMsg.URL,hint:c.jPlayer.errorHint.URL})}}},false);c.each(c.jPlayer.htmlEvent,function(e,f){a.addEventListener(this,function(){b.gate&&d._trigger(c.jPlayer.event[f])},false)})},_addAuroraEventListeners:function(a,b){var d=this;a.volume=this.options.volume*100;
  48. a.on("progress",function(){if(b.gate){if(d.internal.cmdsIgnored&&this.readyState>0)d.internal.cmdsIgnored=false;d._getAuroraStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.progress);a.duration>0&&d._trigger(c.jPlayer.event.timeupdate)}},false);a.on("ready",function(){b.gate&&d._trigger(c.jPlayer.event.loadeddata)},false);a.on("duration",function(){if(b.gate){d._getAuroraStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.durationchange)}},false);a.on("end",function(){if(b.gate){d._updateButtons(false);
  49. d._getAuroraStatus(a,true);d._updateInterface();d._trigger(c.jPlayer.event.ended)}},false);a.on("error",function(){if(b.gate){d._updateButtons(false);d._seeked();if(d.status.srcSet){d.status.waitForLoad=true;d.status.waitForPlay=true;d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"});d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show();d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show();d._error({type:c.jPlayer.error.URL,
  50. context:d.status.src,message:c.jPlayer.errorMsg.URL,hint:c.jPlayer.errorHint.URL})}}},false)},_getHtmlStatus:function(a,b){var d=0,e=0,f=0,g=0;if(isFinite(a.duration))this.status.duration=a.duration;d=a.currentTime;e=this.status.duration>0?100*d/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){f=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;g=this.status.duration>0?100*a.currentTime/a.seekable.end(a.seekable.length-1):0}else{f=
  51. 100;g=e}if(b)e=g=d=0;this.status.seekPercent=f;this.status.currentPercentRelative=g;this.status.currentPercentAbsolute=e;this.status.currentTime=d;this.status.remaining=this.status.duration-this.status.currentTime;this.status.videoWidth=a.videoWidth;this.status.videoHeight=a.videoHeight;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate=a.playbackRate;this.status.ended=a.ended},_getAuroraStatus:function(a,b){var d=0,e=0,f=0,g=0;this.status.duration=
  52. a.duration/1E3;d=a.currentTime/1E3;e=this.status.duration>0?100*d/this.status.duration:0;if(a.buffered>0){f=this.status.duration>0?a.buffered*this.status.duration/this.status.duration:100;g=this.status.duration>0?d/(a.buffered*this.status.duration):0}else{f=100;g=e}if(b)e=g=d=0;this.status.seekPercent=f;this.status.currentPercentRelative=g;this.status.currentPercentAbsolute=e;this.status.currentTime=d;this.status.remaining=this.status.duration-this.status.currentTime;this.status.readyState=4;this.status.networkState=
  53. 0;this.status.playbackRate=1;this.status.ended=false},_resetStatus:function(){this.status=c.extend({},this.status,c.jPlayer.prototype.status)},_trigger:function(a,b,d){a=c.Event(a);a.jPlayer={};a.jPlayer.version=c.extend({},this.version);a.jPlayer.options=c.extend(true,{},this.options);a.jPlayer.status=c.extend(true,{},this.status);a.jPlayer.html=c.extend(true,{},this.html);a.jPlayer.aurora=c.extend(true,{},this.aurora);a.jPlayer.flash=c.extend(true,{},this.flash);if(b)a.jPlayer.error=c.extend({},
  54. b);if(d)a.jPlayer.warning=c.extend({},d);this.element.trigger(a)},jPlayerFlashEvent:function(a,b){if(a===c.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);this.volumeWorker(this.options.volume);if(d>0)e?this.pause(d):this.play(d)}this._trigger(c.jPlayer.event.flashreset)}}else{this.internal.ready=true;this.internal.flash.jq.css({width:"0px",height:"0px"});this.version.flash=b.version;
  55. this.version.needFlash!==this.version.flash&&this._error({type:c.jPlayer.error.VERSION,context:this.version.flash,message:c.jPlayer.errorMsg.VERSION+this.version.flash,hint:c.jPlayer.errorHint.VERSION});this._trigger(c.jPlayer.event.repeat);this._trigger(a)}if(this.flash.gate)switch(a){case c.jPlayer.event.progress:this._getFlashStatus(b);this._updateInterface();this._trigger(a);break;case c.jPlayer.event.timeupdate:this._getFlashStatus(b);this._updateInterface();this._trigger(a);break;case c.jPlayer.event.play:this._seeked();
  56. this._updateButtons(true);this._trigger(a);break;case c.jPlayer.event.pause:this._updateButtons(false);this._trigger(a);break;case c.jPlayer.event.ended:this._updateButtons(false);this._trigger(a);break;case c.jPlayer.event.click:this._trigger(a);break;case c.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&this.internal.poster.jq.show();this.css.jq.videoPlay.length&&
  57. this.status.video&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._updateButtons(false);this._error({type:c.jPlayer.error.URL,context:b.src,message:c.jPlayer.errorMsg.URL,hint:c.jPlayer.errorHint.URL});break;case c.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case c.jPlayer.event.seeked:this._seeked();this._trigger(a);break;case c.jPlayer.event.ready:break;default:this._trigger(a)}return false},_getFlashStatus:function(a){this.status.seekPercent=
  58. a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.remaining=a.duration-a.currentTime;this.status.videoWidth=a.videoWidth;this.status.videoHeight=a.videoHeight;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=false},_updateButtons:function(a){if(a===j)a=!this.status.paused;else this.status.paused=
  59. !a;a?this.addStateClass("playing"):this.removeStateClass("playing");!this.status.noFullWindow&&this.options.fullWindow?this.addStateClass("fullScreen"):this.removeStateClass("fullScreen");this.options.loop?this.addStateClass("looped"):this.removeStateClass("looped");if(this.css.jq.play.length&&this.css.jq.pause.length)if(a){this.css.jq.play.hide();this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}if(this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length)if(this.status.noFullWindow){this.css.jq.fullScreen.hide();
  60. this.css.jq.restoreScreen.hide()}else if(this.options.fullWindow){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.show()}else{this.css.jq.fullScreen.show();this.css.jq.restoreScreen.hide()}if(this.css.jq.repeat.length&&this.css.jq.repeatOff.length)if(this.options.loop){this.css.jq.repeat.hide();this.css.jq.repeatOff.show()}else{this.css.jq.repeat.show();this.css.jq.repeatOff.hide()}},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+
  61. "%");if(this.css.jq.playBar.length)this.options.smoothPlayBar?this.css.jq.playBar.stop().animate({width:this.status.currentPercentAbsolute+"%"},250,"linear"):this.css.jq.playBar.width(this.status.currentPercentRelative+"%");var a="";if(this.css.jq.currentTime.length){a=this._convertTime(this.status.currentTime);a!==this.css.jq.currentTime.text()&&this.css.jq.currentTime.text(this._convertTime(this.status.currentTime))}a="";a=this.status.duration;var b=this.status.remaining;if(this.css.jq.duration.length){if(typeof this.status.media.duration===
  62. "string")a=this.status.media.duration;else{if(typeof this.status.media.duration==="number"){a=this.status.media.duration;b=a-this.status.currentTime}a=this.options.remainingDuration?(b>0?"-":"")+this._convertTime(b):this._convertTime(a)}a!==this.css.jq.duration.text()&&this.css.jq.duration.text(a)}},_convertTime:n.prototype.time,_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg");this.addStateClass("seeking")},_seeked:function(){this.css.jq.seekBar.length&&
  63. this.css.jq.seekBar.removeClass("jp-seeking-bg");this.removeStateClass("seeking")},_resetGate:function(){this.html.audio.gate=false;this.html.video.gate=false;this.aurora.gate=false;this.flash.gate=false},_resetActive:function(){this.html.active=false;this.aurora.active=false;this.flash.active=false},_escapeHtml:function(a){return a.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")},_qualifyURL:function(a){var b=document.createElement("div");b.innerHTML=
  64. '<a href="'+this._escapeHtml(a)+'">x</a>';return b.firstChild.href},_absoluteMediaUrls:function(a){var b=this;c.each(a,function(d,e){if(e&&b.format[d]&&e.substr(0,5)!=="data:")a[d]=b._qualifyURL(e)});return a},addStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.addClass(this.options.stateClass[a])},removeStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.removeClass(this.options.stateClass[a])},setMedia:function(a){var b=this,d=false,e=this.status.media.poster!==a.poster;
  65. this._resetMedia();this._resetGate();this._resetActive();this.androidFix.setMedia=false;this.androidFix.play=false;this.androidFix.pause=false;a=this._absoluteMediaUrls(a);c.each(this.formats,function(f,g){var i=b.format[g].media==="video";c.each(b.solutions,function(h,k){if(b[k].support[g]&&b._validString(a[g])){h=k==="html";k=k==="aurora";if(i){if(h){b.html.video.gate=true;b._html_setVideo(a);b.html.active=true}else{b.flash.gate=true;b._flash_setVideo(a);b.flash.active=true}b.css.jq.videoPlay.length&&
  66. b.css.jq.videoPlay.show();b.status.video=true}else{if(h){b.html.audio.gate=true;b._html_setAudio(a);b.html.active=true;if(c.jPlayer.platform.android)b.androidFix.setMedia=true}else if(k){b.aurora.gate=true;b._aurora_setAudio(a);b.aurora.active=true}else{b.flash.gate=true;b._flash_setAudio(a);b.flash.active=true}b.css.jq.videoPlay.length&&b.css.jq.videoPlay.hide();b.status.video=false}d=true;return false}});if(d)return false});if(d){if(!(this.status.nativeVideoControls&&this.html.video.gate))if(this._validString(a.poster))if(e)this.htmlElement.poster.src=
  67. a.poster;else this.internal.poster.jq.show();if(typeof a.title==="string"){this.css.jq.title.length&&this.css.jq.title.html(a.title);this.htmlElement.audio&&this.htmlElement.audio.setAttribute("title",a.title);this.htmlElement.video&&this.htmlElement.video.setAttribute("title",a.title)}this.status.srcSet=true;this.status.media=c.extend({},a);this._updateButtons(false);this._updateInterface();this._trigger(c.jPlayer.event.setmedia)}else this._error({type:c.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+
  68. this.options.supplied+"'}",message:c.jPlayer.errorMsg.NO_SUPPORT,hint:c.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(false);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);if(this.html.active)this._html_resetMedia();else if(this.aurora.active)this._aurora_resetMedia();else this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia();if(this.html.active)this._html_clearMedia();
  69. else if(this.aurora.active)this._aurora_clearMedia();else this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){if(this.status.srcSet)if(this.html.active)this._html_load();else if(this.aurora.active)this._aurora_load();else this.flash.active&&this._flash_load();else this._urlNotSetError("load")},focus:function(){if(this.options.keyEnabled)c.jPlayer.focus=this},play:function(a){if(typeof a==="object"&&this.options.useStateClassSkin&&!this.status.paused)this.pause(a);
  70. else{a=typeof a==="number"?a:NaN;if(this.status.srcSet){this.focus();if(this.html.active)this._html_play(a);else if(this.aurora.active)this._aurora_play(a);else this.flash.active&&this._flash_play(a)}else this._urlNotSetError("play")}},videoPlay:function(){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet)if(this.html.active)this._html_pause(a);else if(this.aurora.active)this._aurora_pause(a);else this.flash.active&&this._flash_pause(a);else this._urlNotSetError("pause")},
  71. tellOthers:function(a,b){var d=this,e=typeof b==="function",f=Array.prototype.slice.call(arguments);if(typeof a==="string"){e&&f.splice(1,1);c.jPlayer.prototype.destroyRemoved();c.each(this.instances,function(){if(d.element!==this)if(!e||b.call(this.data("jPlayer"),d))this.jPlayer.apply(this,f)})}},pauseOthers:function(a){this.tellOthers("pause",function(){return this.status.srcSet},a)},stop:function(){if(this.status.srcSet)if(this.html.active)this._html_pause(0);else if(this.aurora.active)this._aurora_pause(0);
  72. else this.flash.active&&this._flash_pause(0);else this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);if(this.status.srcSet)if(this.html.active)this._html_playHead(a);else if(this.aurora.active)this._aurora_playHead(a);else this.flash.active&&this._flash_playHead(a);else this._urlNotSetError("playHead")},_muted:function(a){this.mutedWorker(a);this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},a)},mutedWorker:function(a){this.options.muted=
  73. a;this.html.used&&this._html_setProperty("muted",a);this.aurora.used&&this._aurora_mute(a);this.flash.used&&this._flash_mute(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateMute(a);this._updateVolume(this.options.volume);this._trigger(c.jPlayer.event.volumechange)}},mute:function(a){if(typeof a==="object"&&this.options.useStateClassSkin&&this.options.muted)this._muted(false);else{a=a===j?true:!!a;this._muted(a)}},unmute:function(a){a=a===j?true:!!a;this._muted(!a)},_updateMute:function(a){if(a===
  74. j)a=this.options.muted;a?this.addStateClass("muted"):this.removeStateClass("muted");if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(this.status.noVolume){this.css.jq.mute.hide();this.css.jq.unmute.hide()}else if(a){this.css.jq.mute.hide();this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(a){this.volumeWorker(a);this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},a)},volumeWorker:function(a){a=
  75. this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_setProperty("volume",a);this.aurora.used&&this._aurora_volume(a);this.flash.used&&this._flash_volume(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateVolume(a);this._trigger(c.jPlayer.event.volumechange)}},volumeBar:function(a){if(this.css.jq.volumeBar.length){var b=c(a.currentTarget),d=b.offset(),e=a.pageX-d.left,f=b.width();a=b.height()-a.pageY+d.top;b=b.height();this.options.verticalVolume?this.volume(a/b):
  76. this.volume(e/f)}this.options.muted&&this._muted(false)},_updateVolume:function(a){if(a===j)a=this.options.volume;a=this.options.muted?0:a;if(this.status.noVolume){this.addStateClass("noVolume");this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide();this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide();this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()}else{this.removeStateClass("noVolume");this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show();if(this.css.jq.volumeBarValue.length){this.css.jq.volumeBarValue.show();
  77. this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](a*100+"%")}this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show()}},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(false)},_cssSelectorAncestor:function(a){var b=this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?c(a):[];a&&this.ancestorJq.length!==1&&this._warning({type:c.jPlayer.warning.CSS_SELECTOR_COUNT,context:a,message:c.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+
  78. " found for cssSelectorAncestor.",hint:c.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();c.each(this.options.cssSelector,function(d,e){b._cssSelector(d,e)});this._updateInterface();this._updateButtons();this._updateAutohide();this._updateVolume();this._updateMute()},_cssSelector:function(a,b){var d=this;if(typeof b==="string")if(c.jPlayer.prototype.options.cssSelector[a]){this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer");this.options.cssSelector[a]=b;this.css.cs[a]=
  79. this.options.cssSelectorAncestor+" "+b;this.css.jq[a]=b?c(this.css.cs[a]):[];this.css.jq[a].length&&this[a]&&this.css.jq[a].bind("click.jPlayer",function(e){e.preventDefault();d[a](e);d.options.autoBlur?c(this).blur():c(this).focus()});b&&this.css.jq[a].length!==1&&this._warning({type:c.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:c.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:c.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:c.jPlayer.warning.CSS_SELECTOR_METHOD,
  80. context:a,message:c.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:c.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:c.jPlayer.warning.CSS_SELECTOR_STRING,context:b,message:c.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:c.jPlayer.warningHint.CSS_SELECTOR_STRING})},duration:function(a){if(this.options.toggleDuration){this.options.captureDuration&&a.stopPropagation();this._setOption("remainingDuration",!this.options.remainingDuration)}},seekBar:function(a){if(this.css.jq.seekBar.length){var b=
  81. c(a.currentTarget),d=b.offset();a=a.pageX-d.left;b=b.width();this.playHead(100*a/b)}},playbackRate:function(a){this._setOption("playbackRate",a)},playbackRateBar:function(a){if(this.css.jq.playbackRateBar.length){var b=c(a.currentTarget),d=b.offset(),e=a.pageX-d.left,f=b.width();a=b.height()-a.pageY+d.top;b=b.height();this.playbackRate((this.options.verticalPlaybackRate?a/b:e/f)*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+this.options.minPlaybackRate)}},_updatePlaybackRate:function(){var a=
  82. (this.options.playbackRate-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);if(this.status.playbackRateEnabled){this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show();if(this.css.jq.playbackRateBarValue.length){this.css.jq.playbackRateBarValue.show();this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](a*100+"%")}}else{this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide();this.css.jq.playbackRateBarValue.length&&
  83. this.css.jq.playbackRateBarValue.hide()}},repeat:function(a){typeof a==="object"&&this.options.useStateClassSkin&&this.options.loop?this._loop(false):this._loop(true)},repeatOff:function(){this._loop(false)},_loop:function(a){if(this.options.loop!==a){this.options.loop=a;this._updateButtons();this._trigger(c.jPlayer.event.repeat)}},option:function(a,b){var d=a;if(arguments.length===0)return c.extend(true,{},this.options);if(typeof a==="string"){var e=a.split(".");if(b===j){d=c.extend(true,{},this.options);
  84. for(var f=0;f<e.length;f++)if(d[e[f]]!==j)d=d[e[f]];else{this._warning({type:c.jPlayer.warning.OPTION_KEY,context:a,message:c.jPlayer.warningMsg.OPTION_KEY,hint:c.jPlayer.warningHint.OPTION_KEY});return j}return d}f=d={};for(var g=0;g<e.length;g++)if(g<e.length-1){f[e[g]]={};f=f[e[g]]}else f[e[g]]=b}this._setOptions(d);return this},_setOptions:function(a){var b=this;c.each(a,function(d,e){b._setOption(d,e)});return this},_setOption:function(a,b){var d=this;switch(a){case "volume":this.volume(b);break;
  85. case "muted":this._muted(b);break;case "globalVolume":this.options[a]=b;break;case "cssSelectorAncestor":this._cssSelectorAncestor(b);break;case "cssSelector":c.each(b,function(f,g){d._cssSelector(f,g)});break;case "playbackRate":this.options[a]=b=this._limitValue(b,this.options.minPlaybackRate,this.options.maxPlaybackRate);this.html.used&&this._html_setProperty("playbackRate",b);this._updatePlaybackRate();break;case "defaultPlaybackRate":this.options[a]=b=this._limitValue(b,this.options.minPlaybackRate,
  86. this.options.maxPlaybackRate);this.html.used&&this._html_setProperty("defaultPlaybackRate",b);this._updatePlaybackRate();break;case "minPlaybackRate":this.options[a]=b=this._limitValue(b,0.1,this.options.maxPlaybackRate-0.1);this._updatePlaybackRate();break;case "maxPlaybackRate":this.options[a]=b=this._limitValue(b,this.options.minPlaybackRate+0.1,16);this._updatePlaybackRate();break;case "fullScreen":if(this.options[a]!==b){var e=c.jPlayer.nativeFeatures.fullscreen.used.webkitVideo;if(!e||e&&!this.status.waitForPlay){e||
  87. (this.options[a]=b);b?this._requestFullscreen():this._exitFullscreen();e||this._setOption("fullWindow",b)}}break;case "fullWindow":if(this.options[a]!==b){this._removeUiClass();this.options[a]=b;this._refreshSize()}break;case "size":!this.options.fullWindow&&this.options[a].cssClass!==b.cssClass&&this._removeUiClass();this.options[a]=c.extend({},this.options[a],b);this._refreshSize();break;case "sizeFull":this.options.fullWindow&&this.options[a].cssClass!==b.cssClass&&this._removeUiClass();this.options[a]=
  88. c.extend({},this.options[a],b);this._refreshSize();break;case "autohide":this.options[a]=c.extend({},this.options[a],b);this._updateAutohide();break;case "loop":this._loop(b);break;case "remainingDuration":this.options[a]=b;this._updateInterface();break;case "toggleDuration":this.options[a]=b;break;case "nativeVideoControls":this.options[a]=c.extend({},this.options[a],b);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this._restrictNativeVideoControls();this._updateNativeVideoControls();
  89. break;case "noFullWindow":this.options[a]=c.extend({},this.options[a],b);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow);this._restrictNativeVideoControls();this._updateButtons();break;case "noVolume":this.options[a]=c.extend({},this.options[a],b);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._updateVolume();this._updateMute();break;case "emulateHtml":if(this.options[a]!==
  90. b)(this.options[a]=b)?this._emulateHtmlBridge():this._destroyHtmlBridge();break;case "timeFormat":this.options[a]=c.extend({},this.options[a],b);break;case "keyEnabled":this.options[a]=b;if(!b&&this===c.jPlayer.focus)c.jPlayer.focus=null;break;case "keyBindings":this.options[a]=c.extend(true,{},this.options[a],b);break;case "audioFullScreen":this.options[a]=b;break;case "autoBlur":this.options[a]=b;break}return this},_refreshSize:function(){this._setSize();this._addUiClass();this._updateSize();this._updateButtons();
  91. this._updateAutohide();this._trigger(c.jPlayer.event.resize)},_setSize:function(){if(this.options.fullWindow){this.status.width=this.options.sizeFull.width;this.status.height=this.options.sizeFull.height;this.status.cssClass=this.options.sizeFull.cssClass}else{this.status.width=this.options.size.width;this.status.height=this.options.size.height;this.status.cssClass=this.options.size.cssClass}this.element.css({width:this.status.width,height:this.status.height})},_addUiClass:function(){this.ancestorJq.length&&
  92. this.ancestorJq.addClass(this.status.cssClass)},_removeUiClass:function(){this.ancestorJq.length&&this.ancestorJq.removeClass(this.status.cssClass)},_updateSize:function(){this.internal.poster.jq.css({width:this.status.width,height:this.status.height});if(!this.status.waitForPlay&&this.html.active&&this.status.video||this.html.video.available&&this.html.used&&this.status.nativeVideoControls)this.internal.video.jq.css({width:this.status.width,height:this.status.height});else!this.status.waitForPlay&&
  93. this.flash.active&&this.status.video&&this.internal.flash.jq.css({width:this.status.width,height:this.status.height})},_updateAutohide:function(){var a=this,b=function(d){var e=false,f;if(typeof a.internal.mouse!=="undefined"){e=a.internal.mouse.x-d.pageX;f=a.internal.mouse.y-d.pageY;e=Math.floor(e)>0||Math.floor(f)>0}else e=true;a.internal.mouse={x:d.pageX,y:d.pageY};e&&a.css.jq.gui.fadeIn(a.options.autohide.fadeIn,function(){clearTimeout(a.internal.autohideId);a.internal.autohideId=setTimeout(function(){a.css.jq.gui.fadeOut(a.options.autohide.fadeOut)},
  94. a.options.autohide.hold)})};if(this.css.jq.gui.length){this.css.jq.gui.stop(true,true);clearTimeout(this.internal.autohideId);delete this.internal.mouse;this.element.unbind(".jPlayerAutohide");this.css.jq.gui.unbind(".jPlayerAutohide");if(this.status.nativeVideoControls)this.css.jq.gui.hide();else if(this.options.fullWindow&&this.options.autohide.full||!this.options.fullWindow&&this.options.autohide.restored){this.element.bind("mousemove.jPlayer.jPlayerAutohide",b);this.css.jq.gui.bind("mousemove.jPlayer.jPlayerAutohide",
  95. b);this.css.jq.gui.hide()}else this.css.jq.gui.show()}},fullScreen:function(a){typeof a==="object"&&this.options.useStateClassSkin&&this.options.fullScreen?this._setOption("fullScreen",false):this._setOption("fullScreen",true)},restoreScreen:function(){this._setOption("fullScreen",false)},_fullscreenAddEventListeners:function(){var a=this,b=c.jPlayer.nativeFeatures.fullscreen;if(b.api.fullscreenEnabled)if(b.event.fullscreenchange){if(typeof this.internal.fullscreenchangeHandler!=="function")this.internal.fullscreenchangeHandler=
  96. function(){a._fullscreenchange()};document.addEventListener(b.event.fullscreenchange,this.internal.fullscreenchangeHandler,false)}},_fullscreenRemoveEventListeners:function(){var a=c.jPlayer.nativeFeatures.fullscreen;this.internal.fullscreenchangeHandler&&document.removeEventListener(a.event.fullscreenchange,this.internal.fullscreenchangeHandler,false)},_fullscreenchange:function(){this.options.fullScreen&&!c.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()&&this._setOption("fullScreen",
  97. false)},_requestFullscreen:function(){var a=this.ancestorJq.length?this.ancestorJq[0]:this.element[0],b=c.jPlayer.nativeFeatures.fullscreen;if(b.used.webkitVideo)a=this.htmlElement.video;b.api.fullscreenEnabled&&b.api.requestFullscreen(a)},_exitFullscreen:function(){var a=c.jPlayer.nativeFeatures.fullscreen,b;if(a.used.webkitVideo)b=this.htmlElement.video;a.api.fullscreenEnabled&&a.api.exitFullscreen(b)},_html_initMedia:function(a){var b=c(this.htmlElement.media).empty();c.each(a.track||[],function(d,
  98. e){d=document.createElement("track");d.setAttribute("kind",e.kind?e.kind:"");d.setAttribute("src",e.src?e.src:"");d.setAttribute("srclang",e.srclang?e.srclang:"");d.setAttribute("label",e.label?e.label:"");e.def&&d.setAttribute("default",e.def);b.append(d)});this.htmlElement.media.src=this.status.src;this.options.preload!=="none"&&this._html_load();this._trigger(c.jPlayer.event.timeupdate)},_html_setFormat:function(a){var b=this;c.each(this.formats,function(d,e){if(b.html.support[e]&&a[e]){b.status.src=
  99. a[e];b.status.format[e]=true;b.status.formatType=e;return false}})},_html_setAudio:function(a){this._html_setFormat(a);this.htmlElement.media=this.htmlElement.audio;this._html_initMedia(a)},_html_setVideo:function(a){this._html_setFormat(a);if(this.status.nativeVideoControls)this.htmlElement.video.poster=this._validString(a.poster)?a.poster:"";this.htmlElement.media=this.htmlElement.video;this._html_initMedia(a)},_html_resetMedia:function(){if(this.htmlElement.media){this.htmlElement.media.id===this.internal.video.id&&
  100. !this.status.nativeVideoControls&&this.internal.video.jq.css({width:"0px",height:"0px"});this.htmlElement.media.pause()}},_html_clearMedia:function(){if(this.htmlElement.media){this.htmlElement.media.src="about:blank";this.htmlElement.media.load()}},_html_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=false;this.htmlElement.media.load()}clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this,d=this.htmlElement.media;this.androidFix.pause=false;this._html_load();
  101. if(this.androidFix.setMedia){this.androidFix.play=true;this.androidFix.time=a}else if(isNaN(a))d.play();else{this.internal.cmdsIgnored&&d.play();try{if(!d.seekable||typeof d.seekable==="object"&&d.seekable.length>0){d.currentTime=a;d.play()}else throw 1;}catch(e){this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},250);return}}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this,d=this.htmlElement.media;this.androidFix.play=false;a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);
  102. d.pause();if(this.androidFix.setMedia){this.androidFix.pause=true;this.androidFix.time=a}else if(!isNaN(a))try{if(!d.seekable||typeof d.seekable==="object"&&d.seekable.length>0)d.currentTime=a;else throw 1;}catch(e){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},250);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this,d=this.htmlElement.media;this._html_load();try{if(typeof d.seekable==="object"&&d.seekable.length>0)d.currentTime=a*d.seekable.end(d.seekable.length-
  103. 1)/100;else if(d.duration>0&&!isNaN(d.duration))d.currentTime=a*d.duration/100;else throw"e";}catch(e){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},250);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},
  104. _html_setProperty:function(a,b){if(this.html.audio.available)this.htmlElement.audio[a]=b;if(this.html.video.available)this.htmlElement.video[a]=b},_aurora_setAudio:function(a){var b=this;c.each(this.formats,function(d,e){if(b.aurora.support[e]&&a[e]){b.status.src=a[e];b.status.format[e]=true;b.status.formatType=e;return false}});this.aurora.player=new AV.Player.fromURL(this.status.src);this._addAuroraEventListeners(this.aurora.player,this.aurora);if(this.options.preload==="auto"){this._aurora_load();
  105. this.status.waitForLoad=false}},_aurora_resetMedia:function(){this.aurora.player&&this.aurora.player.stop()},_aurora_clearMedia:function(){},_aurora_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=false;this.aurora.player.preload()}},_aurora_play:function(a){this.status.waitForLoad||isNaN(a)||this.aurora.player.seek(a);this.aurora.player.playing||this.aurora.player.play();this.status.waitForLoad=false;this._aurora_checkWaitForPlay();this._updateButtons(true);this._trigger(c.jPlayer.event.play)},
  106. _aurora_pause:function(a){isNaN(a)||this.aurora.player.seek(a*1E3);this.aurora.player.pause();a>0&&this._aurora_checkWaitForPlay();this._updateButtons(false);this._trigger(c.jPlayer.event.pause)},_aurora_playHead:function(a){this.aurora.player.duration>0&&this.aurora.player.seek(a*this.aurora.player.duration/100);this.status.waitForLoad||this._aurora_checkWaitForPlay()},_aurora_checkWaitForPlay:function(){if(this.status.waitForPlay)this.status.waitForPlay=false},_aurora_volume:function(a){this.aurora.player.volume=
  107. a*100},_aurora_mute:function(a){if(a){this.aurora.properties.lastvolume=this.aurora.player.volume;this.aurora.player.volume=0}else this.aurora.player.volume=this.aurora.properties.lastvolume;this.aurora.properties.muted=a},_flash_setAudio:function(a){var b=this;try{c.each(this.formats,function(e,f){if(b.flash.support[f]&&a[f]){switch(f){case "m4a":case "fla":b._getMovie().fl_setAudio_m4a(a[f]);break;case "mp3":b._getMovie().fl_setAudio_mp3(a[f]);break;case "rtmpa":b._getMovie().fl_setAudio_rtmp(a[f]);
  108. break}b.status.src=a[f];b.status.format[f]=true;b.status.formatType=f;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var b=this;try{c.each(this.formats,function(e,f){if(b.flash.support[f]&&a[f]){switch(f){case "m4v":case "flv":b._getMovie().fl_setVideo_m4v(a[f]);break;case "rtmpv":b._getMovie().fl_setVideo_rtmp(a[f]);break}b.status.src=a[f];b.status.format[f]=true;b.status.formatType=f;
  109. return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=
  110. false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();
  111. this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_getFlashPluginVersion:function(){var a=0,b;if(window.ActiveXObject)try{if(b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){var d=b.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");
  112. a=parseInt(d[0],10)+"."+parseInt(d[1],10)}}}catch(e){}else if(navigator.plugins&&navigator.mimeTypes.length>0)if(b=navigator.plugins["Shockwave Flash"])a=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1");return a*1},_checkForFlash:function(a){var b=false;if(this._getFlashPluginVersion()>=a)b=true;return b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return a<b?b:a>d?d:a},_urlNotSetError:function(a){this._error({type:c.jPlayer.error.URL_NOT_SET,
  113. context:a,message:c.jPlayer.errorMsg.URL_NOT_SET,hint:c.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var b;b=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:c.jPlayer.error[b],context:this.internal.flash.swf,message:c.jPlayer.errorMsg[b]+a.message,hint:c.jPlayer.errorHint[b]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(c.jPlayer.event.error,a);if(this.options.errorAlerts)this._alert("Error!"+(a.message?"\n"+a.message:"")+(a.hint?
  114. "\n"+a.hint:"")+"\nContext: "+a.context)},_warning:function(a){this._trigger(c.jPlayer.event.warning,j,a);if(this.options.warningAlerts)this._alert("Warning!"+(a.message?"\n"+a.message:"")+(a.hint?"\n"+a.hint:"")+"\nContext: "+a.context)},_alert:function(a){a="jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a;if(this.options.consoleAlerts)window.console&&window.console.log&&window.console.log(a);else alert(a)},_emulateHtmlBridge:function(){var a=this;c.each(c.jPlayer.emulateMethods.split(/\s+/g),
  115. function(b,d){a.internal.domNode[d]=function(e){a[d](e)}});c.each(c.jPlayer.event,function(b,d){var e=true;c.each(c.jPlayer.reservedEvent.split(/\s+/g),function(f,g){if(g===b)return e=false});e&&a.element.bind(d+".jPlayer.jPlayerHtml",function(){a._emulateHtmlUpdate();var f=document.createEvent("Event");f.initEvent(b,false,true);a.internal.domNode.dispatchEvent(f)})})},_emulateHtmlUpdate:function(){var a=this;c.each(c.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});
  116. c.each(c.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");c.each((c.jPlayer.emulateMethods+" "+c.jPlayer.emulateStatus+" "+c.jPlayer.emulateOptions).split(/\s+/g),function(b,d){delete a.internal.domNode[d]})}};c.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};
  117. c.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",
  118. URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+c.jPlayer.prototype.version.script+" needs Jplayer.swf version "+c.jPlayer.prototype.version.needFlash+" but found "};c.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",
  119. URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};c.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};c.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",
  120. OPTION_KEY:"The option requested in jPlayer('option') is undefined."};c.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}});