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.
@@ -275,13 +275,13 @@ p=new U(2,6,6007,n);1==a.i.size?(a.s(p),d&&d.Bb&&d.Bb.reject(p)):(d&&d.Bb&&d.Bb.
275
275
  hi(a,d));F(w)}})}
276
276
  function ji(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(Nb(a.g.keySystem)&&16==g.byteLength&&(Tb()||ec())){h=Kb(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=Dc(g).slice(0,32);a.Y.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Bb&&(a.i.delete(b),b.close().catch(function(){}));ai(a)&&
277
277
  (a.l.resolve(),a.N.U(ki))}function Fh(a){var b=a.Y,c=a.ba;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.s(new U(2,6,6014));a.G.We(Gg(c))}
278
- function li(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,H,K,I;return O(function(J){if(1==J.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};
279
- 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,Q,T,R,la,za,Na;return O(function(Da){switch(Da.g){case 1:return sa(Da,2),E(Da,N.createMediaKeys(),4);case 4:ua(Da,3);break;case 2:return va(Da),Da.return();case 3:M=
280
- (L=N.getConfiguration().sessionTypes)?L.includes("persistent-license"):!1,Xb()&&(M=!1),Q=N.getConfiguration().videoCapabilities,T=N.getConfiguration().audioCapabilities,R={persistentState:M,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(G)&&k.get(G)?R=k.get(G):k.set(G,R),(la=Q[0].encryptionScheme)&&!R.encryptionSchemes.includes(la)&&R.encryptionSchemes.push(la),(za=Q[0].robustness)&&!R.videoRobustnessLevels.includes(za)&&R.videoRobustnessLevels.push(za),(Na=T[0].robustness)&&
281
- !R.audioRobustnessLevels.includes(Na)&&R.audioRobustnessLevels.push(Na),F(Da)}})};m=function(G,N,L,M){var Q,T,R,la,za,Na,Da,Oa,Va;return O(function(Ha){switch(Ha.g){case 1:sa(Ha,2);Q=Re(g);T=t(Q.videoCapabilities);for(R=T.next();!R.done;R=T.next())la=R.value,la.encryptionScheme=N,la.robustness=L;za=t(Q.audioCapabilities);for(R=za.next();!R.done;R=za.next())Na=R.value,Na.encryptionScheme=N,Na.robustness=M;Da=Re(Q);Da.persistentState="required";Da.sessionTypes=["persistent-license"];Oa=[Da,Q];return E(Ha,
282
- navigator.requestMediaKeySystemAccess(G,Oa),4);case 4:return Va=Ha.h,E(Ha,l(G,Va),5);case 5:ua(Ha,0);break;case 2:va(Ha),F(Ha)}})};n=function(G,N,L,M){var Q,T,R;return O(function(la){switch(la.g){case 1:return sa(la,2),Q={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}}},
283
- E(la,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return T=la.h,R=T.keySystemAccess,E(la,l(G,R),5);case 5:ua(la,0);break;case 2:va(la),F(la)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.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),r=y.next();!r.done;r=y.next())B=r.value,"org.w3.clearkey"===B&&hc()||(v.push(m(B,z,"","")),v.push(n(B,z,"","")));C=t(a);for(r=C.next();!r.done;r=C.next())for(D=r.value,H=t(d[D]||[]),K=H.next();!K.done;K=H.next())I=K.value,
284
- v.push(m(D,null,I,"")),v.push(m(D,null,"",I)),v.push(n(D,null,I,"")),v.push(n(D,null,"",I));return E(J,Promise.all(v),2)}return J.return(Gg(k))})}function mi(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Pb(e)).U(ni)}),sa(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);va(c);F(c)})}
278
+ function li(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,H,K,I;return O(function(J){if(1==J.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"'},
279
+ {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,Q,T,R,la,za,Na;return O(function(Da){switch(Da.g){case 1:return sa(Da,2),E(Da,N.createMediaKeys(),4);case 4:ua(Da,3);break;case 2:return va(Da),Da.return();case 3:M=(L=N.getConfiguration().sessionTypes)?L.includes("persistent-license"):
280
+ !1,Xb()&&(M=!1),Q=N.getConfiguration().videoCapabilities,T=N.getConfiguration().audioCapabilities,R={persistentState:M,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(G)&&k.get(G)?R=k.get(G):k.set(G,R),(la=Q[0].encryptionScheme)&&!R.encryptionSchemes.includes(la)&&R.encryptionSchemes.push(la),(za=Q[0].robustness)&&!R.videoRobustnessLevels.includes(za)&&R.videoRobustnessLevels.push(za),(Na=T[0].robustness)&&!R.audioRobustnessLevels.includes(Na)&&R.audioRobustnessLevels.push(Na),
281
+ F(Da)}})};m=function(G,N,L,M){var Q,T,R,la,za,Na,Da,Oa,Va;return O(function(Ha){switch(Ha.g){case 1:sa(Ha,2);Q=Re(g);T=t(Q.videoCapabilities);for(R=T.next();!R.done;R=T.next())la=R.value,la.encryptionScheme=N,la.robustness=L;za=t(Q.audioCapabilities);for(R=za.next();!R.done;R=za.next())Na=R.value,Na.encryptionScheme=N,Na.robustness=M;Da=Re(Q);Da.persistentState="required";Da.sessionTypes=["persistent-license"];Oa=[Da,Q];return E(Ha,navigator.requestMediaKeySystemAccess(G,Oa),4);case 4:return Va=Ha.h,
282
+ E(Ha,l(G,Va),5);case 5:ua(Ha,0);break;case 2:va(Ha),F(Ha)}})};n=function(G,N,L,M){var Q,T,R;return O(function(la){switch(la.g){case 1:return sa(la,2),Q={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(la,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return T=
283
+ la.h,R=T.keySystemAccess,E(la,l(G,R),5);case 5:ua(la,0);break;case 2:va(la),F(la)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.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),r=y.next();!r.done;r=y.next())B=r.value,"org.w3.clearkey"===B&&hc()||(v.push(m(B,z,"","")),v.push(n(B,z,"","")));C=t(a);for(r=C.next();!r.done;r=C.next())for(D=r.value,H=t(d[D]||[]),K=H.next();!K.done;K=H.next())I=K.value,v.push(m(D,null,I,"")),v.push(m(D,null,"",I)),v.push(n(D,null,
284
+ I,"")),v.push(n(D,null,"",I));return E(J,Promise.all(v),2)}return J.return(Gg(k))})}function mi(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Pb(e)).U(ni)}),sa(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);va(c);F(c)})}
285
285
  function Ih(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 sa(g,2),a.ea||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,mi(e),5):E(g,e.remove(),5);if(2!=g.g)return ua(g,0);va(g);F(g)})})),0)})}function oi(a,b){return a.length&&b.length&&a!==b?0<pi(a,b).length:!0}
