shaka-player 3.3.6 → 3.3.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.
@@ -93,8 +93,8 @@ q.Oe=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=Qb(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);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.Vg=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 $b(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(Vb(f.Xb));h=hb(b.keys(),function(l){return function(m){return Ub(m,l.Xb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Vb(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",Zb);Zb.prototype.resolve=Zb.prototype.resolve;
96
- Zb.prototype.resolveDictionary=Zb.prototype.Vg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Oe;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={$h:"PICTURE_IN_PICTURE",Ai:"UNMUTE",AD_PROGRESS:"AD_PROGRESS",Bi:"UNRECOGNIZED_LANGUAGE",Ke:"LIVE",yh:"ENTER_PICTURE_IN_PICTURE",ji:"SKIP_AD",mh:"AUTO_QUALITY",Gh:"FAST_FORWARD",ci:"REPLAY",Jh:"LANGUAGE",qh:"CAPTIONS",Uh:"OFF",Hh:"FULL_SCREEN",ei:"REWIND",Ef:"SUBTITLE_FORCED",xh:"ENTER_LOOP_MODE",mi:"STATISTICS",ii:"SEEK",Di:"VOLUME",Qh:"MUTE",Zh:"PAUSE",ai:"PLAY",ki:"SKIP_TO_LIVE",BACK:"BACK",ih:"AD_DURATION",jh:"AD_TIME",rh:"CAST",Kh:"LOOP",Ph:"MULTIPLE_LANGUAGES",Ch:"EXIT_LOOP_MODE",di:"RESOLUTION",
97
- Vh:"ON",Bh:"EXIT_FULL_SCREEN",bi:"PLAYBACK_RATE",kh:"AIRPLAY",Dh:"EXIT_PICTURE_IN_PICTURE",Th:"NOT_APPLICABLE",Oh:"MORE_SETTINGS",zi:"UNDETERMINED_LANGUAGE"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.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 fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.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)};gc.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)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ed:d.Ed},e=a.next()){d.Ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
96
+ Zb.prototype.resolveDictionary=Zb.prototype.Vg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Oe;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={AD_PROGRESS:"AD_PROGRESS",di:"RESOLUTION",kh:"AIRPLAY",Bh:"EXIT_FULL_SCREEN",Ef:"SUBTITLE_FORCED",Ke:"LIVE",Oh:"MORE_SETTINGS",Zh:"PAUSE",ii:"SEEK",ei:"REWIND",ci:"REPLAY",yh:"ENTER_PICTURE_IN_PICTURE",jh:"AD_TIME",zi:"UNDETERMINED_LANGUAGE",ih:"AD_DURATION",Gh:"FAST_FORWARD",Uh:"OFF",Vh:"ON",$h:"PICTURE_IN_PICTURE",Ph:"MULTIPLE_LANGUAGES",Qh:"MUTE",Ai:"UNMUTE",Dh:"EXIT_PICTURE_IN_PICTURE",mh:"AUTO_QUALITY",Bi:"UNRECOGNIZED_LANGUAGE",ai:"PLAY",Kh:"LOOP",Th:"NOT_APPLICABLE",BACK:"BACK",bi:"PLAYBACK_RATE",
97
+ Ch:"EXIT_LOOP_MODE",ki:"SKIP_TO_LIVE",mi:"STATISTICS",xh:"ENTER_LOOP_MODE",Hh:"FULL_SCREEN",Di:"VOLUME",Jh:"LANGUAGE",qh:"CAPTIONS",rh:"CAST",ji:"SKIP_AD"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.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 fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.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)};gc.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)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ed:d.Ed},e=a.next()){d.Ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
98
98
  function kc(a,b,c){c||(c=hc);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 lc(a,b,c){this.startTime=a;this.direction=mc;this.endTime=b;this.payload=c;this.region=new nc;this.position=null;this.positionAlign=oc;this.size=0;this.textAlign=pc;this.writingMode=qc;this.lineInterpretation=rc;this.line=null;this.lineHeight="";this.lineAlign=sc;this.displayAlign=tc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=uc;this.fontStyle=vc;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}}lc.prototype.clone=function(){var a=new lc(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 wc(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(!kc(a.nestedCues,b.nestedCues,wc))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(!kc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",lc);var oc="auto";
@@ -137,7 +137,7 @@ function ee(a){return"vp9"==a?"vp09.00.10.08":a}function ae(a,b){b.variants=b.va
137
137
  function ie(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
138
138
  function je(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
139
139
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
140
- null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
140
+ null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
141
141
  function ke(a){return{id:a.id,active:!1,type:Mb,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
142
142
  originalTextId:a.originalId,originalImageId:null}}
143
143
  function le(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,
@@ -473,13 +473,13 @@ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h
473
473
  zd()?!!og[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(","));
474
474
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=zd()?qd(l)?!0:MediaSource.isTypeSupported(l)||gd(l):Ad(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Lm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=gl;T.setAdManagerFactory=function(a){Sk=a};T.registerSupportPlugin=function(a,b){Lm[a]=b};T.prototype.destroy=T.prototype.destroy;
475
475
  var Hm="abrstatuschanged",Bm="adaptation",ym="buffering",fm="downloadfailed",em="downloadheadersreceived",El="drmsessionupdate",Ij="emsg",Im="error",Km="expirationupdated",ml="loaded",jl="loading",zl="manifestparsed",wl="mediaqualitychanged",dm="metadata",dl="onstatechange",el="onstateidle",zm="ratechange",Pl="streaming",Fm="textchanged",Gm="texttrackvisibility",vl="timelineregionadded",hm="timelineregionenter",im="timelineregionexit",Dm="trackschanged",ql="unloading",Em="variantchanged",Mm={nh:Hm,
476
- oh:Bm,ph:ym,uh:fm,vh:em,wh:El,Eh:Ij,Error:Im,Fh:Km,Lh:"largegap",Mh:ml,Nh:jl,Rh:zl,Sh:wl,Metadata:dm,Xh:dl,Yh:el,gi:zm,ni:"sessiondata",oi:Pl,pi:Fm,ri:Gm,si:vl,ti:hm,wi:im,xi:Dm,Ci:ql,Ei:Em},fl=0,Pk=1,Nl=2,Zl=3;T.LoadMode={DESTROYED:fl,NOT_LOADED:Pk,MEDIA_SOURCE:Nl,SRC_EQUALS:Zl};T.version="v3.3.6";var Nm=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(Nm[0]),Number(Nm[1])));
476
+ oh:Bm,ph:ym,uh:fm,vh:em,wh:El,Eh:Ij,Error:Im,Fh:Km,Lh:"largegap",Mh:ml,Nh:jl,Rh:zl,Sh:wl,Metadata:dm,Xh:dl,Yh:el,gi:zm,ni:"sessiondata",oi:Pl,pi:Fm,ri:Gm,si:vl,ti:hm,wi:im,xi:Dm,Ci:ql,Ei:Em},fl=0,Pk=1,Nl=2,Zl=3;T.LoadMode={DESTROYED:fl,NOT_LOADED:Pk,MEDIA_SOURCE:Nl,SRC_EQUALS:Zl};T.version="v3.3.7";var Nm=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(Nm[0]),Number(Nm[1])));
477
477
  var Jm=["output-restricted","internal-error"],Lm={},Sk=null,nl={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"},rm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
478
478
  ssa:"text/x-ssa",ass:"text/x-ssa"};function Om(){this.h=[];this.j=this.i=this.g=0};function Pm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new of;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=Pm.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};
479
479
  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()};
480
480
  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};
481
481
  N("shaka.ads.ClientSideAd",Pm);Pm.prototype.release=Pm.prototype.release;Pm.prototype.getPositionInSequence=Pm.prototype.getPositionInSequence;Pm.prototype.getSequenceLength=Pm.prototype.getSequenceLength;Pm.prototype.setMuted=Pm.prototype.setMuted;Pm.prototype.resize=Pm.prototype.resize;Pm.prototype.isLinear=Pm.prototype.isLinear;Pm.prototype.isMuted=Pm.prototype.isMuted;Pm.prototype.setVolume=Pm.prototype.setVolume;Pm.prototype.getVolume=Pm.prototype.getVolume;Pm.prototype.play=Pm.prototype.play;
482
- Pm.prototype.pause=Pm.prototype.pause;Pm.prototype.skip=Pm.prototype.skip;Pm.prototype.canSkipNow=Pm.prototype.canSkipNow;Pm.prototype.getTimeUntilSkippable=Pm.prototype.getTimeUntilSkippable;Pm.prototype.isSkippable=Pm.prototype.isSkippable;Pm.prototype.isPaused=Pm.prototype.isPaused;Pm.prototype.getRemainingTime=Pm.prototype.getRemainingTime;Pm.prototype.getMinSuggestedDuration=Pm.prototype.getMinSuggestedDuration;Pm.prototype.getDuration=Pm.prototype.getDuration;function Qm(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 of;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.6");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Rm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
482
+ Pm.prototype.pause=Pm.prototype.pause;Pm.prototype.skip=Pm.prototype.skip;Pm.prototype.canSkipNow=Pm.prototype.canSkipNow;Pm.prototype.getTimeUntilSkippable=Pm.prototype.getTimeUntilSkippable;Pm.prototype.isSkippable=Pm.prototype.isSkippable;Pm.prototype.isPaused=Pm.prototype.isPaused;Pm.prototype.getRemainingTime=Pm.prototype.getRemainingTime;Pm.prototype.getMinSuggestedDuration=Pm.prototype.getMinSuggestedDuration;Pm.prototype.getDuration=Pm.prototype.getDuration;function Qm(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 of;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.7");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Rm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
483
483
  function(f){Sm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Qm.prototype.stop=function(){this.g&&this.g.stop();this.A&&Wj(this.A)};Qm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Sm(a,b){b.getError();Tm(a,null);a.j(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
484
484
  function Rm(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)))}Um(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
485
485
  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){Tm(a,null)}}
@@ -500,8 +500,8 @@ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Xm.prototyp
500
500
  function Ym(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));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(){cb.call(this);this.g=this.i=null;this.h=new Om;this.j=navigator.language}u(U,cb);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 Qm(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)})};
501
501
  q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.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 Om};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)};
502
502
  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 Xm(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)})};
503
- 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)&&Sa('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.6";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
504
- (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=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)&&Sa('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.6";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
503
+ 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)&&Sa('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.7";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
504
+ (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=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)&&Sa('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.7";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
505
505
  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);
506
506
  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;
507
507
  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";