shaka-player 4.8.15 → 4.8.16

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.
@@ -388,8 +388,8 @@ jk.prototype.getDuration=jk.prototype.getDuration;function kk(a,b,c){this.j=c;th
388
388
  function pk(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=lk(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 T("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Fi(c,b,a.s.gapDetectionThreshold),
389
389
  null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Qc())e=Math.ceil(100*(e+.01))/100;e>=a.B.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new T("gapjumped")))}}}};function qk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=rk.value().get(b),c.na(a,b,d))}var rk=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 sk(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 db;this.i=new tk(a);qk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){uk(e,e.j())})}sk.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 vk(a){return a.o?a.g.currentTime:a.j()}
390
390
  function wk(a,b){0<a.g.readyState?xk(a.i,b):qk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){uk(a,a.j())})}function uk(a,b){.001>Math.abs(a.g.currentTime-b)?yk(a):(a.h.na(a.g,"seeking",function(){yk(a)}),xk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function yk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
391
- function tk(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--)})}tk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function xk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Pa(.1)};function zk(a){this.g=a;this.j=!1;this.h=null;this.i=new db}r=zk.prototype;r.we=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;qk(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.xe=function(a){this.h=this.j?this.h:a};r.Dd=function(){return(this.j?this.g.currentTime:this.h)||0};r.Pf=function(){return 0};
392
- r.Of=function(){return 0};r.rg=function(){};
391
+ function tk(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--)})}tk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function xk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Pa(.1)};function zk(a){this.h=a;this.j=!1;this.g=null;this.i=new db}r=zk.prototype;r.we=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;qk(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.xe=function(a){this.g=this.j?this.g:a};
392
+ r.Dd=function(){return(this.j?this.h.currentTime:this.g)||0};r.Pf=function(){return 0};r.Of=function(){return 0};r.rg=function(){};
393
393
  function Ak(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=Bk(a,c,f);this.j=new ok(a,b.presentationTimeline,c,this.o,f);this.h=new sk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=vk(g.h);h=Ck(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;wk(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()?
394
394
  g.g.Wb():g.g.pb():0>h&&(h=g.g.pb()+h);return Dk(g,Ek(g,h))});this.m=new Mc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=vk(g.h),k=g.g.Wb(),l=g.g.pb();3>l-k&&(k=l-3);h<k&&(h=Ck(g,h),g.i.currentTime=h)}})}r=Ak.prototype;r.we=function(){this.m.Pa(.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.xe=function(a){wk(this.h,a)};
395
395
  r.Dd=function(){var a=vk(this.h);return 0<this.i.readyState&&!this.i.paused?Ek(this,a):a};r.Pf=function(){return this.o?this.o.o:0};r.Of=function(){return this.j.C};r.rg=function(){this.j.mf()};function Dk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
@@ -664,14 +664,14 @@ X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prot
664
664
  X.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?C(h,Zh(),3):h.u(2);2!=h.g&&(b=h.h);var k={};if(Nc())for(var l in mi)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]=Nc()?!!mi[m]:Oc(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.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(y(Od));
665
665
  k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=ee(m)?!0:Nc()?kb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=ap;for(g in f)e[g]=f[g]();return h.return(e)})};
666
666
  X.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Rc("Trident/"))return!1;var a=cd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Oc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Nn=a};
667
- X.registerSupportPlugin=function(a,b){ap[a]=b};X.prototype.destroy=X.prototype.destroy;var Tn=0,Jn=1,uo=2,Ho=3;X.LoadMode={DESTROYED:Tn,NOT_LOADED:Jn,MEDIA_SOURCE:uo,SRC_EQUALS:Ho};X.version="v4.8.15";var bp=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(bp[0]),Number(bp[1])));var ap={},Nn=null;function cp(){this.h=[];this.j=this.i=this.g=0};function dp(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 db;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=dp.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};
667
+ X.registerSupportPlugin=function(a,b){ap[a]=b};X.prototype.destroy=X.prototype.destroy;var Tn=0,Jn=1,uo=2,Ho=3;X.LoadMode={DESTROYED:Tn,NOT_LOADED:Jn,MEDIA_SOURCE:uo,SRC_EQUALS:Ho};X.version="v4.8.16";var bp=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(bp[0]),Number(bp[1])));var ap={},Nn=null;function cp(){this.h=[];this.j=this.i=this.g=0};function dp(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 db;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=dp.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};
668
668
  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)};
669
669
  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)};
670
670
  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()};
