1 line
76 KiB
JavaScript
1 line
76 KiB
JavaScript
!function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):t.jQuery?e(t.jQuery):e(t.Zepto)}(this,function(h,r){h.fn.jPlayerAudio=function(s){var i="jPlayerAudio",t="string"==typeof s,a=Array.prototype.slice.call(arguments,1),o=this;return s=!t&&a.length?h.extend.apply(null,[!0,s].concat(a)):s,t&&"_"===s.charAt(0)||(t?this.each(function(){var t=h(this).data(i),e=t&&h.isFunction(t[s])?t[s].apply(t,a):t;if(e!==t&&e!==r)return o=e,!1}):this.each(function(){var t=h(this).data(i);t?t.option(s||{}):h(this).data(i,new h.jPlayerAudio(s,this))})),o},h.jPlayerAudio=function(t,e){if(arguments.length){this.element=h(e),this.options=h.extend(!0,{},this.options,t);var s=this;this.element.bind("remove.jPlayerAudio",function(){s.destroy()}),this._init()}},"function"!=typeof h.fn.stop&&(h.fn.stop=function(){}),h.jPlayerAudio.emulateMethods="load play pause",h.jPlayerAudio.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate",h.jPlayerAudio.emulateOptions="muted volume",h.jPlayerAudio.reservedEvent="ready flashreset resize repeat error warning",h.jPlayerAudio.event={},h.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(){h.jPlayerAudio.event[this]="jPlayerAudio_"+this}),h.jPlayerAudio.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","canplay","canplaythrough"],h.jPlayerAudio.pause=function(){h.jPlayerAudio.prototype.destroyRemoved(),h.each(h.jPlayerAudio.prototype.instances,function(t,e){e.data("jPlayerAudio").status.srcSet&&e.jPlayerAudio("pause")})},h.jPlayerAudio.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var t=function(){this.init()};t.prototype={init:function(){this.options={timeFormat:h.jPlayerAudio.timeFormat}},time:function(t){t=t&&"number"==typeof t?t:0;var e=new Date(1e3*t),s=e.getUTCHours(),i=this.options.timeFormat.showHour?e.getUTCMinutes():e.getUTCMinutes()+60*s,a=this.options.timeFormat.showMin?e.getUTCSeconds():e.getUTCSeconds()+60*i,o=this.options.timeFormat.padHour&&s<10?"0"+s:s,l=this.options.timeFormat.padMin&&i<10?"0"+i:i,n=this.options.timeFormat.padSec&&a<10?"0"+a:a,r="";return r+=this.options.timeFormat.showHour?o+this.options.timeFormat.sepHour:"",r+=this.options.timeFormat.showMin?l+this.options.timeFormat.sepMin:"",r+=this.options.timeFormat.showSec?n+this.options.timeFormat.sepSec:""}};var e=new t;h.jPlayerAudio.convertTime=function(t){return e.time(t)},h.jPlayerAudio.uaBrowser=function(t){var e=t.toLowerCase(),s=/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(e)||[];return{browser:s[1]||"",version:s[2]||"0"}},h.jPlayerAudio.uaPlatform=function(t){var e=t.toLowerCase(),s=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(e)||[],i=/(ipad|playbook)/.exec(e)||!/(mobile)/.exec(e)&&/(android)/.exec(e)||[];return s[1]&&(s[1]=s[1].replace(/\s/g,"_")),{platform:s[1]||"",tablet:i[1]||""}},h.jPlayerAudio.browser={},h.jPlayerAudio.platform={};var s=h.jPlayerAudio.uaBrowser(navigator.userAgent);s.browser&&(h.jPlayerAudio.browser[s.browser]=!0,h.jPlayerAudio.browser.version=s.version);var i=h.jPlayerAudio.uaPlatform(navigator.userAgent);i.platform&&(h.jPlayerAudio.platform[i.platform]=!0,h.jPlayerAudio.platform.mobile=!i.tablet,h.jPlayerAudio.platform.tablet=!!i.tablet),h.jPlayerAudio.getDocMode=function(){var t;return h.jPlayerAudio.browser.msie&&(document.documentMode?t=document.documentMode:(t=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(t=7))),t},h.jPlayerAudio.browser.documentMode=h.jPlayerAudio.getDocMode(),h.jPlayerAudio.nativeFeatures={init:function(){var t,e,s,i=document,a=i.createElement("video"),o={w3c:["fullscreenEnabled","fullscreenElement","requestFullscreen","exitFullscreen","fullscreenchange","fullscreenerror"],moz:["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror"],webkit:["","webkitCurrentFullScreenElement","webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange",""],webkitVideo:["webkitSupportsFullscreen","webkitDisplayingFullscreen","webkitEnterFullscreen","webkitExitFullscreen","",""],ms:["","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError"]},l=["w3c","moz","webkit","webkitVideo","ms"];for(this.fullscreen=t={support:{w3c:!!i[o.w3c[0]],moz:!!i[o.moz[0]],webkit:"function"==typeof i[o.webkit[3]],webkitVideo:"function"==typeof a[o.webkitVideo[2]],ms:"function"==typeof a[o.ms[2]]},used:{}},e=0,s=l.length;e<s;e++){var n=l[e];if(t.support[n]){t.spec=n,t.used[n]=!0;break}}if(t.spec){var r=o[t.spec];t.api={fullscreenEnabled:!0,fullscreenElement:function(t){return(t=t||i)[r[1]]},requestFullscreen:function(t){return t[r[2]]()},exitFullscreen:function(t){return(t=t||i)[r[3]]()}},t.event={fullscreenchange:r[4],fullscreenerror:r[5]}}else t.api={fullscreenEnabled:!1,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}},t.event={}}},h.jPlayerAudio.nativeFeatures.init(),h.jPlayerAudio.focus=null,h.jPlayerAudio.keyIgnoreElementNames="A INPUT TEXTAREA SELECT BUTTON";var a=function(s){var i,a=h.jPlayerAudio.focus;a&&(h.each(h.jPlayerAudio.keyIgnoreElementNames.split(/\s+/g),function(t,e){if(s.target.nodeName.toUpperCase()===e.toUpperCase())return!(i=!0)}),i||h.each(a.options.keyBindings,function(t,e){if(e&&h.isFunction(e.fn)&&("number"==typeof e.key&&s.which===e.key||"string"==typeof e.key&&s.key===e.key))return s.preventDefault(),e.fn(a),!1}))};h.jPlayerAudio.keys=function(t){var e="keydown.jPlayerAudio";h(document.documentElement).unbind(e),t&&h(document.documentElement).bind(e,a)},h.jPlayerAudio.keys(!0),h.jPlayerAudio.prototype={count:0,version:{script:"2.9.2",needFlash:"2.9.0",flash:"unknown"},options:{swfPath:"js",solution:"html",supplied:"mp3",auroraFormats:"wav",preload:"metadata",volume:1,muted:!1,remainingDuration:!1,toggleDuration:!1,captureDuration:!0,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:.5,maxPlaybackRate:4,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_audio_container_1",cssSelector:{videoPlay:".mdtc-clnplra-video-play",play:".mdtc-clnplra-play",pause:".mdtc-clnplra-pause",stop:".mdtc-clnplra-stop",seekBar:".mdtc-clnplra-seek-bar",playBar:".mdtc-clnplra-play-bar",mute:".mdtc-clnplra-mute",unmute:".mdtc-clnplra-unmute",volumeBar:".mdtc-clnplra-volume-bar",volumeBarValue:".mdtc-clnplra-volume-bar-value",volumeMax:".mdtc-clnplra-volume-max",playbackRateBar:".mdtc-clnplra-playback-rate-bar",playbackRateBarValue:".mdtc-clnplra-playback-rate-bar-value",currentTime:".mdtc-clnplra-current-time",duration:".mdtc-clnplra-duration",title:".mdtc-clnplra-title",fullScreen:".mdtc-clnplra-full-screen",restoreScreen:".mdtc-clnplra-restore-screen",repeat:".mdtc-clnplra-repeat",repeatOff:".mdtc-clnplra-repeat-off",gui:".mdtc-clnplra-gui",noSolution:".mdtc-clnplra-no-solution"},stateClass:{playing:"mdtc-clnplra-state-playing",seeking:"mdtc-clnplra-state-seeking",muted:"mdtc-clnplra-state-muted",looped:"mdtc-clnplra-state-looped",fullScreen:"mdtc-clnplra-state-full-screen",noVolume:"mdtc-clnplra-state-no-volume"},useStateClassSkin:!1,autoBlur:!0,smoothPlayBar:!1,fullScreen:!1,fullWindow:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1e3},loop:!1,repeat:function(t){t.jPlayerAudio.options.loop?h(this).unbind(".jPlayerAudioRepeat").bind(h.jPlayerAudio.event.ended+".jPlayerAudio.jPlayerAudioRepeat",function(){h(this).jPlayerAudio("play")}):h(this).unbind(".jPlayerAudioRepeat")},nativeVideoControls:{},noFullWindow:{msie:/msie [0-6]\./,ipad:/ipad.*?os [0-4]\./,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3]\.(?!.*?mobile)/,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:!1,audioFullScreen:!1,keyBindings:{play:{key:80,fn:function(t){t.status.paused?t.play():t.pause()}},fullScreen:{key:70,fn:function(t){(t.status.video||t.options.audioFullScreen)&&t._setOption("fullScreen",!t.options.fullScreen)}},muted:{key:77,fn:function(t){t._muted(!t.options.muted)}},volumeUp:{key:190,fn:function(t){t.volume(t.options.volume+.1)}},volumeDown:{key:188,fn:function(t){t.volume(t.options.volume-.1)}},loop:{key:76,fn:function(t){t._loop(!t.options.loop)}}},verticalVolume:!1,verticalPlaybackRate:!1,globalVolume:!1,idPrefix:"jp_audio",noConflict:"jQuery",emulateHtml:!1,consoleAlerts:!0,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"mdtc-clnplra-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"mdtc-clnplra-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,remaining:0,videoWidth:0,videoHeight:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,aurora:!0,flash:!0},format:{mp3:{codec:"audio/mpeg",flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',flashCanPlay:!1,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:!1,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:!1,media:"audio"},flac:{codec:"audio/x-flac",flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!1,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:!1,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var a=this;if(this.element.empty(),this.status=h.extend({},this.status),this.internal=h.extend({},this.internal),this.options.timeFormat=h.extend({},h.jPlayerAudio.timeFormat,this.options.timeFormat),this.internal.cmdsIgnored=h.jPlayerAudio.platform.ipad||h.jPlayerAudio.platform.iphone||h.jPlayerAudio.platform.ipod,this.internal.domNode=this.element.get(0),this.options.keyEnabled&&!h.jPlayerAudio.focus&&(h.jPlayerAudio.focus=this),this.androidFix={setMedia:!1,play:!1,pause:!1,time:NaN},h.jPlayerAudio.platform.android&&(this.options.preload="auto"!==this.options.preload?"metadata":"auto"),this.formats=[],this.solutions=[],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),h.each(this.options.supplied.toLowerCase().split(","),function(t,e){var s=e.replace(/^\s+|\s+$/g,"");if(a.format[s]){var i=!1;h.each(a.formats,function(t,e){if(s===e)return!(i=!0)}),i||a.formats.push(s)}}),h.each(this.options.solution.toLowerCase().split(","),function(t,e){var s=e.replace(/^\s+|\s+$/g,"");if(a.solution[s]){var i=!1;h.each(a.solutions,function(t,e){if(s===e)return!(i=!0)}),i||a.solutions.push(s)}}),h.each(this.options.auroraFormats.toLowerCase().split(","),function(t,e){var s=e.replace(/^\s+|\s+$/g,"");if(a.format[s]){var i=!1;h.each(a.aurora.formats,function(t,e){if(s===e)return!(i=!0)}),i||a.aurora.formats.push(s)}}),this.internal.instance="jp_audio_"+this.count,this.instances[this.internal.instance]=this.element,this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count),this.internal.self=h.extend({},{id:this.element.attr("id"),jq:this.element}),this.internal.audio=h.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:r}),this.internal.video=h.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:r}),this.internal.flash=h.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:r,swf:this.options.swfPath+(".swf"!==this.options.swfPath.toLowerCase().slice(-4)?(this.options.swfPath&&"/"!==this.options.swfPath.slice(-1)?"/":"")+"jquery.jplayer.swf":"")}),this.internal.poster=h.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:r}),h.each(h.jPlayerAudio.event,function(t,e){a.options[t]!==r&&(a.element.bind(e+".jPlayerAudio",a.options[t]),a.options[t]=r)}),this.require.audio=!1,this.require.video=!1,h.each(this.formats,function(t,e){a.require[a.format[e].media]=!0}),this.require.video?this.options=h.extend(!0,{},this.optionsVideo,this.options):this.options=h.extend(!0,{},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),h.jPlayerAudio.nativeFeatures.fullscreen.api.fullscreenEnabled&&this._fullscreenAddEventListeners(),this._restrictNativeVideoControls(),this.htmlElement.poster=document.createElement("img"),this.htmlElement.poster.id=this.internal.poster.id,this.htmlElement.poster.onload=function(){a.status.video&&!a.status.waitForPlay||a.internal.poster.jq.show()},this.element.append(this.htmlElement.poster),this.internal.poster.jq=h("#"+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.jPlayerAudio",function(){a._trigger(h.jPlayerAudio.event.click)}),this.html.audio.available=!1,this.require.audio&&(this.htmlElement.audio=document.createElement("audio"),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=!1,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={},this.flash.canPlay={},h.each(this.formats,function(t,e){a.html.canPlay[e]=a.html[a.format[e].media].available&&""!==a.htmlElement[a.format[e].media].canPlayType(a.format[e].codec),a.aurora.canPlay[e]=-1<h.inArray(e,a.aurora.formats),a.flash.canPlay[e]=a.format[e].flashCanPlay&&a.flash.available}),this.html.desired=!1,this.aurora.desired=!1,this.flash.desired=!1,h.each(this.solutions,function(t,e){if(0===t)a[e].desired=!0;else{var s=!1,i=!1;h.each(a.formats,function(t,e){a[a.solutions[0]].canPlay[e]&&("video"===a.format[e].media?i=!0:s=!0)}),a[e].desired=a.require.audio&&!s||a.require.video&&!i}}),this.html.support={},this.aurora.support={},this.flash.support={},h.each(this.formats,function(t,e){a.html.support[e]=a.html.canPlay[e]&&a.html.desired,a.aurora.support[e]=a.aurora.canPlay[e]&&a.aurora.desired,a.flash.support[e]=a.flash.canPlay[e]&&a.flash.desired}),this.html.used=!1,this.aurora.used=!1,this.flash.used=!1,h.each(this.solutions,function(t,s){h.each(a.formats,function(t,e){if(a[s].support[e])return!(a[s].used=!0)})}),this._resetActive(),this._resetGate(),this._cssSelectorAncestor(this.options.cssSelectorAncestor),this.html.used||this.aurora.used||this.flash.used?this.css.jq.noSolution.length&&this.css.jq.noSolution.hide():(this._error({type:h.jPlayerAudio.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:h.jPlayerAudio.errorMsg.NO_SOLUTION,hint:h.jPlayerAudio.errorHint.NO_SOLUTION}),this.css.jq.noSolution.length&&this.css.jq.noSolution.show()),this.flash.used){var t,e="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(h.jPlayerAudio.browser.msie&&(Number(h.jPlayerAudio.browser.version)<9||h.jPlayerAudio.browser.documentMode<9)){var s='<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0" tabindex="-1"></object>',i=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+e+'" />','<param name="allowScriptAccess" value="always" />','<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+this.options.wmode+'" />'];t=document.createElement(s);for(var o=0;o<i.length;o++)t.appendChild(document.createElement(i[o]))}else{var l=function(t,e,s){var i=document.createElement("param");i.setAttribute("name",e),i.setAttribute("value",s),t.appendChild(i)};(t=document.createElement("object")).setAttribute("id",this.internal.flash.id),t.setAttribute("name",this.internal.flash.id),t.setAttribute("data",this.internal.flash.swf),t.setAttribute("type","application/x-shockwave-flash"),t.setAttribute("width","1"),t.setAttribute("height","1"),t.setAttribute("tabindex","-1"),l(t,"flashvars",e),l(t,"allowscriptaccess","always"),l(t,"bgcolor",this.options.backgroundColor),l(t,"wmode",this.options.wmode)}this.element.append(t),this.internal.flash.jq=h(t)}this.html.used&&!this.flash.used?this.status.playbackRateEnabled=this._testPlaybackRate("audio"):this.status.playbackRateEnabled=!1,this._updatePlaybackRate(),this.html.used&&(this.html.audio.available&&(this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio),this.element.append(this.htmlElement.audio),this.internal.audio.jq=h("#"+this.internal.audio.id)),this.html.video.available&&(this._addHtmlEventListeners(this.htmlElement.video,this.html.video),this.element.append(this.htmlElement.video),this.internal.video.jq=h("#"+this.internal.video.id),this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):this.internal.video.jq.css({width:"0px",height:"0px"}),this.internal.video.jq.bind("click.jPlayerAudio",function(){a._trigger(h.jPlayerAudio.event.click)}))),this.aurora.used,this.options.emulateHtml&&this._emulateHtmlBridge(),!this.html.used&&!this.aurora.used||this.flash.used||setTimeout(function(){a.internal.ready=!0,a.version.flash="n/a",a._trigger(h.jPlayerAudio.event.repeat),a._trigger(h.jPlayerAudio.event.ready)},100),this._updateNativeVideoControls(),this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),h.jPlayerAudio.prototype.count++},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(""),h.each(this.css.jq,function(t,e){e.length&&e.unbind(".jPlayerAudio")}),this.internal.poster.jq.unbind(".jPlayerAudio"),this.internal.video.jq&&this.internal.video.jq.unbind(".jPlayerAudio"),this._fullscreenRemoveEventListeners(),this===h.jPlayerAudio.focus&&(h.jPlayerAudio.focus=null),this.options.emulateHtml&&this._destroyHtmlBridge(),this.element.removeData("jPlayerAudio"),this.element.unbind(".jPlayerAudio"),this.element.empty(),delete this.instances[this.internal.instance]},destroyRemoved:function(){var s=this;h.each(this.instances,function(t,e){s.element!==e&&(e.data("jPlayerAudio")||(e.jPlayerAudio("destroy"),delete s.instances[t]))})},enable:function(){},disable:function(){},_testCanPlayType:function(t){try{return t.canPlayType(this.format.mp3.codec),!0}catch(t){return!1}},_testPlaybackRate:function(t){var e;t="string"==typeof t?t:"audio",e=document.createElement(t);try{return"playbackRate"in e&&(e.playbackRate=.5)===e.playbackRate}catch(t){return!1}},_uaBlocklist:function(t){var s=navigator.userAgent.toLowerCase(),i=!1;return h.each(t,function(t,e){if(e&&e.test(s))return!(i=!0)}),i},_restrictNativeVideoControls:function(){this.require.audio&&this.status.nativeVideoControls&&(this.status.nativeVideoControls=!1,this.status.noFullWindow=!0)},_updateNativeVideoControls:function(){this.html.video.available&&this.html.used&&(this.htmlElement.video.controls=this.status.nativeVideoControls,this._updateAutohide(),this.status.nativeVideoControls&&this.require.video?(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})):this.status.waitForPlay&&this.status.video&&(this.internal.poster.jq.show(),this.internal.video.jq.css({width:"0px",height:"0px"})))},_addHtmlEventListeners:function(s,i){var a=this;s.preload=this.options.preload,s.muted=this.options.muted,s.volume=this.options.volume,this.status.playbackRateEnabled&&(s.defaultPlaybackRate=this.options.defaultPlaybackRate,s.playbackRate=this.options.playbackRate),s.addEventListener("progress",function(){i.gate&&(a.internal.cmdsIgnored&&0<this.readyState&&(a.internal.cmdsIgnored=!1),a._getHtmlStatus(s),a._updateInterface(),a._trigger(h.jPlayerAudio.event.progress))},!1),s.addEventListener("loadeddata",function(){i.gate&&(a.androidFix.setMedia=!1,a.androidFix.play&&(a.androidFix.play=!1,a.play(a.androidFix.time)),a.androidFix.pause&&(a.androidFix.pause=!1,a.pause(a.androidFix.time)),a._trigger(h.jPlayerAudio.event.loadeddata))},!1),s.addEventListener("timeupdate",function(){i.gate&&(a._getHtmlStatus(s),a._updateInterface(),a._trigger(h.jPlayerAudio.event.timeupdate))},!1),s.addEventListener("durationchange",function(){i.gate&&(a._getHtmlStatus(s),a._updateInterface(),a._trigger(h.jPlayerAudio.event.durationchange))},!1),s.addEventListener("play",function(){i.gate&&(a._updateButtons(!0),a._html_checkWaitForPlay(),a._trigger(h.jPlayerAudio.event.play))},!1),s.addEventListener("playing",function(){i.gate&&(a._updateButtons(!0),a._seeked(),a._trigger(h.jPlayerAudio.event.playing))},!1),s.addEventListener("pause",function(){i.gate&&(a._updateButtons(!1),a._trigger(h.jPlayerAudio.event.pause))},!1),s.addEventListener("waiting",function(){i.gate&&(a._seeking(),a._trigger(h.jPlayerAudio.event.waiting))},!1),s.addEventListener("seeking",function(){i.gate&&(a._seeking(),a._trigger(h.jPlayerAudio.event.seeking))},!1),s.addEventListener("seeked",function(){i.gate&&(a._seeked(),a._trigger(h.jPlayerAudio.event.seeked))},!1),s.addEventListener("volumechange",function(){i.gate&&(a.options.volume=s.volume,a.options.muted=s.muted,a._updateMute(),a._updateVolume(),a._trigger(h.jPlayerAudio.event.volumechange))},!1),s.addEventListener("ratechange",function(){i.gate&&(a.options.defaultPlaybackRate=s.defaultPlaybackRate,a.options.playbackRate=s.playbackRate,a._updatePlaybackRate(),a._trigger(h.jPlayerAudio.event.ratechange))},!1),s.addEventListener("suspend",function(){i.gate&&(a._seeked(),a._trigger(h.jPlayerAudio.event.suspend))},!1),s.addEventListener("ended",function(){i.gate&&(h.jPlayerAudio.browser.webkit||(a.htmlElement.media.currentTime=0),a.htmlElement.media.pause(),a._updateButtons(!1),a._getHtmlStatus(s,!0),a._updateInterface(),a._trigger(h.jPlayerAudio.event.ended))},!1),s.addEventListener("error",function(){i.gate&&(a._updateButtons(!1),a._seeked(),a.status.srcSet&&(clearTimeout(a.internal.htmlDlyCmdId),a.status.waitForLoad=!0,a.status.waitForPlay=!0,a.status.video&&!a.status.nativeVideoControls&&a.internal.video.jq.css({width:"0px",height:"0px"}),a._validString(a.status.media.poster)&&!a.status.nativeVideoControls&&a.internal.poster.jq.show(),a.css.jq.videoPlay.length&&a.css.jq.videoPlay.show(),a._error({type:h.jPlayerAudio.error.URL,context:a.status.src,message:h.jPlayerAudio.errorMsg.URL,hint:h.jPlayerAudio.errorHint.URL})))},!1),h.each(h.jPlayerAudio.htmlEvent,function(t,e){s.addEventListener(this,function(){i.gate&&a._trigger(h.jPlayerAudio.event[e])},!1)})},_addAuroraEventListeners:function(t,e){var s=this;t.volume=100*this.options.volume,t.on("progress",function(){e.gate&&(s.internal.cmdsIgnored&&0<this.readyState&&(s.internal.cmdsIgnored=!1),s._getAuroraStatus(t),s._updateInterface(),s._trigger(h.jPlayerAudio.event.progress),0<t.duration&&s._trigger(h.jPlayerAudio.event.timeupdate))},!1),t.on("ready",function(){e.gate&&s._trigger(h.jPlayerAudio.event.loadeddata)},!1),t.on("duration",function(){e.gate&&(s._getAuroraStatus(t),s._updateInterface(),s._trigger(h.jPlayerAudio.event.durationchange))},!1),t.on("end",function(){e.gate&&(s._updateButtons(!1),s._getAuroraStatus(t,!0),s._updateInterface(),s._trigger(h.jPlayerAudio.event.ended))},!1),t.on("error",function(){e.gate&&(s._updateButtons(!1),s._seeked(),s.status.srcSet&&(s.status.waitForLoad=!0,s.status.waitForPlay=!0,s.status.video&&!s.status.nativeVideoControls&&s.internal.video.jq.css({width:"0px",height:"0px"}),s._validString(s.status.media.poster)&&!s.status.nativeVideoControls&&s.internal.poster.jq.show(),s.css.jq.videoPlay.length&&s.css.jq.videoPlay.show(),s._error({type:h.jPlayerAudio.error.URL,context:s.status.src,message:h.jPlayerAudio.errorMsg.URL,hint:h.jPlayerAudio.errorHint.URL})))},!1)},_getHtmlStatus:function(t,e){var s=0,i=0,a=0,o=0;isFinite(t.duration)&&(this.status.duration=t.duration),s=t.currentTime,i=0<this.status.duration?100*s/this.status.duration:0,"object"==typeof t.seekable&&0<t.seekable.length?(a=0<this.status.duration?100*t.seekable.end(t.seekable.length-1)/this.status.duration:100,o=0<this.status.duration?100*t.currentTime/t.seekable.end(t.seekable.length-1):0):(a=100,o=i),e&&(i=o=s=0),this.status.seekPercent=a,this.status.currentPercentRelative=o,this.status.currentPercentAbsolute=i,this.status.currentTime=s,this.status.remaining=this.status.duration-this.status.currentTime,this.status.videoWidth=t.videoWidth,this.status.videoHeight=t.videoHeight,this.status.readyState=t.readyState,this.status.networkState=t.networkState,this.status.playbackRate=t.playbackRate,this.status.ended=t.ended},_getAuroraStatus:function(t,e){var s=0,i=0,a=0,o=0;this.status.duration=t.duration/1e3,s=t.currentTime/1e3,i=0<this.status.duration?100*s/this.status.duration:0,0<t.buffered?(a=0<this.status.duration?t.buffered*this.status.duration/this.status.duration:100,o=0<this.status.duration?s/(t.buffered*this.status.duration):0):(a=100,o=i),e&&(i=o=s=0),this.status.seekPercent=a,this.status.currentPercentRelative=o,this.status.currentPercentAbsolute=i,this.status.currentTime=s,this.status.remaining=this.status.duration-this.status.currentTime,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_resetStatus:function(){this.status=h.extend({},this.status,h.jPlayerAudio.prototype.status)},_trigger:function(t,e,s){var i=h.Event(t);i.jPlayerAudio={},i.jPlayerAudio.version=h.extend({},this.version),i.jPlayerAudio.options=h.extend(!0,{},this.options),i.jPlayerAudio.status=h.extend(!0,{},this.status),i.jPlayerAudio.html=h.extend(!0,{},this.html),i.jPlayerAudio.aurora=h.extend(!0,{},this.aurora),i.jPlayerAudio.flash=h.extend(!0,{},this.flash),e&&(i.jPlayerAudio.error=h.extend({},e)),s&&(i.jPlayerAudio.warning=h.extend({},s)),this.element.trigger(i)},jPlayerAudioFlashEvent:function(t,e){if(t===h.jPlayerAudio.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var s=this.status.currentTime,i=this.status.paused;this.setMedia(this.status.media),this.volumeWorker(this.options.volume),0<s&&(i?this.pause(s):this.play(s))}this._trigger(h.jPlayerAudio.event.flashreset)}}else this.internal.ready=!0,this.internal.flash.jq.css({width:"0px",height:"0px"}),this.version.flash=e.version,this.version.needFlash!==this.version.flash&&this._error({type:h.jPlayerAudio.error.VERSION,context:this.version.flash,message:h.jPlayerAudio.errorMsg.VERSION+this.version.flash,hint:h.jPlayerAudio.errorHint.VERSION}),this._trigger(h.jPlayerAudio.event.repeat),this._trigger(t);if(this.flash.gate)switch(t){case h.jPlayerAudio.event.progress:case h.jPlayerAudio.event.timeupdate:this._getFlashStatus(e),this._updateInterface(),this._trigger(t);break;case h.jPlayerAudio.event.play:this._seeked(),this._updateButtons(!0),this._trigger(t);break;case h.jPlayerAudio.event.pause:case h.jPlayerAudio.event.ended:this._updateButtons(!1),this._trigger(t);break;case h.jPlayerAudio.event.click:this._trigger(t);break;case h.jPlayerAudio.event.error:this.status.waitForLoad=!0,this.status.waitForPlay=!0,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&&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(!1),this._error({type:h.jPlayerAudio.error.URL,context:e.src,message:h.jPlayerAudio.errorMsg.URL,hint:h.jPlayerAudio.errorHint.URL});break;case h.jPlayerAudio.event.seeking:this._seeking(),this._trigger(t);break;case h.jPlayerAudio.event.seeked:this._seeked(),this._trigger(t);break;case h.jPlayerAudio.event.ready:break;default:this._trigger(t)}return!1},_getFlashStatus:function(t){this.status.seekPercent=t.seekPercent,this.status.currentPercentRelative=t.currentPercentRelative,this.status.currentPercentAbsolute=t.currentPercentAbsolute,this.status.currentTime=t.currentTime,this.status.duration=t.duration,this.status.remaining=t.duration-t.currentTime,this.status.videoWidth=t.videoWidth,this.status.videoHeight=t.videoHeight,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_updateButtons:function(t){t===r?t=!this.status.paused:this.status.paused=!t,t?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"),this.css.jq.play.length&&this.css.jq.pause.length&&(t?(this.css.jq.play.hide(),this.css.jq.pause.show()):(this.css.jq.play.show(),this.css.jq.pause.hide())),this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length&&(this.status.noFullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.hide()):this.options.fullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.show()):(this.css.jq.fullScreen.show(),this.css.jq.restoreScreen.hide())),this.css.jq.repeat.length&&this.css.jq.repeatOff.length&&(this.options.loop?(this.css.jq.repeat.hide(),this.css.jq.repeatOff.show()):(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+"%"),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+"%"));this.css.jq.currentTime.length&&this._convertTime(this.status.currentTime)!==this.css.jq.currentTime.text()&&this.css.jq.currentTime.text(this._convertTime(this.status.currentTime));var t="",e=this.status.duration,s=this.status.remaining;this.css.jq.duration.length&&("string"==typeof this.status.media.duration?t=this.status.media.duration:("number"==typeof this.status.media.duration&&(s=(e=this.status.media.duration)-this.status.currentTime),t=this.options.remainingDuration?(0<s?"-":"")+this._convertTime(s):this._convertTime(e)),t!==this.css.jq.duration.text()&&this.css.jq.duration.text(t))},_convertTime:t.prototype.time,_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("mdtc-clnplra-seeking-bg"),this.addStateClass("seeking")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("mdtc-clnplra-seeking-bg"),this.removeStateClass("seeking")},_resetGate:function(){this.html.audio.gate=!1,this.html.video.gate=!1,this.aurora.gate=!1,this.flash.gate=!1},_resetActive:function(){this.html.active=!1,this.aurora.active=!1,this.flash.active=!1},_escapeHtml:function(t){return t.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""")},_qualifyURL:function(t){var e=document.createElement("div");return e.innerHTML='<a href="'+this._escapeHtml(t)+'">x</a>',e.firstChild.href},_absoluteMediaUrls:function(s){var i=this;return h.each(s,function(t,e){e&&i.format[t]&&"data:"!==e.substr(0,5)&&(s[t]=i._qualifyURL(e))}),s},addStateClass:function(t){this.ancestorJq.length&&this.ancestorJq.addClass(this.options.stateClass[t])},removeStateClass:function(t){this.ancestorJq.length&&this.ancestorJq.removeClass(this.options.stateClass[t])},setMedia:function(l){var n=this,r=!1,t=this.status.media.poster!==l.poster;this._resetMedia(),this._resetGate(),this._resetActive(),this.androidFix.setMedia=!1,this.androidFix.play=!1,this.androidFix.pause=!1,l=this._absoluteMediaUrls(l),h.each(this.formats,function(t,a){var o="video"===n.format[a].media;if(h.each(n.solutions,function(t,e){if(n[e].support[a]&&n._validString(l[a])){var s="html"===e,i="aurora"===e;return o?(s?(n.html.video.gate=!0,n._html_setVideo(l),n.html.active=!0):(n.flash.gate=!0,n._flash_setVideo(l),n.flash.active=!0),n.css.jq.videoPlay.length&&n.css.jq.videoPlay.show(),n.status.video=!0):(s?(n.html.audio.gate=!0,n._html_setAudio(l),n.html.active=!0,h.jPlayerAudio.platform.android&&(n.androidFix.setMedia=!0)):i?(n.aurora.gate=!0,n._aurora_setAudio(l),n.aurora.active=!0):(n.flash.gate=!0,n._flash_setAudio(l),n.flash.active=!0),n.css.jq.videoPlay.length&&n.css.jq.videoPlay.hide(),n.status.video=!1),!(r=!0)}}),r)return!1}),r?(this.status.nativeVideoControls&&this.html.video.gate||this._validString(l.poster)&&(t?this.htmlElement.poster.src=l.poster:this.internal.poster.jq.show()),"string"==typeof l.title&&(this.css.jq.title.length&&this.css.jq.title.html(l.title),this.htmlElement.audio&&this.htmlElement.audio.setAttribute("title",l.title),this.htmlElement.video&&this.htmlElement.video.setAttribute("title",l.title)),this.status.srcSet=!0,this.status.media=h.extend({},l),this._updateButtons(!1),this._updateInterface(),this._trigger(h.jPlayerAudio.event.setmedia)):this._error({type:h.jPlayerAudio.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:h.jPlayerAudio.errorMsg.NO_SUPPORT,hint:h.jPlayerAudio.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus(),this._updateButtons(!1),this._updateInterface(),this._seeked(),this.internal.poster.jq.hide(),clearTimeout(this.internal.htmlDlyCmdId),this.html.active?this._html_resetMedia():this.aurora.active?this._aurora_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia(),this.html.active?this._html_clearMedia():this.aurora.active?this._aurora_clearMedia():this.flash.active&&this._flash_clearMedia(),this._resetGate(),this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.aurora.active?this._aurora_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},focus:function(){this.options.keyEnabled&&(h.jPlayerAudio.focus=this)},play:function(t){"object"==typeof t&&this.options.useStateClassSkin&&!this.status.paused?this.pause(t):(t="number"==typeof t?t:NaN,this.status.srcSet?(this.focus(),this.html.active?this._html_play(t):this.aurora.active?this._aurora_play(t):this.flash.active&&this._flash_play(t)):this._urlNotSetError("play"))},videoPlay:function(){this.play()},pause:function(t){t="number"==typeof t?t:NaN,this.status.srcSet?this.html.active?this._html_pause(t):this.aurora.active?this._aurora_pause(t):this.flash.active&&this._flash_pause(t):this._urlNotSetError("pause")},tellOthers:function(t,e){var s=this,i="function"==typeof e,a=Array.prototype.slice.call(arguments);"string"==typeof t&&(i&&a.splice(1,1),h.jPlayerAudio.prototype.destroyRemoved(),h.each(this.instances,function(){s.element!==this&&(i&&!e.call(this.data("jPlayerAudio"),s)||this.jPlayerAudio.apply(this,a))}))},pauseOthers:function(t){this.tellOthers("pause",function(){return this.status.srcSet},t)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.aurora.active?this._aurora_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(t){t=this._limitValue(t,0,100),this.status.srcSet?this.html.active?this._html_playHead(t):this.aurora.active?this._aurora_playHead(t):this.flash.active&&this._flash_playHead(t):this._urlNotSetError("playHead")},_muted:function(t){this.mutedWorker(t),this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},t)},mutedWorker:function(t){this.options.muted=t,this.html.used&&this._html_setProperty("muted",t),this.aurora.used&&this._aurora_mute(t),this.flash.used&&this._flash_mute(t),this.html.video.gate||this.html.audio.gate||(this._updateMute(t),this._updateVolume(this.options.volume),this._trigger(h.jPlayerAudio.event.volumechange))},mute:function(t){"object"==typeof t&&this.options.useStateClassSkin&&this.options.muted?this._muted(!1):(t=t===r||!!t,this._muted(t))},unmute:function(t){t=t===r||!!t,this._muted(!t)},_updateMute:function(t){t===r&&(t=this.options.muted),t?this.addStateClass("muted"):this.removeStateClass("muted"),this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):t?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(t){this.volumeWorker(t),this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},t)},volumeWorker:function(t){t=this._limitValue(t,0,1),this.options.volume=t,this.html.used&&this._html_setProperty("volume",t),this.aurora.used&&this._aurora_volume(t),this.flash.used&&this._flash_volume(t),this.html.video.gate||this.html.audio.gate||(this._updateVolume(t),this._trigger(h.jPlayerAudio.event.volumechange))},volumeBar:function(t){if(this.css.jq.volumeBar.length){var e=h(t.currentTarget),s=e.offset(),i=t.pageX-s.left,a=e.width(),o=e.height()-t.pageY+s.top,l=e.height();this.options.verticalVolume?this.volume(o/l):this.volume(i/a)}this.options.muted&&this._muted(!1)},_updateVolume:function(t){t===r&&(t=this.options.volume),t=this.options.muted?0:t,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()):(this.removeStateClass("noVolume"),this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](100*t+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1),this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(t){var s=this;this.options.cssSelectorAncestor=t,this._removeUiClass(),this.ancestorJq=t?h(t):[],t&&1!==this.ancestorJq.length&&this._warning({type:h.jPlayerAudio.warning.CSS_SELECTOR_COUNT,context:t,message:h.jPlayerAudio.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:h.jPlayerAudio.warningHint.CSS_SELECTOR_COUNT}),this._addUiClass(),h.each(this.options.cssSelector,function(t,e){s._cssSelector(t,e)}),this._updateInterface(),this._updateButtons(),this._updateAutohide(),this._updateVolume(),this._updateMute()},_cssSelector:function(e,t){var s=this;if("string"==typeof t)if(h.jPlayerAudio.prototype.options.cssSelector[e]){if(this.css.jq[e]&&this.css.jq[e].length&&this.css.jq[e].unbind(".jPlayerAudio"),this.options.cssSelector[e]=t,this.css.cs[e]=this.options.cssSelectorAncestor+" "+t,this.css.jq[e]=t?h(this.css.cs[e]):[],this.css.jq[e].length&&this[e]){this.css.jq[e].bind("click.jPlayerAudio",function(t){t.preventDefault(),s[e](t),s.options.autoBlur?h(this).blur():h(this).focus()})}t&&1!==this.css.jq[e].length&&this._warning({type:h.jPlayerAudio.warning.CSS_SELECTOR_COUNT,context:this.css.cs[e],message:h.jPlayerAudio.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[e].length+" found for "+e+" method.",hint:h.jPlayerAudio.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:h.jPlayerAudio.warning.CSS_SELECTOR_METHOD,context:e,message:h.jPlayerAudio.warningMsg.CSS_SELECTOR_METHOD,hint:h.jPlayerAudio.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:h.jPlayerAudio.warning.CSS_SELECTOR_STRING,context:t,message:h.jPlayerAudio.warningMsg.CSS_SELECTOR_STRING,hint:h.jPlayerAudio.warningHint.CSS_SELECTOR_STRING})},duration:function(t){this.options.toggleDuration&&(this.options.captureDuration&&t.stopPropagation(),this._setOption("remainingDuration",!this.options.remainingDuration))},seekBar:function(t){if(this.css.jq.seekBar.length){var e=h(t.currentTarget),s=e.offset(),i=100*(t.pageX-s.left)/e.width();this.playHead(i)}},playbackRate:function(t){this._setOption("playbackRate",t)},playbackRateBar:function(t){if(this.css.jq.playbackRateBar.length){var e,s=h(t.currentTarget),i=s.offset(),a=t.pageX-i.left,o=s.width(),l=s.height()-t.pageY+i.top,n=s.height();e=(this.options.verticalPlaybackRate?l/n:a/o)*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+this.options.minPlaybackRate,this.playbackRate(e)}},_updatePlaybackRate:function(){var t=(this.options.playbackRate-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);this.status.playbackRateEnabled?(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show(),this.css.jq.playbackRateBarValue.length&&(this.css.jq.playbackRateBarValue.show(),this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](100*t+"%"))):(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(t){"object"==typeof t&&this.options.useStateClassSkin&&this.options.loop?this._loop(!1):this._loop(!0)},repeatOff:function(){this._loop(!1)},_loop:function(t){this.options.loop!==t&&(this.options.loop=t,this._updateButtons(),this._trigger(h.jPlayerAudio.event.repeat))},option:function(t,e){var s=t;if(0===arguments.length)return h.extend(!0,{},this.options);if("string"==typeof t){var i=t.split(".");if(e===r){for(var a=h.extend(!0,{},this.options),o=0;o<i.length;o++){if(a[i[o]]===r)return this._warning({type:h.jPlayerAudio.warning.OPTION_KEY,context:t,message:h.jPlayerAudio.warningMsg.OPTION_KEY,hint:h.jPlayerAudio.warningHint.OPTION_KEY}),r;a=a[i[o]]}return a}for(var l=s={},n=0;n<i.length;n++)n<i.length-1?(l[i[n]]={},l=l[i[n]]):l[i[n]]=e}return this._setOptions(s),this},_setOptions:function(t){var s=this;return h.each(t,function(t,e){s._setOption(t,e)}),this},_setOption:function(t,e){var s=this;switch(t){case"volume":this.volume(e);break;case"muted":this._muted(e);break;case"globalVolume":this.options[t]=e;break;case"cssSelectorAncestor":this._cssSelectorAncestor(e);break;case"cssSelector":h.each(e,function(t,e){s._cssSelector(t,e)});break;case"playbackRate":this.options[t]=e=this._limitValue(e,this.options.minPlaybackRate,this.options.maxPlaybackRate),this.html.used&&this._html_setProperty("playbackRate",e),this._updatePlaybackRate();break;case"defaultPlaybackRate":this.options[t]=e=this._limitValue(e,this.options.minPlaybackRate,this.options.maxPlaybackRate),this.html.used&&this._html_setProperty("defaultPlaybackRate",e),this._updatePlaybackRate();break;case"minPlaybackRate":this.options[t]=e=this._limitValue(e,.1,this.options.maxPlaybackRate-.1),this._updatePlaybackRate();break;case"maxPlaybackRate":this.options[t]=e=this._limitValue(e,this.options.minPlaybackRate+.1,16),this._updatePlaybackRate();break;case"fullScreen":if(this.options[t]!==e){var i=h.jPlayerAudio.nativeFeatures.fullscreen.used.webkitVideo;(!i||i&&!this.status.waitForPlay)&&(i||(this.options[t]=e),e?this._requestFullscreen():this._exitFullscreen(),i||this._setOption("fullWindow",e))}break;case"fullWindow":this.options[t]!==e&&(this._removeUiClass(),this.options[t]=e,this._refreshSize());break;case"size":this.options.fullWindow||this.options[t].cssClass===e.cssClass||this._removeUiClass(),this.options[t]=h.extend({},this.options[t],e),this._refreshSize();break;case"sizeFull":this.options.fullWindow&&this.options[t].cssClass!==e.cssClass&&this._removeUiClass(),this.options[t]=h.extend({},this.options[t],e),this._refreshSize();break;case"autohide":this.options[t]=h.extend({},this.options[t],e),this._updateAutohide();break;case"loop":this._loop(e);break;case"remainingDuration":this.options[t]=e,this._updateInterface();break;case"toggleDuration":this.options[t]=e;break;case"nativeVideoControls":this.options[t]=h.extend({},this.options[t],e),this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls),this._restrictNativeVideoControls(),this._updateNativeVideoControls();break;case"noFullWindow":this.options[t]=h.extend({},this.options[t],e),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[t]=h.extend({},this.options[t],e),this.status.noVolume=this._uaBlocklist(this.options.noVolume),this._updateVolume(),this._updateMute();break;case"emulateHtml":this.options[t]!==e&&((this.options[t]=e)?this._emulateHtmlBridge():this._destroyHtmlBridge());break;case"timeFormat":this.options[t]=h.extend({},this.options[t],e);break;case"keyEnabled":(this.options[t]=e)||this!==h.jPlayerAudio.focus||(h.jPlayerAudio.focus=null);break;case"keyBindings":this.options[t]=h.extend(!0,{},this.options[t],e);break;case"audioFullScreen":case"autoBlur":this.options[t]=e}return this},_refreshSize:function(){this._setSize(),this._addUiClass(),this._updateSize(),this._updateButtons(),this._updateAutohide(),this._trigger(h.jPlayerAudio.event.resize)},_setSize:function(){this.options.fullWindow?(this.status.width=this.options.sizeFull.width,this.status.height=this.options.sizeFull.height,this.status.cssClass=this.options.sizeFull.cssClass):(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&&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}),!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}):!this.status.waitForPlay&&this.flash.active&&this.status.video&&this.internal.flash.jq.css({width:this.status.width,height:this.status.height})},_updateAutohide:function(){var a=this,t=".jPlayerAudioAutohide",e="mousemove.jPlayerAudio"+t,s=function(t){var e,s,i=!1;void 0!==a.internal.mouse?(e=a.internal.mouse.x-t.pageX,s=a.internal.mouse.y-t.pageY,i=0<Math.floor(e)||0<Math.floor(s)):i=!0,a.internal.mouse={x:t.pageX,y:t.pageY},i&&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)},a.options.autohide.hold)})};this.css.jq.gui.length&&(this.css.jq.gui.stop(!0,!0),clearTimeout(this.internal.autohideId),delete this.internal.mouse,this.element.unbind(t),this.css.jq.gui.unbind(t),this.status.nativeVideoControls?this.css.jq.gui.hide():this.options.fullWindow&&this.options.autohide.full||!this.options.fullWindow&&this.options.autohide.restored?(this.element.bind(e,s),this.css.jq.gui.bind(e,s),this.css.jq.gui.hide()):this.css.jq.gui.show())},fullScreen:function(t){"object"==typeof t&&this.options.useStateClassSkin&&this.options.fullScreen?this._setOption("fullScreen",!1):this._setOption("fullScreen",!0)},restoreScreen:function(){this._setOption("fullScreen",!1)},_fullscreenAddEventListeners:function(){var t=this,e=h.jPlayerAudio.nativeFeatures.fullscreen;e.api.fullscreenEnabled&&e.event.fullscreenchange&&("function"!=typeof this.internal.fullscreenchangeHandler&&(this.internal.fullscreenchangeHandler=function(){t._fullscreenchange()}),document.addEventListener(e.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1))},_fullscreenRemoveEventListeners:function(){var t=h.jPlayerAudio.nativeFeatures.fullscreen;this.internal.fullscreenchangeHandler&&document.removeEventListener(t.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1)},_fullscreenchange:function(){this.options.fullScreen&&!h.jPlayerAudio.nativeFeatures.fullscreen.api.fullscreenElement()&&this._setOption("fullScreen",!1)},_requestFullscreen:function(){var t=this.ancestorJq.length?this.ancestorJq[0]:this.element[0],e=h.jPlayerAudio.nativeFeatures.fullscreen;e.used.webkitVideo&&(t=this.htmlElement.video),e.api.fullscreenEnabled&&e.api.requestFullscreen(t)},_exitFullscreen:function(){var t,e=h.jPlayerAudio.nativeFeatures.fullscreen;e.used.webkitVideo&&(t=this.htmlElement.video),e.api.fullscreenEnabled&&e.api.exitFullscreen(t)},_html_initMedia:function(t){var i=h(this.htmlElement.media).empty();h.each(t.track||[],function(t,e){var s=document.createElement("track");s.setAttribute("kind",e.kind?e.kind:""),s.setAttribute("src",e.src?e.src:""),s.setAttribute("srclang",e.srclang?e.srclang:""),s.setAttribute("label",e.label?e.label:""),e.def&&s.setAttribute("default",e.def),i.append(s)}),this.htmlElement.media.src=this.status.src,"none"!==this.options.preload&&this._html_load(),this._trigger(h.jPlayerAudio.event.timeupdate)},_html_setFormat:function(s){var i=this;h.each(this.formats,function(t,e){if(i.html.support[e]&&s[e])return i.status.src=s[e],i.status.format[e]=!0,i.status.formatType=e,!1})},_html_setAudio:function(t){this._html_setFormat(t),this.htmlElement.media=this.htmlElement.audio,this._html_initMedia(t)},_html_setVideo:function(t){this._html_setFormat(t),this.status.nativeVideoControls&&(this.htmlElement.video.poster=this._validString(t.poster)?t.poster:""),this.htmlElement.media=this.htmlElement.video,this._html_initMedia(t)},_html_resetMedia:function(){this.htmlElement.media&&(this.htmlElement.media.id!==this.internal.video.id||this.status.nativeVideoControls||this.internal.video.jq.css({width:"0px",height:"0px"}),this.htmlElement.media.pause())},_html_clearMedia:function(){this.htmlElement.media&&(this.htmlElement.media.src="about:blank",this.htmlElement.media.load())},_html_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.htmlElement.media.load()),clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(e){var s=this,t=this.htmlElement.media;if(this.androidFix.pause=!1,this._html_load(),this.androidFix.setMedia)this.androidFix.play=!0,this.androidFix.time=e;else if(isNaN(e))t.play();else{this.internal.cmdsIgnored&&t.play();try{if(t.seekable&&!("object"==typeof t.seekable&&0<t.seekable.length))throw 1;t.currentTime=e,t.play()}catch(t){return void(this.internal.htmlDlyCmdId=setTimeout(function(){s.play(e)},250))}}this._html_checkWaitForPlay()},_html_pause:function(e){var s=this,t=this.htmlElement.media;if(this.androidFix.play=!1,0<e?this._html_load():clearTimeout(this.internal.htmlDlyCmdId),t.pause(),this.androidFix.setMedia)this.androidFix.pause=!0,this.androidFix.time=e;else if(!isNaN(e))try{if(t.seekable&&!("object"==typeof t.seekable&&0<t.seekable.length))throw 1;t.currentTime=e}catch(t){return void(this.internal.htmlDlyCmdId=setTimeout(function(){s.pause(e)},250))}0<e&&this._html_checkWaitForPlay()},_html_playHead:function(e){var s=this,t=this.htmlElement.media;this._html_load();try{if("object"==typeof t.seekable&&0<t.seekable.length)t.currentTime=e*t.seekable.end(t.seekable.length-1)/100;else{if(!(0<t.duration)||isNaN(t.duration))throw"e";t.currentTime=e*t.duration/100}}catch(t){return void(this.internal.htmlDlyCmdId=setTimeout(function(){s.playHead(e)},250))}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})))},_html_setProperty:function(t,e){this.html.audio.available&&(this.htmlElement.audio[t]=e),this.html.video.available&&(this.htmlElement.video[t]=e)},_aurora_setAudio:function(s){var i=this;h.each(this.formats,function(t,e){if(i.aurora.support[e]&&s[e])return i.status.src=s[e],i.status.format[e]=!0,i.status.formatType=e,!1}),this.aurora.player=new AV.Player.fromURL(this.status.src),this._addAuroraEventListeners(this.aurora.player,this.aurora),"auto"===this.options.preload&&(this._aurora_load(),this.status.waitForLoad=!1)},_aurora_resetMedia:function(){this.aurora.player&&this.aurora.player.stop()},_aurora_clearMedia:function(){},_aurora_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.aurora.player.preload())},_aurora_play:function(t){this.status.waitForLoad||isNaN(t)||this.aurora.player.seek(t),this.aurora.player.playing||this.aurora.player.play(),this.status.waitForLoad=!1,this._aurora_checkWaitForPlay(),this._updateButtons(!0),this._trigger(h.jPlayerAudio.event.play)},_aurora_pause:function(t){isNaN(t)||this.aurora.player.seek(1e3*t),this.aurora.player.pause(),0<t&&this._aurora_checkWaitForPlay(),this._updateButtons(!1),this._trigger(h.jPlayerAudio.event.pause)},_aurora_playHead:function(t){0<this.aurora.player.duration&&this.aurora.player.seek(t*this.aurora.player.duration/100),this.status.waitForLoad||this._aurora_checkWaitForPlay()},_aurora_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1)},_aurora_volume:function(t){this.aurora.player.volume=100*t},_aurora_mute:function(t){t?(this.aurora.properties.lastvolume=this.aurora.player.volume,this.aurora.player.volume=0):this.aurora.player.volume=this.aurora.properties.lastvolume,this.aurora.properties.muted=t},_flash_setAudio:function(s){var i=this;try{h.each(this.formats,function(t,e){if(i.flash.support[e]&&s[e]){switch(e){case"m4a":case"fla":i._getMovie().fl_setAudio_m4a(s[e]);break;case"mp3":i._getMovie().fl_setAudio_mp3(s[e]);break;case"rtmpa":i._getMovie().fl_setAudio_rtmp(s[e])}return i.status.src=s[e],i.status.format[e]=!0,i.status.formatType=e,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(t){this._flashError(t)}},_flash_setVideo:function(s){var i=this;try{h.each(this.formats,function(t,e){if(i.flash.support[e]&&s[e]){switch(e){case"m4v":case"flv":i._getMovie().fl_setVideo_m4v(s[e]);break;case"rtmpv":i._getMovie().fl_setVideo_rtmp(s[e])}return i.status.src=s[e],i.status.format[e]=!0,i.status.formatType=e,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(t){this._flashError(t)}},_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(t){this._flashError(t)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(t){this._flashError(t)}this.status.waitForLoad=!1},_flash_play:function(t){try{this._getMovie().fl_play(t)}catch(t){this._flashError(t)}this.status.waitForLoad=!1,this._flash_checkWaitForPlay()},_flash_pause:function(t){try{this._getMovie().fl_pause(t)}catch(t){this._flashError(t)}0<t&&(this.status.waitForLoad=!1,this._flash_checkWaitForPlay())},_flash_playHead:function(t){try{this._getMovie().fl_play_head(t)}catch(t){this._flashError(t)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.flash.jq.css({width:this.status.width,height:this.status.height})))},_flash_volume:function(t){try{this._getMovie().fl_volume(t)}catch(t){this._flashError(t)}},_flash_mute:function(t){try{this._getMovie().fl_mute(t)}catch(t){this._flashError(t)}},_getMovie:function(){return document[this.internal.flash.id]},_getFlashPluginVersion:function(){var t,e=0;if(window.ActiveXObject)try{if(t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){var s=t.GetVariable("$version");s&&(s=s.split(" ")[1].split(","),e=parseInt(s[0],10)+"."+parseInt(s[1],10))}}catch(t){}else navigator.plugins&&0<navigator.mimeTypes.length&&(t=navigator.plugins["Shockwave Flash"])&&(e=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1"));return 1*e},_checkForFlash:function(t){var e=!1;return this._getFlashPluginVersion()>=t&&(e=!0),e},_validString:function(t){return t&&"string"==typeof t},_limitValue:function(t,e,s){return t<e?e:s<t?s:t},_urlNotSetError:function(t){this._error({type:h.jPlayerAudio.error.URL_NOT_SET,context:t,message:h.jPlayerAudio.errorMsg.URL_NOT_SET,hint:h.jPlayerAudio.errorHint.URL_NOT_SET})},_flashError:function(t){var e;e=this.internal.ready?"FLASH_DISABLED":"FLASH",this._error({type:h.jPlayerAudio.error[e],context:this.internal.flash.swf,message:h.jPlayerAudio.errorMsg[e]+t.message,hint:h.jPlayerAudio.errorHint[e]}),this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(t){this._trigger(h.jPlayerAudio.event.error,t),this.options.errorAlerts&&this._alert("Error!"+(t.message?"\n"+t.message:"")+(t.hint?"\n"+t.hint:"")+"\nContext: "+t.context)},_warning:function(t){this._trigger(h.jPlayerAudio.event.warning,r,t),this.options.warningAlerts&&this._alert("Warning!"+(t.message?"\n"+t.message:"")+(t.hint?"\n"+t.hint:"")+"\nContext: "+t.context)},_alert:function(t){var e="jPlayerAudio "+this.version.script+" : id='"+this.internal.self.id+"' : "+t;this.options.consoleAlerts?window.console&&window.console.log&&window.console.log(e):alert(e)},_emulateHtmlBridge:function(){var a=this;h.each(h.jPlayerAudio.emulateMethods.split(/\s+/g),function(t,e){a.internal.domNode[e]=function(t){a[e](t)}}),h.each(h.jPlayerAudio.event,function(s,t){var i=!0;h.each(h.jPlayerAudio.reservedEvent.split(/\s+/g),function(t,e){if(e===s)return i=!1}),i&&a.element.bind(t+".jPlayerAudio.jPlayerAudioHtml",function(){a._emulateHtmlUpdate();var t=document.createEvent("Event");t.initEvent(s,!1,!0),a.internal.domNode.dispatchEvent(t)})})},_emulateHtmlUpdate:function(){var s=this;h.each(h.jPlayerAudio.emulateStatus.split(/\s+/g),function(t,e){s.internal.domNode[e]=s.status[e]}),h.each(h.jPlayerAudio.emulateOptions.split(/\s+/g),function(t,e){s.internal.domNode[e]=s.options[e]})},_destroyHtmlBridge:function(){var s=this;this.element.unbind(".jPlayerAudioHtml");var t=h.jPlayerAudio.emulateMethods+" "+h.jPlayerAudio.emulateStatus+" "+h.jPlayerAudio.emulateOptions;h.each(t.split(/\s+/g),function(t,e){delete s.internal.domNode[e]})}},h.jPlayerAudio.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"},h.jPlayerAudio.errorMsg={FLASH:"jPlayerAudio's Flash fallback is not configured correctly, or a command was issued before the jPlayerAudio Ready event. Details: ",FLASH_DISABLED:"jPlayerAudio'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 jPlayerAudio 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.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayerAudio "+h.jPlayerAudio.prototype.version.script+" needs Jplayer.swf version "+h.jPlayerAudio.prototype.version.needFlash+" but found "},h.jPlayerAudio.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayerAudio entity or any ancestor.",NO_SOLUTION:"Review the jPlayerAudio options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayerAudio files."},h.jPlayerAudio.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"},h.jPlayerAudio.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayerAudio('cssSelector') is not a valid jPlayerAudio method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayerAudio('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayerAudio('option') is undefined."},h.jPlayerAudio.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."}}),function(o,i){jPlayerAudioPlaylist=function(t,e,s){var i=this;this.current=0,this.loop=!1,this.shuffled=!1,this.removing=!1,this.cssSelector=o.extend({},this._cssSelector,t),this.options=o.extend(!0,{keyBindings:{next:{key:221,fn:function(){i.next()}},previous:{key:219,fn:function(){i.previous()}},shuffle:{key:83,fn:function(){i.shuffle()}}},stateClass:{shuffled:"mdtc-clnplra-state-shuffled"}},this._options,s),this.playlist=[],this.original=[],this._initPlaylist(e),this.cssSelector.details=this.cssSelector.cssSelectorAncestor+" .mdtc-clnplra-details",this.cssSelector.playlist=this.cssSelector.cssSelectorAncestor+" .mdtc-clnplra-playlist",this.cssSelector.next=this.cssSelector.cssSelectorAncestor+" .mdtc-clnplra-next",this.cssSelector.previous=this.cssSelector.cssSelectorAncestor+" .mdtc-clnplra-previous",this.cssSelector.shuffle=this.cssSelector.cssSelectorAncestor+" .mdtc-clnplra-shuffle",this.cssSelector.shuffleOff=this.cssSelector.cssSelectorAncestor+" .mdtc-clnplra-shuffle-off",this.options.cssSelectorAncestor=this.cssSelector.cssSelectorAncestor,this.options.repeat=function(t){i.loop=t.jPlayerAudio.options.loop},o(this.cssSelector.jPlayerAudio).bind(o.jPlayerAudio.event.ready,function(){i._init()}),o(this.cssSelector.jPlayerAudio).bind(o.jPlayerAudio.event.ended,function(){i.next()}),o(this.cssSelector.jPlayerAudio).bind(o.jPlayerAudio.event.play,function(){o(this).jPlayerAudio("pauseOthers")}),o(this.cssSelector.jPlayerAudio).bind(o.jPlayerAudio.event.resize,function(t){t.jPlayerAudio.options.fullScreen?o(i.cssSelector.details).show():o(i.cssSelector.details).hide()}),o(this.cssSelector.previous).click(function(t){t.preventDefault(),i.previous(),i.blur(this)}),o(this.cssSelector.next).click(function(t){t.preventDefault(),i.next(),i.blur(this)}),o(this.cssSelector.shuffle).click(function(t){t.preventDefault(),i.shuffled&&o(i.cssSelector.jPlayerAudio).jPlayerAudio("option","useStateClassSkin")?i.shuffle(!1):i.shuffle(!0),i.blur(this)}),o(this.cssSelector.shuffleOff).click(function(t){t.preventDefault(),i.shuffle(!1),i.blur(this)}).hide(),this.options.fullScreen||o(this.cssSelector.details).hide(),o(this.cssSelector.playlist+" ul").empty(),this._createItemHandlers(),o(this.cssSelector.jPlayerAudio).jPlayerAudio(this.options)},jPlayerAudioPlaylist.prototype={_cssSelector:{jPlayerAudio:"#jquery_jplayer_1",cssSelectorAncestor:"#jp_audio_container_1"},_options:{playlistOptions:{autoPlay:!1,loopOnPrevious:!1,shuffleOnLoop:!0,enableRemoveControls:!1,displayTime:"slow",addTime:"fast",removeTime:"fast",shuffleTime:"slow",itemClass:"mdtc-clnplra-playlist-item",freeGroupClass:"mdtc-clnplra-free-media",freeItemClass:"mdtc-clnplra-playlist-item-free",removeItemClass:"mdtc-clnplra-playlist-item-remove"}},option:function(t,e){if(e===i)return this.options.playlistOptions[t];switch(this.options.playlistOptions[t]=e,t){case"enableRemoveControls":this._updateControls();break;case"itemClass":case"freeGroupClass":case"freeItemClass":case"removeItemClass":this._refresh(!0),this._createItemHandlers()}return this},_init:function(){var t=this;this._refresh(function(){t.options.playlistOptions.autoPlay?t.play(t.current):t.select(t.current)})},_initPlaylist:function(t){this.current=0,this.shuffled=!1,this.removing=!1,this.original=o.extend(!0,[],t),this._originalPlaylist()},_originalPlaylist:function(){var e=this;this.playlist=[],o.each(this.original,function(t){e.playlist[t]=e.original[t]})},_refresh:function(t){var s=this;if(t&&!o.isFunction(t))o(this.cssSelector.playlist+" ul").empty(),o.each(this.playlist,function(t){o(s.cssSelector.playlist+" ul").append(s._createListItem(s.playlist[t]))}),this._updateControls();else{var e=o(this.cssSelector.playlist+" ul").children().length?this.options.playlistOptions.displayTime:0;o(this.cssSelector.playlist+" ul").hide(e,function(){var e=o(this);o(this).empty(),o.each(s.playlist,function(t){e.append(s._createListItem(s.playlist[t]))}),s._updateControls(),o.isFunction(t)&&t(),s.playlist.length?o(this).show(s.options.playlistOptions.displayTime):o(this).show()})}},_createListItem:function(t){var s=this,i="<li><div>";if(i+="<a href='javascript:;' class='"+this.options.playlistOptions.removeItemClass+"'>×</a>",t.free){var a=!0;i+="<span class='"+this.options.playlistOptions.freeGroupClass+"'>(",o.each(t,function(t,e){o.jPlayerAudio.prototype.format[t]&&(a?a=!1:i+=" | ",i+="<a class='"+s.options.playlistOptions.freeItemClass+"' href='"+e+"' tabindex='-1'>"+t+"</a>")}),i+=")</span>"}return i+="<span href='javascript:;' class='"+this.options.playlistOptions.itemClass+"' tabindex='0'>"+t.title+(t.artist?" <span class='mdtc-clnplra-artist'>by "+t.artist+"</span>":"")+"</span>",i+="</div></li>"},_createItemHandlers:function(){var s=this;o(this.cssSelector.playlist).off("click","span."+this.options.playlistOptions.itemClass).on("click","span."+this.options.playlistOptions.itemClass,function(t){t.preventDefault();var e=o(this).parent().parent().index();s.current!==e?s.play(e):o(s.cssSelector.jPlayerAudio).jPlayerAudio("play"),s.blur(this)}),o(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.freeItemClass).on("click","a."+this.options.playlistOptions.freeItemClass,function(t){t.preventDefault(),o(this).parent().parent().find("."+s.options.playlistOptions.itemClass).click(),s.blur(this)}),o(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.removeItemClass).on("click","a."+this.options.playlistOptions.removeItemClass,function(t){t.preventDefault();var e=o(this).parent().parent().index();s.remove(e),s.blur(this)})},_updateControls:function(){this.options.playlistOptions.enableRemoveControls?o(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).show():o(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).hide(),this.shuffled?o(this.cssSelector.jPlayerAudio).jPlayerAudio("addStateClass","shuffled"):o(this.cssSelector.jPlayerAudio).jPlayerAudio("removeStateClass","shuffled"),o(this.cssSelector.shuffle).length&&o(this.cssSelector.shuffleOff).length&&(this.shuffled?(o(this.cssSelector.shuffleOff).show(),o(this.cssSelector.shuffle).hide()):(o(this.cssSelector.shuffleOff).hide(),o(this.cssSelector.shuffle).show()))},_highlight:function(t){this.playlist.length&&t!==i&&(o(this.cssSelector.playlist+" .mdtc-clnplra-playlist-current").removeClass("mdtc-clnplra-playlist-current"),o(this.cssSelector.playlist+" li:nth-child("+(t+1)+")").addClass("mdtc-clnplra-playlist-current").find(".mdtc-clnplra-playlist-item").addClass("mdtc-clnplra-playlist-current"))},setPlaylist:function(t){this._initPlaylist(t),this._init()},add:function(t,e){o(this.cssSelector.playlist+" ul").append(this._createListItem(t)).find("li:last-child").hide().show(this.options.playlistOptions.addTime),this._updateControls(),this.original.push(t),this.playlist.push(t),e?this.play(this.playlist.length-1):1===this.original.length&&this.select(0)},remove:function(t){var s=this;return t===i?(this._initPlaylist([]),this._refresh(function(){o(s.cssSelector.jPlayerAudio).jPlayerAudio("clearMedia")}),!0):!this.removing&&(0<=(t=t<0?s.original.length+t:t)&&t<this.playlist.length&&(this.removing=!0,o(this.cssSelector.playlist+" li:nth-child("+(t+1)+")").hide(this.options.playlistOptions.removeTime,function(){if(o(this).remove(),s.shuffled){var e=s.playlist[t];o.each(s.original,function(t){if(s.original[t]===e)return s.original.splice(t,1),!1}),s.playlist.splice(t,1)}else s.original.splice(t,1),s.playlist.splice(t,1);s.original.length?t===s.current?(s.current=t<s.original.length?s.current:s.original.length-1,s.select(s.current)):t<s.current&&s.current--:(o(s.cssSelector.jPlayerAudio).jPlayerAudio("clearMedia"),s.current=0,s.shuffled=!1,s._updateControls()),s.removing=!1})),!0)},select:function(t){0<=(t=t<0?this.original.length+t:t)&&t<this.playlist.length?(this.current=t,this._highlight(t),o(this.cssSelector.jPlayerAudio).jPlayerAudio("setMedia",this.playlist[this.current])):this.current=0},play:function(t){0<=(t=t<0?this.original.length+t:t)&&t<this.playlist.length?this.playlist.length&&(this.select(t),o(this.cssSelector.jPlayerAudio).jPlayerAudio("play")):t===i&&o(this.cssSelector.jPlayerAudio).jPlayerAudio("play")},pause:function(){o(this.cssSelector.jPlayerAudio).jPlayerAudio("pause")},next:function(){var t=this.current+1<this.playlist.length?this.current+1:0;this.loop?0===t&&this.shuffled&&this.options.playlistOptions.shuffleOnLoop&&1<this.playlist.length?this.shuffle(!0,!0):this.play(t):0<t&&this.play(t)},previous:function(){var t=0<=this.current-1?this.current-1:this.playlist.length-1;(this.loop&&this.options.playlistOptions.loopOnPrevious||t<this.playlist.length-1)&&this.play(t)},shuffle:function(t,e){var s=this;t===i&&(t=!this.shuffled),(t||t!==this.shuffled)&&o(this.cssSelector.playlist+" ul").hide(this.options.playlistOptions.shuffleTime,function(){(s.shuffled=t)?s.playlist.sort(function(){return.5-Math.random()}):s._originalPlaylist(),s._refresh(!0),e||!o(s.cssSelector.jPlayerAudio).data("jPlayerAudio").status.paused?s.play(0):s.select(0),o(this).show(s.options.playlistOptions.shuffleTime)})},blur:function(t){o(this.cssSelector.jPlayerAudio).jPlayerAudio("option","autoBlur")&&o(t).blur()}}}(jQuery),function(h){function u(a){function t(){var t=a.next(),e=t.find(".mdtc-clnplra-song-title-inner"),s=t.find(".mdtc-clnplra-song-title").width(),i=e.width()-s;0<i&&(e.animate({marginLeft:"-="+(i-10)},2500),setTimeout(function(){e.animate({marginLeft:"+="+(i-10)},2500)},4e3))}t(),setInterval(function(){t()},8e3)}h.fn.cleanaudioplayer=function(r){var o,l,n;return h("body").on("mousemove",".mdtc-clnplra-volume-bar",function(t){o&&o[l](h.extend({},t,{currentTarget:n}))}).on("mouseup",function(){o=!1}).on("mousedown",function(t){var e=h(t.target).parents().add(t.currentTarget),s=e.filter(".mdtc-clnplra-volume-bar").first(),i=e.filter(".mdtc-clnplra-seek-bar").first();i.length?(l="seekBar",n=i):s.length&&(l="volumeBar",n=s);var a=n&&n.closest(".mdtc-clnplra-audio");o=a&&a.children().first().add(a.prev()).filter(function(){return h(this).data("jPlayerAudio")}).first().data("jPlayerAudio")}),this.each(function(t){var i=h.extend({theme:"default",supplied:"mp3,m4a,oga,wav",disableControls:!1,autoplay:!1,playlistHeight:!1,rssUrl:!1,playlist:!1},r),e=!1,s="";if(0<h(this).find("> ul").length){var a=h(this).find("> ul");if(a.data("theme")&&(i.theme=a.data("theme")),a.data("supplied")&&(i.supplied=a.data("supplied")),a.data("disable-controls")&&(i.disableControls=a.data("disable-controls")),a.data("autoplay")&&(i.autoplay=a.data("autoplay")),a.data("playlist-height")&&(i.playlistHeight=a.data("playlist-height")),0<h(this).find("> ul li").length){var o=[];h(this).find("> ul li").each(function(){var t=h(this),e=!!t.data("free"),s=t.data("type"),i={title:t.data("title"),artist:t.data("artist"),free:e};i[s]=t.data("url"),o.push(i)}),1==h(this).find("> ul li").length&&h(this).find("> ul li").data("free")&&(e=!0,s=h(this).find("> ul li").data("url")),i.playlist=o}}var l=function(){for(var t="",e="abcdefghijklmnopqrstuvwxyz0123456789",s=0;s<15;s++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}();if(h(this).html('<div class="mdtc-clnplra-audio mdtc-clnplra-main-player"><div class="mdtc-clnplra-jplayer">\x3c!-- --\x3e</div><div class="mdtc-clnplra-type-playlist"><div class="mdtc-clnplra-gui mdtc-clnplra-interface"><ul class="mdtc-clnplra-controls"><li><a href="javascript:;" class="mdtc-clnplra-previous mdtc-clnplra-icon-prev" tabindex="1"></a></li><li><a href="javascript:;" class="mdtc-clnplra-play mdtc-clnplra-icon-play" tabindex="1"></a></li><li><a href="javascript:;" class="mdtc-clnplra-pause mdtc-clnplra-icon-pause" tabindex="1" style="display:none"></a></li><li><a href="javascript:;" class="mdtc-clnplra-next mdtc-clnplra-icon-next" tabindex="1"></a></li></ul><div class="mdtc-clnplra-seek-container"><div class="mdtc-clnplra-seek-container-inner"><div class="mdtc-clnplra-time"><div class="mdtc-clnplra-current-time">00:00</div><div class="mdtc-clnplra-duration" style="display:none">00:00</div></div><div class="mdtc-clnplra-song-title"><div class="mdtc-clnplra-song-title-inner"><strong id="current-song">\x3c!-- --\x3e</strong></div></div><div class="mdtc-clnplra-progress"><div class="mdtc-clnplra-seek-bar" style="width:0%"><div class="mdtc-clnplra-play-bar" style="width:0%">\x3c!-- --\x3e</div></div></div></div></div><div class="mdtc-clnplra-volume-bar"><div class="mdtc-clnplra-volume-bar-value"><i>\x3c!-- --\x3e</i></div></div><ul class="mdtc-clnplra-toggles"><li><a title="Repeat" tabindex="1" class="mdtc-clnplra-repeat mdtc-clnplra-icon-repeat" href="javascript:;"></a></li><li><a title="Repeat off" tabindex="1" class="mdtc-clnplra-repeat-off mdtc-clnplra-icon-repeat" href="javascript:;" style="display:none"></a></li><li><a href="javascript:;" class="mdtc-clnplra-shuffle mdtc-clnplra-icon-shuffle" tabindex="1" title="Shuffle"></a></li><li><a href="javascript:;" class="mdtc-clnplra-shuffle-off mdtc-clnplra-icon-shuffle" tabindex="1" title="Shuffle off" style="display:none"></a></li><li><a href="javascript:;" class="mdtc-clnplra-download-one mdtc-clnplra-icon-download" tabindex="1" title="Download" style="display:none"></a></li></ul></div><div class="clearfix">\x3c!-- --\x3e</div><div class="mdtc-clnplra-playlist"><ul></ul></div><div class="mdtc-clnplra-no-solution" style="display:none"><span>Update Required </span>To play the media you will need to either update your browser to a recent version</div></div></div>'),h(this).find(".mdtc-clnplra-main-player").addClass("mdtc-clnplra-cleanaudioplayer-id-"+l),e&&(h(this).find(".mdtc-clnplra-main-player").addClass("mdtc-clnplra-solo-download"),h(this).find(".mdtc-clnplra-download-one").attr("href",s)),"dark"==i.theme&&h(this).find(".mdtc-clnplra-main-player").addClass("mdtc-clnplra-dark-theme"),i.disableControls&&h(this).find(".mdtc-clnplra-main-player").addClass("mdtc-clnplra-disabled-controls"),i.playlistHeight&&h(this).find(".mdtc-clnplra-playlist > ul").css({maxHeight:i.playlistHeight,overflowY:"auto"}),1<i.playlist.length){playerOptions={solution:"html",supplied:i.supplied,wmode:"window",ready:function(t){var e=h(this);function s(){e.next().is(":visible")&&(e.parent().width()<450?e.parent().addClass("mdtc-clnplra-responsive"):e.parent().removeClass("mdtc-clnplra-responsive"))}e.next().find(".mdtc-clnplra-time").on("click",function(){e.next().find(".mdtc-clnplra-current-time, .mdtc-clnplra-duration").toggle()}),i.autoplay&&h(this).jPlayerAudio("play"),h(window).on("resize",function(){s()}),s(),setInterval(function(){s()},250),u(e)},play:function(t){h(this).jPlayerAudio("pauseOthers")},cssSelector:{title:"#current-song"},playlistOptions:{shuffleTime:150}};var n=i.playlist;new jPlayerAudioPlaylist({jPlayerAudio:".mdtc-clnplra-cleanaudioplayer-id-"+l+" .mdtc-clnplra-jplayer",cssSelectorAncestor:".mdtc-clnplra-cleanaudioplayer-id-"+l},n,playerOptions)}else h(".mdtc-clnplra-cleanaudioplayer-id-"+l+" .mdtc-clnplra-jplayer").jPlayerAudio({ready:function(t){h(this).jPlayerAudio("setMedia",i.playlist[0]);var e=h(this);function s(){e.next().is(":visible")&&(e.parent().width()<450?e.parent().addClass("mdtc-clnplra-responsive"):e.parent().removeClass("mdtc-clnplra-responsive"))}e.next().find(".mdtc-clnplra-time").on("click",function(){e.next().find(".mdtc-clnplra-current-time, .mdtc-clnplra-duration").toggle()}),i.autoplay&&h(this).jPlayerAudio("play"),h(this).parent().addClass("mdtc-clnplra-disabled-controls mdtc-clnplra-solo-player"),h(window).on("resize",function(){s()}),s(),setInterval(function(){s()},250),u(e)},play:function(t){h(this).jPlayerAudio("pauseOthers")},cssSelector:{title:"#current-song"},cssSelectorAncestor:".mdtc-clnplra-cleanaudioplayer-id-"+l,supplied:i.supplied})})}}(jQuery),$(function(){$(".mediatec-cleanaudioplayer").cleanaudioplayer()}); |