shaka-player 4.9.6 → 4.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -268,13 +268,13 @@ p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.
268
268
  $h(a,d));F(w)}})}
269
269
  function bi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Kc(a.g.keySystem)&&16==g.byteLength&&(Rc()||cd())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Cd(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.fb&&(a.i.delete(b),b.close().catch(function(){}));Th(a)&&
270
270
  (a.l.resolve(),a.M.W(ci))}function xh(a){var b=a.aa,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new T(2,6,6014));a.C.me(Ag(c))}
271
- function di(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H;return O(function(I){if(1==I.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready":c,"com.microsoft.playready.recommendation":c,"com.chromecast.playready":c};
272
- e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(G,N){var L,M,P,R,Q,fa,sa,Ia;return O(function(wa){switch(wa.g){case 1:return ua(wa,2),E(wa,N.createMediaKeys(),4);case 4:xa(wa,3);break;case 2:return ya(wa),wa.return();case 3:M=
273
- (L=N.getConfiguration().sessionTypes)?L.includes("persistent-license"):!1,Vc()&&(M=!1),P=N.getConfiguration().videoCapabilities,R=N.getConfiguration().audioCapabilities,Q={persistentState:M,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(G)&&k.get(G)?Q=k.get(G):k.set(G,Q),(fa=P[0].encryptionScheme)&&!Q.encryptionSchemes.includes(fa)&&Q.encryptionSchemes.push(fa),(sa=P[0].robustness)&&!Q.videoRobustnessLevels.includes(sa)&&Q.videoRobustnessLevels.push(sa),(Ia=R[0].robustness)&&
274
- !Q.audioRobustnessLevels.includes(Ia)&&Q.audioRobustnessLevels.push(Ia),F(wa)}})};m=function(G,N,L,M){var P,R,Q,fa,sa,Ia,wa,Ja,Qa;return O(function(Aa){switch(Aa.g){case 1:ua(Aa,2);P=Ee(g);R=t(P.videoCapabilities);for(Q=R.next();!Q.done;Q=R.next())fa=Q.value,fa.encryptionScheme=N,fa.robustness=L;sa=t(P.audioCapabilities);for(Q=sa.next();!Q.done;Q=sa.next())Ia=Q.value,Ia.encryptionScheme=N,Ia.robustness=M;wa=Ee(P);wa.persistentState="required";wa.sessionTypes=["persistent-license"];Ja=[wa,P];return E(Aa,
275
- navigator.requestMediaKeySystemAccess(G,Ja),4);case 4:return Qa=Aa.h,E(Aa,l(G,Qa),5);case 5:xa(Aa,0);break;case 2:ya(Aa),F(Aa)}})};n=function(G,N,L,M){var P,R,Q;return O(function(fa){switch(fa.g){case 1:return ua(fa,2),P={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:G,video:{encryptionScheme:N,robustness:L},audio:{encryptionScheme:N,robustness:M}}},
276
- E(fa,navigator.mediaCapabilities.decodingInfo(P),4);case 4:return R=fa.h,Q=R.keySystemAccess,E(fa,l(G,Q),5);case 5:xa(fa,0);break;case 2:ya(fa),F(fa)}})};p=t(a);for(q=p.next();!q.done;q=p.next())u=q.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(z=A.value,y=t(a),q=y.next();!q.done;q=y.next())B=q.value,"org.w3.clearkey"===B&&fd()||(v.push(m(B,z,"","")),v.push(n(B,z,"","")));C=t(a);for(q=C.next();!q.done;q=C.next())for(D=q.value,J=t(d[D]||[]),K=J.next();!K.done;K=J.next())H=K.value,
277
- v.push(m(D,null,H,"")),v.push(m(D,null,"",H)),v.push(n(D,null,H,"")),v.push(n(D,null,"",H));return E(I,Promise.all(v),2)}return I.return(Ag(k))})}function ei(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Mc(e)).W(fi)}),ua(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return xa(c,0);ya(c);F(c)})}
271
+ function di(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H;return O(function(I){if(1==I.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
272
+ {contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(G,N){var L,M,P,R,Q,fa,sa,Ia;return O(function(wa){switch(wa.g){case 1:return ua(wa,2),E(wa,N.createMediaKeys(),4);case 4:xa(wa,3);break;case 2:return ya(wa),wa.return();case 3:M=(L=N.getConfiguration().sessionTypes)?L.includes("persistent-license"):
273
+ !1,Vc()&&(M=!1),P=N.getConfiguration().videoCapabilities,R=N.getConfiguration().audioCapabilities,Q={persistentState:M,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(G)&&k.get(G)?Q=k.get(G):k.set(G,Q),(fa=P[0].encryptionScheme)&&!Q.encryptionSchemes.includes(fa)&&Q.encryptionSchemes.push(fa),(sa=P[0].robustness)&&!Q.videoRobustnessLevels.includes(sa)&&Q.videoRobustnessLevels.push(sa),(Ia=R[0].robustness)&&!Q.audioRobustnessLevels.includes(Ia)&&Q.audioRobustnessLevels.push(Ia),
274
+ F(wa)}})};m=function(G,N,L,M){var P,R,Q,fa,sa,Ia,wa,Ja,Qa;return O(function(Aa){switch(Aa.g){case 1:ua(Aa,2);P=Ee(g);R=t(P.videoCapabilities);for(Q=R.next();!Q.done;Q=R.next())fa=Q.value,fa.encryptionScheme=N,fa.robustness=L;sa=t(P.audioCapabilities);for(Q=sa.next();!Q.done;Q=sa.next())Ia=Q.value,Ia.encryptionScheme=N,Ia.robustness=M;wa=Ee(P);wa.persistentState="required";wa.sessionTypes=["persistent-license"];Ja=[wa,P];return E(Aa,navigator.requestMediaKeySystemAccess(G,Ja),4);case 4:return Qa=Aa.h,
275
+ E(Aa,l(G,Qa),5);case 5:xa(Aa,0);break;case 2:ya(Aa),F(Aa)}})};n=function(G,N,L,M){var P,R,Q;return O(function(fa){switch(fa.g){case 1:return ua(fa,2),P={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:G,video:{encryptionScheme:N,robustness:L},audio:{encryptionScheme:N,robustness:M}}},E(fa,navigator.mediaCapabilities.decodingInfo(P),4);case 4:return R=
276
+ fa.h,Q=R.keySystemAccess,E(fa,l(G,Q),5);case 5:xa(fa,0);break;case 2:ya(fa),F(fa)}})};p=t(a);for(q=p.next();!q.done;q=p.next())u=q.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(z=A.value,y=t(a),q=y.next();!q.done;q=y.next())B=q.value,"org.w3.clearkey"===B&&fd()||(v.push(m(B,z,"","")),v.push(n(B,z,"","")));C=t(a);for(q=C.next();!q.done;q=C.next())for(D=q.value,J=t(d[D]||[]),K=J.next();!K.done;K=J.next())H=K.value,v.push(m(D,null,H,"")),v.push(m(D,null,"",H)),v.push(n(D,null,
277
+ H,"")),v.push(n(D,null,"",H));return E(I,Promise.all(v),2)}return I.return(Ag(k))})}function ei(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Mc(e)).W(fi)}),ua(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return xa(c,0);ya(c);F(c)})}
278
278
  function Ah(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return E(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return ua(g,2),a.fa||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,ei(e),5):E(g,e.remove(),5);if(2!=g.g)return xa(g,0);ya(g);F(g)})})),0)})}function gi(a,b){return a.length&&b.length&&a!==b?0<hi(a,b).length:!0}
