shaka-player 4.16.41 → 4.16.42

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.
@@ -934,7 +934,7 @@ W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.keySystem=W.prototype.keySys
934
934
  W.prototype.getNetworkingEngine=W.prototype.Qb;W.prototype.getMediaElement=W.prototype.vf;W.prototype.getManifestType=W.prototype.uh;W.prototype.getLoadMode=W.prototype.xc;W.prototype.resetConfiguration=W.prototype.Dj;W.prototype.getBufferFullness=W.prototype.Zi;W.prototype.getNonDefaultConfiguration=W.prototype.bj;W.prototype.getConfigurationForLowLatency=W.prototype.Lk;W.prototype.getConfiguration=W.prototype.getConfiguration;W.prototype.configurationForLowLatency=W.prototype.zk;
935
935
  W.prototype.configure=W.prototype.configure;W.prototype.releaseAllMutexes=W.prototype.hm;W.prototype.destroyAllPreloads=W.prototype.Vg;W.prototype.preload=W.prototype.preload;W.prototype.detachAndSavePreload=W.prototype.Vi;W.prototype.unloadAndSavePreload=W.prototype.gk;W.prototype.load=W.prototype.load;W.prototype.updateStartTime=W.prototype.Gm;W.prototype.unload=W.prototype.tc;W.prototype.detach=W.prototype.detach;W.prototype.attachCanvas=W.prototype.Ji;W.prototype.attach=W.prototype.Ob;
