!function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){return i(t[a][1][e]||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a-1},d=function(e){var t=e.clip&&e.clip.hlsQualities||e.hlsQualities;return o.inlineVideo&&(!0===t||t&&t.length)},p=function(o,p){var h,g,v,m,y,b,w=t.bean,E=function(e,t,n){if(e.debug&&console.log("recovery.hlsjs","<-",t),r.removeClass(p,"is-paused"),r.addClass(p,"is-seeking"),n)g.startLoad();else{var i=c.now();!m||i-m>3e3?(m=c.now(),g.recoverMediaError()):(!y||i-y>3e3)&&(y=c.now(),g.swapAudioCodec(),g.recoverMediaError())}v>0&&(v-=1),w.one(h,"seeked.hlsjs",function(){h.paused&&(r.removeClass(p,"is-poster"),o.poster=!1,h.play()),r.removeClass(p,"is-seeking")})},$=function(e,t,n){var r={code:e};return e>2&&(r.video=i(o.video,{src:t,url:n||t})),g&&(g.destroy(),g=0),r},_=function(){w.one(h,"timeupdate.hlsjs",function(){r.addClass(p,"is-poster"),o.poster=!0})},S=function(){s&&o.poster&&w.one(h,"timeupdate.hlsjs",function(){r.removeClass(p,"is-poster"),o.poster=!1})},x=0,T=function(e){return e||(e=o.quality),e.toLowerCase().replace(/\ /g,"")},A=function(){var e=o.qualities;e&&e.length&&(r.removeClass(p,"quality-abr"),e.forEach(function(e){r.removeClass(p,"quality-"+T(e))}))},k=function(){s&&(delete o.hlsQualities,A(),r.find(".fp-quality-selector",p).forEach(r.removeNode))},C=function(){return o.hlsQualities[o.qualities.indexOf(o.quality)+1]},O=-1,R={engineName:"hlsjs",pick:function(e){var t,n;for(t=0;t video",p)[0])&&(r.find("source",h).forEach(function(e){e.removeAttribute("src")}),h.removeAttribute("src"),h.load(),r.removeNode(h)),h=r.createElement("video",{class:"fp-engine hlsjs-engine",autoplay:!!b&&"autoplay",volume:o.volumeLevel,"x-webkit-airplay":"allow"}),Object.keys(c).forEach(function(e){var n,u=c[e],l=e+".hlsjs";w.on(h,l,function(e){a.debug&&u.indexOf("progress")<0&&console.log(l,"->",u,e.originalEvent);var c,d,v,m=h.currentTime,y=h.seekable,b=o.video,_=b.seekOffset,T=o.dvr&&g.liveSyncPosition,A=h.buffered,k=0,C=0,O=b.src,R=!1,L=b.loop,P=o.quality;switch(u){case"ready":n=i(b,{duration:h.duration,seekable:y.length&&y.end(null),width:h.videoWidth,height:h.videoHeight,url:O});break;case"resume":S(),D.bufferWhilePaused||g.startLoad(m);break;case"seek":S(),!D.bufferWhilePaused&&h.paused&&(g.stopLoad(),h.pause()),n=m;break;case"pause":D.bufferWhilePaused||g.stopLoad();break;case"progress":o.dvr&&T&&(b.duration=T,o.trigger("dvrwindow",[o,{start:_,end:T}]),m<_&&(h.currentTime=_)),n=m;break;case"speed":n=h.playbackRate;break;case"volume":n=h.volume;break;case"buffer":try{if(k=A.length&&A.end(null),m&&k)for(c=A.length-1;c>-1;c-=1)(C=A.end(c))>=m&&(k=C)}catch(e){}t.buffer=k,n=k;break;case"finish":D.bufferWhilePaused&&g.autoLevelEnabled&&(L||a.playlist.length<2||!1===a.advance)&&((R=!g.levels[x].details)||g.levels[x].details.fragments.forEach(function(e){R=!!R||!e.loadCounter}),R&&(g.trigger(f.BUFFER_FLUSHING,{startOffset:0,endOffset:.9*b.duration}),g.nextLoadLevel=x,x=0,L||w.one(h,"play.hlsjs",function(){h.currentTime>=h.duration&&(h.currentTime=0)})));break;case"error":if(v=h.error&&h.error.code,D.recoverMediaError&&(3===v||!v)||D.recoverNetworkError&&2===v||D.recover&&(2===v||3===v))return e.preventDefault(),void E(a,u,2===v);n=$(v,O)}o.trigger(u,[o,n]),s&&"ready"===u&&P&&(d="abr"===P?0:o.qualities.indexOf(P)+1,r.addClass(r.find(".fp-quality-selector li",p)[d],"active"))})}),D.bufferWhilePaused||o.on("beforeseek.hlsjs",function(e,t,n){t.paused&&(w.one(h,"seeked.hlsjs",function(){h.pause()}),g.startLoad(n))}),s?a.poster&&(o.on("stop.hlsjs",_),!o.live||b||o.video.autoplay||w.one(h,"seeked.hlsjs",_)):o.on("quality.hlsjs",function(e,t,n){D.smoothSwitching?g.nextLevel=n:g.currentLevel=n,O=n}),r.prepend(r.find(".fp-player",p)[0],h)),o.video=t,x=0,Object.keys(D).forEach(function(t){e.DefaultConfig.hasOwnProperty(t)||delete L[t];var n=D[t];switch(t){case"adaptOnStartOnly":n&&(L.startLevel=-1);break;case"autoLevelCapping":!1===n&&(n=-1),L[t]=n;break;case"startLevel":switch(n){case"auto":n=-1;break;case"firstLevel":n=void 0}L[t]=n;break;case"recover":D.recoverMediaError=!1,D.recoverNetworkError=!1,v=n;break;case"strict":n&&(D.recoverMediaError=!1,D.recoverNetworkError=!1,v=0)}}),L.autoStartLoad=!1,g=new e(L),o.engine.hlsjs=g,m=null,y=null,Object.keys(f).forEach(function(t){var n=f[t],i=D.listeners,c=i&&i.indexOf(n)>-1;g.on(n,function(n,i){var f,m={},y=e.ErrorTypes,b=e.ErrorDetails,_=o.video.src;switch(t){case"MEDIA_ATTACHED":g.loadSource(_);break;case"MANIFEST_PARSED":!d(a)||!s&&o.pluginQualitySelectorEnabled?s&&delete o.quality:R?function(e,t,n){var i,a=n.levels,u=[],c=[],f=0;if(k(),"drive"===e)switch(a.length){case 4:u=[1,2,3];break;case 5:u=[1,2,3,4];break;case 6:u=[1,3,4,5];break;case 7:u=[1,3,5,6];break;case 8:u=[1,3,6,7];break;default:if(a.length<3||a[0].height&&a[2].height&&a[0].height===a[2].height)return;u=[1,2]}else if("string"==typeof e?e.split(/\s*,\s*/).forEach(function(e){c.push(parseInt(e,10))}):"boolean"!=typeof e&&e.forEach(function(e){c.push(isNaN(Number(e))?e.level:e)}),a.forEach(function(t){(!0===e||c.indexOf(f)>-1)&&(!t.videoCodec||t.videoCodec&&l.isTypeSupported("video/mp4;codecs="+t.videoCodec))&&u.push(f),f+=1}),u.length<2)return;if(s?o.qualities=[]:(("drive"===e||!0===e||c.indexOf(-1)>-1)&&u.unshift(-1),o.video.qualities=[]),u.forEach(function(t){var n=a[t],r=c.length?e[c.indexOf(t)]:t,i="Level "+(t+1);t<0?i=r.label||"Auto":r.label?i=r.label:(n.width&&n.height&&(i=Math.min(n.width,n.height)+"p"),!s&&"drive"!==e&&n.bitrate&&(i+=" ("+Math.round(n.bitrate/1e3)+"k)")),s?o.qualities.push(i):o.video.qualities.push({value:t,label:i})}),!s)return O>-1||u.indexOf(-1)<0?(g.startLevel=u.indexOf(O)<0?u[0]:O,g.loadLevel=g.startLevel,o.video.quality=g.startLevel):o.video.quality=u.indexOf(O)<0?u[0]:O,void(O=o.video.quality);i=r.createElement("ul",{class:"fp-quality-selector"}),r.find(".fp-ui",p)[0].appendChild(i),u.unshift(-1),o.hlsQualities=u,!o.quality||o.qualities.indexOf(o.quality)<0?o.quality="abr":(g.startLevel=C(),g.loadLevel=g.startLevel),i.appendChild(r.createElement("li",{"data-quality":"abr"},"Auto")),o.qualities.forEach(function(e){i.appendChild(r.createElement("li",{"data-quality":T(e)},e))}),r.addClass(p,"quality-"+T()),w.on(p,"click.hlsjs",".fp-quality-selector li",function(e){var n,i,a,s=e.currentTarget,u=t.smoothSwitching,l=h.paused;if(!r.hasClass(s,"active")){for(l||u||w.one(h,"pause.hlsjs",function(){r.removeClass(p,"is-paused")}),n=r.find(".fp-quality-selector li",p),a=0;a0?o.qualities[a-1]:"abr",u&&!o.poster?g.nextLevel=C():g.currentLevel=C(),r.addClass(s,"active"),l&&h.play()),r.toggleClass(n[a],"active",i);A(),r.addClass(p,"quality-"+T())}})}(R,D,i):k(),g.startLoad(g.config.startPosition);break;case"FRAG_LOADED":D.bufferWhilePaused&&!o.live&&g.autoLevelEnabled&&g.nextLoadLevel>x&&(x=g.nextLoadLevel);break;case"FRAG_PARSING_METADATA":if(s)return;i.samples.forEach(function(e){var t;t=function(){if(!(h.currentTime=0){if(a=!0,i=e.url.indexOf(".m3u8")+5,(o=e.url.indexOf("download1"))<0){var s=/\d+_hls/.exec(e.url);o=s&&s.index||0}}else if(e.url.indexOf("getVideoKey?")>=0)i=e.url.length-1,o=e.url.indexOf("getVideoKey?")+12;else if(e.url.indexOf(".ts")>=0&&(i=e.url.indexOf(".ts")+3,(o=e.url.indexOf("download1"))<0)){var u=/\d+_hls/.exec(e.url);o=u&&u.index||0}var l=e.url.substr(o,i);r.getData("video_data",l).then(function(e){if(e&&a)this.callbacks.onSuccess({data:e},this.stats,this.context);else{if(!e||a)return r.getData("video_data",encodeURIComponent(l)).then(function(e){if(e&&a)this.callbacks.onSuccess({data:e},this.stats,this.context);else if(e&&!a){var t=new FileReader;t.onload=function(){var e=t.result,n={url:this.context.url,data:e};this.callbacks.onSuccess(n,this.stats,this.context)}.bind(this),t.readAsArrayBuffer(e)}else this.loadInternal()}.bind(this));var t=new FileReader;t.onload=function(){var e=t.result,n={url:this.context.url,data:e};this.callbacks.onSuccess(n,this.stats,this.context)}.bind(this),t.readAsArrayBuffer(e)}}.bind(this),function(){this.loadInternal()}.bind(this))}},{key:"loadInternal",value:function(){var e,t=this.context;(e="undefined"!=typeof XDomainRequest?this.loader=new XDomainRequest:this.loader=new XMLHttpRequest).onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.open("GET",t.url,!0),t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.responseType=t.responseType;var n=this.stats;n.tfirst=0,n.loaded=0,this.xhrSetup&&this.xhrSetup(e,t.url),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()}},{key:"readystatechange",value:function(e){var t=e.currentTarget,n=t.readyState,r=this.stats,i=this.context,o=this.config;if(!r.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===r.tfirst&&(r.tfirst=Math.max(performance.now(),r.trequest)),4===n){var a=t.status;if(a>=200&&a<300){r.tload=Math.max(r.tfirst,performance.now());var s=void 0,u=void 0;u="arraybuffer"===i.responseType?(s=t.response).byteLength:(s=t.responseText).length,r.loaded=r.total=u;var l={url:t.responseURL,data:s};this.callbacks.onSuccess(l,r,i)}else r.retry>=o.maxRetry||a>=400&&a<499?this.callbacks.onError({code:a,text:t.statusText},i):(this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),r.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),o.timeout)}},{key:"loadtimeout",value:function(){this.callbacks.onTimeout(this.stats,this.context)}},{key:"loadprogress",value:function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total);var n=this.callbacks.onProgress;n&&n(t,this.context,null)}}]),e}();n.default=o},{"../indexedDB/indexedDB":5}],3:[function(e,t,n){(function(r){!function(e){function t(e,t,n,r){for(var i,o=n.slice(),a=function(e,t){return e.currentTarget=t,e.eventPhase=e.target===e.currentTarget?2:3,e}(t,e),s=0,u=o.length;s= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=c-f,_=Math.floor,S=String.fromCharCode;function x(e){throw RangeError(E[e])}function T(e,t){for(var n=e.length;n--;)e[n]=t(e[n]);return e}function A(e,t){return T(e.split(w),t).join(".")}function k(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=S((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=S(e)}).join("")}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function R(e,t,n){var r=0;for(e=n?_(e/h):e>>1,e+=_(e/t);e>$*d>>1;r+=c)e=_(e/$);return _(r+($+1)*e/(e+p))}function D(e){var t,n,r,i,o,a,s,u,p,h,y,b=[],w=e.length,E=0,$=v,S=g;for((n=e.lastIndexOf(m))<0&&(n=0),r=0;r=128&&x("not-basic"),b.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=w&&x("invalid-input"),((u=(y=e.charCodeAt(i++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:c)>=c||u>_((l-E)/a))&&x("overflow"),E+=u*a,!(u<(p=s<=S?f:s>=S+d?d:s-S));s+=c)a>_(l/(h=c-p))&&x("overflow"),a*=h;S=R(E-o,t=b.length+1,0==o),_(E/t)>l-$&&x("overflow"),$+=_(E/t),E%=t,b.splice(E++,0,$)}return C(b)}function L(e){var t,n,r,i,o,a,s,u,p,h,y,b,w,E,$,T=[];for(b=(e=k(e)).length,t=v,n=0,o=g,a=0;a=t&&y_((l-n)/(w=r+1))&&x("overflow"),n+=(s-t)*w,t=s,a=0;al&&x("overflow"),y==t){for(u=n,p=c;!(u<(h=p<=o?f:p>=o+d?d:p-o));p+=c)$=u-h,E=c-h,T.push(S(O(h+$%E,0))),u=_($/E);T.push(S(O(u,0))),o=R(n,w,r==i),n=0,++r}++n,++t}return T.join("")}if(s={version:"1.2.4",ucs2:{decode:k,encode:C},decode:D,encode:L,toASCII:function(e){return A(e,function(e){return b.test(e)?"xn--"+L(e):e})},toUnicode:function(e){return A(e,function(e){return y.test(e)?D(e.slice(4).toLowerCase()):e})}},i&&!i.nodeType)if(o)o.exports=s;else for(u in s)s.hasOwnProperty(u)&&(i[u]=s[u]);else r.punycode=s}(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){"use strict";var r=t.exports={},i=e("class-list"),o=window.jQuery,a=e("punycode"),s=e("computed-style");r.noop=function(){},r.identity=function(e){return e},r.removeNode=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},r.find=function(e,t){return o?o(e,t).toArray():(t=t||document,Array.prototype.map.call(t.querySelectorAll(e),function(e){return e}))},r.text=function(e,t){e["innerText"in e?"innerText":"textContent"]=t},r.findDirect=function(e,t){return r.find(e,t).filter(function(e){return e.parentNode===t})},r.hasClass=function(e,t){return i(e).contains(t)},r.css=function(e,t,n){return"object"==typeof t?Object.keys(t).forEach(function(n){r.css(e,n,t[n])}):void 0!==n?""===n?e?e.style.removeProperty(t):void 0:e?e.style.setProperty(t,n):void 0:e?s(e,t):void 0},r.createElement=function(e,t,n){try{var i=document.createElement(e);for(var a in t)t.hasOwnProperty(a)&&("css"===a?r.css(i,t[a]):r.attr(i,a,t[a]));return i.innerHTML=n||"",i}catch(r){if(!o)throw r;return o("<"+e+">"+n+"").attr(t)[0]}},r.toggleClass=function(e,t,n){if(e){var r=i(e);void 0===n?r.toggle(t):n?r.add(t):n||r.remove(t)}},r.addClass=function(e,t){return r.toggleClass(e,t,!0)},r.removeClass=function(e,t){return r.toggleClass(e,t,!1)},r.append=function(e,t){return e.appendChild(t),e},r.appendTo=function(e,t){return r.append(t,e),e},r.prepend=function(e,t){e.insertBefore(t,e.firstChild)},r.insertAfter=function(e,t,n){t==r.lastChild(e)&&e.appendChild(n);var i=Array.prototype.indexOf.call(e.children,t);e.insertBefore(n,e.children[i+1])},r.html=function(e,t){(e=e.length?e:[e]).forEach(function(e){e.innerHTML=t})},r.attr=function(e,t,n){if("class"===t&&(t="className"),r.hasOwnOrPrototypeProperty(e,t))try{e[t]=n}catch(r){if(!o)throw r;o(e).attr(t,n)}else!1===n?e.removeAttribute(t):e.setAttribute(t,n);return e},r.prop=function(e,t,n){if(void 0===n)return e&&e[t];e[t]=n},r.offset=function(e){var t=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight&&(t={left:100*t.left,right:100*t.right,top:100*t.top,bottom:100*t.bottom,width:100*t.width,height:100*t.height}),t},r.width=function(e,t){if(t)return e.style.width=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).width;return void 0===n?e.offsetWidth:n},r.height=function(e,t){if(t)return e.style.height=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).height;return void 0===n?e.offsetHeight:n},r.lastChild=function(e){return e.children[e.children.length-1]},r.hasParent=function(e,t){for(var n=e.parentElement;n;){if(r.matches(n,t))return!0;n=n.parentElement}return!1},r.createAbsoluteUrl=function(e){return r.createElement("a",{href:e}).href},r.xhrGet=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===this.readyState)return this.status>=400?n():void t(this.responseText)},r.open("get",e,!0),r.send()},r.pick=function(e,t){var n={};return t.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n},r.hostname=function(e){return a.toUnicode(e||window.location.hostname)},r.browser={webkit:"WebkitAppearance"in document.documentElement.style},r.getPrototype=function(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__},r.hasOwnOrPrototypeProperty=function(e,t){for(var n=e;n;){if(Object.prototype.hasOwnProperty.call(n,t))return!0;n=r.getPrototype(n)}return!1},r.matches=function(e,t){var n=Element.prototype;return(n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=0;t[n]&&t[n]!==this;)n++;return!!t[n]}).call(e,t)},function(e){function t(e){return e.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})}void 0!==e.setAttribute&&(e.setProperty=function(e,n){return this.setAttribute(t(e),String(n))},e.getPropertyValue=function(e){return this.getAttribute(t(e))||null},e.removeProperty=function(e){var n=this.getPropertyValue(e);return this.removeAttribute(t(e)),n})}(window.CSSStyleDeclaration.prototype)},{"class-list":22,"computed-style":24,punycode:1}],3:[function(e,t,n){"use strict";var r=e("../common");t.exports=function(e,t,n,i){n=n||"opaque";var o="obj"+(""+Math.random()).slice(2,15),a='-1;a+=s?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+e+'" type="application/x-shockwave-flash">';var u={width:"100%",height:"100%",allowscriptaccess:"always",wmode:n,quality:"high",flashvars:"",movie:e+(s?"?"+o:""),name:o};"transparent"!==n&&(u.bgcolor=i||"#333333"),Object.keys(t).forEach(function(e){u.flashvars+=e+"="+t[e]+"&"}),Object.keys(u).forEach(function(e){a+=''}),a+="";var l=r.createElement("div",{},a);return r.find("object",l)},window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_savedUnloadHandler=__flash_unloadHandler=function(){}})},{"../common":2}],4:[function(e,t,n){"use strict";var r,i=e("../flowplayer"),o=e("../common"),a=e("./embed"),s=e("extend-object"),u=e("bean");(r=function(e,t){var n,l,c,f=e.conf,d=(e.video,window,{engineName:r.engineName,pick:function(t){if(i.support.flashVideo){for(var n,r,o=0;o video",t)[0],v=h(r.src),m=/^https?:/.test(v),y=function(){o.removeNode(g)};i.support.video&&o.prop(g,"autoplay")&&r.sources.some(function(e){return!!g.canPlayType(e.type)})?u.one(g,"timeupdate",y):y();var b=r.rtmp||f.rtmp;if(m||b||(v=o.createAbsoluteUrl(v)),c&&p(r)&&c.data!==f.swfHls&&d.unload(),c){["live","preload","loop"].forEach(function(e){r.hasOwnProperty(e)&&c.__set(e,r[e])}),Object.keys(r.flashls||{}).forEach(function(e){c.__set("hls_"+e,r.flashls[e])});var w=!1;if(!m&&b)c.__set("rtmp",b.url||b);else w=!!c.__get("rtmp"),c.__set("rtmp",null);c.__play(v,w||r.rtmp&&r.rtmp!==f.rtmp)}else{l="fpCallback"+(""+Math.random()).slice(3,15);var E={hostname:f.embedded?o.hostname(f.hostname):o.hostname(location.hostname),url:v,callback:l};t.getAttribute("data-origin")&&(E.origin=t.getAttribute("data-origin")),["proxy","key","autoplay","preload","subscribe","live","loop","debug","splash","poster","rtmpt"].forEach(function(e){f.hasOwnProperty(e)&&(E[e]=f[e]),r.hasOwnProperty(e)&&(E[e]=r[e]),(f.rtmp||{}).hasOwnProperty(e)&&(E[e]=(f.rtmp||{})[e]),(r.rtmp||{}).hasOwnProperty(e)&&(E[e]=(r.rtmp||{})[e])}),f.rtmp&&(E.rtmp=f.rtmp.url||f.rtmp),r.rtmp&&(E.rtmp=r.rtmp.url||r.rtmp),Object.keys(r.flashls||{}).forEach(function(e){var t=r.flashls[e];E["hls_"+e]=t}),void 0!==f.bufferTime&&(E.bufferTime=f.bufferTime),m&&delete E.rtmp,E.rtmp&&(E.rtmp=h(E.rtmp));var $,_=o.css(t,"background-color")||"";0===_.indexOf("rgb")?$=function(e){function t(e){return("0"+parseInt(e).toString(16)).slice(-2)}if(!(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/)))return;return"#"+t(e[1])+t(e[2])+t(e[3])}(_):0===_.indexOf("#")&&($=function(e){return 7===e.length?e:"#"+e.split("").slice(1).map(function(e){return e+e}).join("")}(_)),E.initialVolume=e.volumeLevel;var S=p(r)?f.swfHls:f.swf;c=a(S,E,f.wmode,$)[0];var x=o.find(".fp-player",t)[0];o.prepend(x,c),setTimeout(function(){try{if(!c.PercentLoaded())return e.trigger("error",[e,{code:7,url:f.swf}])}catch(e){}},5e3),setTimeout(function(){void 0===c.PercentLoaded&&e.trigger("flashdisabled",[e])},1e3),c.pollInterval=setInterval(function(){if(c){var t=c.__status?c.__status():null;t&&(e.playing&&t.time&&t.time!==e.video.time&&e.trigger("progress",[e,t.time]),r.buffer=t.buffer/r.bytes*r.duration,e.trigger("buffer",[e,r.buffer]),!r.buffered&&t.time>0&&(r.buffered=!0,e.trigger("buffered",[e])))}},250),window[l]=function(r,i){var o=n;f.debug&&(0===r.indexOf("debug")&&i&&i.length?console.log.apply(console,["-- "+r].concat(i)):console.log("--",r,i));var a={type:r};switch(r){case"ready":i=s(o,i);break;case"click":a.flash=!0;break;case"keydown":a.which=i;break;case"seek":o.time=i;break;case"status":e.trigger("progress",[e,i.time]),i.buffer video",t)[0],v=i.support,m=(u.find("track",d)[0],e.conf);return{engineName:h.engineName,pick:function(e){if(v.video){if(m.videoTypePreference){var t=function(e,t){var n=e.filter(function(e){return e.type===t});return n.length?n[0]:null}(e,m.videoTypePreference);if(t)return t}for(var n=0;n",o,c),(e.ready||/ready|error/.test(o))&&o&&u.find("video",t).length))if("unload"!==o){var h=function(){e.trigger(o,[e,p])};switch(o){case"ready":p=s(l,{duration:r.duration,width:r.videoWidth,height:r.videoHeight,url:r.currentSrc,src:r.currentSrc});try{p.seekable=!m.live&&/mpegurl/i.test(l&&l.type||"")&&r.duration||r.seekable&&r.seekable.end(null)}catch(e){}if(n=n||setInterval(function(){try{p.buffer=r.buffered.end(null)}catch(e){}p.buffer&&(f(p.buffer,1e3)0||e.live)p=Math.max(r.currentTime,0);else if("progress"==o)return;break;case"speed":p=f(r.playbackRate);break;case"volume":p=f(r.volume);break;case"error":try{(p=(c.srcElement||c.originalTarget).error).video=s(l,{src:r.src,url:r.src})}catch(e){return}}h()}else e.unload()},!0)})}(d,u.find("source",d).concat(d),r),("none"==m.clip.preload||"mpegurl"==r.type)&&v.zeropreload&&v.dataload||d.load(),(i||y)&&d.load(),d.paused&&(r.autoplay||m.autoplay)&&d.play()},pause:function(){d.pause()},resume:function(){d.play()},speed:function(e){d.playbackRate=e},seek:function(t){try{var n=e.paused;d.currentTime=t,n&&d.pause()}catch(e){}},volume:function(e){l=e,d&&(d.volume=e)},unload:function(){u.find("video.fp-engine",t).forEach(u.removeNode),v.cachedVideoTag||(r=null),n=clearInterval(n),d=0}}}).canPlay=function(e){return i.support.video&&p(e)},h.engineName="html5",i.engines.push(h)},{"../common":2,"../flowplayer":19,bean:21,"class-list":22,"extend-object":26}],6:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("./resolve").TYPE_RE,o=e("scriptjs"),a=e("bean");r(function(e,t){var n,r=e.conf.analytics,s=0,u=0;if(r){"undefined"==typeof _gat&&o("//google-analytics.com/ga.js");var l=function(){var e=_gat._getTracker(r);return e._setAllowLinker(!0),e},c=function(r,o,a){(a=a||e.video,s&&"undefined"!=typeof _gat)&&(l()._trackEvent("Video / Seconds played",e.engine.engineName+"/"+a.type,a.title||t.getAttribute("title")||a.src.split("/").slice(-1)[0].replace(i,""),Math.round(s/1e3)),s=0,n&&(clearTimeout(n),n=null))};e.bind("load unload",c).bind("progress",function(){e.seeking||(s+=u?+new Date-u:0,u=+new Date),n||(n=setTimeout(function(){n=null,l()._trackEvent("Flowplayer heartbeat","Heartbeat","",0,!0)},6e5))}).bind("pause",function(){u=0}),e.bind("shutdown",function(){a.off(window,"unload",c)}),a.on(window,"unload",c)}})},{"../flowplayer":19,"./resolve":14,bean:21,scriptjs:29}],7:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("class-list"),o=e("../common"),a=e("bean");r(function(e,t){var n=/ ?cue\d+ ?/,r=!1;function s(e){t.className=t.className.replace(n," "),e>=0&&i(t).add("cue"+e)}var u={},l=-.125,c=function(t){var n=e.cuepoints.indexOf(t);isNaN(t)||(t={time:t}),t.index=n,s(n),e.trigger("cuepoint",[e,t])};function f(t){var n=t&&!isNaN(t.time)?t.time:t;return n<0&&(n=e.video.duration+n),.125*Math.round(n/.125)}e.on("progress",function(e,t,n){if(!r)for(var i=f(n);lPaste this HTML code on your site to embed."),l=o.find("textarea",s)[0];n.appendChild(r),n.appendChild(s),e.embedCode=function(){var n=e.conf.embed||{},r=e.video;if(n.iframe){e.conf.embed.iframe;var i=n.width||r.width||o.width(t),s=n.height||r.height||o.height(t);return''}var u=["ratio","rtmp","live","bufferTime","origin","analytics","key","subscribe","swf","swfHls","embed","adaptiveRatio","logo"];n.playlist&&u.push("playlist");var l=o.pick(e.conf,u);l.logo&&(l.logo=o.createElement("img",{src:l.logo}).src),n.playlist&&e.conf.playlist.length||(l.clip=a({},e.conf.clip,o.pick(e.video,["sources"])));var c='var w=window,d=document,e;w._fpes||(w._fpes=[],w.addEventListener("load",function(){var s=d.createElement("script");s.src="//embed.flowplayer.org/6.0.3/embed.min.js",d.body.appendChild(s)})),e=[].slice.call(d.getElementsByTagName("script"),-1)[0].parentNode,w._fpes.push({e:e,l:"$library",c:$conf});\n'.replace("$conf",JSON.stringify(l)).replace("$library",n.library||"");return'Watch video!\n