shaka-player 4.8.11 → 4.8.12

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.
@@ -184,9 +184,9 @@ var ff={},qf=0,jf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("ima
184
184
  b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}q=yf.prototype;q.stop=function(){this.u=null;this.l=!1;this.s=[];this.F=1;this.m=this.A=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop();this.j=null};q.release=function(){this.H.release();this.G=null};q.init=function(a){this.u=a};
185
185
  q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.m.clientHeight*d);c=Math.min(c,this.m.clientWidth*d)}var e=this.s.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
186
186
  this.s);d=e;a&&e.length!=this.s.length&&(d=this.s.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=zf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Ef(a);a=u(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=zf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=zf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
187
- a[d];for(var f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.A=Date.now();return c};q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};q.segmentDownloaded=function(a,b,c){this.i.sample(a,b);c&&null!=this.A&&this.l&&Ff(this)};
188
- q.trySuggestStreams=function(){null!=this.A&&this.l&&Ff(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};q.setVariants=function(a){this.s=a};q.playbackRateChanged=function(a){this.F=a};
189
- q.setMediaElement=function(a){var b=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.V(Gf)}),this.h.observe(this.m))};q.setCmsdManager=function(a){this.j=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
187
+ a[d];for(var f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.A=Date.now();return c};q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};
188
+ q.segmentDownloaded=function(a,b,c){this.i.sample(a,b);c&&null!=this.A&&this.l&&Ff(this)};q.trySuggestStreams=function(){null!=this.A&&this.l&&Ff(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};q.setVariants=function(a){this.s=a};
189
+ q.playbackRateChanged=function(a){this.F=a};q.setMediaElement=function(a){var b=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.V(Gf)}),this.h.observe(this.m))};q.setCmsdManager=function(a){this.j=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
190
190
  function Ff(a){if(!a.I){var b=a.i;if(!(b.g>=b.i))return;a.I=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function zf(a,b,c,d,e){if(a.j){var f=a.j.qh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Te(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
191
191
  function Ef(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}N("shaka.abr.SimpleAbrManager",yf);yf.prototype.configure=yf.prototype.configure;yf.prototype.setCmsdManager=yf.prototype.setCmsdManager;yf.prototype.setMediaElement=yf.prototype.setMediaElement;yf.prototype.playbackRateChanged=yf.prototype.playbackRateChanged;yf.prototype.setVariants=yf.prototype.setVariants;
192
192
  yf.prototype.getBandwidthEstimate=yf.prototype.getBandwidthEstimate;yf.prototype.trySuggestStreams=yf.prototype.trySuggestStreams;yf.prototype.segmentDownloaded=yf.prototype.segmentDownloaded;yf.prototype.disable=yf.prototype.disable;yf.prototype.enable=yf.prototype.enable;yf.prototype.chooseVariant=yf.prototype.chooseVariant;yf.prototype.init=yf.prototype.init;yf.prototype.release=yf.prototype.release;yf.prototype.stop=yf.prototype.stop;var Gf=1;N("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});N("shaka.config.CodecSwitchingStrategy",{Uk:"reload",gi:"smooth"});function Hf(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=u(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Hf.prototype.add=function(a,b,c){return If(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
@@ -668,7 +668,7 @@ W.prototype.getVariantTracks=W.prototype.sb;W.prototype.cancelTrickPlay=W.protot
668
668
  W.prototype.isAudioOnly=W.prototype.Yc;W.prototype.isInProgress=W.prototype.zc;W.prototype.isLive=W.prototype.U;W.prototype.getAdManager=W.prototype.ue;W.prototype.getAssetUri=W.prototype.Fd;W.prototype.getNetworkingEngine=W.prototype.dc;W.prototype.getMediaElement=W.prototype.Ui;W.prototype.getManifestType=W.prototype.Yf;W.prototype.getLoadMode=W.prototype.Id;W.prototype.resetConfiguration=W.prototype.Rj;W.prototype.getBufferFullness=W.prototype.nh;W.prototype.getConfiguration=W.prototype.getConfiguration;
669
669
  W.prototype.configure=W.prototype.configure;W.prototype.releaseAllMutexes=W.prototype.Nj;W.prototype.preload=W.prototype.preload;W.prototype.unloadAndSavePreload=W.prototype.ik;W.prototype.load=W.prototype.load;W.prototype.updateStartTime=W.prototype.nk;W.prototype.unload=W.prototype.Ic;W.prototype.detach=W.prototype.detach;W.prototype.attachCanvas=W.prototype.Zg;W.prototype.attach=W.prototype.Pc;
670
670
  W.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?D(h,hi(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(Pb())for(var l in vi)k[l]=!0;l=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Pb()?!!vi[m]:Qb(m);c=k;l='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",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(y(le));
671
- k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=De(m)?!0:Pb()?jd(m)||(ee(m)?!0:!1):Qb(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=lp;for(g in f)e[g]=f[g]();return h.return(e)})};W.isBrowserSupported=eo;W.setAdManagerFactory=function(a){Xn=a};W.registerSupportPlugin=function(a,b){lp[a]=b};W.prototype.destroy=W.prototype.destroy;var co=0,Tn=1,Fo=2,So=3;W.LoadMode={DESTROYED:co,NOT_LOADED:Tn,MEDIA_SOURCE:Fo,SRC_EQUALS:So};W.version="v4.8.11";
671
+ k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=De(m)?!0:Pb()?jd(m)||(ee(m)?!0:!1):Qb(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=lp;for(g in f)e[g]=f[g]();return h.return(e)})};W.isBrowserSupported=eo;W.setAdManagerFactory=function(a){Xn=a};W.registerSupportPlugin=function(a,b){lp[a]=b};W.prototype.destroy=W.prototype.destroy;var co=0,Tn=1,Fo=2,So=3;W.LoadMode={DESTROYED:co,NOT_LOADED:Tn,MEDIA_SOURCE:Fo,SRC_EQUALS:So};W.version="v4.8.12";
672
672
  var mp=["4","8"];od=new function(a){this.g=a;this.i=pd;this.h=qd}(new md(Number(mp[0]),Number(mp[1])));var lp={},Xn=null;function np(){this.h=[];this.j=this.i=this.g=0};function op(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 ed;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=op.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};
673
673
  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)};
674
674
  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)};
@@ -676,7 +676,7 @@ q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.ge
676
676
  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};N("shaka.ads.ClientSideAd",op);op.prototype.release=op.prototype.release;