671
671
  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};P("shaka.ads.ClientSideAd",dp);dp.prototype.release=dp.prototype.release;
672
672
  dp.prototype.getPodIndex=dp.prototype.getPodIndex;dp.prototype.getTimeOffset=dp.prototype.getTimeOffset;dp.prototype.getMediaUrl=dp.prototype.getMediaUrl;dp.prototype.getAdvertiserName=dp.prototype.getAdvertiserName;dp.prototype.getCreativeAdId=dp.prototype.getCreativeAdId;dp.prototype.getAdId=dp.prototype.getAdId;dp.prototype.getVastMediaWidth=dp.prototype.getVastMediaWidth;dp.prototype.getVastMediaHeight=dp.prototype.getVastMediaHeight;dp.prototype.getVastMediaBitrate=dp.prototype.getVastMediaBitrate;
673
673
  dp.prototype.getDescription=dp.prototype.getDescription;dp.prototype.getTitle=dp.prototype.getTitle;dp.prototype.getPositionInSequence=dp.prototype.getPositionInSequence;dp.prototype.getSequenceLength=dp.prototype.getSequenceLength;dp.prototype.setMuted=dp.prototype.setMuted;dp.prototype.resize=dp.prototype.resize;dp.prototype.isLinear=dp.prototype.isLinear;dp.prototype.isMuted=dp.prototype.isMuted;dp.prototype.setVolume=dp.prototype.setVolume;dp.prototype.getVolume=dp.prototype.getVolume;
674
- dp.prototype.play=dp.prototype.play;dp.prototype.pause=dp.prototype.pause;dp.prototype.skip=dp.prototype.skip;dp.prototype.canSkipNow=dp.prototype.canSkipNow;dp.prototype.getTimeUntilSkippable=dp.prototype.getTimeUntilSkippable;dp.prototype.isSkippable=dp.prototype.isSkippable;dp.prototype.isPaused=dp.prototype.isPaused;dp.prototype.getRemainingTime=dp.prototype.getRemainingTime;dp.prototype.getMinSuggestedDuration=dp.prototype.getMinSuggestedDuration;dp.prototype.getDuration=dp.prototype.getDuration;function ep(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 db;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.8.15");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
674
+ dp.prototype.play=dp.prototype.play;dp.prototype.pause=dp.prototype.pause;dp.prototype.skip=dp.prototype.skip;dp.prototype.canSkipNow=dp.prototype.canSkipNow;dp.prototype.getTimeUntilSkippable=dp.prototype.getTimeUntilSkippable;dp.prototype.isSkippable=dp.prototype.isSkippable;dp.prototype.isPaused=dp.prototype.isPaused;dp.prototype.getRemainingTime=dp.prototype.getRemainingTime;dp.prototype.getMinSuggestedDuration=dp.prototype.getMinSuggestedDuration;dp.prototype.getDuration=dp.prototype.getDuration;function ep(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 db;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.8.16");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
675
675
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){fp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){gp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.F=!0})}ep.prototype.configure=function(a){this.s=a};ep.prototype.stop=function(){this.g&&this.g.stop();this.o&&Xm(this.o)};
676
676
  ep.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 gp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new T("ad-error",b));hp(a,null);a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
677
677
  function fp(a,b){a.m(new T("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 T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -722,8 +722,8 @@ function zp(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
722
722
  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);bg.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 T("ad-stopped"));this.j=new cp};r.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.G=Date.now()/1E3;b.l.requestAds(a)};
723
723
  r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new R(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 mp(a,b,c,function(e){return Ap(d,e)})};r.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 Sf,pp(d,a,b),d.H=c||"",d.Y=Date.now()/1E3,a=d.l);return a};
724
724
  r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new R(1,10,10005);var b=this.h;b.G=a;b.i(new T("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 R(2,10,10002);this.g&&this.g.release();this.g=new yp(a,b,this.m,function(d){return Ap(c,d)});this.g.configure(this.l)};
725
- r.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)&&Va('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.15";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
726
- (c.G=!0),c.j=new Sf,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 R(1,10,10003);(a.mpt||a.mpv)&&Va('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.15";this.g.g.replaceAdTagParameters(a)};
725
+ r.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)&&Va('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.16";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
726
+ (c.G=!0),c.j=new Sf,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 R(1,10,10003);(a.mpt||a.mpv)&&Va('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.16";this.g.g.replaceAdTagParameters(a)};
727
727
  r.getServerSideCuePoints=function(){pb("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)};
728
728
  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)};
729
729
  function Ap(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",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;