Files
Testing/flowplayer/flowplayer.min.js
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

5 lines
26 KiB
JavaScript

/*!
Flowplayer v5.1.1 (Friday, 19. October 2012 04:24PM) | flowplayer.org/license
*/!function(e){function a(t,n){window.objectId=new Object;var r="obj"+(""+Math.random()).slice(2,15),i='<object class="fp-engine" id="'+r+'" name="'+r+'" ';i+=s?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+t+'" type="application/x-shockwave-flash">';var o={width:"100%",height:"100%",allowscriptaccess:"always",wmode:"opaque",quality:"high",flashvars:"",movie:t+(s?"?"+r:""),name:r};return e.each(n,function(e,t){o.flashvars+=e+"="+t+"&"}),e.each(o,function(e,t){i+='<param name="'+e+'" value="'+t+'"/>'}),i+="</object>",e(i)}function c(e){return Math.round(e*100)/100}function p(e){var t=e.attr("type"),n=e.attr("src");return{src:n,type:t?t.replace("video/",""):n.split(h)[1]}}function d(e){return e=parseInt(e,10),e>=10?e:"0"+e}function v(e){e=e||0;var t=Math.floor(e/3600),n=Math.floor(e/60);return e-=n*60,t>=1?(n-=t*60,t+"h:"+d(n)):d(n)+":"+d(e)}e(function(){typeof e.fn.flowplayer=="function"&&e("video").parent(".flowplayer").flowplayer()});var t=[],n=[],r=navigator.userAgent,i=/iPhone/i.test(r)||/Android/.test(r)&&/Firefox/.test(r);window.flowplayer=function(r){return i?0:e.isFunction(r)?n.push(r):typeof r=="number"||r===undefined?t[r||0]:e(r).data("flowplayer")},e.extend(flowplayer,{version:"5.1.1",engine:{},conf:{},defaults:{debug:!1,disabled:!1,engine:"html5",keyboard:!0,ratio:9/16,rtmp:0,splash:!1,swf:"http://releases.flowplayer.org/5.1.1/flowplayer.swf",speeds:[.25,.5,1,1.5,2],volume: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"]},support:{}});if(i)return e(function(){e("video").attr("controls","controls")});e.fn.flowplayer=function(r,i){return typeof r=="string"&&(r={swf:r}),e.isFunction(r)&&(i=r,r={}),!r&&this.data("flowplayer")||this.each(function(){var s=e(this),o=e.extend({},flowplayer.defaults,flowplayer.conf,r,s.data()),u=e("video",s),a,f=[],l,c,h={conf:o,currentSpeed:1,volumeLevel:o.volume,video:null,splash:!1,ready:!1,paused:!1,playing:!1,loading:!1,muted:!1,disabled:!1,finished:!1,load:function(t,n){if(h.error||h.loading||h.disabled)return;return s.trigger("load",[h,t,c]),e.isFunction(t)&&(n=t),n&&s.one("ready",n),h},pause:function(e){return h.ready&&!h.seeking&&!h.disabled&&!h.loading&&(c.pause(),h.one("pause",e)),h},resume:function(){return h.ready&&h.paused&&!h.disabled&&(c.resume(),h.finished&&(h.trigger("resume"),h.finished=!1)),h},toggle:function(){return h.ready?h.paused?h.resume():h.pause():h.load()},seek:function(t,n){if(h.ready){if(typeof t=="boolean"){var r=h.video.duration*.1;t=h.video.time+(t?r:-r)}t=a=Math.min(Math.max(t,0),h.video.duration),c.seek(t),e.isFunction(n)&&s.one("seek",n)}return h},seekTo:function(e,t){var n=e===undefined?a:h.video.duration*.1*e;return h.seek(n,t)},volume:function(e){return h.ready&&e!=h.volumeLevel&&c.volume(Math.min(Math.max(e,0),1)),h},speed:function(t,n){return h.ready&&(typeof t=="boolean"&&(t=o.speeds[e.inArray(h.currentSpeed,o.speeds)+(t?1:-1)]||h.currentSpeed),c.speed(t),n&&s.one("speed",n)),h},stop:function(){return h.ready&&c.stop(),h},unload:function(){return s.hasClass("is-embedding")||(o.splash?(h.trigger("unload"),c.unload()):h.stop()),h}};e.each(["disable","mute"],function(e,t){h[t]=function(){return h.trigger(t)}}),e.each(["bind","one","unbind"],function(e,t){h[t]=function(e,n){return s[t](e,n),h}}),h.trigger=function(e,t){return s.trigger(e,[h,t]),h},s.bind("boot",function(){e.each(["autoplay","loop","preload","poster"],function(e,t){var n=u.attr(t);n!==undefined&&(o[t]=n?n:!0)});if(o.splash||s.hasClass("is-splash"))h.splash=o.splash=o.autoplay=!0,s.addClass("is-splash");o.poster&&delete o.autoplay,e.each(n,function(e){this(h,s)}),c=flowplayer.engine[o.engine],c&&(c=c(h,s)),c?h.engine=o.engine:(delete flowplayer.engine[o.engine],e.each(flowplayer.engine,function(e,t){return c=this(h,s),c&&(h.engine=e),!1}));if(!c)return h.trigger("error",{code:5});o.splash?h.unload():h.load(),o.disabled&&h.disable(),s.one("ready",i),t.push(h)}).bind("load",function(t,n,r){o.splash&&e(".flowplayer").filter(".is-ready, .is-loading").not(s).each(function(){var t=e(this).data("flowplayer");t.conf.splash&&t.unload()}),n.loading=!0}).bind("ready unload",function(e){function n(){s.removeClass("is-loading"),h.loading=!1}var t=e.type=="ready";s.toggleClass("is-splash",!t).toggleClass("is-ready",t),h.ready=t,h.splash=!t,t?(h.volume(o.volume),o.autoplay?s.one("resume",n):(h.playing||h.trigger("pause"),n())):(h.video.time=0,o.splash&&u.remove())}).bind("mute",function(e){var t=h.muted=!h.muted;t&&(l=h.volumeLevel),h.volume(t?0:l)}).bind("speed",function(e,t,n){t.currentSpeed=n}).bind("volume",function(e,t,n){t.volumeLevel=Math.round(n*100)/100,t.muted&&t.volumeLevel&&(s.removeClass("is-muted"),t.muted=!1)}).bind("beforeseek seek",function(e){h.seeking=e.type=="beforeseek",s.toggleClass("is-seeking",h.seeking)}).bind("ready pause resume unload finish",function(e,t,n){h.paused=/pause|finish|unload/.test(e.type),e.type=="ready"&&n&&(h.paused=!n.duration||!o.autoplay&&(o.preload!="none"||h.engine=="flash")),h.playing=!h.paused,s.toggleClass("is-paused",h.paused).toggleClass("is-playing",h.playing),h.load.ed||h.pause()}).bind("disable",function(){h.disabled=!h.disabled}).bind("finish",function(e){h.finished=!0}).bind("error",function(){u.remove()}),s.trigger("boot",[h,s]).data("flowplayer",h)})};var s=e.browser.msie;try{var o=s?(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version"):navigator.plugins["Shockwave Flash"].description;o=o.split(/\D+/),s||(o=o.slice(1)),flowplayer.support.flashVideo=o[0]>9||o[0]==9&&o[2]>=115}catch(u){}window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_savedUnloadHandler=__flash_unloadHandler=function(){}}),flowplayer.engine.flash=function(t,n){function f(e){for(var t=0,n;t<e.length;t++){n=e[t];if(/mp4|flv|flash/.test(n.type))return n}}var r=t.conf,i=t.video,s,o,u;if(!flowplayer.support.flashVideo||!f(i.sources))return;e("video",n).remove();var l={load:function(i){var l=f(i.sources);l.url=(r.rtmp?l.src:e("<a/>").attr("href",l.src)[0].href).replace(/&amp;/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D");if(u)u.__play(l.url);else{s="fp"+(""+Math.random()).slice(3,15);var c={hostname:r.embedded?r.hostname:top.location.hostname,url:l.url,callback:"$."+s};e.each(["key","autoplay","preload","poster","rtmp","loop","debug"],function(e,t){r[t]&&(c[t]=r[t])}),/^https?:/.test(l.url)&&delete c.rtmp,o=a(r.swf,c),o.prependTo(n),u=o[0],setTimeout(function(){try{if(!u.PercentLoaded())return n.trigger("error",[t,{code:7,url:r.swf}])}catch(e){}},5e3),e[s]=function(n,i){r.debug&&n!="status"&&console.log("--",n,i);var s=e.Event(n),o=t.video;switch(n){case"ready":i=e.extend(o,i);break;case"click":s.flash=!0;break;case"keydown":s.which=i;break;case"buffered":o.buffered=!0;break;case"seek":o.time=i;break;case"status":if(!o.time||i.time>o.time)o.time=i.time,t.trigger("progress",i.time);i.buffer<o.bytes&&(o.buffer=i.buffer/o.bytes*o.duration,t.trigger("buffer",o.buffer))}setTimeout(function(){t.trigger(s,i)},1)}}return l},speed:e.noop,unload:function(){u&&u.__unload(),delete e[s],e("object",n).remove(),u=0}};return e.each("pause,resume,seek,volume,stop".split(","),function(e,n){l[n]=function(e){if(t.ready){if(n=="seek"){if(!t.video.time){l.resume(),t.seeking=!1,t.trigger("resume");return}t.trigger("beforeseek")}e===undefined?u["__"+n]():u["__"+n](e)}}}),l};var f=e("<video/>")[0],l={ended:"finish",pause:"pause",play:"resume",progress:"buffer",timeupdate:"progress",volumechange:"volume",ratechange:"speed",seeking:"beforeseek",seeked:"seek",loadeddata:"ready",error:"error",dataunavailable:"error"};flowplayer.support.video=!!f.canPlayType,flowplayer.engine.html5=function(t,n){function a(e){return/video/.test(e)||(e="video/"+e),!!f.canPlayType(e).replace("no","")}function h(e){for(var t=0,n;t<e.sources.length;t++){n=e.sources[t];if(a(n.type))return n}}function p(n,r){if(n.listening)return;n.listening=!0,r.bind("error",function(n){a(e(n.target).attr("type"))&&t.trigger("error",{code:4})}),e.each(l,function(r,i){n.addEventListener(r,function(u){i=="progress"&&u.srcElement&&u.srcElement.readyState===0&&setTimeout(function(){t.video.duration||(i="error",t.trigger(i,{code:4}))},500),s.debug&&!/progress/.test(i)&&console.log(r,"->",i,u);if(!t.ready&&!/ready|error/.test(i)||!i)return;var a=e.Event(i),f=t.video,l;switch(i){case"ready":l=e.extend(f,{duration:n.duration,width:n.videoWidth,height:n.videoHeight,url:n.currentSrc});try{f.seekable=n.seekable&&n.seekable.end(null)}catch(h){}o=o||setInterval(function(){try{f.buffer=n.buffered.end(null)}catch(e){}f.buffer&&(f.buffer<f.duration?t.trigger("buffer",u):f.buffered||(f.buffered=!0,t.trigger("buffer",u).trigger("buffered",u),clearInterval(o),o=0))},250);break;case"progress":case"seek":l=f.time=Math.max(n.currentTime,0);break;case"speed":l=c(n.playbackRate);break;case"volume":l=c(n.volume);break;case"error":l=(u.srcElement||u.originalTarget).error}t.trigger(a,l)},!1)})}var r=e("video",n),i=e("track",r),s=t.conf,o,u;if(!flowplayer.support.video||!h(t.video))return;return r.addClass("fp-engine").removeAttr("controls"),{load:function(o){var a=h(o);return s.splash&&!u?(r=e("<video/>",{src:a.src,type:"video/"+a.type,autoplay:"autoplay","class":"fp-engine"}).prependTo(n),i.length&&r.append(i.attr("default","")),s.loop&&r.attr("loop","loop"),u=r[0]):(u=r[0],o.src&&u.src!=o.src&&(r.attr("autoplay","autoplay"),u.src=a.src,u.load())),s.preload=="none"&&n.trigger("ready",[t,{}]),p(u,e("source",r)),a},pause:function(){u.pause()},resume:function(){u.play()},speed:function(e){u.playbackRate=e},seek:function(e){try{u.currentTime=e}catch(t){}},stop:function(){u.currentTime=0,setTimeout(function(){u.load()},100)},volume:function(e){u.volume=e},unload:function(){e("video",n).remove(),u=0,clearInterval(o)}}};var h=/.(\w{3,4})$/i;flowplayer(function(t,n){var r=e("video",n),i=[];e("source",r).each(function(){i.push(p(e(this)))}),i.length||i.push(p(r)),t.video={sources:i},t.bind("load",function(t,n,r,s){r=r||n.video,e.isArray(r)?r={sources:e.map(r,function(e){var t=Object.keys(e)[0];return e.type=t,e.src=e[t],delete e[t],e})}:typeof r=="string"&&(r={src:r,sources:[]},e.each(i,function(e,t){t.type!="flash"&&r.sources.push({type:t.type,src:r.src.replace(h,"")+"."+t.type})})),n.video=e.extend(r,s.load(r))})}),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(){return this.each(function(){var t=e(this),n=e(document),r=t.children(":last"),i,s,o,u,a,f,l,c,h=function(){s=t.offset(),o=t.width(),u=t.height(),f=a?u:o,c=m(l)},p=function(e){!i&&e!=g.value&&(!l||e<l)&&(t.trigger("slide",[e]),g.value=e)},d=function(e){var t=a?e.pageY-s.top:e.pageX-s.left;t=Math.max(0,Math.min(c||f,t));var n=t/f;return a&&(n=1-n),v(n,0,!0)},v=function(e,t){t===undefined&&(t=0);var n=e*100+"%";return(!l||e<=l)&&r.stop().animate(a?{height:n}:{width:n},t,"linear"),e},m=function(e){return Math.max(0,Math.min(f,a?(1-e)*u:e*o))},g={max:function(e){l=e},disable:function(e){i=e},slide:function(e,t,n){h(),n&&p(e),v(e,t)}};h(),t.data("api",g).bind("mousedown.sld",function(t){t.preventDefault();if(!i){var r=e.throttle(p,100);h(),g.dragging=!0,p(d(t)),n.bind("mousemove.sld",function(e){e.preventDefault(),r(d(e))}).one("mouseup",function(){g.dragging=!1,n.unbind("mousemove.sld")})}})})},flowplayer.support.animation=function(){var t=["","Webkit","Moz","O","ms","Khtml"],n=e("<p/>")[0];for(var r=0;r<t.length;r++)if(n.style[t[r]+"AnimationName"]!=="undefined")return!0}(),flowplayer(function(t,n){function s(t){return e(".fp-"+t,n)}function S(t){parseInt(p,10)||c.css("paddingTop",t*100+"%"),e.browser.msie&&e.browser.version<8&&e("object",n).height(n.height())}function x(e){n.toggleClass("is-mouseover",e).toggleClass("is-mouseout",!e)}var r=t.conf,i;n.addClass("flowplayer is-mouseout").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"> <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">99:99</em> </div> <div class="message"><h2/><p/></div> </div>'.replace(/class="/g,'class="fp-'));var o=s("progress"),u=s("buffer"),a=s("elapsed"),f=s("remaining"),l=s("waiting"),c=s("ratio"),h=s("speed"),p=c.css("paddingTop"),d=s("timeline").slider2(),m=d.data("api"),g=s("volume"),y=s("fullscreen"),b=s("volumeslider").slider2(),w=b.data("api"),E=n.hasClass("no-toggle");flowplayer.support.animation||l.html("<p>loading &hellip;</p>"),S(r.ratio),E&&n.addClass("is-mouseover");try{window!=window.top&&y.remove()}catch(T){y.remove()}t.bind("ready",function(){var e=t.video.duration;m.disable(!e),S(t.video.videoHeight/t.video.videoWidth),s("duration").add(f).html(v(e)),w.slide(t.volumeLevel)}).bind("unload",function(){p||c.css("paddingTop","")}).bind("buffer",function(){var e=t.video,n=e.buffer/e.duration;e.seekable||m.max(n),u.animate({width:n*100+"%"},250,"linear")}).bind("speed",function(e,t,n){h.text(n+"x").addClass("fp-hilite"),setTimeout(function(){h.removeClass("fp-hilite")},1e3)}).bind("buffered",function(){u.css({width:"100%"}),m.max(1)}).bind("progress",function(){var e=t.video.time,n=t.video.duration;(!m.dragging||typeof Touch=="object")&&m.slide(e/n,t.seeking?0:250),a.html(v(e)),f.html("-"+v(n-e))}).bind("finish resume seek",function(e){n.toggleClass("is-finished",e.type=="finish")}).bind("finish",function(){a.html(v(t.video.duration)),window.foo=m,m.slide(1,100)}).bind("beforeseek",function(){o.stop()}).bind("volume",function(){w.slide(t.volumeLevel)}).bind("disable",function(){var e=t.disabled;m.disable(e),w.disable(e),n.toggleClass("is-disabled",t.disabled)}).bind("mute",function(){n.toggleClass("is-muted",t.muted)}).bind("error",function(t,i,s){n.removeClass("is-loading").addClass("is-error");if(s){s.message=r.errors[s.code],i.error=!0;var o=e(".fp-message",n);e("h2",o).text(i.engine+": "+s.message),e("p",o).text(s.url||i.video.url||i.video.src),n.unbind("mouseenter click").removeClass("is-mouseover")}}).bind("mouseenter mouseleave",function(e){if(E)return;var t=e.type=="mouseenter",r;x(t),t?(n.bind("pause.x mousemove.x volume.x",function(){x(!0),r=new Date}),i=setInterval(function(){new Date-r>5e3&&(x(!1),r=new Date)},100)):(n.unbind(".x"),clearInterval(i))}).bind("mouseleave",function(){(m.dragging||w.dragging)&&n.addClass("is-mouseover").removeClass("is-mouseout")}).bind("click.player",function(n){if(e(n.target).is(".fp-ui, .fp-engine")||n.flash||n.force)return n.preventDefault(),t.toggle()}),e(".fp-toggle",n).click(t.toggle),e.each(["mute","fullscreen","unload"],function(e,n){s(n).click(function(){t[n]()})}),d.bind("slide",function(e,n){t.seeking=!0,t.seek(n*t.video.duration)}),b.bind("slide",function(e,n){t.volume(n)}),s("time").click(function(t){e(this).toggleClass("is-inverted")}),x(!1)});var m,g,y="is-help";e(document).bind("keydown.fp",function(t){if(!m||!m.conf.keyboard)return;var n=m,r=t.ctrlKey||t.metaKey||t.altKey,i=t.which;if(e.inArray(i,[63,187,191,219])!=-1)return g.toggleClass(y),!1;if(i==27&&g.hasClass(y))return g.toggleClass(y),!1;if(!r&&n.ready){t.preventDefault();if(t.shiftKey){i==39?n.speed(!0):i==37&&n.speed(!1);return}if(i<58&&i>47)return n.seekTo(i-48);switch(i){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:n.fullscreen();break;case 77:n.mute();break;case 27:n[n.isFullscreen?"fullscreen":"unload"]()}}}),flowplayer(function(t,n){if(!t.conf.keyboard)return;n.bind("mouseenter mouseleave",function(e){m=!t.disabled&&e.type=="mouseenter"?t:0,m&&(g=n)}),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>esc</em>stop</p> <p><em>f</em>fullscreen</p> <p><em>shift</em> + <em>&#8592;</em><em>&#8594;</em>slower / faster</p> </div> <div class="fp-help-section"> <p><em>&#8593;</em><em>&#8595;</em>volume</p> <p><em>m</em>mute</p> </div> <div class="fp-help-section"> <p><em>&#8592;</em><em>&#8594;</em>seek</p> <p><em>&nbsp;. </em>seek to previous </p><p><em>1</em><em>2</em>&hellip;<em>6</em> seek to 10%, 20%, &hellip;60% </p> </div> </div> '),t.bind("ready unload",function(t){e(".fp-ui",n).attr("title",t.type=="ready"?"Hit ? for help":"")}),e(".fp-close",n).click(function(){n.toggleClass(y)})});var b=e.browser.mozilla?"moz":"webkit",w="fullscreen",E="fullscreen-exit",S,x=typeof document.webkitCancelFullScreen=="function"||document.mozFullScreenEnabled;flowplayer.support.fullscreen=x,e(document).bind(b+"fullscreenchange",function(t){var n=e(document.webkitCurrentFullScreenElement||document.mozFullScreenElement);n.length?S=n.trigger(w,[n]):S.trigger(E,[S])}),flowplayer(function(t,n){t.isFullscreen=!1,t.fullscreen=function(e){return e===undefined&&(e=!t.isFullscreen),x?e?n[0][b+"RequestFullScreen"](Element.ALLOW_KEYBOARD_INPUT):document[b+"CancelFullScreen"]():t.trigger(e?w:E,[t]),t},t.bind(w,function(e){n.addClass("is-fullscreen"),t.isFullscreen=!0}).bind(E,function(e){n.removeClass("is-fullscreen"),t.isFullscreen=!1});var r=n.height(),i=n.width();t.bind("fullscreen",function(){var r=x?screen.width:e(window).width(),i=x?screen.height:e(window).height(),s=t.video.height/t.video.width,o=s>.5?i*(1/s):r*s;e("object",n).css(s>.5?{width:o,marginLeft:(r-o)/2,height:"100%"}:{height:o,marginTop:(i-o-20)/2,width:"100%"})}).bind("fullscreen-exit",function(){var s=e.browser.msie&&e.browser.version<8,o=t.video.height/t.video.width;e("object",n).css(o>.5?{width:s?i:"",height:s?r:"",marginLeft:""}:{height:s?r:"",width:s?i:"",marginTop:""})})}),flowplayer(function(t,n){function s(){return e(r.query,n)}function o(){return e(r.query+"."+i,n)}var r=e.extend({active:"is-active",advance:!0,query:".fp-playlist a"},t.conf),i=r.active,u=s().live("click",function(n){var r=e(this);r.is("."+i)?t.toggle():t.load(r.attr("href")),n.preventDefault()});t.play=function(e){return e===undefined?t.resume():typeof e!="number"?t.load.apply(null,arguments):s().eq(e).click(),t};if(u.length){t.conf.loop=!1;var a=u.filter("[data-cuepoints]").length;t.bind("load",function(){var r=o().removeClass(i),u=e("a[href*='"+t.video.src.replace(h,"")+"']",n).addClass(i),f=s(),l=f.index(u),c=l==f.length-1;n.removeClass("video"+f.index(r)).addClass("video"+l).toggleClass("last-video",c),t.video.index=l,t.video.is_last=c,a&&(t.cuepoints=u.data("cuepoints"))}).bind("unload.pl",function(){o().toggleClass(i)}),e.each(["next","prev"],function(r,i){t[i]=function(e){e&&e.preventDefault();var t=o()[i]();t.length||(t=s().filter(i=="next"?":first":":last")),t.click()},e(".fp-"+i,n).click(t[i])}),r.advance&&n.unbind("finish.pl").bind("finish.pl",function(){n.addClass("is-playing"),o().next().length||r.loop?t.next():t.one("resume",function(){return t.next(),!1})})}});var T=/ ?cue\d+ ?/;flowplayer(function(t,n){function i(e){n[0].className=n[0].className.replace(T," "),e>=0&&n.addClass("cue"+e)}var r=0;t.cuepoints=t.conf.cuepoints||[],t.bind("progress",function(e,s,o){if(r&&o-r<.015)return r=o;r=o;var u=t.cuepoints||[];for(var a=0,f;a<u.length;a++)f=u[a],1*f&&(f={time:f}),f.time<0&&(f.time=t.video.duration+f.time),f.index=a,Math.abs(f.time-o)<.125&&(i(a),n.trigger("cuepoint",[t,f]))}).bind("unload seek",i),t.conf.generate_cuepoints&&t.bind("ready",function(){var r=t.cuepoints||[],i=t.video.duration,s=e(".fp-timeline",n).css("overflow","visible");e.each(r,function(n,r){var o=r.time||r;o<0&&(o=i+r);var u=e("<a/>").addClass("fp-cuepoint fp-cuepoint"+n).css("left",o/i*100+"%");u.appendTo(s).mousedown(function(){return t.seek(o),!1})})})});var N=e("<track/>")[0];flowplayer.support.subtitles=!!N.track,e.extend(e.support,flowplayer.support),flowplayer(function(t,n,r){function u(e){var t=e.split(":");return t[0]*60*60+t[1]*60+parseFloat(t[2].replace(",","."))}var i=e("track",n),s=t.conf;if(flowplayer.support.subtitles){t.subtitles=i.length&&i[0].track;if(s.nativesubtitles&&s.engine=="html5")return}i.remove();var o=/^([0-9]{2}:[0-9]{2}:[0-9]{2}[,.]{1}[0-9]{3}) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}[,.]{1}[0-9]{3})(.*)/;t.subtitles=[];var a=i.attr("src");e.get(a,function(n){for(var r=0,i=n.split("\n"),s=i.length,a={},f,l,c,h;r<s;r++){l=o.exec(i[r]);if(l){f=i[r-1],c="<p>"+i[++r]+"</p><br/>";while(e.trim(i[++r])&&r<i.length)c+="<p>"+i[r]+"</p><br/>";a={title:f,startTime:u(l[1]),endTime:u(l[2]),text:c},h={time:a.startTime,subtitle:a},t.subtitles.push(a),t.cuepoints.push(h),t.cuepoints.push({time:a.endTime,subtitleEnd:f}),a.startTime===0&&t.trigger("cuepoint",h)}}}).fail(function(){return t.trigger("error",{code:8,url:a}),!1});var f=e("<div class='fp-subtitle'/>",n).appendTo(n),l;t.bind("cuepoint",function(e,t,n){n.subtitle?(l=n.index,f.html(n.subtitle.text).addClass("fp-active")):n.subtitleEnd&&f.removeClass("fp-active")}).bind("seek",function(){var n=t.video.time;e.each(t.cuepoints||[],function(e,r){var i=r.subtitle;i&&l!=r.index&&(n>=r.time&&n<=i.endTime?t.trigger("cuepoint",r):f.removeClass("fp-active"))})})}),flowplayer(function(t,n){var r=t.conf.analytics,i=0,s=0;if(r&&typeof _gat!="undefined"){function o(e){if(i){var s=_gat._getTracker(r),o=t.video;s._setAllowLinker(!0),s._trackEvent("Video / Seconds played",t.engine+"/"+o.type,n.attr("title")||o.src.split("/").slice(-1)[0].replace(h,""),Math.round(i/1e3)),i=0}}t.bind("load unload",o).bind("progress",function(){t.seeking||(i+=s?+(new Date)-s:0,s=+(new Date))}).bind("pause",function(){s=0}),e(window).unload(o)}}),/iPad|MeeGo/.test(r)&&flowplayer(function(t,n){var i=t.conf,s;i.autoplay=t.splash=i.splash=!1,/Version\/5/.test(r)&&(i.preload="none"),i.native_ipad_fullscreen&&(t.fullscreen=function(){e("video",n)[0].webkitEnterFullScreen()}),n.bind("load",function(){var r=e("video",n)[0],i=e(r).attr("poster"),s=e(r).attr("autoplay");i&&!s&&(n.css("background","url("+i+") center no-repeat"),n.css("background-size","contain")),n.addClass("is-ipad is-paused").removeClass("is-loading"),t.ready=t.paused=!0,t.loading=!1,s&&t.resume(),r.addEventListener("canplay",function(e){n.trigger("ready").trigger("resume")},!1)}),n.bind("touchstart",function(e){s||(n.triggerHandler({type:"click.player",force:!0}),s=!0);if(t.playing&&!n.hasClass("is-mouseover"))return n.addClass("is-mouseover"),!1}),t.unload=function(){t.pause(),n.trigger("unload"),s=!1}}),/Android/.test(navigator.userAgent)&&flowplayer(function(t,n){var r;t.splash=t.conf.splash=!1,t.conf.autoplay=!1;var i=e("video",n)[0];t.fullscreen=function(){i.webkitEnterFullScreen()},n.bind("load",function(){n.addClass("is-paused").removeClass("is-loading"),t.ready=t.paused=!0,t.loading=!1;var r=function(){i.duration!=1&&(t.video.duration=i.duration,e(".fp-duration",n).html(v(i.duration)),i.removeEventListener("timeupdate",r))};i.addEventListener("timeupdate",r)}),n.bind("touchstart",function(e){r||(n.triggerHandler("click.player"),r=!0);if(t.playing&&!n.hasClass("is-mouseover"))return n.addClass("is-mouseover"),!1}),t.unload=function(){t.pause(),n.trigger("unload"),r=!1}}),flowplayer(function(t,n){if(t.conf.embed===!1)return;var r=t.conf,i=e(".fp-ui",n),s=e("<a/>",{"class":"fp-embed",title:"Copy to your site"}).appendTo(i),o=e("<div/>",{"class":"fp-embed-code"}).append("<label>Paste this HTML code on your site to embed.</label><textarea/>").appendTo(i),u=e("textarea",o);t.embedCode=function(){var i=t.video,s=i.width||n.width(),o=i.height||n.height(),u=e("<div/>",{"class":"flowplayer",css:{width:s,height:o}}),a=e("<video/>").appendTo(u);r.poster&&a.attr("poster",r.poster),e.each(["origin","analytics","logo","key","rtmp"],function(e,t){r[t]&&u.attr("data-"+t,r[t])}),e.each(i.sources,function(t,n){a.append(e("<source/>",{type:"video/"+n.type,src:n.src}))});var f=e("<foo/>",{src:"http://embed.flowplayer.org/5.1.1/embed.min.js"}).append(u);return e("<p/>").append(f).html().replace(/<(\/?)foo/g,"<$1script")},n.fptip(".fp-embed","is-embedding"),u.click(function(){this.select()}),s.click(function(){u.text(t.embedCode()),u[0].focus(),u[0].select()})}),e.fn.fptip=function(t,n){return this.each(function(){function i(){r.removeClass(n),e(document).unbind(".st")}var r=e(this);e(t||"a",this).click(function(t){t.preventDefault(),r.toggleClass(n),r.hasClass(n)&&e(document).bind("keydown.st",function(e){e.which==27&&i()}).bind("click.st",function(t){e(t.target).parents("."+n).length||i()})})})}}(jQuery),flowplayer(function(e,t){function n(e){var t=r("<a/>")[0];return t.href=e,t.hostname}var r=jQuery,i=e.conf,s=i.swf.indexOf("flowplayer.org")&&i.e&&t.data("origin"),o=s?n(s):location.hostname,u=i.key;location.protocol=="file:"&&(o="localhost"),e.load.ed=1,i.hostname=o,i.origin=s||location.href,s&&t.addClass("is-embedded");if(u&&typeof key_check=="function"&&key_check(""+u,o))i.logo&&t.append(r("<a>",{"class":"fp-logo",href:s}).append(r("<img/>",{src:i.logo})));else{var a=r("<a/>").attr("href","http://flowplayer.org").appendTo(t),f=r(".fp-controls",t);t.bind("mouseenter mouseleave",function(t){e.ready&&a.toggle(t.type=="mouseenter")}),e.bind("progress unload",function(n){n.type=="progress"&&e.video.time<8&&e.engine!="flash"&&t.hasClass("is-mouseover")?(a.show().css({position:"absolute",left:6,bottom:f.height()+12,zIndex:99999,width:100,height:20,cursor:"pointer",backgroundImage:"url(http://stream.flowplayer.org/logo.png)"}),e.load.ed=a.is(":visible")):a.hide()})}});flowplayer(function(a,b){function j(a){var b=c("<a/>")[0];return b.href=a,b.hostname}var c=jQuery,d=a.conf,e=d.swf.indexOf("flowplayer.org")&&d.e&&b.data("origin"),f=e?j(e):location.hostname,g=d.key;location.protocol=="file:"&&(f="localhost"),a.load.ed=1,d.hostname=f,d.origin=e||location.href,e&&b.addClass("is-embedded");if(g&&typeof key_check=="function"&&key_check(""+g,f))d.logo&&b.append(c("<a>",{"class":"fp-logo",href:e}).append(c("<img/>",{src:d.logo})));else{var h=c("<a/>").attr("href","http://flowplayer.org").appendTo(b),i=c(".fp-controls",b);b.bind("mouseenter mouseleave",function(b){a.ready&&h.toggle(b.type=="mouseenter")}),a.bind("progress unload",function(c){c.type=="progress"&&a.video.time<8&&a.engine!="flash"&&b.hasClass("is-mouseover")?(h.show().css({position:"absolute",left:6,bottom:i.height()+12,zIndex:99999,width:100,height:20,cursor:"pointer",backgroundImage:"url(http://stream.flowplayer.org/logo.png)"}),a.load.ed=h.is(":visible")):h.hide()})}});