286
286
  function pi(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||
287
287
  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}
@@ -407,8 +407,8 @@ zk.prototype.getDuration=zk.prototype.getDuration;function Ak(a,b,c){this.j=c;th
407
407
  function Fk(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.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Bk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=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.s++,b.j(new S("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Qi(c,b,a.u.gapDetectionThreshold),
408
408
  null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Ub())e=Math.ceil(100*(e+.01))/100;e>=a.F.Mb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.A(new S("gapjumped")))}}}};function Gk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Hk.value().get(b),c.na(a,b,d))}var Hk=new Mb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ik(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new hd;this.i=new Jk(a);Gk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Kk(e,e.j())})}Ik.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 Lk(a){return a.s?a.g.currentTime:a.j()}
409
409
  function Mk(a,b){0<a.g.readyState?Nk(a.i,b):Gk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Kk(a,a.j())})}function Kk(a,b){.001>Math.abs(a.g.currentTime-b)?Ok(a):(a.h.na(a.g,"seeking",function(){Ok(a)}),Nk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Ok(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
410
- function Jk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Pb(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Jk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Nk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.xa(.1)};function Pk(a){this.g=a;this.j=!1;this.h=null;this.i=new hd}q=Pk.prototype;q.Lf=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Gk(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Mf=function(a){this.h=this.j?this.h:a};q.we=function(){return(this.j?this.g.currentTime:this.h)||0};q.lh=function(){return 0};
411
- q.kh=function(){return 0};q.Sh=function(){};
410
+ function Jk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Pb(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Jk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Nk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.xa(.1)};function Pk(a){this.h=a;this.j=!1;this.g=null;this.i=new hd}q=Pk.prototype;q.Lf=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.na(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;Gk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.Mf=function(a){this.g=this.j?this.g:a};
411
+ q.we=function(){return(this.j?this.h.currentTime:this.g)||0};q.lh=function(){return 0};q.kh=function(){return 0};q.Sh=function(){};
412
412
  function Qk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.s=Rk(a,c,f);this.j=new Ek(a,b.presentationTimeline,c,this.s,f);this.h=new Ik(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Lk(g.h);h=Sk(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Mk(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()?
413
413
  g.g.yc():g.g.Mb():0>h&&(h=g.g.Mb()+h);return Tk(g,Uk(g,h))});this.m=new Pb(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Lk(g.h),k=g.g.yc(),l=g.g.Mb();3>l-k&&(k=l-3);h<k&&(h=Sk(g,h),g.i.currentTime=h)}})}q=Qk.prototype;q.Lf=function(){this.m.xa(.25)};q.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(){}};q.Mf=function(a){Mk(this.h,a)};
414
414
  q.we=function(){var a=Lk(this.h);return 0<this.i.readyState&&!this.i.paused?Uk(this,a):a};q.lh=function(){return this.s?this.s.s:0};q.kh=function(){return this.j.G};q.Sh=function(){this.j.Ig()};function Tk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
@@ -689,14 +689,14 @@ X.prototype.isAudioOnly=X.prototype.ed;X.prototype.isInProgress=X.prototype.Ec;X
689
689
  X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.bk;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.yh;X.prototype.unloadAndSavePreload=X.prototype.Ak;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Ek;X.prototype.unload=X.prototype.Oc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.nh;X.prototype.attach=X.prototype.tc;
690
690
  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.B(2);break}return E(k,li(),3);case 3:b=k.h;case 2:var l={};if(Qb())for(var m in Ai)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]=Qb()?!!Ai[n]:Rb(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(oe));
