hesabixCore/public_html/betheme/js/jquery.jplayer.min.js

14 lines
51 KiB
JavaScript
Raw Normal View History

/*
* jPlayer Plugin for jQuery JavaScript Library
* http://www.jplayer.org
*
* Copyright (c) 2009 - 2013 Happyworm Ltd
* Licensed under the MIT license.
* http://opensource.org/licenses/MIT
*
* Author: Mark J Panaghiston
* Version: 2.5.0
* Date: 7th November 2013
*/
(function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):t.jQuery?e(t.jQuery):e(t.Zepto)})(this,function(t,e){t.fn.jPlayer=function(s){var i="string"==typeof s,a=Array.prototype.slice.call(arguments,1),n=this;return s=!i&&a.length?t.extend.apply(null,[!0,s].concat(a)):s,i&&"_"===s.charAt(0)?n:(i?this.each(function(){var i=t(this).data("jPlayer"),o=i&&t.isFunction(i[s])?i[s].apply(i,a):i;if(o!==i&&o!==e)return n=o,!1}):this.each(function(){var e=t(this).data("jPlayer");e?e.option(s||{}):t(this).data("jPlayer",new t.jPlayer(s,this))}),n)},t.jPlayer=function(e,s){if(arguments.length){this.element=t(s),this.options=t.extend(!0,{},this.options,e);var i=this;this.element.bind("remove.jPlayer",function(){i.destroy()}),this._init()}},"function"!=typeof t.fn.stop&&(t.fn.stop=function(){}),t.jPlayer.emulateMethods="load play pause",t.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate",t.jPlayer.emulateOptions="muted volume",t.jPlayer.reservedEvent="ready flashreset resize repeat error warning",t.jPlayer.event={},t.each("ready 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".split(" "),function(){t.jPlayer.event[this]="jPlayer_"+this}),t.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough".split(" "),t.jPlayer.pause=function(){t.each(t.jPlayer.prototype.instances,function(t,e){e.data("jPlayer").status.srcSet&&e.jPlayer("pause")})},t.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var s=function(){this.init()};s.prototype={init:function(){this.options={timeFormat:t.jPlayer.timeFormat}},time:function(t){var e=new Date(1e3*(t&&"number"==typeof t?t:0)),s=e.getUTCHours();return t=this.options.timeFormat.showHour?e.getUTCMinutes():e.getUTCMinutes()+60*s,e=this.options.timeFormat.showMin?e.getUTCSeconds():e.getUTCSeconds()+60*t,s=this.options.timeFormat.padHour&&10>s?"0"+s:s,t=this.options.timeFormat.padMin&&10>t?"0"+t:t,e=this.options.timeFormat.padSec&&10>e?"0"+e:e,s=""+(this.options.timeFormat.showHour?s+this.options.timeFormat.sepHour:""),s+=this.options.timeFormat.showMin?t+this.options.timeFormat.sepMin:"",s+(this.options.timeFormat.showSec?e+this.options.timeFormat.sepSec:"")}};var i=new s;t.jPlayer.convertTime=function(t){return i.time(t)},t.jPlayer.uaBrowser=function(t){t=t.toLowerCase();var e=/(opera)(?:.*version)?[ \/]([\w.]+)/,s=/(msie) ([\w.]+)/,i=/(mozilla)(?:.*? rv:([\w.]+))?/;return t=/(webkit)[ \/]([\w.]+)/.exec(t)||e.exec(t)||s.exec(t)||0>t.indexOf("compatible")&&i.exec(t)||[],{browser:t[1]||"",version:t[2]||"0"}},t.jPlayer.uaPlatform=function(t){var e=t.toLowerCase(),s=/(android)/,i=/(mobile)/;return t=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(e)||[],e=/(ipad|playbook)/.exec(e)||!i.exec(e)&&s.exec(e)||[],t[1]&&(t[1]=t[1].replace(/\s/g,"_")),{platform:t[1]||"",tablet:e[1]||""}},t.jPlayer.browser={},t.jPlayer.platform={};var a=t.jPlayer.uaBrowser(navigator.userAgent);a.browser&&(t.jPlayer.browser[a.browser]=!0,t.jPlayer.browser.version=a.version),a=t.jPlayer.uaPlatform(navigator.userAgent),a.platform&&(t.jPlayer.platform[a.platform]=!0,t.jPlayer.platform.mobile=!a.tablet,t.jPlayer.platform.tablet=!!a.tablet),t.jPlayer.getDocMode=function(){var e;return t.jPlayer.browser.msie&&(document.documentMode?e=document.documentMode:(e=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(e=7))),e},t.jPlayer.browser.documentMode=t.jPlayer.getDocMode(),t.jPlayer.nativeFeatures={init:function(){var t,e,s=document,i=s.createElement("video"),a={w3c:"fullscreenEnabled fullscreenElement requestFullscreen exitFullscreen fullscreenchange fullscreenerror".split(" "),moz:"mozFullScreenEnabled mozFullScreenElement mozRequestFullScreen mozCancelFullScreen mozfullscreenchange mozfullscreenerror".split(" "),webkit:" webkitCurrentFullScreenEle
this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(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(e){var s=this;this.options.cssSelectorAncestor=e,this._removeUiClass(),this.ancestorJq=e?t(e):[],e&&1!==this.ancestorJq.length&&this._warning({type:t.jPlayer.warning.CSS_SELECTOR_COUNT,context:e,message:t.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:t.jPlayer.warningHint.CSS_SELECTOR_COUNT}),this._addUiClass(),t.each(this.options.cssSelector,function(t,e){s._cssSelector(t,e)}),this._updateInterface(),this._updateButtons(),this._updateAutohide(),this._updateVolume(),this._updateMute()},_cssSelector:function(e,s){var i=this;"string"==typeof s?t.jPlayer.prototype.options.cssSelector[e]?(this.css.jq[e]&&this.css.jq[e].length&&this.css.jq[e].off(".jPlayer"),this.options.cssSelector[e]=s,this.css.cs[e]=this.options.cssSelectorAncestor+" "+s,this.css.jq[e]=s?t(this.css.cs[e]):[],this.css.jq[e].length&&this.css.jq[e].bind("click.jPlayer",function(s){s.preventDefault(),i[e](s),t(this).blur()}),s&&1!==this.css.jq[e].length&&this._warning({type:t.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[e],message:t.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[e].length+" found for "+e+" method.",hint:t.jPlayer.warningHint.CSS_SELECTOR_COUNT})):this._warning({type:t.jPlayer.warning.CSS_SELECTOR_METHOD,context:e,message:t.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:t.jPlayer.warningHint.CSS_SELECTOR_METHOD}):this._warning({type:t.jPlayer.warning.CSS_SELECTOR_STRING,context:s,message:t.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:t.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(e){if(this.css.jq.seekBar.length){var s=t(e.currentTarget),i=s.offset();e=e.pageX-i.left,s=s.width(),this.playHead(100*e/s)}},playBar:function(){},playbackRate:function(t){this._setOption("playbackRate",t)},playbackRateBar:function(e){if(this.css.jq.playbackRateBar.length){var s=t(e.currentTarget),i=s.offset(),a=e.pageX-i.left,n=s.width();e=s.height()-e.pageY+i.top,s=s.height(),this.playbackRate((this.options.verticalPlaybackRate?e/s:a/n)*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+this.options.minPlaybackRate)}},playbackRateBarValue:function(){},_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(){this._loop(!0)},repeatOff:function(){this._loop(!1)},_loop:function(e){this.options.loop!==e&&(this.options.loop=e,this._updateButtons(),this._trigger(t.jPlayer.event.repeat))},currentTime:function(){},duration:function(){},gui:function(){},noSolution:function(){},option:function(s,i){var a=s;if(0===arguments.length)return t.extend(!0,{},this.options);if("string"==typeof s){var n=s.split(".");if(i===e){a=t.extend(!0,{},this.options);for(var o=0;o<n.length;o++){if(a[n[o]]===e)return this._warning({type:t.jPlayer.warning.OPTION_KEY,context:s,message:t.jPlayer.warningMsg.OPTION_KEY,hint:t.jPlayer.warningHint.OPTION_KEY}),e;a=a[n[o]]}return a}o=a={};for(var r=0;r<n.length;r++)r<n.length-1?(o[n[r]]={},o=o[n[r]]):o[n[r]]=i}return this._setOptions(a),this},_setOptions:function(e){var s=this;return t.each(e,function(t,e){s._setOption(t,e)}),thi