936
936
  W.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return H(function(k){switch(k.h){case 1:b={};if(!a){k.B(2);break}return k.g(Ei(),3);case 3:b=k.i;case 2:return c=zd(),d=Zk(),e=Wb(),k.g(e.vc(),4);case 4:return f=k.i,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=Br,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};W.isBrowserSupported=Cr;W.setQueueManagerFactory=function(a){tr=a};W.setAdManagerFactory=function(a){sr=a};W.registerSupportPlugin=Ar;W.prototype.destroy=W.prototype.destroy;
937
- var zr=0,pr=1,ms=2,fs=3;W.LoadMode={DESTROYED:zr,NOT_LOADED:pr,MEDIA_SOURCE:ms,SRC_EQUALS:fs};W.version="v4.16.41";var Ys=["4","16"];nd=new function(a){this.g=a;this.i=od;this.h=rd}(new ld(Number(Ys[0]),Number(Ys[1])));var Br=new Map,sr=null,tr=null;function Zs(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function $s(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function at(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.j=this.h.getVolume();this.l=new fd;this.l.u(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.u(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=at.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()};
937
+ var zr=0,pr=1,ms=2,fs=3;W.LoadMode={DESTROYED:zr,NOT_LOADED:pr,MEDIA_SOURCE:ms,SRC_EQUALS:fs};W.version="v4.16.42";var Ys=["4","16"];nd=new function(a){this.g=a;this.i=od;this.h=rd}(new ld(Number(Ys[0]),Number(Ys[1])));var Br=new Map,sr=null,tr=null;function Zs(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function $s(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function at(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.j=this.h.getVolume();this.l=new fd;this.l.u(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.u(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=at.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()};
938
938
  p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return this.g.getSkipTimeOffset()>=0};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};
939
939
  p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.m.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return this.h.getVolume()==0};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){this.h.resize(a,b)};p.setMuted=function(a){(this.m.muted=a)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getTotalAds()};
940
940
  p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};
@@ -950,7 +950,7 @@ function dt(a,b,c){var d=0;b!=null&&(d=b);var e=null;c.attributes.skipoffset&&(e
950
950
  !c.attributes.apiFramework){var h=le(c);if(h){a.push({id:null,groupId:null,startTime:d,endTime:null,uri:h,mimeType:c.attributes.type||null,isSkippable:e!=null,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:b==null,post:b==Infinity,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:g});break}}}}
951
951
  function et(a){var b=[];a=u(ie(a,"vmap:AdBreak"));for(var c=a.next();!c.done;c=a.next()){var d=c.value,e=d.attributes.timeOffset;e&&(c=null,e=="start"?c=null:e=="end"?c=Infinity:c=Vd(e),(d=ne(d,"vmap:AdSource"))&&(d=ne(d,"vmap:AdTagURI"))&&(d=ke(d))&&b.push({time:c,uri:d}))}return b}O("shaka.ads.Utils",bt);bt.ADS_LOADED="ads-loaded";bt.AD_STARTED="ad-started";bt.AD_FIRST_QUARTILE="ad-first-quartile";bt.AD_MIDPOINT="ad-midpoint";bt.AD_THIRD_QUARTILE="ad-third-quartile";bt.AD_COMPLETE="ad-complete";
952
952
  bt.AD_STOPPED="ad-stopped";bt.AD_SKIPPED="ad-skipped";bt.AD_VOLUME_CHANGED="ad-volume-changed";bt.AD_MUTED="ad-muted";bt.AD_PAUSED="ad-paused";bt.AD_RESUMED="ad-resumed";bt.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";bt.CUEPOINTS_CHANGED="ad-cue-points-changed";bt.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";bt.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";bt.AD_CLICKED="ad-clicked";bt.AD_PROGRESS="ad-progress";bt.AD_BUFFERING="ad-buffering";bt.AD_IMPRESSION="ad-impression";
953
- bt.AD_DURATION_CHANGED="ad-duration-changed";bt.AD_CLOSED="ad-closed";bt.AD_LOADED="ad-loaded";bt.ALL_ADS_COMPLETED="all-ads-completed";bt.AD_LINEAR_CHANGED="ad-linear-changed";bt.AD_METADATA="ad-metadata";bt.AD_RECOVERABLE_ERROR="ad-recoverable-error";bt.AD_ERROR="ad-error";bt.AD_BREAK_READY="ad-break-ready";bt.AD_INTERACTION="ad-interaction";bt.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";bt.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";bt.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function ft(a,b,c,d,e){var f=this;this.A=a;this.i=b;this.G=!1;this.C=this.o=null;this.H=NaN;this.l=e;this.j=null;this.h=new fd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.F=new google.ima.AdDisplayContainer(this.A,this.i);this.F.initialize();this.m=new google.ima.AdsLoader(this.F);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.16.41");this.g=null;this.D=d||new google.ima.AdsRenderingSettings;this.h.u(this.m,
953
+ bt.AD_DURATION_CHANGED="ad-duration-changed";bt.AD_CLOSED="ad-closed";bt.AD_LOADED="ad-loaded";bt.ALL_ADS_COMPLETED="all-ads-completed";bt.AD_LINEAR_CHANGED="ad-linear-changed";bt.AD_METADATA="ad-metadata";bt.AD_RECOVERABLE_ERROR="ad-recoverable-error";bt.AD_ERROR="ad-error";bt.AD_BREAK_READY="ad-break-ready";bt.AD_INTERACTION="ad-interaction";bt.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";bt.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";bt.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function ft(a,b,c,d,e){var f=this;this.A=a;this.i=b;this.G=!1;this.C=this.o=null;this.H=NaN;this.l=e;this.j=null;this.h=new fd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.F=new google.ima.AdDisplayContainer(this.A,this.i);this.F.initialize();this.m=new google.ima.AdsLoader(this.F);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.16.42");this.g=null;this.D=d||new google.ima.AdsRenderingSettings;this.h.u(this.m,
954
954
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){gt(f,g)});this.h.u(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){ht(f,g)});this.h.u(this.i,"ended",function(){f.m.contentComplete()});this.h.ra(this.i,"play",function(){f.G=!0})}ft.prototype.configure=function(a){this.o=a};ft.prototype.stop=function(){this.g&&this.g.stop();this.A&&gk(this.A)};
955
955
  ft.prototype.release=function(){this.stop();this.C&&this.C.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.F.destroy()};function ht(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new R("ad-error",b));it(a,null);a.l(new R("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
956
956
  function gt(a,b){a.l(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.D);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.u(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.u(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.D);a.l(new R("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -1066,8 +1066,8 @@ p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!goo
1066
1066
  p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new R("ad-stopped"));this.dispatchEvent(new R("ad-content-attach-requested"));this.m=new Zs};p.requestClientSideAds=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.H=Date.now()/1E3;b.m.requestAds(a)};
1067
1067
  p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.D=a;b.g&&b.g.updateAdsRenderingSettings(b.D)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Lt(a,b,c,function(e){return Zt(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new T(1,10,10005);var d=this.i;c=c===void 0?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Yg,Ot(d,a,b),d.I=c||"",d.P=Date.now()/1E3,a=d.l);return a};
1068
1068
  p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new T(1,10,10005);var b=this.i;b.H=a;b.i(new R("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.h&&this.h.release();this.h=new Xt(a,b,this.o,function(d){return Zt(c,d)});this.h.configure(this.l)};
1069
- p.requestServerSideStream=function(a,b){b=b===void 0?"":b;if(!this.h)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Za('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 overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.16.41";c=this.h;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
1070
- (c.H=!0),c.j=new Yg,c.g.requestStream(a),c.D=b||"",c.G=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new T(1,10,10003);(a.mpt||a.mpv)&&Za('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 overridden.');a.mpt="Shaka Player";a.mpv="v4.16.41";this.h.g.replaceAdTagParameters(a)};
1069
+ p.requestServerSideStream=function(a,b){b=b===void 0?"":b;if(!this.h)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Za('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 overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.16.42";c=this.h;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
1070
+ (c.H=!0),c.j=new Yg,c.g.requestStream(a),c.D=b||"",c.G=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new T(1,10,10003);(a.mpt||a.mpv)&&Za('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 overridden.');a.mpt="Shaka Player";a.mpv="v4.16.42";this.h.g.replaceAdTagParameters(a)};
1071
1071
  p.getServerSideCuePoints=function(){md("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:$s(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
1072
1072
  p.onDashTimedMetadata=function(a){this.h&&a.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&At(this.g,c))};
1073
1073
  p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if(d=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||d=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",d=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=u(c.eventNode.children),m=l.next();!m.done;m=
@@ -1613,7 +1613,7 @@ default:return g.return(!1)}e=!1;f=qE;return f.has(b)?(e=f.get(b),g.B(2)):g.g(ca
1613
1613
  function tE(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,La.apply(0,arguments));b.abort=function(){};return b}}function uE(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1614
1614
  function wE(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return Bf(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return Bf(c)!="mp2t"&&b(c)}}}
1615
1615
  function vE(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return Ef(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return Ef(d)!=a&&c(d)}}}
1616
- function xE(){var a=MediaSource.isTypeSupported;Wb().bk()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(d<0)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});f>=0&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}KD.MediaSource=rE;rE.install=sE;ND(sE);function yE(){}function zE(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=void 0?AE():window.orientation!=void 0&&BE())}function AE(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()});screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}
1616
+ function xE(){var a=MediaSource.isTypeSupported;Wb().bk()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(d<0)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});f>=0&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}KD.MediaSource=rE;rE.install=sE;ND(sE);function yE(){}function zE(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=void 0?AE():window.orientation!=void 0&&BE())}function AE(){var a=Object.getPrototypeOf(screen.orientation);screen.orientation.lock===void 0&&(a.lock=function(){return Promise.resolve()});screen.orientation.unlock===void 0&&(a.unlock=function(){})}
1617
1617
  function BE(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new CE;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new R("change");b.dispatchEvent(c)})}KD.Orientation=yE;yE.install=zE;function CE(){fb.call(this);this.type="";this.angle=0}pa(CE,fb);
1618
1618
  CE.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
1619
1619
  CE.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation&&screen.mozUnlockOrientation()};ND(zE);function DE(){}var EE,FE,GE,HE,IE,JE;