shaka-player 3.3.3 → 3.3.4

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.
@@ -93,8 +93,8 @@ q.Ne=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
93
93
  q.ea=function(a,b,c){a=Rb(a);void 0===c&&(c=bc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=bc||d.set(f,e)});this.h.set(a,d);ac(this);this.dispatchEvent(new O("locale-updated"));return this};q.Ug=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
94
94
  function ac(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Xb:f.Xb},h=g.next()){f.Xb=h.value;e.add(f.Xb);e.add(Wb(f.Xb));h=ib(b.keys(),function(l){return function(m){return Vb(m,l.Xb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=ib(b.keys(),function(l){return function(m){return Wb(m)==l.Xb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
95
95
  c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,cc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function cc(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}N("shaka.ui.Localization",$b);$b.prototype.resolve=$b.prototype.resolve;
96
- $b.prototype.resolveDictionary=$b.prototype.Ug;$b.prototype.insert=$b.prototype.ea;$b.prototype.changeLocale=$b.prototype.Ne;$b.prototype.release=$b.prototype.release;var bc=1;$b.ConflictResolution={USE_OLD:0,USE_NEW:bc};$b.UNKNOWN_LOCALES="unknown-locales";$b.UNKNOWN_LOCALIZATION="unknown-localization";$b.MISSING_LOCALIZATIONS="missing-localizations";$b.LOCALE_CHANGED="locale-changed";$b.LOCALE_UPDATED="locale-updated";var ec={Je:"LIVE",Nh:"MORE_SETTINGS",Bh:"EXIT_LOOP_MODE",Ih:"LANGUAGE",BACK:"BACK",ji:"SKIP_TO_LIVE",jh:"AIRPLAY",Sh:"NOT_APPLICABLE",Fh:"FAST_FORWARD",Ph:"MUTE",Ai:"UNRECOGNIZED_LANGUAGE",$h:"PLAY",Zh:"PICTURE_IN_PICTURE",wh:"ENTER_LOOP_MODE",Th:"OFF",hh:"AD_DURATION",lh:"AUTO_QUALITY",zi:"UNMUTE",di:"REWIND",Jh:"LOOP",bi:"REPLAY",Ch:"EXIT_PICTURE_IN_PICTURE",Uh:"ON",AD_PROGRESS:"AD_PROGRESS",ai:"PLAYBACK_RATE",ph:"CAPTIONS",ih:"AD_TIME",Oh:"MULTIPLE_LANGUAGES",qh:"CAST",gi:"SEEK",Gh:"FULL_SCREEN",
97
- xh:"ENTER_PICTURE_IN_PICTURE",Ci:"VOLUME",Df:"SUBTITLE_FORCED",xi:"UNDETERMINED_LANGUAGE",Yh:"PAUSE",ii:"SKIP_AD",ci:"RESOLUTION",li:"STATISTICS",Ah:"EXIT_FULL_SCREEN"};function fc(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}fc.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function gc(a){return a.h/(1-Math.pow(a.g,a.i))};function hc(){this.h=new fc(2);this.j=new fc(5);this.g=0;this.i=128E3;this.l=16E3}hc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};hc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};hc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(gc(this.h),gc(this.j))};function ic(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function jc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function kc(a,b,c){c||(c=ic);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Dd:d.Dd},e=a.next()){d.Dd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Dd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
96
+ $b.prototype.resolveDictionary=$b.prototype.Ug;$b.prototype.insert=$b.prototype.ea;$b.prototype.changeLocale=$b.prototype.Ne;$b.prototype.release=$b.prototype.release;var bc=1;$b.ConflictResolution={USE_OLD:0,USE_NEW:bc};$b.UNKNOWN_LOCALES="unknown-locales";$b.UNKNOWN_LOCALIZATION="unknown-localization";$b.MISSING_LOCALIZATIONS="missing-localizations";$b.LOCALE_CHANGED="locale-changed";$b.LOCALE_UPDATED="locale-updated";var ec={lh:"AUTO_QUALITY",Ih:"LANGUAGE",ci:"RESOLUTION",Nh:"MORE_SETTINGS",Ph:"MUTE",ai:"PLAYBACK_RATE",zi:"UNMUTE",BACK:"BACK",Df:"SUBTITLE_FORCED",Oh:"MULTIPLE_LANGUAGES",ih:"AD_TIME",AD_PROGRESS:"AD_PROGRESS",wh:"ENTER_LOOP_MODE",gi:"SEEK",$h:"PLAY",Bh:"EXIT_LOOP_MODE",Th:"OFF",li:"STATISTICS",Je:"LIVE",bi:"REPLAY",Ai:"UNRECOGNIZED_LANGUAGE",qh:"CAST",Gh:"FULL_SCREEN",Fh:"FAST_FORWARD",ii:"SKIP_AD",hh:"AD_DURATION",Jh:"LOOP",Zh:"PICTURE_IN_PICTURE",di:"REWIND",xi:"UNDETERMINED_LANGUAGE",xh:"ENTER_PICTURE_IN_PICTURE",
97
+ ph:"CAPTIONS",jh:"AIRPLAY",ji:"SKIP_TO_LIVE",Ah:"EXIT_FULL_SCREEN",Sh:"NOT_APPLICABLE",Ci:"VOLUME",Yh:"PAUSE",Ch:"EXIT_PICTURE_IN_PICTURE",Uh:"ON"};function fc(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}fc.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function gc(a){return a.h/(1-Math.pow(a.g,a.i))};function hc(){this.h=new fc(2);this.j=new fc(5);this.g=0;this.i=128E3;this.l=16E3}hc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};hc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};hc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(gc(this.h),gc(this.j))};function ic(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function jc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function kc(a,b,c){c||(c=ic);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Dd:d.Dd},e=a.next()){d.Dd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Dd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
98
98
  function lc(a,b,c){c||(c=ic);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function mc(a,b,c){this.startTime=a;this.direction=nc;this.endTime=b;this.payload=c;this.region=new oc;this.position=null;this.positionAlign=pc;this.size=0;this.textAlign=qc;this.writingMode=rc;this.lineInterpretation=sc;this.line=null;this.lineHeight="";this.lineAlign=tc;this.displayAlign=uc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=vc;this.fontStyle=wc;this.linePadding=this.letterSpacing=this.fontFamily=
99
99
  "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}mc.prototype.clone=function(){var a=new mc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
100
100
  function xc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!lc(a.nestedCues,b.nestedCues,xc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!lc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",mc);var pc="auto";
@@ -470,13 +470,13 @@ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h
470
470
  zd()?!!ng[p]:Ad(l[p]);c=k;k={};p=r('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",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(","));
471
471
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=zd()?qd(l)?!0:MediaSource.isTypeSupported(l)||hd(l):Ad(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Jm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=el;T.setAdManagerFactory=function(a){Qk=a};T.registerSupportPlugin=function(a,b){Jm[a]=b};T.prototype.destroy=T.prototype.destroy;
472
472
  var Fm="abrstatuschanged",zm="adaptation",wm="buffering",em="downloadfailed",dm="downloadheadersreceived",Cl="drmsessionupdate",Hj="emsg",Gm="error",Im="expirationupdated",kl="loaded",hl="loading",xl="manifestparsed",ul="mediaqualitychanged",bm="metadata",bl="onstatechange",cl="onstateidle",xm="ratechange",Ml="streaming",Dm="textchanged",Em="texttrackvisibility",tl="timelineregionadded",gm="timelineregionenter",hm="timelineregionexit",Bm="trackschanged",ol="unloading",Cm="variantchanged",Km={mh:Fm,
473
- nh:zm,oh:wm,sh:em,uh:dm,vh:Cl,Dh:Hj,Error:Gm,Eh:Im,Kh:"largegap",Lh:kl,Mh:hl,Qh:xl,Rh:ul,Metadata:bm,Wh:bl,Xh:cl,ei:xm,mi:"sessiondata",ni:Ml,oi:Dm,pi:Em,ri:tl,si:gm,ti:hm,wi:Bm,Bi:ol,Di:Cm},dl=0,Nk=1,Ll=2,Xl=3;T.LoadMode={DESTROYED:dl,NOT_LOADED:Nk,MEDIA_SOURCE:Ll,SRC_EQUALS:Xl};T.version="v3.3.3";var Lm=["3","3"];Bb=new function(a){this.g=a;this.i=Cb;this.h=Db}(new zb(Number(Lm[0]),Number(Lm[1])));
473
+ nh:zm,oh:wm,sh:em,uh:dm,vh:Cl,Dh:Hj,Error:Gm,Eh:Im,Kh:"largegap",Lh:kl,Mh:hl,Qh:xl,Rh:ul,Metadata:bm,Wh:bl,Xh:cl,ei:xm,mi:"sessiondata",ni:Ml,oi:Dm,pi:Em,ri:tl,si:gm,ti:hm,wi:Bm,Bi:ol,Di:Cm},dl=0,Nk=1,Ll=2,Xl=3;T.LoadMode={DESTROYED:dl,NOT_LOADED:Nk,MEDIA_SOURCE:Ll,SRC_EQUALS:Xl};T.version="v3.3.4";var Lm=["3","3"];Bb=new function(a){this.g=a;this.i=Cb;this.h=Db}(new zb(Number(Lm[0]),Number(Lm[1])));
474
474
  var Hm=["output-restricted","internal-error"],Jm={},Qk=null,ll={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},pm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
475
475
  ssa:"text/x-ssa",ass:"text/x-ssa"};function Mm(){this.h=[];this.j=this.i=this.g=0};function Nm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new nf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=Nm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
476
476
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
477
477
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};
478
478
  N("shaka.ads.ClientSideAd",Nm);Nm.prototype.release=Nm.prototype.release;Nm.prototype.getPositionInSequence=Nm.prototype.getPositionInSequence;Nm.prototype.getSequenceLength=Nm.prototype.getSequenceLength;Nm.prototype.setMuted=Nm.prototype.setMuted;Nm.prototype.resize=Nm.prototype.resize;Nm.prototype.isLinear=Nm.prototype.isLinear;Nm.prototype.isMuted=Nm.prototype.isMuted;Nm.prototype.setVolume=Nm.prototype.setVolume;Nm.prototype.getVolume=Nm.prototype.getVolume;Nm.prototype.play=Nm.prototype.play;
479
- Nm.prototype.pause=Nm.prototype.pause;Nm.prototype.skip=Nm.prototype.skip;Nm.prototype.canSkipNow=Nm.prototype.canSkipNow;Nm.prototype.getTimeUntilSkippable=Nm.prototype.getTimeUntilSkippable;Nm.prototype.isSkippable=Nm.prototype.isSkippable;Nm.prototype.isPaused=Nm.prototype.isPaused;Nm.prototype.getRemainingTime=Nm.prototype.getRemainingTime;Nm.prototype.getMinSuggestedDuration=Nm.prototype.getMinSuggestedDuration;Nm.prototype.getDuration=Nm.prototype.getDuration;function Om(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.j=d;this.m=null;this.h=new nf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.3");this.g=null;this.h.La(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Pm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
479
+ Nm.prototype.pause=Nm.prototype.pause;Nm.prototype.skip=Nm.prototype.skip;Nm.prototype.canSkipNow=Nm.prototype.canSkipNow;Nm.prototype.getTimeUntilSkippable=Nm.prototype.getTimeUntilSkippable;Nm.prototype.isSkippable=Nm.prototype.isSkippable;Nm.prototype.isPaused=Nm.prototype.isPaused;Nm.prototype.getRemainingTime=Nm.prototype.getRemainingTime;Nm.prototype.getMinSuggestedDuration=Nm.prototype.getMinSuggestedDuration;Nm.prototype.getDuration=Nm.prototype.getDuration;function Om(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.j=d;this.m=null;this.h=new nf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.4");this.g=null;this.h.La(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Pm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
480
480
  function(f){Qm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Om.prototype.stop=function(){this.g&&this.g.stop();this.A&&Vj(this.A)};Om.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Qm(a,b){b.getError();Rm(a,null);a.j(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
481
481
  function Pm(a,b){a.j(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.j(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Sm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
482
482
  a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){Rm(a,null)}}
@@ -497,8 +497,8 @@ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Vm.prototyp
497
497
  function Wm(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.J)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){db.call(this);this.g=this.i=null;this.h=new Mm;this.j=navigator.language}u(U,db);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.i&&this.i.release();this.i=new Om(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
498
498
  q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new Mm};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.l.requestAds(a)};
499
499
  q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Vm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
500
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ra('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="v3.3.3";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
501
- (c.H=!0),c.j=new Qc,c.g.requestStream(a),c.F=d||"",c.J=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ra('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="v3.3.3";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
500
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ra('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="v3.3.4";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
501
+ (c.H=!0),c.j=new Qc,c.g.requestStream(a),c.F=d||"",c.J=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ra('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="v3.3.4";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
502
502
  q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,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)};N("shaka.ads.AdManager",U);
503
503
  U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
504
504
  U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";