shaka-player 4.9.5 → 4.9.6

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.
@@ -683,14 +683,14 @@ X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=
683
683
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return E(k,di(),3);case 3:b=k.h;case 2:var l={};if(Nc())for(var m in si)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Nc()?!!si[n]:Pc(n);c=l;m='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(x(Sd));
684
684
  l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=je(n)?!0:Nc()?mb(n)||(lc(n)?!0:!1):Pc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,kd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=kp;for(h in g)f[h]=g[h]();return k.return(f)}})};
685
685
  X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=fd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Pc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Wn=a};
686
- X.registerSupportPlugin=function(a,b){kp[a]=b};X.prototype.destroy=X.prototype.destroy;var bo=0,Sn=1,Eo=2,Ro=3;X.LoadMode={DESTROYED:bo,NOT_LOADED:Sn,MEDIA_SOURCE:Eo,SRC_EQUALS:Ro};X.version="v4.9.5";var lp=["4","9"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(lp[0]),Number(lp[1])));var kp={},Wn=null;function mp(){this.h=[];this.j=this.i=this.g=0};function np(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 hb;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=np.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};
686
+ X.registerSupportPlugin=function(a,b){kp[a]=b};X.prototype.destroy=X.prototype.destroy;var bo=0,Sn=1,Eo=2,Ro=3;X.LoadMode={DESTROYED:bo,NOT_LOADED:Sn,MEDIA_SOURCE:Eo,SRC_EQUALS:Ro};X.version="v4.9.6";var lp=["4","9"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(lp[0]),Number(lp[1])));var kp={},Wn=null;function mp(){this.h=[];this.j=this.i=this.g=0};function np(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 hb;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=np.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};
687
687
  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)};
688
688
  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)};
689
689
  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()};
690
690
  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};S("shaka.ads.ClientSideAd",np);np.prototype.release=np.prototype.release;
691
691
  np.prototype.getPodIndex=np.prototype.getPodIndex;np.prototype.getTimeOffset=np.prototype.getTimeOffset;np.prototype.getMediaUrl=np.prototype.getMediaUrl;np.prototype.getAdvertiserName=np.prototype.getAdvertiserName;np.prototype.getCreativeAdId=np.prototype.getCreativeAdId;np.prototype.getAdId=np.prototype.getAdId;np.prototype.getVastMediaWidth=np.prototype.getVastMediaWidth;np.prototype.getVastMediaHeight=np.prototype.getVastMediaHeight;np.prototype.getVastMediaBitrate=np.prototype.getVastMediaBitrate;
692
692
  np.prototype.getDescription=np.prototype.getDescription;np.prototype.getTitle=np.prototype.getTitle;np.prototype.getPositionInSequence=np.prototype.getPositionInSequence;np.prototype.getSequenceLength=np.prototype.getSequenceLength;np.prototype.setMuted=np.prototype.setMuted;np.prototype.resize=np.prototype.resize;np.prototype.isLinear=np.prototype.isLinear;np.prototype.isMuted=np.prototype.isMuted;np.prototype.setVolume=np.prototype.setVolume;np.prototype.getVolume=np.prototype.getVolume;