677
677
  op.prototype.getPodIndex=op.prototype.getPodIndex;op.prototype.getTimeOffset=op.prototype.getTimeOffset;op.prototype.getMediaUrl=op.prototype.getMediaUrl;op.prototype.getAdvertiserName=op.prototype.getAdvertiserName;op.prototype.getCreativeAdId=op.prototype.getCreativeAdId;op.prototype.getAdId=op.prototype.getAdId;op.prototype.getVastMediaWidth=op.prototype.getVastMediaWidth;op.prototype.getVastMediaHeight=op.prototype.getVastMediaHeight;op.prototype.getVastMediaBitrate=op.prototype.getVastMediaBitrate;
678
678
  op.prototype.getDescription=op.prototype.getDescription;op.prototype.getTitle=op.prototype.getTitle;op.prototype.getPositionInSequence=op.prototype.getPositionInSequence;op.prototype.getSequenceLength=op.prototype.getSequenceLength;op.prototype.setMuted=op.prototype.setMuted;op.prototype.resize=op.prototype.resize;op.prototype.isLinear=op.prototype.isLinear;op.prototype.isMuted=op.prototype.isMuted;op.prototype.setVolume=op.prototype.setVolume;op.prototype.getVolume=op.prototype.getVolume;
679
- op.prototype.play=op.prototype.play;op.prototype.pause=op.prototype.pause;op.prototype.skip=op.prototype.skip;op.prototype.canSkipNow=op.prototype.canSkipNow;op.prototype.getTimeUntilSkippable=op.prototype.getTimeUntilSkippable;op.prototype.isSkippable=op.prototype.isSkippable;op.prototype.isPaused=op.prototype.isPaused;op.prototype.getRemainingTime=op.prototype.getRemainingTime;op.prototype.getMinSuggestedDuration=op.prototype.getMinSuggestedDuration;op.prototype.getDuration=op.prototype.getDuration;function pp(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 ed;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.8.11");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,
679
+ op.prototype.play=op.prototype.play;op.prototype.pause=op.prototype.pause;op.prototype.skip=op.prototype.skip;op.prototype.canSkipNow=op.prototype.canSkipNow;op.prototype.getTimeUntilSkippable=op.prototype.getTimeUntilSkippable;op.prototype.isSkippable=op.prototype.isSkippable;op.prototype.isPaused=op.prototype.isPaused;op.prototype.getRemainingTime=op.prototype.getRemainingTime;op.prototype.getMinSuggestedDuration=op.prototype.getMinSuggestedDuration;op.prototype.getDuration=op.prototype.getDuration;function pp(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 ed;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.8.12");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,
680
680
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){qp(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){rp(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.H=!0})}pp.prototype.configure=function(a){this.u=a};pp.prototype.stop=function(){this.g&&this.g.stop();this.s&&Um(this.s)};
681
681
  pp.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 rp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new Q("ad-error",b));sp(a,null);a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
