shaka-player 3.3.9 → 3.3.10
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/selenium-lab-tests.yaml +158 -53
- package/CHANGELOG.md +9 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/locales.js +32 -32
- package/dist/shaka-player.compiled.debug.js +6 -6
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +37 -37
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +8 -8
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +46 -46
- package/dist/shaka-player.ui.map +2 -2
- package/lib/player.js +7 -1
- package/lib/text/ui_text_displayer.js +8 -0
- package/package.json +1 -1
- package/test/player_src_equals_integration.js +2 -0
- package/test/test/assets/small.mp4 +0 -0
- package/ui/less/ad_controls.less +4 -0
package/dist/shaka-player.ui.js
CHANGED
|
@@ -64,10 +64,10 @@ var ib=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
64
64
|
Copyright 2006 The Closure Library Authors
|
|
65
65
|
SPDX-License-Identifier: Apache-2.0
|
|
66
66
|
*/
|
|
67
|
-
function jb(a){var b;a instanceof jb?(kb(this,a.Va),this.Sb=a.Sb,this.Ya=a.Ya,
|
|
67
|
+
function jb(a){var b;a instanceof jb?(kb(this,a.Va),this.Sb=a.Sb,this.Ya=a.Ya,lb(this,a.jc),this.Na=a.Na,nb(this,a.g.clone()),this.Hb=a.Hb):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Sb=ob(b[2]||""),this.Ya=ob(b[3]||"",!0),lb(this,b[4]),this.Na=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Hb=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Va="";q.Sb="";q.Ya="";q.jc=null;q.Na="";q.Hb="";
|
|
68
68
|
q.toString=function(){var a=[],b=this.Va;b&&a.push(qb(b,rb,!0),":");if(b=this.Ya){a.push("//");var c=this.Sb;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.jc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.Ya&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hb)&&a.push("#",qb(b,ub));return a.join("")};
|
|
69
|
-
q.resolve=function(a){var b=this.clone();"data"===b.Va&&(b=new jb);var c=!!a.Va;c?kb(b,a.Va):c=!!a.Sb;c?b.Sb=a.Sb:c=!!a.Ya;c?b.Ya=a.Ya:c=null!=a.jc;var d=a.Na;if(c)
|
|
70
|
-
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Va=c?ob(b,!0):b;a.Va&&(a.Va=a.Va.replace(/:$/,""))}function
|
|
69
|
+
q.resolve=function(a){var b=this.clone();"data"===b.Va&&(b=new jb);var c=!!a.Va;c?kb(b,a.Va):c=!!a.Sb;c?b.Sb=a.Sb:c=!!a.Ya;c?b.Ya=a.Ya:c=null!=a.jc;var d=a.Na;if(c)lb(b,a.jc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.Ya&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
70
|
+
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Va=c?ob(b,!0):b;a.Va&&(a.Va=a.Va.replace(/:$/,""))}function lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.jc=b}else a.jc=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
|
|
71
71
|
function ob(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function qb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,wb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function wb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var rb=/[#\/\?@]/g,tb=/[#\?:]/g,sb=/[#\?]/g,vb=/[#\?@]/g,ub=/#/g;function pb(a){this.g=a||null}
|
|
72
72
|
function xb(a){if(!a.Fa&&(a.Fa={},a.$c=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=pb.prototype;q.Fa=null;q.$c=null;q.add=function(a,b){xb(this);this.g=null;var c=this.Fa.hasOwnProperty(a)&&this.Fa[a];c||(this.Fa[a]=c=[]);c.push(b);this.$c++;return this};
|
|
73
73
|
q.set=function(a,b){xb(this);this.g=null;this.Fa.hasOwnProperty(a)?this.Fa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Fa)return"";var a=[],b;for(b in this.Fa)for(var c=encodeURIComponent(b),d=this.Fa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Fa){var b={},c;for(c in this.Fa)b[c]=this.Fa[c].concat();a.Fa=b;a.$c=this.$c}return a};function P(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",P);P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
@@ -93,8 +93,8 @@ q.Re=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
|
|
|
93
93
|
q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=bc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=bc||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.Xg=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 O("unknown-localization",a));return""};
|
|
94
94
|
function $b(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={Xb:f.Xb},h=g.next()){f.Xb=h.value;e.add(f.Xb);e.add(Vb(f.Xb));h=hb(b.keys(),function(l){return function(m){return Ub(m,l.Xb)}}(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 Vb(m)==l.Xb}}(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=b.get(h.value))&&c.push(h);
|
|
95
95
|
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,cc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function cc(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)}N("shaka.ui.Localization",Zb);Zb.prototype.resolve=Zb.prototype.resolve;
|
|
96
|
-
Zb.prototype.resolveDictionary=Zb.prototype.Xg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Re;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={
|
|
97
|
-
|
|
96
|
+
Zb.prototype.resolveDictionary=Zb.prototype.Xg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Re;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={di:"PLAYBACK_RATE",sh:"CAPTIONS",Jh:"FULL_SCREEN",Bi:"UNDETERMINED_LANGUAGE",uh:"CAST",Wh:"OFF",Dh:"EXIT_FULL_SCREEN",Ih:"FAST_FORWARD",lh:"AD_TIME",ci:"PLAY",Eh:"EXIT_LOOP_MODE",Bh:"ENTER_PICTURE_IN_PICTURE",oi:"STATISTICS",li:"SKIP_AD",Ci:"UNMUTE",ki:"SEEK",AD_PROGRESS:"AD_PROGRESS",Di:"UNRECOGNIZED_LANGUAGE",gi:"RESOLUTION",Qh:"MORE_SETTINGS",ai:"PAUSE",oh:"AUTO_QUALITY",Rh:"MULTIPLE_LANGUAGES",Vh:"NOT_APPLICABLE",ii:"REWIND",Fi:"VOLUME",mh:"AIRPLAY",Gf:"SUBTITLE_FORCED",Fh:"EXIT_PICTURE_IN_PICTURE",
|
|
97
|
+
mi:"SKIP_TO_LIVE",kh:"AD_DURATION",Mh:"LOOP",bi:"PICTURE_IN_PICTURE",Xh:"ON",Lh:"LANGUAGE",Sh:"MUTE",ei:"REPLAY",Ne:"LIVE",Ah:"ENTER_LOOP_MODE",BACK:"BACK"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Fd:d.Fd},e=a.next()){d.Fd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Fd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
98
98
|
function kc(a,b,c){c||(c=hc);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 lc(a,b,c){this.startTime=a;this.direction=mc;this.endTime=b;this.payload=c;this.region=new nc;this.position=null;this.positionAlign=oc;this.size=0;this.textAlign=pc;this.writingMode=qc;this.lineInterpretation=rc;this.line=null;this.lineHeight="";this.lineAlign=sc;this.displayAlign=tc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=uc;this.fontStyle=vc;this.linePadding=this.letterSpacing=this.fontFamily=
|
|
99
99
|
"";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}lc.prototype.clone=function(){var a=new lc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
100
100
|
function wc(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(!kc(a.nestedCues,b.nestedCues,wc))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(!kc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",lc);var oc="auto";
|
|
@@ -340,11 +340,11 @@ p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.
|
|
|
340
340
|
function ck(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&dk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.A.has(c.id))c=a.A.get(c.id);else{e=S("span");var g=c.heightUnits==Dc?"%":"px",h=c.widthUnits==Dc?"%":"px",k=c.viewportAnchorUnits==Dc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+
|
|
341
341
|
g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(c.id,e);c=e}e=f;d&&(e=S("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Sd:f,Ff:e,Mc:c})}
|
|
342
342
|
function dk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ek(c.linePadding,c,a.m);f.paddingRight=ek(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
|
|
343
|
-
"contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=fk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==
|
|
344
|
-
g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ek(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=
|
|
345
|
-
sc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==qc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=
|
|
346
|
-
qc?f.width=c.size+"%":f.height=c.size+"%")}function ek(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function fk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
|
|
347
|
-
Zj.prototype.setTextVisibility=Zj.prototype.setTextVisibility;Zj.prototype.isTextVisible=Zj.prototype.isTextVisible;Zj.prototype.remove=Zj.prototype.remove;Zj.prototype.destroy=Zj.prototype.destroy;Zj.prototype.append=Zj.prototype.append;function gk(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},
|
|
343
|
+
"contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=fk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==
|
|
344
|
+
c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ek(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=
|
|
345
|
+
c.line+"%")):(f.height="100%",c.lineAlign==sc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==qc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=
|
|
346
|
+
c.writingMode);c.size&&(c.writingMode==qc?f.width=c.size+"%":f.height=c.size+"%")}function ek(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function fk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
|
|
347
|
+
N("shaka.text.UITextDisplayer",Zj);Zj.prototype.setTextVisibility=Zj.prototype.setTextVisibility;Zj.prototype.isTextVisible=Zj.prototype.isTextVisible;Zj.prototype.remove=Zj.prototype.remove;Zj.prototype.destroy=Zj.prototype.destroy;Zj.prototype.append=Zj.prototype.append;function gk(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},
|
|
348
348
|
"");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&zb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
|
|
349
349
|
break;case "right":k.push("align:right");break;case pc:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}N("shaka.text.WebVttGenerator",function(){});function hk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function ik(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?jk:kk};d.ot=lk(c);var e=d.ot===mk||d.ot===nk||d.ot===ok||d.ot===pk;e&&(d.bl=qk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==pk&&(d.tb=rk(a,d.ot)/1E3);sk(a,b,d)}}catch(f){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
350
350
|
function tk(a,b,c){try{if(!a.g.enabled)return b;var d=uk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=ok;break a;case "application/x-mpegurl":e=vk;break a}e=void 0}d.ot=e;d.su=!0;var f=wk(d);return xk(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function yk(a,b){try{if(!a.g.enabled)return b;var c=uk(a);c.ot=zk;c.su=!0;var d=wk(c);return xk(b,d)}catch(e){return Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
|
|
@@ -366,77 +366,77 @@ maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:In
|
|
|
366
366
|
function Jk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Dk(a,b,c||Hk(),d,"")}
|
|
367
367
|
function Ik(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Qb(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
|
|
368
368
|
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Mb&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",Gk);Gk.mergeConfigObjects=Jk;function Kk(){this.g=null;this.h=[]}function Lk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Mk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
|
|
369
|
-
function Nk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ok(){this.i=this.h=null;this.g=[]}function Pk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Qk(){this.
|
|
369
|
+
function Nk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ok(){this.i=this.h=null;this.g=[]}function Pk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Qk(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new Kk;this.h=new Ok};function T(a,b){cb.call(this);var c=this;this.l=Rk;this.gd=this.g=null;this.ba=!1;this.ld=new qf;this.ib=new qf;this.A=new qf;this.ge=this.C=this.hb=this.i=this.md=this.J=this.j=this.ma=this.W=this.od=this.K=this.hd=this.I=this.Wa=this.G=this.N=this.m=this.H=null;this.Ke=1E9;this.h=Sk(this);this.Je={width:Infinity,height:Infinity};this.B=null;this.Aa=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
|
|
370
370
|
this.jb=this.h.preferForcedSubs;this.fb=[];this.Ac=null;b&&b(this);this.H=Tk(this);this.H.ue(this.h.streaming.forceHTTPS);this.F=null;Uk&&(this.F=Gb(Uk));this.ld.o(window,"online",function(){c.ke()});this.R={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Le={name:"manifest-parser"};this.Ge={name:"manifest"};this.Oa={name:"media-source"};this.ie={name:"drm-engine"};this.$={name:"load"};this.Me={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};var d=new Map;d.set(this.Z,
|
|
371
371
|
function(e,f){return We(Vk(c,e,f))});d.set(this.R,function(e){e.M&&(c.ib.rb(),e.M=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return We(e)});d.set(this.aa,function(e){return We(Wk(c,e))});d.set(this.Oa,function(e){e=Xk(c,e);return We(e)});d.set(this.Le,function(e,f){var g=Yk(c,e,f);return We(g)});d.set(this.Ge,function(e){return Zk(c,e)});d.set(this.ie,function(e){e=$k(c,e);return We(e)});d.set(this.$,function(e,f){return We(al(c,e,f))});d.set(this.Me,function(e,f){var g=bl(c,e,f);return We(g)});
|
|
372
372
|
d.set(this.Xa,function(e,f){return cl(c,e,f)});this.na=new Mj(this.R,{og:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.Z);e==c.Z&&(k=g==c.R||f.M!=h.M?c.R:g==c.Z?c.Z:g==c.Oa||g==c.$?c.Oa:g==c.Xa?c.Me:null);e==c.Oa&&(k=g==c.$&&f.M==h.M?c.Le:c.aa);e==c.Le&&(k=dl(c.$,c.Ge,c.aa,g,f,h));e==c.Ge&&(k=dl(c.$,c.ie,c.aa,g,f,h));e==c.ie&&(k=dl(c.$,c.$,c.aa,g,f,h));e==c.Me&&(k=g==c.Xa&&f.M==h.M?c.Xa:c.aa);if(e==c.$||e==c.Xa)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.R);return k},Tf:function(e,f,g){c.dispatchEvent(el(fl,
|
|
373
373
|
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?z(f,Wk(c,e),2):f["return"](e.M?c.Z:c.R)})},Kg:function(e){c.dispatchEvent(el(gl,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}u(T,cb);function el(a,b){return new O(a,b)}q=T.prototype;
|
|
374
|
-
q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==hl)return c["return"]();a.l=hl;b=Rj(a.na,function(){return{node:a.R,payload:Nj(),Kb:!1}});return z(c,new Promise(function(d){b.ic=function(){};b.pd=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.rd=function(){d()}}),2);case 2:return z(c,a.na.destroy(),3);case 3:a.ld&&(a.ld.release(),a.ld=null);a.ib&&(a.ib.release(),a.ib=null);a.A&&(a.A.release(),a.A=null);a.ge=null;a.
|
|
374
|
+
q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==hl)return c["return"]();a.l=hl;b=Rj(a.na,function(){return{node:a.R,payload:Nj(),Kb:!1}});return z(c,new Promise(function(d){b.ic=function(){};b.pd=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.rd=function(){d()}}),2);case 2:return z(c,a.na.destroy(),3);case 3:a.ld&&(a.ld.release(),a.ld=null);a.ib&&(a.ib.release(),a.ib=null);a.A&&(a.A.release(),a.A=null);a.ge=null;a.C=null;a.h=null;a.B=null;a.gd=null;
|
|
375
375
|
a.W=null;if(!a.H){c.D(4);break}return z(c,a.H.destroy(),5);case 5:a.H=null;case 4:cb.prototype.release.call(a),B(c)}})};
|
|
376
376
|
function il(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Xc("Trident/"))return!1;var a=cd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Sc()?!0:Uc("application/x-mpegurl")}
|
|
377
377
|
q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==hl)return Promise.reject(jl());var c=Nj();c.M=a;Sc()||(b=!1);var d=b?this.Oa:this.Z,e=Rj(this.na,function(){return{node:d,payload:c,Kb:!1}});e.ic=function(){};return kl(e)};q.detach=function(){var a=this;if(this.l==hl)return Promise.reject(jl());var b=Rj(this.na,function(){return{node:a.R,payload:Nj(),Kb:!1}});b.ic=function(){};return kl(b)};
|
|
378
378
|
q.He=function(a){var b=this;a=void 0===a?!0:a;if(this.l==hl)return Promise.reject(jl());Sc()||(a=!1);var c=Nj(),d=Rj(this.na,function(e){var f=e.M&&a?b.Oa:e.M?b.Z:b.R;c.M=e.M;return{node:f,payload:c,Kb:!1}});d.ic=function(){};return kl(d)};q.jh=function(a){this.Ac=a};
|
|
379
|
-
q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==hl)return Promise.reject(jl());this.dispatchEvent(el(ll));var e=Nj();e.uri=a;e.Be=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=ml(this,e)?this.Xa:this.$,g=Rj(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Kb:!0}});this.
|
|
379
|
+
q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==hl)return Promise.reject(jl());this.dispatchEvent(el(ll));var e=Nj();e.uri=a;e.Be=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=ml(this,e)?this.Xa:this.$,g=Rj(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Kb:!0}});this.B=new Qk;this.W=nl(this);g.ic=function(){};return new Promise(function(h,k){g.rd=function(){return k(new P(2,7,7002))};g.pd=function(){h();d.dispatchEvent(el(ol))};g.Qb=function(){return k(jl())};
|
|
380
380
|
g.onError=function(l){return k(l)}})};function ml(a,b){if(!Sc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=pg(d),c=pl[c]);if(c){if(""==(b.M||Vc()).canPlayType(c))return!1;if(!Sc()||!(c in og||pg(d)in qg)||a.h.streaming.preferNativeHls)return!0;if(ad())return a.h.streaming.useNativeHlsOnSafari}return!1}function Vk(a,b,c){null==b.M&&(b.M=c.M,a.ib.o(b.M,"error",function(){var d=ql(a);d&&rl(a,d)}));a.g=b.M;return Promise.resolve()}
|
|
381
|
-
function Wk(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=hl&&(a.l=Rk),c=a.fb.map(function(p){return p()}),a.fb=[],z(n,Promise.all(c),2);case 2:a.dispatchEvent(el(sl));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.rb();a.Wa&&(a.Wa.release(),a.Wa=null);a.hd&&(a.hd.stop(),a.hd=null);if(!a.J){n.D(3);break}return z(n,a.J.stop(),4);case 4:a.J=null,a.md=null;case 3:if(!a.
|
|
381
|
+
function Wk(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=hl&&(a.l=Rk),c=a.fb.map(function(p){return p()}),a.fb=[],z(n,Promise.all(c),2);case 2:a.dispatchEvent(el(sl));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.rb();a.Wa&&(a.Wa.release(),a.Wa=null);a.hd&&(a.hd.stop(),a.hd=null);if(!a.J){n.D(3);break}return z(n,a.J.stop(),4);case 4:a.J=null,a.md=null;case 3:if(!a.C){n.D(5);break}return z(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);break}return z(n,a.j.destroy(),
|
|
382
382
|
8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.N){n.D(9);break}return z(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return z(n,new Promise(function(p){return(new Q(p)).S(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return z(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.hb=null;a.K=null;if(a.i){d=r(a.i.variants);
|
|
383
|
-
for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.
|
|
383
|
+
for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.B=new Qk;a.le=null;tl(a);B(n)}})}
|
|
384
384
|
function Xk(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=new Ph,d=a.h.textDisplayFactory,e=Gb(d),a.le=d,f=ul(b.M,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())vl(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),z(g,f.G,2);a.N=f;B(g)})}
|
|
385
385
|
function Yk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.hb=d,f=a,z(h,ng(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.md=h.h;a.J=Gb(a.md);g=Ze(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);B(h)})}
|
|
386
386
|
function Zk(a,b){var c=b.uri,d=a.H;a.od=new cj(function(){return a.La()});a.od.addEventListener("regionadd",function(g){g=g.region;wl(a,xl,g);if(a.F)a.F.onDashTimedMetadata(g)});a.ma=null;a.h.streaming.observeQualityChanges&&(a.ma=new Xi(function(){return a.zb()}),a.ma.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
|
|
387
387
|
mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(el(yl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.A=h.format,sk(k,g,{ot:vk,su:!k.i}))}catch(l){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){ik(a.W,g,h)},filter:function(g){return zl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Al(a,g)},
|
|
388
388
|
onTimelineRegionAdded:function(g){var h=a.od;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new O("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return rl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
389
|
-
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Se(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,z(m,a.J.start(c,e),2);g.i=m.h;h=el(Bl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Cl(a.i);k=Date.now()/1E3;l=k-f;a.
|
|
390
|
-
function $k(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Dl(a,{Pb:a.H,onError:function(f){rl(a,f)},qd:function(f){El(a,f)},onExpirationUpdated:function(f,g){Fl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Gl&&d&&(d=!1,a.
|
|
391
|
-
function al(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Ac&&(b.startTime=a.Ac,a.Ac=null);d=b.M;e=b.uri;a.hb=e;a.I=new Ti({fd:function(){return d.playbackRate},cd:function(){return d.defaultPlaybackRate},we:function(w){d.playbackRate=w},nf:function(w){d.currentTime+=w}});f=function(){return Hl(a)};g=function(){return Il(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.
|
|
392
|
-
(a.ge=h,a.
|
|
389
|
+
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Se(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,z(m,a.J.start(c,e),2);g.i=m.h;h=el(Bl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Cl(a.i);k=Date.now()/1E3;l=k-f;a.B.H=l;B(m)})}(),function(){return a.J.stop()})}
|
|
390
|
+
function $k(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Dl(a,{Pb:a.H,onError:function(f){rl(a,f)},qd:function(f){El(a,f)},onExpirationUpdated:function(f,g){Fl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Gl&&d&&(d=!1,a.B.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),z(e,If(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?z(e,a.m.xc(b.M),3):z(e,zl(a,a.i),0)})}
|
|
391
|
+
function al(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Ac&&(b.startTime=a.Ac,a.Ac=null);d=b.M;e=b.uri;a.hb=e;a.I=new Ti({fd:function(){return d.playbackRate},cd:function(){return d.defaultPlaybackRate},we:function(w){d.playbackRate=w},nf:function(w){d.currentTime+=w}});f=function(){return Hl(a)};g=function(){return Il(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ge==h||
|
|
392
|
+
(a.ge=h,a.C=Gb(h),"function"!=typeof a.C.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.C.playbackRateChanged=function(){}),a.C.configure(a.h.abr));a.Aa=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ba=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.jb=a.h.preferForcedSubs;Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(w,x,D){a.j&&w!=a.j.l&&Kl(a,w,!0,void 0===
|
|
393
393
|
x?!1:x,void 0===D?0:D)});a.G=Ll(a,b.startTime);a.Wa=Ml(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Nl(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Ol(a);a.j.configure(a.h.streaming);a.l=Pl;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "chapters":Ql(a,w)}});a.dispatchEvent(el(Rl));l=null;if(m=a.Za().find(function(w){return w.active})){y.D(2);break}l=
|
|
394
|
-
Sl(a)?a.
|
|
395
|
-
Xl(a)),ce(a.j?a.j.l:null,a.i),Yl(a.i),Zl(a),Sl(a),a.i.variants.some(function(w){return w.primary}),a.A.Ga(d,"loadedmetadata",function(){a.
|
|
396
|
-
function bl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=Dl(a,{Pb:a.H,onError:function(n){rl(a,n)},qd:function(n){El(a,n)},onExpirationUpdated:function(n,p){Fl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Gl&&f&&(f=!1,a.
|
|
394
|
+
Sl(a)?a.C.chooseVariant():null;Kl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.G.m();return z(y,Tl(l,n),4);case 4:p=y.h,a.G.A(p);case 3:Ul(a,null,le(l));case 2:return t=a.pb().find(function(w){return w.active}),t||((v=ve(a.i.textStreams,a.Ba,a.wb,a.jb)[0]||null)&&Pk(a.B.h,v,!0),l&&(v?(l.audio&&Vl(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),Wl(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Ob())&&vj(a.j,v)),z(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),
|
|
395
|
+
Xl(a)),ce(a.j?a.j.l:null,a.i),Yl(a.i),Zl(a),Sl(a),a.i.variants.some(function(w){return w.primary}),a.A.Ga(d,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Be}),B(y)}})}
|
|
396
|
+
function bl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=Dl(a,{Pb:a.H,onError:function(n){rl(a,n)},qd:function(n){El(a,n)},onExpirationUpdated:function(n,p){Fl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Gl&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=pg(g),k=pl[h],"application/x-mpegurl"==k&&ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
|
|
397
397
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,z(m,If(a.m,[l],[]),2)):z(m,a.m.xc(b.M),
|
|
398
398
|
0)})}
|
|
399
399
|
function cl(a,b,c){function d(){return Hl(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.M;a.G=new Ii(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.G.A(b.startTime);a.I=new Ti({fd:function(){return e.playbackRate},cd:function(){return e.defaultPlaybackRate},we:function(k){e.playbackRate=k},nf:function(k){e.currentTime+=k}});Nl(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return Il(a)});"none"!=e.preload&&
|
|
400
|
-
a.A.Ga(e,"loadedmetadata",function(){a.
|
|
400
|
+
a.A.Ga(e,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Be});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"change",function(){return Zl(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":$l(a,k);break;case "chapters":Ql(a,k);break;default:Zl(a)}}),a.A.o(e.textTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.textTracks,
|
|
401
401
|
"change",function(){return Zl(a)}));var g=pg(b.uri);e.src=tk(a.W,b.uri,pl[g]);(Yc()||Zc())&&e.load();a.l=am;a.dispatchEvent(el(Rl));var h=new Pc;zi(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){h.resolve()});zi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return bm(a),k=cm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):z(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).S(1)}),2);if(f)return l["return"]();dm(a);B(l)})});e.error?
|
|
402
402
|
h.reject(ql(a)):"none"==e.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.A.Ga(e,"error",function(){h.reject(ql(a))});return new Se(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
|
|
403
403
|
function bm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.wd(b);var c=a.h.preferredVariantRole;""!=c&&a.wd(b,c)}}function dm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.oe(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.oe(b,d,c)}}
|
|
404
404
|
function $l(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,vl(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=em(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}
|
|
405
405
|
function vl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(el(fm,b))}function Ql(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}function Cl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function Dl(a,b){return new Bf(b,a.h.drm.updateExpirationTime)}
|
|
406
|
-
function Tk(a){return new cf(function(b,c){a.
|
|
406
|
+
function Tk(a){return new cf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(el(gm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(el(hm,b))})}
|
|
407
407
|
function Ll(a,b){return new Ji(a.g,a.i,a.h.streaming,b,function(){a.Wa&&Wi(a.Wa,!0);if(a.j)for(var c=a.j,d=c.g.ed(),e=c.h.smallGapLimit,f=r(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ua=null;var k=c.g.V;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=di(k,g),k=Sh(k,d,e));if(!k&&((null!=ei(c.g.V,g)||h.ab)&&yj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Mb))for(g=c.g.V.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Fh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())Ah(h.value)}a.K&&
|
|
408
408
|
im(a)},function(c){return a.dispatchEvent(c)})}function Ml(a){var b=new dj(a.od);b.addEventListener("enter",function(d){wl(a,jm,d.region)});b.addEventListener("exit",function(d){wl(a,km,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(wl(a,jm,e),wl(a,km,e))});var c=new Vi(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function Nl(a,b){a.K=new Le;a.K.g=Ne;Oe(a.K,b,Math.min(.5,b/2));tl(a);a.hd=(new Q(function(){im(a)})).ha(.25)}
|
|
409
409
|
function im(a){switch(a.l){case am:if(a.g.ended)var b=!0;else{var c=Rh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Pl:a:if(a.g.ended||bi(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Jb();var d=Rh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Th(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Me:Ne;c.g=d;b!=d&&tl(a)}function ul(a,b,c,d){return new Wh(a,b,c,d)}
|
|
410
|
-
function nl(a){return new hk({getBandwidthEstimate:function(){return a.
|
|
411
|
-
function Ol(a){return new jj(a.i,{ed:function(){return a.G.m()},getBandwidthEstimate:function(){return a.
|
|
410
|
+
function nl(a){return new hk({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
|
|
411
|
+
function Ol(a){return new jj(a.i,{ed:function(){return a.G.m()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ik(a.W,b,c)},V:a.N,Pb:a.H,onError:function(b){return rl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Mg:function(){a.J&&a.J.update&&a.J.update()},fe:function(){a.G&&a.G.G();im(a)},Lg:function(b,c){var d=c.Zd;d&&a.ma&&aj(a.ma,d,b)}})}
|
|
412
412
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
|
|
413
413
|
0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Jk(this.h,a,Sk(this));lm(this);return c};
|
|
414
|
-
function lm(a){if(a.J){var b=Ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{mm(a,a.i)}catch(f){rl(a,f)}a.
|
|
415
|
-
tj(b,c.stream,!0,0,!0))}a.
|
|
414
|
+
function lm(a){if(a.J){var b=Ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{mm(a,a.i)}catch(f){rl(a,f)}a.C&&Sl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||nm(a)}a.H&&a.H.ue(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.le!=b)){var c=Gb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.le=b;a.j&&(b=a.j,(c=b.i.get(Mb))&&
|
|
415
|
+
tj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),Xl(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Oe(a.K,b,Math.min(.5,b/2)));a.i&&Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Sk(this);Jk(a,this.h,Sk(this));return a};
|
|
416
416
|
q.Wf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.La().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Wg=function(){for(var a in this.h)delete this.h[a];Jk(this.h,Sk(this),Sk(this));lm(this)};q.cf=function(){return this.l};q.ng=function(){return this.g};q.Dc=function(){return this.H};q.Td=function(){return this.hb};
|
|
417
417
|
q.bd=function(){return this.F?this.F:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.i?this.i.presentationTimeline.Mb():!1};q.jf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
418
418
|
q.La=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.bc(),end:a.mb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Ag=function(){this.T()&&(this.g.currentTime=this.La().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Cc=function(){return this.m?this.m.Cc():Infinity};q.dd=function(){return this.m?this.m.dd():{}};
|
|
419
|
-
q.Ic=function(){return this.K?this.K.g==Ne:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.Fe=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Pl&&(this.
|
|
419
|
+
q.Ic=function(){return this.K?this.K.g==Ne:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.Fe=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Pl&&(this.C.playbackRateChanged(a),sj(this.j,1<Math.abs(a))))};q.Pe=function(){var a=this.I.cd();this.l==am&&this.I.set(a);this.l==Pl&&(this.I.set(a),this.C.playbackRateChanged(a),sj(this.j,!1))};
|
|
420
420
|
q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,te(e)){var f=le(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return se(g)}):[]};
|
|
421
421
|
q.pb=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=me(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?cm(this).map(function(f){return qe(f)}):[]};q.fg=function(){return this.i?this.i.imageStreams.map(function(a){return ne(a)}):[]};
|
|
422
422
|
q.wg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,C,A;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):z(F,d.createSegmentIndex(),3):F["return"](null):F.D(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
|
|
423
423
|
v=m*n;y=f.l-f.startTime;w=f.i||y/v;x=f.startTime;C=D=0;1<v&&(A=Math.floor((b-f.startTime)/w),x=f.startTime+A*w,D=A%m*p,C=Math.floor(A/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:C,startTime:x,duration:w,uris:f.Ka(),width:p})}return F["return"](null)})};
|
|
424
|
-
q.pe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Pk(this.
|
|
424
|
+
q.pe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Pk(this.B.h,b,!1),vj(this.j,b),om(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=cm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";om(this)}};
|
|
425
425
|
q.qe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&te(d)&&(Kl(this,d,!1,b,c),this.Aa=new Fe(d),Sl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
426
426
|
oe(c)==a.id){pm(this,c);break}};q.Vf=function(){return qm(this.Za())};q.vg=function(){return qm(this.pb())};q.Uf=function(){return Array.from(rm(this.Za()))};q.ug=function(){return Array.from(rm(this.pb()))};
|
|
427
427
|
q.wd=function(a,b){if(this.i&&this.G){this.Aa=new Ge(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Aa.create(this.i.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=le(f),this.qe(c,!0)):nm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Qb(a);f=d=null;e=
|
|
428
428
|
r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=se(g);Qb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?pm(this,f):d&&pm(this,d)}};
|
|
429
|
-
q.oe=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ba=a,this.wb=b||"",this.jb=c,(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb)[0]||null)&&a!=this.j.A&&(Pk(this.
|
|
429
|
+
q.oe=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ba=a,this.wb=b||"",this.jb=c,(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb)[0]||null)&&a!=this.j.A&&(Pk(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))vj(this.j,a),om(this)}else{var d=Qb(a);(a=this.pb().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.pe(a)}};
|
|
430
430
|
q.Yg=function(a){if(this.i&&this.G){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Aa=new Ge(b.language,"",0,a),nm(this))}};q.Ob=function(){var a=this.ba;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?cm(this).some(function(b){return"showing"==b.mode}):a};q.$e=function(){return this.g&&this.g.src&&this.g.textTracks?sm(this).map(function(a){return qe(a)}):[]};
|
|
431
431
|
q.Yf=function(a){var b=Qb(a),c=sm(this).filter(function(f){return Qb(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function cm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
|
|
432
432
|
function em(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function sm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
433
433
|
q.ze=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Pl)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb),0<a.length&&(vj(this.j,a[0]),om(this))):rj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=cm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Wl(this)}};
|
|
434
434
|
q.pg=function(){if(!this.T())return null;var a=this.na.l,b=0;if(this.G)b=this.G.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
435
435
|
q.df=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zb=function(){if(this.l==Pl)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==am&&(a.total=Uh(this.g.buffered));return a};
|
|
436
|
-
q.getStats=function(){if(this.l!=Pl&&this.l!=am)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Hl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.
|
|
437
|
-
b:Math.max(c.i,b)}a.getVideoPlaybackQuality
|
|
438
|
-
(this.
|
|
439
|
-
estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:y,liveLatency:w,maxSegmentDuration:x,stateHistory:D,switchHistory:C}};
|
|
436
|
+
q.getStats=function(){if(this.l!=Pl&&this.l!=am)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Hl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
437
|
+
b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.B.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.B.B=c;if(this.l==Pl){if(c=this.j.l)this.B.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.B,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.T()&&(c=this.df().valueOf()+1E3*this.La().end,this.B.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
|
|
438
|
+
(this.B.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.B.C=c}this.l==am&&(c=this.B,b=a.videoHeight||NaN,c.A=a.videoWidth||NaN,c.l=b);var e=this.B;a=e.A;c=e.l;b=e.F;d=e.K;var f=e.N,g=e.J,h=e.C,k=e.i,l=e.m,m=e.H,n=e.j,p=Mk(e.g,"playing"),t=Mk(e.g,"paused"),v=Mk(e.g,"buffering"),y=e.B,w=e.G,x=e.I,D=Nk(e.g),C=[];e=r(e.h.g);for(var A=e.next();!A.done;A=e.next())A=A.value,C.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,
|
|
439
|
+
height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:y,liveLatency:w,maxSegmentDuration:x,stateHistory:D,switchHistory:C}};
|
|
440
440
|
q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;zb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=Pl&&this.l!=am)throw new P(1,7,7004);if(!d){var h=pg(a);d=tm[h];if(!d)throw new P(1,2,2011,h);}if(this.l==am){if("text/vtt"!=d)throw new P(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=yk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.pb().find(function(k){return k.language==
|
|
441
441
|
b&&k.label==(f||"")&&k.kind==c}))return Zl(this),a;throw new P(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new P(1,4,4033);a={id:this.Ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ri(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
|
|
442
442
|
closedCaptions:null};if(!Fd(yd(a.mimeType,a.codecs)))throw new P(2,2,2014,d);this.i.textStreams.push(a);Zl(this);return me(a)};
|
|
@@ -455,9 +455,9 @@ function ym(a,b){var c;return M(function(d){if(1==d.g)return c=a.j?a.j.l:null,z(
|
|
|
455
455
|
function mm(a,b){if(a.l!=hl){for(var c=a.h.restrictions,d=a.Je,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=$d(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Zl(a);if((c=a.m?a.m.g:null)&&a.m.B)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
|
|
456
456
|
f.next())g=g.value,Rf(a.m,g.initDataType,g.initData);zm(a,b)}}
|
|
457
457
|
function Tl(a,b){var c,d,e,f,g;return M(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return M(function(t){if(1==t.g)return k?z(t,k.createSegmentIndex(),2):t["return"](null);n=(m=k.segmentIndex.Ib(l))?m.next().value:null;if(!n)return t["return"](null);p=n.startTime;return t["return"](p)})},z(h,e(c,b),2);if(3!=h.g)return f=h.h,z(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
|
|
458
|
-
function tl(a){var b=a.Ic();if(a.
|
|
459
|
-
function Sl(a){try{zm(a,a.i)}catch(c){return rl(a,c),!1}var b=a.i.variants.filter(function(c){return te(c)});b=a.Aa.create(b);a.
|
|
460
|
-
function Kl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&uj(a.j,b,d,e,!0);else{var g=a.
|
|
458
|
+
function tl(a){var b=a.Ic();if(a.B&&a.K&&a.G){var c=a.I;c.j=b;Ui(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Hl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(el(Am,b))}function Il(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=el(Bm),a.dispatchEvent(b))}function Hl(a){if(a.B&&a.K){var b=a.B.g;a.K.g==Ne?Lk(b,"buffering"):a.g.paused?Lk(b,"paused"):a.g.ended?Lk(b,"ended"):Lk(b,"playing")}}
|
|
459
|
+
function Sl(a){try{zm(a,a.i)}catch(c){return rl(a,c),!1}var b=a.i.variants.filter(function(c){return te(c)});b=a.Aa.create(b);a.C.setVariants(Array.from(b.values()));return!0}function nm(a){var b;(b=Sl(a)?a.C.chooseVariant():null)&&Kl(a,b,!0,!0,0)}
|
|
460
|
+
function Kl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&uj(a.j,b,d,e,!0);else{var g=a.B.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));uj(a.j,b,d,e);d=null;f&&(d=le(f));b=le(b);c?Ul(a,d,b):Cm(a,d,b)}}function pm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=se(c);var d=se(b);Cm(a,c,d)}
|
|
461
461
|
function Vl(a,b,c){a=Qb(a.h.preferredTextLanguage);b=Qb(b.language);c=Qb(c.language);return Pb(c,a)&&!Pb(b,c)}function Ul(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=el(Dm,b);Em(a,b)}function Zl(a){var b=el(Fm);Em(a,b)}function Cm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=el(Gm,b);Em(a,b)}function om(a){var b=el(Hm);Em(a,b)}function Wl(a){var b=el(Im);Em(a,b)}function Xl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Em(a,el(Jm,b))}
|
|
462
462
|
function rl(a,b){if(a.l!=hl){var c=el(Km,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function wl(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(el(b,c))}
|
|
463
463
|
function ql(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new P(2,3,3016,b,c,a.g.error.message)}
|
|
@@ -476,13 +476,13 @@ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h
|
|
|
476
476
|
Sc()?!!qg[p]:Uc(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(","));
|
|
477
477
|
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Sc()?Fd(l)?!0:MediaSource.isTypeSupported(l)||ud(l):Uc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Nm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=il;T.setAdManagerFactory=function(a){Uk=a};T.registerSupportPlugin=function(a,b){Nm[a]=b};T.prototype.destroy=T.prototype.destroy;
|
|
478
478
|
var Jm="abrstatuschanged",Dm="adaptation",Am="buffering",hm="downloadfailed",gm="downloadheadersreceived",Gl="drmsessionupdate",Kj="emsg",Km="error",Mm="expirationupdated",ol="loaded",ll="loading",Bl="manifestparsed",yl="mediaqualitychanged",fm="metadata",fl="onstatechange",gl="onstateidle",Bm="ratechange",Rl="streaming",Hm="textchanged",Im="texttrackvisibility",xl="timelineregionadded",jm="timelineregionenter",km="timelineregionexit",Fm="trackschanged",sl="unloading",Gm="variantchanged",Om={ph:Jm,
|
|
479
|
-
qh:Dm,rh:Am,wh:hm,xh:gm,yh:Gl,Gh:Kj,Error:Km,Hh:Mm,Nh:"largegap",Oh:ol,Ph:ll,Th:Bl,Uh:yl,Metadata:fm,Zh:fl,$h:gl,ji:Bm,pi:"sessiondata",ri:Rl,si:Hm,ti:Im,wi:xl,xi:jm,zi:km,Ai:Fm,Ei:sl,Gi:Gm},hl=0,Rk=1,Pl=2,am=3;T.LoadMode={DESTROYED:hl,NOT_LOADED:Rk,MEDIA_SOURCE:Pl,SRC_EQUALS:am};T.version="v3.3.
|
|
479
|
+
qh:Dm,rh:Am,wh:hm,xh:gm,yh:Gl,Gh:Kj,Error:Km,Hh:Mm,Nh:"largegap",Oh:ol,Ph:ll,Th:Bl,Uh:yl,Metadata:fm,Zh:fl,$h:gl,ji:Bm,pi:"sessiondata",ri:Rl,si:Hm,ti:Im,wi:xl,xi:jm,zi:km,Ai:Fm,Ei:sl,Gi:Gm},hl=0,Rk=1,Pl=2,am=3;T.LoadMode={DESTROYED:hl,NOT_LOADED:Rk,MEDIA_SOURCE:Pl,SRC_EQUALS:am};T.version="v3.3.10";var Pm=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(Pm[0]),Number(Pm[1])));
|
|
480
480
|
var Lm=["output-restricted","internal-error"],Nm={},Uk=null,pl={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"},tm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
481
481
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function Qm(){this.h=[];this.j=this.i=this.g=0};function Rm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new qf;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=Rm.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};
|
|
482
482
|
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()};
|
|
483
483
|
q.isLinear=function(){return this.h.isLinear()};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};
|
|
484
484
|
N("shaka.ads.ClientSideAd",Rm);Rm.prototype.release=Rm.prototype.release;Rm.prototype.getPositionInSequence=Rm.prototype.getPositionInSequence;Rm.prototype.getSequenceLength=Rm.prototype.getSequenceLength;Rm.prototype.setMuted=Rm.prototype.setMuted;Rm.prototype.resize=Rm.prototype.resize;Rm.prototype.isLinear=Rm.prototype.isLinear;Rm.prototype.isMuted=Rm.prototype.isMuted;Rm.prototype.setVolume=Rm.prototype.setVolume;Rm.prototype.getVolume=Rm.prototype.getVolume;Rm.prototype.play=Rm.prototype.play;
|
|
485
|
-
Rm.prototype.pause=Rm.prototype.pause;Rm.prototype.skip=Rm.prototype.skip;Rm.prototype.canSkipNow=Rm.prototype.canSkipNow;Rm.prototype.getTimeUntilSkippable=Rm.prototype.getTimeUntilSkippable;Rm.prototype.isSkippable=Rm.prototype.isSkippable;Rm.prototype.isPaused=Rm.prototype.isPaused;Rm.prototype.getRemainingTime=Rm.prototype.getRemainingTime;Rm.prototype.getMinSuggestedDuration=Rm.prototype.getMinSuggestedDuration;Rm.prototype.getDuration=Rm.prototype.getDuration;function Sm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new qf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.
|
|
485
|
+
Rm.prototype.pause=Rm.prototype.pause;Rm.prototype.skip=Rm.prototype.skip;Rm.prototype.canSkipNow=Rm.prototype.canSkipNow;Rm.prototype.getTimeUntilSkippable=Rm.prototype.getTimeUntilSkippable;Rm.prototype.isSkippable=Rm.prototype.isSkippable;Rm.prototype.isPaused=Rm.prototype.isPaused;Rm.prototype.getRemainingTime=Rm.prototype.getRemainingTime;Rm.prototype.getMinSuggestedDuration=Rm.prototype.getMinSuggestedDuration;Rm.prototype.getDuration=Rm.prototype.getDuration;function Sm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new qf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.10");this.g=null;this.h.Ga(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Tm(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
486
486
|
function(f){Um(e,f)});this.i.onended=function(){e.m.contentComplete()}}Sm.prototype.stop=function(){this.g&&this.g.stop();this.A&&Yj(this.A)};Sm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Um(a,b){b.getError();Vm(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
487
487
|
function Tm(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new O("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.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Wm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
488
488
|
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.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){Vm(a,null)}}
|
|
@@ -503,8 +503,8 @@ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Zm.prototyp
|
|
|
503
503
|
function $m(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||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.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new Qm;this.j=navigator.language}u(U,cb);q=U.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 P(2,10,1E4);this.i&&this.i.release();this.i=new Sm(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)})};
|
|
504
504
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new Qm};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
|
|
505
505
|
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Zm(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)})};
|
|
506
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('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.3.
|
|
507
|
-
(c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('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.3.
|
|
506
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('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.3.10";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
507
|
+
(c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('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.3.10";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
|
|
508
508
|
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)};N("shaka.ads.AdManager",U);
|
|
509
509
|
U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
|
|
510
510
|
U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
|
|
@@ -689,10 +689,10 @@ v="YES"==t;return z(w,xr(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.C.has(c)?a.C.get
|
|
|
689
689
|
function rr(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=wr(Fq(b,"URI"),a.A);d=Eq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=vr(b);f=Eq(b,"NAME");g=Eq(b,"CHARACTERISTICS");return z(p,xr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Eq(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
|
|
690
690
|
Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Eq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
|
|
691
691
|
function tr(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=wr(Fq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Eq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return z(l,xr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
|
|
692
|
-
function xr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,y,w,x,D,C,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd,gb,Tc,He,pp,qp,rp,sp,Zi,$i,jg,tp,up,vp,wp;return M(function(
|
|
693
|
-
W=Fq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ba=!0,
|
|
694
|
-
if(4035==He.code)return Sa("Skipping unsupported HLS stream",ac,b),
|
|
695
|
-
drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Zi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return
|
|
692
|
+
function xr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,y,w,x,D,C,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd,gb,Tc,He,pp,qp,rp,sp,Zi,$i,jg,tp,up,vp,wp;return M(function(mb){switch(mb.g){case 1:return t=Hb([a.N],[b])[0],z(mb,ar(a,t),2);case 2:v=mb.h;t=v.uri;y=Rq(a.$,v.data,t);if(1!=y.type)throw new P(2,4,4017);w=[];if(y.segments)for(x=r(y.segments),D=x.next();!D.done;D=x.next())C=D.value,A=Iq(C.g,"EXT-X-KEY"),w.push.apply(w,ia(A));F=!1;G=[];H=new Set;K=r(w);for(J=K.next();!J.done;J=K.next())if(L=J.value,
|
|
693
|
+
W=Fq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ba=!0,mb["return"](null);Z=Fq(L,"KEYFORMAT");if(ja=(ka=yr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Iq(y.g,"EXT-X-DEFINE");Qa=er(a,Da);zr(a,y);return z(mb,Ar(a,d,c,y,Qa),3);case 3:return ac=mb.h,Br.includes(ac)&&(c=""),Dd=new Map,gb=new Map,E(mb,4),z(mb,fr(a,b,y,d,ac,Dd,Qa,gb,c,p),6);case 6:Tc=mb.h;va(mb,5);break;case 4:He=I(mb);
|
|
694
|
+
if(4035==He.code)return Sa("Skipping unsupported HLS stream",ac,b),mb["return"](null);throw He;case 5:pp=Tc[0].startTime;qp=Tc[Tc.length-1].endTime;rp=new Pi(Tc);sp=d==Mb?"subtitle":void 0;Zi=[];if(l)for($i=r(l.split(",")),jg=$i.next();!jg.done;jg=$i.next())tp=jg.value,Zi.push(tp);vp=(up=Kq(y.g,"EXT-X-SERVER-CONTROL"))?null!=up.getAttribute("CAN-SKIP-UNTIL"):!1;wp={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:rp,mimeType:ac,codecs:c,kind:sp,encrypted:F,
|
|
695
|
+
drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Zi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return mb["return"]({stream:wp,yd:b,If:t,mf:pp,Ig:qp,$d:Dd,Sf:gb,Nf:vp})}})}
|
|
696
696
|
function zr(a,b){var c=Kq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Kq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)gr(a,$q);else{c?gr(a,Cr):gr(a,Dr);d=Kq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Kq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Fq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Kq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Fq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.aa=Math.max(d,a.aa)}}
|
|
697
697
|
function Er(a,b,c,d){c=Kq(c,"EXT-X-MAP");if(!c)return null;var e=Fq(c,"URI");d=wr(Hb([b],[e])[0],d);b=[d,Eq(c,"BYTERANGE","")].join("-");a.va.has(b)||(c=Fr(d,c),a.va.set(b,c));return a.va.get(b)}function Fr(a,b){var c=0,d=null,e=Eq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new qi(function(){return[a]},c,d)}
|
|
698
698
|
function Gr(a,b,c,d,e,f,g,h,k){var l=d.g,m=wr(d.h,g),n=Kq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={Id:y.Id},w++){var x=d.i[w],D=0==w?c:v[v.length-1],C=0==w?e:D.endTime,A=Number(Eq(x,"DURATION"))||a.ba;if(A){A=C+A;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(D=Eq(x,"BYTERANGE-START"))?Number(D):0:(F=Eq(x,"BYTERANGE"),D=r(Hr(D,F)),F=D.next().value,G=D.next().value);if(x=Eq(x,"URI"))y.Id=Hb([h],
|