693
- np.prototype.play=np.prototype.play;np.prototype.pause=np.prototype.pause;np.prototype.skip=np.prototype.skip;np.prototype.canSkipNow=np.prototype.canSkipNow;np.prototype.getTimeUntilSkippable=np.prototype.getTimeUntilSkippable;np.prototype.isSkippable=np.prototype.isSkippable;np.prototype.isPaused=np.prototype.isPaused;np.prototype.getRemainingTime=np.prototype.getRemainingTime;np.prototype.getMinSuggestedDuration=np.prototype.getMinSuggestedDuration;np.prototype.getDuration=np.prototype.getDuration;function op(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 hb;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.9.5");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
693
+ np.prototype.play=np.prototype.play;np.prototype.pause=np.prototype.pause;np.prototype.skip=np.prototype.skip;np.prototype.canSkipNow=np.prototype.canSkipNow;np.prototype.getTimeUntilSkippable=np.prototype.getTimeUntilSkippable;np.prototype.isSkippable=np.prototype.isSkippable;np.prototype.isPaused=np.prototype.isPaused;np.prototype.getRemainingTime=np.prototype.getRemainingTime;np.prototype.getMinSuggestedDuration=np.prototype.getMinSuggestedDuration;np.prototype.getDuration=np.prototype.getDuration;function op(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 hb;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.9.6");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
694
694
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){pp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){qp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.qa(this.i,"play",function(){f.F=!0})}op.prototype.configure=function(a){this.s=a};op.prototype.stop=function(){this.g&&this.g.stop();this.o&&en(this.o)};
695
695
  op.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 qp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));rp(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
696
696
  function pp(a,b){a.m(new U("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 U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -742,8 +742,8 @@ function Jp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
742
742
  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);dg.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 U("ad-stopped"));this.j=new mp};r.requestClientSideAds=function(a){if(!this.i)throw new T(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)};
743
743
  r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(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 wp(a,b,c,function(e){return Kp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Uf,zp(d,a,b),d.H=c||"",d.V=Date.now()/1E3,a=d.l);return a};
744
744
  r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("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 T(2,10,10002);this.g&&this.g.release();this.g=new Ip(a,b,this.m,function(d){return Kp(c,d)});this.g.configure(this.l)};
745
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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.9.5";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
746
- (c.G=!0),c.j=new Uf,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 T(1,10,10003);(a.mpt||a.mpv)&&ab('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.9.5";this.g.g.replaceAdTagParameters(a)};
745
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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.9.6";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
746
+ (c.G=!0),c.j=new Uf,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 T(1,10,10003);(a.mpt||a.mpv)&&ab('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.9.6";this.g.g.replaceAdTagParameters(a)};
747
747
  r.getServerSideCuePoints=function(){qb("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)};
748
748
  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)};
749
749
  function Kp(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)}S("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;
@@ -1111,7 +1111,7 @@ function ux(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandw
1111
1111
  si["application/vnd.ms-sstr+xml"]=function(){return new lx};function vx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=rd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function wx(){}function xx(a,b,c,d,e){var f=new yx;zg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new zx,h={gg:!1,Xg:!1};a=Ax(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Vf(a,function(){h.gg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Xg=!0;g.abort()});k.W(b/1E3);a.finally(function(){k.stop()})}return a}
1112
1112
  function Ax(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:return h=Bx,k=Cx,p=n=0,q=Date.now(),ua(B,2),E(B,h(a,c),4);case 4:l=B.h;f(Dx(l.headers));if("HEAD"==c.method){B.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(C){function D(){var J,K,H;return O(function(I){switch(I.g){case 1:return ua(I,2),E(I,u.read(),4);case 4:J=I.h;xa(I,3);break;case 2:return ya(I),I.return();case 3:if(J.done){I.u(5);break}n+=
1113
1113
  J.value.byteLength;if(!g){I.u(5);break}return E(I,g(J.value),5);case 5:K=Date.now();if(100<K-q||J.done)H=J.done?0:w-n,e(K-q,n-p,H),p=n,q=K;J.done?C.close():(C.enqueue(J.value),D());F(I)}})}D()};new k({start:A});return E(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:xa(B,3);break;case 2:z=ya(B);if(d.gg)throw new T(1,1,7001,a,b);if(d.Xg)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return y=Dx(l.headers),B.return(vx(y,m,l.status,a,l.url,b))}})}
1114
- function Dx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Ex(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",wx);wx.isSupported=Ex;wx.parse=xx;var Bx=window.fetch,zx=window.AbortController,Cx=window.ReadableStream,yx=window.Headers;
1114
+ function Dx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Ex(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",wx);wx.isSupported=Ex;wx.parse=xx;var Bx=window.fetch,zx=window.AbortController,Cx=window.ReadableStream,yx=window.Headers;
1115
1115
  Ex()&&(hg("http",xx,2,!0),hg("https",xx,2,!0),hg("blob",xx,2,!0));function Fx(){}
1116
1116
  function Gx(a,b,c,d,e){var f=new Hx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=Ix(f);e(q);n=!0}};f.onload=function(q){var u=Ix(f),v=f.response;try{d(Date.now()-g,q.loaded-h,0);var w=vx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(q){m(new T(1,
1117
1117
  1,1002,a,q,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(q){var u=Date.now();if(100<u-g||q.lengthComputable&&q.loaded==q.total)d(u-g,q.loaded-h,4==f.readyState?0:q.total-q.loaded),h=q.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Vf(k,function(){f.abort();return Promise.resolve()})}
@@ -1264,10 +1264,10 @@ function EB(a,b,c,d){a=DB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);nul
1264
1264
  function OB(a,b){var c=null;if(PB.test(a)){a=PB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(QB.test(a))c=RB(QB,a);else if(SB.test(a))c=RB(SB,a);else if(TB.test(a))a=TB.exec(a),c=Number(a[1])/b.frameRate;else if(UB.test(a))a=UB.exec(a),c=Number(a[1])/b.g;else if(VB.test(a))c=RB(VB,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
1265
1265
  function RB(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}S("shaka.text.TtmlTextParser",tB);tB.prototype.parseMedia=tB.prototype.parseMedia;tB.prototype.setManifestType=tB.prototype.setManifestType;tB.prototype.setSequenceMode=tB.prototype.setSequenceMode;tB.prototype.parseInit=tB.prototype.parseInit;
1266
1266
  function wB(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1267
- var xB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,KB=/^(\d{1,2}(?:\.\d+)?|100)%$/,JB=/^(\d+px|\d+em|\d*\.?\d+c)$/,yB=/^(\d+)px (\d+)px$/,PB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,QB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,SB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,TB=/^(\d*(?:\.\d*)?)f$/,UB=/^(\d*(?:\.\d*)?)t$/,VB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),IB={left:Ub,center:"center",right:"end",start:Ub,
1267
+ var xB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,KB=/^(\d{1,2}(?:\.\d+)?|100)%$/,JB=/^(\d+px|\d+em|\d*\.?\d+c)$/,yB=/^(\d+)px (\d+)px$/,PB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,QB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,SB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,TB=/^(\d*(?:\.\d*)?)f$/,UB=/^(\d*(?:\.\d*)?)t$/,VB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),IB={left:Ub,center:"center",right:"end",start:Ub,
1268
1268
  end:"end"},HB={left:"line-left",center:"center",right:"line-right"},uB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],vB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],BB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];le["application/ttml+xml"]=function(){return new tB};function WB(){this.g=new tB}WB.prototype.parseInit=function(a){var b=!1;(new Eg).box("moov",Jg).box("trak",Jg).box("mdia",Jg).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};WB.prototype.setSequenceMode=function(){};WB.prototype.setManifestType=function(){};
1269
1269
  WB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Eg).box("mdat",Qg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",WB);WB.prototype.parseMedia=WB.prototype.parseMedia;WB.prototype.setManifestType=WB.prototype.setManifestType;WB.prototype.setSequenceMode=WB.prototype.setSequenceMode;WB.prototype.parseInit=WB.prototype.parseInit;le['application/mp4; codecs="stpp"']=function(){return new WB};
1270
- le['application/mp4; codecs="stpp.ttml"']=function(){return new WB};le['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new WB};le['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new WB};function XB(){this.h=!1;this.g="UNKNOWN"}XB.prototype.parseInit=function(){};XB.prototype.setSequenceMode=function(a){this.h=a};XB.prototype.setManifestType=function(a){this.g=a};
1270
+ le['application/mp4; codecs="stpp.ttml"']=function(){return new WB};le['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new WB};le['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new WB};le['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new WB};le['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new WB};le['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new WB};le['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new WB};function XB(){this.h=!1;this.g="UNKNOWN"}XB.prototype.parseInit=function(){};XB.prototype.setSequenceMode=function(a){this.h=a};XB.prototype.setManifestType=function(a){this.g=a};
1271
1271
  XB.prototype.parseMedia=function(a,b){a=md(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=YB(new jv(a[1]));if(null==a)throw new T(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
1272
1272
  for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new jv(e);var f=new Ob;mv(e);kv(e);for(var g=mv(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
1273
1273
  h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");kv(e);g=mv(e)}b.push(f)}d=new Map;ZB(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=