682
682
  function qp(a,b){a.m(new Q("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 Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -727,8 +727,8 @@ function Kp(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
727
727
  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);bb.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 Q("ad-stopped"));this.j=new np};q.requestClientSideAds=function(a){if(!this.i)throw new R(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)};
728
728
  q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new R(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 xp(a,b,c,function(e){return Mp(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new R(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new R(1,10,10004)):(d.l=new fg,Ap(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
729
729
  q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new R(1,10,10005);var b=this.h;b.I=a;b.i(new Q("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 R(2,10,10002);this.g&&this.g.release();this.g=new Jp(a,b,this.m,function(d){return Mp(c,d)});this.g.configure(this.l)};
730
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.8.11";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
731
- (c.I=!0),c.j=new fg,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 R(1,10,10003);(a.mpt||a.mpv)&&Ua('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.8.11";this.g.g.replaceAdTagParameters(a)};
730
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.8.12";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
731
+ (c.I=!0),c.j=new fg,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 R(1,10,10003);(a.mpt||a.mpv)&&Ua('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.8.12";this.g.g.replaceAdTagParameters(a)};
732
732
  q.getServerSideCuePoints=function(){nd("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)};
733
733
  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)};
734
734
  function Mp(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)}N("shaka.ads.AdManager",Lp);Lp.prototype.onCueMetadataChange=Lp.prototype.onCueMetadataChange;Lp.prototype.onHlsTimedMetadata=Lp.prototype.onHlsTimedMetadata;Lp.prototype.onDashTimedMetadata=Lp.prototype.onDashTimedMetadata;Lp.prototype.onManifestUpdated=Lp.prototype.onManifestUpdated;
@@ -960,7 +960,7 @@ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)
960
960
  h&&ov(a);F(m)})};function pv(a,b){return jv(a)?a.L.get(b.type):b.Ie}
961
961
  function kv(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,w,x,A,v,B,z,C,E,J,I,G,H,K,M,O,P,V;return L(function(Y){if(1==Y.g){c=[];d=u(b.ka());for(e=d.next();!e.done;e=d.next())f=e.value,g=new ib(f),h=g.g,b.pe&&(0<=b.Bb&&h.add("_HLS_msn",String(b.Bb)),0<=b.Cb&&h.add("_HLS_part",String(b.Cb))),b.qe&&h.add("_HLS_skip","YES"),Ab(h)&&nb(g,h),c.push(g.toString());return D(Y,hv(a,c,!0),2)}if(3!=Y.g){k=Y.h;if(!b.stream.segmentIndex)return Y.return();l=Tu(a.Ia,k.data);if(1!=l.type)throw new R(2,4,4017);m=k.uri;m==k.originalUri||
962
962
  b.ka().includes(m)||b.Ih.push(m);n=Iu(l.g,"EXT-X-DEFINE");r=qv(a,n,m);p=b.stream;t=pv(a,b);return D(Y,rv(a,l,p.mimeType,b.ka,r),3)}w=Y.h;x=w.keyIds;A=w.drmInfos;v=function(U,Da){return U.size===Da.size&&[].concat(y(U)).every(function(Ja){return Da.has(Ja)})};v(p.keyIds,x)||(p.keyIds=x,p.drmInfos=A,a.i.newDrmInfo(p));B=sv(a,l,p,t,r,b.ka,b.type);z=B.segments;if(C=B.bandwidth)p.bandwidth=C;p.segmentIndex.Sd(z,a.l.Lb());z.length&&(E=Lu(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(J=Ku(l.g,"EXT-X-SKIP"))?Number(X(J,
963
- "SKIPPED-SEGMENTS")):0,G=tv(E,z),H=G.Bb,K=G.Cb,b.Bb=H+I,b.Cb=K,M=t.get(E),p.segmentIndex.fb(M));O=z[0];b.Dc=O.startTime;P=z[z.length-1];b.Vb=P.endTime;if(V=Ku(l.g,"EXT-X-ENDLIST"))b.Ld=!0;uv(a,l);F(Y)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};
963
+ "SKIPPED-SEGMENTS")):0,G=tv(E,z),H=G.Bb,K=G.Cb,b.Bb=H+I,b.Cb=K,M=t.get(E),p.segmentIndex.fb(M));O=p.segmentIndex.g[0]||null;b.Dc=O.startTime;P=z[z.length-1];b.Vb=P.endTime;if(V=Ku(l.g,"EXT-X-ENDLIST"))b.Ld=!0;uv(a,l);F(Y)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};
964
964
  function vv(a,b){for(var c=-1==a.K,d=u(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=pv(a,e);if(f=f.g[0]||null){g=u(g);for(var h=g.next();!h.done;h=g.next()){h=u(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.K=Math.max(a.K,k));e.Gf=k;break}}}}if(!(0>a.K))for(b=u(b),e=b.next();!e.done;e=b.next())if(c=e.value,wv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.K-c.Gf,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),xv(a,
965
965
  c,d)}
966
966
  function yv(a,b){if(Infinity==a.P){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.P=Math.min(a.P,d.h))}}b=a.P;if(Infinity!=b)for(d=u(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!wv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.ka(),"Expect AV sync issues!");else for(xv(a,c,f.h-b-f.startTime),c=u(e),e=c.next();!e.done;e=c.next())e.value.Kg(b)}}}
@@ -1040,8 +1040,8 @@ function bw(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,w,x,A,v,B,z;return L(function(C){
1040
1040
  r));return D(C,a.sa.get(m),3);case 3:p=C.h,l=Ac(p.data);case 2:t="00000000000000000000000000000000";if(!e){C.B(4);break}if(a.ma.has(e)){w=a.ma.get(e);C.B(5);break}x=sl(e.ka(),e.Mb(),e.Jb(),a.g.retryParameters);A=Ag;return D(C,Ov(a,x,A,{type:0}),6);case 6:v=C.h,w=dv(v.data),a.ma.set(e,w);case 5:w&&(t=w);case 4:return B=new Map,B.set(t,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),C.return(Ec(B,z))}})}N("shaka.hls.HlsParser",ev);
