# HG changeset patch # User Thierry Florac # Date 1537966254 -7200 # Node ID 8ad0cdc0ed00f5aef3843f1641faf80dced50dfc # Parent a4e9e69a7344d5282eed352d5bd0ebe7cf29bbf5 Minified Flowplayer resource diff -r a4e9e69a7344 -r 8ad0cdc0ed00 src/pyams_media/skin/resources/flowplayer/flowplayer.min.js --- a/src/pyams_media/skin/resources/flowplayer/flowplayer.min.js Tue Sep 25 11:30:48 2018 +0200 +++ b/src/pyams_media/skin/resources/flowplayer/flowplayer.min.js Wed Sep 26 14:50:54 2018 +0200 @@ -1,27 +1,1 @@ -/* - - Flowplayer v6.0.5 (Wednesday, 13. January 2016 09:17AM) | flowplayer.org/license - -*/ -/* (C) WebReflection Mit Style License */ -(function(X){function V(g,m,d,b){for(var f,p=d.slice(),c=B(m,g),l=0,h=p.length;l"+r+"").attr(n)[0]}};h.toggleClass=function(p,n,m){if(!p){return}var o=k(p);if(typeof m==="undefined"){o.toggle(n)}else{if(m){o.add(n)}else{if(!m){o.remove(n)}}}};h.addClass=function(n,m){return h.toggleClass(n,m,true)};h.removeClass=function(n,m){return h.toggleClass(n,m,false)};h.append=function(m,n){m.appendChild(n);return m};h.appendTo=function(n,m){h.append(m,n);return n};h.prepend=function(m,n){m.insertBefore(n,m.firstChild)};h.insertAfter=function(n,p,m){if(p==h.lastChild(n)){n.appendChild(m)}var o=Array.prototype.indexOf.call(n.children,p);n.insertBefore(m,n.children[o+1])};h.html=function(m,n){m=m.length?m:[m];m.forEach(function(o){o.innerHTML=n})};h.attr=function(n,m,p){if(m==="class"){m="className"}if(h.hasOwnOrPrototypeProperty(n,m)){try{n[m]=p}catch(o){if(j){j(n).attr(m,p)}else{throw o}}}else{if(p===false){n.removeAttribute(m)}else{n.setAttribute(m,p)}}return n};h.prop=function(n,m,o){if(typeof o==="undefined"){return n&&n[m]}n[m]=o};h.offset=function(n){var m=n.getBoundingClientRect();if(n.offsetWidth/n.offsetHeight>n.clientWidth/n.clientHeight){m={left:m.left*100,right:m.right*100,top:m.top*100,bottom:m.bottom*100,width:m.width*100,height:m.height*100}}return m};h.width=function(n,o){if(o){return n.style.width=(""+o).replace(/px$/,"")+"px"}var m=h.offset(n).width;return typeof m==="undefined"?n.offsetWidth:m};h.height=function(n,o){if(o){return n.style.height=(""+o).replace(/px$/,"")+"px"}var m=h.offset(n).height;return typeof m==="undefined"?n.offsetHeight:m};h.lastChild=function(m){return m.children[m.children.length-1]};h.hasParent=function(n,o){var m=n.parentElement;while(m){if(h.matches(m,o)){return true}m=m.parentElement}return false};h.createAbsoluteUrl=function(m){return h.createElement("a",{href:m}).href};h.xhrGet=function(m,o,n){var p=new XMLHttpRequest();p.onreadystatechange=function(){if(this.readyState!==4){return}if(this.status>=400){return n()}o(this.responseText)};p.open("get",m,true);p.send()};h.pick=function(o,n){var m={};n.forEach(function(p){if(o.hasOwnProperty(p)){m[p]=o[p]}});return m};h.hostname=function(m){return l.toUnicode(m||window.location.hostname)};h.browser={webkit:"WebkitAppearance" in document.documentElement.style};h.getPrototype=function(m){if(!Object.getPrototypeOf){return m.__proto__}return Object.getPrototypeOf(m)};h.hasOwnOrPrototypeProperty=function(m,p){var n=m;while(n){if(Object.prototype.hasOwnProperty.call(n,p)){return true}n=h.getPrototype(n)}return false};h.matches=function(p,m){var o=Element.prototype,n=o.matches||o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector||function(q){var s=this,t=(s.document||s.ownerDocument).querySelectorAll(q),r=0;while(t[r]&&t[r]!==s){r++}return t[r]?true:false};return n.call(p,m)};(function(n){function m(o){return o.replace(/-[a-z]/g,function(p){return p[1].toUpperCase()})}if(typeof n.setAttribute!=="undefined"){n.setProperty=function(p,o){return this.setAttribute(m(p),String(o))};n.getPropertyValue=function(o){return this.getAttribute(m(o))||null};n.removeProperty=function(p){var o=this.getPropertyValue(p);this.removeAttribute(m(p));return o}}})(window.CSSStyleDeclaration.prototype)},{"class-list":22,"computed-style":24,punycode:21}],2:[function(h,f,e){var g=h("../common");f.exports=function i(n,o,m,q){m=m||"opaque";var k="obj"+(""+Math.random()).slice(2,15),r='-1;r+=p?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+n+'" type="application/x-shockwave-flash">';var j={width:"100%",height:"100%",allowscriptaccess:"always",wmode:m,quality:"high",flashvars:"",movie:n+(p?"?"+k:""),name:k};if(m!=="transparent"){j.bgcolor=q||"#333333"}Object.keys(o).forEach(function(s){j.flashvars+=s+"="+o[s]+"&"});Object.keys(j).forEach(function(s){r+=''});r+="";var l=g.createElement("div",{},r);return g.find("object",l)};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){window.__flash_savedUnloadHandler=window.__flash_unloadHandler=function(){}})}},{"../common":1}],3:[function(f,g,i){var e=f("../flowplayer"),m=f("../common"),l=f("./embed"),n=f("extend-object"),o=f("bean"),j;j=function h(A,z){var x=A.conf,q=A.video,B,p,r,w;var v=window;var y={engineName:j.engineName,pick:function(C){var D=n({},(function(){if(e.support.flashVideo){var G;for(var E=0,F;E video",z)[0],F=G.src,O=k(F);var P=function(){m.removeNode(J)};var K=function(R){return R.some(function(S){return !!J.canPlayType(S.type)})};if(e.support.video&&m.prop(J,"autoplay")&&K(G.sources)){o.one(J,"timeupdate",P)}else{P()}var L=G.rtmp||x.rtmp;if(!O&&!L){F=m.createAbsoluteUrl(F)}if(w&&u(G)&&w.data!==x.swfHls){y.unload()}if(w){["live","preload","loop"].forEach(function(R){if(!G.hasOwnProperty(R)){return}w.__set(R,G[R])});Object.keys(G.flashls||{}).forEach(function(R){w.__set("hls_"+R,G.flashls[R])});var Q=false;if(!O&&L){w.__set("rtmp",L.url||L)}else{var M=w.__get("rtmp");Q=!!M;w.__set("rtmp",null)}w.__play(F,Q||G.rtmp&&G.rtmp!==x.rtmp)}else{p="fpCallback"+(""+Math.random()).slice(3,15);F=D(F);var C={hostname:x.embedded?m.hostname(x.hostname):m.hostname(location.hostname),url:F,callback:p};if(z.getAttribute("data-origin")){C.origin=z.getAttribute("data-origin")}["proxy","key","autoplay","preload","subscribe","live","loop","debug","splash","poster","rtmpt"].forEach(function(R){if(x.hasOwnProperty(R)){C[R]=x[R]}if(G.hasOwnProperty(R)){C[R]=G[R]}if((x.rtmp||{}).hasOwnProperty(R)){C[R]=(x.rtmp||{})[R]}if((G.rtmp||{}).hasOwnProperty(R)){C[R]=(G.rtmp||{})[R]}});if(x.rtmp){C.rtmp=x.rtmp.url||x.rtmp}if(G.rtmp){C.rtmp=G.rtmp.url||G.rtmp}Object.keys(G.flashls||{}).forEach(function(R){var S=G.flashls[R];C["hls_"+R]=S});if(x.bufferTime!==undefined){C.bufferTime=x.bufferTime}if(O){delete C.rtmp}if(C.rtmp){C.rtmp=D(C.rtmp)}var N=x.bgcolor||m.css(z,"background-color")||"",I;if(N.indexOf("rgb")===0){I=s(N)}else{if(N.indexOf("#")===0){I=t(N)}}C.initialVolume=A.volumeLevel;var H=u(G)?x.swfHls:x.swf;w=l(H,C,x.wmode,I)[0];var E=m.find(".fp-player",z)[0];m.prepend(E,w);setTimeout(function(){try{if(!w.PercentLoaded()){return A.trigger("error",[A,{code:7,url:x.swf}])}}catch(R){}},5000);setTimeout(function(){if(typeof w.PercentLoaded==="undefined"){A.trigger("flashdisabled",[A])}},1000);A.off("resume.flashhack").on("resume.flashhack",function(){var R=setTimeout(function(){if(A.playing){A.trigger("flashdisabled",[A])}},1000);A.one("progress",function(){clearTimeout(R)})});w.pollInterval=setInterval(function(){if(!w){return}var R=w.__status?w.__status():null;if(!R){return}if(A.playing&&R.time&&R.time!==A.video.time){A.trigger("progress",[A,R.time])}G.buffer=R.buffer/G.bytes*G.duration;A.trigger("buffer",[A,G.buffer]);if(!G.buffered&&R.time>0){G.buffered=true;A.trigger("buffered",[A])}},250);window[p]=function(S,R){var U=B;if(x.debug){if(S.indexOf("debug")===0&&R&&R.length){console.log.apply(console,["-- "+S].concat(R))}else{console.log("--",S,R)}}var T={type:S};switch(S){case"ready":R=n(U,R);break;case"click":T.flash=true;break;case"keydown":T.which=R;break;case"seek":U.time=R;break;case"status":A.trigger("progress",[A,R.time]);if(R.buffer video",B)[0],C=e.support,w=n.find("track",z)[0],A=D.conf,E,v,y;return E={engineName:r.engineName,pick:function(F){var G=(function(){if(C.video){if(A.videoTypePreference){var I=k(F,A.videoTypePreference);if(I){return I}}for(var H=0,J;H",L,S)}if(!D.ready&&!/ready|error/.test(L)||!L||!n.find("video",B).length){return}var V,Q;if(L==="unload"){D.unload();return}var T=function(){D.trigger(L,[D,V])};switch(L){case"ready":V=p(I,{duration:G.duration,width:G.videoWidth,height:G.videoHeight,url:G.currentSrc,src:G.currentSrc});try{V.seekable=!D.live&&/mpegurl/i.test(I?(I.type||""):"")&&G.duration||G.seekable&&G.seekable.end(null)}catch(P){}v=v||setInterval(function(){try{V.buffer=G.buffered.end(null)}catch(W){}if(V.buffer){if(u(V.buffer,1000)0||D.live){V=Math.max(G.currentTime,0)}else{if(L=="progress"){return}}break;case"speed":V=u(G.playbackRate);break;case"volume":V=u(G.volume);break;case"error":try{V=(S.srcElement||S.originalTarget).error;V.video=p(I,{src:G.src,url:G.src})}catch(U){return}}T()};B.addEventListener(M,K,true);if(!J[M]){J[M]=[]}J[M].push(K)});return J}};r.canPlay=function(v){return e.support.video&&l(v)};r.engineName="html5";e.engines.push(r)},{"../common":1,"../flowplayer":18,bean:20,"class-list":22,"extend-object":26}],5:[function(k,i,g){var e=k("../flowplayer"),h=k("./resolve").TYPE_RE,j=k("scriptjs"),f=k("bean");e(function(n,m){var s=n.conf.analytics,q=0,o=0,r;if(s){if(typeof _gat=="undefined"){j("//google-analytics.com/ga.js")}var p=function(){var t=_gat._getTracker(s);t._setAllowLinker(true);return t};var l=function l(w,t,v){v=v||n.video;if(q&&typeof _gat!="undefined"){var u=p();u._trackEvent("Video / Seconds played",n.engine.engineName+"/"+v.type,v.title||m.getAttribute("title")||v.src.split("/").slice(-1)[0].replace(h,""),Math.round(q/1000));q=0;if(r){clearTimeout(r);r=null}}};n.bind("load unload",l).bind("progress",function(){if(!n.seeking){q+=o?(+new Date()-o):0;o=+new Date()}if(!r){r=setTimeout(function(){r=null;var t=p();t._trackEvent("Flowplayer heartbeat","Heartbeat","",0,true)},10*60*1000)}}).bind("pause",function(){o=0});n.bind("shutdown",function(){f.off(window,"unload",l)});f.on(window,"unload",l)}})},{"../flowplayer":18,"./resolve":13,bean:20,scriptjs:29}],6:[function(j,h,g){var e=j("../flowplayer"),k=j("class-list"),i=j("../common"),f=j("bean");e(function(u,s){var m=/ ?cue\d+ ?/;var l=0,o=false;function t(v){s.className=s.className.replace(m," ");if(v>=0){k(s).add("cue"+v)}}var p={},r=-0.125;var n=function(w){var v=u.cuepoints.indexOf(w);if(!isNaN(w)){w={time:w}}w.index=v;t(v);u.trigger("cuepoint",[u,w])};u.on("progress",function(y,v,x){if(o){return}var w=q(x);while(rPaste this HTML code on your site to embed."),s=j.find("textarea",u)[0];t.appendChild(p);t.appendChild(u);r.embedCode=function(){var A=r.conf.embed||{},z=r.video;if(A.iframe){var B=r.conf.embed.iframe,y=A.width||z.width||j.width(o),v=A.height||z.height||j.height(o);return''}var x=["ratio","rtmp","live","bufferTime","origin","analytics","key","subscribe","swf","swfHls","embed","adaptiveRatio","logo"];if(A.playlist){x.push("playlist")}var C=j.pick(r.conf,x);if(C.logo){C.logo=j.createElement("img",{src:C.logo}).src}if(!A.playlist||!r.conf.playlist.length){C.clip=k({},r.conf.clip,j.pick(r.video,["sources"]))}var w='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.5/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(C)).replace("$library",A.library||"");return'Watch video!\n