Файл: static/player/flowplayer/flowplayer.min.js
Строк: 1895
<?php
/*!
Flowplayer v5.5.0 (Tuesday, 26. August 2014 10:09AM) | flowplayer.org/license
*/
!function(e){function t(t,n){var i="obj"+(""+Math.random()).slice(2,15),a='<object class="fp-engine" id="'+i+'" name="'+i+'" ';a+=e.browser.msie?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+t+'" type="application/x-shockwave-flash">';var o={width:"100%",height:"100%",allowscriptaccess:"always",wmode:"transparent",quality:"high",flashvars:"",movie:t+(e.browser.msie?"?"+i:""),name:i};return e.each(n,function(e,t){o.flashvars+=e+"="+t+"&"}),e.each(o,function(e,t){a+='<param name="'+e+'" value="'+t+'"/>'}),a+="</object>",e(a)}function n(e,t){return t=t||100,Math.round(e*t)/t}function i(e){return/mpegurl/i.test(e)?"application/x-mpegurl":"video/"+e}function a(e){return/^(video|application)/i.test(e)||(e=i(e)),!!h.canPlayType(e).replace("no","")}function o(t,n){var i=e.grep(t,function(e){return e.type===n});return i.length?i[0]:null}function r(e){var t=e.attr("src"),n=e.attr("type")||"",i=t.split(w)[1];return n=/mpegurl/i.test(n)?"mpegurl":n.replace("video/",""),{src:t,suffix:i||n,type:n||i}}function s(t){var n=this,i=[];e("source",t).each(function(){i.push(r(e(this)))}),i.length||i.push(r(t)),n.initialSources=i,n.resolve=function(t){return t?(e.isArray(t)?t={sources:e.map(t,function(t){var n,i=e.extend({},t);return e.each(t,function(e){n=e}),i.type=n,i.src=t[n],delete i[n],i})}:"string"==typeof t&&(t={src:t,sources:[]},e.each(i,function(e,n){"flash"!=n.type&&t.sources.push({type:n.type,src:t.src.replace(w,"."+n.suffix+"$2")})})),t):{sources:i}}}function l(e){return e=parseInt(e,10),e>=10?e:"0"+e}function d(e){e=e||0;var t=Math.floor(e/3600),n=Math.floor(e/60);return e-=60*n,t>=1?(n-=60*t,t+":"+l(n)+":"+l(e)):l(n)+":"+l(e)}!function(e){if(!e.browser){var t=e.browser={},n=navigator.userAgent.toLowerCase(),i=/(chrome)[ /]([w.]+)/.exec(n)||/(safari)[ /]([w.]+)/.exec(n)||/(webkit)[ /]([w.]+)/.exec(n)||/(opera)(?:.*version|)[ /]([w.]+)/.exec(n)||/(msie) ([w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([w.]+)|)/.exec(n)||[];i[1]&&(t[i[1]]=!0,t.version=i[2]||"0")}}(jQuery),e(function(){"function"==typeof e.fn.flowplayer&&e("video").parent(".flowplayer").flowplayer()});var u=[],c=[],f=window.navigator.userAgent;window.flowplayer=function(t){return e.isFunction(t)?c.push(t):"number"==typeof t||void 0===t?u[t||0]:e(t).data("flowplayer")},e(window).on("beforeunload",function(){e.each(u,function(t,n){n.conf.splash?n.unload():n.bind("error",function(){e(".flowplayer.is-error .fp-message").remove()})})});var p=!1;try{"object"==typeof window.localStorage&&(window.localStorage.flowplayerTestStorage="test",p=!0)}catch(v){}e.extend(flowplayer,{version:"5.5.0",engine:{},conf:{},support:{},defaults:{debug:!1,disabled:!1,engine:"html5",fullscreen:window==window.top,keyboard:!0,ratio:9/16,adaptiveRatio:!1,flashfit:!1,rtmp:0,splash:!1,live:!1,swf:"//releases.flowplayer.org/5.5.0/flowplayer.swf",speeds:[.25,.5,1,1.5,2],tooltip:!0,volume:p?"true"==localStorage.muted?0:isNaN(localStorage.volume)?1:localStorage.volume||1:1,errors:["","Video loading aborted","Network error","Video not properly encoded","Video file not found","Unsupported video","Skin not found","SWF file not found","Subtitles not found","Invalid RTMP URL","Unsupported video format. Try installing Adobe Flash."],errorUrls:["","","","","","","","","","","http://get.adobe.com/flashplayer/"],playlist:[]}});var m=1;e.fn.flowplayer=function(t,n){return"string"==typeof t&&(t={swf:t}),e.isFunction(t)&&(n=t,t={}),!t&&this.data("flowplayer")||this.each(function(){var i,a,o=e(this).addClass("is-loading"),r=e.extend({},flowplayer.defaults,flowplayer.conf,t,o.data()),l=e("video",o).addClass("fp-engine").removeAttr("controls"),d=l.length?new s(l):null,f={};if(r.playlist.length){var v,g=r.preload||l.attr("preload");l.length&&l.replaceWith(v=e("<p />")),l=e("<video />").addClass("fp-engine"),v?v.replaceWith(l):o.prepend(l),flowplayer.support.video&&l.attr("preload",g),"string"==typeof r.playlist[0]?l.attr("src",r.playlist[0]):e.each(r.playlist[0],function(t,n){for(var i in n)n.hasOwnProperty(i)&&l.append(e("<source />").attr({type:"video/"+i,src:n[i]}))}),d=new s(l)}var h=o.data("flowplayer");h&&h.unload(),o.data("fp-player_id",o.data("fp-player_id")||m++);try{f=p?window.localStorage:f}catch(y){}var b=this.currentStyle&&"rtl"===this.currentStyle.direction||window.getComputedStyle&&"rtl"===window.getComputedStyle(this,null).getPropertyValue("direction");b&&o.addClass("is-rtl");var w=h||{conf:r,currentSpeed:1,volumeLevel:"undefined"==typeof r.volume?1*f.volume:r.volume,video:{},disabled:!1,finished:!1,loading:!1,muted:"true"==f.muted||r.muted,paused:!1,playing:!1,ready:!1,splash:!1,rtl:b,load:function(t,n){if(!(w.error||w.loading||w.disabled)){if(t=d.resolve(t),e.extend(t,a.pick(t.sources)),t.src){var i=e.Event("load");o.trigger(i,[w,t,a]),i.isDefaultPrevented()?w.loading=!1:(a.load(t),e.isFunction(t)&&(n=t),n&&o.one("ready",n))}return w}},pause:function(e){return!w.ready||w.seeking||w.disabled||w.loading||(a.pause(),w.one("pause",e)),w},resume:function(){return w.ready&&w.paused&&!w.disabled&&(a.resume(),w.finished&&(w.trigger("resume",[w]),w.finished=!1)),w},toggle:function(){return w.ready?w.paused?w.resume():w.pause():w.load()},seek:function(t,n){if(w.ready){if("boolean"==typeof t){var r=.1*w.video.duration;t=w.video.time+(t?r:-r)}t=i=Math.min(Math.max(t,0),w.video.duration).toFixed(1);var s=e.Event("beforeseek");o.trigger(s,[w,t]),s.isDefaultPrevented()?(w.seeking=!1,o.toggleClass("is-seeking",w.seeking)):(a.seek(t),e.isFunction(n)&&o.one("seek",n))}return w},seekTo:function(e,t){var n=void 0===e?i:.1*w.video.duration*e;return w.seek(n,t)},mute:function(e){return void 0===e&&(e=!w.muted),f.muted=w.muted=e,f.volume=isNaN(f.volume)?r.volume:f.volume,w.volume(e?0:f.volume,!0),w.trigger("mute",e),w},volume:function(e,t){return w.ready&&(e=Math.min(Math.max(e,0),1),t||(f.volume=e),a.volume(e)),w},speed:function(t,n){return w.ready&&("boolean"==typeof t&&(t=r.speeds[e.inArray(w.currentSpeed,r.speeds)+(t?1:-1)]||w.currentSpeed),a.speed(t),n&&o.one("speed",n)),w},stop:function(){return w.ready&&(w.pause(),w.seek(0,function(){o.trigger("stop")})),w},unload:function(){return o.hasClass("is-embedding")||(r.splash?(w.trigger("unload"),a.unload()):w.stop()),w},disable:function(e){return void 0===e&&(e=!w.disabled),e!=w.disabled&&(w.disabled=e,w.trigger("disable",e)),w}};w.conf=e.extend(w.conf,r),e.each(["bind","one","unbind"],function(e,t){w[t]=function(e,n){return o[t](e,n),w}}),w.trigger=function(e,t){return o.trigger(e,[w,t]),w},o.data("flowplayer")||o.bind("boot",function(){return e.each(["autoplay","loop","preload","poster"],function(e,t){var n=l.attr(t);void 0!==n&&(r[t]=n?n:!0)}),(r.splash||o.hasClass("is-splash")||!flowplayer.support.firstframe)&&(w.forcedSplash=!r.splash&&!o.hasClass("is-splash"),w.splash=r.splash=r.autoplay=!0,o.addClass("is-splash"),flowplayer.support.video&&l.attr("preload","none")),(r.live||o.hasClass("is-live"))&&(w.live=r.live=!0,o.addClass("is-live")),e.each(c,function(){this(w,o)}),a=flowplayer.engine[r.engine],a&&(a=a(w,o)),a.pick(d.initialSources)?w.engine=r.engine:e.each(flowplayer.engine,function(e){return e!=r.engine&&(a=this(w,o),a.pick(d.initialSources))?(w.engine=e,!1):void 0}),u.push(w),w.engine?(r.splash?w.unload():w.load(),r.disabled&&w.disable(),a.volume(w.volumeLevel),o.one("ready",n),void 0):w.trigger("error",{code:flowplayer.support.flashVideo?5:10})}).bind("load",function(t,n){r.splash&&e(".flowplayer").filter(".is-ready, .is-loading").not(o).each(function(){var t=e(this).data("flowplayer");t.conf.splash&&t.unload()}),o.addClass("is-loading"),n.loading=!0}).bind("ready",function(e,t,n){function i(){o.removeClass("is-loading"),t.loading=!1}n.time=0,t.video=n,r.splash?o.one("progress",i):i(),t.muted?t.mute(!0):t.volume(t.volumeLevel)}).bind("unload",function(){r.splash&&l.remove(),o.removeClass("is-loading"),w.loading=!1}).bind("ready unload",function(e){var t="ready"==e.type;o.toggleClass("is-splash",!t).toggleClass("is-ready",t),w.ready=t,w.splash=!t}).bind("progress",function(e,t,n){t.video.time=n}).bind("speed",function(e,t,n){t.currentSpeed=n}).bind("volume",function(e,t,n){t.volumeLevel=Math.round(100*n)/100,t.muted?n&&t.mute(!1):f.volume=n}).bind("beforeseek seek",function(e){w.seeking="beforeseek"==e.type,o.toggleClass("is-seeking",w.seeking)}).bind("ready pause resume unload finish stop",function(e,t,n){w.paused=/pause|finish|unload|stop/.test(e.type),"ready"==e.type&&(w.paused="none"==r.preload,n&&(w.paused=!n.duration||!r.autoplay&&"none"!=r.preload)),w.playing=!w.paused,o.toggleClass("is-paused",w.paused).toggleClass("is-playing",w.playing),w.load.ed||w.pause()}).bind("finish",function(){w.finished=!0}).bind("error",function(){l.remove()}),o.trigger("boot",[w,o]).data("flowplayer",w)})},!function(){var t=function(e){var t=/Version/(d.d)/.exec(e);return t&&t.length>1?parseFloat(t[1],10):0},n=flowplayer.support,i=e.browser,a=e("<video loop autoplay preload/>")[0],o=navigator.userAgent,r=i.msie||/Trident/7/.test(o),s=/iPad|MeeGo/.test(o)&&!/CriOS/.test(o),l=/iPad/.test(o)&&/CriOS/.test(o),d=/iP(hone|od)/i.test(o)&&!/iPad/.test(o),u=/Android/.test(o)&&!/Firefox/.test(o),c=/Android/.test(o)&&/Firefox/.test(o),f=/Silk/.test(o),p=/IEMobile/.test(o),v=(s?t(o):0,u?parseFloat(/Android (d.d)/.exec(o)[1],10):0);e.extend(n,{subtitles:!!a.addTextTrack,fullscreen:"function"==typeof document.webkitCancelFullScreen&&!/Mac OS X 10_5.+Version/5.0.d Safari/.test(o)||document.mozFullScreenEnabled||"function"==typeof document.exitFullscreen||"function"==typeof document.msExitFullscreen,inlineBlock:!(r&&i.version<8),touch:"ontouchstart"in window,dataload:!s&&!d&&!p,zeropreload:!r&&!u,volume:!(s||u||d||f||l),cachedVideoTag:!(s||d||l||p),firstframe:!(d||s||u||f||l||p||c),inlineVideo:!d&&!p&&(!u||v>=3),hlsDuration:!u&&(!i.safari||s||d||l),seekable:!s&&!l});try{var m=navigator.plugins["Shockwave Flash"],g=r?new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"):m.description;r||m[0].enabledPlugin?(g=g.split(/D+/),g.length&&!g[0]&&(g=g.slice(1)),n.flashVideo=g[0]>9||9==g[0]&&g[3]>=115):n.flashVideo=!1}catch(h){}try{n.video=!!a.canPlayType,n.video&&a.canPlayType("video/mp4")}catch(y){n.video=!1}n.animation=function(){for(var t=["","Webkit","Moz","O","ms","Khtml"],n=e("<p/>")[0],i=0;i<t.length;i++)if("undefined"!==n.style[t[i]+"AnimationName"])return!0}()}(),window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_savedUnloadHandler=__flash_unloadHandler=function(){}}),flowplayer.engine.flash=function(n,i){var a,o,r,s=n.conf;n.video;var l=e(window),d=function(){if("webkit"==S||D){var t=e("object param[name='flashvars']",i),a=(t.attr("value")||"").split("&");e.each(a,function(e,i){return i=i.split("="),"url"==i[0]&&i[1]!=n.video.url?(a[e]="url="+n.video.url,t.attr({value:a.join("&")}),!1):void 0})}},u=function(t){var a=i.height(),o=i.width();if(n.conf.flashfit||/full/.test(t.type)){var r,s,d=n.isFullscreen,u=d&&_,c=!flowplayer.support.inlineBlock,f=d?u?screen.width:l.width():o,p=d?u?screen.height:l.height():a,v=0,m=0,g=c?o:"",h=c?a:"";(n.conf.flashfit||"fullscreen"===t.type)&&(r=n.video.width/n.video.height,s=n.video.height/n.video.width,h=Math.max(s*f),g=Math.max(r*p),h=h>p?g*s:h,h=Math.min(Math.round(h),p),g=g>f?h*r:g,g=Math.min(Math.round(g),f),m=Math.max(Math.round((p+m-h)/2),0),v=Math.max(Math.round((f+v-g)/2),0)),e("object",i).css({width:g,height:h,marginTop:m,marginLeft:v})}},c={pick:function(t){if(flowplayer.support.flashVideo){var n=e.grep(t,function(e){return"flash"==e.type})[0];if(n)return n;for(var i,a=0;a<t.length;a++)if(i=t[a],/mp4|flv/i.test(i.type))return i}},load:function(l){function c(e){return e.replace(/&/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D")}var f=e("video",i),p=c(l.src);is_absolute=/^https?:/.test(p);var v=function(){f.remove()},m=function(t){return e.grep(t,function(e){return!!f[0].canPlayType("video/"+e.type)}).length>0};if(flowplayer.support.video&&f.prop("autoplay")&&m(l.sources)?f.one("timeupdate",v):v(),is_absolute||s.rtmp||(p=e("<img/>").attr("src",p)[0].src),r)r.__play(p);else{n.bind("ready",d).bind("ready fullscreen fullscreen-exit",u),a="fp"+(""+Math.random()).slice(3,15);var g={hostname:s.embedded?s.hostname:location.hostname,url:p,callback:"jQuery."+a};i.data("origin")&&(g.origin=i.data("origin")),is_absolute&&delete s.rtmp,e.each(["key","autoplay","preload","rtmp","subscribe","live","loop","debug","splash"],function(e,t){s[t]&&(g[t]=s[t])}),void 0!==s.bufferTime&&(g.bufferTime=s.bufferTime),g.rtmp&&(g.rtmp=c(g.rtmp),g.live&&(g.preload="none")),o=t(s.swf,g),o.prependTo(i),r=o[0],setTimeout(function(){try{if(!r.PercentLoaded())return i.trigger("error",[n,{code:7,url:s.swf}])}catch(e){}},5e3),setTimeout(function(){"undefined"==typeof r.PercentLoaded&&i.trigger("flashdisabled",[n])},1e3),e[a]=function(t,i){s.debug&&"status"!=t&&console.log("--",t,i);var a=e.Event(t);switch(t){case"ready":i=e.extend(l,i);break;case"click":a.flash=!0;break;case"keydown":a.which=i;break;case"seek":l.time=i;break;case"status":n.trigger("progress",i.time),i.buffer<l.bytes&&!l.buffered?(l.buffer=i.buffer/l.bytes*l.duration,n.trigger("buffer",l.buffer)):l.buffered||(l.buffered=!0,n.trigger("buffered"))}"buffered"!=t&&setTimeout(function(){n.trigger(a,i)},1)}}},speed:e.noop,unload:function(){r&&r.__unload&&r.__unload(),delete e[a],e("object",i).remove(),r=0,n.unbind("ready",d).unbind("ready fullscreen fullscreen-exit",u)}};return e.each("pause,resume,seek,volume".split(","),function(e,t){c[t]=function(e){try{n.ready&&("seek"==t&&n.video.time&&!n.paused&&n.trigger("beforeseek"),void 0===e?r["__"+t]():r["__"+t](e))}catch(a){if("undefined"==typeof r["__"+t])return i.trigger("flashdisabled",[n]);throw a}}}),c};var g,h=e("<video/>")[0],y={ended:"finish",pause:"pause",play:"resume",progress:"buffer",timeupdate:"progress",volumechange:"volume",ratechange:"speed",seeked:"seek",loadeddata:"ready",error:"error",dataunavailable:"error"},b=function(t){return g?g.attr({type:i(t.type),src:t.src}):g=e("<video/>",{src:t.src,type:i(t.type),"class":"fp-engine",autoplay:"autoplay",preload:"none","x-webkit-airplay":"allow"})};flowplayer.engine.html5=function(t,r){function s(o,s,l){o.listeners&&o.listeners.hasOwnProperty(r.data("fp-player_id"))||((o.listeners||(o.listeners={}))[r.data("fp-player_id")]=!0,s.bind("error",function(n){try{if(n.originalEvent&&e(n.originalEvent.originalTarget).is("img"))return n.preventDefault();a(e(n.target).attr("type"))&&t.trigger("error",{code:4})}catch(i){}}),e.each(y,function(a,s){o.addEventListener(a,function(u){if("progress"==s&&u.srcElement&&0===u.srcElement.readyState&&setTimeout(function(){t.video.duration||t.conf.live&&("mpegurl"!==t.video.type||!p.hlsDuration)||(s="error",t.trigger(s,{code:4}))},1e4),m.debug&&!/progress/.test(s)&&console.log(a,"->",s,u),(t.ready||/ready|error/.test(s))&&s&&e("video",r).length){var c,f,v=e.Event(s);switch(s){case"ready":c=e.extend(l,{duration:o.duration,width:o.videoWidth,height:o.videoHeight,url:o.currentSrc,src:o.currentSrc});try{f=i(e("video",r).attr("type")),c.seekable=!m.live&&/mpegurl/i.test(f)&&o.duration||o.seekable&&o.seekable.end(null)}catch(g){}if(d=d||setInterval(function(){try{c.buffer=o.buffered.end(null)}catch(e){}c.buffer&&(n(c.buffer,1e3)<n(c.duration,1e3)&&!c.buffered?t.trigger("buffer",u):c.buffered||(c.buffered=!0,t.trigger("buffer",u).trigger("buffered",u),clearInterval(d),d=0))},250),!m.live&&!c.duration&&!p.hlsDuration&&"loadeddata"===a){var h=function(){c.duration=o.duration;try{c.seekable=o.seekable&&o.seekable.end(null)}catch(e){}t.trigger(v,c),o.removeEventListener("durationchange",h)};return o.addEventListener("durationchange",h),void 0}break;case"progress":case"seek":if(t.video.duration,o.currentTime>0){c=Math.max(o.currentTime,0);break}if("progress"==s)return;case"speed":c=n(o.playbackRate);break;case"volume":c=n(o.volume);break;case"error":try{c=(u.srcElement||u.originalTarget).error}catch(y){return}}t.trigger(v,c)}},!1)}))}var l,d,u,c,f=e("video",r),p=flowplayer.support,v=e("track",f),m=t.conf;return l={pick:function(e){if(p.video){if(m.videoTypePreference){var t=o(e,m.videoTypePreference);if(t)return t}for(var n=0;n<e.length;n++)if(a(e[n].type))return e[n]}},load:function(n){if(m.splash&&!u)f=b(n).prependTo(r),p.inlineVideo||f.css({position:"absolute",top:"-9999em"}),v.length&&f.append(v.attr("default","")),m.loop&&f.attr("loop","loop"),u=f[0],"undefined"!=typeof c&&(u.volume=c);else{u=f[0];var i=f.find("source");!u.src&&i.length&&(u.src=n.src,i.remove()),t.video.src&&n.src!=t.video.src?(f.attr("autoplay","autoplay"),u.src=n.src):"none"!=m.preload&&p.dataload||(p.zeropreload?t.trigger("ready",n).trigger("pause").one("ready",function(){r.trigger("resume",[t])}):t.one("ready",function(){r.trigger("pause",[t])}))}s(u,e("source",f).add(f),n),("none"!=m.preload&&"mpegurl"!=n.type||!p.zeropreload||!p.dataload)&&u.load(),m.splash&&u.load()},pause:function(){u.pause()},resume:function(){u.play()},speed:function(e){u.playbackRate=e},seek:function(e){try{var n=t.paused;u.currentTime=e,n&&u.pause()}catch(i){}},volume:function(e){c=e,u&&(u.volume=e)},unload:function(){e("video.fp-engine",r).remove(),p.cachedVideoTag||(g=null),d=clearInterval(d),u=0}}};var w=/.(w{3,4})(?.*)?$/i;e.throttle=function(e,t){var n;return function(){n||(e.apply(this,arguments),n=1,setTimeout(function(){n=0},t))}},e.fn.slider2=function(t){var n=/iPad/.test(navigator.userAgent)&&!/CriOS/.test(navigator.userAgent);return this.each(function(){var i,a,o,r,s,l,d,u,c=e(this),f=e(document),p=c.children(":last"),v=!1,m=function(){a=c.offset(),o=c.width(),r=c.height(),l=s?r:o,u=b(d)},g=function(e){i||e==w.value||d&&!(d>e)||(c.trigger("slide",[e]),w.value=e)},h=function(e){var n=e.pageX;!n&&e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches.length&&(n=e.originalEvent.touches[0].pageX);var i=s?e.pageY-a.top:n-a.left;i=Math.max(0,Math.min(u||l,i));var o=i/l;return s&&(o=1-o),t&&(o=1-o),y(o,0,!0)},y=function(e,t){void 0===t&&(t=0),e>1&&(e=1);var i=Math.round(1e3*e)/10+"%";return(!d||d>=e)&&(n||p.stop(),v?p.css("width",i):p.animate(s?{height:i}:{width:i},t,"linear")),e},b=function(e){return Math.max(0,Math.min(l,s?(1-e)*r:e*o))},w={max:function(e){d=e},disable:function(e){i=e},slide:function(e,t,n){m(),n&&g(e),y(e,t)},disableAnimation:function(e){v=e!==!1}};m(),c.data("api",w).bind("mousedown.sld touchstart",function(t){if(t.preventDefault(),!i){var n=e.throttle(g,100);m(),w.dragging=!0,c.addClass("is-dragging"),g(h(t)),f.bind("mousemove.sld touchmove",function(e){e.preventDefault(),n(h(e))}).one("mouseup touchend",function(){w.dragging=!1,c.removeClass("is-dragging"),f.unbind("mousemove.sld touchmove")})}})})},flowplayer(function(t,n){function i(t){return e(".fp-"+t,n)}function a(t){("0px"===n.css("width")||"0px"===n.css("height")||t!==flowplayer.defaults.ratio)&&(parseInt(y,10)||m.css("paddingTop",100*t+"%")),l.inlineBlock||e("object",n).height(n.height())}function o(e){n.toggleClass("is-mouseover",e).toggleClass("is-mouseout",!e)}var r,s=t.conf,l=flowplayer.support;n.find(".fp-ratio,.fp-ui").remove(),n.addClass("flowplayer").append(' <div class="ratio"/> <div class="ui"> <div class="waiting"><em/><em/><em/></div> <a class="fullscreen"/> <a class="unload"/> <p class="speed"/> <div class="controls"> <a class="play"></a> <div class="timeline"> <div class="buffer"/> <div class="progress"/> </div> <div class="volume"> <a class="mute"></a> <div class="volumeslider"> <div class="volumelevel"/> </div> </div> </div> <div class="time"> <em class="elapsed">00:00</em> <em class="remaining"/> <em class="duration">00:00</em> </div> <div class="message"><h2/><p/></div> </div>'.replace(/class="/g,'class="fp-'));var u=i("progress"),c=i("buffer"),f=i("elapsed"),p=i("remaining"),v=i("waiting"),m=i("ratio"),g=i("speed"),h=i("duration"),y=m.css("paddingTop"),b=i("timeline").slider2(t.rtl),w=b.data("api"),k=(i("volume"),i("fullscreen")),x=i("volumeslider").slider2(t.rtl),C=x.data("api"),T=n.is(".fixed-controls, .no-toggle");w.disableAnimation(n.hasClass("is-touch")),l.animation||v.html("<p>loading …</p>"),a(s.ratio);try{s.fullscreen||k.remove()}catch(S){k.remove()}t.bind("ready",function(){var e=t.video.duration;w.disable(t.disabled||!e),s.adaptiveRatio&&a(t.video.height/t.video.width),h.add(p).html(d(e)),e>=3600&&n.addClass("is-long")||n.removeClass("is-long"),C.slide(t.volumeLevel)}).bind("unload",function(){y||m.css("paddingTop","")}).bind("buffer",function(){var e=t.video,n=e.buffer/e.duration;!e.seekable&&l.seekable&&w.max(n),1>n?c.css("width",100*n+"%"):c.css({width:"100%"})}).bind("speed",function(e,t,n){g.text(n+"x").addClass("fp-hilite"),setTimeout(function(){g.removeClass("fp-hilite")},1e3)}).bind("buffered",function(){c.css({width:"100%"}),w.max(1)}).bind("progress",function(){var e=t.video.time,n=t.video.duration;w.dragging||w.slide(e/n,t.seeking?0:250),f.html(d(e)),p.html("-"+d(n-e))}).bind("finish resume seek",function(e){n.toggleClass("is-finished","finish"==e.type)}).bind("stop",function(){f.html(d(0)),w.slide(0,100)}).bind("finish",function(){f.html(d(t.video.duration)),w.slide(1,100),n.removeClass("is-seeking")}).bind("beforeseek",function(){u.stop()}).bind("volume",function(){C.slide(t.volumeLevel)}).bind("disable",function(){var e=t.disabled;w.disable(e),C.disable(e),n.toggleClass("is-disabled",t.disabled)}).bind("mute",function(e,t,i){n.toggleClass("is-muted",i)}).bind("error",function(t,i,a){if(n.removeClass("is-loading").addClass("is-error"),a){a.message=s.errors[a.code],i.error=!0;var o=e(".fp-message",n);e("h2",o).text((i.engine||"html5")+": "+a.message),e("p",o).text(a.url||i.video.url||i.video.src||s.errorUrls[a.code]),n.unbind("mouseenter click").removeClass("is-mouseover")}}).bind("mouseenter mouseleave",function(e){if(!T){var t,i="mouseenter"==e.type;o(i),i?(n.bind("pause.x mousemove.x volume.x",function(){o(!0),t=new Date}),r=setInterval(function(){new Date-t>5e3&&(o(!1),t=new Date)},100)):(n.unbind(".x"),clearInterval(r))}}).bind("mouseleave",function(){(w.dragging||C.dragging)&&n.addClass("is-mouseover").removeClass("is-mouseout")}).bind("click.player",function(n){return e(n.target).is(".fp-ui, .fp-engine")||n.flash?(n.preventDefault(),t.toggle()):void 0}).bind("contextmenu",function(t){t.preventDefault();var i=n.offset(),a=e(window),o=t.clientX-i.left,r=t.clientY-i.top+a.scrollTop(),s=n.find(".fp-context-menu").css({left:o+"px",top:r+"px",display:"block"}).on("click",function(e){e.stopPropagation()});e("html").on("click.outsidemenu",function(){s.hide(),e("html").off("click.outsidemenu")})}).bind("flashdisabled",function(){n.addClass("is-flash-disabled").one("ready",function(){n.removeClass("is-flash-disabled").find(".fp-flash-disabled").remove()}).append('<div class="fp-flash-disabled">Adobe Flash is disabled for this page, click player area to enable.</div>')}),s.poster&&n.css("backgroundImage","url("+s.poster+")");var F=n.css("backgroundColor"),E="none"!=n.css("backgroundImage")||F&&"rgba(0, 0, 0, 0)"!=F&&"transparent"!=F;!E||s.splash||s.autoplay||t.bind("ready stop",function(){n.addClass("is-poster").one("progress",function(){n.removeClass("is-poster")})}),!E&&t.forcedSplash&&n.css("backgroundColor","#555"),e(".fp-toggle, .fp-play",n).click(t.toggle),e.each(["mute","fullscreen","unload"],function(e,n){i(n).click(function(){t[n]()})}),b.bind("slide",function(e,n){t.seeking=!0,t.seek(n*t.video.duration)}),x.bind("slide",function(e,n){t.volume(n)}),i("time").click(function(){e(this).toggleClass("is-inverted")}),o(T)});var k,x,C="is-help";e(document).bind("keydown.fp",function(t){var n=k,i=t.ctrlKey||t.metaKey||t.altKey,a=t.which,o=n&&n.conf;if(n&&o.keyboard&&!n.disabled){if(-1!=e.inArray(a,[63,187,191]))return x.toggleClass(C),!1;if(27==a&&x.hasClass(C))return x.toggleClass(C),!1;if(!i&&n.ready){if(t.preventDefault(),t.shiftKey)return 39==a?n.speed(!0):37==a&&n.speed(!1),void 0;if(58>a&&a>47)return n.seekTo(a-48);switch(a){case 38:case 75:n.volume(n.volumeLevel+.15);break;case 40:case 74:n.volume(n.volumeLevel-.15);break;case 39:case 76:n.seeking=!0,n.seek(!0);break;case 37:case 72:n.seeking=!0,n.seek(!1);break;case 190:n.seekTo();break;case 32:n.toggle();break;case 70:o.fullscreen&&n.fullscreen();break;case 77:n.mute();break;case 81:n.unload()}}}}),flowplayer(function(t,n){if(t.conf.keyboard){n.bind("mouseenter mouseleave",function(e){k=t.disabled||"mouseenter"!=e.type?0:t,k&&(x=n)});var i=flowplayer.support.video&&"flash"!==t.conf.engine&&e("<video/>")[0].playbackRate?"<p><em>shift</em> + <em>←</em><em>→</em>slower / faster</p>":"";n.append(' <div class="fp-help"> <a class="fp-close"></a> <div class="fp-help-section fp-help-basics"> <p><em>space</em>play / pause</p> <p><em>q</em>unload | stop</p> <p><em>f</em>fullscreen</p>'+i+' </div> <div class="fp-help-section"> <p><em>↑</em><em>↓</em>volume</p> <p><em>m</em>mute</p> </div> <div class="fp-help-section"> <p><em>←</em><em>→</em>seek</p> <p><em> . </em>seek to previous </p><p><em>1</em><em>2</em>… <em>6</em> seek to 10%, 20% … 60% </p> </div> </div> '),t.conf.tooltip&&e(".fp-ui",n).attr("title","Hit ? for help").on("mouseout.tip",function(){e(this).removeAttr("title").off("mouseout.tip")}),e(".fp-close",n).click(function(){n.toggleClass(C)})}});var T,S=e.browser.mozilla?"moz":"webkit",F="fullscreen",E="fullscreen-exit",_=flowplayer.support.fullscreen,M=("function"==typeof document.exitFullscreen,navigator.userAgent.toLowerCase()),D=/(safari)[ /]([w.]+)/.exec(M)&&!/(chrome)[ /]([w.]+)/.exec(M);e(document).bind("fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange",function(t){var n=e(document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.fullscreenElement||document.msFullscreenElement||t.target);n.length&&!T?T=n.trigger(F,[n]):(T.trigger(E,[T]),T=null)}),flowplayer(function(t,n){if(t.conf.fullscreen){var i,a=e(window),o={apply:!1,pos:0,play:!1};t.isFullscreen=!1,t.fullscreen=function(r){if(!t.disabled){if(void 0===r&&(r=!t.isFullscreen),r&&(i=a.scrollTop()),"webkit"!=S&&!D||"flash"!=t.engine||(o={apply:!0,pos:t.video.time,play:t.playing}),_)if(r){var s=n[0];e.each(["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"],function(e,t){return"function"==typeof s[t]?(s[t](Element.ALLOW_KEYBOARD_INPUT),!D||document.webkitCurrentFullScreenElement||document.mozFullScreenElement||s[t](),!1):void 0})}else e.each(["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"],function(e,t){return"function"==typeof document[t]?(document[t](),!1):void 0});else t.trigger(r?F:E,[t]);return t}};var r;n.bind("mousedown.fs",function(){+new Date-r<150&&t.ready&&t.fullscreen(),r=+new Date}),t.bind(F,function(){n.addClass("is-fullscreen"),t.isFullscreen=!0}).bind(E,function(){var e;_||"html5"!==t.engine||(e=n.css("opacity")||"",n.css("opacity",0)),n.removeClass("is-fullscreen"),_||"html5"!==t.engine||setTimeout(function(){n.css("opacity",e)}),t.isFullscreen=!1,a.scrollTop(i)}).bind("ready",function(){if(o.apply){var n=function(){o.play||t.conf.live||t.pause(),e.extend(o,{pos:0,play:!1})};t.conf.live?(t.resume(),n()):t.conf.rtmp&&o.pos&&!isNaN(o.pos)?t.seek(o.pos,n):n()}})}}),flowplayer(function(t,n){function i(){return e(o.query,n)}function a(){return e(o.query+"."+r,n)}var o=e.extend({active:"is-active",advance:!0,query:".fp-playlist a"},t.conf),r=o.active;t.play=function(n){return void 0===n?t.resume():"number"!=typeof n||t.conf.playlist[n]?("number"!=typeof n&&t.load.apply(null,arguments),t.unbind("resume.fromfirst"),t.video.index=n,t.load("string"==typeof t.conf.playlist[n]?t.conf.playlist[n].toString():e.map(t.conf.playlist[n],function(t){return e.extend({},t)})),t):t},t.next=function(e){e&&e.preventDefault();var n=t.video.index;return-1!=n&&(n=n===t.conf.playlist.length-1?0:n+1,t.play(n)),t},t.prev=function(e){e&&e.preventDefault();var n=t.video.index;return-1!=n&&(n=0===n?t.conf.playlist.length-1:n-1,t.play(n)),t},e(".fp-next",n).click(t.next),e(".fp-prev",n).click(t.prev),o.advance&&n.unbind("finish.pl").bind("finish.pl",function(e,t){var i=t.video.index+1;i<t.conf.playlist.length||o.loop?(i=i===t.conf.playlist.length?0:i,n.removeClass("is-finished"),setTimeout(function(){t.play(i)})):(n.addClass("is-playing"),t.conf.playlist.length>1&&t.one("resume.fromfirst",function(){return t.play(0),!1}))});var s=!1;if(t.conf.playlist.length){s=!0;var l=n.find(".fp-playlist");if(!l.length){l=e('<div class="fp-playlist"></div>');var d=e(".fp-next,.fp-prev",n);d.length?d.eq(0).before(l):e("video",n).after(l)}l.empty(),e.each(t.conf.playlist,function(t,n){var i;if("string"==typeof n)i=n;else for(var a in n[0])if(n[0].hasOwnProperty(a)){i=n[0][a];break}l.append(e("<a />").attr({href:i,"data-index":t}))})}if(i().length){s||(t.conf.playlist=[],i().each(function(){var n=e(this).attr("href");e(this).attr("data-index",t.conf.playlist.length),t.conf.playlist.push(n)})),n.on("click",o.query,function(n){n.preventDefault();var i=e(n.target).closest(o.query),a=Number(i.attr("data-index"));-1!=a&&t.play(a)});var u=i().filter("[data-cuepoints]").length;t.bind("load",function(i,o,s){var l=a().removeClass(r),d=l.attr("data-index"),c=s.index=t.video.index||0,f=e('a[data-index="'+c+'"]',n).addClass(r),p=c==t.conf.playlist.length-1;n.removeClass("video"+d).addClass("video"+c).toggleClass("last-video",p),s.index=o.video.index=c,s.is_last=o.video.is_last=p,u&&(t.cuepoints=f.data("cuepoints"))}).bind("unload.pl",function(){a().toggleClass(r)})}t.conf.playlist.length&&(t.conf.loop=!1)});var A=/ ?cued+ ?/;flowplayer(function(t,n){function i(e){n[0].className=n[0].className.replace(A," "),e>=0&&n.addClass("cue"+e)}var a=0;t.cuepoints=t.conf.cuepoints||[],t.bind("progress",function(e,o,r){if(a&&.015>r-a)return a=r;a=r;for(var s,l=t.cuepoints||[],d=0;d<l.length;d++)s=l[d],isNaN(s)||(s={time:s}),s.time<0&&(s.time=t.video.duration+s.time),s.index=d,Math.abs(s.time-r)<.125*t.currentSpeed&&(i(d),n.trigger("cuepoint",[t,s]))}).bind("unload seek",i),t.conf.generate_cuepoints&&t.bind("load",function(){e(".fp-cuepoint",n).remove()}).bind("ready",function(){var i=t.cuepoints||[],a=t.video.duration,o=e(".fp-timeline",n).css("overflow","visible");e.each(i,function(n,i){var r=i.time||i;0>r&&(r=a+i);var s=e("<a/>").addClass("fp-cuepoint fp-cuepoint"+n).css("left",100*(r/a)+"%");s.appendTo(o).mousedown(function(){return t.seek(r),!1})})})}),flowplayer(function(t,n){function i(e){var t=e.split(":");return 2==t.length&&t.unshift(0),60*60*t[0]+60*t[1]+parseFloat(t[2].replace(",","."))}var a=e("track",n),o=t.conf;if(!flowplayer.support.subtitles||(t.subtitles=a.length&&a[0].track,!o.nativesubtitles||"html5"!=o.engine)){a.remove();var r=/^(([0-9]{2}:){1,2}[0-9]{2}[,.][0-9]{3}) --> (([0-9]{2}:){1,2}[0-9]{2}[,.][0-9]{3})(.*)/;t.subtitles=[];var s=a.attr("src");if(s){setTimeout(function(){e.get(s,function(n){for(var a,o,s,l,d=0,u=n.split("n"),c=u.length,f={};c>d;d++)if(o=r.exec(u[d])){for(a=u[d-1],s="<p>"+u[++d]+"</p><br/>";e.trim(u[++d])&&d<u.length;)s+="<p>"+u[d]+"</p><br/>";f={title:a,startTime:i(o[1]),endTime:i(o[3]),text:s},l={time:f.startTime,subtitle:f},t.subtitles.push(f),t.cuepoints.push(l),t.cuepoints.push({time:f.endTime,subtitleEnd:a}),0===f.startTime&&t.trigger("cuepoint",l)}}).fail(function(){return t.trigger("error",{code:8,url:s}),!1})});var l,d=e("<div class='fp-subtitle'/>").appendTo(n);t.bind("cuepoint",function(e,t,n){n.subtitle?(l=n.index,d.html(n.subtitle.text).addClass("fp-active")):n.subtitleEnd&&(d.removeClass("fp-active"),l=n.index)}).bind("seek",function(n,i,a){l&&t.cuepoints[l]&&t.cuepoints[l].time>a&&(d.removeClass("fp-active"),l=null),e.each(t.cuepoints||[],function(e,n){var i=n.subtitle;
i&&l!=n.index?a>=n.time&&(!i.endTime||a<=i.endTime)&&t.trigger("cuepoint",n):n.subtitleEnd&&a>=n.time&&n.index==l+1&&t.trigger("cuepoint",n)})})}}}),flowplayer(function(t,n){function i(){if(o&&"undefined"!=typeof _gat){var e=_gat._getTracker(a),i=t.video;e._setAllowLinker(!0),e._trackEvent("Video / Seconds played",t.engine+"/"+i.type,n.attr("title")||i.src.split("/").slice(-1)[0].replace(w,""),Math.round(o/1e3)),o=0}}var a=t.conf.analytics,o=0,r=0;a&&("undefined"==typeof _gat&&e.getScript("//google-analytics.com/ga.js"),t.bind("load unload",i).bind("progress",function(){t.seeking||(o+=r?+new Date-r:0,r=+new Date)}).bind("pause",function(){r=0}),e(window).unload(i))});var P=/IEMobile/.test(f);(flowplayer.support.touch||P)&&flowplayer(function(t,n){var i=/Android/.test(f)&&!/Firefox/.test(f)&&!/Opera/.test(f),a=/Silk/.test(f),o=i?parseFloat(/Android (d.d)/.exec(f)[1],10):0;if(i&&!/Chrome/.test(f)&&4>o){var r=t.load;t.load=function(){var e=r.apply(t,arguments);return t.trigger("ready",[t,t.video]),e}}flowplayer.support.volume||n.addClass("no-volume no-mute"),n.addClass("is-touch"),n.find(".fp-timeline").data("api").disableAnimation();var s=!1;n.bind("touchmove",function(){s=!0}).bind("touchend click",function(){return s?(s=!1,void 0):t.playing&&!n.hasClass("is-mouseover")?(n.addClass("is-mouseover").removeClass("is-mouseout"),!1):(t.paused&&n.hasClass("is-mouseout")&&!t.splash&&t.toggle(),t.paused&&P&&e("video.fp-engine",n)[0].play(),void 0)}),t.conf.native_fullscreen&&"function"==typeof e("<video />")[0].webkitEnterFullScreen&&(t.fullscreen=function(){var t=e("video.fp-engine",n);t[0].webkitEnterFullScreen(),t.one("webkitendfullscreen",function(){t.prop("controls",!0).prop("controls",!1)})}),(i||a)&&t.bind("ready",function(){var i=e("video.fp-engine",n);i.one("canplay",function(){i[0].play()}),i[0].play(),t.bind("progress.dur",function(){var a=i[0].duration;1!==a&&(t.video.duration=a,e(".fp-duration",n).html(d(a)),t.unbind("progress.dur"))})})}),flowplayer(function(t,n){if(t.conf.embed!==!1){var i=t.conf,a=e(".fp-ui",n),o=e("<a/>",{"class":"fp-embed",title:"Copy to your site"}).appendTo(a),r=e("<div/>",{"class":"fp-embed-code"}).append("<label>Paste this HTML code on your site to embed.</label><textarea/>").appendTo(a),s=e("textarea",r);t.embedCode=function(){var a=t.video,o=a.width||n.width(),r=a.height||n.height(),s=e("<div/>",{"class":"flowplayer",css:{width:o,height:r}}),l=e("<video/>").appendTo(s);e.each(["origin","analytics","key","rtmp","subscribe","bufferTime"],function(e,t){i.hasOwnProperty(t)&&s.attr("data-"+t,i[t])}),i.logo&&s.attr("data-logo",e("<img />").attr("src",i.logo)[0].src),e.each(a.sources,function(t,n){var a=n.src;(!/^https?:/.test(n.src)&&"flash"!==n.type||!i.rtmp)&&(a=e("<img/>").attr("src",n.src)[0].src),l.append(e("<source/>",{type:"mpegurl"!=n.type?"video/"+n.type:"application/x-mpegurl",src:a}))});var d={src:"//embed.flowplayer.org/5.5.0/embed.min.js"};e.isPlainObject(i.embed)&&(d["data-swf"]=i.embed.swf,d["data-library"]=i.embed.library,d.src=i.embed.script||d.src,i.embed.skin&&(d["data-skin"]=i.embed.skin));var u=e("<foo/>",d).append(s);return e("<p/>").append(u).html().replace(/<(/?)foo/g,"<$1script")},n.fptip(".fp-embed","is-embedding"),s.click(function(){this.select()}),o.click(function(){s.text(t.embedCode()),s[0].focus(),s[0].select()})}}),e.fn.fptip=function(t,n){return this.each(function(){function i(){a.removeClass(n),e(document).unbind(".st")}var a=e(this);e(t||"a",this).click(function(t){t.preventDefault(),a.toggleClass(n),a.hasClass(n)&&e(document).bind("keydown.st",function(e){27==e.which&&i()}).bind("click.st",function(t){e(t.target).parents("."+n).length||i()})})})}}(jQuery);flowplayer(function(e,o){function l(e){var o=a("<a/>")[0];return o.href=e,o.hostname}var a=jQuery,r=e.conf,i=r.swf.indexOf("flowplayer.org")&&r.e&&o.data("origin"),n=i?l(i):location.hostname,t=r.key;if("file:"==location.protocol&&(n="localhost"),e.load.ed=1,r.hostname=n,r.origin=i||location.href,i&&o.addClass("is-embedded"),"string"==typeof t&&(t=t.split(/,s*/)),t&&"function"==typeof key_check&&key_check(t,n))r.logo&&o.append(a("<a>",{"class":"fp-logo",href:i}).append(a("<img/>",{src:r.logo})));else{var s=a("<a/>").attr("href","http://flowplayer.org").appendTo(o);a(".fp-controls",o);var p=a('<div class="fp-context-menu"><ul><li class="copyright">© 2014</li><li><a href="http://flowplayer.org">About Flowplayer</a></li><li><a href="http://flowplayer.org/license">GPL based license</a></li></ul></div>').appendTo(o);e.bind("pause resume finish unload",function(e,l){var r=-1;l.video.src&&a.each([["org","flowplayer","drive"],["org","flowplayer","my"]],function(e,o){return r=l.video.src.indexOf("://"+o.reverse().join(".")),-1===r}),/pause|resume/.test(e.type)&&"flash"!=l.engine&&4!=r&&5!=r?(s.show().css({position:"absolute",left:16,bottom:36,zIndex:99999,width:100,height:20,backgroundImage:"url("+[".png","logo","/",".net",".cloudfront","d32wqyuo10o653","//"].reverse().join("")+")"}),l.load.ed=s.is(":visible")&&a.contains(o[0],p[0]),l.load.ed||l.pause()):s.hide()})}});
?>