vendor/assets/javascripts/webshims/minified/shims/combos/22.js in webshims-rails-0.4.2 vs vendor/assets/javascripts/webshims/minified/shims/combos/22.js in webshims-rails-0.4.3
- old
+ new
@@ -49,10 +49,10 @@
var O=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(c){if(c){var d=b,e=c.networkState;for(p(0,c);--d;)delete c[a[d]];c.actionQueue=[];c.buffered.length=0;e&&n(c._elem,"emptied")}}}(),I=function(a,c){var d=a._elem,e=a.shadowElem;b(d)[c?"addClass":"removeClass"]("webshims-controls");"audio"==a._elemNodeName&&!c?e.css({width:0,height:0}):e.css({width:d.style.width||
b(d).width(),height:d.style.height||b(d).height()})};c.createSWF=function(d,e,f){if(s){1>q?q=1:q++;var g=b.extend({},i.jwVars,{image:b.prop(d,"poster")||"",file:e.srcProp}),k=b(d).data("jwvars")||{};f||(f=a.data(d,"mediaelement"));if(f&&f.swfCreated)c.setActive(d,"third",f),O(f),f.currentSrc=e.srcProp,b.extend(g,k),i.changeJW(g,d,e,f,"load"),x(d,"sendEvent",["LOAD",g]);else{var v=b.prop(d,"controls"),r="jwplayer-"+a.getID(d),n=b.extend({},i.jwParams,b(d).data("jwparams")),m=d.nodeName.toLowerCase(),
p=b.extend({},i.jwAttrs,{name:r,id:r},b(d).data("jwattrs")),o=b('<div class="polyfill-'+m+' polyfill-mediaelement" id="wrapper-'+r+'"><div id="'+r+'"></div>').css({position:"relative",overflow:"hidden"}),f=a.data(d,"mediaelement",a.objectCreate(D,{actionQueue:{value:[]},shadowElem:{value:o},_elemNodeName:{value:m},_elem:{value:d},currentSrc:{value:e.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(b){if(b>=f.buffered.length)a.error("buffered index size error");else return 0},end:function(b){if(b>=
f.buffered.length)a.error("buffered index size error");else return(f.duration-f._bufferedStart)*f._bufferedEnd/100+f._bufferedStart},length:0}}}));I(f,v);o.insertBefore(d);h&&b.extend(f,{volume:b.prop(d,"volume"),muted:b.prop(d,"muted")});b.extend(g,{id:r,controlbar:v?i.jwVars.controlbar||("video"==m?"over":"bottom"):"video"==m?"none":"bottom",icons:""+(v&&"video"==m)},k,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});g.plugins=g.plugins?g.plugins+(","+j):j;a.addShadowDom(d,o);H(d);c.setActive(d,
"third",f);i.changeJW(g,d,e,f,"embed");b(d).bind("updatemediaelementdimensions updateshadowdom",function(){I(f,b.prop(d,"controls"))});A(f);u.embedSWF(w,r,"100%","100%","9.0.0",!1,g,n,p,function(c){if(c.success)f.jwapi=c.ref,v||b(c.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!c.ref.parentNode&&o[0].parentNode||"none"==c.ref.style.display)o.addClass("flashblocker-assumed"),b(d).trigger("flashblocker"),a.warn("flashblocker assumed");b(c.ref).css({minHeight:"2px",minWidth:"2px",
-display:"block"})},9),E||(clearTimeout(E),E=setTimeout(function(){var d=b(c.ref);1<d[0].offsetWidth&&1<d[0].offsetHeight&&0===location.protocol.indexOf("file:")?a.error("Add your local development-directory to the local-trusted security sandbox: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html"):(2>d[0].offsetWidth||2>d[0].offsetHeight)&&a.info("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){b(d).mediaLoad()},
+display:"block"})},9),E||(clearTimeout(E),E=setTimeout(function(){var d=b(c.ref);1<d[0].offsetWidth&&1<d[0].offsetHeight&&0===location.protocol.indexOf("file:")?a.error("Add your local development-directory to the local-trusted security sandbox: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html"):(2>d[0].offsetWidth||2>d[0].offsetHeight)&&a.warn("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){b(d).mediaLoad()},
1)};var x=function(a,b,c,d){return(d=d||f(a))?(d.jwapi&&d.jwapi[b]?d.jwapi[b].apply(d.jwapi,c||[]):(d.actionQueue.push({fn:b,args:c}),10<d.actionQueue.length&&setTimeout(function(){5<d.actionQueue.length&&d.actionQueue.shift()},99)),d):!1};["audio","video"].forEach(function(c){var d={},g,i=function(a){"audio"==c&&("videoHeight"==a||"videoWidth"==a)||(d[a]={get:function(){var b=f(this);return b?b[a]:h&&g[a].prop._supget?g[a].prop._supget.apply(this):D[a]},writeable:!1})},j=function(a,b){i(a);delete d[a].writeable;
d[a].set=b};j("volume",function(b){var c=f(this);if(c){if(b*=100,!isNaN(b)){var d=c.muted;(0>b||100<b)&&a.error("volume greater or less than allowed "+b/100);x(this,"sendEvent",["VOLUME",b],c);if(d)try{c.jwapi.sendEvent("mute","true")}catch(e){}b/=100;if(!(c.volume==b||"third"!=c.isActive))c.volume=b,n(c._elem,"volumechange")}}else if(g.volume.prop._supset)return g.volume.prop._supset.apply(this,arguments)});j("muted",function(a){var b=f(this);if(b){if(a=!!a,x(this,"sendEvent",["mute",""+a],b),!(b.muted==
a||"third"!=b.isActive))b.muted=a,n(b._elem,"volumechange")}else if(g.muted.prop._supset)return g.muted.prop._supset.apply(this,arguments)});j("currentTime",function(a){var b=f(this);if(b){if(a*=1,!isNaN(a)){if(b.paused)clearTimeout(b.stopPlayPause),b.stopPlayPause=setTimeout(function(){b.paused=!0;b.stopPlayPause=!1},50);x(this,"sendEvent",["SEEK",""+a],b);if(b.paused){if(0<b.readyState)b.currentTime=a,n(b._elem,"timeupdate");try{b.jwapi.sendEvent("play","false")}catch(c){}}}}else if(g.currentTime.prop._supset)return g.currentTime.prop._supset.apply(this,
arguments)});["play","pause"].forEach(function(a){d[a]={value:function(){var b=f(this);if(b)b.stopPlayPause&&clearTimeout(b.stopPlayPause),x(this,"sendEvent",["play","play"==a],b),setTimeout(function(){if("third"==b.isActive&&(b._ppFlag=!0,b.paused!=("play"!=a)))b.paused="play"!=a,n(b._elem,a)},1);else if(g[a].prop._supvalue)return g[a].prop._supvalue.apply(this,arguments)}}});e.forEach(i);a.onNodeNamesPropertyModify(c,"controls",function(d,e){var g=f(this);b(this)[e?"addClass":"removeClass"]("webshims-controls");
if(g){try{x(this,e?"showControls":"hideControls",[c],g)}catch(h){a.warn("you need to generate a crossdomain.xml")}"audio"==c&&I(g,e);b(g.jwapi).attr("tabindex",e?"0":"-1")}});g=a.defineNodeNameProperties(c,d,"prop")});if(s){var M=b.cleanData,N=b.browser.msie&&9>a.browserVersion,P={object:1,OBJECT:1};b.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&q)for(b=0;b<c;b++)if(P[a[b].nodeName]){if("sendEvent"in a[b]){q--;try{a[b].sendEvent("play",!1)}catch(e){}}if(N)try{for(d in a[b])"function"==typeof a[b][d]&&