279
279
  function hi(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
280
280
  f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
@@ -400,8 +400,8 @@ qk.prototype.getDuration=qk.prototype.getDuration;function rk(a,b,c){this.j=c;th
400
400
  function wk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=sk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Li(c,b,a.s.gapDetectionThreshold),
401
401
  null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Sc())e=Math.ceil(100*(e+.01))/100;e>=a.B.sb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function xk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=yk.value().get(b),c.qa(a,b,d))}var yk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function zk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new hb;this.i=new Ak(a);xk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Bk(e,e.j())})}zk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Ck(a){return a.o?a.g.currentTime:a.j()}
402
402
  function Dk(a,b){0<a.g.readyState?Ek(a.i,b):xk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Bk(a,a.j())})}function Bk(a,b){.001>Math.abs(a.g.currentTime-b)?Fk(a):(a.h.qa(a.g,"seeking",function(){Fk(a)}),Ek(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Fk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
403
- function Ak(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ak.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Ek(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ua(.1)};function Gk(a){this.g=a;this.j=!1;this.h=null;this.i=new hb}r=Gk.prototype;r.Ge=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.qa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;xk(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.He=function(a){this.h=this.j?this.h:a};r.Md=function(){return(this.j?this.g.currentTime:this.h)||0};r.cg=function(){return 0};
404
- r.bg=function(){return 0};r.Eg=function(){};
403
+ function Ak(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ak.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Ek(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ua(.1)};function Gk(a){this.h=a;this.j=!1;this.g=null;this.i=new hb}r=Gk.prototype;r.Ge=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.qa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;xk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};r.He=function(a){this.g=this.j?this.g:a};
404
+ r.Md=function(){return(this.j?this.h.currentTime:this.g)||0};r.cg=function(){return 0};r.bg=function(){return 0};r.Eg=function(){};
405
405
  function Hk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Ik(a,c,f);this.j=new vk(a,b.presentationTimeline,c,this.o,f);this.h=new zk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Ck(g.h);h=Jk(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;Dk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
406
406
  g.g.$b():g.g.sb():0>h&&(h=g.g.sb()+h);return Kk(g,Lk(g,h))});this.m=new Mc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ck(g.h),k=g.g.$b(),l=g.g.sb();3>l-k&&(k=l-3);h<k&&(h=Jk(g,h),g.i.currentTime=h)}})}r=Hk.prototype;r.Ge=function(){this.m.Ua(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.He=function(a){Dk(this.h,a)};
407
407
  r.Md=function(){var a=Ck(this.h);return 0<this.i.readyState&&!this.i.paused?Lk(this,a):a};r.cg=function(){return this.o?this.o.o:0};r.bg=function(){return this.j.C};r.Eg=function(){this.j.yf()};function Kk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
@@ -683,14 +683,14 @@ X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=
683
683
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return E(k,di(),3);case 3:b=k.h;case 2:var l={};if(Nc())for(var m in si)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Nc()?!!si[n]:Pc(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(Sd));
684
684
  l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=je(n)?!0:Nc()?mb(n)||(lc(n)?!0:!1):Pc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,kd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=kp;for(h in g)f[h]=g[h]();return k.return(f)}})};