1041
1041
  var Mv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},pw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
1042
1042
  vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},aw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new R(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new R(2,4,4041);a=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Dc("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
1043
- "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Fu(a,"URI");b=Zu(b);b=Fb(b.data);c=Dc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=X(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
1044
- b&&(c="cbcs");a=Fu(a,"URI");a=Zu(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vg(a,b,new Set,0);return Dc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},gv="VOD",kw="EVENT",Qv="LIVE",mv={ii:gv,Bk:kw,Jk:Qv};vi["application/x-mpegurl"]=function(){return new ev};vi["application/vnd.apple.mpegurl"]=function(){return new ev};function qw(a){var b=0,c=Kb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function rw(a){if(a=sw(a))a:{a=u(gh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=hh(b.value,"LA_URL")){a=eh(b);break a}a=""}else a="";return a}
1043
+ "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Fu(a,"URI");b=Zu(b.split("?")[0]);b=Fb(b.data);c=Dc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=X(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
1044
+ "SAMPLE-AES"==b&&(c="cbcs");a=Fu(a,"URI");a=Zu(a.split("?")[0]);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vg(a,b,new Set,0);return Dc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},gv="VOD",kw="EVENT",Qv="LIVE",mv={ii:gv,Bk:kw,Jk:Qv};vi["application/x-mpegurl"]=function(){return new ev};vi["application/vnd.apple.mpegurl"]=function(){return new ev};function qw(a){var b=0,c=Kb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function rw(a){if(a=sw(a))a:{a=u(gh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=hh(b.value,"LA_URL")){a=eh(b);break a}a=""}else a="";return a}
1045
1045
  function sw(a){a=yc(eh(a));a=qw(a).filter(function(b){return b.type===tw})[0];if(!a)return null;a=oc(a.value,!0);return(a=Xg(a,"WRMHEADER"))?a:null}var tw=1,uw=(new Map).set("com.microsoft.playready",rw).set("com.microsoft.playready.recommendation",rw).set("com.microsoft.playready.software",rw).set("com.microsoft.playready.hardware",rw);function vw(a){if(!ww){ww=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Jw=Kw("ftyp",b,d,b,c);b=Kw("dref",Lw);Mw=Kw("dinf",b)}this.g=a}
1046
1046
  function Nw(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Kw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Ow+1));m=Math.floor(m%(Ow+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Pw(h,4)),[0,0,0,0],y(Pw(n,4)),y(Pw(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(Pw(k,2)),[0,0],y(Pw(l,
1047
1047
  2)),[0,0]));h=Kw("tkhd",h);k=Kw;n=g.duration*g.timescale;l=Math.floor(n/(Ow+1));n=Math.floor(n%(Ow+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Pw(g.timescale,4)),y(Pw(l,4)),y(Pw(n,4)),y(Pw(m,2)),[0,0]));l=Kw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Qw;break;case "audio":m=Rw}n=Kw("hdlr",m);a:{switch(g.type){case "video":g=Kw("minf",Kw("vmhd",Sw),Mw,Tw(g));break a;