2 lines
1.1 KiB
JavaScript
2 lines
1.1 KiB
JavaScript
|
console.log("zoomrotate: Start"),function(){var n,i;console.log("zoomrotate: Init defaults"),n={zoom:1,rotate:0,debug:!0},i=function(){var r,o,a,t,e;r=Array.prototype.slice.call(arguments),o=r.shift()||{};for(a in r){t=r[a];for(e in t)t.hasOwnProperty(e)&&(typeof t[e]=="object"?o[e]=i(o[e],t[e]):o[e]=t[e])}return o},videojs.plugin("zoomrotate",function(r){n.debug&&console.log("zoomrotate: Register init");var o,a,t,e;o=i(n,r),a=this.el(),t=this.el().getElementsByTagName("video")[0],e=this.el().getElementsByTagName("div")[1],o.debug&&console.log("zoomrotate: "+t.style),o.debug&&console.log("zoomrotate: "+e.style),o.debug&&console.log("zoomrotate: "+o.rotate),o.debug&&console.log("zoomrotate: "+o.zoom);var l=["transform","WebkitTransform","MozTransform","msTransform","OTransform"],g=l[0],s,f;for(s=0,f=l.length;s<f;s++)if(typeof a.style[l[s]]!="undefined"){g=l[s];break}a.style.overflow="hidden",t.style[g]="scale("+o.zoom+") rotate("+o.rotate+"deg)",e.style[g]="scale("+o.zoom+") rotate("+o.rotate+"deg)",o.debug&&console.log("zoomrotate: Register end")})}(),console.log("zoomrotate: End");
|