685
685
  X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=fd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Pc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Wn=a};
686
- X.registerSupportPlugin=function(a,b){kp[a]=b};X.prototype.destroy=X.prototype.destroy;var bo=0,Sn=1,Eo=2,Ro=3;X.LoadMode={DESTROYED:bo,NOT_LOADED:Sn,MEDIA_SOURCE:Eo,SRC_EQUALS:Ro};X.version="v4.9.6";var lp=["4","9"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(lp[0]),Number(lp[1])));var kp={},Wn=null;function mp(){this.h=[];this.j=this.i=this.g=0};function np(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new hb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=np.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
686
+ X.registerSupportPlugin=function(a,b){kp[a]=b};X.prototype.destroy=X.prototype.destroy;var bo=0,Sn=1,Eo=2,Ro=3;X.LoadMode={DESTROYED:bo,NOT_LOADED:Sn,MEDIA_SOURCE:Eo,SRC_EQUALS:Ro};X.version="v4.9.7";var lp=["4","9"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(lp[0]),Number(lp[1])));var kp={},Wn=null;function mp(){this.h=[];this.j=this.i=this.g=0};function np(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new hb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=np.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
687
687
  r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
688
688
  r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
689
689
  r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
690
690
  r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",np);np.prototype.release=np.prototype.release;
691
691
  np.prototype.getPodIndex=np.prototype.getPodIndex;np.prototype.getTimeOffset=np.prototype.getTimeOffset;np.prototype.getMediaUrl=np.prototype.getMediaUrl;np.prototype.getAdvertiserName=np.prototype.getAdvertiserName;np.prototype.getCreativeAdId=np.prototype.getCreativeAdId;np.prototype.getAdId=np.prototype.getAdId;np.prototype.getVastMediaWidth=np.prototype.getVastMediaWidth;np.prototype.getVastMediaHeight=np.prototype.getVastMediaHeight;np.prototype.getVastMediaBitrate=np.prototype.getVastMediaBitrate;
692
692
  np.prototype.getDescription=np.prototype.getDescription;np.prototype.getTitle=np.prototype.getTitle;np.prototype.getPositionInSequence=np.prototype.getPositionInSequence;np.prototype.getSequenceLength=np.prototype.getSequenceLength;np.prototype.setMuted=np.prototype.setMuted;np.prototype.resize=np.prototype.resize;np.prototype.isLinear=np.prototype.isLinear;np.prototype.isMuted=np.prototype.isMuted;np.prototype.setVolume=np.prototype.setVolume;np.prototype.getVolume=np.prototype.getVolume;
693
- np.prototype.play=np.prototype.play;np.prototype.pause=np.prototype.pause;np.prototype.skip=np.prototype.skip;np.prototype.canSkipNow=np.prototype.canSkipNow;np.prototype.getTimeUntilSkippable=np.prototype.getTimeUntilSkippable;np.prototype.isSkippable=np.prototype.isSkippable;np.prototype.isPaused=np.prototype.isPaused;np.prototype.getRemainingTime=np.prototype.getRemainingTime;np.prototype.getMinSuggestedDuration=np.prototype.getMinSuggestedDuration;np.prototype.getDuration=np.prototype.getDuration;function op(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.6");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
693
+ np.prototype.play=np.prototype.play;np.prototype.pause=np.prototype.pause;np.prototype.skip=np.prototype.skip;np.prototype.canSkipNow=np.prototype.canSkipNow;np.prototype.getTimeUntilSkippable=np.prototype.getTimeUntilSkippable;np.prototype.isSkippable=np.prototype.isSkippable;np.prototype.isPaused=np.prototype.isPaused;np.prototype.getRemainingTime=np.prototype.getRemainingTime;np.prototype.getMinSuggestedDuration=np.prototype.getMinSuggestedDuration;np.prototype.getDuration=np.prototype.getDuration;function op(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.7");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
694
694
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){pp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){qp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.qa(this.i,"play",function(){f.F=!0})}op.prototype.configure=function(a){this.s=a};op.prototype.stop=function(){this.g&&this.g.stop();this.o&&en(this.o)};
695
695
  op.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function qp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));rp(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
696
696
  function pp(a,b){a.m(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -742,8 +742,8 @@ function Jp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
742
742
  r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);dg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new mp};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
743
743
  r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new wp(a,b,c,function(e){return Kp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Uf,zp(d,a,b),d.H=c||"",d.V=Date.now()/1E3,a=d.l);return a};
744
744
  r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Ip(a,b,this.m,function(d){return Kp(c,d)});this.g.configure(this.l)};
745
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.6";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
746
- (c.G=!0),c.j=new Uf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.6";this.g.g.replaceAdTagParameters(a)};
745
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.7";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
746
+ (c.G=!0),c.j=new Uf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.7";this.g.g.replaceAdTagParameters(a)};
747
747
  r.getServerSideCuePoints=function(){qb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
748
748
  r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
749
749
  function Kp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;