shaka-player 3.2.5 → 3.2.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.
- package/.github/workflows/release-please.yaml +2 -0
- package/CHANGELOG.md +9 -0
- package/build/generateTsDefs.py +2 -0
- package/dist/controls.css +2 -2
- package/dist/controls.css.map +1 -1
- package/dist/locales.js +28 -28
- package/dist/shaka-player.compiled.d.ts +2 -0
- package/dist/shaka-player.compiled.debug.d.ts +2 -0
- package/dist/shaka-player.compiled.debug.js +1 -1
- package/dist/shaka-player.compiled.js +4 -4
- package/dist/shaka-player.ui.d.ts +2 -0
- package/dist/shaka-player.ui.debug.d.ts +2 -0
- package/dist/shaka-player.ui.debug.js +3 -3
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +6 -6
- package/dist/shaka-player.ui.map +2 -2
- package/lib/player.js +1 -1
- package/package.json +1 -1
- package/ui/less/ad_controls.less +2 -2
- package/ui/less/buttons.less +1 -1
- package/ui/less/containers.less +4 -4
- package/ui/less/range_elements.less +2 -2
- package/ui/seek_bar.js +2 -1
package/dist/shaka-player.ui.js
CHANGED
|
@@ -91,8 +91,8 @@ q.De=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
|
|
|
91
91
|
q.ba=function(a,b,c){a=Ob(a);void 0===c&&(c=Yb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Yb||d.set(f,e)});this.h.set(a,d);Xb(this);this.dispatchEvent(new L("locale-updated"));return this};q.Hg=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new L("unknown-localization",a));return""};
|
|
92
92
|
function Xb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Rb:f.Rb},h=g.next()){f.Rb=h.value;e.add(f.Rb);e.add(Tb(f.Rb));h=hb(b.keys(),function(l){return function(m){var n=l.Rb,p=Tb(m),t=Tb(n);return m!=p&&n!=t&&p==t}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Tb(m)==l.Rb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=
|
|
93
93
|
b.get(h.value))&&c.push(h);c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Zb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new L("missing-localizations",d)))}function Zb(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}J("shaka.ui.Localization",Wb);
|
|
94
|
-
Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Hg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.De;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={
|
|
95
|
-
|
|
94
|
+
Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Hg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.De;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={Vg:"AIRPLAY",sf:"SUBTITLE_FORCED",oh:"LANGUAGE",Zh:"UNRECOGNIZED_LANGUAGE",Ah:"OFF",Yh:"UNMUTE",Fh:"PICTURE_IN_PICTURE",hh:"EXIT_FULL_SCREEN",yh:"NOT_APPLICABLE",Oh:"SKIP_TO_LIVE",Xh:"UNDETERMINED_LANGUAGE",ih:"EXIT_LOOP_MODE",Mh:"SEEK",Ug:"AD_TIME",ah:"CAPTIONS",jh:"EXIT_PICTURE_IN_PICTURE",ze:"LIVE",vh:"MULTIPLE_LANGUAGES",Tg:"AD_DURATION",Eh:"PAUSE",Hh:"PLAYBACK_RATE",Kh:"REWIND",mh:"FAST_FORWARD",AD_PROGRESS:"AD_PROGRESS",Ih:"REPLAY",BACK:"BACK",wh:"MUTE",ph:"LOOP",bh:"CAST",eh:"ENTER_LOOP_MODE",
|
|
95
|
+
Xg:"AUTO_QUALITY",Jh:"RESOLUTION",uh:"MORE_SETTINGS",fh:"ENTER_PICTURE_IN_PICTURE",Bh:"ON",Gh:"PLAY",ai:"VOLUME",nh:"FULL_SCREEN",Nh:"SKIP_AD"};function ac(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}ac.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function bc(a){return a.g/(1-Math.pow(a.i,a.h))};function cc(){this.h=new ac(2);this.i=new ac(5);this.g=0}cc.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};cc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(bc(this.h),bc(this.i))};function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={td:d.td},e=a.next()){d.td=e.value;e=b.findIndex(function(f){return function(g){return c(f.td,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
96
96
|
function gc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function hc(a,b,c){this.startTime=a;this.direction=ic;this.endTime=b;this.payload=c;this.region=new jc;this.position=null;this.positionAlign=kc;this.size=0;this.textAlign=lc;this.writingMode=mc;this.lineInterpretation=nc;this.line=null;this.lineHeight="";this.lineAlign=oc;this.displayAlign=pc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=qc;this.fontStyle=rc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
|
|
97
97
|
[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}hc.prototype.clone=function(){var a=new hc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
98
98
|
function sc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!gc(a.nestedCues,b.nestedCues,sc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!gc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}J("shaka.text.Cue",hc);var kc="auto";
|
|
@@ -454,13 +454,13 @@ S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return H(function(h
|
|
|
454
454
|
ud()?!!jg[p]:vd(l[p]);c=k;k={};p=r('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",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(","));
|
|
455
455
|
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=ud()?ld(l)?!0:MediaSource.isTypeSupported(l)||cd(l):vd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=cm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=Ck;S.setAdManagerFactory=function(a){nk=a};S.registerSupportPlugin=function(a,b){cm[a]=b};S.prototype.destroy=S.prototype.destroy;
|
|
456
456
|
var Zl="abrstatuschanged",Tl="adaptation",Ql="buffering",Yk="drmsessionupdate",zj="emsg",$l="error",bm="expirationupdated",Hk="loaded",Fk="loading",Tk="manifestparsed",xl="metadata",zk="onstatechange",Ak="onstateidle",Rl="ratechange",hl="streaming",Xl="textchanged",Yl="texttrackvisibility",Qk="timelineregionadded",Al="timelineregionenter",Bl="timelineregionexit",Vl="trackschanged",Lk="unloading",Wl="variantchanged",dm={Yg:Zl,Zg:Tl,$g:Ql,dh:Yk,kh:zj,Error:$l,lh:bm,qh:"largegap",rh:Hk,sh:Fk,xh:Tk,Metadata:xl,
|
|
457
|
-
Ch:zk,Dh:Ak,Lh:Rl,Ph:"sessiondata",Qh:hl,Rh:Xl,Sh:Yl,Th:Qk,Uh:Al,Vh:Bl,Wh:Vl,$h:Lk,bi:Wl},Bk=0,kk=1,gl=2,sl=3;S.LoadMode={DESTROYED:Bk,NOT_LOADED:kk,MEDIA_SOURCE:gl,SRC_EQUALS:sl};S.version="v3.2.
|
|
457
|
+
Ch:zk,Dh:Ak,Lh:Rl,Ph:"sessiondata",Qh:hl,Rh:Xl,Sh:Yl,Th:Qk,Uh:Al,Vh:Bl,Wh:Vl,$h:Lk,bi:Wl},Bk=0,kk=1,gl=2,sl=3;S.LoadMode={DESTROYED:Bk,NOT_LOADED:kk,MEDIA_SOURCE:gl,SRC_EQUALS:sl};S.version="v3.2.6";var em=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(em[0]),Number(em[1])));
|
|
458
458
|
var am=["output-restricted","internal-error"],cm={},nk=null,Ik={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Jl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
459
459
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function fm(){this.h=[];this.j=this.i=this.g=0};function gm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new hf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=gm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
460
460
|
q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
|
|
461
461
|
q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};J("shaka.ads.ClientSideAd",gm);
|
|
462
462
|
gm.prototype.release=gm.prototype.release;gm.prototype.getPositionInSequence=gm.prototype.getPositionInSequence;gm.prototype.getSequenceLength=gm.prototype.getSequenceLength;gm.prototype.setMuted=gm.prototype.setMuted;gm.prototype.resize=gm.prototype.resize;gm.prototype.isMuted=gm.prototype.isMuted;gm.prototype.setVolume=gm.prototype.setVolume;gm.prototype.getVolume=gm.prototype.getVolume;gm.prototype.play=gm.prototype.play;gm.prototype.pause=gm.prototype.pause;gm.prototype.skip=gm.prototype.skip;
|
|
463
|
-
gm.prototype.canSkipNow=gm.prototype.canSkipNow;gm.prototype.getTimeUntilSkippable=gm.prototype.getTimeUntilSkippable;gm.prototype.isSkippable=gm.prototype.isSkippable;gm.prototype.isPaused=gm.prototype.isPaused;gm.prototype.getRemainingTime=gm.prototype.getRemainingTime;gm.prototype.getMinSuggestedDuration=gm.prototype.getMinSuggestedDuration;gm.prototype.getDuration=gm.prototype.getDuration;function hm(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new hf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.
|
|
463
|
+
gm.prototype.canSkipNow=gm.prototype.canSkipNow;gm.prototype.getTimeUntilSkippable=gm.prototype.getTimeUntilSkippable;gm.prototype.isSkippable=gm.prototype.isSkippable;gm.prototype.isPaused=gm.prototype.isPaused;gm.prototype.getRemainingTime=gm.prototype.getRemainingTime;gm.prototype.getMinSuggestedDuration=gm.prototype.getMinSuggestedDuration;gm.prototype.getDuration=gm.prototype.getDuration;function hm(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new hf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.6");this.g=null;this.h.Ka(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){im(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
464
464
|
function(f){jm(e,f)});this.i.onended=function(){e.l.contentComplete()}}hm.prototype.stop=function(){this.g&&this.g.stop();this.m&&Nj(this.m)};hm.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function jm(a,b){b.getError();km(a,null);a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
465
465
|
function im(a,b){a.j(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.B)));a.g=b.getAdsManager(a.i);a.j(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",d)))}lm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
466
466
|
a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)),a.g.start()}catch(f){km(a,null)}}
|
|
@@ -481,8 +481,8 @@ f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}om.prototyp
|
|
|
481
481
|
function pm(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.G||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.v=d,a.l.currentTime=e.start)}})};function T(){db.call(this);this.g=this.i=null;this.h=new fm;this.j=navigator.language}pa(T,db);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.i&&this.i.release();this.i=new hm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
482
482
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new fm};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.B=Date.now()/1E3;b.l.requestAds(a)};
|
|
483
483
|
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new om(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
484
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Pa('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="v3.2.
|
|
485
|
-
(c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Pa('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="v3.2.
|
|
484
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Pa('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="v3.2.6";c=this.g;var d=b;c.j?c=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
485
|
+
(c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Pa('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="v3.2.6";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.F};
|
|
486
486
|
q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,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)};J("shaka.ads.AdManager",T);
|
|
487
487
|
T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
|
|
488
488
|
T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
|