shaka-player 4.8.11 → 4.8.12
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
|
@@ -174,9 +174,9 @@ var Te={},gf=0,We=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("ima
|
|
|
174
174
|
b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}r=tf.prototype;r.stop=function(){this.s=null;this.o=!1;this.m=[];this.B=1;this.l=this.A=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.j=null};r.release=function(){this.F.release();this.C=null};r.init=function(a){this.s=a};
|
|
175
175
|
r.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.l.clientHeight*d);c=Math.min(c,this.l.clientWidth*d)}var e=this.m.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
|
|
176
176
|
this.m);d=e;a&&e.length!=this.m.length&&(d=this.m.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=uf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=vf(a);a=u(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=uf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=uf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
177
|
-
a[d];for(var f=isNaN(this.B)?1:Math.abs(this.B),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};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
|
|
178
|
-
r.trySuggestStreams=function(){null!=this.A&&this.o&&wf(this)};r.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};r.setVariants=function(a){this.m=a};
|
|
179
|
-
r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.U(xf)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
177
|
+
a[d];for(var f=isNaN(this.B)?1:Math.abs(this.B),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};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
|
|
178
|
+
r.segmentDownloaded=function(a,b,c){this.i.sample(a,b);c&&null!=this.A&&this.o&&wf(this)};r.trySuggestStreams=function(){null!=this.A&&this.o&&wf(this)};r.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};r.setVariants=function(a){this.m=a};
|
|
179
|
+
r.playbackRateChanged=function(a){this.B=a};r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.U(xf)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
180
180
|
function wf(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function uf(a,b,c,d,e){if(a.j){var f=a.j.fg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ge(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
181
181
|
function vf(a){var b=[];a=u(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",tf);tf.prototype.configure=tf.prototype.configure;tf.prototype.setCmsdManager=tf.prototype.setCmsdManager;tf.prototype.setMediaElement=tf.prototype.setMediaElement;tf.prototype.playbackRateChanged=tf.prototype.playbackRateChanged;tf.prototype.setVariants=tf.prototype.setVariants;
|
|
182
182
|
tf.prototype.getBandwidthEstimate=tf.prototype.getBandwidthEstimate;tf.prototype.trySuggestStreams=tf.prototype.trySuggestStreams;tf.prototype.segmentDownloaded=tf.prototype.segmentDownloaded;tf.prototype.disable=tf.prototype.disable;tf.prototype.enable=tf.prototype.enable;tf.prototype.chooseVariant=tf.prototype.chooseVariant;tf.prototype.init=tf.prototype.init;tf.prototype.release=tf.prototype.release;tf.prototype.stop=tf.prototype.stop;var xf=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{ij:"reload",Qg:"smooth"});function yf(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=u(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}yf.prototype.add=function(a,b,c){return zf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
@@ -663,14 +663,14 @@ X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prot
|
|
|
663
663
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?C(h,$h(),3):h.u(2);2!=h.g&&(b=h.h);var k={};if(Nc())for(var l in ni)k[l]=!0;l=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Nc()?!!ni[m]:Oc(m);c=k;l='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(y(Pd));
|
|
664
664
|
k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=fe(m)?!0:Nc()?kb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=ap;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
665
665
|
X.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=ed();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Oc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Nn=a};
|
|
666
|
-
X.registerSupportPlugin=function(a,b){ap[a]=b};X.prototype.destroy=X.prototype.destroy;var Tn=0,Jn=1,uo=2,Ho=3;X.LoadMode={DESTROYED:Tn,NOT_LOADED:Jn,MEDIA_SOURCE:uo,SRC_EQUALS:Ho};X.version="v4.8.
|
|
666
|
+
X.registerSupportPlugin=function(a,b){ap[a]=b};X.prototype.destroy=X.prototype.destroy;var Tn=0,Jn=1,uo=2,Ho=3;X.LoadMode={DESTROYED:Tn,NOT_LOADED:Jn,MEDIA_SOURCE:uo,SRC_EQUALS:Ho};X.version="v4.8.12";var bp=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(bp[0]),Number(bp[1])));var ap={},Nn=null;function cp(){this.h=[];this.j=this.i=this.g=0};function dp(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 eb;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=dp.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};
|
|
667
667
|
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)};
|
|
668
668
|
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)};
|
|
669
669
|
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()};
|
|
670
670
|
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};P("shaka.ads.ClientSideAd",dp);dp.prototype.release=dp.prototype.release;
|
|
671
671
|
dp.prototype.getPodIndex=dp.prototype.getPodIndex;dp.prototype.getTimeOffset=dp.prototype.getTimeOffset;dp.prototype.getMediaUrl=dp.prototype.getMediaUrl;dp.prototype.getAdvertiserName=dp.prototype.getAdvertiserName;dp.prototype.getCreativeAdId=dp.prototype.getCreativeAdId;dp.prototype.getAdId=dp.prototype.getAdId;dp.prototype.getVastMediaWidth=dp.prototype.getVastMediaWidth;dp.prototype.getVastMediaHeight=dp.prototype.getVastMediaHeight;dp.prototype.getVastMediaBitrate=dp.prototype.getVastMediaBitrate;
|
|
672
672
|
dp.prototype.getDescription=dp.prototype.getDescription;dp.prototype.getTitle=dp.prototype.getTitle;dp.prototype.getPositionInSequence=dp.prototype.getPositionInSequence;dp.prototype.getSequenceLength=dp.prototype.getSequenceLength;dp.prototype.setMuted=dp.prototype.setMuted;dp.prototype.resize=dp.prototype.resize;dp.prototype.isLinear=dp.prototype.isLinear;dp.prototype.isMuted=dp.prototype.isMuted;dp.prototype.setVolume=dp.prototype.setVolume;dp.prototype.getVolume=dp.prototype.getVolume;
|
|
673
|
-
dp.prototype.play=dp.prototype.play;dp.prototype.pause=dp.prototype.pause;dp.prototype.skip=dp.prototype.skip;dp.prototype.canSkipNow=dp.prototype.canSkipNow;dp.prototype.getTimeUntilSkippable=dp.prototype.getTimeUntilSkippable;dp.prototype.isSkippable=dp.prototype.isSkippable;dp.prototype.isPaused=dp.prototype.isPaused;dp.prototype.getRemainingTime=dp.prototype.getRemainingTime;dp.prototype.getMinSuggestedDuration=dp.prototype.getMinSuggestedDuration;dp.prototype.getDuration=dp.prototype.getDuration;function ep(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 eb;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.8.
|
|
673
|
+
dp.prototype.play=dp.prototype.play;dp.prototype.pause=dp.prototype.pause;dp.prototype.skip=dp.prototype.skip;dp.prototype.canSkipNow=dp.prototype.canSkipNow;dp.prototype.getTimeUntilSkippable=dp.prototype.getTimeUntilSkippable;dp.prototype.isSkippable=dp.prototype.isSkippable;dp.prototype.isPaused=dp.prototype.isPaused;dp.prototype.getRemainingTime=dp.prototype.getRemainingTime;dp.prototype.getMinSuggestedDuration=dp.prototype.getMinSuggestedDuration;dp.prototype.getDuration=dp.prototype.getDuration;function ep(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 eb;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.8.12");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
674
674
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){fp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){gp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.F=!0})}ep.prototype.configure=function(a){this.s=a};ep.prototype.stop=function(){this.g&&this.g.stop();this.o&&Xm(this.o)};
|
|
675
675
|
ep.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 gp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new T("ad-error",b));hp(a,null);a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
676
676
|
function fp(a,b){a.m(new T("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 T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -721,8 +721,8 @@ function zp(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
721
721
|
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);cg.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 T("ad-stopped"));this.j=new cp};r.requestClientSideAds=function(a){if(!this.i)throw new R(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)};
|
|
722
722
|
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new R(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 mp(a,b,c,function(e){return Ap(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new R(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new R(1,10,10004)):(d.l=new Tf,pp(d,a,b),d.H=c||"",d.Y=Date.now()/1E3,a=d.l);return a};
|
|
723
723
|
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new R(1,10,10005);var b=this.h;b.G=a;b.i(new T("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 R(2,10,10002);this.g&&this.g.release();this.g=new yp(a,b,this.m,function(d){return Ap(c,d)});this.g.configure(this.l)};
|
|
724
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('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.8.
|
|
725
|
-
(c.G=!0),c.j=new Tf,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 R(1,10,10003);(a.mpt||a.mpv)&&Wa('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.8.
|
|
724
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('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.8.12";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
725
|
+
(c.G=!0),c.j=new Tf,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 R(1,10,10003);(a.mpt||a.mpv)&&Wa('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.8.12";this.g.g.replaceAdTagParameters(a)};
|
|
726
726
|
r.getServerSideCuePoints=function(){pb("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)};
|
|
727
727
|
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)};
|
|
728
728
|
function Ap(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",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;
|
|
@@ -953,7 +953,7 @@ r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)
|
|
|
953
953
|
h&&ov(a);F(m)})};function pv(a,b){return jv(a)?a.K.get(b.type):b.$d}
|
|
954
954
|
function kv(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O,S;return L(function(V){if(1==V.g){c=[];d=u(b.$());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Gd&&(0<=b.gb&&h.add("_HLS_msn",String(b.gb)),0<=b.hb&&h.add("_HLS_part",String(b.hb))),b.Hd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return C(V,hv(a,c,!0),2)}if(3!=V.g){k=V.h;if(!b.stream.segmentIndex)return V.return();l=Tu(a.Ra,k.data);if(1!=l.type)throw new R(2,4,4017);m=k.uri;m==k.originalUri||
|
|
955
955
|
b.$().includes(m)||b.ug.push(m);n=Iu(l.g,"EXT-X-DEFINE");q=qv(a,n,m);p=b.stream;t=pv(a,b);return C(V,rv(a,l,p.mimeType,b.$,q),3)}w=V.h;x=w.keyIds;z=w.drmInfos;v=function(Q,wa){return Q.size===wa.size&&[].concat(y(Q)).every(function(Da){return wa.has(Da)})};v(p.keyIds,x)||(p.keyIds=x,p.drmInfos=z,a.i.newDrmInfo(p));B=sv(a,l,p,t,q,b.$,b.type);A=B.segments;if(D=B.bandwidth)p.bandwidth=D;p.segmentIndex.kd(A,a.l.qb());A.length&&(G=Lu(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(J=Ku(l.g,"EXT-X-SKIP"))?Number(Z(J,
|
|
956
|
-
"SKIPPED-SEGMENTS")):0,E=tv(G,A),H=E.gb,K=E.hb,b.gb=H+I,b.hb=K,M=t.get(G),p.segmentIndex.Ia(M));N=
|
|
956
|
+
"SKIPPED-SEGMENTS")):0,E=tv(G,A),H=E.gb,K=E.hb,b.gb=H+I,b.hb=K,M=t.get(G),p.segmentIndex.Ia(M));N=p.segmentIndex.g[0]||null;b.cc=N.startTime;O=A[A.length-1];b.yb=O.endTime;if(S=Ku(l.g,"EXT-X-ENDLIST"))b.fd=!0;uv(a,l);F(V)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
957
957
|
function vv(a,b){for(var c=-1==a.I,d=u(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=pv(a,e);if(f=f.g[0]||null){g=u(g);for(var h=g.next();!h.done;h=g.next()){h=u(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.Ee=k;break}}}}if(!(0>a.I))for(b=u(b),e=b.next();!e.done;e=b.next())if(c=e.value,wv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.I-c.Ee,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),xv(a,
|
|
958
958
|
c,d)}
|
|
959
959
|
function yv(a,b){if(Infinity==a.T){b=u(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.T=Math.min(a.T,d.h))}}b=a.T;if(Infinity!=b)for(d=u(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!wv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$(),"Expect AV sync issues!");else for(xv(a,c,f.h-b-f.startTime),c=u(e),e=c.next();!e.done;e=c.next())e.value.Hf(b)}}}
|
|
@@ -1033,8 +1033,8 @@ function bw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A;return L(function(D){
|
|
|
1033
1033
|
q));return C(D,a.ia.get(m),3);case 3:p=D.h,l=Ad(p.data);case 2:t="00000000000000000000000000000000";if(!e){D.u(4);break}if(a.pa.has(e)){w=a.pa.get(e);D.u(5);break}x=jl(e.$(),e.Yb(),e.Vb(),a.g.retryParameters);z=qg;return C(D,Ov(a,x,z,{type:0}),6);case 6:v=D.h,w=dv(v.data),a.pa.set(e,w);case 5:w&&(t=w);case 4:return B=new Map,B.set(t,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),D.return(Gd(B,A))}})}P("shaka.hls.HlsParser",ev);
|
|
1034
1034
|
var Mv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},pw={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",
|
|
1035
1035
|
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"}},aw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new R(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new R(2,4,4041);a=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Fd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
|
|
1036
|
-
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Fu(a,"URI");b=Zu(b);b=Ab(b.data);c=Fd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
|
|
1037
|
-
b&&(c="cbcs");a=Fu(a,"URI");a=Zu(a);a=Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Qg(a,b,new Set,0);return Fd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},gv="VOD",kw="EVENT",Qv="LIVE",mv={Rg:gv,Qi:kw,Yi:Qv};ni["application/x-mpegurl"]=function(){return new ev};ni["application/vnd.apple.mpegurl"]=function(){return new ev};function qw(a){var b=0,c=Eb(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=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function rw(a){if(a=sw(a))a:{a=u(ah(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=bh(b.value,"LA_URL")){a=Zg(b);break a}a=""}else a="";return a}
|
|
1036
|
+
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Fu(a,"URI");b=Zu(b.split("?")[0]);b=Ab(b.data);c=Fd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
|
|
1037
|
+
"SAMPLE-AES"==b&&(c="cbcs");a=Fu(a,"URI");a=Zu(a.split("?")[0]);a=Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Qg(a,b,new Set,0);return Fd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},gv="VOD",kw="EVENT",Qv="LIVE",mv={Rg:gv,Qi:kw,Yi:Qv};ni["application/x-mpegurl"]=function(){return new ev};ni["application/vnd.apple.mpegurl"]=function(){return new ev};function qw(a){var b=0,c=Eb(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=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function rw(a){if(a=sw(a))a:{a=u(ah(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=bh(b.value,"LA_URL")){a=Zg(b);break a}a=""}else a="";return a}
|
|
1038
1038
|
function sw(a){a=wd(Zg(a));a=qw(a).filter(function(b){return b.type===tw})[0];if(!a)return null;a=md(a.value,!0);return(a=Sg(a,"WRMHEADER"))?a:null}var tw=1,uw=(new Map).set("com.microsoft.playready",rw).set("com.microsoft.playready.recommendation",rw).set("com.microsoft.playready.software",rw).set("com.microsoft.playready.hardware",rw);function vw(a){if(!ww){ww=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);xw=yw("ftyp",b,d,b,c);b=yw("dref",zw);Aw=yw("dinf",b)}this.g=a}
|
|
1039
1039
|
function Bw(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=yw;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/(Cw+1));m=Math.floor(m%(Cw+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(y(Dw(h,4)),[0,0,0,0],y(Dw(n,4)),y(Dw(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],y(Dw(k,2)),[0,0],y(Dw(l,
|
|
1040
1040
|
2)),[0,0]));h=yw("tkhd",h);k=yw;n=g.duration*g.timescale;l=Math.floor(n/(Cw+1));n=Math.floor(n%(Cw+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(y(Dw(g.timescale,4)),y(Dw(l,4)),y(Dw(n,4)),y(Dw(m,2)),[0,0]));l=yw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Ew;break;case "audio":m=Fw}n=yw("hdlr",m);a:{switch(g.type){case "video":g=yw("minf",yw("vmhd",Gw),Aw,Hw(g));break a;
|