63 lines
13 KiB
Plaintext
63 lines
13 KiB
Plaintext
(function(g){var window=this;var y4=function(a,b,c){var d=b.ua();g.I(a.element,"ytp-suggestion-set",!!d.videoId);var e=b.getPlaylistId();c=b.Ac(c?c:"mqdefault.jpg");var f=b instanceof g.zB&&b.lengthSeconds?g.oR(b.lengthSeconds):null,k=!!e;e=k&&"RD"==(new g.uE(e.substr(0,2),e.substr(2))).type;var l=b instanceof g.zB?b.sa:null;d={title:b.title,author:b.author,author_and_views:d.shortViewCount?b.author+" \u2022 "+d.shortViewCount:b.author,aria_label:b.lj||g.UN("$TITLE \ubcf4\uae30",{TITLE:b.title}),duration:f,url:b.Wh(),is_live:l,
|
|
is_list:k,is_mix:e,background:c?"background-image: url("+c+")":""};b instanceof g.wE&&(d.playlist_length=b.getLength());a.update(d)},z4=function(a,b){g.tD.call(this,{C:"div",
|
|
W:["html5-endscreen","ytp-player-content",b||"base-endscreen"]});this.player=a;this.created=!1},A4=function(a){g.W.call(this,{C:"div",
|
|
W:["ytp-upnext","ytp-player-content"],L:{"aria-label":"{{aria_label}}"},J:[{C:"div",G:"ytp-cued-thumbnail-overlay-image",L:{style:"{{background}}"}},{C:"span",G:"ytp-upnext-top",J:[{C:"span",G:"ytp-upnext-header",V:"\ub2e4\uc74c \ub3d9\uc601\uc0c1"},{C:"span",G:"ytp-upnext-title",V:"{{title}}"},{C:"span",G:"ytp-upnext-author",V:"{{author}}"}]},{C:"a",G:"ytp-upnext-autoplay-icon",L:{role:"button",href:"{{url}}","aria-label":"\ub2e4\uc74c \ub3d9\uc601\uc0c1 \uc7ac\uc0dd"},J:[{C:"svg",L:{height:"100%",
|
|
version:"1.1",viewBox:"0 0 72 72",width:"100%"},J:[{C:"circle",G:"ytp-svg-autoplay-circle",L:{cx:"36",cy:"36",fill:"#fff","fill-opacity":"0.3",r:"31.5"}},{C:"circle",G:"ytp-svg-autoplay-ring",L:{cx:"-36",cy:"36","fill-opacity":"0",r:"33.5",stroke:"#FFFFFF","stroke-dasharray":"211","stroke-dashoffset":"-211","stroke-width":"4",transform:"rotate(-90)"}},{C:"path",G:"ytp-svg-fill",L:{d:"M 24,48 41,36 24,24 V 48 z M 44,24 v 24 h 4 V 24 h -4 z"}}]}]},{C:"span",G:"ytp-upnext-bottom",J:[{C:"span",G:"ytp-upnext-cancel"},
|
|
{C:"span",G:"ytp-upnext-paused",V:"\uc790\ub3d9\uc7ac\uc0dd \uc77c\uc2dc\uc911\uc9c0\ub428"}]}]});this.A=null;var b=this.i["ytp-upnext-cancel"];this.A=new g.W({C:"button",W:["ytp-upnext-cancel-button","ytp-button"],L:{tabindex:"0","aria-label":"\uc790\ub3d9\uc7ac\uc0dd \ucde8\uc18c"},V:"\ucde8\uc18c"});g.B(this,this.A);this.A.da("click",this.HI,this);this.A.g(b);this.l=a;this.I=this.i["ytp-svg-autoplay-ring"];this.D=this.B=this.o=this.u=null;this.F=new g.J(this.dm,5E3,this);g.B(this,this.F);this.H=
|
|
0;this.K(this.i["ytp-upnext-autoplay-icon"],"click",this.uK);this.Wy();this.K(a,"autonavvisibility",this.Wy);this.K(a,"mdxnowautoplaying",this.NJ);this.K(a,"mdxautoplaycanceled",this.OJ);this.K(a,"mdxautoplayupnext",this.sB);3==this.l.getPresentingPlayerType()&&(a=(a=g.KK(g.EK(this.l)))?a.zD():null)&&this.sB(a)},B4=function(a,b){if(!a.o){g.oq("a11y-announce","\ub2e4\uc74c \ub3d9\uc601\uc0c1 "+a.u.title);
|
|
a.H=g.M();a.o=new g.J((0,g.x)(a.vp,a,b),25);a.vp(b);var c=b||g.P(g.X(a.l).experiments,"autoplay_time")||1E4;a.l.la("onAutonavCoundownStarted",c)}g.qo(a.element,"ytp-upnext-autoplay-paused")},D4=function(a){C4(a);
|
|
a.H=g.M();a.vp();g.H(a.element,"ytp-upnext-autoplay-paused")},C4=function(a){a.o&&(a.o.dispose(),a.o=null)},E4=function(a,b){b=void 0===b?!1:b;
|
|
if(g.O(g.X(a.l).experiments,"autonav_notifications")&&b&&window.Notification&&document.hasFocus){var c=Notification.permission;"default"==c?Notification.requestPermission():"granted"!=c||document.hasFocus()||(c=a.u.ua(),a.dm(),a.B=new Notification("\ub2e4\uc74c \ub3d9\uc601\uc0c1",{body:c.title,icon:c.Ac()}),a.D=a.K(a.B,"click",a.mK),a.F.start())}C4(a);a.l.nextVideo(!1,b)},F4=function(a){z4.call(this,a,"subscribecard-endscreen");
|
|
var b=a.getVideoData();this.l=new g.W({C:"div",G:"ytp-subscribe-card",J:[{C:"img",G:"ytp-author-image",L:{src:b.Vd}},{C:"div",G:"ytp-subscribe-card-right",J:[{C:"div",G:"ytp-author-name",V:b.author},{C:"div",G:"html5-subscribe-button-container"}]}]});g.B(this,this.l);this.l.g(this.element);this.o=new g.BW("\uad6c\ub3c5",null,"\uad6c\ub3c5 \ucde8\uc18c",null,!0,!1,b.Uf,b.subscribed,"trailer-endscreen",null,null,a);g.B(this,this.o);this.o.g(this.l.i["html5-subscribe-button-container"]);this.hide()},
|
|
G4=function(a){var b=g.X(a),c=g.qx||g.Ch?{style:"will-change: opacity"}:void 0,d=b.i,e=["ytp-videowall-still"];
|
|
b.g&&e.push("ytp-videowall-show-text");g.W.call(this,{C:"a",W:e,L:{href:"{{url}}",target:d?b.A:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},J:[{C:"div",G:"ytp-videowall-still-image",L:{style:"{{background}}"}},{C:"span",G:"ytp-videowall-still-info",J:[{C:"span",G:"ytp-videowall-still-info-bg",J:[{C:"span",G:"ytp-videowall-still-info-content",L:c,J:[{C:"span",G:"ytp-videowall-still-info-title",V:"{{title}}"},{C:"span",G:"ytp-videowall-still-info-author",
|
|
V:"{{author_and_views}}"},{C:"span",G:"ytp-videowall-still-info-live",V:"\uc2e4\uc2dc\uac04"},{C:"span",G:"ytp-videowall-still-info-duration",V:"{{duration}}"}]}]}]},{C:"span",W:["ytp-videowall-still-listlabel-regular","ytp-videowall-still-listlabel"],J:[{C:"span",G:"ytp-videowall-still-listlabel-icon"},"\uc7ac\uc0dd\ubaa9\ub85d",{C:"span",G:"ytp-videowall-still-listlabel-length",J:[" (",{C:"span",V:"{{playlist_length}}"},")"]}]},{C:"span",W:["ytp-videowall-still-listlabel-mix","ytp-videowall-still-listlabel"],
|
|
J:[{C:"span",G:"ytp-videowall-still-listlabel-mix-icon"},"\uad00\ub828 \uc7ac\uc0dd\ubaa9\ub85d",{C:"span",G:"ytp-videowall-still-listlabel-length",V:" (50+)"}]}]});this.A=d;this.l=a;this.o=null;this.u=new g.Us(this);g.B(this,this.u);this.da("click",this.D);this.da("keypress",this.F);this.u.K(a,"videodatachange",this.B);g.X(a).F&&g.IO(a.app.T,this.element,this);this.B()},H4=function(a){g.$K(a.l,a.element);
|
|
var b=a.o.ua().videoId,c=a.o.getPlaylistId();g.IY(a.l.app,b,a.o.Cb,c,void 0,void 0)},I4=function(a){z4.call(this,a,"videowall-endscreen");
|
|
this.F=a;this.A=0;this.o=[];this.B=this.O=this.u=null;this.D=this.P=!1;this.M=null;this.ca=new g.Us(this);g.B(this,this.ca);this.H=new g.J(g.Qa(g.H,this.element,"ytp-show-tiles"),0);g.B(this,this.H);var b=new g.W({C:"button",W:["ytp-button","ytp-endscreen-previous"],L:{"aria-label":"\uc774\uc804"},J:[g.XP()]});g.B(this,b);b.g(this.element);b.da("click",this.YF,this);this.I=new g.nD({C:"div",G:"ytp-endscreen-content"});g.B(this,this.I);this.I.g(this.element);b=new g.W({C:"button",W:["ytp-button","ytp-endscreen-next"],
|
|
L:{"aria-label":"\ub2e4\uc74c"},J:[g.YP()]});g.B(this,b);b.g(this.element);b.da("click",this.XF,this);this.l=new A4(a);g.B(this,this.l);g.XK(this.player,this.l.element,4);this.hide()},J4=function(a){return g.YK(a.player)&&a.Qu()&&!a.B},K4=function(a,b){return(0,g.ge)(b.suggestions,function(c){c=g.DS(g.X(a.F),c);
|
|
g.B(a,c);return c})},L4=function(a){var b=a.Re();
|
|
b!=a.P&&(a.P=b,a.player.N("autonavvisibility"))},N4=function(a){g.mL.call(this,a);
|
|
this.g=null;this.i=new g.Us(this);g.B(this,this.i);this.l=g.X(a);M4(a)?this.g=new I4(this.player):this.l.Ia?this.g=new F4(this.player):this.g=new z4(this.player);g.B(this,this.g);g.XK(this.player,this.g.element,4);this.qA();this.i.K(a,"videodatachange",this.qA,this);this.i.K(a,g.tE("endscreen"),this.mF,this);this.i.K(a,"crx_endscreen",this.nF,this)},M4=function(a){a=g.X(a);
|
|
return a.Ea&&!a.Ia};
|
|
g.t(z4,g.tD);z4.prototype.create=function(){this.created=!0};
|
|
z4.prototype.destroy=function(){this.created=!1};
|
|
z4.prototype.Qu=function(){return!1};
|
|
z4.prototype.Re=function(){return!1};g.t(A4,g.W);g.h=A4.prototype;g.h.dm=function(){this.B&&(this.F.stop(),this.Na(this.D),this.D=null,this.B.close(),this.B=null)};
|
|
g.h.Wy=function(){g.sD(this,this.l.Re())};
|
|
g.h.mK=function(){window.focus();this.dm()};
|
|
g.h.hide=function(){g.W.prototype.hide.call(this)};
|
|
g.h.vp=function(a){a=a||g.P(g.X(this.l).experiments,"autoplay_time")||1E4;var b=Math.min(g.M()-this.H,a);a=Math.min(b/a,1);this.I.setAttribute("stroke-dashoffset",-211*(a+1));1<=a&&3!=this.l.getPresentingPlayerType()?E4(this,!0):this.o&&this.o.start()};
|
|
g.h.uK=function(a){!g.$d(this.A.element,g.ms(a))&&g.GS(a,this.l)&&E4(this)};
|
|
g.h.HI=function(){g.GK(this.l,!0)};
|
|
g.h.NJ=function(a){this.l.getPresentingPlayerType();this.show();B4(this,a)};
|
|
g.h.sB=function(a){this.l.getPresentingPlayerType();this.u&&this.u.ua().videoId==a.ua().videoId||(this.u=a,y4(this,a,"hqdefault.jpg"))};
|
|
g.h.OJ=function(){this.l.getPresentingPlayerType();C4(this);this.hide()};
|
|
g.h.U=function(){C4(this);this.dm();g.W.prototype.U.call(this)};g.t(F4,z4);g.t(G4,g.W);G4.prototype.D=function(a){g.GS(a,this.l,this.A,this.o.Cb||void 0)&&H4(this)};
|
|
G4.prototype.F=function(a){switch(a.keyCode){case 13:case 32:g.rs(a)||(H4(this),g.qs(a))}};
|
|
G4.prototype.B=function(){var a=this.l.getVideoData(),b=g.X(this.l);this.A=a.Pb?!1:b.i};g.t(I4,z4);g.h=I4.prototype;g.h.create=function(){z4.prototype.create.call(this);var a=this.player.getVideoData();a&&(this.u=K4(this,a),this.O=a);this.Nf();this.ca.K(this.player,"appresize",this.Nf);this.ca.K(this.player,"onVideoAreaChange",this.Nf);this.ca.K(this.player,"videodatachange",this.ZF);this.ca.K(this.player,"autonavchange",this.Fr);this.ca.K(this.player,"autonavcancel",this.WF);a=this.O.autonavState;a!=this.M&&this.Fr(a);this.ca.K(this.element,"transitionend",this.KL)};
|
|
g.h.destroy=function(){g.Ws(this.ca);g.rf(this.o);this.o=[];this.u=null;z4.prototype.destroy.call(this);g.qo(this.element,"ytp-show-tiles");this.H.stop();this.M=this.O.autonavState};
|
|
g.h.Qu=function(){return 1!=this.O.autonavState};
|
|
g.h.show=function(){z4.prototype.show.call(this);g.qo(this.element,"ytp-show-tiles");g.X(this.player).g?g.Eo(this.H):this.H.start();(this.D||this.B&&this.B!=this.O.clientPlaybackNonce)&&g.GK(this.player,!1);J4(this)?(L4(this),2==this.O.autonavState?g.O(g.X(this.player).experiments,"fast_autonav_in_background")&&3==this.player.getVisibilityState()?E4(this.l,!0):B4(this.l):3==this.O.autonavState&&D4(this.l)):(g.GK(this.player,!0),L4(this))};
|
|
g.h.hide=function(){z4.prototype.hide.call(this);D4(this.l);L4(this)};
|
|
g.h.KL=function(a){g.ms(a)==this.element&&this.Nf()};
|
|
g.h.Nf=function(){if(this.u&&this.u.length){g.H(this.element,"ytp-endscreen-paginate");var a=g.OK(this.F,!0),b=g.ID(this.F);b&&(b=b.ec()?48:32,a.width-=2*b);var c=a.width/a.height,d=96/54,e=b=2,f=Math.max(a.width/96,2),k=Math.max(a.height/54,2),l=this.u.length,m=Math.pow(2,2);var n=l*m+(Math.pow(2,2)-m);n+=Math.pow(2,2)-m;for(n-=m;0<n&&(b<f||e<k);){var p=b/2,r=e/2,v=b<=f-2&&n>=r*m,z=e<=k-2&&n>=p*m;if((p+1)/r*d/c>c/(p/(r+1)*d)&&z)n-=p*m,e+=2;else if(v)n-=r*m,b+=2;else if(z)n-=p*m,e+=2;else break}d=
|
|
!1;n>=3*m&&6>=l*m-n&&(4<=e||4<=b)&&(d=!0);m=96*b;n=54*e;c=m/n<c?a.height/n:a.width/m;c=Math.min(c,2);m*=c;n*=c;m*=g.pd(a.width/m||1,1,1.21);n*=g.pd(a.height/n||1,1,1.21);m=Math.floor(Math.min(a.width,m));n=Math.floor(Math.min(a.height,n));a=this.I.element;g.Rh(a,m,n);g.zh(a,{marginLeft:m/-2+"px",marginTop:n/-2+"px"});c=this.l;f=this.u[0];c.u=f;y4(c,f,"hqdefault.jpg");g.I(this.element,"ytp-endscreen-takeover",J4(this));L4(this);m+=4;n+=4;for(f=c=0;f<b;f++)for(k=0;k<e;k++)if(p=c,r=0,d&&f>=b-2&&k>=e-
|
|
2?r=1:0==k%2&&0==f%2&&(2>k&&2>f?0==k&&0==f&&(r=2):r=2),p=g.qd(p+this.A,l),0!=r){v=this.o[c];v||(v=new G4(this.player),this.o[c]=v,a.appendChild(v.element));z=Math.floor(n*k/e);var C=Math.floor(m*f/b),F=Math.floor(n*(k+r)/e)-z-4,E=Math.floor(m*(f+r)/b)-C-4;g.Hh(v.element,C,z);g.Rh(v.element,E,F);g.zh(v.element,"transitionDelay",(k+f)/20+"s");g.I(v.element,"ytp-videowall-still-mini",1==r);g.I(v.element,"ytp-videowall-still-large",2<r);r=v;p=this.u[p];r.o!=p&&(r.o=p,y4(r,p,g.oo(r.element,"ytp-videowall-still-large")?
|
|
"hqdefault.jpg":"mqdefault.jpg"),p=(p=p.Cb)&&p.itct)&&(v=r.l,g.X(v).F&&g.JO(v.app.T,r.element,p));c++}g.I(this.element,"ytp-endscreen-paginate",c<l);for(b=this.o.length-1;b>=c;b--)e=this.o[b],g.Wd(e.element),g.qf(e);this.o.length=c}};
|
|
g.h.ZF=function(){var a=this.player.getVideoData();this.O!=a&&(this.A=0,this.u=K4(this,a),this.O=a,this.Nf())};
|
|
g.h.XF=function(){this.A+=this.o.length;this.Nf()};
|
|
g.h.YF=function(){this.A-=this.o.length;this.Nf()};
|
|
g.h.AE=function(){return!!this.l.o};
|
|
g.h.Fr=function(a){1==a?(this.D=!1,this.B=this.O.clientPlaybackNonce,C4(this.l),this.Fa()&&this.Nf()):(this.D=!0,this.Fa()&&J4(this)&&(2==a?B4(this.l):3==a&&D4(this.l)))};
|
|
g.h.WF=function(a){if(a){for(a=0;a<this.o.length;a++)g.aL(this.F,this.o[a].element,!0);this.Fr(1)}else this.B=null,this.D=!1;this.Nf()};
|
|
g.h.Re=function(){return this.Fa()&&J4(this)};g.t(N4,g.mL);g.h=N4.prototype;g.h.Wk=function(){var a=this.player.getVideoData(),b=!!(a&&a.suggestions&&a.suggestions.length);b=!M4(this.player)||b;a=a.Pc||g.iz(a.Oa);var c=g.hY(this.player.app);return b&&!a&&!c};
|
|
g.h.Re=function(){return this.g.Re()};
|
|
g.h.vE=function(){return this.Re()?this.g.AE():!1};
|
|
g.h.U=function(){g.TK(this.player,"endscreen");g.mL.prototype.U.call(this)};
|
|
g.h.load=function(){g.mL.prototype.load.call(this);this.g.show()};
|
|
g.h.unload=function(){g.mL.prototype.unload.call(this);this.g.hide();this.g.destroy()};
|
|
g.h.mF=function(a){this.Wk()&&(this.g.created||this.g.create(),"load"==a.getId()&&this.load())};
|
|
g.h.nF=function(a){"load"==a.getId()&&this.loaded&&this.unload()};
|
|
g.h.qA=function(){g.TK(this.player,"endscreen");var a=this.player.getVideoData();a=new g.qE(Math.max(1E3*(a.lengthSeconds-10),0),0x8000000000000,{id:"preload",namespace:"endscreen"});g.B(this,a);var b=new g.qE(0x8000000000000,0x8000000000000,{id:"load",priority:6,namespace:"endscreen"});g.B(this,b);g.QK(this.player,[a,b])};g.IV.endscreen=N4;})(_yt_player);
|