691
691
  l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=He(n)?!0:Qb()?md(n)||(he(n)?!0:!1):Rb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,oc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=vp;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=no;X.setAdManagerFactory=function(a){go=a};X.registerSupportPlugin=function(a,b){vp[a]=b};X.prototype.destroy=X.prototype.destroy;var mo=0,bo=1,Po=2,bp=3;
692
- X.LoadMode={DESTROYED:mo,NOT_LOADED:bo,MEDIA_SOURCE:Po,SRC_EQUALS:bp};X.version="v4.9.6";var wp=["4","9"];rd=new function(a){this.g=a;this.i=sd;this.h=td}(new pd(Number(wp[0]),Number(wp[1])));var vp={},go=null;function xp(){this.h=[];this.j=this.i=this.g=0};function yp(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 hd;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=yp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
692
+ X.LoadMode={DESTROYED:mo,NOT_LOADED:bo,MEDIA_SOURCE:Po,SRC_EQUALS:bp};X.version="v4.9.7";var wp=["4","9"];rd=new function(a){this.g=a;this.i=sd;this.h=td}(new pd(Number(wp[0]),Number(wp[1])));var vp={},go=null;function xp(){this.h=[];this.j=this.i=this.g=0};function yp(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 hd;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=yp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
693
693
  q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
694
694
  q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.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)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
695
695
  q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
696
696
  q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",yp);yp.prototype.release=yp.prototype.release;
697
697
  yp.prototype.getPodIndex=yp.prototype.getPodIndex;yp.prototype.getTimeOffset=yp.prototype.getTimeOffset;yp.prototype.getMediaUrl=yp.prototype.getMediaUrl;yp.prototype.getAdvertiserName=yp.prototype.getAdvertiserName;yp.prototype.getCreativeAdId=yp.prototype.getCreativeAdId;yp.prototype.getAdId=yp.prototype.getAdId;yp.prototype.getVastMediaWidth=yp.prototype.getVastMediaWidth;yp.prototype.getVastMediaHeight=yp.prototype.getVastMediaHeight;yp.prototype.getVastMediaBitrate=yp.prototype.getVastMediaBitrate;
698
698
  yp.prototype.getDescription=yp.prototype.getDescription;yp.prototype.getTitle=yp.prototype.getTitle;yp.prototype.getPositionInSequence=yp.prototype.getPositionInSequence;yp.prototype.getSequenceLength=yp.prototype.getSequenceLength;yp.prototype.setMuted=yp.prototype.setMuted;yp.prototype.resize=yp.prototype.resize;yp.prototype.isLinear=yp.prototype.isLinear;yp.prototype.isMuted=yp.prototype.isMuted;yp.prototype.setVolume=yp.prototype.setVolume;yp.prototype.getVolume=yp.prototype.getVolume;
699
- yp.prototype.play=yp.prototype.play;yp.prototype.pause=yp.prototype.pause;yp.prototype.skip=yp.prototype.skip;yp.prototype.canSkipNow=yp.prototype.canSkipNow;yp.prototype.getTimeUntilSkippable=yp.prototype.getTimeUntilSkippable;yp.prototype.isSkippable=yp.prototype.isSkippable;yp.prototype.isPaused=yp.prototype.isPaused;yp.prototype.getRemainingTime=yp.prototype.getRemainingTime;yp.prototype.getMinSuggestedDuration=yp.prototype.getMinSuggestedDuration;yp.prototype.getDuration=yp.prototype.getDuration;function zp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new hd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.s,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.6");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,
699
+ yp.prototype.play=yp.prototype.play;yp.prototype.pause=yp.prototype.pause;yp.prototype.skip=yp.prototype.skip;yp.prototype.canSkipNow=yp.prototype.canSkipNow;yp.prototype.getTimeUntilSkippable=yp.prototype.getTimeUntilSkippable;yp.prototype.isSkippable=yp.prototype.isSkippable;yp.prototype.isPaused=yp.prototype.isPaused;yp.prototype.getRemainingTime=yp.prototype.getRemainingTime;yp.prototype.getMinSuggestedDuration=yp.prototype.getMinSuggestedDuration;yp.prototype.getDuration=yp.prototype.getDuration;function zp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new hd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.s,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.7");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,
700
700
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Ap(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Bp(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.H=!0})}zp.prototype.configure=function(a){this.u=a};zp.prototype.stop=function(){this.g&&this.g.stop();this.s&&bn(this.s)};
701
701
  zp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.G.destroy()};function Bp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new S("ad-error",b));Cp(a,null);a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
702
702
  function Ap(a,b){a.m(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(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.F);a.m(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -748,8 +748,8 @@ function Up(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
748
748
  q.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);gb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.j=new xp};q.requestClientSideAds=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.I=Date.now()/1E3;b.l.requestAds(a)};
749
749
  q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Hp(a,b,c,function(e){return Wp(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new U(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new gg,Kp(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
750
750
  q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new U(1,10,10005);var b=this.h;b.I=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.g&&this.g.release();this.g=new Tp(a,b,this.m,function(d){return Wp(c,d)});this.g.configure(this.l)};
751
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('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 U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
752
- (c.I=!0),c.j=new gg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('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)};
751
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('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 U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
752
+ (c.I=!0),c.j=new gg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('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)};
753
753
  q.getServerSideCuePoints=function(){qd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
754
754
  q.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)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
755
755
  function Wp(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)}P("shaka.ads.AdManager",Vp);Vp.prototype.onCueMetadataChange=Vp.prototype.onCueMetadataChange;Vp.prototype.onHlsTimedMetadata=Vp.prototype.onHlsTimedMetadata;Vp.prototype.onDashTimedMetadata=Vp.prototype.onDashTimedMetadata;Vp.prototype.onManifestUpdated=Vp.prototype.onManifestUpdated;