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
|
@@ -175,9 +175,9 @@ var Ve={},ef=0,Ye=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("ima
|
|
|
175
175
|
b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}r=of.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};
|
|
176
176
|
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=
|
|
177
177
|
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=tf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=uf(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=tf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=tf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
178
|
-
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};
|
|
179
|
-
r.trySuggestStreams=function(){null!=this.A&&this.o&&vf(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};
|
|
180
|
-
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.W(wf)}),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)};
|
|
178
|
+
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};
|
|
179
|
+
r.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.A&&this.o&&vf(this))};r.trySuggestStreams=function(){null!=this.A&&this.o&&vf(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};
|
|
180
|
+
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.W(wf)}),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)};
|
|
181
181
|
function vf(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 tf(a,b,c,d,e){if(a.j){var f=a.j.sg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ie(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
182
182
|
function uf(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})}S("shaka.abr.SimpleAbrManager",of);of.prototype.configure=of.prototype.configure;of.prototype.setCmsdManager=of.prototype.setCmsdManager;of.prototype.setMediaElement=of.prototype.setMediaElement;of.prototype.playbackRateChanged=of.prototype.playbackRateChanged;of.prototype.setVariants=of.prototype.setVariants;
|
|
183
183
|
of.prototype.getBandwidthEstimate=of.prototype.getBandwidthEstimate;of.prototype.trySuggestStreams=of.prototype.trySuggestStreams;of.prototype.segmentDownloaded=of.prototype.segmentDownloaded;of.prototype.disable=of.prototype.disable;of.prototype.enable=of.prototype.enable;of.prototype.chooseVariant=of.prototype.chooseVariant;of.prototype.init=of.prototype.init;of.prototype.release=of.prototype.release;of.prototype.stop=of.prototype.stop;var wf=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{vj:"reload",bh:"smooth"});function xf(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)}xf.prototype.add=function(a,b,c){return yf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
@@ -682,14 +682,14 @@ X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=
|
|
|
682
682
|
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,ci(),3);case 3:b=k.h;case 2:var l={};if(Mc())for(var m in ri)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]=Mc()?!!ri[n]:Nc(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(Qd));
|
|
683
683
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=he(n)?!0:Mc()?mb(n)||(lc(n)?!0:!1):Nc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,id(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=hp;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
684
684
|
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:Mc()?!0:Nc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Tn=a};
|
|
685
|
-
X.registerSupportPlugin=function(a,b){hp[a]=b};X.prototype.destroy=X.prototype.destroy;var Zn=0,Pn=1,Bo=2,Oo=3;X.LoadMode={DESTROYED:Zn,NOT_LOADED:Pn,MEDIA_SOURCE:Bo,SRC_EQUALS:Oo};X.version="v4.9.
|
|
685
|
+
X.registerSupportPlugin=function(a,b){hp[a]=b};X.prototype.destroy=X.prototype.destroy;var Zn=0,Pn=1,Bo=2,Oo=3;X.LoadMode={DESTROYED:Zn,NOT_LOADED:Pn,MEDIA_SOURCE:Bo,SRC_EQUALS:Oo};X.version="v4.9.3";var ip=["4","9"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(ip[0]),Number(ip[1])));var hp={},Tn=null;function jp(){this.h=[];this.j=this.i=this.g=0};function kp(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=kp.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
686
|
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)};
|
|
687
687
|
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)};
|
|
688
688
|
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()};
|
|
689
689
|
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",kp);kp.prototype.release=kp.prototype.release;
|
|
690
690
|
kp.prototype.getPodIndex=kp.prototype.getPodIndex;kp.prototype.getTimeOffset=kp.prototype.getTimeOffset;kp.prototype.getMediaUrl=kp.prototype.getMediaUrl;kp.prototype.getAdvertiserName=kp.prototype.getAdvertiserName;kp.prototype.getCreativeAdId=kp.prototype.getCreativeAdId;kp.prototype.getAdId=kp.prototype.getAdId;kp.prototype.getVastMediaWidth=kp.prototype.getVastMediaWidth;kp.prototype.getVastMediaHeight=kp.prototype.getVastMediaHeight;kp.prototype.getVastMediaBitrate=kp.prototype.getVastMediaBitrate;
|
|
691
691
|
kp.prototype.getDescription=kp.prototype.getDescription;kp.prototype.getTitle=kp.prototype.getTitle;kp.prototype.getPositionInSequence=kp.prototype.getPositionInSequence;kp.prototype.getSequenceLength=kp.prototype.getSequenceLength;kp.prototype.setMuted=kp.prototype.setMuted;kp.prototype.resize=kp.prototype.resize;kp.prototype.isLinear=kp.prototype.isLinear;kp.prototype.isMuted=kp.prototype.isMuted;kp.prototype.setVolume=kp.prototype.setVolume;kp.prototype.getVolume=kp.prototype.getVolume;
|
|
692
|
-
kp.prototype.play=kp.prototype.play;kp.prototype.pause=kp.prototype.pause;kp.prototype.skip=kp.prototype.skip;kp.prototype.canSkipNow=kp.prototype.canSkipNow;kp.prototype.getTimeUntilSkippable=kp.prototype.getTimeUntilSkippable;kp.prototype.isSkippable=kp.prototype.isSkippable;kp.prototype.isPaused=kp.prototype.isPaused;kp.prototype.getRemainingTime=kp.prototype.getRemainingTime;kp.prototype.getMinSuggestedDuration=kp.prototype.getMinSuggestedDuration;kp.prototype.getDuration=kp.prototype.getDuration;function lp(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.
|
|
692
|
+
kp.prototype.play=kp.prototype.play;kp.prototype.pause=kp.prototype.pause;kp.prototype.skip=kp.prototype.skip;kp.prototype.canSkipNow=kp.prototype.canSkipNow;kp.prototype.getTimeUntilSkippable=kp.prototype.getTimeUntilSkippable;kp.prototype.isSkippable=kp.prototype.isSkippable;kp.prototype.isPaused=kp.prototype.isPaused;kp.prototype.getRemainingTime=kp.prototype.getRemainingTime;kp.prototype.getMinSuggestedDuration=kp.prototype.getMinSuggestedDuration;kp.prototype.getDuration=kp.prototype.getDuration;function lp(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.3");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
693
693
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){mp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){np(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.qa(this.i,"play",function(){f.F=!0})}lp.prototype.configure=function(a){this.s=a};lp.prototype.stop=function(){this.g&&this.g.stop();this.o&&cn(this.o)};
|
|
694
694
|
lp.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 np(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));op(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
695
695
|
function mp(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",
|
|
@@ -741,8 +741,8 @@ function Gp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
741
741
|
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);bg.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 jp};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)};
|
|
742
742
|
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 tp(a,b,c,function(e){return Hp(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 Sf,wp(d,a,b),d.H=c||"",d.V=Date.now()/1E3,a=d.l);return a};
|
|
743
743
|
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 Fp(a,b,this.m,function(d){return Hp(c,d)});this.g.configure(this.l)};
|
|
744
|
-
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.
|
|
745
|
-
(c.G=!0),c.j=new Sf,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.
|
|
744
|
+
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.3";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
745
|
+
(c.G=!0),c.j=new Sf,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.3";this.g.g.replaceAdTagParameters(a)};
|
|
746
746
|
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)};
|
|
747
747
|
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)};
|
|
748
748
|
function Hp(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;
|
|
@@ -986,7 +986,7 @@ r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)
|
|
|
986
986
|
h&&Cv(a);F(m)})};function Dv(a,b){return xv(a)?a.N.get(b.type):b.fe}
|
|
987
987
|
function yv(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,N,L,M,P;return O(function(R){if(1==R.g){c=[];d=t(b.L());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Pd&&(0<=b.lb&&h.add("_HLS_msn",String(b.lb)),0<=b.mb&&h.add("_HLS_part",String(b.mb))),b.Qd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return E(R,vv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=lv(a.Ka,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
|
|
988
988
|
b.L().includes(m)||b.Gg.push(m);n=av(l.g,"EXT-X-DEFINE");p=Ev(a,n,m);q=b.stream;u=Dv(a,b);return E(R,Fv(a,l,q.mimeType,b.L,p),3)}v=R.h;w=v.keyIds;A=v.drmInfos;z=function(Q,fa){return Q.size===fa.size&&[].concat(x(Q)).every(function(sa){return fa.has(sa)})};z(q.keyIds,w)||(q.keyIds=w,q.drmInfos=A,a.h.newDrmInfo(q));y=Gv(a,l,q,u,p,b.L,b.type);B=y.segments;if(C=y.bandwidth)q.bandwidth=C;q.segmentIndex.ud(B,a.l.jb());B.length&&(D=dv(l.g,"EXT-X-MEDIA-SEQUENCE",0),K=(J=cv(l.g,"EXT-X-SKIP"))?Number(Z(J,
|
|
989
|
-
"SKIPPED-SEGMENTS")):0,H=Hv(D,B),I=H.lb,G=H.mb,b.lb=I+K,b.mb=G,N=u.get(D),q.segmentIndex.Ha(N));L=
|
|
989
|
+
"SKIPPED-SEGMENTS")):0,H=Hv(D,B),I=H.lb,G=H.mb,b.lb=I+K,b.mb=G,N=u.get(D),q.segmentIndex.Ha(N));L=q.segmentIndex.g[0]||null;b.hc=L.startTime;M=B[B.length-1];b.Bb=M.endTime;if(P=cv(l.g,"EXT-X-ENDLIST"))b.nd=!0;Iv(a,l);F(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
990
990
|
function Jv(a,b){for(var c=-1==a.J,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.J=Math.max(a.J,k));e.Oe=k;break}}}}if(!(0>a.J))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.J-c.Oe,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Lv(a,
|
|
991
991
|
c,d)}
|
|
992
992
|
function Mv(a,b){if(Infinity==a.ba){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.ba=Math.min(a.ba,d.h))}}b=a.ba;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)$a("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.L(),"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.Qf(b)}}}
|
|
@@ -1067,8 +1067,8 @@ function pw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,y,B;return O(function(C){
|
|
|
1067
1067
|
p));return E(C,a.za.get(m),3);case 3:q=C.h,l=Ad(q.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.na.has(e)){v=a.na.get(e);C.u(5);break}w=ol(e.L(),e.bc(),e.Zb(),a.g.retryParameters);A=pg;return E(C,bw(a,w,A,{type:0}),6);case 6:z=C.h,v=jt(z.data),a.na.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(Fd(y,B))}})}S("shaka.hls.HlsParser",sv);
|
|
1068
1068
|
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",
|
|
1069
1069
|
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 T(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new T(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 Ed("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
|
|
1070
|
-
"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=Ab(b.data);c=Ed("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=Yu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
|
|
1071
|
-
b&&(c="cbcs");a=Yu(a,"URI");a=rv(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 Ed("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},uv="VOD",yw="EVENT",dw="LIVE",Av={dh:uv,cj:yw,kj:dw};ri["application/x-mpegurl"]=function(){return new sv};ri["application/vnd.apple.mpegurl"]=function(){return new sv};function Ew(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 Fw(a){if(a=Gw(a))a:{a=t(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}
|
|
1070
|
+
"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=Ab(b.data);c=Ed("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=Yu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
|
|
1071
|
+
"SAMPLE-AES"==b&&(c="cbcs");a=Yu(a,"URI");a=rv(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 Ed("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},uv="VOD",yw="EVENT",dw="LIVE",Av={dh:uv,cj:yw,kj:dw};ri["application/x-mpegurl"]=function(){return new sv};ri["application/vnd.apple.mpegurl"]=function(){return new sv};function Ew(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 Fw(a){if(a=Gw(a))a:{a=t(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}
|
|
1072
1072
|
function Gw(a){a=yd(Zg(a));a=Ew(a).filter(function(b){return b.type===Hw})[0];if(!a)return null;a=ld(a.value,!0);return(a=Sg(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",Nw);Ow=Mw("dinf",b)}this.g=a}
|
|
1073
1073
|
function Pw(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/(Qw+1));m=Math.floor(m%(Qw+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(Rw(h,4)),[0,0,0,0],x(Rw(n,4)),x(Rw(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(Rw(k,2)),[0,0],x(Rw(l,
|
|
1074
1074
|
2)),[0,0]));h=Mw("tkhd",h);k=Mw;n=g.duration*g.timescale;l=Math.floor(n/(Qw+1));n=Math.floor(n%(Qw+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(Rw(g.timescale,4)),x(Rw(l,4)),x(Rw(n,4)),x(Rw(m,2)),[0,0]));l=Mw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Sw;break;case "audio":m=Tw}n=Mw("hdlr",m);a:{switch(g.type){case "video":g=Mw("minf",Mw("vmhd",Uw),Ow,Vw(g));break a;
|