WebPortal_TongZhou/02.UI/script/jwplayer/jwplayer.html5.js
(开头部分) 132KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
(function(f){f.html5={};f.html5.version="6.6.3896"})(jwplayer);
(function(f){f.parseDimension=function(g){if("string"==typeof g){if(""===g)return 0;if(!(-1<g.lastIndexOf("%")))return parseInt(g.replace("px",""),10)}return g};f.timeFormat=function(g){if(0<g){var b=Math.floor(g/3600),e=Math.floor((g-3600*b)/60);g=Math.floor(g%60);return(b?b+":":"")+(10>e?"0":"")+e+":"+(10>g?"0":"")+g}return"00:00"};f.bounds=function(g){try{var b=g.getBoundingClientRect(g),e=window.pageYOffset,c=window.pageXOffset;return{left:b.left+c,right:b.right+c,top:b.top+e,bottom:b.bottom+
e,width:b.right-b.left,height:b.bottom-b.top}}catch(a){return{left:0,right:0,width:0,height:0,top:0,bottom:0}}};f.empty=function(g){if(g)for(;0<g.childElementCount;)g.removeChild(g.children[0])}})(jwplayer.utils);
(function(f){function g(){var b=document.createElement("style");b.type="text/css";document.getElementsByTagName("head")[0].appendChild(b);return b}function b(b){if(A)c[b].innerHTML=e(b);else{var a=c[b].sheet,d=q[b];if(a){var g=a.cssRules;f.exists(d)&&d<g.length&&g[d].selectorText==b?a.deleteRule(d):q[b]=g.length;a.insertRule(e(b),q[b])}}}function e(b){var a=b+"{\n";h(d[b],function(b,d){a+=" "+b+": "+d+";\n"});return a+="}\n"}var c={},a,d={},r=0,j=f.exists,h=f.foreach,q={},A=!1,n=f.css=function(e,
k,p){if(!c[e])if(A)c[e]=g();else{if(!a||5E4<a.sheet.cssRules.length)a=g();c[e]=a}j(p)||(p=!1);d[e]||(d[e]={});h(k,function(b,a){a:{var c=a;if("undefined"===typeof c)a=void 0;else{var k=p?" !important":"";if(isNaN(c))a=c.match(/png|gif|jpe?g/i)&&0>c.indexOf("url")?"url("+c+")":c+k;else switch(b){case "z-index":case "opacity":a=c+k;break a;default:a=b.match(/color/i)?"#"+f.pad(c.toString(16).replace(/^0x/i,""),6)+k:0===c?0+k:Math.ceil(c)+"px"+k}}}j(d[e][b])&&!j(a)?delete d[e][b]:j(a)&&(d[e][b]=a)});
0<r||b(e)};n.block=function(){r++};n.unblock=function(){r=Math.max(r-1,0);0==r&&h(c,function(a){b(a)})};f.clearCss=function(a){h(d,function(b){0<=b.indexOf(a)&&delete d[b]});h(c,function(d){0<=d.indexOf(a)&&b(d)})};f.transform=function(b,a){var d="-transform",c;a=a?a:"";"string"==typeof b?(c={},c["-webkit"+d]=a,c["-ms"+d]=a,c["-moz"+d]=a,c["-o"+d]=a,f.css(b,c)):(d="Transform",c=b.style,c["webkit"+d]=a,c["Moz"+d]=a,c["ms"+d]=a,c["O"+d]=a)};f.dragStyle=function(b,a){f.css(b,{"-webkit-user-select":a,
"-moz-user-select":a,"-ms-user-select":a,"-webkit-user-drag":a,"user-select":a,"user-drag":a})};f.transitionStyle=function(b,a){navigator.userAgent.match(/5\.\d(\.\d)? safari/i)||f.css(b,{"-webkit-transition":a,"-moz-transition":a,"-o-transition":a})};f.rotate=function(b,a){f.transform(b,"rotate("+a+"deg)")};n(".jwplayer "+" div span a img ul li video".split(" ").join(",.jwplayer ")+", .jwclick",{margin:0,padding:0,border:0,color:"#000000","font-size":"100%",font:"inherit","vertical-align":"baseline",
"background-color":"transparent","text-align":"left",direction:"ltr"});n(".jwplayer ul",{"list-style":"none"})})(jwplayer.utils);
(function(f){f.scale=function(b,e,c,a,d){var g=f.exists;g(e)||(e=1);g(c)||(c=1);g(a)||(a=0);g(d)||(d=0);f.transform(b,1==e&&1==c&&0==a&&0==d?"":"scale("+e+","+c+") translate("+a+"px,"+d+"px)")};f.stretch=function(b,e,c,a,d,r){if(e&&(b||(b=g.UNIFORM),c&&a&&d&&r)){var j=c/d,h=a/r,q="video"==e.tagName.toLowerCase(),A=!1,n;q&&f.transform(e);n="jw"+b.toLowerCase();switch(b.toLowerCase()){case g.FILL:j>h?(d*=j,r*=j):(d*=h,r*=h);case g.NONE:j=h=1;case g.EXACTFIT:A=!0;break;default:j>h?0.95<d*h/c?(A=!0,n=
"jwexactfit"):(d*=h,r*=h):0.95<r*j/a?(A=!0,n="jwexactfit"):(d*=j,r*=j),A&&(h=Math.ceil(100*a/r)/100,j=Math.ceil(100*c/d)/100)}q?A?(e.style.width=d+"px",e.style.height=r+"px",f.scale(e,j,h,(c-d)/2/j,(a-r)/2/h)):(e.style.width="",e.style.height=""):(e.className=e.className.replace(/\s*jw(none|exactfit|uniform|fill)/g,""),e.className+=" "+n)}};var g=f.stretching={NONE:"none",FILL:"fill",UNIFORM:"uniform",EXACTFIT:"exactfit"}})(jwplayer.utils);
(function(f){f.dfxp=function(g,b){var e,c,a=jwplayer.utils.seconds;this.load=function(a){c=a;try{e.open("GET",a,!0),e.send(null)}catch(g){b("Error loading DFXP File: "+a)}};e=new XMLHttpRequest;e.onreadystatechange=function(){if(4===e.readyState)if(200===e.status){for(var d=e.responseText,r=[{begin:0,text:""}],d=d.replace(/^\s+/,"").replace(/\s+$/,""),j=d.split("\x3c/p\x3e"),h=d.split("\x3c/tt:p\x3e"),q=[],d=0;d<j.length;d++)0<=j[d].indexOf("\x3cp")&&(j[d]=j[d].substr(j[d].indexOf("\x3cp")+2).replace(/^\s+/,
"").replace(/\s+$/,""),q.push(j[d]));for(d=0;d<h.length;d++)0<=h[d].indexOf("\x3ctt:p")&&(h[d]=h[d].substr(h[d].indexOf("\x3ctt:p")+5).replace(/^\s+/,"").replace(/\s+$/,""),q.push(h[d]));j=q;for(d=0;d<j.length;d++){h=j[d];q={};try{var f=h.indexOf('begin\x3d"'),h=h.substr(f+7),f=h.indexOf('" end\x3d"');q.begin=a(h.substr(0,f));h=h.substr(f+7);f=h.indexOf('"');q.end=a(h.substr(0,f));f=h.indexOf('"\x3e');h=h.substr(f+2);q.text=h}catch(n){}h=q;h.text&&(r.push(h),h.end&&(r.push({begin:h.end,text:""}),
delete h.end))}1<r.length?g(r):b("Invalid DFXP file: "+c)}else r=e.status,0==r?b("Crossdomain loading denied: "+c):404==r?b("DFXP File not found: "+c):b("Error "+r+" loading DFXP file: "+c)}}})(jwplayer.parsers);
(function(f){f.srt=function(g,b,e){function c(a){0==a?b("Crossdomain loading denied: "+r):404==a?b("SRT File not found: "+r):b("Error "+a+" loading SRT file: "+r)}function a(a){var d=e?[]:[{begin:0,text:""}];a=a.replace(/^\s+/,"").replace(/\s+$/,"");var c=a.split("\r\n\r\n");1==c.length&&(c=a.split("\n\n"));for(a=0;a<c.length;a++)if("WEBVTT"!=c[a]){var j,k=c[a];j={};var p=k.split("\r\n");1==p.length&&(p=k.split("\n"));try{k=1;0<p[0].indexOf(" --\x3e ")&&(k=0);var l=p[k].indexOf(" --\x3e ");0<l&&(j.begin=
h(p[k].substr(0,l)),j.end=h(p[k].substr(l+5)));if(p[k+1]){j.text=p[k+1];for(k+=2;k<p.length;k++)j.text+="\x3cbr/\x3e"+p[k]}}catch(f){}j.text&&(d.push(j),j.end&&!e&&(d.push({begin:j.end,text:""}),delete j.end))}1<d.length?g(d):b("Invalid SRT file: "+r)}var d,r,j=jwplayer.utils,h=j.seconds;this.load=function(g){r=g;try{var e;e=g&&0<=g.indexOf("://")&&g.split("/")[2]!=window.location.href.split("/")[2]?!0:!1;e&&j.exists(window.XDomainRequest)&&(d=new XDomainRequest,d.onload=function(){a(d.responseText)},
d.onerror=function(){c(d.status)});d.open("GET",g,!0);d.send(null)}catch(h){b("Error loading SRT File: "+g)}};d=new XMLHttpRequest;d.onreadystatechange=function(){4===d.readyState&&(200===d.status?a(d.responseText):c(d.status))}}})(jwplayer.parsers);
(function(f){var g=jwplayer.utils,b=jwplayer.events,e=b.state,c=jwplayer.parsers,a=g.css,d="playing",r=document;f.captions=function(a,h){function q(a){g.log("CAPTIONS("+a+")")}function f(a){(G=a.fullscreen)?(n(),setTimeout(n,500)):l(!0)}function n(){var a=D.offsetHeight,b=D.offsetWidth;0!=a&&0!=b&&s.resize(b,Math.round(0.94*a))}function y(a){a=a.responseXML.firstChild;"xml"==c.localName(a)&&(a=a.nextSibling);for(;a.nodeType==a.COMMENT_NODE;)a=a.nextSibling;("tt"==c.localName(a)?new jwplayer.parsers.dfxp(p,
q):new jwplayer.parsers.srt(p,q)).load(C)}function k(){(new jwplayer.parsers.srt(p,q)).load(C)}function p(a){s.populate(a);z<u.length&&(u[z].data=a);l(!1)}function l(a){u.length?v==d&&0<B?(s.show(),G?f({fullscreen:!0}):(I(),a&&setTimeout(I,500))):s.hide():s.hide()}function I(){s.resize()}function t(a){0<a?(z=a-1,B=a):B=0;z>=u.length||(u[z].data?s.populate(u[z].data):(C=a=u[z].file,g.ajax(a,y,k)),l(!1))}function w(){var a=[];a.push({label:"Off"});for(var b=0;b<u.length;b++)a.push({label:u[b].label});
return a}var D,x={back:!0,color:"#FFFFFF",fontSize:15},m={fontFamily:"Arial,sans-serif",fontStyle:"normal",fontWeight:"normal",textDecoration:"none"},s,v,z,u=[],B=0,G=!1,C,M=new b.eventdispatcher;g.extend(this,M);this.element=function(){return D};this.getCaptionsList=function(){return w()};this.getCurrentCaptions=function(){return B};this.setCurrentCaptions=function(a){if(0<=a&&B!=a&&a<=u.length){t(a);a=w();g.saveCookie("captionLabel",a[B].label);var c=b.JWPLAYER_CAPTIONS_CHANGED;M.sendEvent(c,{type:c,
tracks:a,track:B})}};D=r.createElement("div");D.id=a.id+"_caption";D.className="jwcaptions";a.jwAddEventListener(b.JWPLAYER_PLAYER_STATE,function(a){switch(a.newstate){case e.IDLE:v="idle";l(!1);break;case e.PLAYING:v=d,l(!1)}});a.jwAddEventListener(b.JWPLAYER_PLAYLIST_ITEM,function(){z=0;u=[];s.update(0);for(var c=a.jwGetPlaylist()[a.jwGetPlaylistIndex()].tracks,d=[],e=0,k="",m=0,k="",e=0;e<c.length;e++)k=c[e].kind.toLowerCase(),("captions"==k||"subtitles"==k)&&d.push(c[e]);for(e=B=0;e<d.length;e++)if(k=
d[e].file)d[e].label||(d[e].label=e.toString()),u.push(d[e]);for(e=0;e<u.length;e++)if(u[e]["default"]){m=e+1;break}if(k=g.getCookies().captionLabel){c=w();for(e=0;e<c.length;e++)if(k==c[e].label){m=e;break}}t(m);l(!1);c=b.JWPLAYER_CAPTIONS_LIST;d=w();M.sendEvent(c,{type:c,tracks:d,track:B})});a.jwAddEventListener(b.JWPLAYER_MEDIA_ERROR,q);a.jwAddEventListener(b.JWPLAYER_ERROR,q);a.jwAddEventListener(b.JWPLAYER_READY,function(){g.foreach(x,function(a,b){h&&void 0!=h[a.toLowerCase()]?"color"==a?m.color=
"#"+String(h.color).substr(-6):m[a]=h[a.toLowerCase()]:m[a]=b});s=new jwplayer.html5.captions.renderer(m,D);l(!1)});a.jwAddEventListener(b.JWPLAYER_MEDIA_TIME,function(a){s.update(a.position)});a.jwAddEventListener(b.JWPLAYER_FULLSCREEN,f);a.jwAddEventListener(b.JWPLAYER_RESIZE,function(){l(!1)})};a(".jwcaptions",{position:"absolute",cursor:"pointer",width:"100%",height:"100%",overflow:"hidden"})})(jwplayer.html5);
(function(f){var g=jwplayer.utils.foreach;f.captions.renderer=function(b,e){function c(b){r(h,{visibility:"hidden"});q.innerHTML=b;y=""==b?"hidden":"visible";setTimeout(a,20)}function a(){var a=h.clientWidth,c=Math.round(b.fontSize*Math.pow(a/400,0.6)),d=Math.round(1.4*c);r(q,{maxWidth:a+"px",fontSize:c+"px",lineHeight:d+"px",visibility:y})}function d(){for(var a=-1,b=0;b<j.length;b++)if(j[b].begin<=n&&(b==j.length-1||j[b+1].begin>=n)){a=b;break}-1==a?c(""):a!=f&&(f=a,c(j[b].text))}function r(a,b){g(b,
function(b,c){a.style[b]=c})}var j,h,q,f,n,y="visible",k;this.hide=function(){r(h,{display:"none"});k&&(clearInterval(k),k=null)};this.populate=function(a){f=-1;j=a;d()};this.resize=function(){a()};h=document.createElement("div");q=document.createElement("span");h.appendChild(q);e.appendChild(h);r(h,{display:"block",height:"auto",position:"absolute",bottom:"20px",textAlign:"center",width:"100%"});r(q,{color:"#"+b.color.substr(-6),display:"inline-block",fontFamily:b.fontFamily,fontStyle:b.fontStyle,
fontWeight:b.fontWeight,height:"auto",margin:"auto",position:"relative",textAlign:"center",textDecoration:b.textDecoration,wordWrap:"break-word",width:"auto"});b.back?r(q,{background:"#000"}):r(q,{textShadow:"-2px 0px 1px #000,2px 0px 1px #000,0px -2px 1px #000,0px 2px 1px #000,-1px 1px 1px #000,1px 1px 1px #000,1px -1px 1px #000,1px 1px 1px #000"});this.show=function(){r(h,{display:"block"});k||(k=setInterval(a,250));a()};this.update=function(a){n=a;j&&d()}}})(jwplayer.html5);
(function(f){var g=f.html5,b=f.utils,e=f.events,c=e.state,a=b.css;f=b.transitionStyle;var d=b.isMobile(),r=b.isAndroid(4)&&!b.isChrome(),j="button",h="text",q="slider",A="100%",n={display:"none"},y={display:"block"},k={display:t},p=!1,l=!0,I=null,t=void 0,w=window,D=document;g.controlbar=function(f,m){function s(a,b,c){return{name:a,type:b,className:c}}function v(a){var c=p,e;a.duration==Number.POSITIVE_INFINITY||!a.duration&&b.isSafari()&&!d?$.setText(H.jwGetPlaylist()[H.jwGetPlaylistIndex()].title||
"Live broadcast"):(L.elapsed&&(e=b.timeFormat(a.position),L.elapsed.innerHTML=e,c=e.length!=b.timeFormat(La).length),L.duration&&(e=b.timeFormat(a.duration),L.duration.innerHTML=e,c=c||e.length!=b.timeFormat(ua).length),0<a.duration?V(a.position/a.duration):V(0),ua=a.duration,La=a.position,$.setText());c&&Aa()}function z(){var a=H.jwGetMute();Q("mute",a);R(a?0:Ma)}function u(){Ma=H.jwGetVolume()/100;R(Ma)}function B(){a(F(".jwhd"),n);a(F(".jwcc"),n);Da();Aa()}function G(a){Na=a.currentQuality;ia&&
0<=Na&&ia.setActive(a.currentQuality)}function C(a){na&&(Qa=a.track,ja&&0<=Qa&&ja.setActive(a.track))}function M(){W=b.extend({},Ea,oa.getComponentSettings("controlbar"),m);wa=N("background").height;a("#"+ea,{height:wa,bottom:pa?0:W.margin});a(F(".jwtext"),{font:W.fontsize+"px/"+N("background").height+"px "+W.font,color:W.fontcolor,"font-weight":W.fontweight});a(F(".jwoverlay"),{bottom:wa});0<W.maxwidth&&a(F(),{"max-width":pa?t:W.maxwidth})}function F(a){return"#"+ea+(a?" "+a:"")}function P(){return D.createElement("span")}
function E(c,d,e,g,k){var m=P(),j=N(c);g=g?" left center":" center";var h=Y(j);m.className="jw"+c;m.innerHTML="\x26nbsp;";if(j&&""!=j.src)return e=e?{background:"url('"+j.src+"') repeat-x "+g,"background-size":h,height:k?j.height:t}:{background:"url('"+j.src+"') no-repeat"+g,"background-size":h,width:j.width,height:k?j.height:t},m.skin=j,a(F((k?".jwvertical ":"")+".jw"+c),b.extend(e,d)),L[c]=m}function O(b,c,e){c&&c.src&&(a(b,{width:c.width,background:"url("+c.src+") no-repeat center","background-size":Y(c)}),
e.src&&!d&&a(b+":hover",{background:"url("+e.src+") no-repeat center","background-size":Y(e)}))}function U(a){return function(b){fb[a]&&(fb[a](),d&&Fa.sendEvent(e.JWPLAYER_USER_ACTION));b.preventDefault&&b.preventDefault()}}function J(a){b.foreach(Ra,function(b,c){b!=a&&("cc"==b&&(clearTimeout(xa),xa=t),"hd"==b&&(clearTimeout(ya),ya=t),c.hide())})}function Z(){pa||(Ga.show(),J("volume"))}function Q(a,c){b.exists(c)||(c=!Sa[a]);L[a]&&(L[a].className="jw"+a+(c?" jwtoggle jwtoggling":" jwtoggling"),
setTimeout(function(){L[a].className=L[a].className.replace(" jwtoggling","")},100));Sa[a]=c}function Y(a){return a?parseInt(a.width)+"px "+parseInt(a.height)+"px":"0 0"}function da(){fa&&1<fa.length&&(Za&&(clearTimeout(Za),Za=t),ia.show(),J("hd"))}function aa(){na&&1<na.length&&($a&&(clearTimeout($a),$a=t),ja.show(),J("cc"))}function ga(a){0<=a&&a<fa.length&&(H.jwSetCurrentQuality(a),clearTimeout(ya),ya=t,ia.hide())}function ka(a){0<=a&&a<na.length&&(H.jwSetCurrentCaptions(a),clearTimeout(xa),xa=
t,ja.hide())}function la(a){a.preventDefault();D.onselectstart=function(){return p}}function ab(){L.timeRail.className="jwrail";H.jwGetState()!=c.IDLE&&(H.jwSeekDrag(l),ha="time",T(),Fa.sendEvent(e.JWPLAYER_USER_ACTION))}function qa(a){if(ha){var c=(new Date).getTime();50<c-bb&&(ra(a),bb=c);var d=L[ha].getElementsByClassName("jwrail")[0],d=b.bounds(d),d=a.x/d.width;100<d&&(d=100);a.type==b.touchEvents.DRAG_END?(H.jwSeekDrag(p),L.timeRail.className="jwrail jwsmooth",ha=I,Ta.time(d),va()):(V(d),500<
c-cb&&(cb=c,Ta.time(d)));Fa.sendEvent(e.JWPLAYER_USER_ACTION)}}function Oa(a){var d=L.time.getElementsByClassName("jwrail")[0],d=b.bounds(d);a=a.x/d.width;100<a&&(a=100);H.jwGetState()!=c.IDLE&&(Ta.time(a),Fa.sendEvent(e.JWPLAYER_USER_ACTION))}function X(a){return function(b){0==b.button&&(L[a+"Rail"].className="jwrail","time"==a?H.jwGetState()!=c.IDLE&&(H.jwSeekDrag(l),ha=a):ha=a)}}function K(a){var c=(new Date).getTime();50<c-bb&&(ra(a),bb=c);if(ha&&0==a.button){var d=L[ha].getElementsByClassName("jwrail")[0],
e=b.bounds(d),d=ha,e=L[d].vertical?(e.bottom-a.pageY)/e.height:(a.pageX-e.left)/e.width;"mouseup"==a.type?("time"==d&&H.jwSeekDrag(p),L[d+"Rail"].className="jwrail jwsmooth",ha=I,Ta[d.replace("H","")](e)):("time"==ha?V(e):R(e),500<c-cb&&(cb=c,Ta[ha.replace("H","")](e)));return!1}}function T(){sa&&(ua&&!pa&&!d)&&(Ha(sa),sa.show())}function va(){sa&&sa.hide()}function ra(a){if((Ua=b.bounds(gb))&&0!=Ua.width){var c=sa.element();a=a.pageX?a.pageX-Ua.left-w.pageXOffset:a.x;0<=a&&a<=Ua.width&&(c.style.left=
Math.round(a)+"px",Va(ua*a/Ua.width),ca=b.bounds(S))}}function Va(a){db.innerHTML=b.timeFormat(a);Wa.updateTimeline(a);sa.setContents(Xa);ca=b.bounds(S);Ha(sa)}function Ya(){$a=setTimeout(ja.hide,500)}function ma(){Za=setTimeout(ia.hide,500)}function Ia(b,c,e,g){if(!d){var k=b.element();c.appendChild(k);c.addEventListener("mousemove",e,p);g?c.addEventListener("mouseout",g,p):c.addEventListener("mouseout",b.hide,p);a("#"+k.id,{left:"50%"})}}function ba(c,g,k,j){if(d){var m=c.element();g.appendChild(m);
(new b.touch(g)).addEventListener(b.touchEvents.TAP,function(){"cc"==j?(xa?(clearTimeout(xa),xa=t,c.hide()):(xa=setTimeout(function(){c.hide();xa=t},4E3),k()),Fa.sendEvent(e.JWPLAYER_USER_ACTION)):"hd"==j&&(ya?(clearTimeout(ya),ya=t,c.hide()):(ya=setTimeout(function(){c.hide();ya=t},4E3),k()),Fa.sendEvent(e.JWPLAYER_USER_ACTION))});a("#"+m.id,{left:"50%"})}}function ta(c){var e=P();e.className="jwgroup jw"+c;Ja[c]=e;if(Ba[c]){var e=Ba[c],k=Ja[c];if(e&&0<e.elements.length)for(var m=0;m<e.elements.length;m++){var f;
a:{f=e.elements[m];var C=c;switch(f.type){case h:C=void 0;f=f.name;var C={},s=N(("alt"==f?"elapsed":f)+"Background");if(s.src){var l=P();l.id=ea+"_"+f;l.className="elapsed"==f||"duration"==f?"jwtext jw"+f+" jwhidden":"jwtext jw"+f;C.background="url("+s.src+") repeat-x center";C["background-size"]=Y(N("background"));a(F(".jw"+f),C);"alt"!=f?l.innerHTML="00:00":l.innerHTML="";C=L[f]=l}else C=null;f=C;break a;case j:if("blank"!=f.name){f=f.name;s=C;if(!N(f+"Button").src||d&&("mute"==f||0==f.indexOf("volume"))||
r&&/hd|cc/.test(f))f=I;else{var C=P(),l=P(),J=void 0,J=za,v=E(J.name);v||(v=P(),v.className="jwblankDivider");J.className&&(v.className+=" "+J.className);J=v;v=D.createElement("button");C.style+=" display:inline-block";C.className="jw"+f+" jwbuttoncontainer";"left"==s?(C.appendChild(l),C.appendChild(J)):(C.appendChild(J),C.appendChild(l));d?"hd"!=f&&"cc"!=f&&(new b.touch(v)).addEventListener(b.touchEvents.TAP,U(f)):v.addEventListener("click",U(f),p);v.innerHTML="\x26nbsp;";l.appendChild(v);s=N(f+
"Button");l=N(f+"ButtonOver");O(F(".jw"+f+" button"),s,l);(s=mb[f])&&O(F(".jw"+f+".jwtoggle button"),N(s+"Button"),N(s+"ButtonOver"));f=L[f]=C}break a}break;case q:C=void 0;J=f.name;if(d&&0==J.indexOf("volume"))C=void 0;else{f=P();var l="volume"==J,y=J+("time"==J?"Slider":"")+"Cap",s=l?"Top":"Left",C=l?"Bottom":"Right",v=E(y+s,I,p,p,l),x=E(y+C,I,p,p,l),z;z=J;var u=l,B=s,ka=C,w=P(),G=["Rail","Buffer","Progress"],la=void 0;w.className="jwrail jwsmooth";for(var M=0;M<G.length;M++){var Q="time"==z?"Slider":
"",H=z+Q+G[M],ca=E(H,I,!u,0==z.indexOf("volume"),u),K=E(H+"Cap"+B,I,p,p,u),ga=E(H+"Cap"+ka,I,p,p,u),Z=N(H+"Cap"+B),S=N(H+"Cap"+ka);if(ca){var R=P();R.className="jwrailgroup "+G[M];K&&R.appendChild(K);R.appendChild(ca);ga&&(R.appendChild(ga),ga.className+=" jwcap"+(u?"Bottom":"Right"));a(F(".jwrailgroup."+G[M]),{"min-width":u?t:Z.width+S.width});R.capSize=u?Z.height+S.height:Z.width+S.width;a(F("."+ca.className),{left:u?t:Z.width,right:u?t:S.width,top:u?Z.height:t,bottom:u?S.height:t,height:u?"auto":
t});2==M&&(la=R);2==M&&!u?(ca=P(),ca.className="jwprogressOverflow",ca.appendChild(R),L[H]=ca,w.appendChild(ca)):(L[H]=R,w.appendChild(R))}}if(B=E(z+Q+"Thumb",I,p,p,u))a(F("."+B.className),{opacity:"time"==z?0:1,"margin-top":u?B.skin.height/-2:t}),B.className+=" jwthumb",(u&&la?la:w).appendChild(B);d?(u=new b.touch(w),u.addEventListener(b.touchEvents.DRAG_START,ab),u.addEventListener(b.touchEvents.DRAG,qa),u.addEventListener(b.touchEvents.DRAG_END,qa),u.addEventListener(b.touchEvents.TAP,Oa)):(la=
z,"volume"==la&&!u&&(la+="H"),w.addEventListener("mousedown",X(la),p));"time"==z&&!d&&(w.addEventListener("mousemove",T,p),w.addEventListener("mouseout",va,p));z=L[z+"Rail"]=w;w=N(y+s);y=N(y+s);N(J+"SliderRail");f.className="jwslider jw"+J;v&&f.appendChild(v);f.appendChild(z);x&&(l&&(x.className+=" jwcapBottom"),f.appendChild(x));a(F(".jw"+J+" .jwrail"),{left:l?t:w.width,right:l?t:y.width,top:l?w.height:t,bottom:l?y.height:t,width:l?A:t,height:l?"auto":t});L[J]=f;f.vertical=l;"time"==J?(sa=new g.overlay(ea+
"_timetooltip",oa),Wa=new g.thumbs(ea+"_thumb"),db=D.createElement("div"),db.className="jwoverlaytext",Xa=D.createElement("div"),C=Wa.element(),Xa.appendChild(C),Xa.appendChild(db),sa.setContents(Xa),gb=z,Va(0),C=sa.element(),z.appendChild(C),L.timeSliderRail||a(F(".jwtime"),n),L.timeSliderThumb&&a(F(".jwtimeSliderThumb"),{"margin-left":N("timeSliderThumb").width/-2}),Ca(0),V(0),V(0),Ca(0)):0==J.indexOf("volume")&&(J=f,v="volume"+(l?"":"H"),x=l?"vertical":"horizontal",a(F(".jw"+v+".jw"+x),{width:N(v+
"Rail",l).width+(l?0:N(v+"Cap"+s).width+N(v+"RailCap"+s).width+N(v+"RailCap"+C).width+N(v+"Cap"+C).width),height:l?N(v+"Cap"+s).height+N(v+"Rail").height+N(v+"RailCap"+s).height+N(v+"RailCap"+C).height+N(v+"Cap"+C).height:t}),J.className+=" jw"+x);C=f}f=C;break a}f=void 0}f&&("volume"==e.elements[m].name&&f.vertical?(Ga=new g.overlay(ea+"_volumeOverlay",oa),Ga.setContents(f)):k.appendChild(f))}}}function Da(){1<H.jwGetPlaylist().length&&(!D.querySelector("#"+H.id+" .jwplaylist")||H.jwGetFullscreen())?
(a(F(".jwnext"),k),a(F(".jwprev"),k)):(a(F(".jwnext"),n),a(F(".jwprev"),n))}function Ha(a){ca||(ca=b.bounds(S));a.offsetX(0);var c=b.bounds(a.element());c.right>ca.right?a.offsetX(ca.right-c.right):c.left<ca.left&&a.offsetX(ca.left-c.left)}function Ca(a){a=Math.min(Math.max(0,a),1);L.timeSliderBuffer&&(L.timeSliderBuffer.style.width=100*a+"%",L.timeSliderBuffer.style.opacity=0<a?1:0)}function Ka(a,b){if(L[a]){var c=L[a].vertical,d=a+("time"==a?"Slider":""),e=100*Math.min(Math.max(0,b),1)+"%",g=L[d+
"Progress"],d=L[d+"Thumb"];g&&(c?(g.style.height=e,g.style.bottom=0):g.style.width=e,g.style.opacity=0<b||ha?1:0);d&&(c?d.style.top=0:d.style.left=e)}}function R(a){Ka("volume",a);Ka("volumeH",a)}function V(a){Ka("time",a)}function N(a){var b="controlbar",c=a;0==a.indexOf("volume")&&(0==a.indexOf("volumeH")?c=a.replace("volumeH","volume"):b="tooltip");return(a=oa.getSkinElement(b,c))?a:{width:0,height:0,src:"",image:t,ready:p}}var H,oa,za=s("divider","divider"),Ea={margin:8,maxwidth:800,font:"Arial,sans-serif",
fontsize:11,fontcolor:15658734,fontweight:"bold",layout:{left:{position:"left",elements:[s("play",j),s("prev",j),s("next",j),s("elapsed",h)]},center:{position:"center",elements:[s("time",q),s("alt",h)]},right:{position:"right",elements:[s("duration",h),s("hd",j),s("cc",j),s("mute",j),s("volume",q),s("volumeH",q),s("fullscreen",j)]}}},W,Ba,L,wa,S,ea,ua,La,fa,Na,na,Qa,Ma,Ga,ca,gb,Ua,sa,Xa,Wa,db,Za,ya,ia,$a,xa,ja,hb,Pa,pa=p,eb=p,ha=p,cb=0,ib=-1,bb=0,Fa=new e.eventdispatcher,mb={play:"pause",mute:"unmute",
fullscreen:"normalscreen"},Sa={play:p,mute:p,fullscreen:p},fb={play:function(){Sa.play?H.jwPause():H.jwPlay()},mute:function(){H.jwSetMute(!Sa.mute);z({mute:Sa.mute})},fullscreen:function(){H.jwSetFullscreen()},next:function(){H.jwPlaylistNext()},prev:function(){H.jwPlaylistPrev()}},Ta={time:function(a){H.jwSeek(a*ua)},volume:function(a){R(a);0.1>a&&(a=0);0.9<a&&(a=1);H.jwSetVolume(100*a)}},Ra={},$=this;b.extend($,Fa);$.setText=function(b){a(F(".jwelapsed"),b?n:y);a(F(".jwduration"),b?n:y);a(F(".jwtime"),
b?n:y);a(F(".jwalt"),b?y:n);L.timeSliderRail||a(F(".jwtime"),n);var c=S.querySelector(".jwalt");c&&(c.innerHTML=b||"");Aa()};var Ja={},Aa=function(){clearTimeout(hb);hb=setTimeout($.redraw,0)};$.redraw=function(c){c&&$.visible&&$.show(l);M();c=N("capLeft");var d=N("capRight");a(F(".jwgroup.jwcenter"),{left:Math.round(b.parseDimension(Ja.left.offsetWidth)+c.width),right:Math.round(b.parseDimension(Ja.right.offsetWidth)+d.width)});c=!pa&&S.parentNode.clientWidth>W.maxwidth;d=pa?0:W.margin;a(F(),{left:c?
"50%":d,right:c?t:d,"margin-left":c?S.clientWidth/-2:t,width:c?A:t});a(F(".jwfullscreen"),{display:pa||eb?"none":t});a(F(".jwvolumeH"),{display:pa?"block":"none"});a(F(".jwhd"),{display:!pa&&fa&&1<fa.length&&ia?t:"none"});a(F(".jwcc"),{display:!pa&&na&&1<na.length&&ja?t:"none"});ca=b.bounds(S);b.foreach(Ra,function(a,b){Ha(b)})};$.audioMode=function(a){a!=pa&&(pa=a,Aa())};$.hideFullscreen=function(a){a!=eb&&(eb=a,Aa())};$.element=function(){return S};$.margin=function(){return parseInt(W.margin)};
$.height=function(){return wa};$.show=function(c){if(!$.visible||c)clearTimeout(Pa),Pa=t,$.visible=!0,S.style.display="inline-block",Aa(),z(),S&&S.querySelector(".jwalt")&&(320<=b.bounds(S.parentNode).width&&!S.querySelector(".jwalt").innerHTML?a(F(".jwhidden"),k):a(F(".jwhidden"),n)),Pa=setTimeout(function(){S.style.opacity=1},10)};$.hide=function(){$.visible&&($.visible=!1,S.style.opacity=0,clearTimeout(Pa),Pa=t,Pa=setTimeout(function(){S.style.display="none"},250))};L={};H=f;ea=H.id+"_controlbar";
ua=La=0;S=P();S.id=ea;S.className="jwcontrolbar";oa=H.skin;var nb=setInterval(function(){var a=D.getElementById(ea),c=b.bounds(a).width;a!=S?clearInterval(nb):0<c&&($.visible&&c!=ib)&&(ib=c,$.show(l))},200);Ba=oa.getComponentLayout("controlbar");Ba||(Ba=Ea.layout);b.clearCss("#"+ea);M();var jb=E("capLeft"),kb=E("capRight"),lb=E("background",{position:"absolute",left:N("capLeft").width,right:N("capRight").width,"background-repeat":"repeat-x"},l);lb&&S.appendChild(lb);jb&&S.appendChild(jb);ta("left");
ta("center");ta("right");S.appendChild(Ja.left);S.appendChild(Ja.center);S.appendChild(Ja.right);L.hd&&(ia=new g.menu("hd",ea+"_hd",oa,ga),d?ba(ia,L.hd,da,"hd"):Ia(ia,L.hd,da,ma),Ra.hd=ia);L.cc&&(ja=new g.menu("cc",ea+"_cc",oa,ka),d?ba(ja,L.cc,aa,"cc"):Ia(ja,L.cc,aa,Ya),Ra.cc=ja);L.mute&&(L.volume&&L.volume.vertical)&&(Ga=new g.overlay(ea+"_volumeoverlay",oa),Ga.setContents(L.volume),Ia(Ga,L.mute,Z),Ra.volume=Ga);a(F(".jwright"),{right:N("capRight").width});kb&&S.appendChild(kb);H.jwAddEventListener(e.JWPLAYER_MEDIA_TIME,
v);H.jwAddEventListener(e.JWPLAYER_PLAYER_STATE,function(b){switch(b.newstate){case c.BUFFERING:case c.PLAYING:a(F(".jwtimeSliderThumb"),{opacity:1});Q("play",l);break;case c.PAUSED:ha||Q("play",p);break;case c.IDLE:Q("play",p),a(F(".jwtimeSliderThumb"),{opacity:0}),L.timeRail&&(L.timeRail.className="jwrail",setTimeout(function(){L.timeRail.className+=" jwsmooth"},100)),Ca(0),v({position:0,duration:0})}});H.jwAddEventListener(e.JWPLAYER_PLAYLIST_ITEM,function(a){a=H.jwGetPlaylist()[a.index].tracks;
if("array"==b.typeOf(a)&&!d)for(var c=0;c<a.length;c++)if(a[c].file&&a[c].kind&&"thumbnails"==a[c].kind.toLowerCase()){Wa.load(a[c].file);return}Wa.load()});H.jwAddEventListener(e.JWPLAYER_MEDIA_MUTE,z);H.jwAddEventListener(e.JWPLAYER_MEDIA_VOLUME,u);H.jwAddEventListener(e.JWPLAYER_MEDIA_BUFFER,function(a){Ca(a.bufferPercent/100)});H.jwAddEventListener(e.JWPLAYER_FULLSCREEN,function(a){Q("fullscreen",a.fullscreen);Da()});H.jwAddEventListener(e.JWPLAYER_PLAYLIST_LOADED,B);H.jwAddEventListener(e.JWPLAYER_MEDIA_LEVELS,
function(b){if((fa=b.levels)&&1<fa.length&&ia){a(F(".jwhd"),k);ia.clearOptions();for(var c=0;c<fa.length;c++)ia.addOption(fa[c].label,c);G(b)}else a(F(".jwhd"),n);Aa()});H.jwAddEventListener(e.JWPLAYER_MEDIA_LEVEL_CHANGED,G);H.jwAddEventListener(e.JWPLAYER_CAPTIONS_LIST,function(b){if((na=b.tracks)&&1<na.length&&ja){a(F(".jwcc"),k);ja.clearOptions();for(var c=0;c<na.length;c++)ja.addOption(na[c].label,c);C(b)}else a(F(".jwcc"),n);Aa()});H.jwAddEventListener(e.JWPLAYER_CAPTIONS_CHANGED,C);d||(S.addEventListener("mouseover",
function(){w.addEventListener("mousemove",K,p);w.addEventListener("mouseup",K,p);w.addEventListener("mousedown",la,p)},!1),S.addEventListener("mouseout",function(){w.removeEventListener("mousemove",K);w.removeEventListener("mouseup",K);w.removeEventListener("mousedown",la);D.onselectstart=null},!1));setTimeout(function(){u();z()},0);B();$.visible=!1};a(".jwcontrolbar",{position:"absolute",opacity:0,display:"none"});a(".jwcontrolbar span",{height:A});b.dragStyle(".jwcontrolbar span","none");a(".jwcontrolbar .jwgroup",
{display:"inline"});a(".jwcontrolbar span, .jwcontrolbar .jwgroup button,.jwcontrolbar .jwleft",{position:"relative","float":"left"});a(".jwcontrolbar .jwright",{position:"absolute"});a(".jwcontrolbar .jwcenter",{position:"absolute"});a(".jwcontrolbar buttoncontainer,.jwcontrolbar button",{display:"inline-block",height:A,border:"none",cursor:"pointer"});a(".jwcontrolbar .jwcapRight,.jwcontrolbar .jwtimeSliderCapRight,.jwcontrolbar .jwvolumeCapRight",{right:0,position:"absolute"});a(".jwcontrolbar .jwcapBottom",
{bottom:0,position:"absolute"});a(".jwcontrolbar .jwtime",{position:"absolute",height:A,width:A,left:0});a(".jwcontrolbar .jwthumb",{position:"absolute",height:A,cursor:"pointer"});a(".jwcontrolbar .jwrail",{position:"absolute",cursor:"pointer"});a(".jwcontrolbar .jwrailgroup",{position:"absolute",width:A});a(".jwcontrolbar .jwrailgroup span",{position:"absolute"});a(".jwcontrolbar .jwdivider+.jwdivider",{display:"none"});a(".jwcontrolbar .jwtext",{padding:"0 5px","text-align":"center"});a(".jwcontrolbar .jwalt",
{display:"none",overflow:"hidden"});a(".jwcontrolbar .jwalt",{position:"absolute",left:0,right:0,"text-align":"left"},l);a(".jwcontrolbar .jwoverlaytext",{padding:3,"text-align":"center"});a(".jwcontrolbar .jwvertical *",{display:"block"});a(".jwcontrolbar .jwvertical .jwvolumeProgress",{height:"auto"},l);a(".jwcontrolbar .jwprogressOverflow",{position:"absolute",overflow:"hidden"});a(".jwcontrolbar .jwduration .jwhidden",{});f(".jwcontrolbar","opacity .25s, background .25s, visibility .25s");f(".jwcontrolbar button",
后面还有 135 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。