shaka-player 4.9.2 → 4.9.3
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.
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.debug.js +12 -12
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +10 -10
- package/dist/shaka-player.compiled.map +1 -1
- package/dist/shaka-player.ui.debug.js +15 -15
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +10 -10
- package/dist/shaka-player.ui.map +1 -1
- package/lib/abr/simple_abr_manager.js +19 -1
- package/lib/hls/hls_parser.js +3 -3
- package/lib/player.js +1 -1
- package/package.json +1 -1
package/dist/shaka-player.ui.js
CHANGED
|
@@ -186,9 +186,9 @@ var hf={},sf=0,lf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("ima
|
|
|
186
186
|
b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}q=Af.prototype;q.stop=function(){this.u=null;this.l=!1;this.s=[];this.F=1;this.m=this.A=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop();this.j=null};q.release=function(){this.H.release();this.G=null};q.init=function(a){this.u=a};
|
|
187
187
|
q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.m.clientHeight*d);c=Math.min(c,this.m.clientWidth*d)}var e=this.s.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
|
|
188
188
|
this.s);d=e;a&&e.length!=this.s.length&&(d=this.s.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=Bf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Cf(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Bf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Bf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
189
|
-
a[d];for(var f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.A=Date.now();return c};q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};
|
|
190
|
-
q.trySuggestStreams=function(){null!=this.A&&this.l&&Ef(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};q.setVariants=function(a){this.s=a};
|
|
191
|
-
q.setMediaElement=function(a){var b=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.U(Ff)}),this.h.observe(this.m))};q.setCmsdManager=function(a){this.j=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
189
|
+
a[d];for(var f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.A=Date.now();return c};q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};
|
|
190
|
+
q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.A&&this.l&&Ef(this))};q.trySuggestStreams=function(){null!=this.A&&this.l&&Ef(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};q.setVariants=function(a){this.s=a};
|
|
191
|
+
q.playbackRateChanged=function(a){this.F=a};q.setMediaElement=function(a){var b=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.U(Ff)}),this.h.observe(this.m))};q.setCmsdManager=function(a){this.j=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
192
192
|
function Ef(a){if(!a.I){var b=a.i;if(!(b.g>=b.i))return;a.I=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function Bf(a,b,c,d,e){if(a.j){var f=a.j.Fh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ve(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
193
193
|
function Cf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}P("shaka.abr.SimpleAbrManager",Af);Af.prototype.configure=Af.prototype.configure;Af.prototype.setCmsdManager=Af.prototype.setCmsdManager;Af.prototype.setMediaElement=Af.prototype.setMediaElement;Af.prototype.playbackRateChanged=Af.prototype.playbackRateChanged;Af.prototype.setVariants=Af.prototype.setVariants;
|
|
194
194
|
Af.prototype.getBandwidthEstimate=Af.prototype.getBandwidthEstimate;Af.prototype.trySuggestStreams=Af.prototype.trySuggestStreams;Af.prototype.segmentDownloaded=Af.prototype.segmentDownloaded;Af.prototype.disable=Af.prototype.disable;Af.prototype.enable=Af.prototype.enable;Af.prototype.chooseVariant=Af.prototype.chooseVariant;Af.prototype.init=Af.prototype.init;Af.prototype.release=Af.prototype.release;Af.prototype.stop=Af.prototype.stop;var Ff=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{kl:"reload",wi:"smooth"});function Gf(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Gf.prototype.add=function(a,b,c){return Hf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
@@ -689,14 +689,14 @@ X.prototype.isAudioOnly=X.prototype.ed;X.prototype.isInProgress=X.prototype.Ec;X
|
|
|
689
689
|
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.$j;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.xh;X.prototype.unloadAndSavePreload=X.prototype.zk;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Dk;X.prototype.unload=X.prototype.Oc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.mh;X.prototype.attach=X.prototype.tc;
|
|
690
690
|
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.B(2);break}return E(k,ki(),3);case 3:b=k.h;case 2:var l={};if(Pb())for(var m in zi)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]=Pb()?!!zi[n]:Qb(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",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(me));
|
|
691
691
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Fe(n)?!0:Pb()?kd(n)||(fe(n)?!0:!1):Qb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,lc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=sp;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=ko;X.setAdManagerFactory=function(a){co=a};X.registerSupportPlugin=function(a,b){sp[a]=b};X.prototype.destroy=X.prototype.destroy;var jo=0,Zn=1,Mo=2,Zo=3;
|
|
692
|
-
X.LoadMode={DESTROYED:jo,NOT_LOADED:Zn,MEDIA_SOURCE:Mo,SRC_EQUALS:Zo};X.version="v4.9.
|
|
692
|
+
X.LoadMode={DESTROYED:jo,NOT_LOADED:Zn,MEDIA_SOURCE:Mo,SRC_EQUALS:Zo};X.version="v4.9.3";var tp=["4","9"];pd=new function(a){this.g=a;this.i=qd;this.h=rd}(new nd(Number(tp[0]),Number(tp[1])));var sp={},co=null;function up(){this.h=[];this.j=this.i=this.g=0};function vp(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 fd;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=vp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
693
693
|
q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
694
694
|
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.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)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
695
695
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
696
696
|
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",vp);vp.prototype.release=vp.prototype.release;
|
|
697
697
|
vp.prototype.getPodIndex=vp.prototype.getPodIndex;vp.prototype.getTimeOffset=vp.prototype.getTimeOffset;vp.prototype.getMediaUrl=vp.prototype.getMediaUrl;vp.prototype.getAdvertiserName=vp.prototype.getAdvertiserName;vp.prototype.getCreativeAdId=vp.prototype.getCreativeAdId;vp.prototype.getAdId=vp.prototype.getAdId;vp.prototype.getVastMediaWidth=vp.prototype.getVastMediaWidth;vp.prototype.getVastMediaHeight=vp.prototype.getVastMediaHeight;vp.prototype.getVastMediaBitrate=vp.prototype.getVastMediaBitrate;
|
|
698
698
|
vp.prototype.getDescription=vp.prototype.getDescription;vp.prototype.getTitle=vp.prototype.getTitle;vp.prototype.getPositionInSequence=vp.prototype.getPositionInSequence;vp.prototype.getSequenceLength=vp.prototype.getSequenceLength;vp.prototype.setMuted=vp.prototype.setMuted;vp.prototype.resize=vp.prototype.resize;vp.prototype.isLinear=vp.prototype.isLinear;vp.prototype.isMuted=vp.prototype.isMuted;vp.prototype.setVolume=vp.prototype.setVolume;vp.prototype.getVolume=vp.prototype.getVolume;
|
|
699
|
-
vp.prototype.play=vp.prototype.play;vp.prototype.pause=vp.prototype.pause;vp.prototype.skip=vp.prototype.skip;vp.prototype.canSkipNow=vp.prototype.canSkipNow;vp.prototype.getTimeUntilSkippable=vp.prototype.getTimeUntilSkippable;vp.prototype.isSkippable=vp.prototype.isSkippable;vp.prototype.isPaused=vp.prototype.isPaused;vp.prototype.getRemainingTime=vp.prototype.getRemainingTime;vp.prototype.getMinSuggestedDuration=vp.prototype.getMinSuggestedDuration;vp.prototype.getDuration=vp.prototype.getDuration;function wp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new fd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.s,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.
|
|
699
|
+
vp.prototype.play=vp.prototype.play;vp.prototype.pause=vp.prototype.pause;vp.prototype.skip=vp.prototype.skip;vp.prototype.canSkipNow=vp.prototype.canSkipNow;vp.prototype.getTimeUntilSkippable=vp.prototype.getTimeUntilSkippable;vp.prototype.isSkippable=vp.prototype.isSkippable;vp.prototype.isPaused=vp.prototype.isPaused;vp.prototype.getRemainingTime=vp.prototype.getRemainingTime;vp.prototype.getMinSuggestedDuration=vp.prototype.getMinSuggestedDuration;vp.prototype.getDuration=vp.prototype.getDuration;function wp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new fd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.s,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.3");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,
|
|
700
700
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){xp(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){yp(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.H=!0})}wp.prototype.configure=function(a){this.u=a};wp.prototype.stop=function(){this.g&&this.g.stop();this.s&&$m(this.s)};
|
|
701
701
|
wp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.G.destroy()};function yp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new S("ad-error",b));zp(a,null);a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
702
702
|
function xp(a,b){a.m(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(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.F);a.m(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -748,8 +748,8 @@ function Rp(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
748
748
|
q.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);gb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.j=new up};q.requestClientSideAds=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.I=Date.now()/1E3;b.l.requestAds(a)};
|
|
749
749
|
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Ep(a,b,c,function(e){return Tp(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new U(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new eg,Hp(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
750
750
|
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new U(1,10,10005);var b=this.h;b.I=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.g&&this.g.release();this.g=new Qp(a,b,this.m,function(d){return Tp(c,d)});this.g.configure(this.l)};
|
|
751
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('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.
|
|
752
|
-
(c.I=!0),c.j=new eg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('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.
|
|
751
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('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.3";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
752
|
+
(c.I=!0),c.j=new eg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('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.3";this.g.g.replaceAdTagParameters(a)};
|
|
753
753
|
q.getServerSideCuePoints=function(){od("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
754
754
|
q.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)};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)};
|
|
755
755
|
function Tp(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",Sp);Sp.prototype.onCueMetadataChange=Sp.prototype.onCueMetadataChange;Sp.prototype.onHlsTimedMetadata=Sp.prototype.onHlsTimedMetadata;Sp.prototype.onDashTimedMetadata=Sp.prototype.onDashTimedMetadata;Sp.prototype.onManifestUpdated=Sp.prototype.onManifestUpdated;
|
|
@@ -994,7 +994,7 @@ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)
|
|
|
994
994
|
h&&Cv(a);F(m)})};function Dv(a,b){return xv(a)?a.O.get(b.type):b.Re}
|
|
995
995
|
function yv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,H,K,I,J,G,N,L,M,Q;return O(function(T){if(1==T.g){c=[];d=t(b.P());for(e=d.next();!e.done;e=d.next())f=e.value,g=new mb(f),h=g.g,b.ze&&(0<=b.Fb&&h.add("_HLS_msn",String(b.Fb)),0<=b.Gb&&h.add("_HLS_part",String(b.Gb))),b.Ae&&h.add("_HLS_skip","YES"),Bb(h)&&qb(g,h),c.push(g.toString());return E(T,vv(a,c,!0),2)}if(3!=T.g){k=T.h;if(!b.stream.segmentIndex)return T.return();l=lv(a.La,k.data);if(1!=l.type)throw new U(2,4,4017);m=k.uri;m==k.originalUri||
|
|
996
996
|
b.P().includes(m)||b.Uh.push(m);n=av(l.g,"EXT-X-DEFINE");p=Ev(a,n,m);r=b.stream;u=Dv(a,b);return E(T,Fv(a,l,r.mimeType,b.P,p),3)}v=T.h;w=v.keyIds;A=v.drmInfos;z=function(R,la){return R.size===la.size&&[].concat(x(R)).every(function(za){return la.has(za)})};z(r.keyIds,w)||(r.keyIds=w,r.drmInfos=A,a.h.newDrmInfo(r));y=Gv(a,l,r,u,p,b.P,b.type);B=y.segments;if(C=y.bandwidth)r.bandwidth=C;r.segmentIndex.Zd(B,a.l.Db());B.length&&(D=dv(l.g,"EXT-X-MEDIA-SEQUENCE",0),K=(H=cv(l.g,"EXT-X-SKIP"))?Number(Y(H,
|
|
997
|
-
"SKIPPED-SEGMENTS")):0,I=Hv(D,B),J=I.Fb,G=I.Gb,b.Fb=J+K,b.Gb=G,N=u.get(D),r.segmentIndex.eb(N));L=
|
|
997
|
+
"SKIPPED-SEGMENTS")):0,I=Hv(D,B),J=I.Fb,G=I.Gb,b.Fb=J+K,b.Gb=G,N=u.get(D),r.segmentIndex.eb(N));L=r.segmentIndex.g[0]||null;b.Ic=L.startTime;M=B[B.length-1];b.Xb=M.endTime;if(Q=cv(l.g,"EXT-X-ENDLIST"))b.Rd=!0;Iv(a,l);F(T)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
998
998
|
function Jv(a,b){for(var c=-1==a.K,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=Dv(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.K=Math.max(a.K,k));e.Vf=k;break}}}}if(!(0>a.K))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,Kv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.K-c.Vf,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Lv(a,
|
|
999
999
|
c,d)}
|
|
1000
1000
|
function Mv(a,b){if(Infinity==a.Z){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.Z=Math.min(a.Z,d.h))}}b=a.Z;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!Kv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Xa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.P(),"Expect AV sync issues!");else for(Lv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.$g(b)}}}
|
|
@@ -1075,8 +1075,8 @@ function pw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,y,B;return O(function(C){
|
|
|
1075
1075
|
p));return E(C,a.ya.get(m),3);case 3:r=C.h,l=Bc(r.data);case 2:u="00000000000000000000000000000000";if(!e){C.B(4);break}if(a.oa.has(e)){v=a.oa.get(e);C.B(5);break}w=xl(e.P(),e.Nb(),e.Lb(),a.g.retryParameters);A=zg;return E(C,bw(a,w,A,{type:0}),6);case 6:z=C.h,v=vt(z.data),a.oa.set(e,v);case 5:v&&(u=v);case 4:return y=new Map,y.set(u,l),B="cenc","SAMPLE-AES"==g&&(B="cbcs"),C.return(Fc(y,B))}})}P("shaka.hls.HlsParser",sv);
|
|
1076
1076
|
var $v={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Dw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
1077
1077
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},ow={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new U(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new U(2,4,4041);a=Yu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Ec("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
|
|
1078
|
-
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Yu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Yu(a,"URI");b=rv(b);b=Fb(b.data);c=Ec("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Yu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
|
|
1079
|
-
b&&(c="cbcs");a=Yu(a,"URI");a=rv(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ug(a,b,new Set,0);return Ec("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},uv="VOD",yw="EVENT",dw="LIVE",Av={xi:uv,Ok:yw,Wk:dw};zi["application/x-mpegurl"]=function(){return new sv};zi["application/vnd.apple.mpegurl"]=function(){return new sv};function Ew(a){var b=0,c=Kb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Fw(a){if(a=Gw(a))a:{a=t(gh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=hh(b.value,"LA_URL")){a=eh(b);break a}a=""}else a="";return a}
|
|
1078
|
+
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Yu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Yu(a,"URI");b=rv(b.split("?")[0]);b=Fb(b.data);c=Ec("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Yu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
|
|
1079
|
+
"SAMPLE-AES"==b&&(c="cbcs");a=Yu(a,"URI");a=rv(a.split("?")[0]);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ug(a,b,new Set,0);return Ec("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},uv="VOD",yw="EVENT",dw="LIVE",Av={xi:uv,Ok:yw,Wk:dw};zi["application/x-mpegurl"]=function(){return new sv};zi["application/vnd.apple.mpegurl"]=function(){return new sv};function Ew(a){var b=0,c=Kb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Fw(a){if(a=Gw(a))a:{a=t(gh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=hh(b.value,"LA_URL")){a=eh(b);break a}a=""}else a="";return a}
|
|
1080
1080
|
function Gw(a){a=zc(eh(a));a=Ew(a).filter(function(b){return b.type===Hw})[0];if(!a)return null;a=pc(a.value,!0);return(a=Wg(a,"WRMHEADER"))?a:null}var Hw=1,Iw=(new Map).set("com.microsoft.playready",Fw).set("com.microsoft.playready.recommendation",Fw).set("com.microsoft.playready.software",Fw).set("com.microsoft.playready.hardware",Fw);function Jw(a){if(!Kw){Kw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Lw=Mw("ftyp",b,d,b,c);b=Mw("dref",Zw);$w=Mw("dinf",b)}this.g=a}
|
|
1081
1081
|
function ax(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Mw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(bx+1));m=Math.floor(m%(bx+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(cx(h,4)),[0,0,0,0],x(cx(n,4)),x(cx(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(cx(k,2)),[0,0],x(cx(l,
|
|
1082
1082
|
2)),[0,0]));h=Mw("tkhd",h);k=Mw;n=g.duration*g.timescale;l=Math.floor(n/(bx+1));n=Math.floor(n%(bx+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(cx(g.timescale,4)),x(cx(l,4)),x(cx(n,4)),x(cx(m,2)),[0,0]));l=Mw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=dx;break;case "audio":m=ex}n=Mw("hdlr",m);a:{switch(g.type){case "video":g=Mw("minf",Mw("vmhd",fx),$w,gx(g));break a;
|