shaka-player 4.8.1 → 4.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deps.js +1 -1
- package/dist/locales.js +35 -35
- package/dist/shaka-player.compiled.debug.js +110 -106
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +223 -223
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +31 -27
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +301 -301
- package/dist/shaka-player.ui.map +2 -2
- package/lib/dash/mpd_utils.js +0 -6
- package/lib/dash/segment_template.js +5 -0
- package/lib/media/playhead.js +3 -3
- package/lib/media/segment_prefetch.js +20 -4
- package/lib/media/streaming_engine.js +5 -0
- package/lib/player.js +1 -1
- package/lib/text/ui_text_displayer.js +12 -1
- package/lib/util/platform.js +21 -0
- package/lib/util/tXml.js +1 -1
- package/package.json +1 -1
- package/ui/resolution_selection.js +1 -0
package/dist/shaka-player.ui.js
CHANGED
|
@@ -67,10 +67,10 @@ var hb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
67
67
|
Copyright 2006 The Closure Library Authors
|
|
68
68
|
SPDX-License-Identifier: Apache-2.0
|
|
69
69
|
*/
|
|
70
|
-
function ib(a){var b;a instanceof ib?(jb(this,a.Fb),this.
|
|
71
|
-
q.toString=function(){var a=[],b=this.Fb;b&&a.push(rb(b,tb,!0),":");if(b=this.Tb){a.push("//");var c=this.
|
|
72
|
-
q.resolve=function(a){var b=this.clone();"data"===b.Fb&&(b=new ib);var c=!!a.Fb;c?jb(b,a.Fb):c=!!a.
|
|
73
|
-
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.jb=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.
|
|
70
|
+
function ib(a){var b;a instanceof ib?(jb(this,a.Fb),this.Jc=a.Jc,kb(this,a.Tb),lb(this,a.dd),this.jb=a.jb,nb(this,a.g.clone()),this.uc=a.uc):a&&(b=String(a).match(hb))?(jb(this,b[1]||"",!0),this.Jc=ob(b[2]||""),kb(this,b[3]||"",!0),lb(this,b[4]),this.jb=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.uc=ob(b[7]||"")):this.g=new pb(null)}q=ib.prototype;q.Fb="";q.Jc="";q.Tb="";q.dd=null;q.jb="";q.uc="";
|
|
71
|
+
q.toString=function(){var a=[],b=this.Fb;b&&a.push(rb(b,tb,!0),":");if(b=this.Tb){a.push("//");var c=this.Jc;c&&a.push(rb(c,tb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.dd;null!=b&&a.push(":",String(b))}if(b=this.jb)this.Tb&&"/"!=b.charAt(0)&&a.push("/"),a.push(rb(b,"/"==b.charAt(0)?ub:vb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.uc)&&a.push("#",rb(b,wb));return a.join("")};
|
|
72
|
+
q.resolve=function(a){var b=this.clone();"data"===b.Fb&&(b=new ib);var c=!!a.Fb;c?jb(b,a.Fb):c=!!a.Jc;c?b.Jc=a.Jc:c=!!a.Tb;c?kb(b,a.Tb):c=null!=a.dd;var d=a.jb;if(c)lb(b,a.dd);else if(c=!!a.jb){if("/"!=d.charAt(0))if(this.Tb&&!this.jb)d="/"+d;else{var e=b.jb.lastIndexOf("/");-1!=e&&(d=b.jb.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(""):".."==
|
|
73
|
+
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.jb=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.uc;c&&(b.uc=a.uc);return b};q.clone=function(){return new ib(this)};function jb(a,b,c){a.Fb=c?ob(b,!0):b;a.Fb&&(a.Fb=a.Fb.replace(/:$/,""))}function kb(a,b,c){a.Tb=c?ob(b,!0):b}function lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.dd=b}else a.dd=null}
|
|
74
74
|
function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=rb(b,xb)),a.g=new pb(b))}function ob(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function rb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,yb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function yb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var tb=/[#\/\?@]/g,vb=/[#\?:]/g,ub=/[#\?]/g,xb=/[#\?@]/g,wb=/#/g;function pb(a){this.g=a||null}
|
|
75
75
|
function zb(a){if(!a.Wa&&(a.Wa={},a.Ed=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.Wa=null;q.Ed=null;function Ab(a){zb(a);return a.Ed}q.add=function(a,b){zb(this);this.g=null;var c=this.Wa.hasOwnProperty(a)?this.Wa[a]:null;c||(this.Wa[a]=c=[]);c.push(b);this.Ed++;return this};
|
|
76
76
|
q.set=function(a,b){zb(this);this.g=null;this.Wa.hasOwnProperty(a)?this.Wa[a]=[b]:this.add(a,b);return this};q.get=function(a){zb(this);return this.Wa[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.Wa)return"";var a=[],b;for(b in this.Wa)for(var c=encodeURIComponent(b),d=this.Wa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
@@ -119,15 +119,15 @@ var Pc=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
119
119
|
q.$g=function(a){var b=this;this.g.clear();a=u(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Mc(c.value));Wc(this);a=gb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new Q("unknown-locales",(new Map).set("locales",a)));a=gb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new Q("locale-changed",a))};
|
|
120
120
|
q.Da=function(a,b,c){a=Mc(a);void 0===c&&(c=Xc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Xc||d.set(f,e)});this.h.set(a,d);Wc(this);this.dispatchEvent(new Q("locale-updated"));return this};q.Rj=function(a){for(var b=u(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 Q("unknown-localization",a));return""};
|
|
121
121
|
q.Ji=function(){return this.g};
|
|
122
|
-
function Wc(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=u(d),h=g.next();!h.done;f={
|
|
123
|
-
c.reverse();a.i.clear();b=u(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=u(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,
|
|
122
|
+
function Wc(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=u(d),h=g.next();!h.done;f={Oc:f.Oc},h=g.next()){f.Oc=h.value;e.add(f.Oc);e.add(Rc(f.Oc));h=gb(b.keys(),function(l){return function(m){return Qc(m,l.Oc)}}(f));h.sort();var k=u(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=gb(b.keys(),function(l){return function(m){return Rc(m)==l.Oc}}(f));h.sort();k=u(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=u(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
123
|
+
c.reverse();a.i.clear();b=u(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=u(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Yc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new Q("missing-localizations",d)))}function Yc(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}N("shaka.ui.Localization",Vc);Vc.prototype.getCurrentLocales=Vc.prototype.Ji;
|
|
124
124
|
Vc.prototype.resolve=Vc.prototype.resolve;Vc.prototype.resolveDictionary=Vc.prototype.Rj;Vc.prototype.insert=Vc.prototype.Da;Vc.prototype.changeLocale=Vc.prototype.$g;Vc.prototype.release=Vc.prototype.release;var Xc=1;Vc.ConflictResolution={USE_OLD:0,USE_NEW:Xc};Vc.UNKNOWN_LOCALES="unknown-locales";Vc.UNKNOWN_LOCALIZATION="unknown-localization";Vc.MISSING_LOCALIZATIONS="missing-localizations";Vc.LOCALE_CHANGED="locale-changed";Vc.LOCALE_UPDATED="locale-updated";function $c(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}$c.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function ad(a){return a.h/(1-Math.pow(a.g,a.i))};function bd(){this.h=new $c(2);this.j=new $c(5);this.g=0;this.i=128E3;this.l=16E3}bd.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)};bd.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};bd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(ad(this.h),ad(this.j))};function cd(){this.g=new $a}q=cd.prototype;q.release=function(){this.mb();this.g=null};q.s=function(a,b,c,d){this.g&&(a=new dd(a,b,c,d),this.g.push(b,a))};q.na=function(a,b,c,d){function e(g){f.Ya(a,b,e);c(g)}var f=this;this.s(a,b,e,d)};q.Ya=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ya(),this.g.remove(b,e))}};
|
|
125
125
|
q.mb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,y(a.g[c]));a=u(b);for(b=a.next();!b.done;b=a.next())b.value.Ya();this.g.g={}}};N("shaka.util.EventManager",cd);cd.prototype.removeAll=cd.prototype.mb;cd.prototype.unlisten=cd.prototype.Ya;cd.prototype.listenOnce=cd.prototype.na;cd.prototype.listen=cd.prototype.s;cd.prototype.release=cd.prototype.release;function dd(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ed(a,d);this.target.addEventListener(b,c,this.g)}
|
|
126
126
|
dd.prototype.Ya=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ed(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return fd(a)?b:b.capture||!1}
|
|
127
127
|
function fd(a){var b=gd;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}gd=b}return b||!1}var gd=void 0;function hd(a){if(id.has(a))return id.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);id.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),id.set(a,b),b):!1}function jd(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var id=new Map;function kd(a,b){this.g=a;this.h=b}kd.prototype.toString=function(){return"v"+this.g+"."+this.h};function ld(a,b){var c=new kd(5,0),d=md,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function nd(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function od(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var md=null;function pd(){}pd.prototype.extract=function(){};pd.prototype.decode=function(){return[]};pd.prototype.clear=function(){};pd.prototype.getStreams=function(){return[]};function qd(){}qd.prototype.init=function(){};qd.prototype.parse=function(){return[]};function rd(){}rd.prototype.init=function(){};rd.prototype.i=function(){};rd.prototype.h=function(){};rd.prototype.j=function(){};N("shaka.media.IClosedCaptionParser",rd);function sd(a){this.l=new qd;if(a=td[a.toLowerCase()])this.l=a();this.g=new pd;if(a=ud)this.g=a()}sd.prototype.init=function(a){this.l.init(a)};sd.prototype.i=function(a){a=this.l.parse(a);a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Fb(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};
|
|
128
|
-
sd.prototype.h=function(){this.g.clear()};sd.prototype.j=function(){return this.g.getStreams()};N("shaka.media.ClosedCaptionParser",sd);sd.findDecoder=function(){return ud};sd.unregisterDecoder=function(){ud=null};sd.registerDecoder=function(a){ud=a};sd.findParser=function(a){return td[a]};sd.unregisterParser=function(a){delete td[a]};sd.registerParser=function(a,b){td[a]=b};var td={},ud=null;function vd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function wd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function
|
|
128
|
+
sd.prototype.h=function(){this.g.clear()};sd.prototype.j=function(){return this.g.getStreams()};N("shaka.media.ClosedCaptionParser",sd);sd.findDecoder=function(){return ud};sd.unregisterDecoder=function(){ud=null};sd.registerDecoder=function(a){ud=a};sd.findParser=function(a){return td[a]};sd.unregisterParser=function(a){delete td[a]};sd.registerParser=function(a,b){td[a]=b};var td={},ud=null;function vd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function wd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function xd(a,b,c){c||(c=vd);if(a.length!=b.length)return!1;b=b.slice();var d={};a=u(a);for(var e=a.next();!e.done;d={kf:d.kf},e=a.next()){d.kf=e.value;e=b.findIndex(function(f){return function(g){return c(f.kf,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
129
129
|
function Ad(a,b,c){c||(c=vd);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 Bd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Cd;this.position=null;this.positionAlign=Dd;this.size=0;this.textAlign=Ed;this.direction=Fd;this.writingMode=Gd;this.lineInterpretation=Hd;this.line=null;this.lineHeight="";this.lineAlign=Id;this.displayAlign=Jd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Kd;this.fontStyle=Ld;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
130
|
-
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={
|
|
130
|
+
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={tc:32,rows:15}}function Md(a,b){a=new Bd(a,b,"");a.lineBreak=!0;return a}Bd.prototype.clone=function(){var a=new Bd(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
131
131
|
function Pd(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(!Ad(a.nestedCues,b.nestedCues,Pd))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(!Ad(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",Bd);Bd.equal=Pd;Bd.prototype.clone=Bd.prototype.clone;var Dd="auto";
|
|
132
132
|
Bd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Dd};var Ed="center",Qd={LEFT:"left",RIGHT:"right",CENTER:Ed,START:"start",END:"end"};Bd.textAlign=Qd;var Jd="after",Rd={BEFORE:"before",CENTER:"center",AFTER:Jd};Bd.displayAlign=Rd;var Fd="ltr";Bd.direction={HORIZONTAL_LEFT_TO_RIGHT:Fd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Gd="horizontal-tb";Bd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Gd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Hd=0;
|
|
133
133
|
Bd.lineInterpretation={LINE_NUMBER:Hd,PERCENTAGE:1};var Id="start",Sd={CENTER:"center",START:Id,END:"end"};Bd.lineAlign=Sd;var Vd={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Bd.defaultTextColor=Vd;var Wd={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Bd.defaultTextBackgroundColor=Wd;var Kd=400;Bd.fontWeight={NORMAL:Kd,BOLD:700};
|
|
@@ -143,7 +143,7 @@ Ae.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)retu
|
|
|
143
143
|
function Ge(a,b,c){b.startTime+=c;b.endTime+=c;b=u(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ge(a,d.value,c)}
|
|
144
144
|
function He(a,b,c,d,e){var f=c+" "+d,g=new Map;b=u(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Ge(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.G&&a.j.append([k]))}e=u(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=u(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
145
145
|
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",Ae);Ae.prototype.destroy=Ae.prototype.destroy;Ae.findParser=function(a){return Ce[a]};Ae.unregisterParser=function(a){delete Ce[a]};Ae.registerParser=function(a,b){Ce[a]=b};var Ce={};function Ie(a,b){return a.concat(b)}function Je(){}function Ke(a){return null!=a};function Le(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Me(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ne(){}
|
|
146
|
-
function Oe(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Pe(e,b,c);if(d.length){b=new $a;c=u(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(t,x){t=0;var w=[],
|
|
146
|
+
function Oe(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Pe(e,b,c);if(d.length){b=new $a;c=u(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(t,x){t=0;var w=[],B={};x=u(x);for(var v=x.next();!v.done;B={zd:B.zd},v=x.next())B.zd=v.value,v=d.filter(function(A){return function(z){return A.zd.decodingInfos[0][z]}}(B)).length,v>t?(t=v,w=[B.zd]):v==t&&w.push(B.zd);f.push.apply(f,y(w))});e=f}c=new Set;b=new Set;var g=u(e);for(e=g.next();!e.done;e=
|
|
147
147
|
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(t,x){return t.bandwidth-x.bandwidth});var h=[];e=new Map;c=u(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=te(m.codecs),r=te(g.codecs);n==r&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(t,
|
|
148
148
|
x){return t.bandwidth&&x.bandwidth?t.bandwidth-x.bandwidth:t.width-x.width});b=jd();var p=[];e=new Map;c=u(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=te(m.codecs),r=te(g.codecs),n!==r))continue;g.width>m.width||g.height>m.height?(l.push(g),p.push(g.id)):g.width==m.width&&g.height==m.height&&(n=te(m.codecs),r=te(g.codecs),n==r&&g.bandwidth>m.bandwidth&&(l.push(g),p.push(g.id)))}else l.push(g),
|
|
149
149
|
p.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(t){var x=t.audio;t=t.video;return x&&!h.includes(x.id)||t&&!p.includes(t.id)?!1:!0})}
|
|
@@ -157,12 +157,12 @@ function cf(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=function(m,
|
|
|
157
157
|
null;n=u(n||[]);for(var p=n.next();!p.done;p=n.next())r=c(r,p.value);r&&(m.kd[m.ld]=r,d=c(d,r))}}(f)));return D(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);G(l)})}
|
|
158
158
|
function ef(a){var b=[""];a.video&&(b=ye(a.video.contentType).split(","));var c=[""];a.audio&&(c=ye(a.audio.contentType).split(","));var d=[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=u(c),h=g.next();!h.done;f={nc:f.nc},h=g.next())h=h.value,f.nc=Le(a),a.video&&(f.nc.video.contentType=ie(we(f.nc.video.contentType),e)),a.audio&&(f.nc.audio.contentType=ie(we(f.nc.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.nc).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
159
159
|
return null})}
|
|
160
|
-
function Xe(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
161
|
-
return D(C,cf(n,x),9);case 9:t=p.next();C.D(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();C.D(5);break;case 7:if(k)return C.return();f={mf:f.mf};h=g.next();C.D(2);break;case 4:w=u(a),m=w.next();case 12:if(m.done){C.D(0);break}
|
|
160
|
+
function Xe(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z;return L(function(C){switch(C.g){case 1:if(e=a.some(function(E){return E.decodingInfos.length}))return C.return();f={};g=u(d);h=g.next();case 2:if(h.done){C.D(4);break}f.mf=h.value;k=!1;l=u(a);m=l.next();case 5:if(m.done){C.D(7);break}n=m.value;r=ff(n,b,c).filter(function(E){return function(H){H=H[0];return(H.keySystemConfiguration&&H.keySystemConfiguration.keySystem)===E.mf}}(f));p=u(r);t=p.next();case 8:if(t.done){C.D(10);break}x=t.value;
|
|
161
|
+
return D(C,cf(n,x),9);case 9:t=p.next();C.D(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();C.D(5);break;case 7:if(k)return C.return();f={mf:f.mf};h=g.next();C.D(2);break;case 4:w=u(a),m=w.next();case 12:if(m.done){C.D(0);break}B=m.value;v=ff(B,b,c).filter(function(E){E=E[0];E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||!d.includes(E)});A=u(v);t=A.next();case 15:if(t.done){m=w.next();C.D(12);break}z=t.value;return D(C,cf(B,z),16);case 16:t=A.next(),C.D(15)}})}
|
|
162
162
|
function ff(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=u(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=ye(k);if(l.includes(",")&&!d){var m=l.split(",");l=Dc("video",m);m=Dc("audio",m);m=af(m);m=le(we(k),m,"audio");g.push({contentType:m,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=$e(l);k={contentType:le(we(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
|
|
163
163
|
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}f.push(k)}if(d)for(h=u(d.fullMimeTypes),k=h.next();!k.done;k=h.next())k=k.value,l=af(ye(k)),k=le(we(k),l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=u(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=u(g),m=l.next();!m.done;m=l.next()){m=
|
|
164
164
|
m.value;var n={type:c?"file":"media-source"};k&&(n.video=k);m&&(n.audio=m);h.push(n)}g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=u(g);for(var r=g.next();!r.done;r=g.next())f=r.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=u(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];m=u(h);for(n=m.next();!n.done;n=m.next()){n=Object.assign({},
|
|
165
|
-
n.value);var p=c.get(k),t={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=u(p);for(r=p.next();!r.done;r=p.next()){r=r.value;if(r.initData&&r.initData.length){for(var x=new Set,w=u(r.initData),
|
|
165
|
+
n.value);var p=c.get(k),t={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=u(p);for(r=p.next();!r.done;r=p.next()){r=r.value;if(r.initData&&r.initData.length){for(var x=new Set,w=u(r.initData),B=w.next();!B.done;B=w.next())x.add(B.value.initDataType);t.initDataType=r.initData[0].initDataType}r.distinctiveIdentifierRequired&&(t.distinctiveIdentifier="required");r.persistentStateRequired&&(t.persistentState="required");r.sessionType&&(t.sessionTypes=
|
|
166
166
|
[r.sessionType]);d&&(""!=r.audioRobustness?t.audio?t.audio.robustness=t.audio.robustness||r.audioRobustness:t.audio={robustness:r.audioRobustness}:t.audio||(t.audio={}));e&&(""!=r.videoRobustness?t.video?t.video.robustness=t.video.robustness||r.videoRobustness:t.video={robustness:r.videoRobustness}:t.video||(t.video={}))}n.keySystemConfiguration=t;l.push(n)}a.push(l)}return a}function af(a){return"flac"==a.toLowerCase()?gc()?"fLaC":"flac":"Opus"===a?"opus":a}
|
|
167
167
|
function $e(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Ve(a){a.textStreams=a.textStreams.filter(function(b){b=ie(b.mimeType,b.codecs);return Be(b)})}
|
|
168
168
|
function We(a){var b,c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:b=[],c=u(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(gf.has(f)){l.D(5);break}g=hf.get(f);if(!g){gf.set(f,!1);l.D(5);break}return D(l,jf(g),7);case 7:h=l.h,gf.set(f,h);case 5:(k=gf.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,G(l)}})}
|
|
@@ -204,14 +204,14 @@ q.ri=function(){this.h.clear()};function rg(a,b,c){return{uris:a,method:"GET",bo
|
|
|
204
204
|
q.request=function(a,b,c){var d=this,e=new sg;if(this.i){var f=Promise.reject(new R(2,7,7001));f.catch(function(){});return new tg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Le(b.retryParameters):bg();b.uris=Le(b.uris);f=ug(this,a,b,c);var g=f.Ma(function(){return vg(d,a,b,c,new ag(b.retryParameters,!1),0,null,e)}),h=g.Ma(function(r){return wg(d,a,r,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
205
205
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Ma(function(r){var p=Date.now()-m,t=r.response;t.timeMs+=l;t.timeMs+=p;r.jj||!d.l||t.fromCache||"HEAD"==b.method||a!=xg||d.l(t.timeMs,t.data.byteLength,yg(c));d.F&&d.F(a,t,c);return t},function(r){r&&(r.severity=2);throw r;});f=new tg(n.promise,function(){return n.abort()},e);mg(this.m,f);return f};
|
|
206
206
|
function ug(a,b,c,d){function e(h){f=f.Ma(function(){c.body&&(c.body=Gb(c.body));return h(b,c,d)})}var f=hg(void 0);a.A&&e(a.A);a=u(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Ma(void 0,function(h){if(h instanceof R&&7001==h.code)throw h;throw new R(2,1,1006,h);})}
|
|
207
|
-
function vg(a,b,c,d,e,f,g,h){a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new ib(c.uris[f]),l=k.Fb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),jb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=qg[l])?l.Re:null;if(!n)return fg(new R(2,1,1E3,k));var r=l.Gj,p=null,t=null,x=!1,w=!1,
|
|
208
|
-
t&&t.V(C/1E3);a.l&&b==xg&&(v++,c.packetNumber=v,a.l(E,H,yg(d),c),m=!0,h.g=J)},function(E){a.j&&a.j(E,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!r)return
|
|
209
|
-
function(v){p&&p.stop();t&&t.stop();if(a.u){var
|
|
207
|
+
function vg(a,b,c,d,e,f,g,h){a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new ib(c.uris[f]),l=k.Fb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),jb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=qg[l])?l.Re:null;if(!n)return fg(new R(2,1,1E3,k));var r=l.Gj,p=null,t=null,x=!1,w=!1,B;return ig(cg(e)).Ma(function(){if(a.i)return gg();B=Date.now();var v=0;c.requestStartTime=Date.now();var A=n(c.uris[f],c,b,function(E,H,J){p&&p.stop();
|
|
208
|
+
t&&t.V(C/1E3);a.l&&b==xg&&(v++,c.packetNumber=v,a.l(E,H,yg(d),c),m=!0,h.g=J)},function(E){a.j&&a.j(E,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!r)return A;var z=c.retryParameters.connectionTimeout;z&&(p=new Ob(function(){x=!0;A.abort()}),p.V(z/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new Ob(function(){x=!0;A.abort()}));return A}).Ma(function(v){p&&p.stop();t&&t.stop();void 0==v.timeMs&&(v.timeMs=Date.now()-B);var A={response:v,jj:m};!w&&a.j&&a.j(v.headers,c,b);return A},
|
|
209
|
+
function(v){p&&p.stop();t&&t.stop();if(a.u){var A=null,z=0;v instanceof R&&(A=v,1001==v.code&&(z=v.data[1]));a.u(c,A,z,x)}if(a.i)return gg();x&&(v=new R(1,1,1003,c.uris[f],b));if(v instanceof R){if(7001==v.code)throw v;if(1010==v.code)throw g;if(1==v.severity)return A=(new Map).set("error",v),A=new Q("retry",A),a.dispatchEvent(A),f=(f+1)%c.uris.length,vg(a,b,c,d,e,f,v,h)}throw v;})}
|
|
210
210
|
function wg(a,b,c,d){var e=hg(void 0),f={};a=u(a.h);for(var g=a.next();!g.done;f={pf:f.pf},g=a.next())f.pf=g.value,e=e.Ma(function(h){return function(){var k=c.response;k.data&&(k.data=Gb(k.data));return h.pf(b,k,d)}}(f));return e.Ma(function(){return c},function(h){var k=2;if(h instanceof R){if(7001==h.code)throw h;k=h.severity}throw new R(k,1,1007,h);})}function yg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Ud)return!1}return!0}N("shaka.net.NetworkingEngine",ng);
|
|
211
211
|
ng.prototype.request=ng.prototype.request;ng.prototype.destroy=ng.prototype.destroy;ng.makeRequest=rg;ng.defaultRetryParameters=function(){return bg()};ng.prototype.clearAllResponseFilters=ng.prototype.ri;ng.prototype.unregisterResponseFilter=ng.prototype.jk;ng.prototype.registerResponseFilter=ng.prototype.Kj;ng.prototype.clearAllRequestFilters=ng.prototype.pi;ng.prototype.unregisterRequestFilter=ng.prototype.ik;ng.prototype.registerRequestFilter=ng.prototype.Jj;ng.unregisterScheme=function(a){delete qg[a]};
|
|
212
212
|
ng.registerScheme=og;ng.prototype.setForceHTTPS=ng.prototype.Eg;function sg(){this.g=0}ng.NumBytesRemainingClass=sg;function tg(a,b,c){eg.call(this,a,b);this.h=c}na(tg,eg);ng.PendingRequest=tg;var xg=1;ng.RequestType={MANIFEST:0,SEGMENT:xg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};ng.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var pg=3;ng.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:pg};var qg={};function zg(a){this.g=!1;this.h=new dg;this.i=a}zg.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Ag(a,b){if(a.g){if(b instanceof R&&7003==b.code)throw b;throw new R(2,7,7003,b);}};function Bg(a){for(var b=new Map,c=u(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Cg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Dg(a,b){this.h=Kb(a);this.i=b==Eg;this.g=0}q=Dg.prototype;q.Aa=function(){return this.g<this.h.byteLength};q.Na=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.W=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Fg();}};q.Ha=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Fg();}};q.R=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Fg();}};
|
|
213
213
|
q.Eh=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Fg();}};q.ed=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Fg();}if(2097151<b)throw new R(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Pb=function(a){if(this.g+a>this.h.byteLength)throw Fg();var b=Fb(this.h,this.g,a);this.g+=a;return b};
|
|
214
|
-
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Fg();this.g+=a};q.Sj=function(a){if(this.g<a)throw Fg();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Fg();this.g=a};q.
|
|
214
|
+
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Fg();this.g+=a};q.Sj=function(a){if(this.g<a)throw Fg();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Fg();this.g=a};q.Ec=function(){for(var a=this.g;this.Aa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Fb(this.h,a,this.g-a);this.g+=1;return lc(a)};function Fg(){return new R(2,3,3E3)}N("shaka.util.DataViewReader",Dg);Dg.prototype.readTerminatedString=Dg.prototype.Ec;Dg.prototype.seek=Dg.prototype.seek;Dg.prototype.rewind=Dg.prototype.Sj;
|
|
215
215
|
Dg.prototype.skip=Dg.prototype.skip;Dg.prototype.readBytes=Dg.prototype.Pb;Dg.prototype.readUint64=Dg.prototype.ed;Dg.prototype.readInt32=Dg.prototype.Eh;Dg.prototype.readUint32=Dg.prototype.R;Dg.prototype.readUint16=Dg.prototype.Ha;Dg.prototype.readUint8=Dg.prototype.W;Dg.prototype.getLength=Dg.prototype.getLength;Dg.prototype.getPosition=Dg.prototype.Na;Dg.prototype.hasMoreData=Dg.prototype.Aa;var Eg=1;Dg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Eg};function Gg(){this.i=[];this.h=[];this.g=!1}q=Gg.prototype;q.box=function(a,b){a=Hg(a);this.i[a]=Ig;this.h[a]=b;return this};q.T=function(a,b){a=Hg(a);this.i[a]=Jg;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Dg(a,0);for(this.g=!1;a.Aa()&&!this.g;)this.cd(0,a,b,c)};
|
|
216
216
|
q.cd=function(a,b,c,d){var e=b.Na();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.R(),g=b.R(),h=Kg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Na()+8>b.getLength()){this.g=!0;return}f=b.ed();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Jg){if(d&&b.Na()+4>b.getLength()){this.g=!0;return}n=b.R();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Na(),b=0<d?b.Pb(d):new Uint8Array(0),b=new Dg(b,0),l({name:h,parser:this,
|
|
217
217
|
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Na(),b.getLength()-b.Na()))}};function Lg(a){for(var b=Mg(a);a.reader.Aa()&&!a.parser.g;)a.parser.cd(a.start+b,a.reader,a.partialOkay)}function Ng(a){for(var b=Mg(a),c=a.reader.R(),d=0;d<c&&(a.parser.cd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Og(a){var b=Mg(a);for(a.reader.skip(78);a.reader.Aa()&&!a.parser.g;)a.parser.cd(a.start+b,a.reader,a.partialOkay)}
|
|
@@ -233,36 +233,36 @@ function ch(a){if(!Array.from(a.children).every(function(b){return"string"===typ
|
|
|
233
233
|
function hh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function ih(a,b,c){b=Wg(b);return a.attributes[b+":"+c]||null}function gh(a,b,c){b=Wg(b);var d=[];if(a.children){a=u(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function jh(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())if(d=ih(a,d.value,c))return d;return null}
|
|
234
234
|
function kh(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function lh(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
235
235
|
function oh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function ph(a){a=Number(a);return 0===a%1?a:null}function qh(a){a=Number(a);return 0===a%1&&0<a?a:null}function rh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function sh(a){a=Number(a);return isNaN(a)?null:a}function th(a){return a?"true"===a.toLowerCase():!1}
|
|
236
|
-
function uh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function vh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&vh(a.parent,!0,!1).appendChild(d);if(c)for(a=u(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=vh(b,!1,!0),d.appendChild(c);return d}var Xg=new Map([]);function wh(a){var b=this;this.G=a;this.J=new Set;this.m=this.u=null;this.sa=this.$=!1;this.K=0;this.g=null;this.F=new cd;this.i=new Map;this.A=new Map;this.l=new dg;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.X=new Map;this.aa=new Map;this.M=new Ob(function(){return xh(b)});this.P=!1;this.O=[];this.S=!1;this.L=new Ob(function(){yh(b)});this.l.catch(function(){});this.j=new zg(function(){return zh(b)});this.Y=!1;this.H=this.I=null}q=wh.prototype;q.destroy=function(){return this.j.destroy()};
|
|
236
|
+
function uh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function vh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&vh(a.parent,!0,!1).appendChild(d);if(c)for(a=u(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=vh(b,!1,!0),d.appendChild(c);return d}var Xg=new Map([]);function wh(a){var b=this;this.G=a;this.J=new Set;this.m=this.u=null;this.sa=this.$=!1;this.K=0;this.g=null;this.F=new cd;this.i=new Map;this.A=new Map;this.l=new dg;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.X=new Map;this.aa=new Map;this.M=new Ob(function(){return xh(b)});this.P=!1;this.O=[];this.S=!1;this.L=new Ob(function(){yh(b)});this.l.catch(function(){});this.j=new zg(function(){return zh(b)});this.Y=!1;this.H=this.I=null}q=wh.prototype;q.destroy=function(){return this.j.destroy()};
|
|
237
237
|
function zh(a){return L(function(b){switch(b.g){case 1:return a.F.release(),a.F=null,a.l.reject(),a.L.stop(),a.L=null,a.M.stop(),a.M=null,D(b,Ah(a),2);case 2:if(!a.m){b.D(3);break}ra(b,4);return D(b,a.m.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:ua(b);case 5:a.m=null;case 3:a.g=null,a.J.clear(),a.u=null,a.A=new Map,a.h=null,a.o=function(){},a.G=null,a.Y=!1,a.I=null,G(b)}})}q.configure=function(a){this.h=a;this.L&&this.L.ya(this.h.updateExpirationTime)};
|
|
238
238
|
function Bh(a,b,c){a.sa=!0;a.A=new Map;a.P=c;return Ch(a,b)}function Dh(a,b,c){a.A=new Map;c=u(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=u(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.P=0<a.A.size;return Ch(a,b)}
|
|
239
239
|
function Eh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Fh(a,g,[])}
|
|
240
|
-
function Ch(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
241
|
-
x.next())w=p.value,Jh(w,Bg(a.h.servers),Bg(a.h.advanced||{}),a.h.keySystemsMapping);return D(
|
|
240
|
+
function Ch(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v;return L(function(A){if(1==A.g){if(c=Gh(a))for(d=u(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(z){return z.video&&z.video.drmInfos.length||z.audio&&z.audio.drmInfos.length?!0:!1});g||(h=Bg(a.h.servers),Hh(b,h));k=new Set;l=u(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Ih(m),r=u(n),p=r.next();!p.done;p=r.next())t=p.value,k.add(t);x=u(k);for(p=x.next();!p.done;p=
|
|
241
|
+
x.next())w=p.value,Jh(w,Bg(a.h.servers),Bg(a.h.advanced||{}),a.h.keySystemsMapping);return D(A,Xe(b,a.P,a.Y,a.h.preferredKeySystems),2)}B=g||Object.keys(a.h.servers).length;if(!B)return a.$=!0,A.return(Promise.resolve());v=Fh(a,void 0,b);return A.return(g?v:v.catch(function(){}))})}
|
|
242
242
|
function Kh(a){var b;return L(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.I){c.D(2);break}return D(c,a.I,3);case 3:return Ag(a.j),c.return();case 2:return ra(c,4),a.I=a.m.setMediaKeys(a.u),D(c,a.I,6);case 6:ta(c,5);break;case 4:b=ua(c),a.o(new R(2,6,6003,b.message));case 5:Ag(a.j),G(c)}})}function Lh(a,b){return L(function(c){if(1==c.g)return D(c,Kh(a),2);Mh(a,b.initDataType,Fb(b.initData));G(c)})}
|
|
243
|
-
q.
|
|
243
|
+
q.Pc=function(a){var b=this;return L(function(c){if(1==c.g){if(!b.u)return b.F.na(a,"encrypted",function(){b.o(new R(2,6,6010))}),c.return();b.m=a;b.F.na(b.m,"play",function(){for(var d=u(b.O),e=d.next();!e.done;e=d.next())Nh(b,e.value);b.S=!0;b.O=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.F.s(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ah(b)});b.H=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.H||"com.apple.fps"!==b.g.keySystem||
|
|
244
244
|
b.A.size?D(c,Kh(b),2):c.D(2)}Oh(b).catch(function(){});b.H||b.A.size||b.h.parseInbandPsshEnabled||b.F.s(b.m,"encrypted",function(d){return Lh(b,d)});G(c)})};
|
|
245
245
|
function Ph(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=rg([a.g.serverCertificateUri],a.h.retryParameters);ra(g,3);c=a.G.Zb.request(5,b);return D(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);ta(g,4);break;case 3:throw e=ua(g),new R(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
246
246
|
ra(g,6);return D(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new R(2,6,6004,f.message);}})}function Qh(a,b){var c,d,e;return L(function(f){if(1==f.g)return D(f,Rh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.yb=new dg,d.push(e.yb);d.push(c.remove());return D(f,Promise.all(d),3)}a.i.delete(c);G(f)})}
|
|
247
247
|
function Oh(a){var b,c,d,e,f;return L(function(g){if(1==g.g){if(!a.A.size)return g.D(2);a.A.forEach(function(h,k){Rh(a,k,h)});return D(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Sh(a))return g.return(a.l);a.l=new dg;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=u(c);for(e=d.next();!e.done;e=d.next())f=e.value,Mh(a,f.initDataType,f.initData);Th(a)&&a.l.resolve();return g.return(a.l)})}
|
|
248
248
|
function Mh(a,b,c){if(c.length){var d=a.i.values();d=u(d);for(var e=d.next();!e.done;e=d.next())if(Cb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Th(a)&&(a.l.resolve(),a.l=new dg,a.l.catch(function(){}));Uh(a,b,c,a.g.sessionType)}}function Vh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Wh(a){a=a.i.keys();a=cb(a,function(b){return b.sessionId});return Array.from(a)}
|
|
249
249
|
q.Uf=function(){var a=this,b=this.i.keys();b=cb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Hd=function(){var a=Infinity,b=this.i.keys();b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.we=function(){return Cg(this.aa)};
|
|
250
|
-
function Fh(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
251
|
-
f.keySystem;var z=d.get(f.keySystem);var C=[],E=[],H=[],J=[],F=[],I=new Set;Zh(z,C,E,J,H,F,I);var K=a.P?"persistent-license":"temporary";
|
|
252
|
-
for(C=z.next();!C.done;C=z.next())C=C.value,C.distinctiveIdentifierRequired&&(
|
|
253
|
-
sessionType:
|
|
254
|
-
10);case 10:x=v.h;if("usable"!=x)throw new R(2,6,6018);Ag(a.j);ta(v,7,4);break;case 8:w=ua(v,4);if(w instanceof R)throw w;throw new R(2,6,6019,w.message);case 7:return a.$=!0,D(v,Ph(a),11);case 11:Ag(a.j);ta(v,0);break;case 4:
|
|
250
|
+
function Fh(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,B;return L(function(v){switch(v.g){case 1:d=new Map;if(c.length){e=Xh(a,c,d);v.D(2);break}return D(v,Yh(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new R(2,6,6001);Ag(a.j);ra(v,4);a.J.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=u(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.J.add(n.contentType.toLowerCase());r=u(k);for(m=r.next();!m.done;m=r.next())p=m.value,a.J.add(p.contentType.toLowerCase());if(c.length){var A=
|
|
251
|
+
f.keySystem;var z=d.get(f.keySystem);var C=[],E=[],H=[],J=[],F=[],I=new Set;Zh(z,C,E,J,H,F,I);var K=a.P?"persistent-license":"temporary";A={keySystem:A,encryptionScheme:C[0],licenseServerUri:E[0],distinctiveIdentifierRequired:z[0].distinctiveIdentifierRequired,persistentStateRequired:z[0].persistentStateRequired,sessionType:z[0].sessionType||K,audioRobustness:z[0].audioRobustness||"",videoRobustness:z[0].videoRobustness||"",serverCertificate:J[0],serverCertificateUri:H[0],initData:F,keyIds:I};z=u(z);
|
|
252
|
+
for(C=z.next();!C.done;C=z.next())C=C.value,C.distinctiveIdentifierRequired&&(A.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(A.persistentStateRequired=C.persistentStateRequired);z=A}else z=f.keySystem,A=b.get(f.keySystem),C=[],E=[],H=[],J=[],F=[],I=new Set,Zh(A.drmInfos,C,E,J,H,F,I),z={keySystem:z,encryptionScheme:C[0],licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==A.distinctiveIdentifier,persistentStateRequired:"required"==A.persistentState,
|
|
253
|
+
sessionType:A.sessionTypes[0]||"temporary",audioRobustness:(A.audioCapabilities?A.audioCapabilities[0].robustness:"")||"",videoRobustness:(A.videoCapabilities?A.videoCapabilities[0].robustness:"")||"",serverCertificate:J[0],serverCertificateUri:H[0],initData:F,keyIds:I};a.g=z;if(!a.g.licenseServerUri)throw new R(2,6,6012,a.g.keySystem);return D(v,f.createMediaKeys(),6);case 6:t=v.h;Ag(a.j);a.u=t;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.u)){v.D(7);break}ra(v,8);return D(v,a.u.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
|
|
254
|
+
10);case 10:x=v.h;if("usable"!=x)throw new R(2,6,6018);Ag(a.j);ta(v,7,4);break;case 8:w=ua(v,4);if(w instanceof R)throw w;throw new R(2,6,6019,w.message);case 7:return a.$=!0,D(v,Ph(a),11);case 11:Ag(a.j);ta(v,0);break;case 4:B=ua(v);Ag(a.j,B);a.g=null;a.J.clear();if(B instanceof R)throw B;throw new R(2,6,6002,B.message);}})}
|
|
255
255
|
function Xh(a,b,c){for(var d=u(b),e=d.next();!e.done;e=d.next()){var f=u(Ih(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new R(2,6,6E3);d={};a=u(a.h.preferredKeySystems);for(e=a.next();!e.done;d={nf:d.nf},e=a.next())for(d.nf=e.value,f=u(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
256
256
|
l.nf}}(d)))return e.keySystemAccess;a=u([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=u(b),e=f.next();!e.done;e=f.next()){var g=u(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=u(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
257
|
-
function Yh(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,x,w;return L(function(
|
|
258
|
-
|
|
257
|
+
function Yh(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,x,w;return L(function(B){switch(B.g){case 1:if(1==b.size&&b.has(""))throw new R(2,6,6E3);d=u(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=u(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){B.D(4);break}k=h.value;if(!b.has(k)){B.D(3);break}l=b.get(k);ra(B,6);return D(B,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
258
|
+
B.h,B.return(c);case 6:ua(B);case 7:Ag(a.j);case 3:h=g.next();B.D(2);break;case 4:m=u([!0,!1]),n=m.next();case 9:if(n.done){B.D(11);break}r=n.value;p=u(b.keys());h=p.next();case 12:if(h.done){n=m.next();B.D(9);break}t=h.value;x=b.get(t);w=x.drmInfos.some(function(v){return!!v.licenseServerUri});if(w!=r){B.D(13);break}ra(B,15);return D(B,navigator.requestMediaKeySystemAccess(t,[x]),17);case 17:return c=B.h,B.return(c);case 15:ua(B);case 16:Ag(a.j);case 13:h=p.next();B.D(12);break;case 11:return B.return(c)}})}
|
|
259
259
|
function Gh(a){a=Bg(a.h.clearKeys);return 0==a.size?null:Cc(a)}function $h(a){Th(a)&&a.l.resolve()}function ai(a,b){(new Ob(function(){b.loaded=!0;$h(a)})).V(bi)}
|
|
260
260
|
function Rh(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:try{d=a.u.createSession("persistent-license")}catch(n){return e=new R(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.F.s(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(n):Nh(a,n)});a.F.s(d,"keystatuseschange",function(n){return ci(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,pg:Infinity,yb:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return D(m,
|
|
261
261
|
d.load(b),4);case 4:return g=m.h,Ag(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new R(h,6,6013)),f.loaded=!0),ai(a,f),$h(a),m.return(d);case 2:k=ua(m),Ag(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new R(l,6,6005,k.message)),f.loaded=!0,$h(a);case 3:return m.return(Promise.resolve())}})}
|
|
262
262
|
function Uh(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.o(new R(2,6,6005,f.message));return}a.F.s(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(f):Nh(a,f)});a.F.s(e,"keystatuseschange",function(f){return ci(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,pg:Infinity,yb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof R||(b=new R(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&vc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
263
263
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new R(2,6,6006,f.message,f,h))}})}
|
|
264
264
|
function Nh(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t;L(function(x){switch(x.g){case 1:c=b.target;a.h.logLicenseExchange&&vc(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=rg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(Vh(a.g.keySystem)){var w=
|
|
265
|
-
mc(g.body,!0,!0);if(w.includes("PlayReadyKeyMessage")){w=Ug(w,"PlayReadyKeyMessage");var
|
|
265
|
+
mc(g.body,!0,!0);if(w.includes("PlayReadyKeyMessage")){w=Ug(w,"PlayReadyKeyMessage");var B=dh(w,"HttpHeader");B=u(B);for(var v=B.next();!v.done;v=B.next()){var A=v.value;v=dh(A,"name")[0];A=dh(A,"value")[0];g.headers[bh(v)]=bh(A)}w=dh(w,"Challenge")[0];g.body=wc(bh(w))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ra(x,2);l=a.G.Zb.request(2,g);return D(x,l.promise,4);case 4:k=x.h;ta(x,3);break;case 2:m=ua(x);if(a.j.g)return x.return();n=new R(2,6,6007,m);1==a.i.size?(a.o(n),
|
|
266
266
|
d&&d.yb&&d.yb.reject(n)):(d&&d.yb&&d.yb.reject(n),a.i.delete(c),Th(a)&&(a.l.resolve(),a.M.V(.1)));return x.return();case 3:if(a.j.g)return x.return();a.K+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&vc(k.data);ra(x,5);return D(x,c.update(k.data),7);case 7:ta(x,6);break;case 5:return r=ua(x),p=new R(2,6,6008,r.message),a.o(p),d&&d.yb&&d.yb.reject(p),x.return();case 6:if(a.j.g)return x.return();t=new Q("drmsessionupdate");a.G.onEvent(t);d&&(d.yb&&d.yb.resolve(),ai(a,d));G(x)}})}
|
|
267
267
|
function ci(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Vh(a.g.keySystem)&&16==g.byteLength&&(Sb()||dc())){h=Kb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=yc(g).slice(0,32);a.X.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.yb&&(a.i.delete(b),b.close().catch(function(){}));
|
|
268
268
|
Th(a)&&(a.l.resolve(),a.M.V(di))}function xh(a){var b=a.X,c=a.aa;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new R(2,6,6014));a.G.Pe(Cg(c))}
|
|
@@ -294,11 +294,11 @@ function vi(a,b,c,d,e){var f=wi.value(),g=a.subarray(c.start,c.start+c.size),h=K
|
|
|
294
294
|
k.setUint32(b,a+1);return e}function xi(a,b,c){a=Kb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var wi=new Mb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function yi(a,b,c,d,e,f,g){this.ka=a;this.Ta=b;this.za=c;this.mg=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}yi.prototype.Mb=function(){return this.Ta};yi.prototype.Jb=function(){return this.za};yi.prototype.Kd=function(){return this.g};function zi(a,b){return a===b?!0:a&&b?a.Mb()==b.Mb()&&a.Jb()==b.Jb()&&Ad(a.ka().sort(),b.ka().sort())&&Cb(a.Kd(),b.Kd()):a==b}N("shaka.media.InitSegmentReference",yi);
|
|
295
295
|
yi.prototype.getEndByte=yi.prototype.Jb;yi.prototype.getStartByte=yi.prototype.Mb;
|
|
296
296
|
function Ai(a,b,c,d,e,f,g,h,k,l,m,n,r,p,t,x){l=void 0===l?[]:l;p=void 0===p?Bi:p;this.startTime=a;this.i=this.endTime=b;this.G=c;this.Ta=d;this.za=e;this.ua=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===r?null:r;this.status=p;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===t?null:t;this.u=null;this.j=0;this.o=void 0===x?!1:x;this.Fe=this.Ud=!1;a=u(this.g);for(b=a.next();!b.done;b=
|
|
297
|
-
a.next())b.value.Ah();this.o&&this.g.length&&this.g[this.g.length-1].yh();this.F=this.mimeType=this.codecs=null}q=Ai.prototype;q.ka=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.Li=function(){return this.endTime};q.Mb=function(){return this.Ta};q.Jb=function(){return this.za};q.cj=function(){return this.tilesLayout};q.bj=function(){return this.A};q.
|
|
297
|
+
a.next())b.value.Ah();this.o&&this.g.length&&this.g[this.g.length-1].yh();this.F=this.mimeType=this.codecs=null}q=Ai.prototype;q.ka=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.Li=function(){return this.endTime};q.Mb=function(){return this.Ta};q.Jb=function(){return this.za};q.cj=function(){return this.tilesLayout};q.bj=function(){return this.A};q.xc=function(){return this.status};q.zj=function(){this.status=Ci};q.lg=function(){this.preload=!0};q.rj=function(){return this.preload};
|
|
298
298
|
q.He=function(){this.l=!1};q.oj=function(){return this.l};q.Ah=function(){this.Ud=!0};q.qj=function(){return this.Ud};q.yh=function(){this.Fe=!0};q.pj=function(){return this.Fe};q.xh=function(){this.m=!0};q.kj=function(){return this.m};q.Ph=function(a){this.u=a};q.aj=function(){return this.u};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
|
|
299
299
|
q.Jg=function(a){null==this.h?Ta("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.ek=function(a){this.F=a};q.Kd=function(){return this.F};function Di(a,b){a.ua=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())Di(c.value,b)}N("shaka.media.SegmentReference",Ai);Ai.prototype.getSegmentData=Ai.prototype.Kd;Ai.prototype.setSegmentData=Ai.prototype.ek;Ai.prototype.syncAgainst=Ai.prototype.Jg;Ai.prototype.offset=Ai.prototype.offset;
|
|
300
300
|
Ai.prototype.getThumbnailSprite=Ai.prototype.aj;Ai.prototype.setThumbnailSprite=Ai.prototype.Ph;Ai.prototype.hasByterangeOptimization=Ai.prototype.kj;Ai.prototype.markAsByterangeOptimization=Ai.prototype.xh;Ai.prototype.isLastPartial=Ai.prototype.pj;Ai.prototype.markAsLastPartial=Ai.prototype.yh;Ai.prototype.isPartial=Ai.prototype.qj;Ai.prototype.markAsPartial=Ai.prototype.Ah;Ai.prototype.isIndependent=Ai.prototype.oj;Ai.prototype.markAsNonIndependent=Ai.prototype.He;Ai.prototype.isPreload=Ai.prototype.rj;
|
|
301
|
-
Ai.prototype.markAsPreload=Ai.prototype.lg;Ai.prototype.markAsUnavailable=Ai.prototype.zj;Ai.prototype.getStatus=Ai.prototype.
|
|
301
|
+
Ai.prototype.markAsPreload=Ai.prototype.lg;Ai.prototype.markAsUnavailable=Ai.prototype.zj;Ai.prototype.getStatus=Ai.prototype.xc;Ai.prototype.getTileDuration=Ai.prototype.bj;Ai.prototype.getTilesLayout=Ai.prototype.cj;Ai.prototype.getEndByte=Ai.prototype.Jb;Ai.prototype.getStartByte=Ai.prototype.Mb;Ai.prototype.getEndTime=Ai.prototype.Li;Ai.prototype.getStartTime=Ai.prototype.getStartTime;Ai.prototype.getUris=Ai.prototype.ka;var Bi=0,Ci=1;Ai.Status={qk:Bi,ol:Ci,Lk:2};function Ei(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Fi(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Gi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=u(Hi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
302
302
|
function Ii(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Hi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Hi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
|
|
303
303
|
@license
|
|
304
304
|
Shaka Player
|
|
@@ -346,8 +346,8 @@ g,void 0),d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(fun
|
|
|
346
346
|
q.Gd=function(){return{audio:this.A,video:this.m}};q.Ae=function(){for(var a=[],b=u(this.Xc()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};q.hj=function(){ld("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.$f();return{height:a.height,width:a.width}};q.$f=function(){return"hvc"==this.m?pj(this):qj(this)};
|
|
347
347
|
function qj(a){var b={height:null,width:null,ab:null};a=a.Ae();if(!a.length)return b;a=a.find(function(r){return 7==r.type});if(!a)return b;a=new Yi(a.data);var c=ij(a),d=ij(a),e=ij(a);cj(a);if(rj.includes(c)){var f=S(a);3===f&&$i(a,1);cj(a);cj(a);$i(a,1);if(hj(a)){f=3!==f?8:12;for(var g=0;g<f;g++)hj(a)&&(6>g?jj(a,16):jj(a,64))}}cj(a);f=S(a);if(0===f)S(a);else if(1===f)for($i(a,1),cj(a),cj(a),f=S(a),g=0;g<f;g++)cj(a);cj(a);$i(a,1);f=S(a);g=S(a);var h=aj(a,1);0===h&&$i(a,1);$i(a,1);var k=0,l=0,m=0,
|
|
348
348
|
n=0;hj(a)&&(k=S(a),l=S(a),m=S(a),n=S(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.ab="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
349
|
-
function pj(a){var b={height:null,width:null,ab:null};a=a.Ae();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new Yi(a.fullData,!0);ij(c);ij(c);aj(c,4);var d=aj(c,3);hj(c);var e=aj(c,2),f=aj(c,1),g=aj(c,5),h=aj(c,32);a=ij(c);for(var k=ij(c),l=ij(c),m=ij(c),n=ij(c),r=ij(c),p=ij(c),t=[],x=[],w=0;w<d;w++)t.push(hj(c)),x.push(hj(c));if(0<d)for(w=d;8>w;w++)aj(c,2);for(w=0;w<d;w++)t[w]&&aj(c,88),x[w]&&ij(c);S(c);d=S(c);3==d&&aj(c,1);t=S(c);x=S(c);var
|
|
350
|
-
(w+=S(c),
|
|
349
|
+
function pj(a){var b={height:null,width:null,ab:null};a=a.Ae();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new Yi(a.fullData,!0);ij(c);ij(c);aj(c,4);var d=aj(c,3);hj(c);var e=aj(c,2),f=aj(c,1),g=aj(c,5),h=aj(c,32);a=ij(c);for(var k=ij(c),l=ij(c),m=ij(c),n=ij(c),r=ij(c),p=ij(c),t=[],x=[],w=0;w<d;w++)t.push(hj(c)),x.push(hj(c));if(0<d)for(w=d;8>w;w++)aj(c,2);for(w=0;w<d;w++)t[w]&&aj(c,88),x[w]&&ij(c);S(c);d=S(c);3==d&&aj(c,1);t=S(c);x=S(c);var B=w=0,v=0,A=0;hj(c)&&
|
|
350
|
+
(w+=S(c),B+=S(c),v+=S(c),A+=S(c));b.width=String(t-(w+B)*(1===d||2===d?2:1));b.height=String(x-(v+A)*(1===d?2:1));c=function(z){for(var C=0,E=0;32>E;E++)C|=(z>>E&1)<<31-E;return C>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;r&&(e+="."+r.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
351
351
|
a.toString(16).toUpperCase());b.ab=e;return b}function oj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function sj(a){return 0>mj(a)?!1:!0}function mj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}N("shaka.util.TsParser",lj);lj.syncOffset=mj;lj.probe=sj;lj.prototype.getVideoInfo=lj.prototype.$f;lj.prototype.getVideoResolution=lj.prototype.hj;lj.prototype.getVideoNalus=lj.prototype.Ae;
|
|
352
352
|
lj.prototype.getCodecs=lj.prototype.Gd;lj.prototype.getStartTime=lj.prototype.getStartTime;lj.prototype.getVideoData=lj.prototype.Xc;lj.prototype.getAudioData=lj.prototype.ec;lj.prototype.getMetadata=lj.prototype.getMetadata;lj.prototype.parseNalus=lj.prototype.sg;lj.prototype.parseAvcNalus=lj.prototype.Fj;lj.prototype.parse=lj.prototype.parse;lj.prototype.clearData=lj.prototype.clearData;lj.Timescale=9E4;var rj=[100,110,122,244,44,83,86,118,128,138,139,134];function tj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ua("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,ld("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ua("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ua("Could not find LCEVC Library on this page"),
|
|
353
353
|
a=!1):(this.h.SupportObject.SupportStatus||Ua(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function uj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
@@ -358,15 +358,15 @@ h,k),r=ke(h,k),!hd(n)&&!ce(r))return p.return(!1);return p.return(!0)})}q=Cj.pro
|
|
|
358
358
|
function Ej(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(Je)),f=u(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new R(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.H&&b.push(a.H.destroy());for(k in a.m)b.push(a.m[k].destroy());return D(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.H=null;a.h={};a.m={};a.J=null;
|
|
359
359
|
a.j={};a.P=null;a.L=null;G(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return f=Ic,D(m,e.M,2);case 2:e.F=b,e.X=c,e.qa=d,e.ma=!e.F&&"HLS"==e.X&&!e.qa,e.L=null,g=u(a.keys()),h=g.next();case 3:if(h.done){m.D(0);break}k=h.value;l=a.get(k);return D(m,Hj(e,k,l,l.codecs),6);case 6:e.u?(e.j[f.Z]=[],e.j[f.va]=[]):e.j[k]=[],h=g.next(),m.D(3)}})};
|
|
360
360
|
function Hj(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,x;return L(function(w){switch(w.g){case 1:return e=Ic,f=Oa,g=Pa,D(w,Gj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=ie(c.mimeType,d);if(b==e.Ca){Ij(a,h,a.F,c.external);w.D(0);break}k=a.A.forceTransmux;if(!hd(h)||!a.F&&je.includes(h))k=!0;l=ke(c.mimeType,d);if(!k){w.D(4);break}m=Ec(e.Z,(d||"").split(","));n=Ec(e.va,(d||"").split(","));if(!m||!n){w.D(5);break}a.u=!0;return D(w,Hj(a,e.Z,c,m),6);case 6:return D(w,
|
|
361
|
-
Hj(a,e.va,c,n),7);case 7:return w.return();case 5:if(r=ce(l))p=r(),a.m[b]=p,h=p.convertCodecs(b,l);case 4:t=h+a.A.addExtraFeaturesToSourceBuffer(h);Ag(a.K);try{x=a.l.addSourceBuffer(t)}catch(
|
|
361
|
+
Hj(a,e.va,c,n),7);case 7:return w.return();case 5:if(r=ce(l))p=r(),a.m[b]=p,h=p.convertCodecs(b,l);case 4:t=h+a.A.addExtraFeaturesToSourceBuffer(h);Ag(a.K);try{x=a.l.addSourceBuffer(t)}catch(B){throw new R(2,3,3015,B,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");}a.F&&(x.mode=Jj);a.o.s(x,"error",function(){a.j[b][0].p.reject(new R(2,3,3014,a.i.error?a.i.error.code:0))});a.o.s(x,"updateend",function(){return Kj(a,b)});a.h[b]=x;a.I[b]=h;a.oa[b]=!!c.drmInfos.length;G(w)}})}
|
|
362
362
|
q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
363
363
|
function Ij(a,b,c,d){a.g||(a.g=new Ae(a.H),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.Y;a=a.X;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Ce[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):ld("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):ld("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.F=d)}
|
|
364
364
|
function Lj(a){return a.G?!1:a.l?"ended"==a.l.readyState:!0}function Mj(a,b){a.G||!Object.keys(a.h).length?a=null:b==Gc?a=a.g.g:(a=Nj(a,b),a=!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Oj(a,b){return a.G?null:b==Gc?a.g.h:Ei(Nj(a,b))}function Vj(a,b,c){if(a.G)return 0;if(b==Gc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Nj(a,b);return Gi(a,c)}
|
|
365
365
|
q.Ib=function(){var a={total:this.G?[]:Hi(this.i.buffered),audio:this.G?[]:Hi(Nj(this,"audio")),video:this.G?[]:Hi(Nj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Nj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
366
366
|
function Wj(a,b,c,d,e,f){var g=null,h=Fb(c);if(je.includes(e))f=Oi(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ra([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ua&&d.ua.timescale){var k=d.ua.timescale;if(!isNaN(k)){var l=0,m=!1;(new Gg).box("moof",Lg).box("traf",Lg).T("tfdt",function(n){l=Ri(n.reader,
|
|
367
367
|
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!sj(h)||(a.L?a.L.clearData():a.L=new lj,h=a.L.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ra(h,f,d?d.endTime:null));return g}
|
|
368
|
-
function Xj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,r,p,t,x,w,
|
|
369
|
-
case 6:if(!a.h[b])return C.return();r=a.h[b].timestampOffset;p=a.I[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(t=Wj(a,b,c,d,p,r),null!=t&&(x=d.startTime-t,w=Math.abs(r-x),(.001<=w||g||h)&&(!k||0<x||!r)&&(r=x,a.ma&&(Yj(a,b,function(){return Zj(a,b)}),Yj(a,b,function(){return ak(a,b,r)}))),
|
|
368
|
+
function Xj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,r,p,t,x,w,B,v,A,z;return L(function(C){switch(C.g){case 1:m=Ic;if(b!=m.Ca){C.D(2);break}if(!a.F){C.D(3);break}return D(C,a.sa,4);case 4:n=C.h,a.g.u=n;case 3:return D(C,De(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.ka()[0]:null),5);case 5:return C.return();case 2:if(l||!a.u){C.D(6);break}return D(C,Xj(a,m.Z,c,d,e,f,g,h,k,!0),7);case 7:return D(C,Xj(a,m.va,c,d,e,f,g,h,k,!0),8);case 8:return C.return();
|
|
369
|
+
case 6:if(!a.h[b])return C.return();r=a.h[b].timestampOffset;p=a.I[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(t=Wj(a,b,c,d,p,r),null!=t&&(x=d.startTime-t,w=Math.abs(r-x),(.001<=w||g||h)&&(!k||0<x||!r)&&(r=x,a.ma&&(Yj(a,b,function(){return Zj(a,b)}),Yj(a,b,function(){return ak(a,b,r)}))),B=b==m.va||!(m.va in a.h),a.F&&B&&a.sa.resolve(r)));f&&b==m.va&&(a.g||Ij(a,"application/cea-608",a.F,!1),a.J||(v=p.split(";",1)[0],a.J=new sd(v)),d?(A=a.J.i(c),A.length&&He(a.g,A,d.startTime,d.endTime,r)):a.J.init(c));
|
|
370
370
|
if(!a.m[b]){C.D(9);break}return D(C,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=C.h;case 9:return c=bk(a,c,d?d.startTime:null,b),d&&a.F&&b!=m.Ca&&(g||h)&&(z=d.startTime,Yj(a,b,function(){return Zj(a,b)}),Yj(a,b,function(){return ak(a,b,z)})),D(C,Yj(a,b,function(){var E=c;if("video"==b&&a.P){var H=a.P;H.g&&H.g.appendBuffer(E,"video",H.o,-r)}a.h[b].appendBuffer(E)}),11);case 11:G(C)}})}function ck(a,b){var c=Oj(a,"video")||0;Fe(a.g,b,c)}function dk(a){a.g&&Fe(a.g,"",0)}
|
|
371
371
|
q.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Ic,a==e.Ca?D(f,d.g.remove(b,c),0):D(f,Yj(d,a,function(){return ek(d,a,b,c)}),4)):d.u?D(f,Yj(d,e.Z,function(){return ek(d,e.Z,b,c)}),0):f.D(0)})};function fk(a,b){var c;return L(function(d){return 1==d.g?(c=Ic,b==c.Ca?a.g?D(d,a.g.remove(0,Infinity),0):d.return():D(d,Yj(a,b,function(){return ek(a,b,0,a.l.duration)}),4)):a.u?D(d,Yj(a,c.Z,function(){return ek(a,c.Z,0,a.l.duration)}),0):d.D(0)})}
|
|
372
372
|
q.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Ic,a==c.Ca?d.return():D(d,Yj(b,a,function(){b.i.currentTime-=.001;Kj(b,a)}),2)):b.u?D(d,Yj(b,c.Z,function(){var e=c.Z;b.i.currentTime-=.001;Kj(b,e)}),0):d.D(0)})};
|
|
@@ -377,17 +377,17 @@ function Zj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].
|
|
|
377
377
|
function jk(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:Ag(a.K);c=[];d={};for(e in a.h)d.rd=new dg,f={start:function(m){return function(){return m.rd.resolve()}}(d),p:d.rd},a.j[e].push(f),c.push(d.rd),1==a.j[e].length&&f.start(),d={rd:d.rd};ra(l,2);return D(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=ua(l),g;case 3:return ra(l,5,6),D(l,b(),6);case 6:va(l);for(h in a.h)kk(a,h);wa(l,0);break;case 5:throw k=ua(l),new R(2,3,3015,k,a.i.error||"No error in the media element");
|
|
378
378
|
}})}function kk(a,b){a.j[b].shift();lk(a,b)}function lk(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new R(2,3,3017,b)):c.p.reject(new R(2,3,3015,d,a.i.error||"No error in the media element")),kk(a,b)}}function bk(a,b,c,d){var e=a.oa[d];a.A.insertFakeEncryptionInInit&&null==c&&e&&(Vb()||Tb()||cc())&&"mp4"==oe(a.I[d])&&(b=ui(b));return b}
|
|
379
379
|
function mk(a,b,c,d){return Yj(a,b,function(){b!==Gc&&(jd()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.I[b]=c),Kj(a,b))})}
|
|
380
|
-
function nk(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
381
|
-
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.M=new dg,a.l=Dj(a,a.M),D(I,a.M,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.S)&&a.S&&(a.l.duration=a.S),
|
|
380
|
+
function nk(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J,F;return L(function(I){switch(I.g){case 1:c=Ic;a.G=!0;a.u=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.$&&(a.i.autoplay=!1);sa(I,2);a.o.mb();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(Je)),n=u(l.slice(1)),r=n.next();!r.done;r=n.next())p=r.value,p.p.reject(new R(2,7,7003,void 0));for(t in a.h){x=a.h[t];try{a.l.removeSourceBuffer(x)}catch(K){}}return D(I,
|
|
381
|
+
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.M=new dg,a.l=Dj(a,a.M),D(I,a.M,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.S)&&a.S&&(a.l.duration=a.S),B=new dg,v=a.l.sourceBuffers,A=b.size,z=0,C=function(){z++;z===A&&(B.resolve(),a.o.Ya(v,"addsourcebuffer",C))},a.o.s(v,"addsourcebuffer",C),E=u(b.keys()),H=E.next();case 6:if(H.done)return a.i.currentTime=d,D(I,B,2);J=H.value;F=b.get(J);return D(I,Hj(a,J,F,F.codecs),9);case 9:a.u?(a.j[c.Z]=[],a.j[c.va]=[]):a.j[J]=[];H=E.next();I.D(6);
|
|
382
382
|
break;case 2:va(I),a.G=!1,Ag(a.K),a.o.na(a.i,"canplaythrough",function(){a.K.g||(a.i.autoplay=e,f||a.i.play())}),wa(I,0)}})}function ok(a,b){return jk(a,function(){return nk(a,b)})}
|
|
383
|
-
function hk(a,b,c,d,e){var f,g,h,k,l,m,n,r,p,t,x,w,
|
|
383
|
+
function hk(a,b,c,d,e){var f,g,h,k,l,m,n,r,p,t,x,w,B,v,A;return L(function(z){if(1==z.g){f=Ic;if(b==f.Ca)return z.return(!1);g=ve(ye(a.I[b]));h=we(a.I[b]);l=!1;m=ie(c,d);n=a.A.forceTransmux;if(!hd(m)||!a.F&&je.includes(m))n=!0;n&&(r=ke(c,d),p=ce(r))&&(k=p(),t=Ec(f.Z,(d||"").split(",")),x=Ec(f.va,(d||"").split(",")),t&&x?(l=!0,w=x,b==f.Z&&(w=t),m=k.convertCodecs(b,ke(c,w))):m=k.convertCodecs(b,r));B=ve(ye(m));v=we(m);if(g===B&&h===v)return z.return(!1);A=!0;if(a.u||l&&k&&!a.m[b])A=!1;if(A&&"smooth"===
|
|
384
384
|
a.A.codecSwitchingStrategy&&jd())return D(z,mk(a,b,m,k),3);k&&k.destroy();return D(z,ok(a,e),3)}return z.return(!0)})}function pk(a,b,c,d){if(b==Gc)var e=!1;else{e=ve(ye(a.I[b]));var f=we(a.I[b]),g=ie(c,d),h=a.A.forceTransmux;if(!hd(g)||!a.F&&je.includes(g))h=!0;c=ke(c,d);h&&(h=ce(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ve(ye(g));g=we(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!jd()||a.u:!1}var Fj=window.URL.createObjectURL,Jj="sequence";function qk(a,b,c){this.i=a;this.u=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.H=!0;this.I=0;this.G=void 0===c?!0:c;this.J=0;this.o=!1;this.F=null}q=qk.prototype;q.getDuration=function(){return this.j};q.Si=function(){return this.g};q.Oh=function(a){this.i=a};q.xb=function(a){this.j=a};q.Vi=function(){return this.i};q.Kh=function(a){this.A=a};q.gd=function(a){this.H=a};q.$e=function(a){this.m=a};q.ze=function(){return this.m};q.Cg=function(a){this.u=a};q.Ki=function(){return this.u};
|
|
385
385
|
q.Dh=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Me(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
386
386
|
q.Td=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Me(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.o&&(this.i=d-this.h-this.g)}};q.Ge=function(){this.o=!0};q.tj=function(){return this.o};q.Mh=function(a){this.F=a};q.Ni=function(){return this.F};
|
|
387
|
-
q.Me=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.ng=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.H};q.
|
|
388
|
-
q.hc=function(){return this.U()||this.
|
|
389
|
-
q.Jh=function(a){this.J=a};N("shaka.media.PresentationTimeline",qk);qk.prototype.setAvailabilityTimeOffset=qk.prototype.Jh;qk.prototype.usingPresentationStartTime=qk.prototype.Xh;qk.prototype.getSeekRangeEnd=qk.prototype.Kb;qk.prototype.getSeekRangeStart=qk.prototype.
|
|
390
|
-
qk.prototype.isInProgress=qk.prototype.
|
|
387
|
+
q.Me=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.ng=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.H};q.Ac=function(){return Infinity!=this.j&&!this.H};q.Lb=function(){return Math.max(this.I,this.hc()-this.m)};q.Rh=function(a){this.I=a};
|
|
388
|
+
q.hc=function(){return this.U()||this.Ac()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.J,this.j):this.h?Math.min(this.h,this.j):this.j};q.Jd=function(a){var b=Math.max(this.l,this.I);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.hc()-this.m+a,this.Kb()))};q.wc=function(){return this.Jd(0)};q.Kb=function(){return Math.max(0,this.hc()-(this.U()||this.Ac()?this.u:0))};q.Xh=function(){return null==this.i||null!=this.h&&this.G?!1:!0};
|
|
389
|
+
q.Jh=function(a){this.J=a};N("shaka.media.PresentationTimeline",qk);qk.prototype.setAvailabilityTimeOffset=qk.prototype.Jh;qk.prototype.usingPresentationStartTime=qk.prototype.Xh;qk.prototype.getSeekRangeEnd=qk.prototype.Kb;qk.prototype.getSeekRangeStart=qk.prototype.wc;qk.prototype.getSafeSeekRangeStart=qk.prototype.Jd;qk.prototype.getSegmentAvailabilityEnd=qk.prototype.hc;qk.prototype.setUserSeekStart=qk.prototype.Rh;qk.prototype.getSegmentAvailabilityStart=qk.prototype.Lb;
|
|
390
|
+
qk.prototype.isInProgress=qk.prototype.Ac;qk.prototype.isLive=qk.prototype.U;qk.prototype.offset=qk.prototype.offset;qk.prototype.notifyMaxSegmentDuration=qk.prototype.ng;qk.prototype.notifyMinSegmentStartTime=qk.prototype.Me;qk.prototype.getInitialProgramDateTime=qk.prototype.Ni;qk.prototype.setInitialProgramDateTime=qk.prototype.Mh;qk.prototype.isStartTimeLocked=qk.prototype.tj;qk.prototype.lockStartTime=qk.prototype.Ge;qk.prototype.notifySegments=qk.prototype.Td;qk.prototype.notifyTimeRange=qk.prototype.Dh;
|
|
391
391
|
qk.prototype.getDelay=qk.prototype.Ki;qk.prototype.setDelay=qk.prototype.Cg;qk.prototype.getSegmentAvailabilityDuration=qk.prototype.ze;qk.prototype.setSegmentAvailabilityDuration=qk.prototype.$e;qk.prototype.setStatic=qk.prototype.gd;qk.prototype.setClockOffset=qk.prototype.Kh;qk.prototype.getPresentationStartTime=qk.prototype.Vi;qk.prototype.setDuration=qk.prototype.xb;qk.prototype.setPresentationStartTime=qk.prototype.Oh;qk.prototype.getMaxSegmentDuration=qk.prototype.Si;
|
|
392
392
|
qk.prototype.getDuration=qk.prototype.getDuration;function rk(a,b,c){this.j=c;this.l=a;this.u=sk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}rk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function tk(a,b){a.i=b}function uk(a){this.g=a}function sk(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=u(Hi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function vk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.F=b;this.u=c;this.l=new cd;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.o=!1;this.l.s(a,"waiting",function(){return wk(f)});this.m=(new Ob(function(){wk(f)})).ya(this.u.gapJumpTimerTime)}vk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.A=null};vk.prototype.qg=function(){this.o=!0;wk(this)};
|
|
393
393
|
function wk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=sk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Ii(c,b,a.u.gapDetectionThreshold),null==
|
|
@@ -396,9 +396,9 @@ function Dk(a,b){0<a.g.readyState?Ek(a.i,b):xk(a.g,HTMLMediaElement.HAVE_METADAT
|
|
|
396
396
|
function Ak(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Ob(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ak.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Ek(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ya(.1)};function Gk(a){this.g=a;this.j=!1;this.h=null;this.i=new cd}q=Gk.prototype;q.vf=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;xk(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.wf=function(a){this.h=this.j?this.h:a};q.le=function(){return(this.j?this.g.currentTime:this.h)||0};q.Ug=function(){return 0};
|
|
397
397
|
q.Tg=function(){return 0};q.Ch=function(){};
|
|
398
398
|
function Hk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.o=Ik(a,c,f);this.j=new vk(a,b.presentationTimeline,c,this.o,f);this.h=new zk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Ck(g.h);h=Jk(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Dk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
399
|
-
g.g.
|
|
399
|
+
g.g.wc():g.g.Kb():0>h&&(h=g.g.Kb()+h);return Kk(g,Lk(g,h))});this.m=new Ob(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ck(g.h),k=g.g.wc(),l=g.g.Kb();3>l-k&&(k=l-3);h<k&&(h=Jk(g,h),g.i.currentTime=h)}})}q=Hk.prototype;q.vf=function(){this.m.ya(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};q.wf=function(a){Dk(this.h,a)};
|
|
400
400
|
q.le=function(){var a=Ck(this.h);return 0<this.i.readyState&&!this.i.paused?Lk(this,a):a};q.Ug=function(){return this.o?this.o.o:0};q.Tg=function(){return this.j.G};q.Ch=function(){this.j.qg()};function Kk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
401
|
-
function Jk(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.
|
|
401
|
+
function Jk(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.wc(),f=a.g.Kb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Jd(c),k=a.g.Jd(d);c=a.g.Jd(c+d);return b>=g?Kk(a,b):b>f?f:b<e?Fi(a.i.buffered,k)?k:c:b>=h||Fi(a.i.buffered,b)?b:c}function Lk(a,b){var c=a.g.wc();if(b<c)return c;a=a.g.Kb();return b>a?a:b}
|
|
402
402
|
function Ik(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new rk(new uk(a),b.stallThreshold,c);tk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Mk(a){this.g=a;this.m=null;this.j=0;this.o=!1}q=Mk.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.j};q.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.Aj=function(){this.o=!0};q.Tc=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
403
403
|
q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};q.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.o)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
404
404
|
q.Je=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,y(a))}};q.Sd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Je(a);this.fb(b)};q.fb=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
@@ -410,56 +410,56 @@ Mk.prototype.getNumReferences=Mk.prototype.getNumReferences;function Nk(a,b,c,d)
|
|
|
410
410
|
Nk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Nk);Nk.prototype.next=Nk.prototype.next;Nk.prototype.current=Nk.prototype.current;Nk.prototype.currentPosition=Nk.prototype.ti;
|
|
411
411
|
Nk.prototype.setReverse=Nk.prototype.Ze;function Pk(){Mk.call(this,[]);this.h=[]}na(Pk,Mk);q=Pk.prototype;q.clone=function(){var a=new Pk;a.h=this.h.slice();return a};q.release=function(){for(var a=u(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.Tc=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.Tc(a)};q.find=function(a){for(var b=0,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};
|
|
412
412
|
q.get=function(a){for(var b=0,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Je=function(){};q.fb=function(){};q.Sd=function(){};q.Sc=function(){};q.ef=function(){};N("shaka.media.MetaSegmentIndex",Pk);Pk.prototype.updateEvery=Pk.prototype.ef;Pk.prototype.fit=Pk.prototype.Sc;Pk.prototype.mergeAndEvict=Pk.prototype.Sd;Pk.prototype.evict=Pk.prototype.fb;Pk.prototype.merge=Pk.prototype.Je;
|
|
413
|
-
Pk.prototype.offset=Pk.prototype.offset;Pk.prototype.get=Pk.prototype.get;Pk.prototype.find=Pk.prototype.find;Pk.prototype.forEachTopLevelReference=Pk.prototype.Tc;Pk.prototype.release=Pk.prototype.release;function Qk(a){var b=this;this.g=a;this.h=this.g.ye();this.i=new Ob(function(){b.g.Bh(.25*b.h)})}Qk.prototype.release=function(){this.set(this.
|
|
414
|
-
function al(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.Ub(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.za&&(c=!1);2==d.
|
|
415
|
-
function fl(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&gl(a,c)}function hl(a){fl(a,a.g);fl(a,a.i);a.l=0}Zk.prototype.fb=function(a,b){b=void 0===b?!1:b;for(var c=u(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&gl(this,d);b&&el(this)};
|
|
416
|
-
function il(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&gl(a,d)}el(a)}function jl(a,b){b&&b!==a.h&&(hl(a),a.h=b)}function gl(a,b){var c=a.g;b instanceof yi&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function cl(a){this.g=a;this.Qe=this.Ig=null}
|
|
417
|
-
cl.prototype.abort=function(){this.Qe&&this.Qe.abort()};function kl(a){bb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Ob(function(){for(var c=b.i(),d=u(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ya(2)}na(kl,bb);kl.prototype.release=function(){this.g.clear();this.h.stop();bb.prototype.release.call(this)};function ll(a){bb.call(this);this.g=new Map;this.h=a}na(ll,bb);ll.prototype.release=function(){this.g.clear();bb.prototype.release.call(this)};function ml(a,b){var c=a.g.get(b);c||(c={Vd:[],eh:null,contentType:b},a.g.set(b,c));return c}function nl(a,b,c){var d=ml(a,b.contentType);ol(a,d);a={mg:b,position:c};d=d.Vd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
413
|
+
Pk.prototype.offset=Pk.prototype.offset;Pk.prototype.get=Pk.prototype.get;Pk.prototype.find=Pk.prototype.find;Pk.prototype.forEachTopLevelReference=Pk.prototype.Tc;Pk.prototype.release=Pk.prototype.release;function Qk(a){var b=this;this.g=a;this.h=this.g.ye();this.i=new Ob(function(){b.g.Bh(.25*b.h)})}Qk.prototype.release=function(){this.set(this.vc());this.i&&(this.i.stop(),this.i=null);this.g=null};Qk.prototype.set=function(a){if(this.h!=a)a:{this.h=a,this.i.stop();if(0<=this.h)try{var b=this.h;this.g.ye()!=b&&this.g.Fg(b);break a}catch(c){}this.i.ya(.25);0!=this.g.ye()&&this.g.Fg(0)}};Qk.prototype.vc=function(){return this.g.vc()};function Rk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Ob(function(){Sk(b,!1)})).ya(.25)}Rk.prototype.release=function(){this.i.stop();for(var a=u(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Sk(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Tk(){this.g=null;this.h=[]}function Uk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Vk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(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 Wk(){this.i=this.h=null;this.g=[]}function Xk(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 Yk(){this.me=this.A=this.F=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.M=this.O=this.J=this.K=this.L=this.l=this.o=NaN;this.g=new Tk;this.h=new Wk};function Zk(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function $k(a,b){a.j=b;a=u(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
414
|
+
function al(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.Ub(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.za&&(c=!1);2==d.xc()&&(c=!1);c&&d.ua&&bl(a,d.ua);c&&!a.g.has(d)&&(c=new cl(a.j),dl(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.Ud&&d.Fe)break;d=b.next().value}el(a)}}}
|
|
415
|
+
function bl(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return zi(d,b)})){var c=new cl(a.j);dl(c,b,a.h);a.i.set(b,c)}}function fl(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&gl(a,c)}function hl(a){fl(a,a.g);fl(a,a.i);a.l=0}Zk.prototype.fb=function(a,b){b=void 0===b?!1:b;for(var c=u(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&gl(this,d);b&&el(this)};
|
|
416
|
+
function el(a){for(var b=Array.from(a.g.keys()),c={},d=u(a.i.keys()),e=d.next();!e.done;c={ee:c.ee},e=d.next())c.ee=e.value,b.some(function(f){return function(g){return zi(g.ua,f.ee)}}(c))||gl(a,c.ee)}function il(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&gl(a,d)}el(a)}function jl(a,b){b&&b!==a.h&&(hl(a),a.h=b)}function gl(a,b){var c=a.g;b instanceof yi&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function cl(a){this.g=a;this.Qe=this.Ig=null}
|
|
417
|
+
function dl(a,b,c){var d=new Uint8Array(0);a.Qe=a.g(b,c,function(e){return L(function(f){if(1==f.g)return 0<d.byteLength?d=zc(d,e):d=e,a.Ig?D(f,a.Ig(d),3):f.D(0);d=new Uint8Array(0);G(f)})})}cl.prototype.abort=function(){this.Qe&&this.Qe.abort()};function kl(a){bb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Ob(function(){for(var c=b.i(),d=u(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ya(2)}na(kl,bb);kl.prototype.release=function(){this.g.clear();this.h.stop();bb.prototype.release.call(this)};function ll(a){bb.call(this);this.g=new Map;this.h=a}na(ll,bb);ll.prototype.release=function(){this.g.clear();bb.prototype.release.call(this)};function ml(a,b){var c=a.g.get(b);c||(c={Vd:[],eh:null,contentType:b},a.g.set(b,c));return c}function nl(a,b,c){var d=ml(a,b.contentType);ol(a,d);a={mg:b,position:c};d=d.Vd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
418
418
|
ll.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Vd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.mg;break a}}d=null}if(e=d)e=c.eh,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
419
419
|
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.eh=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ol(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Vd;b.Vd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Vd=[]};function pl(a,b,c,d,e){a=rg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ql(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.F=1;this.u=this.j=null;this.J=0;this.H=!1;this.i=new Map;this.G=!1;this.K=null;this.A=!1;this.l=new zg(function(){return rl(c)});this.L=Date.now()/1E3;this.o=new Map;this.I={projection:null,hfov:null}}q=ql.prototype;q.destroy=function(){return this.l.destroy()};
|
|
420
420
|
function rl(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=u(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,sl(e),b.push(tl(e));f=u(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,hl(h);return D(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;G(k)})}
|
|
421
|
-
q.configure=function(a){this.h=a;this.K=new ag({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.
|
|
422
|
-
b.
|
|
421
|
+
q.configure=function(a){this.h=a;this.K=new ag({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.ha&&(hl(b.ha),b.ha=null);b=u(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,hl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Gc))&&
|
|
422
|
+
b.ha&&(hl(b.ha),b.ha=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ha&&(hl(b.ha),b.ha=null);b=u(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ha?(il(c.ha,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.ha=null)):0<a.segmentPrefetchLimit&&(c.ha=ul(this,c.stream));a.disableAudioPrefetch||vl(this)};q.start=function(a){var b=this;return L(function(c){if(1==c.g)return D(c,wl(b,a||new Map),2);Ag(b.l);b.G=!0;G(c)})};
|
|
423
423
|
function xl(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Ic,a.J++,d=a.J,ra(l,2),D(l,fk(a.g.ea,c.Ca),4);case 4:ta(l,3);break;case 2:if(e=ua(l),a.g)a.g.onError(e);case 3:f=ie(b.mimeType,b.codecs),Ij(a.g.ea,f,a.m.sequenceMode,b.external),g=a.g.ea.H,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.J==d&&(k=yl(a,b),a.i.set(c.Ca,k),zl(a,k,0)),G(l)}})}function Al(a){var b=a.i.get(Gc);b&&(sl(b),tl(b).catch(function(){}),a.i.delete(Gc));a.u=null}
|
|
424
|
-
function Bl(a,b){var c=0>a.g.Ra(),d=a.i.get("video");d&&d.
|
|
424
|
+
function Bl(a,b){var c=0>a.g.Ra(),d=a.i.get("video");d&&d.ia&&d.ia.Ze(c);(d=a.i.get("audio"))&&d.ia&&d.ia.Ze(c);(d=a.i.get(Gc))&&d.ia&&d.ia.Ze(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Gc&&(Cl(a,b,!1,0,!1),c.Gc=d);else if(b=c.Gc)c.Gc=null,Cl(a,b,!0,0,!1)}function Dl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.G&&(b.video&&Cl(a,b.video,c,d,e,f),b.audio&&Cl(a,b.audio,c,d,e,f))}
|
|
425
425
|
function El(a,b){L(function(c){if(1==c.g)return a.u=b,a.G?b.segmentIndex?c.D(2):D(c,b.createSegmentIndex(),2):c.return();Cl(a,b,!0,0,!1);G(c)})}
|
|
426
|
-
function Cl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Gc?g&&(g.
|
|
426
|
+
function Cl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Gc?g&&(g.Gc&&(b.trickModeVideo?(g.Gc=b,b=b.trickModeVideo):g.Gc=null),g.stream!=b||e)&&(a.o.has(b)?g.ha=a.o.get(b):g.ha&&jl(g.ha,b),b.type==Gc&&(e=ie(b.mimeType,b.codecs),Ij(a.g.ea,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ia=null,g.Vg=!!f,c&&(g.Cd?g.gf=!0:g.kb?(g.mc=!0,g.re=d,g.gf=!0):(sl(g),Fl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Gl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
427
427
|
xl(a,b)}
|
|
428
428
|
function Gl(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.wb)return e.return();c=b.stream;d=b.wb;return c.segmentIndex?e.D(2):D(e,c.createSegmentIndex(),2)}if(b.wb!=d||b.stream!=c)return e.return();var f=a.g.xe();var g=Oj(a.g.ea,b.type),h=b.stream.segmentIndex.find(b.ib?b.ib.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.za?k.za-k.Ta:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ua)&&(h+=(k.za?k.za-k.Ta:null)||0),k=a.g.getBandwidthEstimate(),f=
|
|
429
429
|
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.wb.h.g>h?!0:!1):f=!1;f&&b.wb.abort();G(e)})}
|
|
430
|
-
q.Wd=function(){if(this.g)for(var a=this.g.xe(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.
|
|
430
|
+
q.Wd=function(){if(this.g)for(var a=this.g.xe(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.ia&&(e=c.ia.current());if(!e||e.startTime>a||e.endTime<a)c.ia=null;e=this.g.ea;e.G?e=!1:d==Gc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Nj(e,d),e=Fi(e,a));e||((null!=Oj(this.g.ea,d)||c.kb)&&Hl(this,c),c.wb&&(c.wb.abort(),c.wb=null),d===Gc&&(d=this.g.ea,d.J&&d.J.h()),c.Wd=!0)}};
|
|
431
431
|
function Hl(a,b){b.Cd||b.mc||(b.kb?(b.mc=!0,b.re=0):null==Mj(a.g.ea,b.type)?null==b.Qb&&zl(a,b,0):(sl(b),Fl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
432
432
|
function wl(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(r){if(1==r.g){c=Ic;if(!a.j)throw new R(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.Z,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.va,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Ca,a.u),e.add(a.u));f=a.g.ea;return D(r,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}Ag(a.l);a.updateDuration();g=u(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=yl(a,l),b.has(l.id)&&(n=
|
|
433
|
-
b.get(l.id),$k(n,function(p,t,x){return Il(p,t,x||null,a.h.retryParameters,a.g.Zb)}),m.
|
|
434
|
-
function ul(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Gc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Gc&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.
|
|
435
|
-
function vl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=u(a.m.variants),f=e.next();!f.done;d={bb:d.bb},f=e.next())if(d.bb=f.value,d.bb.audio)if(a.o.has(d.bb.audio)){if(f=a.o.get(d.bb.audio),il(f,b),!(0<b&&c.some(function(h){return function(k){return Kc(h.bb.audio.language,k)}}(d)))){var g=a.i.get(d.bb.audio.type);f!==(g&&g.
|
|
433
|
+
b.get(l.id),$k(n,function(p,t,x){return Il(p,t,x||null,a.h.retryParameters,a.g.Zb)}),m.ha=n),a.i.set(k,m),zl(a,m,0));G(r)})}function yl(a,b){return{stream:b,type:b.type,ia:null,ha:ul(a,b),ib:null,Cc:null,jg:null,hg:null,gg:null,Gc:null,endOfStream:!1,kb:!1,Qb:null,mc:!1,re:0,gf:!1,Cd:!1,Wd:!0,vg:!1,Md:!1,wb:null}}
|
|
434
|
+
function ul(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Gc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Gc&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.ha)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Zk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Il(d,e,f||null,a.h.retryParameters,a.g.Zb)}):null}
|
|
435
|
+
function vl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=u(a.m.variants),f=e.next();!f.done;d={bb:d.bb},f=e.next())if(d.bb=f.value,d.bb.audio)if(a.o.has(d.bb.audio)){if(f=a.o.get(d.bb.audio),il(f,b),!(0<b&&c.some(function(h){return function(k){return Kc(h.bb.audio.language,k)}}(d)))){var g=a.i.get(d.bb.audio.type);f!==(g&&g.ha)&&hl(f);a.o.delete(d.bb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Kc(h.bb.audio.language,k)}}(d))||!(f=ul(a,d.bb.audio))||
|
|
436
436
|
(d.bb.audio.segmentIndex||d.bb.audio.createSegmentIndex(),a.o.set(d.bb.audio,f))}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.ea.xb(a):this.g.ea.xb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
437
437
|
function Jl(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:Ag(a.l);if(b.kb||null==b.Qb||b.Cd)return h.return();b.Qb=null;if(!b.mc){h.D(2);break}return D(h,Fl(a,b,b.gf,b.re),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return D(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.kb||b.Qb||zl(a,b,0),h.return();case 4:ra(h,6);d=Kl(a,b);null!=d&&(zl(a,b,d),b.Md=!1);ta(h,7);break;case 6:return e=
|
|
438
438
|
ua(h),D(h,Ll(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.G||!f.every(function(k){return k.endOfStream})){h.D(0);break}return D(h,a.g.ea.endOfStream(),10);case 10:Ag(a.l),g=a.g.ea.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.xb(g),G(h)}})}
|
|
439
439
|
function Kl(a,b){if(Ml(b))return ck(a.g.ea,b.stream.originalId||""),null;b.type==Gc&&dk(a.g.ea);if(!a.g.ea.aa&&b.type!=Gc)return a.h.updateIntervalSeconds/2;var c=a.g.xe();if("audio"===b.type)for(var d=u(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.fb(c,!0),al(e,c);d=b.ib?b.ib.endTime:c;e=Vj(a.g.ea,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.F),g=a.m.presentationTimeline.getDuration()-d,h=Oj(a.g.ea,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
440
|
-
!0,"video"==b.type&&(a=a.i.get(Gc))&&Ml(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Nl(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=u(g);for(h=g.next();!h.done;h=g.next())h=h.value,Ml(h)||h.
|
|
441
|
-
return null}function Nl(a,b,c,d){if(b.
|
|
442
|
-
function Ol(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
443
|
-
ra(I,2);n=Ql(n,C);E=!1;H=0;(new Gg).box("mdat",function(K){H=K.size+K.start;E=!0}).parse(n,!1,!0);if(!E){I.D(4);break}J=n.subarray(0,H);n=n.subarray(H);return D(I,Rl(a,b,c,f,d,J,!0),5);case 5:b.
|
|
444
|
-
return a.A?z.return():b.mc?(b.kb=!1,zl(a,b,0),z.return()):D(z,Rl(a,b,c,f,d,w),10);case 10:b.
|
|
445
|
-
b,
|
|
440
|
+
!0,"video"==b.type&&(a=a.i.get(Gc))&&Ml(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Nl(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=u(g);for(h=g.next();!h.done;h=g.next())h=h.value,Ml(h)||h.ia&&!h.ia.current()||(f=Math.min(f,h.ib?h.ib.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ha&&b.ia&&!a.o.has(b.stream)&&(b.ha.fb(c),al(b.ha,e.startTime));Ol(a,b,c,e).catch(function(){});
|
|
441
|
+
return null}function Nl(a,b,c,d){if(b.ia)return b.ia.current();if(b.ib||d)return b.ia=b.stream.segmentIndex.Ub(b.ib?b.ib.endTime:d,!1,0>a.g.Ra()),b.ia&&b.ia.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ra();var f=null;d&&(b.ia=b.stream.segmentIndex.Ub(e,!1,a),f=b.ia&&b.ia.next().value);f||(b.ia=b.stream.segmentIndex.Ub(c,!1,a),f=b.ia&&b.ia.next().value);return f}
|
|
442
|
+
function Ol(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A;return L(function(z){switch(z.g){case 1:e=Ic;f=b.stream;g=b.ia;b.kb=!0;ra(z,2);if(2==d.xc())throw new R(1,1,1011);return D(z,Pl(a,b,d),4);case 4:Ag(a.l);if(a.A)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=r=!1,x=function(C){var E,H,J,F;return L(function(I){switch(I.g){case 1:if(r)return I.return();p=!0;Ag(a.l);if(a.A)return I.return();
|
|
443
|
+
ra(I,2);n=Ql(n,C);E=!1;H=0;(new Gg).box("mdat",function(K){H=K.size+K.start;E=!0}).parse(n,!1,!0);if(!E){I.D(4);break}J=n.subarray(0,H);n=n.subarray(H);return D(I,Rl(a,b,c,f,d,J,!0),5);case 5:b.ha&&b.ia&&al(b.ha,d.startTime,!0);case 4:ta(I,0);break;case 2:t=F=ua(I),G(I)}})},D(z,Sl(a,b,d,x),9);l=Sl(a,b,d);return D(z,l,7);case 7:m=z.h;Ag(a.l);if(a.A)return z.return();Ag(a.l);return b.mc?(b.kb=!1,zl(a,b,0),z.return()):D(z,Rl(a,b,c,f,d,m),6);case 9:w=z.h;if(t)throw t;if(p){z.D(10);break}r=!0;Ag(a.l);
|
|
444
|
+
return a.A?z.return():b.mc?(b.kb=!1,zl(a,b,0),z.return()):D(z,Rl(a,b,c,f,d,w),10);case 10:b.ha&&b.ia&&al(b.ha,d.startTime,!0);case 6:Ag(a.l);if(a.A)return z.return();b.ib=d;g.next();b.kb=!1;b.vg=!1;B=a.g.ea.Ib();v=B[b.type];Ya(JSON.stringify(v));b.mc||a.g.qg(d,b.stream);zl(a,b,0);ta(z,0);break;case 2:A=ua(z);Ag(a.l,A);if(a.A)return z.return();b.kb=!1;if(7001==A.code)b.kb=!1,sl(b),zl(a,b,0),z.D(0);else if(b.type==e.Ca&&a.h.ignoreTextStreamFailures)a.i.delete(e.Ca),z.D(0);else if(3017==A.code)Tl(a,
|
|
445
|
+
b,A),z.D(0);else return b.Md=!0,1==A.category&&b.ha&&gl(b.ha,d),A.severity=2,D(z,Ll(a,b,A),0)}})}function Ul(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.D(2):D(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
|
|
446
446
|
function Ql(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Tl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.vg})){if(0<a.h.maxDisabledTime&&a.g.se(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.F);if(20<d)a.F-=.2;else if(4<d)a.F-=.04;else{b.Md=!0;a.A=!0;a.g.onError(c);return}b.vg=!0}zl(a,b,4)}
|
|
447
|
-
function Pl(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x;return L(function(w){switch(w.g){case 1:d=Ic;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=ve(b.stream.codecs);k=we(b.stream.mimeType);l=c.timestampOffset;if(l==b.jg&&f==b.hg&&g==b.gg&&h==b.ig&&k==b.vh){w.D(2);break}m=b.ig&&b.vh&&pk(a.g.ea,b.type,k,h);if(!m){w.D(3);break}n=null;b.type===d.va?n=a.i.get(d.Z):b.type===d.Z&&(n=a.i.get(d.va));if(!n){w.D(3);break}return D(w,tl(n).catch(function(){}),5);case 5:n.
|
|
448
|
-
function(){var
|
|
449
|
-
2),D(J,p,4);case 4:return
|
|
450
|
-
Lg).box("proj",Lg).T("prji",function(F){F=F.reader.
|
|
447
|
+
function Pl(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x;return L(function(w){switch(w.g){case 1:d=Ic;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=ve(b.stream.codecs);k=we(b.stream.mimeType);l=c.timestampOffset;if(l==b.jg&&f==b.hg&&g==b.gg&&h==b.ig&&k==b.vh){w.D(2);break}m=b.ig&&b.vh&&pk(a.g.ea,b.type,k,h);if(!m){w.D(3);break}n=null;b.type===d.va?n=a.i.get(d.Z):b.type===d.Z&&(n=a.i.get(d.va));if(!n){w.D(3);break}return D(w,tl(n).catch(function(){}),5);case 5:n.Cc=null,Hl(a,n);case 3:return r=
|
|
448
|
+
function(){var B,v,A;return L(function(z){if(1==z.g)return B=new Map,a.j.audio&&B.set(d.Z,a.j.audio),a.j.video&&B.set(d.va,a.j.video),ra(z,2),b.hg=f,b.gg=g,b.ig=h,b.vh=k,b.jg=l,v=a.m.sequenceMode||"HLS"==a.m.type,D(z,gk(a.g.ea,b.type,l,f,g,v,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,B),4);if(2!=z.g)return ta(z,0);A=ua(z);b.hg=null;b.gg=null;b.ig=null;b.jg=null;throw A;})},D(w,r(),2);case 2:return zi(c.ua,b.Cc)||(b.Cc=c.ua,c.l&&c.ua&&(p=Sl(a,b,c.ua),t=function(){var B,v,A,z,C,E,H;return L(function(J){switch(J.g){case 1:return ra(J,
|
|
449
|
+
2),D(J,p,4);case 4:return B=J.h,Ag(a.l),v=null,A=new Map,z={projection:null,hfov:null},C=new Gg,C.box("moov",Lg).box("trak",Lg).box("mdia",Lg).T("mdhd",function(F){v=Si(F.reader,F.version).timescale}).box("hdlr",function(F){F=F.reader;F.skip(8);switch(F.Ec()){case "soun":A.set(d.Z,v);break;case "vide":A.set(d.va,v)}v=null}).box("minf",Lg).box("stbl",Lg).T("stsd",Ng).box("encv",Og).box("avc1",Og).box("avc3",Og).box("hev1",Og).box("hvc1",Og).box("dvav",Og).box("dva1",Og).box("dvh1",Og).box("dvhe",Og).box("vexu",
|
|
450
|
+
Lg).box("proj",Lg).T("prji",function(F){F=F.reader.Ec();z.projection=F}).box("hfov",function(F){F=F.reader.R()/1E3;z.hfov=F}).parse(B),Vl(a,z),A.has(b.type)?c.ua.timescale=A.get(b.type):null!=v&&(c.ua.timescale=v),E=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,D(J,a.g.Yg(b.type,B),5);case 5:return D(J,Xj(a.g.ea,b.type,B,null,b.stream,E),6);case 6:ta(J,0);break;case 2:throw H=ua(J),b.Cc=null,H;}})},a.g.Cj(c.startTime,c.ua),e.push(t()))),a.m.sequenceMode&&(x=b.ib?b.ib.j:null,c.j!=x&&e.push(ik(a.g.ea,
|
|
451
451
|
b.type,c.startTime))),D(w,Promise.all(e),0)}})}
|
|
452
|
-
function Rl(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.H;if(l||m)k=new Gg;l&&k.T("emsg",function(t){var x=d.emsgSchemeIdUris;if(0===t.version){var w=t.reader.
|
|
453
|
-
v+e.timestampOffset,
|
|
454
|
-
w||(w=Oi(t),w.length&&e&&a.g.Ej([{cueTime:e.startTime,data:t,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.T("prft",function(t){if(!a.H&&e.ua.timescale){var x=t.reader,w=t.version;x.R();t=x.R();var
|
|
452
|
+
function Rl(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.H;if(l||m)k=new Gg;l&&k.T("emsg",function(t){var x=d.emsgSchemeIdUris;if(0===t.version){var w=t.reader.Ec();var B=t.reader.Ec();var v=t.reader.R();var A=t.reader.R();var z=t.reader.R();var C=t.reader.R();var E=e.startTime+A/v}else v=t.reader.R(),E=t.reader.ed()/
|
|
453
|
+
v+e.timestampOffset,A=E-e.startTime,z=t.reader.R(),C=t.reader.R(),w=t.reader.Ec(),B=t.reader.Ec();t=t.reader.Pb(t.reader.getLength()-t.reader.Na());if(x&&x.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Dj():(x=(new Map).set("detail",{startTime:E,endTime:E+z/v,schemeIdUri:w,value:B,timescale:v,presentationTimeDelta:A,eventDuration:z,id:C,messageData:t}),x=new Q("emsg",x),x.cancelable=!0,a.g.onEvent(x),x.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
454
|
+
w||(w=Oi(t),w.length&&e&&a.g.Ej([{cueTime:e.startTime,data:t,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.T("prft",function(t){if(!a.H&&e.ua.timescale){var x=t.reader,w=t.version;x.R();t=x.R();var B=x.R();t=1E3*t+B/Math.pow(2,32)*1E3;0===w?x=x.R():(w=x.R(),x=x.R(),x=w*Math.pow(2,32)+x);t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+t)).getTime();x=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-x/e.ua.timescale*1E3)});x=new Q("prft",x);a.g.onEvent(x);
|
|
455
455
|
a.H=!0}});(l||m)&&k.parse(f);return D(p,Wl(a,b,c),2);case 2:return Ag(a.l),n=b.Wd,b.Wd=!1,r=b.Vg,b.Vg=!1,D(p,a.g.Yg(b.type,f),3);case 3:return D(p,Xj(a.g.ea,b.type,f,e,d,h,n,r,g),4);case 4:Ag(a.l),G(p)}})}function Wl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Mj(a.g.ea,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():D(h,a.g.ea.remove(b.type,e,e+g),2)}Ag(a.l);G(h)})}
|
|
456
456
|
function Ml(a){return a&&a.type==Gc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
457
|
-
function Sl(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.Kd())return l.return(e);f=null;if(b.
|
|
457
|
+
function Sl(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.Kd())return l.return(e);f=null;if(b.ha){var m=b.ha,n=m.g;c instanceof yi&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Ig=d),f=m.Qe):f=null}f||(f=Il(c,b.stream,d||null,a.h.retryParameters,a.g.Zb));g=0;b.ia&&(g=b.ia.h);b.wb=f;return D(l,f.promise,2);case 2:h=l.h;b.wb=null;k=h.data;if(!c.aesKey){l.D(3);break}return D(l,Ul(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
458
458
|
function Il(a,b,c,d,e){var f=a instanceof Ai?a:void 0,g=f?1:0;a=pl(a.ka(),a.Ta,a.za,d,c);a.contentType=b.type;return e.request(xg,a,{type:g,stream:b,segment:f})}
|
|
459
|
-
function Fl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.mc=!1,b.gf=!1,b.re=0,b.Cd=!0,b.ib=null,b.
|
|
459
|
+
function Fl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.mc=!1,b.gf=!1,b.re=0,b.Cd=!0,b.ib=null,b.Cc=null,b.ia=null,b.ha&&!a.o.has(b.stream)&&hl(b.ha),d?(e=a.g.xe(),f=a.g.ea.getDuration(),D(g,a.g.ea.remove(b.type,e+d,f),3)):D(g,fk(a.g.ea,b.type),4);if(3!=g.g)return Ag(a.l),c?D(g,a.g.ea.flush(b.type),3):g.D(3);Ag(a.l);b.Cd=!1;b.endOfStream=!1;b.kb||b.Qb||zl(a,b,0);G(g)})}
|
|
460
460
|
function zl(a,b,c){var d=b.type;if(d!=Gc||a.i.has(d))b.Qb=(new Nb(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),D(f,Jl(a,b),4);if(2!=f.g)return ta(f,0);e=ua(f);if(a.g)a.g.onError(e);G(f)})})).V(c)}function sl(a){null!=a.Qb&&(a.Qb.stop(),a.Qb=null)}function tl(a){return L(function(b){return a.wb?D(b,a.wb.abort(),0):b.D(0)})}
|
|
461
461
|
function Ll(a,b,c){var d;return L(function(e){if(1==e.g)return D(e,cg(a.K),2);Ag(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.se(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);G(e)})}
|
|
462
|
-
function Xl(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.L<c)return h.return(!1);a.L=b;d=Ic;if(e=a.i.get(d.Z))e.
|
|
462
|
+
function Xl(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.L<c)return h.return(!1);a.L=b;d=Ic;if(e=a.i.get(d.Z))e.Cc=null,Hl(a,e),tl(e).catch(function(){});if(f=a.i.get(d.va))f.Cc=null,Hl(a,f),tl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.Z,a.j.audio);a.j.video&&g.set(d.va,a.j.video);return D(h,ok(a.g.ea,g),2)}return h.return(!0)})}
|
|
463
463
|
function Vl(a,b){if(a.I.projection!=b.projection||a.I.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new Q("spatialvideoinfo",c)}else c=new Q("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.I=b}};function Yl(){}
|
|
464
464
|
function Zl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Le(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Le(l)),k=Zl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
|
|
465
465
|
k),g=!1)}return g}function $l(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function am(a,b){return a&&b}N("shaka.util.ConfigUtils",Yl);Yl.convertToConfigObject=$l;Yl.mergeConfigObjects=Zl;function bm(){}function cm(a){a=oc(a);return(new ib(a)).Tb}function dm(a,b,c){function d(h){Kb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new R(2,6,6015);var e;"string"==typeof b?e=qc(b,!0):e=b;a=oc(a);a=qc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function em(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=oc(a).split("skd://").pop();return dm(a,c,b)}
|
|
@@ -468,17 +468,17 @@ bm.conaxFairPlayRequest=function(a,b){fm(a,b)};bm.ezdrmFairPlayRequest=function(
|
|
|
468
468
|
bm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=oc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Jb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return dm(a,d,b)};bm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=oc(a).split(";").pop();return dm(a,c,b)};bm.verimatrixInitDataTransform=function(a,b,c){return em(a,b,c)};bm.initDataTransform=dm;
|
|
469
469
|
bm.defaultGetContentId=cm;bm.isFairPlaySupported=function(){var a;return L(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ra(b,2),D(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);ua(b);return b.return(!1)})};function gm(){}
|
|
470
470
|
function hm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:bg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(k,l,m){window.shakaMediaKeysPolyfill&&"skd"==l&&(l=m.serverCertificate,m=cm(k),k=dm(k,m,l));return k},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Tb(),minHdcpVersion:"",
|
|
471
|
-
ignoreDuplicateInitData:!Xb()};(Tb()||dc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Xb()||Wb()||Ub("Tizen 4")||Yb()&&38===$b()||Yb()&&53===$b()||Yb()&&68===$b()||(navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform.toLowerCase().includes("windows"))&&Sb()||(c="smooth",d=!0);d={retryParameters:bg(),availabilityWindowOverride:NaN,disableAudio:!1,
|
|
472
|
-
defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
|
|
473
|
-
"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:im,manifestPreprocessorTXml:jm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",
|
|
474
|
-
mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Wb()||Xb()||Yb()&&38===$b()||dc()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:im,manifestPreprocessorTXml:jm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
475
|
-
var e={retryParameters:bg(),failureCallback:function(k){return am([k])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
|
|
476
|
-
dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,
|
|
477
|
-
infiniteLiveStreamDuration:!1};if(Yb()||Vb()||Zb()||fc())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?D(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return am([k,l])},
|
|
478
|
-
defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,
|
|
479
|
-
"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(k,l){return am([k,l])}};var g=!1;if(Yb()||Vb()||Zb()||fc()||ec()||dc()||Tb())g=!0;var h={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new wf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",
|
|
480
|
-
preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},
|
|
481
|
-
cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(km(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
|
|
471
|
+
ignoreDuplicateInitData:!Xb()};(Tb()||dc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Xb()||Wb()||Ub("Tizen 4")||Yb()&&38===$b()||Yb()&&53===$b()||Yb()&&68===$b()||Zb()&&(!Zb()||!Ub("Android"))||(navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform&&navigator.platform.toLowerCase().includes("windows"))&&Sb()||(c="smooth",d=!0);d={retryParameters:bg(),availabilityWindowOverride:NaN,disableAudio:!1,
|
|
472
|
+
disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
|
|
473
|
+
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:im,manifestPreprocessorTXml:jm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",
|
|
474
|
+
ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Wb()||Xb()||Yb()&&38===$b()||dc()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:im,manifestPreprocessorTXml:jm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
475
|
+
"79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:bg(),failureCallback:function(k){return am([k])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
|
|
476
|
+
autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,
|
|
477
|
+
vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1};if(Yb()||Vb()||Zb()||fc())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?D(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return am([k,l])},
|
|
478
|
+
usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,
|
|
479
|
+
clearBufferSwitch:!1,safeMarginSwitch:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(k){return am([k],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(k,l){return am([k,l])}};var g=!1;if(Yb()||Vb()||Zb()||fc()||ec()||dc()||Tb())g=!0;var h={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new wf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",
|
|
480
|
+
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},
|
|
481
|
+
textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(km(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
|
|
482
482
|
function lm(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Zl(a,b,c||hm(),d,"")}
|
|
483
483
|
function km(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Uc(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Mc(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
484
484
|
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Gc&&"image"!=c.type||b.push(c);return b}function im(a){return am([a],a)}function jm(a){return am([a],a)}N("shaka.util.PlayerConfiguration",gm);gm.mergeConfigObjects=lm;gm.createDefault=hm;function mm(a,b,c,d,e){bb.call(this);this.L=a;this.S=b;this.Ua=e.networkingEngine;this.X=d;this.m=null;this.Xb=c;this.Ka=0;this.Vb=e.Rc;this.A=e.xj;this.Wb=e.yj;this.g=e.config;this.j=this.F=this.h=null;this.qa=!1;this.G=e.Ij;this.Fa=!1;this.l=null;this.aa=!1;this.i=this.u=null;this.$=!1;this.K=new Map;this.Ja=!1;this.Za=e.Hj;this.Y=new Yk;this.oa=new dg;this.ma=new dg;this.M=new dg;this.H=new dg;this.H.catch(function(){});this.O=null;this.o=!1;this.Gb=e.ni;this.ra=null;this.$a=e.mi;this.P=!1;this.J=
|
|
@@ -492,26 +492,26 @@ function wm(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:ym(a,"drm-e
|
|
|
492
492
|
7);case 7:a.dispatchEvent(f),G(g)}})}q.configure=function(a,b){a=$l(a,b);lm(this.g,a)};q.getConfiguration=function(){return Le(this.g)};
|
|
493
493
|
function xm(a,b,c){var d,e,f,g,h;L(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Zk(d,b,function(l,m,n){return Il(l,m,n||null,a.g.streaming.retryParameters,a.Ua)}),a.K.set(b.id,e),D(k,b.createSegmentIndex(),2);f=a.X||0;(h=(g=b.segmentIndex.Ub(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ua&&bl(e,h.ua):al(e,h.startTime));G(k)})}q.nk=function(){return Promise.race([this.M,this.H])};
|
|
494
494
|
q.destroy=function(){var a=this,b,c,d;return L(function(e){switch(e.g){case 1:a.o=!0;if(!a.j||a.qa){e.D(2);break}return D(e,a.j.stop(),2);case 2:if(!a.i||a.$){e.D(4);break}return D(e,a.i.stop(),4);case 4:a.G&&!a.Fa&&a.G.release();if(!a.l||a.aa){e.D(6);break}return D(e,a.l.destroy(),6);case 6:if(0<a.K.size&&!a.Ja)for(b=u(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,hl(d);G(e)}})};
|
|
495
|
-
function zm(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))}N("shaka.media.PreloadManager",mm);mm.prototype.destroy=mm.prototype.destroy;mm.prototype.waitForFinish=mm.prototype.nk;function Am(a,b){bb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{
|
|
496
|
-
"regionremove",function(d){c.g.delete(d.region)})}na(Am,bb);Am.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;bb.prototype.release.call(this)};Am.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=u(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Dm:a>d.endTime?Em:Bm;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.
|
|
495
|
+
function zm(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))}N("shaka.media.PreloadManager",mm);mm.prototype.destroy=mm.prototype.destroy;mm.prototype.waitForFinish=mm.prototype.nk;function Am(a,b){bb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Lc:null,Kc:Bm,zc:function(d,e){return Cm(c,"enter",d,e)}},{Lc:Dm,Kc:Bm,zc:function(d,e){return Cm(c,"enter",d,e)}},{Lc:Em,Kc:Bm,zc:function(d,e){return Cm(c,"enter",d,e)}},{Lc:Bm,Kc:Dm,zc:function(d,e){return Cm(c,"exit",d,e)}},{Lc:Bm,Kc:Em,zc:function(d,e){return Cm(c,"exit",d,e)}},{Lc:Dm,Kc:Em,zc:function(d,e){return Cm(c,"skip",d,e)}},{Lc:Em,Kc:Dm,zc:function(d,e){return Cm(c,"skip",d,e)}}];this.h=new cd;this.h.s(this.i,
|
|
496
|
+
"regionremove",function(d){c.g.delete(d.region)})}na(Am,bb);Am.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;bb.prototype.release.call(this)};Am.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=u(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Dm:a>d.endTime?Em:Bm;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Lc==e&&h.Kc==f&&h.zc(d,b)}}};
|
|
497
497
|
function Cm(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Dm=1,Bm=2,Em=3;function Fm(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:var n=(new ib(a)).jb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Gm[d])return m.return(e);f=0;g=rg([a],c);ra(m,2);g.method="HEAD";return D(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=ua(m);if(!k||1002!=k.code&&1001!=k.code){m.D(3);break}g.method="GET";return D(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
498
498
|
e.toLowerCase().split(";").shift():"")}})}
|
|
499
499
|
var Gm={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",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Hm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Hm(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Im(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Im(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value;k=k.next().value;
|
|
500
500
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
501
501
|
function Im(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
502
502
|
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Jm(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Jm(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Hm(d,b);c.push(e)}return c};function Km(a,b){this.g=null;for(var c=u(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}q=Km.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;Lm(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
503
|
-
q.append=function(a){var b=Jm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=u(b);for(var e=b.next();!e.done;d={
|
|
503
|
+
q.append=function(a){var b=Jm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=u(b);for(var e=b.next();!e.done;d={Nc:d.Nc},e=b.next())d.Nc=e.value,a.some(function(f){return function(g){return g.startTime==f.Nc.startTime&&g.endTime==f.Nc.endTime&&g.text==f.Nc.payload?!0:!1}}(d))||(e=Mm(d.Nc))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
|
|
504
504
|
c.indexOf(g)});a=u(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(Lm(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
505
505
|
function Mm(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
506
|
-
function Lm(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=u(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}N("shaka.text.SimpleTextDisplayer",Km);Km.prototype.setTextVisibility=Km.prototype.setTextVisibility;Km.prototype.isTextVisible=Km.prototype.isTextVisible;Km.prototype.destroy=Km.prototype.destroy;Km.prototype.append=Km.prototype.append;Km.prototype.remove=Km.prototype.remove;Km.prototype.configure=Km.prototype.configure;function Nm(){}q=Nm.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};N("shaka.text.StubTextDisplayer",Nm);Nm.prototype.setTextVisibility=Nm.prototype.setTextVisibility;Nm.prototype.isTextVisible=Nm.prototype.isTextVisible;Nm.prototype.destroy=Nm.prototype.destroy;Nm.prototype.append=Nm.prototype.append;Nm.prototype.remove=Nm.prototype.remove;Nm.prototype.configure=Nm.prototype.configure;function Om(){}function T(a){return document.createElement(a)}function Pm(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Qm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",Om);Om.removeAllChildren=Qm;function Rm(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.u=b;this.l=null;this.g=T("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.u.appendChild(this.g);this.G=(new Ob(function(){d.A.paused||Sm(d)})).ya(c
|
|
507
|
-
"seeking",function(){Sm(d,!0)});this.j.s(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Sm(d,!0)}),this.o.observe(this.g));this.F=new Map}q=Rm.prototype;q.configure=function(a){this.G&&this.G.ya(a.captionsUpdatePeriod)};
|
|
506
|
+
function Lm(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=u(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}N("shaka.text.SimpleTextDisplayer",Km);Km.prototype.setTextVisibility=Km.prototype.setTextVisibility;Km.prototype.isTextVisible=Km.prototype.isTextVisible;Km.prototype.destroy=Km.prototype.destroy;Km.prototype.append=Km.prototype.append;Km.prototype.remove=Km.prototype.remove;Km.prototype.configure=Km.prototype.configure;function Nm(){}q=Nm.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};N("shaka.text.StubTextDisplayer",Nm);Nm.prototype.setTextVisibility=Nm.prototype.setTextVisibility;Nm.prototype.isTextVisible=Nm.prototype.isTextVisible;Nm.prototype.destroy=Nm.prototype.destroy;Nm.prototype.append=Nm.prototype.append;Nm.prototype.remove=Nm.prototype.remove;Nm.prototype.configure=Nm.prototype.configure;function Om(){}function T(a){return document.createElement(a)}function Pm(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Qm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",Om);Om.removeAllChildren=Qm;function Rm(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.u=b;this.l=null;this.g=T("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.u.appendChild(this.g);c&&c.captionsUpdatePeriod||ld("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.G=(new Ob(function(){d.A.paused||Sm(d)})).ya(c&&
|
|
507
|
+
c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new cd;this.j.s(document,"fullscreenchange",function(){Sm(d,!0)});this.j.s(this.A,"seeking",function(){Sm(d,!0)});this.j.s(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Sm(d,!0)}),this.o.observe(this.g));this.F=new Map}q=Rm.prototype;q.configure=function(a){this.G&&this.G.ya(a.captionsUpdatePeriod)};
|
|
508
508
|
q.append=function(a){var b=[].concat(y(this.h)),c={};a=u(a);for(var d=a.next();!d.done;c={be:c.be},d=a.next())c.be=d.value,b.some(function(e){return function(f){return Pd(f,e.be)}}(c))||this.h.push(c.be);Sm(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.G&&this.G.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
509
509
|
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Sm(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function Tm(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
510
|
-
function Um(a,b,c,d,e){var f=!1,g=[],h=[];b=u(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ai:null;l&&(g.push(l.Ef),l.
|
|
511
|
-
p.startTime?r.startTime-p.startTime:r.endTime-p.endTime});h=u(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.
|
|
510
|
+
function Um(a,b,c,d,e){var f=!1,g=[],h=[];b=u(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ai:null;l&&(g.push(l.Ef),l.Fc&&g.push(l.Fc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Tm(a,n)||(f=!0):(Vm(a,k,e),l=a.i.get(k),n=l.ai,f=!0));0<k.nestedCues.length&&n&&Um(a,k.nestedCues,n,d,e);e.pop()}if(f){d=u(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(r,p){return r.startTime!=
|
|
511
|
+
p.startTime?r.startTime-p.startTime:r.endTime-p.endTime});h=u(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.Fc?(d.Fc.contains(c)&&d.Fc.removeChild(c),c.appendChild(d.Fc),d.Fc.appendChild(d.Ef)):c.appendChild(d.Ef)}}function Sm(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=u(a.F.values());for(var d=b.next();!d.done;d=b.next())Qm(d.value);Qm(a.g);a.i.clear();a.F.clear()}a.m&&Um(a,a.h,a.g,c,[])}}
|
|
512
512
|
function Vm(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=T(e);"br"!=e&&Wm(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.l===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Yd?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Yd?"%":"px");if(a.F.has(g))c=a.F.get(g);else{var h=T("span"),k=c.heightUnits==Yd?"%":"px",l=c.widthUnits==Yd?"%":"px",m=c.viewportAnchorUnits==
|
|
513
513
|
Yd?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.l===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):(h.style.top=c.viewportAnchorY-c.regionAnchorY*
|
|
514
|
-
c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.F.set(g,h);c=h}}e=f;d&&(e=T("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Ef:f,ai:e,
|
|
514
|
+
c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.F.set(g,h);c=h}}e=f;d&&(e=T("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Ef:f,ai:e,Fc:c})}
|
|
515
515
|
function Xm(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Dd?c:"left"===a||"start"===a&&b===Fd||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Fd?"line-right":"center"}
|
|
516
516
|
function Wm(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=Ym(c.linePadding,c,a.u);f.paddingRight=Ym(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
517
517
|
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=T("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=Zm(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=Zm(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?
|
|
@@ -528,49 +528,49 @@ function nn(a){if(0===a.type)return on;if(a=a.stream){var b=a.type;if("video"==b
|
|
|
528
528
|
function sn(a,b){b=a.h.Ib()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function tn(a,b){var c=a.h.rb();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case kn:return a.videoBandwidth||NaN;case dn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
529
529
|
function gn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=u(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
530
530
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function mn(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=gn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
531
|
-
function hn(a,b){if(!b||a.includes("offline:"))return a;a=new ib(a);a.g.set("CMCD",b);return a.toString()}var fn="m",dn="a",kn="v",en="av",on="i",qn="c",pn="tt";N("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",di:"s",OTHER:"o"});function un(a){this.h=a;this.g=null}q=un.prototype;q.configure=function(a){this.h=a};q.nh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(vn)?1E3*this.g.get(vn):null};q.mh=function(){return this.h.enabled&&this.g&&this.g.has(wn)?1E3*this.g.get(wn):null};q.Wi=function(){return this.h.enabled&&this.g&&this.g.has(xn)?this.g.get(xn):null};q.Xi=function(){return this.h.enabled&&this.g&&this.g.has(
|
|
531
|
+
function hn(a,b){if(!b||a.includes("offline:"))return a;a=new ib(a);a.g.set("CMCD",b);return a.toString()}var fn="m",dn="a",kn="v",en="av",on="i",qn="c",pn="tt";N("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",di:"s",OTHER:"o"});function un(a){this.h=a;this.g=null}q=un.prototype;q.configure=function(a){this.h=a};q.nh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(vn)?1E3*this.g.get(vn):null};q.mh=function(){return this.h.enabled&&this.g&&this.g.has(wn)?1E3*this.g.get(wn):null};q.Wi=function(){return this.h.enabled&&this.g&&this.g.has(xn)?this.g.get(xn):null};q.Xi=function(){return this.h.enabled&&this.g&&this.g.has(yn)?this.g.get(yn):null};
|
|
532
532
|
q.getBandwidthEstimate=function(a){var b=this.mh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Mn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}N("shaka.util.CmsdManager",un);un.prototype.getBandwidthEstimate=un.prototype.getBandwidthEstimate;un.prototype.getRoundTripTime=un.prototype.Xi;un.prototype.getResponseDelay=un.prototype.Wi;un.prototype.getEstimatedThroughput=un.prototype.mh;
|
|
533
|
-
un.prototype.getMaxBitrate=un.prototype.nh;var wn="etp",vn="mb",xn="rd",
|
|
533
|
+
un.prototype.getMaxBitrate=un.prototype.nh;var wn="etp",vn="mb",xn="rd",yn="rtt";function Nn(){this.g=null;this.h=[]}function On(a,b){return L(function(c){if(1==c.g)return a.g?D(c,new Promise(function(d){return a.h.push(d)}),2):c.D(2);a.g=b;G(c)})}Nn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function U(a,b){bb.call(this);var c=this;this.l=Pn;this.Oe=this.g=null;this.$=!1;this.Ve=new cd;this.Gb=new cd;this.m=new cd;this.ra=new cd;this.G=this.H=this.F=this.I=null;this.df=0;this.S=new Nn;this.aa=this.Pg=this.oa=this.i=this.Fa=this.K=this.j=this.Za=this.L=this.bi=this.X=this.P=this.$a=this.M=this.J=this.Ua=null;this.Ka=!1;this.ma=this.o=null;this.Sg=1E9;this.Rd=[];this.O=NaN;this.h=Qn(this);this.Y={width:Infinity,height:Infinity};this.Le=new ki(this.h,this.Y,null);this.u=null;this.qa=new Kf(this.h.preferredAudioLanguage,
|
|
534
534
|
this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ja=this.h.preferredTextLanguage;this.Xb=this.h.preferredTextRole;this.Wb=this.h.preferForcedSubs;this.Vb=[];b&&b(this);this.P=Rn(this);this.X=new un(this.h.cmsd);this.I=Sn(this);this.I.Eg(this.h.streaming.forceHTTPS);
|
|
535
|
-
this.A=null;Tn&&(this.A=Tn(),this.A.configure(this.h.ads));this.Ve.s(window,"online",function(){Un(c);c.wg()});this.Se=new Ob(function(){return Vn(c)});a&&(ld("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.
|
|
535
|
+
this.A=null;Tn&&(this.A=Tn(),this.A.configure(this.h.ads));this.Ve.s(window,"online",function(){Un(c);c.wg()});this.Se=new Ob(function(){return Vn(c)});a&&(ld("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Pc(a,!0))}na(U,bb);function Wn(a){null!=a.L&&(uj(a.L),a.L.release(),a.L=null)}
|
|
536
536
|
function Xn(a,b){if(b.lcevc.enabled){var c=a.rb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Sb()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Ua("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Wn(a);null==a.L&&(a.L=new tj(a.g,a.bi,b.lcevc),a.H&&(a.H.P=a.L))}else Wn(a)}function Yn(a,b){return new Q(a,b)}q=U.prototype;
|
|
537
537
|
q.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Zn)return c.return();Wn(a);b=a.detach();a.l=Zn;return D(c,b,2);case 2:a.Ve&&(a.Ve.release(),a.Ve=null);a.Gb&&(a.Gb.release(),a.Gb=null);a.m&&(a.m.release(),a.m=null);a.ra&&(a.ra.release(),a.ra=null);a.ma=null;a.h=null;a.u=null;a.Oe=null;a.P=null;a.X=null;if(!a.I){c.D(3);break}return D(c,a.I.destroy(),4);case 4:a.I=null;case 3:a.o&&(a.o.release(),a.o=null),bb.prototype.release.call(a),G(c)}})};
|
|
538
538
|
function $n(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Ub("Trident/"))return!1;var a=gc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Pb()?!0:Qb("application/x-mpegurl")}function ao(a,b){a.dispatchEvent(Yn("onstatechange",(new Map).set("state",b)))}
|
|
539
|
-
q.
|
|
540
|
-
}})};q.Wg=function(a){this.bi=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Zn)throw new R(2,7,7E3);return D(c,b.
|
|
541
|
-
q.
|
|
539
|
+
q.Pc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==Zn)throw new R(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.D(2);break}return D(g,c.detach(),2);case 2:return D(g,bo(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(ao(c,"attach"),e=function(){var h=co(c);h&&eo(c,h)},c.Gb.s(a,"error",e),c.g=a);if(!b||!Pb()||c.H){g.D(6);break}return D(g,fo(c),6);case 6:va(g);c.S.release();wa(g,0);break;case 5:return f=ua(g),D(g,c.detach(),10);case 10:throw f;
|
|
540
|
+
}})};q.Wg=function(a){this.bi=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Zn)throw new R(2,7,7E3);return D(c,b.Ic(!1,a),2)}if(3!=c.g)return D(c,bo(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Gb.mb(),b.g=null),ao(b,"detach"),b.A&&!a&&b.A.release()}finally{b.S.release()}G(c)})};function bo(a,b){var c;return L(function(d){return 1==d.g?(c=++a.df,D(d,On(a.S,b),2)):c!=a.df?(a.S.release(),d.return(!0)):d.return(!1)})}
|
|
541
|
+
q.Ic=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return L(function(r){switch(r.g){case 1:return c.l!=Zn&&(c.l=Pn),D(r,bo(c,"unload"),2);case 2:if(r.h)return r.return();sa(r,3);c.Ka=!1;ao(c,"unload");a&&!Pb()&&(a=!1);Wn(c);d=c.Vb.map(function(p){return p()});c.Vb=[];return D(r,Promise.all(d),5);case 5:c.dispatchEvent(Yn("unloading"));c.$a&&(c.$a.release(),c.$a=null);c.g&&(c.m.mb(),c.ra.mb());c.Se.stop();c.Ua&&(c.Ua.release(),c.Ua=null);if(!c.K){r.D(6);break}return D(r,
|
|
542
542
|
c.K.stop(),7);case 7:c.K=null,c.Fa=null;case 6:if(!c.o){r.D(8);break}return D(r,c.o.stop(),8);case 8:if(!c.j){r.D(10);break}return D(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.J&&(c.J.release(),c.J=null);c.G&&(c.G.release(),c.G=null);if(!c.H){r.D(12);break}return D(r,c.H.destroy(),13);case 13:c.H=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.X&&(c.X.g=null);c.g&&Qm(c.g);if(!c.g||!c.g.src){r.D(14);break}return D(r,new Promise(function(p){return(new Ob(p)).V(.1)}),15);case 15:c.g.removeAttribute("src"),
|
|
543
543
|
c.g.load();case 14:if(!c.F){r.D(16);break}return D(r,c.F.destroy(),17);case 17:c.F=null;case 16:c.oa=null;c.Pg=null;c.M=null;if(c.i){e=u(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=u([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=u(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new Yk;c.Rg=null;c.Rd=[];c.O=NaN;go(c);case 3:va(r);c.S.release();wa(r,4);break;
|
|
544
544
|
case 4:if(a&&Pb()&&!c.H)return D(r,fo(c),0);r.D(0)}})};q.lk=function(a){this.aa=a};
|
|
545
|
-
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,r,p,t,x,w;return L(function(
|
|
546
|
-
2),D(z,On(d.S,
|
|
547
|
-
|
|
548
|
-
19);case 19:d.h=e.getConfiguration();d.Le=e.A;d.Fa=e.F;d.K=rm(e);d.$a=sm(e);d.Za=e.Za;d.i=e.Wf();if(r=e.m)d.qa=r;l&&d.g&&"AUDIO"===d.g.nodeName&&(ko(d),d.configure("manifest.disableVideo",!0));return D(
|
|
545
|
+
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,r,p,t,x,w;return L(function(B){switch(B.g){case 1:if(d.l==Zn)throw new R(2,7,7E3);e=null;f="";a instanceof mm?(e=a,f=e.Fd()||""):f=a||"";return D(B,On(d.S,"load"),2);case 2:d.S.release();if(!d.g)throw new R(2,7,7002);if(!d.oa){B.D(3);break}return D(B,d.Ic(!1),3);case 3:g=++d.df;h=function(){return L(function(v){if(1==v.g)return d.df==g?v.D(0):e?D(v,e.destroy(),3):v.D(3);throw new R(2,7,7E3);})};k=function(v,A){return L(function(z){switch(z.g){case 1:return sa(z,
|
|
546
|
+
2),D(z,On(d.S,A),4);case 4:return D(z,h(),5);case 5:return D(z,v(),6);case 6:return D(z,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:va(z),d.S.release(),wa(z,0)}})};ra(B,5,6);null==b&&e&&(b=e.getStartTime());d.aa=b;d.Ka=!1;d.dispatchEvent(Yn("loading"));if(e){c=e.S;B.D(8);break}if(c){B.D(8);break}return D(B,k(function(){return L(function(v){if(1==v.g)return D(v,ho(d,f),2);c=v.h;G(v)})},"guessMimeType_"),8);case 8:l=!!e;if(e){pm(e,d);d.u=e.getStats();B.D(11);break}return D(B,io(d,f,b,c,!0),12);case 12:e=
|
|
547
|
+
B.h;if(!e){d.u=new Yk;B.D(11);break}pm(e,d);d.u=e.getStats();return D(B,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Xb:Date.now()/1E3;d.u=e?e.getStats():new Yk;d.oa=f;d.Pg=c||null;if(m)return D(B,k(function(){return L(function(v){return D(v,jo(d,c),0)})},"initializeSrcEqualsDrmInner_"),24);if(d.H){B.D(17);break}return D(B,k(function(){return L(function(v){return D(v,fo(d),0)})},"initializeMediaSourceEngineInner_"),17);case 17:return D(B,k(function(){return e.oa},"waitForManifest"),
|
|
548
|
+
19);case 19:d.h=e.getConfiguration();d.Le=e.A;d.Fa=e.F;d.K=rm(e);d.$a=sm(e);d.Za=e.Za;d.i=e.Wf();if(r=e.m)d.qa=r;l&&d.g&&"AUDIO"===d.g.nodeName&&(ko(d),d.configure("manifest.disableVideo",!0));return D(B,k(function(){return e.ma},"waitForDrm"),20);case 20:return d.F=tm(e),D(B,k(function(){return L(function(v){return D(v,d.F.Pc(d.g),0)})},"drmEngine_.attach"),21);case 21:return D(B,k(function(){return e.M},"waitForChooseInitialVariant"),22);case 22:return!(p=e.u)||d.ma&&d.ma==p||(d.o=qm(e),d.ma=e.u,
|
|
549
549
|
"function"!=typeof d.o.setMediaElement&&(ld("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(ld("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(ld("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),
|
|
550
|
-
t=um(e),x=e.ra,D(
|
|
550
|
+
t=um(e),x=e.ra,D(B,k(function(){return L(function(v){return D(v,lo(d,n,x,t),0)})},"loadInner_"),23);case 23:om(e);B.D(16);break;case 24:return D(B,k(function(){return L(function(v){return D(v,mo(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(Yn("loaded"));case 6:va(B);if(!e){B.D(26);break}return D(B,e.destroy(),26);case 26:wa(B,0);break;case 5:w=ua(B);if(7E3==w.code){B.D(28);break}return D(B,d.Ic(!1),28);case 28:throw w;}})};
|
|
551
551
|
function ko(a){for(var b=u(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
|
|
552
|
-
q.hk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.K&&c.Fa&&c.oa)){g.D(2);break}e=c.g.currentTime;c.U()&&(e=null);f=Date.now()/1E3;return D(g,no(c,c.oa,e,c.Pg,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.K,l=c.Fa;h.h=c.i;h.j=k;h.F=l;h=d;k=c.ma;h.i=c.o;h.u=k;d.m=c.qa;d.start();c.i=null;c.K=null;c.Fa=null;c.o=null;c.ma=null;case 2:return D(g,c.
|
|
552
|
+
q.hk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.K&&c.Fa&&c.oa)){g.D(2);break}e=c.g.currentTime;c.U()&&(e=null);f=Date.now()/1E3;return D(g,no(c,c.oa,e,c.Pg,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.K,l=c.Fa;h.h=c.i;h.j=k;h.F=l;h=d;k=c.ma;h.i=c.o;h.u=k;d.m=c.qa;d.start();c.i=null;c.K=null;c.Fa=null;c.o=null;c.ma=null;case 2:return D(g,c.Ic(a,b),4);case 4:return g.return(d)}})};
|
|
553
553
|
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return L(function(f){if(1==f.g)return D(f,io(d,a,b,c),2);(e=f.h)?e.start().catch(function(){}):eo(d,new R(2,7,7005));return f.return(e)})};
|
|
554
554
|
function io(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return L(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.D(2):D(l,ho(a,b),3);2!=l.g&&(d=l.h);if(g=oo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.ma==a.h.abrFactory&&(k=!1),a.g&&"AUDIO"===a.g.nodeName&&(h=!0));return l.return(no(a,b,c,d||null,f,!e,h,k))})}
|
|
555
|
-
function no(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,r,p,t,x,w,
|
|
555
|
+
function no(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,r,p,t,x,w,B,v,A,z,C,E;return L(function(H){if(1==H.g)return k=null,l=Le(a.h),g&&(l.manifest.disableVideo=!0),m=function(){return k.P&&k.o?null:k},n=function(){return m()?m().getConfiguration():a.h},r=function(J,F){m()?k.configure(J,F):a.configure(J,F)},Infinity!=a.Y.width||Infinity!=a.Y.height?H.D(2):D(H,jc(),3);2!=H.g&&(p=H.h,a.Y.width=p.width,a.Y.height=p.height);t=new ki(l,a.Y,null);x={networkingEngine:a.I,
|
|
556
556
|
filter:function(J){var F,I;return L(function(K){if(1==K.g)return D(K,li(t,J),2);if(4!=K.g){F=K.h;if(!F)return K.D(0);I=Yn("trackschanged");return D(K,Promise.resolve(),4)}k.dispatchEvent(I);G(K)})},makeTextStreamsForClosedCaptions:function(J){return po(a,J)},onTimelineRegionAdded:function(J){var F=k.G;a:{var I=u(F.g);for(var K=I.next();!K.done;K=I.next())if(K=K.value,K.schemeIdUri==J.schemeIdUri&&K.id==J.id&&K.startTime==J.startTime&&K.endTime==J.endTime){I=K;break a}I=null}null==I&&(F.g.add(J),J=
|
|
557
557
|
new Q("regionadd",new Map([["region",J]])),F.dispatchEvent(J))},onEvent:function(J){return k.dispatchEvent(J)},onError:function(J){return k.onError(J)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){r("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.P&&a.j.updateDuration()},newDrmInfo:function(J){var F=k.l,I=F?F.g:null;I&&F.u&&oi(t,I.keySystem,J)},onManifestUpdated:function(){var J=
|
|
558
|
-
(new Map).set("isLive",a.U());k.dispatchEvent(Yn("manifestupdated",J));nm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new kl(function(){return a.Pa()});w.addEventListener("regionadd",function(J){var F=J.region;qo(a,"timelineregionadded",F,k);nm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(F)})});
|
|
559
|
-
J.quality;J=J.position;F=(new Map).set("mediaQuality",{bandwidth:F.bandwidth,audioSamplingRate:F.audioSamplingRate,codecs:F.codecs,contentType:F.contentType,frameRate:F.frameRate,height:F.height,mimeType:F.mimeType,channelsCount:F.channelsCount,pixelAspectRatio:F.pixelAspectRatio,width:F.width}).set("position",J);a.dispatchEvent(Yn("mediaqualitychanged",F))}));v=!0;
|
|
558
|
+
(new Map).set("isLive",a.U());k.dispatchEvent(Yn("manifestupdated",J));nm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new kl(function(){return a.Pa()});w.addEventListener("regionadd",function(J){var F=J.region;qo(a,"timelineregionadded",F,k);nm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(F)})});B=null;l.streaming.observeQualityChanges&&(B=new ll(function(){return a.Ib()}),B.addEventListener("qualitychange",function(J){var F=
|
|
559
|
+
J.quality;J=J.position;F=(new Map).set("mediaQuality",{bandwidth:F.bandwidth,audioSamplingRate:F.audioSamplingRate,codecs:F.codecs,contentType:F.contentType,frameRate:F.frameRate,height:F.height,mimeType:F.mimeType,channelsCount:F.channelsCount,pixelAspectRatio:F.pixelAspectRatio,width:F.width}).set("position",J);a.dispatchEvent(Yn("mediaqualitychanged",F))}));v=!0;A={Zb:a.I,onError:function(J){return k.onError(J)},Pe:function(J){nm(k,!0,function(){a:{var F=Yn("keystatuschanged");a.dispatchEvent(F);
|
|
560
560
|
var I=Object.keys(J);F=1==I.length&&"00"==I[0];var K=!1;if(I.length){I=u(a.i.variants);for(var M=I.next();!M.done;M=I.next()){M=M.value;var P=[];M.audio&&P.push(M.audio);M.video&&P.push(M.video);P=u(P);for(var O=P.next();!O.done;O=P.next()){var X=O.value;O=M.allowedByKeySystem;if(X.keyIds.size){M.allowedByKeySystem=!0;X=u(X.keyIds);for(var W=X.next();!W.done;W=X.next())if(W=W.value,(W=J[F?"00":W])||a.F.H)M.allowedByKeySystem=M.allowedByKeySystem&&!!W&&!qi.includes(W)}O!=M.allowedByKeySystem&&(K=!0)}}}if(K&&
|
|
561
|
-
(ro(a),!so(a)))break a;(F=a.j.j)&&!F.allowedByKeySystem&&to(a)}})},onExpirationUpdated:function(J,F){var I=Yn("expirationupdated");k.dispatchEvent(I);if((I=k.j)&&I.onExpirationUpdated)I.onExpirationUpdated(J,F)},onEvent:function(J){k.dispatchEvent(J);"drmsessionupdate"==J.type&&v&&(v=!1,J=Date.now()/1E3-k.Ka,(a.u||k.getStats()).j=J,a.L&&uj(a.L))}};z=Sn(a,m);C=function(){return a.Rc(
|
|
561
|
+
(ro(a),!so(a)))break a;(F=a.j.j)&&!F.allowedByKeySystem&&to(a)}})},onExpirationUpdated:function(J,F){var I=Yn("expirationupdated");k.dispatchEvent(I);if((I=k.j)&&I.onExpirationUpdated)I.onExpirationUpdated(J,F)},onEvent:function(J){k.dispatchEvent(J);"drmsessionupdate"==J.type&&v&&(v=!1,J=Date.now()/1E3-k.Ka,(a.u||k.getStats()).j=J,a.L&&uj(a.L))}};z=Sn(a,m);C=function(){return a.Rc(A)};E={config:l,yj:x,Ij:w,Hj:B,Rc:C,xj:t,networkingEngine:z,ni:f,mi:h};k=new mm(b,d,e,c,E);return H.return(k)})}
|
|
562
562
|
function ho(a,b){var c,d;return L(function(e){if(1==e.g)return c=a.h.manifest.retryParameters,D(e,Fm(b,a.I,c),2);d=e.h;"application/x-mpegurl"==d&&bc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
563
563
|
function oo(a,b){if(!Pb())return!0;if(b){if(""==(a.g||Rb()).canPlayType(b))return!1;if(!(Pb()&&b in ti))return!0;if(ze(b)){if(a.h.streaming.preferNativeHls)return!0;if(bc()&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"]))return a.h.streaming.useNativeHlsForFairPlay;if(bc())return a.h.streaming.useNativeHlsOnSafari}}return!1}
|
|
564
564
|
function fo(a){var b,c,d,e,f;return L(function(g){if(1==g.g)return ao(a,"media-source"),b=a.h.textDisplayFactory,c=b(),c.configure?c.configure(a.h.textDisplayer):ld("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Rg=b,d=uo(a.g,c,function(h,k,l){vo(a,h,k,l)},a.L),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.Y=f,D(g,d.M,2);a.H=d;G(g)})}
|
|
565
|
-
function lo(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
565
|
+
function lo(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J;return L(function(F){switch(F.g){case 1:ao(a,"load");e=a.g;a.J=new Qk({ye:function(){return e.playbackRate},vc:function(){return e.defaultPlaybackRate},Fg:function(I){e.playbackRate=I},Bh:function(I){e.currentTime+=I}});f=function(){return wo(a)};g=function(){return xo(a)};a.m.s(e,"playing",f);a.m.s(e,"pause",f);a.m.s(e,"ended",f);a.m.s(e,"ratechange",g);Xn(a,a.h);a.Ja=a.h.preferredTextLanguage;a.Xb=a.h.preferredTextRole;a.Wb=a.h.preferForcedSubs;
|
|
566
566
|
yo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.o.init(function(I,K,M){a.j&&I!=a.j.j&&zo(a,I,!0,void 0===K?!1:K,void 0===M?0:M)});a.o.setMediaElement(e);a.o.setCmsdManager(a.X);a.j=Ao(a);a.j.configure(a.h.streaming);a.l=Bo;e.textTracks&&a.m.s(e.textTracks,"addtrack",function(I){if(I.track)switch(I=I.track,I.kind){case "chapters":Co(a,I)}});a.dispatchEvent(Yn("streaming"));h=c;(k=a.j.j)||h||(h=Do(a,!0));l=[];m=k||h;n=u([m.video,m.audio]);for(r=n.next();!r.done;r=n.next())(p=r.value)&&
|
|
567
567
|
!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){F.D(2);break}return D(F,Promise.all(l),2);case 2:if(a.K&&a.K.onInitialVariantChosen)a.K.onInitialVariantChosen(m);yo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);t=function(I){a.G=Eo(a,I);a.Ua=Fo(a,b);Go(a,e,Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal))};a.h.streaming.startAtSegmentBoundary||t(a.aa);if(k){F.D(4);break}if(!a.h.streaming.startAtSegmentBoundary){F.D(5);break}x=a.i.presentationTimeline;w=a.aa||
|
|
568
|
-
a.g.currentTime;
|
|
568
|
+
a.g.currentTime;B=x.wc();v=x.Kb();w<B?w=B:w>v&&(w=v);return D(F,Ho(h,w),6);case 6:A=F.h,t(A);case 5:zo(a,h,!0,!1,0);case 4:return a.G.vf(),z=a.ic().find(function(I){return I.active}),z||((C=uf(a.i.textStreams,a.Ja,a.Xb,a.Wb)[0]||null)&&Xk(a.u.h,C,!0),h&&(C?(h.audio&&Io(a,h.audio,C)&&(a.$=!0),a.$&&a.H.H.setTextVisibility(!0),Jo(a)):a.$=!1),C&&(a.h.streaming.alwaysStreamText||a.Bc())&&El(a.j,C)),D(F,a.j.start(d),7);case 7:a.h.abr.enabled&&(a.o.enable(),Ko(a));ro(a);so(a);a.i.variants.some(function(I){return I.primary});
|
|
569
569
|
(E=a.U())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate?(H=function(){return Lo(a)},a.m.s(e,"timeupdate",H)):E||(J=function(){return Mo(a)},a.m.s(e,"timeupdate",J),Mo(a));if(a.A)a.A.onManifestUpdated(E);a.Ka=!0;a.m.na(e,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});G(F)}})}
|
|
570
570
|
function jo(a,b){var c,d,e,f;return L(function(g){return 1==g.g?(c=Ic,d=Date.now()/1E3,e=!0,a.F=a.Rc({Zb:a.I,onError:function(h){eo(a,h)},Pe:function(){},onExpirationUpdated:function(){var h=Yn("expirationupdated");a.dispatchEvent(h)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.u.j=Date.now()/1E3-d)}}),a.F.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
571
571
|
segmentIndex:null,mimeType:b?we(b):"",codecs:b?ye(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},f.video.fullMimeTypes.add(ie(f.video.mimeType,
|
|
572
|
-
f.video.codecs)),a.F.Y=!0,D(g,Dh(a.F,[f],[]),2)):D(g,a.F.
|
|
573
|
-
function mo(a,b,c){var d,e,f,g,h,k,l,m,n,r;return L(function(p){if(1==p.g)return ao(a,"src-equals"),d=a.g,a.G=new Gk(d),e=!1,a.Vb.push(function(){e=!0}),null!=a.aa&&a.G.wf(a.aa),a.J=new Qk({ye:function(){return d.playbackRate},
|
|
572
|
+
f.video.codecs)),a.F.Y=!0,D(g,Dh(a.F,[f],[]),2)):D(g,a.F.Pc(a.g),0)})}
|
|
573
|
+
function mo(a,b,c){var d,e,f,g,h,k,l,m,n,r;return L(function(p){if(1==p.g)return ao(a,"src-equals"),d=a.g,a.G=new Gk(d),e=!1,a.Vb.push(function(){e=!0}),null!=a.aa&&a.G.wf(a.aa),a.J=new Qk({ye:function(){return d.playbackRate},vc:function(){return d.defaultPlaybackRate},Fg:function(t){d.playbackRate=t},Bh:function(t){d.currentTime+=t}}),f=a.h.streaming.rebufferingGoal,Go(a,d,f),g=function(){return wo(a)},h=function(){return xo(a)},a.m.s(d,"playing",g),a.m.s(d,"pause",g),a.m.s(d,"ended",g),a.m.s(d,
|
|
574
574
|
"ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.s(d.audioTracks,"addtrack",function(){return ro(a)}),a.m.s(d.audioTracks,"removetrack",function(){return ro(a)}),a.m.s(d.audioTracks,"change",function(){return ro(a)})),d.textTracks&&(a.m.s(d.textTracks,"addtrack",function(t){if(t.track)switch(t=t.track,t.kind){case "metadata":No(a,t);break;case "chapters":Co(a,t);break;default:ro(a)}}),a.m.s(d.textTracks,"removetrack",function(){return ro(a)}),
|
|
575
575
|
a.m.s(d.textTracks,"change",function(){return ro(a)})),d.src=bn(a.P,a.oa,c),(Vb()||Yb())&&d.load(),"none"!=d.preload&&!d.autoplay&&ze(c)&&gc()&&d.load(),a.l=Oo,a.dispatchEvent(Yn("streaming")),k=new dg,xk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.G.vf();k.resolve()}),xk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var t;return L(function(x){if(1==x.g)return Po(a),t=Qo(a),t.find(function(w){return"disabled"!=w.mode})?(0<t.length&&(a.$=!0),x.D(2)):D(x,new Promise(function(w){a.m.na(d.textTracks,
|
|
576
576
|
"change",w);(new Ob(w)).V(1)}),2);if(e)return x.return();Ro(a);G(x)})}),d.error?k.reject(co(a)):"none"==d.preload&&(Ua('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.'),k.resolve()),a.m.na(d,"error",function(){k.reject(co(a))}),D(p,k,2);(l=a.U())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate?
|
|
@@ -581,7 +581,7 @@ function Co(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ob(functio
|
|
|
581
581
|
function Sn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?nm(b(),!0,e):e()}b||(b=function(){return null});return new ng(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Yn("downloadheadersreceived",f));d(function(){if(a.X){var h=a.X;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
582
582
|
Mn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var r=new Map,p=l.split(";");for(l=1;l<p.length;l++){var t=p[l].split("=");r.set(t[0],Mn(t[1]))}var x=r}catch(w){x=null}x&&(h.g=x)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Yn("downloadfailed",e))},function(e,f,g){d(function(){var h=a.P,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)jn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
583
583
|
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}jn(h,f,{ot:fn,su:!h.i})}}catch(O){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",O)}break;case xg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=nn(k);var r=n.ot===kn||n.ot===dn||n.ot===en||n.ot===pn,p=k.stream;if(p){var t=h.h.Ra();if(r&&(n.bl=rn(h,p.type),n.ot!==pn)){var x=sn(h,p.type);n.dl=t?x/Math.abs(t):x}p.bandwidth&&(n.br=p.bandwidth/1E3);
|
|
584
|
-
if(p.segmentIndex&&m){var w=p.segmentIndex.Ub(m.endTime,!0,0>t);if(w){var
|
|
584
|
+
if(p.segmentIndex&&m){var w=p.segmentIndex.Ub(m.endTime,!0,0>t);if(w){var B=w.next().value;if(B&&B!=m){if(!Ad(m.ka(),B.ka())){var v=B.ka()[0],A=f.uris[0],z=new URL(v),C=new URL(A);if(z.origin!==C.origin)var E=v;else{for(var H=z.pathname.split("/").slice(1),J=C.pathname.split("/").slice(1,-1);H[0]===J[0];)H.shift(),J.shift();for(;J.length;)J.shift(),H.unshift("..");E=H.join("/")}n.nor=E}if((B.Ta||B.za)&&(m.Ta!=B.Ta||m.za!=B.za)){var F=B.Ta+"-";B.za&&(F+=B.za);n.nrr=F}}}var I=h.h.Ra()||1,K=sn(h,p.type)||
|
|
585
585
|
500,M=p.bandwidth;var P=M?M*(m.endTime-m.startTime)/1E3/(K/I/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(P)||(n.rtp=P)}}r&&n.ot!==pn&&(n.tb=tn(h,n.ot)/1E3);jn(h,f,n)}}catch(O){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",O)}break;case 2:case 5:case 6:jn(h,f,{ot:"k"});break;case 4:jn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.K)&&e.banLocation&&e.banLocation(h)},function(e,f){e=f.data.byteLength;if(f=b()?b().getStats():a.u)f.me=isNaN(f.me)?e:f.me+e})}
|
|
586
586
|
function Eo(a,b){return new Hk(a.g,a.i,a.h.streaming,b,function(){a.Ua&&Sk(a.Ua,!0);a.j&&a.j.Wd();a.M&&Uo(a)},function(c){return a.dispatchEvent(c)})}
|
|
587
587
|
function Fo(a,b){b=new Am(a.$a,a.U()||0<b);b.addEventListener("enter",function(d){qo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){qo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(qo(a,"timelineregionenter",e),qo(a,"timelineregionexit",e))});var c=new Rk(a.g);c.g.add(b);a.Za&&c.g.add(a.Za);return c}
|
|
@@ -599,24 +599,24 @@ function Vo(a){a.Le=new ki(a.h,a.Y,a.F);if(a.K){var b=Le(a.h.manifest);a.g&&"AUD
|
|
|
599
599
|
c.configure(a.h.textDisplayer):ld("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.H,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Rg=b;a.j&&(b=a.j,(c=b.i.get(Gc))&&Cl(b,c.stream,!0,0,!0))}else b=a.H.H,b.configure&&b.configure(a.h.textDisplayer);a.o&&(a.o.configure(a.h.abr),a.h.abr.enabled?a.o.enable():a.o.disable(),Ko(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),$f(a.M,b,Math.min(.5,
|
|
600
600
|
b/2)));a.i&&yo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.P&&a.P.configure(a.h.cmcd);a.X&&a.X.configure(a.h.cmsd)}q.getConfiguration=function(){var a=Qn(this);lm(a,this.h,Qn(this));return a};
|
|
601
601
|
q.kh=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.Pa().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.Qj=function(){for(var a in this.h)delete this.h[a];lm(this.h,Qn(this),Qn(this));Vo(this)};q.Id=function(){return this.l};q.Xf=function(){return this.i?this.i.type:null};q.Ti=function(){return this.g};
|
|
602
|
-
q.fc=function(){return this.I};q.Fd=function(){return this.oa};q.ue=function(){return this.A?this.A:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.
|
|
603
|
-
q.Pa=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.
|
|
602
|
+
q.fc=function(){return this.I};q.Fd=function(){return this.oa};q.ue=function(){return this.A?this.A:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Ac=function(){return this.i?this.i.presentationTimeline.Ac():!1};q.Yc=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};
|
|
603
|
+
q.Pa=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.wc(),end:a.Kb()}}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.ij=function(){this.U()&&(this.g.currentTime=this.Pa().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.F?this.F.g:null};q.Hd=function(){return this.F?this.F.Hd():Infinity};
|
|
604
604
|
q.Uf=function(){return this.F?this.F.Uf():[]};q.we=function(){return this.F?this.F.we():{}};q.Od=function(){return this.M?this.M.g==Zf:!1};q.Ra=function(){return this.g?this.J?this.J.h:1:0};
|
|
605
|
-
q.
|
|
606
|
-
q.Qc=function(){var a=this.J.
|
|
605
|
+
q.Hc=function(a){var b=this;0==a?Ua("A trick play rate of 0 is unsupported!"):(this.ra.mb(),this.g.paused&&this.g.play(),this.J.set(a),this.l==Bo&&(this.o.playbackRateChanged(a),Bl(this.j,1<Math.abs(a))),this.U()&&this.ra.s(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Pa(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Qc():Math.floor(c)<=Math.floor(d.start+e)&&b.Qc()}))};
|
|
606
|
+
q.Qc=function(){var a=this.J.vc();this.l==Oo&&this.J.set(a);this.l==Bo&&(this.J.set(a),this.o.playbackRateChanged(a),Bl(this.j,!1));this.ra.mb()};
|
|
607
607
|
q.rb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=u(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,sf(e)){var f=kf(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 rf(g)}):[]};
|
|
608
608
|
q.ic=function(){if(this.i){for(var a=this.j?this.j.u:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=lf(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Qo(this).map(function(f){return pf(f)}):[]};q.ve=function(){var a=this.Rd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return mf(b)})};
|
|
609
|
-
q.zi=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=Bo&&b.l!=Oo)return g.return(null);c=b.Rd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.D(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Tc(function(h){var k=Wo(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.
|
|
610
|
-
function Wo(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{
|
|
611
|
-
q.Zf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
612
|
-
t=g.A||p/r;x=g.startTime;
|
|
609
|
+
q.zi=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=Bo&&b.l!=Oo)return g.return(null);c=b.Rd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.D(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Tc(function(h){var k=Wo(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.tc;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.Zf(a,h.startTime+l*m/k))}}),D(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
610
|
+
function Wo(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{tc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
611
|
+
q.Zf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z;return L(function(C){if(1==C.g){if(c.l!=Bo&&c.l!=Oo)return C.return(null);d=c.Rd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(E){return E.id==a}))?e.segmentIndex?C.D(2):D(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=Wo(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.tc;n=l/h.rows;r=h.tc*h.rows;p=g.i-g.startTime;
|
|
612
|
+
t=g.A||p/r;x=g.startTime;B=w=0;1<r&&(v=Math.floor((b-g.startTime)/t),x=g.startTime+v*t,w=v%h.tc*m,B=Math.floor(v/h.tc)*n);A=!1;if(z=g.u)A=!0,n=z.height,w=z.positionX,B=z.positionY,m=z.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:B,startTime:x,duration:t,uris:g.ka(),width:m,sprite:A})})};
|
|
613
613
|
q.Ag=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.u&&(Xk(this.u.h,b,!1),El(this.j,b),Xo(this),this.Ja=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Qo(this);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,nf(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";Xo(this)}};
|
|
614
614
|
q.Ye=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&&Ua("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&&sf(d)&&(zo(this,d,!1,b,c),this.qa=new Jf(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),so(this))}else if(this.g&&this.g.audioTracks)for(b=
|
|
615
615
|
Array.from(this.g.audioTracks),b=u(b),c=b.next();!c.done;c=b.next())if(c=c.value,nf(c)==a.id){Yo(this,c);break}};q.Bi=function(){return Zo(this.rb())};q.$i=function(){return Zo(this.ic())};q.Ai=function(){return Array.from($o(this.rb()))};q.Zi=function(){return Array.from($o(this.ic()))};
|
|
616
616
|
q.Xe=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.G){this.qa=new Kf(a,b||"",c,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.qa.create(this.i.variants);c=null;e=u(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
617
|
-
b))c=f;c?(a=kf(c),this.Ye(a,!0,d)):to(this)}else this.g&&this.g.audioTracks&&(d=uf(this.rb(),a,b||"",!1)[0])&&this.Ye(d)};q.zg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ja=a,this.Xb=b||"",this.Wb=c,(a=uf(this.i.textStreams,this.Ja,this.Xb,this.Wb)[0]||null)&&a!=this.j.u&&(Xk(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.
|
|
617
|
+
b))c=f;c?(a=kf(c),this.Ye(a,!0,d)):to(this)}else this.g&&this.g.audioTracks&&(d=uf(this.rb(),a,b||"",!1)[0])&&this.Ye(d)};q.zg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ja=a,this.Xb=b||"",this.Wb=c,(a=uf(this.i.textStreams,this.Ja,this.Xb,this.Wb)[0]||null)&&a!=this.j.u&&(Xk(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.Bc()))El(this.j,a),Xo(this)}else(a=uf(this.ic(),a,b||"",c)[0])&&this.Ag(a)};
|
|
618
618
|
q.Xj=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G){for(var d=null,e=u(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.qa=new Kf(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),to(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=u(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Yo(this,b)}};
|
|
619
|
-
q.
|
|
619
|
+
q.Bc=function(){var a=this.$;return this.H&&this.l==Bo?this.H.H.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Qo(this).some(function(b){return"showing"==b.mode}):a};q.lh=function(){return this.g&&this.g.src&&this.g.textTracks?ap(this).map(function(a){return pf(a)}):[]};
|
|
620
620
|
q.Di=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=Mc(a),c=ap(this).filter(function(h){return Mc(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=u(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=u(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
621
621
|
function Qo(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function To(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function ap(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
622
622
|
q.bf=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Bo)this.H.H.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.u||(a=uf(this.i.textStreams,this.Ja,this.Xb,this.Wb),0<a.length&&(El(this.j,a[0]),Xo(this))):Al(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Qo(this);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Jo(this)}};
|
|
@@ -624,19 +624,19 @@ q.Ui=function(){if(this.G)var a=this.G.le();else{if(null==this.aa)return new Dat
|
|
|
624
624
|
q.ze=function(){return this.U()?this.i?this.i.presentationTimeline.ze():null:null};q.Ib=function(){if(this.l==Bo)return this.H.Ib();var a={total:[],audio:[],video:[],text:[]};this.l==Oo&&(a.total=Hi(this.g.buffered));return a};
|
|
625
625
|
q.getStats=function(){if(this.l!=Bo&&this.l!=Oo)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};wo(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
|
|
626
626
|
this.u;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.u.M=this.G.Tg(),this.u.O=this.G.Ug());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.u.J=Number(c.corruptedVideoFrames)}this.F?(c=this.F,c=c.K?c.K:NaN):c=NaN;this.u.u=c;if(this.l==Bo){c=this.j.j;b=this.j.u;if(c){d=this.J?this.J.h:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.u.F=e}c&&c.video&&(b=this.u,d=c.video.height||
|
|
627
|
-
NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.oh().valueOf()+1E3*a.currentTime,this.u.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.I=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.u.A=c}this.l==Oo&&(c=this.u,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.u;a=f.o;c=f.l;b=f.F;d=f.K;e=f.L;var g=f.J,h=f.O,k=f.M,l=f.A,m=f.i,n=f.m,r=f.H,p=f.j,t=Uk(f.g,"playing"),x=Uk(f.g,"paused"),w=Uk(f.g,"buffering"),
|
|
628
|
-
f=u(f.h.g);for(var H=f.next();!H.done;H=f.next())H=H.value,E.push({timestamp:H.timestamp,id:H.id,type:H.type,fromAdaptation:H.fromAdaptation,bandwidth:H.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:r,drmTimeSeconds:p,playTime:t,pauseTime:x,bufferingTime:w,licenseTime:
|
|
627
|
+
NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.oh().valueOf()+1E3*a.currentTime,this.u.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.I=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.u.A=c}this.l==Oo&&(c=this.u,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.u;a=f.o;c=f.l;b=f.F;d=f.K;e=f.L;var g=f.J,h=f.O,k=f.M,l=f.A,m=f.i,n=f.m,r=f.H,p=f.j,t=Uk(f.g,"playing"),x=Uk(f.g,"paused"),w=Uk(f.g,"buffering"),B=f.u,v=f.G,A=f.I,z=f.me,C=Vk(f.g),E=[];
|
|
628
|
+
f=u(f.h.g);for(var H=f.next();!H.done;H=f.next())H=H.value,E.push({timestamp:H.timestamp,id:H.id,type:H.type,fromAdaptation:H.fromAdaptation,bandwidth:H.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:r,drmTimeSeconds:p,playTime:t,pauseTime:x,bufferingTime:w,licenseTime:B,liveLatency:v,maxSegmentDuration:A,bytesDownloaded:z,stateHistory:C,
|
|
629
629
|
switchHistory:E}};
|
|
630
|
-
q.ii=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,p,t,x,w,
|
|
631
|
-
l&&C.label==(f||"")&&C.kind==c}))return ro(h),z.return(n);throw new R(1,2,2012);case 4:r=Ic;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new R(1,4,4033);if(!k.length){z.D(6);break}return D(z,dp(h,a,h.I,h.h.streaming.retryParameters),7);case 7:t=z.h,x=ep(h,t,d,k),w=new Blob([x],{type:"text/vtt"}),a=Fj(w),d="text/vtt";case 6:
|
|
632
|
-
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:r.Ca,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ie(d||"",e||"")])};v=ie(
|
|
633
|
-
q.ji=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
634
|
-
vttOffset:0};l=Fb(f);m=h.parseMedia(l,k,a);n=[];r={};p=u(m);for(t=p.next();!t.done;r={wd:r.wd,pc:r.pc},t=p.next())r.pc=t.value,r.wd=null,x=function(z){return function(){null==z.wd&&(z.wd=Ac([a],[z.pc.payload]));return z.wd||[]}}(r),w=new Ai(r.pc.startTime,r.pc.endTime,x,0,null,null,0,0,Infinity),r.pc.payload.includes("#xywh")&&(
|
|
630
|
+
q.ii=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,p,t,x,w,B,v,A;return L(function(z){switch(z.g){case 1:if(h.l!=Bo&&h.l!=Oo)throw new R(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ua("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.D(2);break}return D(z,bp(h,a),3);case 3:d=z.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Oo){z.D(4);break}g&&(c="forced");return D(z,cp(h,a,b,c,d,f||"",k),5);case 5:l=Mc(b);m=h.ic();if(n=m.find(function(C){return Mc(C.language)==
|
|
631
|
+
l&&C.label==(f||"")&&C.kind==c}))return ro(h),z.return(n);throw new R(1,2,2012);case 4:r=Ic;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new R(1,4,4033);if(!k.length){z.D(6);break}return D(z,dp(h,a,h.I,h.h.streaming.retryParameters),7);case 7:t=z.h,x=ep(h,t,d,k),w=new Blob([x],{type:"text/vtt"}),a=Fj(w),d="text/vtt";case 6:B={id:h.Sg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ok(0,p,[a]),mimeType:d||"",
|
|
632
|
+
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:r.Ca,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ie(d||"",e||"")])};v=ie(B.mimeType,B.codecs);A=Be(v);if(!A)throw new R(2,2,2014,d);h.i.textStreams.push(B);ro(h);return z.return(lf(B))}})};
|
|
633
|
+
q.ji=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v;return L(function(A){switch(A.g){case 1:if(c.l!=Bo&&c.l!=Oo)throw new R(1,7,7004);if(b){A.D(2);break}return D(A,bp(c,a),3);case 3:b=A.h;case 2:if("text/vtt"!=b)throw new R(1,2,2017,a);d=Ic;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new R(1,4,4045);return D(A,dp(c,a,c.I,c.h.streaming.retryParameters),4);case 4:f=A.h;g=Ce[b];if(!g)throw new R(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
634
|
+
vttOffset:0};l=Fb(f);m=h.parseMedia(l,k,a);n=[];r={};p=u(m);for(t=p.next();!t.done;r={wd:r.wd,pc:r.pc},t=p.next())r.pc=t.value,r.wd=null,x=function(z){return function(){null==z.wd&&(z.wd=Ac([a],[z.pc.payload]));return z.wd||[]}}(r),w=new Ai(r.pc.startTime,r.pc.endTime,x,0,null,null,0,0,Infinity),r.pc.payload.includes("#xywh")&&(B=r.pc.payload.split("#xywh=")[1].split(","),4===B.length&&w.Ph({height:parseInt(B[3],10),positionX:parseInt(B[0],10),positionY:parseInt(B[1],10),width:parseInt(B[2],10)})),
|
|
635
635
|
n.push(w);v={id:c.Sg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Mk(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.uf,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ie(b||
|
|
636
|
-
"","")])};c.l==Oo?c.Rd.push(v):c.i.imageStreams.push(v);ro(c);return
|
|
636
|
+
"","")])};c.l==Oo?c.Rd.push(v):c.i.imageStreams.push(v);ro(c);return A.return(mf(v))}})};
|
|
637
637
|
q.gi=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=Bo&&d.l!=Oo)throw new R(1,7,7004);if(c){k.D(2);break}return D(k,bp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),D(k,cp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.lh();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return D(k,new Promise(function(l,m){d.m.na(f,"load",l);d.m.na(f,"error",function(){m(new R(1,2,2015))})}),6);case 6:return ro(d),k.return(h);case 5:throw new R(1,
|
|
638
638
|
2,2012);}})};function bp(a,b){var c;return L(function(d){switch(d.g){case 1:return ra(d,2),D(d,Fm(b,a.I,a.h.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:ua(d);case 3:if(c)return d.return(c);throw new R(1,2,2011,b);}})}
|
|
639
|
-
function cp(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?D(n,dp(a,b,a.I,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=ep(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Fj(l),e="text/vtt");m=document.createElement("track");var r=a.P,p=b;try{if(r.g.enabled){var t=cn(r);t.ot=qn;t.su=!0;var x=gn(t);var w=hn(p,x)}else w=p}catch(
|
|
639
|
+
function cp(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?D(n,dp(a,b,a.I,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=ep(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Fj(l),e="text/vtt");m=document.createElement("track");var r=a.P,p=b;try{if(r.g.enabled){var t=cn(r);t.ot=qn;t.su=!0;var x=gn(t);var w=hn(p,x)}else w=p}catch(B){Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",B),w=p}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
640
640
|
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function dp(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=xg;f=rg([b],d);f.method="GET";var k=a.P;try{k.g.enabled&&jn(k,f,{ot:qn,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return D(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
641
641
|
function ep(a,b,c,d){var e=Ce[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fb(b),b=c.parseMedia(b,a,null),$m(b,d);throw new R(2,2,2014,c);}q.dk=function(a,b){this.Y.width=a;this.Y.height=b};q.wg=function(a){if(this.l==Bo){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=u(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Md||d.kb||d.Qb||(d.Md=!1,zl(b,d,a));b=!0}}else b=!1;return b};
|
|
642
642
|
q.Wf=function(){Ua("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Ri=function(){return this.Fa};
|
|
@@ -646,9 +646,9 @@ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:
|
|
|
646
646
|
function Ho(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,r;return L(function(p){if(1==p.g)return k?D(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.Ub(l))?m.next().value:null;if(!n)return p.return(null);r=n.startTime;return p.return(r)})},D(h,e(c,b),2);if(3!=h.g)return f=h.h,D(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)})}
|
|
647
647
|
function go(a){var b=a.Od();if(a.u&&a.M&&a.G){if(a.P){var c=a.P;b||c.i||(c.i=!0);c.i&&b&&(c.j=!0);c.l=b}wo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Yn("buffering",b))}function xo(a){var b=a.g.playbackRate;0!=b&&(a.J&&a.J.set(b),b=Yn("ratechange"),a.dispatchEvent(b))}
|
|
648
648
|
function wo(a){if(a.u&&a.M){var b=a.u.g,c="playing";a.M.g==Zf?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Yn("statechanged",c)))}}
|
|
649
|
-
function Lo(a){var b=a.g.playbackRate,c=a.U();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.kh();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.
|
|
649
|
+
function Lo(a){var b=a.g.playbackRate,c=a.U();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.kh();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Hc(d):1==e&&b!==a.J.vc()&&a.Qc()}if(c&&(e=a.Pa(),Number.isFinite(e.end)&&!(a.g.currentTime<e.start))){if(a.h.streaming.liveSync){var f=a.h.streaming.liveSyncMaxLatency;var g=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,
|
|
650
650
|
g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==Oo){var l=a.g.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.h.streaming.liveSyncPanicMode;
|
|
651
|
-
l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.M.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.
|
|
651
|
+
l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.M.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.Hc(k):f&&g&&c-d>f?b!=g&&a.Hc(g):h&&k&&c-d<h?b!=k&&a.Hc(k):b!==a.J.vc()&&a.Qc()}}
|
|
652
652
|
function Mo(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.O)?(a.O=c,b=!0):(c=Math.max(a.O,c),a.O!=c&&(a.O=c,b=!0)));if(b){var d;0==a.O?d=Yn("started"):25==a.O?d=Yn("firstquartile"):50==a.O?d=Yn("midpoint"):75==a.O?d=Yn("thirdquartile"):100==a.O&&(d=Yn("complete"));d&&a.dispatchEvent(d)}}}function so(a){try{pi(a.Le,a.i)}catch(c){return eo(a,c),!1}var b=tf(a.i.variants);b=a.qa.create(b);a.o.setVariants(Array.from(b.values()));return!0}
|
|
653
653
|
function Do(a,b){b=void 0===b?!1:b;return so(a)?a.o.chooseVariant(b):null}
|
|
654
654
|
function Vn(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=u(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,Za("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Se.stop();d&&to(a,!0,void 0,!1,!1)}
|
|
@@ -661,13 +661,13 @@ function qo(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.sc
|
|
|
661
661
|
function yo(a,b,c){0<b&&(a.U()||a.Rh(b));b=a.getDuration();c<b&&(a.U()||a.xb(c))}function fp(a,b){L(function(c){if(1==c.g)return D(c,Promise.resolve(),2);a.l!=Zn&&a.dispatchEvent(b);G(c)})}function $o(a){var b=new Set;a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Mc(c.language)):b.add("und");return b}
|
|
662
662
|
function Zo(a){var b=new Map,c=new Map;a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Mc(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=u(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=u(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
663
663
|
h.push({language:l,role:m,label:n})}});return h}N("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Hg;U.prototype.getManifestParserFactory=U.prototype.Ri;U.prototype.getManifest=U.prototype.Wf;U.prototype.retryStreaming=U.prototype.wg;U.prototype.setMaxHardwareResolution=U.prototype.dk;U.prototype.addChaptersTrack=U.prototype.gi;U.prototype.addThumbnailsTrack=U.prototype.ji;U.prototype.addTextTrackAsync=U.prototype.ii;U.prototype.getStats=U.prototype.getStats;
|
|
664
|
-
U.prototype.getBufferedInfo=U.prototype.Ib;U.prototype.getSegmentAvailabilityDuration=U.prototype.ze;U.prototype.getPresentationStartTimeAsDate=U.prototype.oh;U.prototype.getPlayheadTimeAsDate=U.prototype.Ui;U.prototype.setTextTrackVisibility=U.prototype.bf;U.prototype.getChapters=U.prototype.Di;U.prototype.getChaptersTracks=U.prototype.lh;U.prototype.isTextTrackVisible=U.prototype.
|
|
664
|
+
U.prototype.getBufferedInfo=U.prototype.Ib;U.prototype.getSegmentAvailabilityDuration=U.prototype.ze;U.prototype.getPresentationStartTimeAsDate=U.prototype.oh;U.prototype.getPlayheadTimeAsDate=U.prototype.Ui;U.prototype.setTextTrackVisibility=U.prototype.bf;U.prototype.getChapters=U.prototype.Di;U.prototype.getChaptersTracks=U.prototype.lh;U.prototype.isTextTrackVisible=U.prototype.Bc;U.prototype.selectVariantsByLabel=U.prototype.Xj;U.prototype.selectTextLanguage=U.prototype.zg;
|
|
665
665
|
U.prototype.selectAudioLanguage=U.prototype.Xe;U.prototype.getTextLanguages=U.prototype.Zi;U.prototype.getAudioLanguages=U.prototype.Ai;U.prototype.getTextLanguagesAndRoles=U.prototype.$i;U.prototype.getAudioLanguagesAndRoles=U.prototype.Bi;U.prototype.selectVariantTrack=U.prototype.Ye;U.prototype.selectTextTrack=U.prototype.Ag;U.prototype.getThumbnails=U.prototype.Zf;U.prototype.getAllThumbnails=U.prototype.zi;U.prototype.getImageTracks=U.prototype.ve;U.prototype.getTextTracks=U.prototype.ic;
|
|
666
|
-
U.prototype.getVariantTracks=U.prototype.rb;U.prototype.cancelTrickPlay=U.prototype.Qc;U.prototype.trickPlay=U.prototype.
|
|
667
|
-
U.prototype.isAudioOnly=U.prototype.Yc;U.prototype.isInProgress=U.prototype.
|
|
668
|
-
U.prototype.configure=U.prototype.configure;U.prototype.releaseAllMutexes=U.prototype.Mj;U.prototype.preload=U.prototype.preload;U.prototype.unloadAndSavePreload=U.prototype.hk;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.lk;U.prototype.unload=U.prototype.
|
|
666
|
+
U.prototype.getVariantTracks=U.prototype.rb;U.prototype.cancelTrickPlay=U.prototype.Qc;U.prototype.trickPlay=U.prototype.Hc;U.prototype.getPlaybackRate=U.prototype.Ra;U.prototype.isBuffering=U.prototype.Od;U.prototype.getKeyStatuses=U.prototype.we;U.prototype.getActiveSessionsMetadata=U.prototype.Uf;U.prototype.getExpiration=U.prototype.Hd;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.ij;U.prototype.seekRange=U.prototype.Pa;
|
|
667
|
+
U.prototype.isAudioOnly=U.prototype.Yc;U.prototype.isInProgress=U.prototype.Ac;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.ue;U.prototype.getAssetUri=U.prototype.Fd;U.prototype.getNetworkingEngine=U.prototype.fc;U.prototype.getMediaElement=U.prototype.Ti;U.prototype.getManifestType=U.prototype.Xf;U.prototype.getLoadMode=U.prototype.Id;U.prototype.resetConfiguration=U.prototype.Qj;U.prototype.getBufferFullness=U.prototype.kh;U.prototype.getConfiguration=U.prototype.getConfiguration;
|
|
668
|
+
U.prototype.configure=U.prototype.configure;U.prototype.releaseAllMutexes=U.prototype.Mj;U.prototype.preload=U.prototype.preload;U.prototype.unloadAndSavePreload=U.prototype.hk;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.lk;U.prototype.unload=U.prototype.Ic;U.prototype.detach=U.prototype.detach;U.prototype.attachCanvas=U.prototype.Wg;U.prototype.attach=U.prototype.Pc;
|
|
669
669
|
U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?D(h,ei(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Pb())for(var l in ti)k[l]=!0;l=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Pb()?!!ti[m]:Qb(m);c=k;l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(y(je));
|
|
670
|
-
k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Pb()?Be(m)?!0:hd(m)||(ce(m)?!0:!1):Qb(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=hp;for(g in f)e[g]=f[g]();return h.return(e)})};U.isBrowserSupported=$n;U.setAdManagerFactory=function(a){Tn=a};U.registerSupportPlugin=function(a,b){hp[a]=b};U.prototype.destroy=U.prototype.destroy;var Zn=0,Pn=1,Bo=2,Oo=3;U.LoadMode={DESTROYED:Zn,NOT_LOADED:Pn,MEDIA_SOURCE:Bo,SRC_EQUALS:Oo};U.version="v4.8.
|
|
670
|
+
k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Pb()?Be(m)?!0:hd(m)||(ce(m)?!0:!1):Qb(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=hp;for(g in f)e[g]=f[g]();return h.return(e)})};U.isBrowserSupported=$n;U.setAdManagerFactory=function(a){Tn=a};U.registerSupportPlugin=function(a,b){hp[a]=b};U.prototype.destroy=U.prototype.destroy;var Zn=0,Pn=1,Bo=2,Oo=3;U.LoadMode={DESTROYED:Zn,NOT_LOADED:Pn,MEDIA_SOURCE:Bo,SRC_EQUALS:Oo};U.version="v4.8.2";var ip=["4","8"];
|
|
671
671
|
md=new function(a){this.g=a;this.i=nd;this.h=od}(new kd(Number(ip[0]),Number(ip[1])));var hp={},Tn=null;function jp(){this.h=[];this.j=this.i=this.g=0};function kp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new cd;this.m.s(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.s(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=kp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
672
672
|
q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
673
673
|
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
@@ -675,7 +675,7 @@ q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.ge
|
|
|
675
675
|
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};N("shaka.ads.ClientSideAd",kp);kp.prototype.release=kp.prototype.release;
|
|
676
676
|
kp.prototype.getPodIndex=kp.prototype.getPodIndex;kp.prototype.getTimeOffset=kp.prototype.getTimeOffset;kp.prototype.getMediaUrl=kp.prototype.getMediaUrl;kp.prototype.getAdvertiserName=kp.prototype.getAdvertiserName;kp.prototype.getCreativeAdId=kp.prototype.getCreativeAdId;kp.prototype.getAdId=kp.prototype.getAdId;kp.prototype.getVastMediaWidth=kp.prototype.getVastMediaWidth;kp.prototype.getVastMediaHeight=kp.prototype.getVastMediaHeight;kp.prototype.getVastMediaBitrate=kp.prototype.getVastMediaBitrate;
|
|
677
677
|
kp.prototype.getDescription=kp.prototype.getDescription;kp.prototype.getTitle=kp.prototype.getTitle;kp.prototype.getPositionInSequence=kp.prototype.getPositionInSequence;kp.prototype.getSequenceLength=kp.prototype.getSequenceLength;kp.prototype.setMuted=kp.prototype.setMuted;kp.prototype.resize=kp.prototype.resize;kp.prototype.isLinear=kp.prototype.isLinear;kp.prototype.isMuted=kp.prototype.isMuted;kp.prototype.setVolume=kp.prototype.setVolume;kp.prototype.getVolume=kp.prototype.getVolume;
|
|
678
|
-
kp.prototype.play=kp.prototype.play;kp.prototype.pause=kp.prototype.pause;kp.prototype.skip=kp.prototype.skip;kp.prototype.canSkipNow=kp.prototype.canSkipNow;kp.prototype.getTimeUntilSkippable=kp.prototype.getTimeUntilSkippable;kp.prototype.isSkippable=kp.prototype.isSkippable;kp.prototype.isPaused=kp.prototype.isPaused;kp.prototype.getRemainingTime=kp.prototype.getRemainingTime;kp.prototype.getMinSuggestedDuration=kp.prototype.getMinSuggestedDuration;kp.prototype.getDuration=kp.prototype.getDuration;function lp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.G=!1;this.A=this.u=null;this.H=NaN;this.m=e;this.j=null;this.h=new cd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.
|
|
678
|
+
kp.prototype.play=kp.prototype.play;kp.prototype.pause=kp.prototype.pause;kp.prototype.skip=kp.prototype.skip;kp.prototype.canSkipNow=kp.prototype.canSkipNow;kp.prototype.getTimeUntilSkippable=kp.prototype.getTimeUntilSkippable;kp.prototype.isSkippable=kp.prototype.isSkippable;kp.prototype.isPaused=kp.prototype.isPaused;kp.prototype.getRemainingTime=kp.prototype.getRemainingTime;kp.prototype.getMinSuggestedDuration=kp.prototype.getMinSuggestedDuration;kp.prototype.getDuration=kp.prototype.getDuration;function lp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.G=!1;this.A=this.u=null;this.H=NaN;this.m=e;this.j=null;this.h=new cd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.2");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.s(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
679
679
|
function(g){mp(f,g)});this.h.s(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){np(f,g)});this.h.s(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.G=!0})}lp.prototype.configure=function(a){this.u=a};lp.prototype.stop=function(){this.g&&this.g.stop();this.o&&Qm(this.o)};lp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
680
680
|
function np(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new Q("ad-error",b));op(a,null);a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
681
681
|
function mp(a,b){a.m(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.s(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.s(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.F);a.m(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -698,7 +698,7 @@ sp.prototype.isSkippable=sp.prototype.isSkippable;sp.prototype.isPaused=sp.proto
|
|
|
698
698
|
tp.prototype.release=function(){this.stop();this.o&&this.o.release()};tp.prototype.onManifestUpdated=function(a){this.K=a;""!=this.I&&(vp(this,this.I,this.P),this.P=!1)};tp.prototype.getCuePoints=function(){for(var a=[],b=u(this.j),c=b.next();!c.done;c=b.next()){c=u(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
699
699
|
function wp(a,b,c){var d,e,f,g,h,k,l,m,n,r,p;L(function(t){if(1==t.g)return d=rg([b],bg()),d.method="POST",c&&(e=JSON.stringify(c),d.body=pc(e)),f=a.L.request(7,d),ra(t,2),D(t,f.promise,4);if(2!=t.g){g=t.h;h=lc(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new ib(b),m=new ib(k.trackingUrl),a.I=l.resolve(m).toString(),n=Date.now()/1E3,r=n-a.S,a.i(new Q("ads-loaded",(new Map).set("loadTime",r))),p=new ib(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
700
700
|
return ta(t,0)}ua(t);if(!a.J.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,t.return();a.l.resolve(a.J);a.l=null;G(t)})}
|
|
701
|
-
function vp(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
701
|
+
function vp(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,B;L(function(v){if(1==v.g)return d=rg([b],bg()),e=a.L.request(7,d),ra(v,2),D(v,e.promise,4);if(2!=v.g){f=v.h;g=[];h=lc(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=u(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,r=u(n.nonLinearAdsList),p=r.next();!p.done;p=r.next())for(t=p.value,x=u(t.nonLinearAdList),w=x.next();!w.done;w=x.next())B=w.value,xp(a,B);g=a.getCuePoints();a.i(new Q("ad-cue-points-changed",
|
|
702
702
|
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",g))),up(a),a.j=[];c&&(a.K||0<g.length)&&yp(a);return ta(v,0)}ua(v);G(v)})}
|
|
703
703
|
function xp(a,b){var c,d,e,f,g,h,k,l;L(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=zp(b);if(d=a.H.get(c))return m.return();e=rg([b.staticResource],bg());f=a.L.request(7,e);ra(m,2);a.H.set(c,[]);return D(m,f.promise,4)}if(2!=m.g)return g=m.h,h=lc(g.data),k=JSON.parse(h),l=k.apps,a.H.set(c,l),ta(m,0);ua(m);a.H.delete(c);G(m)})}
|
|
704
704
|
function zp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function yp(a){Ap(a);a.K||(Bp(a),a.o.s(a.g,"seeked",function(){Bp(a)}),a.o.s(a.g,"ended",function(){up(a)}));a.o.s(a.g,"timeupdate",function(){Ap(a)})}
|
|
@@ -726,8 +726,8 @@ function Gp(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
726
726
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);bb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new jp};q.requestClientSideAds=function(a){if(!this.i)throw new R(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.H=Date.now()/1E3;b.l.requestAds(a)};
|
|
727
727
|
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new R(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new tp(a,b,c,function(e){return Ip(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new R(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new R(1,10,10004)):(d.l=new dg,wp(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
728
728
|
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new R(1,10,10005);var b=this.h;b.I=a;b.i(new Q("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new R(2,10,10002);this.g&&this.g.release();this.g=new Fp(a,b,this.m,function(d){return Ip(c,d)});this.g.configure(this.l)};
|
|
729
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.8.
|
|
730
|
-
(c.I=!0),c.j=new dg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new R(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.8.
|
|
729
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.8.2";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
730
|
+
(c.I=!0),c.j=new dg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new R(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.8.2";this.g.g.replaceAdTagParameters(a)};
|
|
731
731
|
q.getServerSideCuePoints=function(){ld("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
732
732
|
q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
733
733
|
function Ip(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}N("shaka.ads.AdManager",Hp);Hp.prototype.onCueMetadataChange=Hp.prototype.onCueMetadataChange;Hp.prototype.onHlsTimedMetadata=Hp.prototype.onHlsTimedMetadata;Hp.prototype.onDashTimedMetadata=Hp.prototype.onDashTimedMetadata;Hp.prototype.onManifestUpdated=Hp.prototype.onManifestUpdated;
|
|
@@ -752,7 +752,7 @@ q.Gh=function(a,b){hq(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(
|
|
|
752
752
|
function Yp(a){var b=aq?"connected"==aq.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};$p(a)}a.h=b;a.K=b?aq.receiver.friendlyName:"";a.l.Ia()}function $p(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new R(1,7,7E3))}}function hq(a,b){b=Jp(b);var c=aq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Xa)}catch(d){throw b=new R(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.A("player",c),a.Uc(),b;}}var eq=.02,dq=!1,aq=null,gq=null,Zp=new Set;
|
|
753
753
|
function fq(a){gq?window.__onGCastApiAvailable=gq:delete window.__onGCastApiAvailable;gq=null;if(a)for(var b=u(Zp),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function kq(a,b,c,d){d=void 0===d?!1:d;bb.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.u=this.l=null;this.G=c;this.F=d;this.A=new Map;this.g=new Xp(c,function(){return lq(e)},function(){return mq(e)},function(f,g){return nq(e,f,g)},function(){return oq(e)},function(){return pq(e)},d);qq(this)}na(kq,bb);q=kq.prototype;
|
|
754
754
|
q.destroy=function(a){a&&this.g.Uc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;bb.prototype.release.call(this);return Promise.all(a)};q.jc=function(){return this.l};q.Wc=function(){return this.u};q.Af=function(){return this.g.m&&dq};q.Ga=function(){return this.g.Ga()};q.Ue=function(){return this.g.Ue()};
|
|
755
|
-
q.cast=function(){var a=this;return L(function(b){return 1==b.g?D(b,a.g.cast(),2):a.h?D(b,a.h.
|
|
755
|
+
q.cast=function(){var a=this;return L(function(b){return 1==b.g?D(b,a.g.cast(),2):a.h?D(b,a.h.Ic(),0):b.return()})};q.Bg=function(a){this.g.Bg(a)};q.Th=function(){jq(this.g)};q.Uc=function(){this.g.Uc()};
|
|
756
756
|
q.ah=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.Uc();return D(d,c.g.destroy(),2)}c.g=null;c.g=new Xp(a,function(){return lq(c)},function(){return mq(c)},function(e,f){return nq(c,e,f)},function(){return oq(c)},function(){return pq(c)},b);c.g.init();G(d)})};
|
|
757
757
|
function qq(a){a.g.init();a.m=new cd;for(var b=u(Mp),c=b.next();!c.done;c=b.next())a.m.s(a.i,c.value,function(f){a.g.Ga()||(f=Qa(f),a.j.dispatchEvent(f))});for(var d in Ra)a.m.s(a.h,Ra[d],function(f){a.g.Ga()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.od=e,Object.defineProperty(a.l,b.od,{configurable:!1,enumerable:!0,get:function(f){return function(){return rq(a,f.od)}}(b),set:function(f){return function(g){var h=f.od;a.g.Ga()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={od:b.od};a.u={};sq(a,
|
|
758
758
|
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return tq(a,f)}})});uq(a);a.j=new bb;a.j.Te=a.l;a.o=new bb;a.o.Te=a.u}function uq(a){var b=new Map;sq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
@@ -777,11 +777,11 @@ function wq(a){a.I.V(Iq);for(var b={video:{},player:{}},c=u(Np),d=c.next();!d.do
|
|
|
777
777
|
1);Fq(a)}function Fq(a){return a.A&&(a.g.duration||a.h.U())?(Jq(a),a.A=!1,!0):!1}function Jq(a,b){var c={contentId:a.h.Fd(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Gq(a,void 0===b?0:b,c)}
|
|
778
778
|
function Bq(a,b){var c=Kp(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.A=!0;Hq(a,c.initState,c.appData);wq(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
779
779
|
"player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Kq(a,g,f,null)},function(h){return Kq(a,g,f,h)})}}
|
|
780
|
-
function Aq(a,b){var c=Kp(b.data);switch(c.type){case "PLAY":a.g.play();Gq(a);break;case "PAUSE":a.g.pause();Gq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Gq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Gq(a));break;case "STOP":a.h.
|
|
780
|
+
function Aq(a,b){var c=Kp(b.data);switch(c.type){case "PLAY":a.g.play();Gq(a);break;case "PAUSE":a.g.pause();Gq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Gq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Gq(a));break;case "STOP":a.h.Ic().then(function(){a.h&&Gq(a)});break;case "GET_STATUS":Jq(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
781
781
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Gq(a);break;case "LOAD":a.m=0;a.F=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Jq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");zq(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:zq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
782
782
|
function Kq(a,b,c,d){a.h&&zq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function zq(a,b,c,d){a.H&&(a=Jp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Gq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Lq:a.h.Od()?Mq:a.g.paused?Nq:Oq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);zq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
783
783
|
N("shaka.cast.CastReceiver",vq);vq.prototype.destroy=vq.prototype.destroy;vq.prototype.setContentArtist=vq.prototype.Yj;vq.prototype.setContentImage=vq.prototype.Zj;vq.prototype.setContentTitle=vq.prototype.bk;vq.prototype.clearContentMetadata=vq.prototype.si;vq.prototype.setContentMetadata=vq.prototype.$j;vq.prototype.isIdle=vq.prototype.nj;vq.prototype.isConnected=vq.prototype.isConnected;var Iq=.5,Eq=5,Lq="IDLE",Oq="PLAYING",Mq="BUFFERING",Nq="PAUSED";function Pq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Qq(d,e,h,k,l,m);f<=g;f++){for(var r=c[f],p=-1,t=-1,x=0;x<r.length;x++)if(null!=r[x]&&""!==r[x].g.trim()){p=x;break}for(x=r.length-1;0<=x;x--)if(null!=r[x]&&""!==r[x].g.trim()){t=x;break}if(-1===
|
|
784
|
-
p||-1===t)r=Rq(d,e),a.nestedCues.push(r);else{for(;p<=t;p++)if(x=r[p]){var w=x.l,
|
|
784
|
+
p||-1===t)r=Rq(d,e),a.nestedCues.push(r);else{for(;p<=t;p++)if(x=r[p]){var w=x.l,B=x.i,v=x.j,A=x.h;if(w!=h||B!=k||v!=l||A!=m)n.payload&&a.nestedCues.push(n),n=Qq(d,e,w,B,v,A),h=w,k=B,l=v,m=A;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Rq(d,e),a.nestedCues.push(n));n=Qq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
785
785
|
function Qq(a,b,c,d,e,f){a=new Bd(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Rq(a,b){a=new Bd(a,b,"");a.lineBreak=!0;return a}function Sq(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Tq(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.u=b;this.j=this.m=!1;this.l="white";this.o="black";Uq(this)}function Vq(a,b,c){var d="CC"+((a.A<<1|a.u)+1),e=new Bd(b,c,"");e.lineInterpretation=1;var f=Wq.get(a.g);f&&(e.line=f);return Pq(e,d,a.i,b,c)}function Uq(a){Xq(a,0,15);a.g=1}
|
|
786
786
|
function Yq(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Zq:d=$q.has(c)?$q.get(c):String.fromCharCode(c);break;case ar:d=br.get(c);break;case cr:a.i[a.g].pop();d=dr.get(c);break;case er:a.i[a.g].pop(),d=fr.get(c)}d&&a.i[a.g].push(new Sq(d,a.m,a.j,a.o,a.l))}}function gr(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Xq(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
787
787
|
var Zq=0,ar=1,cr=2,er=3,$q=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),br=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),dr=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
|
|
@@ -804,7 +804,7 @@ qr[e]:7===e&&(f=!0);a=1===(a&1);c.h!==lr&&(e=c.g,c.h===kr&&b!==e.g&&(c=1+b-e.h,g
|
|
|
804
804
|
f-1),Xq(b,b.g,15-b.g),c.l=a);break;case 46:Xq(c.j,0,15);break;case 47:b=null,c.h!==lr&&(b=Vq(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,mr(c),c.l=a,d=b}a=d;break a}a=null}else d=b.Sb,Yq(c.g,Zq,b.zb),Yq(c.g,Zq,d);return a}
|
|
805
805
|
function Yr(a,b){var c=[];try{for(;b.Aa();){var d=Mr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Mr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Nr(e));for(var g=a.j.get(e),h=b.Na();b.Na()-h<f;){e=b;var k=Mr(e),l=k.value,m=k.pts;if(16===l){var n=Mr(e);l=l<<16|n.value}if(0<=l&&31>=l){var r=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!wr(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=xr(p,r,g.i));if(p.h+1>=p.o){r=p;for(var t=
|
|
806
806
|
0,x=1;16>x;x++,t++)r.i[t]=r.i[x];for(x=0;1>x;x++,t++)r.i[t]=ur()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=xr(p,r,g.i));p.i[p.h]=ur();p.g=0;break;case 12:p.isVisible()&&(e=xr(p,r,g.i)),tr(p),r=p,r.h=0,r.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Or(g,e,l,m);else{if(4096<=l&&4127>=l)r=l&255,8<=r&&15>=r?e.skip(1):16<=r&&23>=r?e.skip(2):24<=r&&31>=r&&e.skip(3);else if(4224<=l&&4255>=l)r=l&255,128<=r&&135>=r?e.skip(4):136<=r&&143>=r&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?vr(g.g,
|
|
807
|
-
"\u266a"):vr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&vr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ur.has(e)){var
|
|
807
|
+
"\u266a"):vr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&vr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ur.has(e)){var B=Ur.get(e);vr(g.g,B)}else vr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?vr(g.g,"_"):vr(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(v){if(v instanceof R&&3E3===v.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw v;}return c}function Zr(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
808
808
|
Vr.prototype.getStreams=function(){return Array.from(this.A)};N("shaka.cea.CeaDecoder",Vr);ud=function(){return new Vr};function $r(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(y(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function as(){this.j=new Map;this.i=this.h=0;this.g=bs}
|
|
809
809
|
as.prototype.init=function(a){function b(f){f=f.name;f in cs&&(c.g=cs[f])}var c=this,d=[],e=[];(new Gg).box("moov",Lg).box("mvex",Lg).T("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.R();g=g.R();c.h=f;c.i=g}).box("trak",Lg).T("tkhd",function(f){f=Ui(f.reader,f.version);d.push(f.trackId)}).box("mdia",Lg).T("mdhd",function(f){f=Si(f.reader,f.version);e.push(f.timescale)}).box("minf",Lg).box("stbl",Lg).T("stsd",Ng).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
|
|
810
810
|
b).box("dvh1",b).box("dvhe",b).box("encv",Og).box("sinf",Lg).box("frma",function(f){f=Vi(f.reader).ab;f in cs&&(c.g=cs[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new R(2,2,2010);this.g==bs&&Ua("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
@@ -825,12 +825,12 @@ if(!a||!b)throw new R(2,4,4051);a=xc(a.substr(2));if(16!=a.byteLength)throw new
|
|
|
825
825
|
var ps=1,qs=(new Map).set("com.widevine.alpha",function(a){var b=fh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=bh(b))?b:(a=fh(a.node,"urn:microsoft","laurl"))?sc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",os).set("com.microsoft.playready.recommendation",os).set("com.microsoft.playready.software",os).set("com.microsoft.playready.hardware",os).set("org.w3.clearkey",function(a){var b=fh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=bh(b))?b:(a=fh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
826
826
|
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=bh(a))?a:""});function ss(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Ua("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
827
827
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
828
|
-
function ts(a,b){var c=us(a,b,"timescale"),d=1;c&&(d=qh(c)||1);
|
|
829
|
-
|
|
830
|
-
function
|
|
828
|
+
function ts(a,b){var c=us(a,b,"timescale"),d=1;c&&(d=qh(c)||1);c=us(a,b,"duration");(c=qh(c||""))&&(c/=d);var e=us(a,b,"startNumber"),f=Number(us(a,b,"presentationTimeOffset"))||0,g=rh(e||"");if(null==e||null==g)g=1;var h=vs(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.xa.duration||Infinity;e=g;h=ah(h,"S");for(var k=[],l=-f,m=0;m<h.length;++m){var n=h[m],r=h[m+1],p=hh(n,"t",rh),t=hh(n,"d",rh),x=hh(n,"r",ph);n=hh(n,"k",ph)||0;null!=p&&(p-=f);if(!t)break;p=null!=p?p:l;x=x||0;if(0>x)if(r){r=hh(r,"t",
|
|
829
|
+
rh);if(null==r)break;else if(p>=r)break;x=Math.ceil((r-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;x=Math.ceil((a*b-p)/t)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(r=0;r<=x;++r)l=p+t,k.push({start:p/b,end:l/b,Og:p,Ob:n,Wj:k.length+e}),p=l}b=k}return{timescale:d,Xa:c,Zd:g,ac:f/d||0,Ng:f,timeline:b}}function ws(a,b){return[b(a.N),b(a.La),b(a.Sa)].filter(Ke)}function us(a,b,c){b=ws(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
830
|
+
function vs(a,b,c){b=ws(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=eh(d.value,c));d=b.next());return a}
|
|
831
831
|
function xs(a,b,c,d,e,f){for(var g=ih(a,"http://www.w3.org/1999/xlink","href"),h=ih(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=u(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Wg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return fg(new R(2,4,4028));if("onLoad"!=h)return fg(new R(2,4,4027));var r=Ac([d],[g]);return e.request(0,rg(r,b)).Ma(function(p){p=Tg(p.data,a.tagName);if(!p)return fg(new R(2,4,4001,g));for(a.children=
|
|
832
832
|
[];p.children.length;){var t=p.children.shift();t.tagName&&(t.parent=a);a.children.push(t)}t=u(Object.keys(p.attributes));for(var x=t.next();!x.done;x=t.next())x=x.value,a.attributes[x]=p.attributes[x];return ys(a,b,c,r[0],e,f+1)})}
|
|
833
|
-
function ys(a,b,c,d,e,f){f=void 0===f?0:f;if(ih(a,"http://www.w3.org/1999/xlink","href")){var g=xs(a,b,c,d,e,f);c&&(g=g.Ma(void 0,function(){return ys(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=u($g(a)),l=k.next();!l.done;h={
|
|
833
|
+
function ys(a,b,c,d,e,f){f=void 0===f?0:f;if(ih(a,"http://www.w3.org/1999/xlink","href")){var g=xs(a,b,c,d,e,f);c&&(g=g.Ma(void 0,function(){return ys(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=u($g(a)),l=k.next();!l.done;h={Mc:h.Mc},l=k.next())h.Mc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==ih(h.Mc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Mc}}(h)):"SegmentTimeline"!=h.Mc.tagName&&g.push(ys(h.Mc,b,c,d,e,f));return jg(g).Ma(function(){return a})}
|
|
834
834
|
;function zs(a,b,c,d,e,f,g){var h,k=(new Gg).T("sidx",function(l){h=As(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new R(2,3,3004);}
|
|
835
835
|
function As(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new R(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.ed(),m=g.reader.ed();g.reader.skip(2);var n=g.reader.Ha();a=a+g.size+m;for(m=0;m<n;m++){var r=g.reader.R(),p=(r&2147483648)>>>31;r&=2147483647;var t=g.reader.R();g.reader.skip(4);if(1==p)throw new R(2,3,3006);h.push(new Ai(l/k+c,(l+t)/k+c,function(){return f},a,a+r-1,b,c,d,e));l+=t;a+=r}g.parser.stop();return h};function Bs(a){this.h=Kb(a);this.g=new Dg(this.h,0)}Bs.prototype.Aa=function(){return this.g.Aa()};
|
|
836
836
|
function Cs(a){var b=Ds(a);if(7<b.length)throw new R(2,3,3002);var c=0;b=u(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Ds(a);a:{d=u(Es);for(var e=d.next();!e.done;e=d.next())if(Cb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Na();else{if(8==b.length&&b[1]&224)throw new R(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Na()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Na();d=Kb(a.h,a.g.Na(),b);a.g.skip(b);return new Fs(c,
|
|
@@ -838,8 +838,8 @@ d)}function Ds(a){var b=a.g.Na(),c=a.g.W();if(0==c)throw new R(2,3,3002);c=8-Mat
|
|
|
838
838
|
function Gs(a){if(8<a.g.byteLength)throw new R(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new R(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Hs(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Bs(a.g);for(var n=null,r=null;a.Aa();){var p=Cs(a);if(187==p.id){var t=Is(p);t&&(p=c*t.kk,t=b+t.Lj,null!=n&&m.push(new Ai(n+g,p+g,l,r,t-1,f,g,h,k)),n=p,r=t)}}null!=n&&m.push(new Ai(n+g,d+g,l,r,null,f,g,h,k));return m}
|
|
839
839
|
function Is(a){var b=new Bs(a.g);a=Cs(b);if(179!=a.id)throw new R(2,3,3013);a=Gs(a);b=Cs(b);if(183!=b.id)throw new R(2,3,3012);b=new Bs(b.g);for(var c=0;b.Aa();){var d=Cs(b);if(241==d.id){c=Gs(d);break}}return{kk:a,Lj:c}};function Js(a,b,c){b=vs(a,b,"Initialization");if(!b)return null;var d=a.N.Hb(),e=b.attributes.sourceURL;e&&(d=Ac(d,[sc(e)]));e=0;var f=null;if(b=hh(b,"range",oh))e=b.start,f=b.end;c=new yi(function(){return d},e,f,Ks(a),null,null,c);c.codecs=a.N.codecs;c.mimeType=a.N.mimeType;return c}
|
|
840
840
|
function Ls(a,b,c){var d=Number(us(a,Ms,"presentationTimeOffset"))||0,e=us(a,Ms,"timescale"),f=1;e&&(f=qh(e)||1);var g=d/f||0,h=Js(a,Ms,c);Ns(a,h);var k=Me(a);return{Vc:function(){var l=vs(k,Ms,"RepresentationIndex");var m=k.N.Hb();l&&(l=sc(l.attributes.sourceURL))&&(m=Ac(m,[l]));l=Os(k);return Ps(k,b,h,m,l.start,l.end,g)}}}
|
|
841
|
-
function Ps(a,b,c,d,e,f,g){var h,k,l,m,n,r,p,t,x,w,
|
|
842
|
-
3,3009);I=K.g.byteOffset;K=new Bs(K.g);for(var M=null;K.Aa();){var P=Cs(K);if(357149030==P.id){M=P;break}}if(!M)throw new R(2,3,3010);M=new Bs(M.g);P=1E6;for(K=null;M.Aa();){var O=Cs(M);if(2807729==O.id)P=Gs(O);else if(17545==O.id)if(4==O.g.byteLength)K=O.g.getFloat32(0);else if(8==O.g.byteLength)K=O.g.getFloat64(0);else throw new R(2,3,3003);}if(null==K)throw new R(2,3,3011);M=P/1E9;K*=M;P=Cs(new Bs(w));if(475249515!=P.id)throw new R(2,3,3007);I=Hs(P,I,M,K,d,c,
|
|
841
|
+
function Ps(a,b,c,d,e,f,g){var h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J;return L(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.dc||!a.xa.eg,l=a.xa.start,m=a.xa.duration,n=a.N.mimeType.split("/")[1],r=b,p=null,t=[r(d,e,f,!1),"webm"==n?r(c.ka(),c.Ta,c.za,!0):null],r=null,D(F,Promise.all(t),2);x=F.h;w=x[0];B=x[1]||null;v=null;A=l-g;z=l;C=m?l+m:Infinity;if("mp4"==n)var I=zs(w,e,d,c,A,z,C);else{I=new Bs(B);if(440786851!=Cs(I).id)throw new R(2,3,3008);var K=Cs(I);if(408125543!=K.id)throw new R(2,
|
|
842
|
+
3,3009);I=K.g.byteOffset;K=new Bs(K.g);for(var M=null;K.Aa();){var P=Cs(K);if(357149030==P.id){M=P;break}}if(!M)throw new R(2,3,3010);M=new Bs(M.g);P=1E6;for(K=null;M.Aa();){var O=Cs(M);if(2807729==O.id)P=Gs(O);else if(17545==O.id)if(4==O.g.byteLength)K=O.g.getFloat32(0);else if(8==O.g.byteLength)K=O.g.getFloat64(0);else throw new R(2,3,3003);}if(null==K)throw new R(2,3,3011);M=P/1E9;K*=M;P=Cs(new Bs(w));if(475249515!=P.id)throw new R(2,3,3007);I=Hs(P,I,M,K,d,c,A,z,C)}v=I;E=u(v);for(H=E.next();!H.done;H=
|
|
843
843
|
E.next())J=H.value,J.codecs=a.N.codecs,J.mimeType=a.N.mimeType;h.Td(v);p=new Mk(v);k&&p.Sc(z,C,!0);return F.return(p)})}function Ms(a){return a.Xd}function Os(a){var b=vs(a,Ms,"RepresentationIndex");a=us(a,Ms,"indexRange");a=oh(a||"");b&&(a=hh(b,"range",oh,a));return a}function Ns(a,b){Qs(a,b);if(!Os(a))throw new R(2,4,4002);}function Qs(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Gc&&"mp4"!=c&&"webm"!=c)throw new R(2,4,4006);if("webm"==c&&!b)throw new R(2,4,4005);}
|
|
844
844
|
function Ks(a){var b=a.N;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Ne,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Rs(a,b,c){var d=Js(a,Ss,c),e=Ts(a);if(!e.Xa&&!e.timeline&&1<e.$c.length)throw new R(2,4,4002);if(!e.Xa&&!a.xa.duration&&!e.timeline&&1==e.$c.length)throw new R(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new R(2,4,4002);var f=null,g=null;a.Sa.id&&a.N.id&&(g=b[a.Sa.id+","+a.N.id])&&(f=g.segmentIndex);var h=Us(a.xa.start,a.xa.duration,a.N.Hb,e,d,c,a.N.mimeType,a.N.codecs);b=!f;f?f.Sd(h,a.presentationTimeline.Lb()):f=new Mk(h);a.presentationTimeline.Td(h);a.dc&&a.xa.eg||f.Sc(a.xa.start,
|
|
845
845
|
a.xa.duration?a.xa.start+a.xa.duration:Infinity,b);g&&(g.segmentIndex=f);return{Vc:function(){f&&0!=f.getNumReferences()||f.Je(h);return Promise.resolve(f)}}}function Ss(a){return a.lc}function Ts(a){var b=Vs(a);a=ts(a,Ss);var c=a.Zd;0==c&&(c=1);var d=0;a.Xa?d=a.Xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Xa:a.Xa,startTime:d,Zd:c,ac:a.ac,timeline:a.timeline,$c:b}}
|
|
@@ -847,14 +847,14 @@ function Us(a,b,c,d,e,f,g,h){var k=d.$c.length;d.timeline&&d.timeline.length!=d.
|
|
|
847
847
|
function Vs(a){return[a.N.lc,a.La.lc,a.Sa.lc].filter(Ke).map(function(b){return ah(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.sh&&(a.sh=!0);var c=sc(b.attributes.media);b=hh(b,"mediaRange",oh,{start:0,end:null});return{Bj:c,start:b.start,end:b.end}})};function Ws(a,b,c,d,e,f,g,h){var k=Xs(a,g),l=Ys(a);Zs(l);var m=Me(a);if(l.Nd)return Qs(a,k),{Vc:function(){var x=ss(l.Nd,m.N.id,null,null,m.bandwidth||null,null);x=Ac(m.N.Hb(),[x]);return Ps(m,b,k,x,0,null,l.ac)}};if(l.Xa)return d||"image"===a.La.contentType||(a.presentationTimeline.ng(l.Xa),a.presentationTimeline.Me(a.xa.start)),{Vc:function(){return $s(m,l,e,k,f,g,h)}};var n=null;d=d=null;a.Sa.id&&a.N.id&&(d=a.Sa.id+","+a.N.id,d=c[d])&&(n=d.segmentIndex);var r=a.xa.start,p=a.xa.duration?r+a.xa.duration:
|
|
848
848
|
Infinity,t=!(a.dc&&a.xa.eg);n?(c=n,at(c,l,r,p,t,k),c.fb(a.presentationTimeline.Lb())):n=new bt(l,a.N.id,a.bandwidth,a.N.Hb,r,p,k,t,g,a.N.yg);l.timeline&&"image"!==a.La.contentType&&a.presentationTimeline.Dh(l.timeline,r);d&&a.dc&&(d.segmentIndex=n);return{Vc:function(){n instanceof bt&&0==n.getNumReferences()&&at(n,l,r,p,t,k);return Promise.resolve(n)}}}function ct(a){return a.Yd}
|
|
849
849
|
function Ys(a){var b=ts(a,ct),c=us(a,ct,"media"),d=us(a,ct,"index");return{Xa:b.Xa,timescale:b.timescale,Zd:b.Zd,ac:b.ac,Ng:b.Ng,timeline:b.timeline,bd:c&&sc(c),Nd:d,mimeType:a.N.mimeType,codecs:a.N.codecs}}function Zs(a){var b=a.Nd?1:0;b+=a.timeline?1:0;b+=a.Xa?1:0;if(0==b)throw new R(2,4,4002);1!=b&&(a.Nd&&(a.timeline=null),a.Xa=null);if(!a.Nd&&!a.bd)throw new R(2,4,4002);}
|
|
850
|
-
function $s(a,b,c,d,e,f,g){function h(K){var M=(K-x)*t,P=M+b.ac,O=M+n;M=O+t;var X=Math.min(M,l());O=new Ai(O,X,function(){var W=P*w;"BigInt"in window&&W>Number.MAX_SAFE_INTEGER&&(W=BigInt(P)*BigInt(w));W=ss(A,
|
|
851
|
-
x})}function l(){var K=null!=r&&e[r]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.xa.start,r=a.Sa.id,p=a.xa.duration,t=b.Xa,x=b.Zd,w=b.timescale,
|
|
850
|
+
function $s(a,b,c,d,e,f,g){function h(K){var M=(K-x)*t,P=M+b.ac,O=M+n;M=O+t;var X=Math.min(M,l());O=new Ai(O,X,function(){var W=P*w;"BigInt"in window&&W>Number.MAX_SAFE_INTEGER&&(W=BigInt(P)*BigInt(w));W=ss(B,A,K,null,v,W);return Ac(z(),[W])},0,null,d,C,n,l(),[],"",null,null,Bi,f);O.codecs=a.N.codecs;O.mimeType=a.N.mimeType;O.i=M;return O}function k(){var K=[Math.max(m.Lb(),n),Math.min(m.hc(),l())].map(function(M){return M-n});K=[Math.ceil(K[0]/t),Math.ceil(K[1]/t)-1];a.N.sc&&K[1]++;return K.map(function(M){return M+
|
|
851
|
+
x})}function l(){var K=null!=r&&e[r]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.xa.start,r=a.Sa.id,p=a.xa.duration,t=b.Xa,x=b.Zd,w=b.timescale,B=b.bd,v=a.bandwidth||null,A=a.N.id,z=a.N.Hb,C=n-b.ac,E=k();c=a.dc?Math.max(E[0],E[1]-c+1):E[0];g=g||E[1];E=[];for(var H=c;H<=g;++H){var J=h(H);E.push(J)}var F=new Mk(E);E=m.hc()<l();H=m.U();if(E||H){var I=Math.max(c,g+1);F.ef(t,function(){var K=m.Lb();F.fb(K);var M=u(k());M.next();M=M.next().value;for(var P=[];I<=M;){var O=h(I);P.push(O);I++}return K>
|
|
852
852
|
l()&&!P.length?null:P})}return Promise.resolve(F)}function Xs(a,b){var c=us(a,ct,"initialization");if(!c)return null;c=sc(c);var d=a.N.id,e=a.bandwidth||null,f=a.N.Hb;b=new yi(function(){var g=ss(c,d,null,null,e,null);return Ac(f(),[g])},0,null,Ks(a),null,null,b);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;return b}function bt(a,b,c,d,e,f,g,h,k,l){Mk.call(this,[]);this.h=a;this.H=b;this.F=c;this.G=d;this.i=e;this.l=f;this.u=g;this.A=k;this.I=l;h&&dt(this)}na(bt,Mk);q=bt.prototype;
|
|
853
853
|
q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){Mk.prototype.release.call(this);this.h=null};q.fb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.getNumReferences()&&this.release())}};
|
|
854
854
|
function at(a,b,c,d,e,f){et(a,f);if(a.h){c=a.h.timeline;a.h.bd=b.bd;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,y(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&dt(a)}function et(a,b){if(a.u!==b){a.u=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Di(c,b)}}function dt(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.fb(a.i)}}
|
|
855
855
|
q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
|
|
856
|
-
q.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.bd,e=this.h.timeline[a],f=e.Wj,g=this.h.Ng+e.Og;c=this.i-this.h.ac;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],r=(e.end-e.start)/e.Ob,p={},t=0;t<e.Ob;p={yd:p.yd,rf:p.rf},t++){var x=e.start+r*t,w=x+r;p.rf=t+1;p.yd=null;x=new Ai(this.i+x,this.i+w,function(
|
|
857
|
-
null==
|
|
856
|
+
q.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.bd,e=this.h.timeline[a],f=e.Wj,g=this.h.Ng+e.Og;c=this.i-this.h.ac;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],r=(e.end-e.start)/e.Ob,p={},t=0;t<e.Ob;p={yd:p.yd,rf:p.rf},t++){var x=e.start+r*t,w=x+r;p.rf=t+1;p.yd=null;x=new Ai(this.i+x,this.i+w,function(B){return function(){if(!b.h)return[];
|
|
857
|
+
null==B.yd&&(B.yd=ft(b.h.bd,b.H,f,b.F,g,B.rf,b.G));return B.yd}}(p),0,null,this.u,c,this.i,this.l,[],"",null,null,Bi,this.A);x.codecs=l;x.mimeType=m;0==this.I?0<t&&x.He():0!=t%this.I&&x.He();n.push(x)}c=new Ai(this.i+e.start,k,function(){return 0<e.Ob?[]:ft(d,b.H,f,b.F,g,null,b.G)},0,null,this.u,c,this.i,this.l,n,"",null,null,Bi,this.A,0<e.Ob);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
|
|
858
858
|
function ft(a,b,c,d,e,f,g){a=ss(a,b,c,f,d||null,e);return Ac(g(),[a]).map(function(h){return h.toString()})};function gt(a){this.o=null;this.A=a;this.I=new lg;this.i=[];this.h=null;this.m=[];this.F=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}gt.prototype.configure=function(a){this.o=a};gt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};gt.prototype.setManifestType=function(a){this.u=a};
|
|
859
859
|
function ht(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Ac(a.i,[it(a,b)]),d=rg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),mg(a.I,e),ra(l,2),D(l,e.promise,4);if(2!=l.g)return f=l.h,g=lc(f.data),h=JSON.parse(g),1==h.VERSION&&jt(a,h,f.uri),ta(l,0);if((k=ua(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Ob(function(){ht(a,b)});a.g.V(a.G);G(l)})}
|
|
860
860
|
function it(a,b){if(!a.m.length)return b;b=new ib(b);var c=a.F||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ab(e)&&nb(b,e);return b.toString()}function jt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Ob(function(){ht(a,d)});if(c=b.TTL)a.G=c;a.g.V(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
@@ -862,14 +862,14 @@ function kt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}gt.
|
|
|
862
862
|
function lt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=u(a.m),g=f.next();!g.done;e={rc:e.rc},g=f.next())if(e.rc=g.value,g=b.get(e.rc))d.push({ug:e.rc,location:g});else if(g=a.H.find(function(k){return function(l){return l.Gk==k.rc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].ci?(h=new ib(h),kb(h,g["URI-REPLACEMENT"].ci),d.push({ug:e.rc,location:h.toString()})):d.push({ug:e.rc,location:h}))}e=Date.now();f=u(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
863
863
|
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new ib(k.location)).Tb))return!1;return!0});d.length&&(a.F=d[0].ug);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.F=a.h,d.push(f);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Ac(a.i,d)};function mt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.o=this.m=!1;this.u=new Set}q=mt.prototype;q.release=function(){for(var a=u(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};q.fj=function(){return this.j};q.Yf=function(){return this.l.slice()};q.Mi=function(){return this.i};
|
|
864
864
|
function nt(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[ot(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[pt(n),n]})),l=new Map(h.textStreams.map(function(n){return[qt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[rt(n),n]}));if(b){var m=st(Gc);l.set(qt(m),m);m=st("image");h.set(rt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Xg:c,Zh:d,Uh:e,rh:f}}
|
|
865
|
-
q.bh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
866
|
-
vt),tt(c,c.g,t,l,ut,vt),tt(c,c.l,x,l,ut,vt),tt(c,c.i,w,l,ut,vt)]),2)}
|
|
867
|
-
else for(
|
|
868
|
-
function wt(a){var b,c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
869
|
-
f=a.map(function(W){return new Map(W.filter(function(Y){return Y.type===b.uf}).map(function(Y){return[rt(Y),Y]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=xt(b.Ca),k.set(qt(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())r=n.value,p=xt(b.uf),r.set(rt(p),p);t=new mt;return D(X,tt(t,[],c,0,yt,zt),2);case 2:return x=X.h,D(X,tt(t,[],d,0,yt,zt),3);case 3:return w=X.h,D(X,tt(t,[],e,0,yt,zt),4);case 4:return
|
|
870
|
-
J.next();!F.done;F=J.next())for(I=F.value,K=u(w),M=K.next();!M.done;M=K.next())P=M.value,O=
|
|
871
|
-
function tt(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,
|
|
872
|
-
z.next();!t.done;t=z.next())for(C=t.value,E={},H=u(C),
|
|
865
|
+
q.bh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J,F,I,K,M,P,O,X;return L(function(W){if(1==W.g){d=Ic;if(!b&&1==a.length)return e=nt(a,!1),f=e.Xg,g=e.Zh,h=e.Uh,k=e.rh,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),W.D(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.u.has(n.id)||(c.u.add(n.id),-1==l&&(l=m));if(-1==l)return W.return();r=nt(a,!0);p=r.Xg;t=r.Zh;x=r.Uh;w=r.rh;return D(W,Promise.all([tt(c,c.h,p,l,ut,
|
|
866
|
+
vt),tt(c,c.g,t,l,ut,vt),tt(c,c.l,x,l,ut,vt),tt(c,c.i,w,l,ut,vt)]),2)}B=0;v=[];if(c.g.length&&c.h.length)for(J=u(c.h),F=J.next();!F.done;F=J.next())for(I=F.value,K=u(c.g),M=K.next();!M.done;M=K.next())P=M.value,O=ii(I.drmInfos,P.drmInfos),I.drmInfos.length&&P.drmInfos.length&&!O.length||(X=B++,v.push({id:X,language:I.language,disabledUntilTime:0,primary:I.primary,audio:I,video:P,bandwidth:(I.bandwidth||0)+(P.bandwidth||0),drmInfos:O,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
|
|
867
|
+
else for(A=c.g.length?c.g:c.h,z=u(A),C=z.next();!C.done;C=z.next())E=C.value,H=B++,v.push({id:H,language:E.language,disabledUntilTime:0,primary:E.primary,audio:E.type==d.Z?E:null,video:E.type==d.va?E:null,bandwidth:E.bandwidth||0,drmInfos:E.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=v;G(W)})};
|
|
868
|
+
function wt(a){var b,c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J,F,I,K,M,P,O;return L(function(X){switch(X.g){case 1:b=Ic;if(1==a.length)return X.return(a[0]);c=a.map(function(W){return new Map(W.filter(function(Y){return Y.type===b.Z}).map(function(Y){return[ot(Y),Y]}))});d=a.map(function(W){return new Map(W.filter(function(Y){return Y.type===b.va}).map(function(Y){return[pt(Y),Y]}))});e=a.map(function(W){return new Map(W.filter(function(Y){return Y.type===b.Ca}).map(function(Y){return[qt(Y),Y]}))});
|
|
869
|
+
f=a.map(function(W){return new Map(W.filter(function(Y){return Y.type===b.uf}).map(function(Y){return[rt(Y),Y]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=xt(b.Ca),k.set(qt(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())r=n.value,p=xt(b.uf),r.set(rt(p),p);t=new mt;return D(X,tt(t,[],c,0,yt,zt),2);case 2:return x=X.h,D(X,tt(t,[],d,0,yt,zt),3);case 3:return w=X.h,D(X,tt(t,[],e,0,yt,zt),4);case 4:return B=X.h,D(X,tt(t,[],f,0,yt,zt),5);case 5:v=X.h;A=0;if(w.length&&x.length)for(J=u(x),F=
|
|
870
|
+
J.next();!F.done;F=J.next())for(I=F.value,K=u(w),M=K.next();!M.done;M=K.next())P=M.value,O=A++,P.variantIds.push(O),I.variantIds.push(O);else for(z=w.concat(x),C=u(z),E=C.next();!E.done;E=C.next())H=E.value,H.variantIds=[A++];return X.return(w.concat(x).concat(B).concat(v))}})}
|
|
871
|
+
function tt(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J;return L(function(F){switch(F.g){case 1:g=[];for(h=0;h<d;h++)g.push(new Set);for(k=d;k<c.length;k++)g.push(new Set(c[k].values()));l=u(b);m=l.next();case 2:if(m.done){F.D(4);break}n=m.value;return D(F,At(a,n,c,d,f,g),5);case 5:r=F.h;if(!r)throw new R(2,4,4037);m=l.next();F.D(2);break;case 4:p=u(g);for(t=p.next();!t.done;t=p.next())for(x=t.value,w=u(x),B=w.next();!B.done;B=w.next())v=B.value,(A=Bt(a,v,c,e,f,g))&&b.push(A);z=u(g);for(t=
|
|
872
|
+
z.next();!t.done;t=z.next())for(C=t.value,E={},H=u(C),B=H.next();!B.done;E={je:E.je},B=H.next())if(E.je=B.value,!Ct(E.je)&&(J=b.some(function(I){return function(K){return Dt(a,I.je,K)}}(E))))throw new R(2,4,4037);return F.return(b)}})}function At(a,b,c,d,e,f){return L(function(g){if(1==g.g)return Et(a,c,b),b.matchedStreams?b.segmentIndex?D(g,Ft(b,d),2):g.D(2):g.return(!1);Gt(b,d,e,f);return g.return(!0)})}
|
|
873
873
|
function Ft(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return D(l,Promise.all(c),2)}if(a.segmentIndex instanceof Pk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);G(l)})}
|
|
874
874
|
function Bt(a,b,c,d,e,f){if(Ct(b))return null;var g=d(b);Et(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return L(function(h){if(g.segmentIndex)return h.D(0);g.segmentIndex=new Pk;return D(h,Ft(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Gt(g,0,e,f);return g}
|
|
875
875
|
function Gt(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==Sc(a.language,f.language)&&(g=!1);if(g&&(d[b].delete(f),f.fullMimeTypes))for(f=u(f.fullMimeTypes.values()),g=f.next();!g.done;g=f.next())a.fullMimeTypes.add(g.value)}}
|
|
@@ -898,36 +898,36 @@ q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.
|
|
|
898
898
|
function $t(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.h&&(c=lt(a.h,"Location",!0),c.length&&(b=c)),d=rg(b,a.g.retryParameters),e=Date.now(),D(k,bu(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return D(k,cu(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.J.sample(1,h);return k.return(h)})}
|
|
899
899
|
function cu(a,b,c){var d,e,f,g,h,k,l,m,n,r,p;return L(function(t){if(1==t.g){d=b;e=a.g.dash.manifestPreprocessor;f=im;if(e!=f){ld("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=Xt(d,"MPD");if(!g)throw new R(2,4,4001,c);e(g);d=pc(g.outerHTML)}h=Tg(d,"MPD");if(!h)throw new R(2,4,4001,c);k=a.g.dash.manifestPreprocessorTXml;l=jm;k!=l&&k(h);if(m=a.g.dash.disableXlinkProcessing)return t.return(du(a,h,c));n=a.g.dash.xlinkFailGracefully;
|
|
900
900
|
r=ys(h,a.g.retryParameters,n,c,a.i.networkingEngine);mg(a.H,r);return D(t,r.promise,2)}p=t.h;return t.return(du(a,p,c))})}
|
|
901
|
-
function du(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
902
|
-
if((x=eh(b,"ContentSteering"))&&a.i){w=x.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new gt(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,
|
|
903
|
-
(X=H.map(ch),J=Ac(d,X));W=function(){return a.h&&F?lt(a.h,"BaseURL"):J?J:[]};Y=0;H&&H.length&&(Y=hh(H[0],"availabilityTimeOffset",sh)||0);Da=a.g.dash.ignoreMinBufferTime;Ia=0;Da||(Ia=hh(b,"minBufferTime",lh)||0);a.I=hh(b,"minimumUpdatePeriod",lh,-1);
|
|
904
|
-
qb=b.attributes.type||"static";if(a.j)for(eb=a.j.presentationTimeline,zf=u(Object.values(a.m)),Nd=zf.next();!Nd.done;Nd=zf.next())pe=Nd.value,pe.segmentIndex&&pe.segmentIndex.fb(eb.Lb());else
|
|
905
|
-
Sa:null,xa:null,La:null,N:null,bandwidth:0,sh:!1,
|
|
901
|
+
function du(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J,F,I,K,M,P,O,X,W,Y,Da,Ia,mb,Ka,ab,Aa,sb,Ib,qb,eb,zf,Nd,pe,yd,Lc,qe,Af,re,Od,ej,Zg,fj,gj,Bf,se,Cf;return L(function(ac){switch(ac.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=ah(b,"Location");h=u(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=ch(l))r=Ac(d,[n])[0],m&&(a.h?kt(a.h,"Location",m,r):f.set(m,r)),e.push(r);a.h?(p=lt(a.h,"Location",!0),0<p.length&&(d=a.o=p)):e.length&&(d=a.o=e);t=Promise.resolve();
|
|
902
|
+
if((x=eh(b,"ContentSteering"))&&a.i){w=x.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new gt(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,B=ch(x))(v=hh(x,"queryBeforeStart",th,!1))?t=ht(a.h,B):ht(a.h,B);A=u(f.keys());for(z=A.next();!z.done;z=A.next())C=z.value,E=f.get(C),kt(a.h,"Location",C,E)}H=ah(b,"BaseURL");F=!1;if(a.h)for(I=u(H),K=I.next();!K.done;K=I.next())M=K.value,P=M.attributes.serviceLocation,O=ch(M),P&&O&&(kt(a.h,"BaseURL",P,O),F=!0);F&&a.h||
|
|
903
|
+
(X=H.map(ch),J=Ac(d,X));W=function(){return a.h&&F?lt(a.h,"BaseURL"):J?J:[]};Y=0;H&&H.length&&(Y=hh(H[0],"availabilityTimeOffset",sh)||0);Da=a.g.dash.ignoreMinBufferTime;Ia=0;Da||(Ia=hh(b,"minBufferTime",lh)||0);a.I=hh(b,"minimumUpdatePeriod",lh,-1);mb=hh(b,"availabilityStartTime",kh);Ka=hh(b,"timeShiftBufferDepth",lh);ab=a.g.dash.ignoreSuggestedPresentationDelay;Aa=null;ab||(Aa=hh(b,"suggestedPresentationDelay",lh));sb=a.g.dash.ignoreMaxSegmentDuration;Ib=null;sb||(Ib=hh(b,"maxSegmentDuration",lh));
|
|
904
|
+
qb=b.attributes.type||"static";if(a.j)for(eb=a.j.presentationTimeline,zf=u(Object.values(a.m)),Nd=zf.next();!Nd.done;Nd=zf.next())pe=Nd.value,pe.segmentIndex&&pe.segmentIndex.fb(eb.Lb());else yd=a.g.defaultPresentationDelay||1.5*Ia,Lc=null!=Aa?Aa:yd,eb=new qk(mb,Lc,a.g.dash.autoCorrectDrift);eb.gd("static"==qb);(qe=eb.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Ka=a.g.availabilityWindowOverride);null==Ka&&(Ka=Infinity);eb.$e(Ka);Af=b.attributes.profiles||"";re={dc:"static"!=qb,presentationTimeline:eb,
|
|
905
|
+
Sa:null,xa:null,La:null,N:null,bandwidth:0,sh:!1,sc:Y,profiles:Af.split(",")};Od=eu(a,re,W,b);ej=Od.duration;Zg=Od.periods;"static"!=qb&&Od.hh||eb.xb(ej||Infinity);a.G&&!a.u&&(fj=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.u=a.i.isLowLatencyMode());a.u?eb.Jh(a.G):a.G&&Ua("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");eb.ng(Ib||1);
|
|
906
906
|
return D(ac,a.l.bh(Zg,re.dc),2);case 2:return D(ac,t,3);case 3:a.u&&(Ia=0,gj=null!=Aa?Aa:a.g.defaultPresentationDelay,eb.Cg(gj));if(a.j){a.j.variants=a.l.j;Bf=a.l.Yf();0<Bf.length&&(a.j.textStreams=Bf);a.j.imageStreams=a.l.i;a.i.filter(a.j);ac.D(4);break}a.j={presentationTimeline:eb,variants:a.l.j,textStreams:a.l.Yf(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Ia||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:fu(b)};if(!eb.Xh()){ac.D(5);
|
|
907
907
|
break}se=ah(b,"UTCTiming");return D(ac,gu(a,W,se),6);case 6:Cf=ac.h;if(!a.i)return ac.return();eb.Kh(Cf);case 5:eb.Ge();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),G(ac)}})}
|
|
908
908
|
function fu(a){var b=eh(a,"ServiceDescription");if(!b)return null;a=eh(b,"Latency");b=eh(b,"PlaybackRate");return a&&a.attributes.max||b?{maxLatency:a&&a.attributes.max?parseInt(a.attributes.max,10)/1E3:null,maxPlaybackRate:b?parseFloat(b.attributes.max):null,minLatency:a&&a.attributes.min?parseInt(a.attributes.min,10)/1E3:null,minPlaybackRate:b?parseFloat(b.attributes.min):null}:null}
|
|
909
909
|
function eu(a,b,c,d){var e=hh(d,"mediaPresentationDuration",lh),f=[],g=0;d=ah(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=hh(k,"start",lh,g),n=k.attributes.id,r=hh(k,"duration",lh),p=null;if(l){var t=hh(l,"start",lh);null!=t&&(p=t-m)}else null!=e&&(p=e-m);null==p&&(p=r);if(!(null!==a.F&&null!==n&&null!==m&&m<a.F)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.F||m>a.F)&&(a.F=m);g=hu(a,b,c,{start:m,duration:p,node:k,eg:null==p||!l});f.push(g);b.Sa.id&&p&&(a.M[b.Sa.id]=p);if(null==
|
|
910
910
|
p){g=null;break}g=m+p}}a.L=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,hh:!1}:{periods:f,duration:g,hh:!0}}
|
|
911
|
-
function hu(a,b,c,d){b.Sa=iu(a,d.node,null,c);b.xa=d;b.Sa.
|
|
911
|
+
function hu(a,b,c,d){b.Sa=iu(a,d.node,null,c);b.xa=d;b.Sa.sc=b.sc;b.Sa.id||(b.Sa.id="__shaka_period_"+d.start);var e=ah(d.node,"EventStream");c=b.presentationTimeline.Lb();e=u(e);for(var f=e.next();!f.done;f=e.next())ju(a,d.start,d.duration,f.value,c);c=ah(d.node,"AdaptationSet").map(function(m){return ku(a,b,m)}).filter(Ke);if(b.dc){d=[];e=u(c);for(f=e.next();!f.done;f=e.next()){f=u(f.value.Pj);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new R(2,4,4018);
|
|
912
912
|
}d=c.filter(function(m){return!m.Mg});c=c.filter(function(m){return m.Mg});c=u(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Mg.split(" ");g=u(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=u(k.streams);for(var l=k.next();!l.done;h={ke:h.ke},l=k.next())h.ke=l.value,h.ke.trickModeVideo=e.streams.find(function(m){return function(n){return te(m.ke.codecs)==te(n.codecs)}}(h))}}}c=lu(a.g.disableAudio,d,"audio");e=lu(a.g.disableVideo,d,"video");f=lu(a.g.disableText,
|
|
913
913
|
d,Gc);d=lu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new R(2,4,4004);return{id:b.Sa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function lu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,y(e.streams));return d},[])}
|
|
914
914
|
function ku(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.La=iu(a,c,b.Sa,null);var e=!1,f=ah(c,"Role"),g=f.map(function(F){return F.attributes.value}).filter(Ke),h=void 0,k=b.La.contentType==Gc;k&&(h="subtitle");f=u(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.attributes.schemeIdUri;if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.attributes.value,l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
915
915
|
l}}var n;m=ah(c,"EssentialProperty");f=null;var r=!1;l=!1;m=u(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==t?f=p.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&("urn:mpeg:dash:ssr:2023"==t?r=!0:l=!0)}var x=null;m=ah(c,"SupplementalProperty");m=u(m);for(p=m.next();!p.done;p=m.next())p=
|
|
916
|
-
p.value,t=p.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==t?x=parseInt(p.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t&&(n=d(parseInt(p.attributes.value,10)));m=ah(c,"Accessibility");var w=new Map,
|
|
917
|
-
(z=z.split("="),
|
|
918
|
-
"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==t?
|
|
916
|
+
p.value,t=p.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==t?x=parseInt(p.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t&&(n=d(parseInt(p.attributes.value,10)));m=ah(c,"Accessibility");var w=new Map,B;m=u(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.attributes.schemeIdUri,t=t.attributes.value,"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var v=u(t),A=v.next();!A.done;A=v.next()){var z=A.value,C=A=void 0;z.includes("=")?
|
|
917
|
+
(z=z.split("="),A=z[0].startsWith("CC")?z[0]:"CC"+z[0],C=z[1]||"und"):(A="CC"+p,2==t.length?p+=2:p++,C=z);w.set(A,Mc(C))}}else w.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=t)for(t=u(t.split(";")),A=t.next();!A.done;A=t.next())A=A.value,z=v=void 0,A.includes("=")?(A=A.split("="),v="svc"+A[0],z=A[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,z=A),w.set(v,Mc(z));else w.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=t&&(g.push(t),"captions"==t&&(h="caption")):
|
|
918
|
+
"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==t?B="visually impaired":"2"==t&&(B="hard of hearing"));if(l)return null;l=ah(c,"ContentProtection");var E=hs(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),H=Mc(b.La.language||"und"),J=c.attributes.label;(l=ah(c,"Label"))&&l.length&&(l=bh(l[0]))&&(J=l);l=ah(c,"Representation");c=l.map(function(F){if(F=mu(a,b,E,h,H,J,e,g,w,F,B,x))F.hdr=F.hdr||n,F.fastSwitching=r;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.La.contentType;
|
|
919
919
|
if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new R(2,4,4003);}if(!b.La.contentType||"application"==b.La.contentType)for(b.La.contentType=nu(c[0].mimeType,c[0].codecs),k=u(c),p=k.next();!p.done;p=k.next())p.value.type=b.La.contentType;k=b.La.id||"__fake__"+a.K++;m=u(c);for(p=m.next();!p.done;p=m.next()){p=p.value;t=u(E.drmInfos);for(v=t.next();!v.done;v=t.next())v=v.value,v.keyIds=v.keyIds&&p.keyIds?new Set([].concat(y(v.keyIds),y(p.keyIds))):v.keyIds||p.keyIds;a.g.dash.enableAudioGroups&&
|
|
920
920
|
(p.groupId=k)}l=l.map(function(F){return F.attributes.id}).filter(Ke);return{id:k,contentType:b.La.contentType,language:H,xl:e,streams:c,drmInfos:E.drmInfos,Mg:f,Pj:l}}
|
|
921
|
-
function mu(a,b,c,d,e,f,g,h,k,l,m,n){b.N=iu(a,l,b.La,null);a.G=Math.min(a.G,b.N.
|
|
922
|
-
F.data.byteLength)throw new R(2,4,4049);I={name:"AES-CBC"};K=x;return D(M,window.crypto.subtle.importKey("raw",F.data,I,!0,["decrypt"]),3)}K.cryptoKey=M.h;x.fetchKey=void 0;G(M)})}}}w=function(F,I,K,M){return pu(a,F,I,K,M)};if(b.N.Xd)var
|
|
923
|
-
p)&&4002==F.code)return null;throw F;}n=ah(l,"ContentProtection");n=ls(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;ah(l,"SupplementalProperty").some(function(F){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==F.attributes.schemeIdUri&&"JOC"==F.attributes.value})&&(w=!0);
|
|
921
|
+
function mu(a,b,c,d,e,f,g,h,k,l,m,n){b.N=iu(a,l,b.La,null);a.G=Math.min(a.G,b.N.sc);if(!ou(b.N))return null;var r=b.xa.start;b.bandwidth=hh(l,"bandwidth",qh)||0;var p=b.N.contentType,t=p==Gc||"application"==p;p="image"==p;try{var x=void 0;if(c.xf){var w=b.N.Hb,B=Ac(w(),[c.xf.uj]),v=rg(B,a.g.retryParameters);x={bitsKey:128,blockCipherMode:"CBC",iv:c.xf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var F,I,K;return L(function(M){if(1==M.g)return D(M,bu(a,v,6),2);if(3!=M.g){F=M.h;if(!F.data||16!=
|
|
922
|
+
F.data.byteLength)throw new R(2,4,4049);I={name:"AES-CBC"};K=x;return D(M,window.crypto.subtle.importKey("raw",F.data,I,!0,["decrypt"]),3)}K.cryptoKey=M.h;x.fetchKey=void 0;G(M)})}}}w=function(F,I,K,M){return pu(a,F,I,K,M)};if(b.N.Xd)var A=Ls(b,w,x);else if(b.N.lc)A=Rs(b,a.m,x);else if(b.N.Yd)A=Ws(b,w,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.M,x,n);else{var z=b.xa.duration||0,C=b.N.Hb;A={Vc:function(){var F=Ok(r,z,C());F.Tc(function(I){I.mimeType=b.N.mimeType;I.codecs=b.N.codecs});return Promise.resolve(F)}}}}catch(F){if((t||
|
|
923
|
+
p)&&4002==F.code)return null;throw F;}n=ah(l,"ContentProtection");n=ls(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;ah(l,"SupplementalProperty").some(function(F){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==F.attributes.schemeIdUri&&"JOC"==F.attributes.value})&&(w=!0);B=!1;t&&(B=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var E;if(p&&((l=ah(l,"EssentialProperty").find(function(F){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(F.attributes.schemeIdUri)}))&&
|
|
924
924
|
(E=l.attributes.value),!E))return null;var H;l=b.N.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(H="PQ");t=b.N.id?b.Sa.id+","+b.N.id:"";var J=t&&a.m[t]?a.m[t]:{id:a.K++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){J.segmentIndex&&(J.segmentIndex.release(),J.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:l,
|
|
925
|
-
frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.La.language,label:f,type:b.La.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:
|
|
926
|
-
fastSwitching:!1,fullMimeTypes:new Set([ie(b.N.mimeType,b.N.codecs)])};J.createSegmentIndex=function(){var F;return L(function(I){if(1==I.g){if(J.segmentIndex)return I.D(0);F=J;return D(I,
|
|
925
|
+
frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.La.language,label:f,type:b.La.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:B,channelsCount:b.N.Ne,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:H,videoLayout:void 0,tilesLayout:E,accessibilityPurpose:m,external:!1,
|
|
926
|
+
fastSwitching:!1,fullMimeTypes:new Set([ie(b.N.mimeType,b.N.codecs)])};J.createSegmentIndex=function(){var F;return L(function(I){if(1==I.g){if(J.segmentIndex)return I.D(0);F=J;return D(I,A.Vc(),3)}F.segmentIndex=I.h;G(I)})};t&&b.dc&&!a.m[t]&&(a.m[t]=J);return J}
|
|
927
927
|
function Zt(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),D(d,$t(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=ua(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();au(a,b);G(d)}})}function au(a,b){if(!(0>a.I)){var c=a.I;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.V(Math.max(c-b,ad(a.J)))}}
|
|
928
|
-
function iu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ne:null,audioSamplingRate:null,
|
|
929
|
-
uh)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,p=qu(ah(b,"InbandEventStream"),c.emsgSchemeIdUris),t=ah(b,"AudioChannelConfiguration");t=ru(t)||c.Ne;var x=hh(b,"audioSamplingRate",rh)||c.audioSamplingRate;k||(k=nu(l,m));var w=eh(b,"SegmentBase"),
|
|
930
|
-
hh(z,"cadence",ph));return{Hb:function(){return Ac(d(),f.length?a.h&&h?lt(a.h,e):g?g:[]:[])},Xd:w||c.Xd,lc:eh(b,"SegmentList")||c.lc,Yd:
|
|
928
|
+
function iu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ne:null,audioSamplingRate:null,sc:0,yg:0};d=d||c.Hb;var e=b.attributes.id,f=ah(b,"BaseURL"),g,h=!1;if(a.h)for(var k=u(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=ch(m);l&&m&&(kt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(ch));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=b.attributes.codecs||c.codecs;var n=hh(b,"frameRate",
|
|
929
|
+
uh)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,p=qu(ah(b,"InbandEventStream"),c.emsgSchemeIdUris),t=ah(b,"AudioChannelConfiguration");t=ru(t)||c.Ne;var x=hh(b,"audioSamplingRate",rh)||c.audioSamplingRate;k||(k=nu(l,m));var w=eh(b,"SegmentBase"),B=eh(b,"SegmentTemplate"),v=w?hh(w,"availabilityTimeOffset",sh)||0:0,A=B?hh(B,"availabilityTimeOffset",sh)||0:0,z=f&&f.length?hh(f[0],"availabilityTimeOffset",sh)||0:0;v=c.sc+z+v+A;A=null;(z=eh(b,"SegmentSequenceProperties"))&&(z=eh(z,"SAP"))&&(A=
|
|
930
|
+
hh(z,"cadence",ph));return{Hb:function(){return Ac(d(),f.length?a.h&&h?lt(a.h,e):g?g:[]:[])},Xd:w||c.Xd,lc:eh(b,"SegmentList")||c.lc,Yd:B||c.Yd,width:hh(b,"width",rh)||c.width,height:hh(b,"height",rh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,Ne:t,audioSamplingRate:x,sc:v,yg:A||c.yg}}
|
|
931
931
|
function qu(a,b){b=b.slice();a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
932
932
|
function ru(a){a=u(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
933
933
|
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function ou(a){var b=a.Xd?1:0;b+=a.lc?1:0;b+=a.Yd?1:0;if(0==b)return a.contentType==Gc||"application"==a.contentType?!0:!1;1!=b&&(a.Xd&&(a.lc=null),a.Yd=null);return!0}
|
|
@@ -945,35 +945,35 @@ g.name&&(g.attributes.push(new Du("URI",h)),d=!0)}}return new xu(b,e)}function Q
|
|
|
945
945
|
var Ru="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Su="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Tu(){}function Uu(a){try{var b=Vu(a);return hg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return fg(c)}}
|
|
946
946
|
function Vu(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new R(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new R(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=wc(a):e=pc(a);return{data:e,contentType:c}}N("shaka.net.DataUriPlugin",Tu);Tu.parse=Uu;og("data",Uu);function Wu(a){var b=we(a),c=b.split("/")[0];a=ye(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Qg:null}}
|
|
947
947
|
function Xu(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":f.push(v+".42E01E");h=!0;break;case "hev1":case "hvc1":f.push(v+".1.6.L93.90");h=!0;break;case "dvh1":case "dvhe":f.push(v+".05.04");h=!0;break;case "vp09":f.push(v+".00.10.08");h=!0;break;case "av01":f.push(v+".0.01M.08");h=!0;break;case "mp4a":e.push("mp4a.40.2");g=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),g=!0}}var e=[],f=[],g=!1,h=!1,k=null,l=null,m=null,n=
|
|
948
|
-
null,r=null,p=null,t;(new Gg).box("moov",Lg).box("trak",Lg).T("tkhd",function(v){v=Ui(v.reader,v.version);l=String(v.height);m=String(v.width)}).box("mdia",Lg).T("mdhd",function(v){k=Si(v.reader,v.version).language}).box("minf",Lg).box("stbl",Lg).T("stsd",Ng).box("mp4a",function(v){var
|
|
949
|
-
v.W();E&128;)E=v.W();if(3==z)v.Ha(),E=v.W(),E&128&&v.Ha(),E&64&&v.skip(v.W()),E&32&&v.Ha();else if(4==z)C=v.W(),v.skip(12);else if(5==z)break}C&&(
|
|
950
|
-
function(v){t=v.name;Og(v)}).box("dvav",function(v){t=v.name;Og(v)}).box("dvh1",function(v){t=v.name;Og(v)}).box("dvhe",function(v){t=v.name;Og(v)}).box("vp09",function(v){t=v.name;Og(v)}).box("av01",function(v){t=v.name;Og(v)}).box("avcC",function(v){var
|
|
951
|
-
z.skip(1);v=z.W();var C=["","A","B","C"][v>>6],E=v&31,H=z.R(),J=(v&32)>>5?"H":"L";v=[z.W(),z.W(),z.W(),z.W(),z.W(),z.W()];z=z.W();for(var F=0,I=0;32>I;I++){F|=H&1;if(31==I)break;F<<=1;H>>=1}
|
|
952
|
-
v=z.W();z=z.W();f.push(
|
|
953
|
-
Lg).box("frma",function(v){v=Vi(v.reader).ab;d(v)}).box("colr",function(v){v=v.reader;var
|
|
954
|
-
for(b=a.next();!b.done;b=a.next())b=b.value,w.set(b,b);
|
|
948
|
+
null,r=null,p=null,t;(new Gg).box("moov",Lg).box("trak",Lg).T("tkhd",function(v){v=Ui(v.reader,v.version);l=String(v.height);m=String(v.width)}).box("mdia",Lg).T("mdhd",function(v){k=Si(v.reader,v.version).language}).box("minf",Lg).box("stbl",Lg).T("stsd",Ng).box("mp4a",function(v){var A=v.reader;A.skip(6);A.skip(2);A.skip(8);var z=A.Ha();A.skip(2);A.skip(2);A.skip(2);A=A.Ha()+A.Ha()/65536;n=z;r=A;v.reader.Aa()?Lg(v):c(v)}).box("esds",function(v){v=v.reader;for(var A="mp4a",z,C;v.Aa();){z=v.W();for(var E=
|
|
949
|
+
v.W();E&128;)E=v.W();if(3==z)v.Ha(),E=v.W(),E&128&&v.Ha(),E&64&&v.skip(v.W()),E&32&&v.Ha();else if(4==z)C=v.W(),v.skip(12);else if(5==z)break}C&&(A+="."+Wi(C),5==z&&v.Aa()&&(z=v.W(),C=(z&248)>>3,31===C&&v.Aa()&&(C=32+((z&7)<<3)+((v.W()&224)>>5)),A+="."+C));e.push(A);g=!0}).box("ac-3",c).box("ec-3",c).box("opus",c).box("Opus",c).box("fLaC",c).box("avc1",function(v){t=v.name;Og(v)}).box("avc3",function(v){t=v.name;Og(v)}).box("hev1",function(v){t=v.name;Og(v)}).box("hvc1",function(v){t=v.name;Og(v)}).box("dva1",
|
|
950
|
+
function(v){t=v.name;Og(v)}).box("dvav",function(v){t=v.name;Og(v)}).box("dvh1",function(v){t=v.name;Og(v)}).box("dvhe",function(v){t=v.name;Og(v)}).box("vp09",function(v){t=v.name;Og(v)}).box("av01",function(v){t=v.name;Og(v)}).box("avcC",function(v){var A=t||"";switch(t){case "dvav":A="avc3";break;case "dva1":A="avc1"}v=v.reader;v.skip(1);v=A+"."+Wi(v.W())+Wi(v.W())+Wi(v.W());f.push(v);h=!0}).box("hvcC",function(v){var A=t||"";switch(t){case "dvh1":A="hvc1";break;case "dvhe":A="hev1"}var z=v.reader;
|
|
951
|
+
z.skip(1);v=z.W();var C=["","A","B","C"][v>>6],E=v&31,H=z.R(),J=(v&32)>>5?"H":"L";v=[z.W(),z.W(),z.W(),z.W(),z.W(),z.W()];z=z.W();for(var F=0,I=0;32>I;I++){F|=H&1;if(31==I)break;F<<=1;H>>=1}A=A+("."+C+E)+("."+Wi(F,!0));A+="."+J+z;C="";for(E=v.length;E--;)if((J=v[E])||C)C="."+J.toString(16).toUpperCase()+C;A+=C;f.push(A);h=!0}).box("dvcC",function(v){var A=t||"";switch(t){case "hvc1":A="dvh1";break;case "hev1":A="dvhe";break;case "avc1":A="dva1";break;case "avc3":A="dvav"}var z=v.reader;z.skip(2);
|
|
952
|
+
v=z.W();z=z.W();f.push(A+"."+Xi(v>>1&127)+"."+Xi(v<<5&32|z>>3&31));h=!0}).T("vpcC",function(v){var A=t||"",z=v.reader;v=z.W();var C=z.W();z=z.W()>>4&15;f.push(A+"."+Xi(v)+"."+Xi(C)+"."+Xi(z));h=!0}).box("av1C",function(v){var A=t||"",z=v.reader;z.skip(1);v=z.W();z=z.W();var C=v>>>5,E=(z&64)>>6;f.push(A+"."+C+"."+Xi(v&31)+(z>>>7?"H":"M")+"."+Xi(2===C&&E?(z&32)>>5?12:10:E?10:8)+"."+((z&16)>>4)+"."+((z&8)>>3)+((z&4)>>2)+(z&3)+"."+Xi(1)+"."+Xi(1)+"."+Xi(1)+".0");h=!0}).box("enca",Pg).box("encv",Og).box("sinf",
|
|
953
|
+
Lg).box("frma",function(v){v=Vi(v.reader).ab;d(v)}).box("colr",function(v){v=v.reader;var A=null,z=v.Pb(4);var C=String.fromCharCode(z[0]);C+=String.fromCharCode(z[1]);C+=String.fromCharCode(z[2]);C+=String.fromCharCode(z[3]);if("nclx"===C)switch(v.Ha(),z=v.Ha(),v.Ha(),z){case 1:case 6:case 13:case 14:case 15:A="SDR";break;case 16:A="PQ";break;case 18:A="HLG"}p=A}).parse(a||b,!0);if(!e.length&&!f.length)return null;var x=g&&!h,w=new Map;if(h){var B=new sd("video/mp4");a&&B.init(a);B.i(b);a=u(B.j());
|
|
954
|
+
for(b=a.next();!b.done;b=a.next())b=b.value,w.set(b,b);B.h()}return{type:x?"audio":"video",mimeType:x?"audio/mp4":"video/mp4",codecs:Yu(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:r,closedCaptions:w,Qg:p}}function Yu(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ve(d);b.has(e)||(c.push(d),b.add(e))}b=Hc("audio",c);d=Hc("video",c);a=Hc(Gc,c);d=Zu(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
955
955
|
function Zu(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?hd('video/mp4; codecs="'+b+"\"'")?[b]:a.filter(function(c){return c!=b}):a}function $u(a){var b=null;(new Gg).box("moov",Lg).box("trak",Lg).box("mdia",Lg).box("minf",Lg).box("stbl",Lg).T("stsd",Ng).box("encv",Og).box("enca",Pg).box("sinf",Lg).box("schi",Lg).T("tenc",function(c){c=c.reader;c.W();c.W();c.W();c.W();b=yc(c.Pb(16))}).parse(a,!0);return b};function av(){var a=this;this.g=this.i=null;this.A=1;this.o=new Map;this.J=new Map;this.L=new Map;this.L.set("video",new Map);this.L.set("audio",new Map);this.L.set(Gc,new Map);this.L.set("image",new Map);this.Ka=new Set;this.h=new Map;this.l=null;this.X="";this.Fa=new Ou;this.K=-1;this.P=Infinity;this.aa=this.$a=!1;this.u=new Ob(function(){bv(a)});this.oa=cv;this.G=null;this.Ja=0;this.m=Infinity;this.ra=this.qa=this.M=0;this.O=new lg;this.H=new Map;this.I=new Map;this.S=new Map;this.Y=new Map;this.$=
|
|
956
956
|
new Map;this.sa=new Map;this.ma=new Map;this.Za=this.F=!1;this.Ua=new $c(5);this.j=null}q=av.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};q.start=function(a,b){var c=this,d;return L(function(e){return 1==e.g?(c.i=b,c.F=b.isLowLatencyMode(),D(e,dv(c,[a]),2)):3!=e.g?(d=e.h,c.X=d.uri,D(e,ev(c,d.data,a),3)):e.return(c.G)})};
|
|
957
957
|
q.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.O&&(a.push(this.O.destroy()),this.O=null);this.g=this.i=null;this.Ka.clear();this.G=null;this.h.clear();this.J.clear();this.I.clear();this.o.clear();this.S.clear();this.Y.clear();this.$.clear();this.sa.clear();this.ma.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
958
958
|
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!fv(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(gv(a,g));return D(m,Promise.all(b),2)}hv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Ld});d.length&&!h&&(k=iv,jv(a,k.ei),l=d.map(function(n){return n.Yb}),a.l.xb(Math.min.apply(Math,y(l))),a.i.updateDuration());
|
|
959
959
|
h&&kv(a);G(m)})};function lv(a,b){return fv(a)?a.L.get(b.type):b.Ie}
|
|
960
|
-
function gv(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
961
|
-
b.ka().includes(m)||b.Fh.push(m);n=Eu(l.g,"EXT-X-DEFINE");r=mv(a,n,m);p=b.stream;t=lv(a,b);return D(W,nv(a,l,p.mimeType,b.ka,r),3)}x=W.h;w=x.keyIds;
|
|
962
|
-
"SKIPPED-SEGMENTS")):0,F=pv(E,z),I=F.Bb,K=F.Cb,b.Bb=I+J,b.Cb=K,M=t.get(E),p.segmentIndex.fb(M));P=z[0];b.
|
|
960
|
+
function gv(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J,F,I,K,M,P,O,X;return L(function(W){if(1==W.g){c=[];d=u(b.ka());for(e=d.next();!e.done;e=d.next())f=e.value,g=new ib(f),h=g.g,b.pe&&(0<=b.Bb&&h.add("_HLS_msn",String(b.Bb)),0<=b.Cb&&h.add("_HLS_part",String(b.Cb))),b.qe&&h.add("_HLS_skip","YES"),Ab(h)&&nb(g,h),c.push(g.toString());return D(W,dv(a,c,!0),2)}if(3!=W.g){k=W.h;if(!b.stream.segmentIndex)return W.return();l=Pu(a.Fa,k.data);if(1!=l.type)throw new R(2,4,4017);m=k.uri;m==k.originalUri||
|
|
961
|
+
b.ka().includes(m)||b.Fh.push(m);n=Eu(l.g,"EXT-X-DEFINE");r=mv(a,n,m);p=b.stream;t=lv(a,b);return D(W,nv(a,l,p.mimeType,b.ka,r),3)}x=W.h;w=x.keyIds;B=x.drmInfos;v=function(Y,Da){return Y.size===Da.size&&[].concat(y(Y)).every(function(Ia){return Da.has(Ia)})};v(p.keyIds,w)||(p.keyIds=w,p.drmInfos=B,a.i.newDrmInfo(p));A=ov(a,l,p,t,r,b.ka,b.type);z=A.segments;if(C=A.bandwidth)p.bandwidth=C;p.segmentIndex.Sd(z,a.l.Lb());z.length&&(E=Hu(l.g,"EXT-X-MEDIA-SEQUENCE",0),J=(H=Gu(l.g,"EXT-X-SKIP"))?Number(V(H,
|
|
962
|
+
"SKIPPED-SEGMENTS")):0,F=pv(E,z),I=F.Bb,K=F.Cb,b.Bb=I+J,b.Cb=K,M=t.get(E),p.segmentIndex.fb(M));P=z[0];b.Dc=P.startTime;O=z[z.length-1];b.Yb=O.endTime;if(X=Gu(l.g,"EXT-X-ENDLIST"))b.Ld=!0;qv(a,l);G(W)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
963
963
|
function rv(a,b){for(var c=-1==a.K,d=u(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=lv(a,e);if(f=f.g[0]||null){g=u(g);for(var h=g.next();!h.done;h=g.next()){h=u(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.K=Math.max(a.K,k));e.Ff=k;break}}}}if(!(0>a.K))for(b=u(b),e=b.next();!e.done;e=b.next())if(c=e.value,sv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.K-c.Ff,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),tv(a,
|
|
964
964
|
c,d)}
|
|
965
965
|
function uv(a,b){if(Infinity==a.P){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.P=Math.min(a.P,d.h))}}b=a.P;if(Infinity!=b)for(d=u(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!sv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.ka(),"Expect AV sync issues!");else for(tv(a,c,f.h-b-f.startTime),c=u(e),e=c.next();!e.done;e=c.next())e.value.Jg(b)}}}
|
|
966
|
-
function tv(a,b,c){b.
|
|
967
|
-
function ev(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
968
|
-
yv(a,x),4);case 4:return zv(a,m),Av(a,l),D(Aa,Bv(a,m,p,l,k,a.o),5);case 5:return f=Aa.h,g=Cv(a,l),D(Aa,Dv(a,n,r),6);case 6:h=Aa.h;Aa.D(3);break;case 7:return w=Aa.h,
|
|
969
|
-
|
|
970
|
-
type:"HLS",serviceDescription:null};if(a.aa||!a.g.hls.disableCodecGuessing){Aa.D(9);break}O=[];X=u(a.G.variants);for(W=X.next();!W.done;W=X.next())Y=W.value,Y.audio&&""===Y.audio.codecs&&O.push(Y.audio.createSegmentIndex()),Y.video&&""===Y.video.codecs&&O.push(Y.video.createSegmentIndex());return D(Aa,Promise.all(O),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.G);if(1==f.length){Da=[];Ia=f[0];
|
|
966
|
+
function tv(a,b,c){b.Dc+=c;b.Yb+=c;a=lv(a,b);for(var d=u(a),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.ka()}
|
|
967
|
+
function ev(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J,F,I,K,M,P,O,X,W,Y,Da,Ia,mb,Ka,ab;return L(function(Aa){switch(Aa.g){case 1:d=Pu(a.Fa,b);e=Eu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];k=function(){return[c]};if(1==d.type)return D(Aa,vv(a,d,k),7);wv(a,e);l=Eu(d.g,"EXT-X-MEDIA");m=Eu(d.g,"EXT-X-STREAM-INF");n=Eu(d.g,"EXT-X-IMAGE-STREAM-INF");r=Eu(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Eu(d.g,"EXT-X-SESSION-KEY");t=Eu(d.g,"EXT-X-SESSION-DATA");x=Eu(d.g,"EXT-X-CONTENT-STEERING");xv(a,t);return D(Aa,
|
|
968
|
+
yv(a,x),4);case 4:return zv(a,m),Av(a,l),D(Aa,Bv(a,m,p,l,k,a.o),5);case 5:return f=Aa.h,g=Cv(a,l),D(Aa,Dv(a,n,r),6);case 6:h=Aa.h;Aa.D(3);break;case 7:return w=Aa.h,B=w.type,v=w.mimeType,A=w.codecs,z=w.language,C=w.height,E=w.width,H=w.channelCount,J=w.sampleRate,F=w.closedCaptions,I=w.Qg,D(Aa,Ev(a,a.A++,d,k,c,A,B,z,!0,"Media Playlist",H,F,null,!1,J,!1,v),8);case 8:K=Aa.h,a.h.set(c,K),"video"==B&&Fv(K.stream,E,C,null,I,null),f.push({id:0,language:Mc(z||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
|
|
969
|
+
B?K.stream:null,video:"video"==B?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new R(2,7,7001);a.l=new qk(null,0);a.l.gd(!0);1==d.type&&(fv(a)&&(Gv(a,d),M=a.m,a.u.V(M)),P=Array.from(a.h.values()),Hv(a,P),kv(a));a.G={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
970
|
+
type:"HLS",serviceDescription:null};if(a.aa||!a.g.hls.disableCodecGuessing){Aa.D(9);break}O=[];X=u(a.G.variants);for(W=X.next();!W.done;W=X.next())Y=W.value,Y.audio&&""===Y.audio.codecs&&O.push(Y.audio.createSegmentIndex()),Y.video&&""===Y.video.codecs&&O.push(Y.video.createSegmentIndex());return D(Aa,Promise.all(O),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.G);if(1==f.length){Da=[];Ia=f[0];mb=u([Ia.video,Ia.audio]);for(Ka=mb.next();!Ka.done;Ka=mb.next())(ab=Ka.value)&&!ab.segmentIndex&&Da.push(ab.createSegmentIndex());
|
|
971
971
|
if(0<Da.length)return D(Aa,Promise.all(Da),0)}Aa.D(0)}})}
|
|
972
|
-
function vv(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
973
|
-
rg(g,a.g.retryParameters),D(C,Kv(a,w,n,{type:1}),4);case 4:
|
|
974
|
-
F.push("avc1.42E01E");K=!0;break;case "hvc":H.ab?F.push(H.ab):F.push("hvc1.1.6.L93.90");K=!0;break;case "av1":F.push("av01.0.01M.08"),K=!0}if(F.length){J=I&&!K;I=new Map;if(K){K=new sd("video/mp2t");K.i(E);E=u(K.j());for(var M=E.next();!M.done;M=E.next())M=M.value,I.set(M,M);K.h()}H={type:J?"audio":"video",mimeType:"video/mp2t",codecs:F.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,closedCaptions:I,Qg:null}}else H=null;if(
|
|
975
|
-
l||"cmfv"==l||"m4s"==l||"video/mp4"==v||"audio/mp4"==v||"video/iso.segment"==v)if(z=Xu(r,
|
|
976
|
-
function kv(a){if(fv(a)){if(a.oa==Lv){for(var b,c=b=Infinity,d=u(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Yb),c=Math.min(c,e.
|
|
972
|
+
function vv(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z;return L(function(C){switch(C.g){case 1:d=Wu(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return C.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Iu(c(),b.segments[0].h);h=g[0];k=new ib(h);l=k.jb.split(".").pop();if(m=Iv[l])return C.return(Wu(m));n=xg;r=null;p=Jv(a,b,f.g,c);a.S.clear();if(!p){C.D(2);break}t=pl(p.ka(),p.Mb(),p.Jb(),a.g.retryParameters);return D(C,Kv(a,t,n,{type:0}),3);case 3:x=C.h,r=x.data;case 2:return w=
|
|
973
|
+
rg(g,a.g.retryParameters),D(C,Kv(a,w,n,{type:1}),4);case 4:B=C.h;(v=B.headers["content-type"])&&(v=v.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==v){var E=B.data;var H=Fb(E);H=(new lj).parse(H);var J=H.Gd();H=H.$f();var F=[],I=!1,K=!1;switch(J.audio){case "aac":case "aac-loas":F.push("mp4a.40.2");I=!0;break;case "mp3":F.push("mp4a.40.34");I=!0;break;case "ac3":F.push("ac-3");I=!0;break;case "ec3":F.push("ec-3");I=!0;break;case "opus":F.push("opus"),I=!0}switch(J.video){case "avc":H.ab?F.push(H.ab):
|
|
974
|
+
F.push("avc1.42E01E");K=!0;break;case "hvc":H.ab?F.push(H.ab):F.push("hvc1.1.6.L93.90");K=!0;break;case "av1":F.push("av01.0.01M.08"),K=!0}if(F.length){J=I&&!K;I=new Map;if(K){K=new sd("video/mp2t");K.i(E);E=u(K.j());for(var M=E.next();!M.done;M=E.next())M=M.value,I.set(M,M);K.h()}H={type:J?"audio":"video",mimeType:"video/mp2t",codecs:F.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,closedCaptions:I,Qg:null}}else H=null;if(A=H)return C.return(A)}else if("mp4"==
|
|
975
|
+
l||"cmfv"==l||"m4s"==l||"video/mp4"==v||"audio/mp4"==v||"video/iso.segment"==v)if(z=Xu(r,B.data))return C.return(z);return C.return(d)}})}
|
|
976
|
+
function kv(a){if(fv(a)){if(a.oa==Lv){for(var b,c=b=Infinity,d=u(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Yb),c=Math.min(c,e.Dc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.u);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.$e(b)}}else a.l.xb(Mv(a));if(!a.l.o)for(b=u(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
977
977
|
c.h&&a.l.Mh(c.h);a.l.Ge()}function wv(a,b){var c=(new ib(a.X)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=V(e,"NAME");var f=V(e,"VALUE");e=V(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
|
|
978
978
|
function mv(a,b,c){c=(new ib(c)).g;var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=V(f,"NAME"),h=V(f,"VALUE");e=V(f,"QUERYPARAM");f=V(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d}
|
|
979
979
|
function zv(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=V(d,"AUDIO");c=V(d,"VIDEO");var f=V(d,"SUBTITLES");d=Nv(a,d);if(f){var g=Ec(Gc,d);a.I.set(f,g);wd(d,g)}e&&(f=Ec("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=Ec("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}}
|
|
@@ -982,13 +982,13 @@ function yv(a,b){var c,d,e,f,g,h;return L(function(k){if(!a.i||!a.g)return k.ret
|
|
|
982
982
|
function Cv(a,b){var c=Fu(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Ov(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=u(c);for(var d=c.next();!d.done;d=c.next()){var e=Bu(d.value,"GROUP-ID");if(d=a.I.get(e))if(e=a.J.get(e)){e=u(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Pv(Gc,d)||Qv(Gc),Rv(f.stream)}}return b.filter(function(g){return g})}
|
|
983
983
|
function Rv(a){a.fullMimeTypes=new Set([ie(a.mimeType,a.codecs)])}
|
|
984
984
|
function Dv(a,b,c){var d,e;return L(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return L(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ra(m,2);return D(m,Sv(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=ua(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Bu(g,"URI"),k=V(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=V(g,"LANGUAGE"),n=V(g,"NAME"),
|
|
985
|
-
r=V(g,"CHARACTERISTICS"),p=Tv(a,a.A++,[h],k,"image",m,!1,n,null,null,r,!1,null,!1),t=V(g,"RESOLUTION"),x=u(t?t.split("x"):[null,null]),w=x.next().value,
|
|
985
|
+
r=V(g,"CHARACTERISTICS"),p=Tv(a,a.A++,[h],k,"image",m,!1,n,null,null,r,!1,null,!1),t=V(g,"RESOLUTION"),x=u(t?t.split("x"):[null,null]),w=x.next().value,B=x.next().value;p.stream.width=Number(w)||void 0;p.stream.height=Number(B)||void 0;var v=V(g,"BANDWIDTH");v&&(p.stream.bandwidth=Number(v));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(A){if(a.g.hls.ignoreImageStreamFailures)return null;throw A;}})),D(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
986
986
|
function Uv(a,b,c){b=b.filter(function(h){var k=V(h,"URI")||"";return"SUBTITLES"!=V(h,"TYPE")&&""!=k});var d={};b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=zu(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Ov(a,d[g],c)}
|
|
987
|
-
function Bv(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,
|
|
988
|
-
x.next())
|
|
989
|
-
ab}),Da=Ia[0]),Da=Da||"CH-MONO",
|
|
987
|
+
function Bv(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J,F,I,K,M,P,O,X,W,Y,Da,Ia,mb;return L(function(Ka){switch(Ka.g){case 1:g=[];h=new Set;if(!(0<c.length)){Ka.D(2);break}k=u(c);l=k.next();case 3:if(l.done){Ka.D(2);break}m=l.value;n=Bu(m,"METHOD");r=V(m,"KEYFORMAT")||"identity";p=null;if("NONE"==n||Vv(n)){Ka.D(4);break}if("identity"!=r){p=(t=Wv[r])?t(m,""):null;Ka.D(6);break}return D(Ka,Xv(a,m,"",e,null,f),8);case 8:p=Ka.h;case 6:if(p){if(p.keyIds)for(x=u(p.keyIds),w=x.next();!w.done;w=
|
|
988
|
+
x.next())B=w.value,h.add(B);g.push(p)}case 4:l=k.next();Ka.D(3);break;case 2:v={};A=u(b);for(z=A.next();!z.done;z=A.next())C=z.value,E=zu(C),v[E]?v[E].push(C):v[E]=[C];H=[];for(J in v)F=v[J],I=F[0],K=V(I,"FRAME-RATE"),M=Number(V(I,"AVERAGE-BANDWIDTH"))||Number(Bu(I,"BANDWIDTH")),P=V(I,"RESOLUTION"),O=u(P?P.split("x"):[null,null]),X=O.next().value,W=O.next().value,Y=V(I,"VIDEO-RANGE"),(Da=V(I,"REQ-VIDEO-LAYOUT"))&&Da.includes(",")&&(Ia=Da.split(",").filter(function(ab){return"CH-STEREO"==ab||"CH-MONO"==
|
|
989
|
+
ab}),Da=Ia[0]),Da=Da||"CH-MONO",mb=Yv(a,F,d,M),H.push.apply(H,y(Zv(a,mb.audio,mb.video,M,X,W,K,Y,Da,g,h)));return Ka.return(H.filter(function(ab){return null!=ab}))}})}
|
|
990
990
|
function Yv(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=u(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=V(n,"AUDIO");var r=V(n,"VIDEO"),p=m||r;p&&(g.includes(p)||g.push(p),(n=V(n,"PATHWAY-ID"))&&f.set(p,n),m?h=!0:r&&(k=!0))}g.length&&c.length&&(l=c.filter(function(w){return g.includes(Bu(w,"GROUP-ID"))}),Uv(a,l,f));l=(f=g.sort().join(","))&&a.J.has(f)?a.J.get(f):[];h?e.audio.push.apply(e.audio,y(l)):k&&e.video.push.apply(e.video,y(l));m=!1;var t=b.map(function(w){return Bu(w,
|
|
991
|
-
"URI")});k=e.audio.find(function(w){return w&&w.ka().find(function(
|
|
991
|
+
"URI")});k=e.audio.find(function(w){return w&&w.ka().find(function(B){return t.includes(B)})});h=Nv(a,b[0]);r=Ec("video",h);(p=Ec("audio",h))&&!r?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&p&&r?(k="video",h=[[r,p].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var x=n=p=r=m=null;!l.length&&(c=c.find(function(w){var B=V(w,"URI")||"",v=V(w,"TYPE");w=Bu(w,"GROUP-ID");return"SUBTITLES"!=v&&""==B&&g.includes(w)}))&&(m=V(c,"LANGUAGE"),
|
|
992
992
|
r=V(c,"NAME"),p=$v(c),aw(c),n=V(c,"CHARACTERISTICS"),x=bw(c));a=cw(a,b,h,k,m,r,p,n,x);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
|
|
993
993
|
function Nv(a,b){var c=V(b,"CODECS")||"";b=V(b,"SUPPLEMENTAL-CODECS");a.aa=0<c.length;a.aa||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,y(b)));return Yu(a)}function $v(a){return(a=V(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
994
994
|
function bw(a){return(a=V(a,"SAMPLE-RATE"))?parseInt(a,10):null}function aw(a){return(a=V(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
@@ -1000,20 +1000,20 @@ m=n.next().value;n=n.next().value;(m=c.get(m))&&kt(a.j,l,m,n)}}c=V(h,"LANGUAGE")
|
|
|
1000
1000
|
function Sv(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(r){if(1==r.g){c=Bu(b,"URI");d=V(b,"CODECS","jpeg")||"";if(a.h.has(c))return r.return(a.h.get(c));e=V(b,"LANGUAGE");f=V(b,"NAME");g=V(b,"CHARACTERISTICS");h=Tv(a,a.A++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=V(b,"RESOLUTION"))?D(r,h.stream.createSegmentIndex(),3):r.D(2)}2!=r.g&&(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=Number(k.split("x")[1])*
|
|
1001
1001
|
Number(m.split("x")[1]));if(n=V(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return r.return(h)})}
|
|
1002
1002
|
function cw(a,b,c,d,e,f,g,h,k){for(var l=a.A++,m=[],n=u(b),r=n.next();!r.done;r=n.next()){var p=r.value;r=Bu(p,"URI");p=V(p,"PATHWAY-ID");a.j&&p&&kt(a.j,l,p,r);m.push(r)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=V(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.H.get(b);break a}if(!b&&a.H.size)for(b=u(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=Dc(d,c);d=Tv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
|
|
1003
|
-
function Tv(a,b,c,d,e,f,g,h,k,l,m,n,r,p){function t(C){var E,H,J,F,I,K,M,P,O,X,W,Y,Da,Ia,
|
|
1004
|
-
if(C.aborted)return Aa.return();O=P.stream;fv(a)&&!M&&Gv(a,F);v.
|
|
1005
|
-
Rv(Da.stream));e==X.Ca&&(Ia=O.segmentIndex.get(0))&&Ia.ua&&(w.mimeType="application/mp4",Rv(w));dw(a)&&(a.$a?Hv(a,[v]):(a.$a=!0,
|
|
1006
|
-
function(){if(
|
|
1003
|
+
function Tv(a,b,c,d,e,f,g,h,k,l,m,n,r,p){function t(C){var E,H,J,F,I,K,M,P,O,X,W,Y,Da,Ia,mb,Ka,ab;return L(function(Aa){switch(Aa.g){case 1:return E=v.ka(),D(Aa,dv(a,v.ka(),!0),2);case 2:H=Aa.h;if(C.aborted)return Aa.return();J=H.uri;J==H.originalUri||E.includes(J)||B.push(J);F=Pu(a.Fa,H.data);I=void 0;if(a.aa||!a.g.hls.disableCodecGuessing){Aa.D(3);break}return D(Aa,vv(a,F,x),4);case 4:K=Aa.h,I=K.mimeType,d=K.codecs;case 3:return M=fv(a),D(Aa,Ev(a,0,F,x,J,d,e,f,g,h,k,l,m,n,r,p,I),5);case 5:P=Aa.h;
|
|
1004
|
+
if(C.aborted)return Aa.return();O=P.stream;fv(a)&&!M&&Gv(a,F);v.Dc=P.Dc;v.Yb=P.Yb;v.qe=P.qe;v.pe=P.pe;v.Ld=P.Ld;v.Ie=P.Ie;v.Bb=P.Bb;v.Cb=P.Cb;v.kg=!0;w.segmentIndex=O.segmentIndex;w.encrypted=O.encrypted;w.drmInfos=O.drmInfos;w.keyIds=O.keyIds;w.mimeType=O.mimeType;w.bandwidth=w.bandwidth||O.bandwidth;w.codecs=w.codecs||O.codecs;Rv(w);w.drmInfos.length&&a.i.newDrmInfo(w);X=Ic;if(e==X.va||e==X.Z)for(W=u(a.h.values()),Y=W.next();!Y.done;Y=W.next())Da=Y.value,Da.kg||Da.type!=e||(Da.stream.mimeType=O.mimeType,
|
|
1005
|
+
Rv(Da.stream));e==X.Ca&&(Ia=O.segmentIndex.get(0))&&Ia.ua&&(w.mimeType="application/mp4",Rv(w));dw(a)&&(a.$a?Hv(a,[v]):(a.$a=!0,mb=Array.from(a.h.values()),Ka=mb.filter(function(sb){return sb.stream.segmentIndex}),Hv(a,Ka),kv(a),ab=a.m,0<ab&&a.u.V(ab)));G(Aa)}})}function x(){return a.j&&1<c.length?lt(a.j,b):B.concat(Ju([a.X],c,a.o))}var w=ew(a,d,e,f,g,h,k,l,m,n,r,p),B=[],v={stream:w,type:e,Fh:B,ka:x,Dc:0,Yb:0,Ie:new Map,qe:!1,pe:!1,Ld:!1,Ff:-1,Bb:-1,Cb:-1,kg:!1},A=null,z=new AbortController;w.createSegmentIndex=
|
|
1006
|
+
function(){if(A)return A;z=new AbortController;return A=new Promise(function(C){C(t(z.signal))})};w.closeSegmentIndex=function(){A&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);A=null};return v}function Mv(a){var b=Infinity;a=u(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Yb));return b}
|
|
1007
1007
|
function hv(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Tc(function(e){c.push(e)});a.l.Td(c)}function Hv(a,b){if(!fv(a))for(var c=Mv(a),d=u(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Sc(0,c);hv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?rv(a,b):(uv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&rv(a,b))}
|
|
1008
1008
|
function sv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function dw(a){if(!a.G)return!1;var b=[],c=[];a=u(a.G.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1009
|
-
function Ev(a,b,c,d,e,f,g,h,k,l,m,n,r,p,t,x,w){var
|
|
1010
|
-
sb.h;z=
|
|
1011
|
-
0);Ka=pv(
|
|
1009
|
+
function Ev(a,b,c,d,e,f,g,h,k,l,m,n,r,p,t,x,w){var B,v,A,z,C,E,H,J,F,I,K,M,P,O,X,W,Y,Da,Ia,mb,Ka,ab,Aa;return L(function(sb){switch(sb.g){case 1:if(1!=c.type)throw new R(2,4,4017);B=Eu(c.g,"EXT-X-DEFINE");v=mv(a,B,e);var Ib=Gu(c.g,"EXT-X-PLAYLIST-TYPE"),qb=Gu(c.g,"EXT-X-ENDLIST");qb=Ib&&"VOD"==Ib.value||qb;Ib=Ib&&"EVENT"==Ib.value&&!qb;Ib=!qb&&!Ib;qb?jv(a,cv):Ib?jv(a,Lv):jv(a,fw);fv(a)&&qv(a,c);if(w){sb.D(2);break}return D(sb,gw(a,g,f,c,v,d),3);case 3:w=sb.h;case 2:return D(sb,nv(a,c,w,d,v),4);case 4:A=
|
|
1010
|
+
sb.h;z=A.drmInfos;C=A.keyIds;E=A.encrypted;H=A.ki;if(E&&!z.length&&!H)throw new R(2,4,4026);J=ew(a,f,g,h,k,l,m,n,r,p,t,x);J.encrypted=E;J.drmInfos=z;J.keyIds=C;J.mimeType=w;Rv(J);F=fv(a)?a.L.get(g):new Map;I=ov(a,c,J,F,v,d,g);K=I.segments;if(M=I.bandwidth)J.bandwidth=M;fv(a)&&qv(a,c);P=K[0].startTime;O=K[K.length-1];X=O.endTime;W=new Mk(K);J.segmentIndex=W;Da=(Y=Gu(c.g,"EXT-X-SERVER-CONTROL"))?null!=Au(Y,"CAN-SKIP-UNTIL"):!1;Ia=Y?null!=Au(Y,"CAN-BLOCK-RELOAD"):!1;mb=Hu(c.g,"EXT-X-MEDIA-SEQUENCE",
|
|
1011
|
+
0);Ka=pv(mb,K);ab=Ka.Bb;Aa=Ka.Cb;return sb.return({stream:J,type:g,Fh:[],ka:d,Dc:P,Yb:X,qe:Da,pe:Ia,Ld:!1,Ff:-1,Bb:ab,Cb:Aa,Ie:F,kg:!1})}})}function pv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Bb:a,Cb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Bb:a,Cb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{Bb:a,Cb:c}}
|
|
1012
1012
|
function ew(a,b,c,d,e,f,g,h,k,l,m,n){var r=Pv(c,b)||Qv(c),p=[];if(k){k=u(k.split(","));for(var t=k.next();!t.done;t=k.next())p.push(t.value)}k=void 0;t=null;c==Gc?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(t="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");a={id:a.A++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1013
1013
|
segmentIndex:null,mimeType:r,codecs:b,kind:c==Gc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Mc(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:p,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:t,external:!1,fastSwitching:!1,fullMimeTypes:new Set};
|
|
1014
1014
|
Rv(a);return a}
|
|
1015
|
-
function nv(a,b,c,d,e){var f,g,h,k,l,m,n,r,p,t,x,w,
|
|
1016
|
-
!0;K=V(J,"KEYFORMAT")||"identity";M=null;if(Vv(I)){x=!0;Y.D(3);break}if("identity"!=K){M=(P=Wv[K])?P(J,c):null;Y.D(6);break}return D(Y,Xv(a,J,c,d,F,e),8);case 8:M=Y.h;case 6:if(M){if(M.keyIds)for(O=u(M.keyIds),X=O.next();!X.done;X=O.next())W=X.value,
|
|
1015
|
+
function nv(a,b,c,d,e){var f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J,F,I,K,M,P,O,X,W;return L(function(Y){switch(Y.g){case 1:f=new Map;if(b.segments)for(g=u(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Eu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Jv(a,b,k.g,d,e),n=u(l),r=n.next();!r.done;r=n.next())p=r.value,f.set(p,m);x=t=!1;w=[];B=new Set;v=u(f);A=v.next();case 2:if(A.done){Y.D(4);break}z=A.value;C=u(z);E=C.next().value;H=C.next().value;J=E;F=H;I=Bu(J,"METHOD");if("NONE"==I){Y.D(3);break}t=
|
|
1016
|
+
!0;K=V(J,"KEYFORMAT")||"identity";M=null;if(Vv(I)){x=!0;Y.D(3);break}if("identity"!=K){M=(P=Wv[K])?P(J,c):null;Y.D(6);break}return D(Y,Xv(a,J,c,d,F,e),8);case 8:M=Y.h;case 6:if(M){if(M.keyIds)for(O=u(M.keyIds),X=O.next();!X.done;X=O.next())W=X.value,B.add(W);w.push(M)}case 3:A=v.next();Y.D(2);break;case 4:return Y.return({drmInfos:w,keyIds:B,encrypted:t,ki:x})}})}
|
|
1017
1017
|
function hw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new R(2,4,4042);var f=0,g=V(b,"IV","");if(g){var h=xc(g.substr(2));if(16!=h.byteLength)throw new R(2,4,4048);}else f=Hu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.Y.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Bu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1018
1018
|
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,r,p,t,x;return L(function(w){if(1==w.g)return l=Iu(d(),Bu(b,"URI"),e),m=l.sort().join(""),a.$.has(m)||(n=rg(l,a.g.retryParameters),r=Kv(a,n,6),a.$.set(m,r)),D(w,a.$.get(m),2);if(3!=w.g){p=w.h;if(!p.data||p.data.byteLength!=k.bitsKey/8)throw new R(2,4,4049);t={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};x=k;return D(w,window.crypto.subtle.importKey("raw",p.data,t,!0,["decrypt"]),3)}x.cryptoKey=w.h;k.fetchKey=void 0;
|
|
1019
1019
|
G(w)})};a.Y.set(c,k)}return a.Y.get(c)}
|
|
@@ -1022,26 +1022,26 @@ Au(b,"HOLD-BACK"):null,a.qa=c?Number(c.value):0);a.Ja=Math.max(d,a.Ja)}function
|
|
|
1022
1022
|
function Jv(a,b,c,d,e){var f=Gu(c,"EXT-X-MAP");if(!f)return null;var g=Bu(f,"URI"),h=Iu(d(),g,e);g=[h.toString(),V(f,"BYTERANGE","")].join("-");if(!a.S.has(g)){var k=void 0,l=null;c=u(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Vv(Bu(m,"METHOD"))&&m.id<f.id&&(k=hw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=iw(h,f,l,k);a.S.set(g,b)}return a.S.get(g)}
|
|
1023
1023
|
function iw(a,b,c,d){var e=0,f=null;b=V(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new yi(function(){return a},e,f,null,null,null,d)}
|
|
1024
1024
|
function jw(a,b,c,d,e,f,g,h,k){var l=d.g,m=Gu(l,"EXTINF"),n=0,r=0,p=null;d.Ob.length&&!a.F&&Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var t=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=Gu(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(t=kh(x.value))}var w=Bi;Gu(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.Ob.length)throw new R(2,4,4024,"EXTINF");
|
|
1025
|
-
if(!a.F)return null}var
|
|
1026
|
-
(P=V(J,"BYTERANGE"),O=u(kw(F,P)),P=O.next().value,O=O.next().value);E.ge=V(J,"URI");if(E.ge){F=Bi;"YES"==V(J,"GAP")&&(F=2,
|
|
1027
|
-
1].endTime;else return null;x&&(
|
|
1025
|
+
if(!a.F)return null}var B=[];x=!1;var v=null,A=!1,z=!1;if(a.F&&d.Ob.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=t,E={},H=0;H<d.Ob.length;E={vd:E.vd,ge:E.ge},H++){var J=d.Ob[H],F=0==H?c:B[B.length-1],I=0==H?e:F.endTime,K=Number(V(J,"DURATION"))||a.M;if(K){var M=I+K,P=0,O=null;"EXT-X-PRELOAD-HINT"==J.name?(P=(P=V(J,"BYTERANGE-START"))?Number(P):0,(F=V(J,"BYTERANGE-LENGTH"))?O=P+Number(F)-1:P&&(O=Number.MAX_SAFE_INTEGER)):
|
|
1026
|
+
(P=V(J,"BYTERANGE"),O=u(kw(F,P)),P=O.next().value,O=O.next().value);E.ge=V(J,"URI");if(E.ge){F=Bi;"YES"==V(J,"GAP")&&(F=2,A=!0);E.vd=null;var X=function(Y){return function(){null==Y.vd&&(Y.vd=Iu(h(),Y.ge,f));return Y.vd}}(E);n&&0<=P&&null!=O&&(v=X,x=!0);I=new Ai(I,M,X,P,O,b,0,0,Infinity,[],"",null,C,F,k);"EXT-X-PRELOAD-HINT"==J.name&&(I.lg(),z=!0);"YES"!=V(J,"INDEPENDENT")&&0<H&&I.He();B.push(I);C&&(C+=K)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(B.length)n=B[B.length-
|
|
1027
|
+
1].endTime;else return null;x&&(A||0!=B[0].Ta?(x=!1,v=null):B=[]);(m=Gu(l,"EXT-X-BYTERANGE"))?(p=u(kw(c,m.value)),r=p.next().value,p=p.next().value):B.length&&(r=B[0].Ta,p=B[B.length-1].za);c="";m=null;"image"==g.type&&(c="1x1",g=Gu(l,"EXT-X-TILES"))&&(c=Bu(g,"LAYOUT"),(g=V(g,"DURATION"))&&(m=Number(g)));var W=null;b=new Ai(e,n,function(){if(v)return v();null==W&&(W=Iu(h(),d.h,f));return W||[]},r,p,b,0,0,Infinity,B,c,m,t,w,k,0<B.length&&!!d.h);x&&(a.Za=!0,b.xh(),z&&b.lg());return b}
|
|
1028
1028
|
function kw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.za+1,d=c+b-1);return[c,d]}
|
|
1029
|
-
function ov(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=Hu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=Hu(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=Gu(b.g,"EXT-X-SKIP"),r=n?Number(V(n,"SKIPPED-SEGMENTS")):0,p=m+r,t=0;fv(a)&&d.has(p)&&(t=d.get(p));0===t&&a.oa==Lv&&0<d.size&&!d.has(p)&&(t=a.l.Lb());var x=[],w=null;n=[];for(var
|
|
1030
|
-
k=hw(a,C,b,f,e):k=void 0);d.set(p,
|
|
1029
|
+
function ov(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=Hu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=Hu(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=Gu(b.g,"EXT-X-SKIP"),r=n?Number(V(n,"SKIPPED-SEGMENTS")):0,p=m+r,t=0;fv(a)&&d.has(p)&&(t=d.get(p));0===t&&a.oa==Lv&&0<d.size&&!d.has(p)&&(t=a.l.Lb());var x=[],w=null;n=[];for(var B=0;B<h.length;B++){var v=h[B],A=0==B?t:w.endTime;p=m+r+B;Gu(v.g,"EXT-X-DISCONTINUITY")&&l++;var z=u(v.g);for(var C=z.next();!C.done;C=z.next())C=C.value,"EXT-X-KEY"==C.name&&(Vv(Bu(C,"METHOD"))?
|
|
1030
|
+
k=hw(a,C,b,f,e):k=void 0);d.set(p,A);z=Jv(a,b,v.g,f,e);!a.F&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.F=a.i.isLowLatencyMode());if(A=jw(a,z,w,v,A,e,c,f,k))(w=Hu(v.g,"EXT-X-BITRATE"))?n.push({bitrate:w,duration:A.endTime-A.startTime}):n.length&&(w=n.pop(),w.duration+=A.endTime-A.startTime,n.push(w)),w=A,A.j=l,sv(a,g)&&null!=a.K&&p<a.K||x.push(A)}b=void 0;n.length&&(b=n.reduce(function(E,H){return E+H.duration},0),b=Math.round(n.reduce(function(E,H){return E+H.bitrate*H.duration},0)/
|
|
1031
1031
|
b*1E3));if(n=x.some(function(E){return null!=E.h}))for(c={},d=0;d<x.length;c={nd:c.nd,md:c.md,ae:c.ae,bc:c.bc,jd:c.jd},d++)if(c.bc=x[d],null==c.bc.h)for(c.md=0,c.nd=d,e=function(E){return function(){var H=x[E.nd];if(H){if(null!=H.h)return H.h+E.md;E.md-=H.endTime-H.startTime;E.nd+=1}return null}}(c),c.jd=0,c.ae=d,f=function(E){return function(){var H=x[E.ae];if(H){H!=E.bc&&(E.jd+=H.endTime-H.startTime);if(null!=H.h)return H.h+E.jd;--E.ae}return null}}(c);null==c.bc.h;)c.bc.h=f(),null==c.bc.h&&(c.bc.h=
|
|
1032
1032
|
e());if(n)for(c=u(x),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=u(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.P;if(n&&Infinity!=c&&!sv(a,g))for(a=u(x),d=a.next();!d.done;d=a.next())d.value.Jg(c);return{segments:x,bandwidth:b}}function Pv(a,b){if(a==Gc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
|
|
1033
1033
|
function Qv(a){return a==Gc?"text/vtt":lw[a].mp4}
|
|
1034
|
-
function gw(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,
|
|
1035
|
-
Kv(a,x,g,{type:t}),6);case 6:v=
|
|
1034
|
+
function gw(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,B,v;return L(function(A){switch(A.g){case 1:g=xg;h=Math.trunc((d.segments.length-1)/2);k=Iu(f(),d.segments[h].h,e);l=new ib(k[0]);m=l.jb.split(".").pop();n=lw[b];if((r=n[m])||(r=Iv[m])||(r=Pv(b,c)))return A.return(r);t=1;x=rg(k,a.g.retryParameters);ra(A,2);x.method="HEAD";return D(A,Kv(a,x,g,{type:t}),4);case 4:w=A.h;p=w.headers["content-type"];ta(A,3);break;case 2:B=ua(A);if(!B||1002!=B.code&&1001!=B.code){A.D(3);break}x.method="GET";return D(A,
|
|
1035
|
+
Kv(a,x,g,{type:t}),6);case 6:v=A.h,p=v.headers["content-type"];case 3:return p?A.return(p.split(";")[0]):A.return(Qv(b))}})}function Fv(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function dv(a,b,c){return Kv(a,rg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1036
1036
|
function bv(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return D(h,a.update(),4);case 4:c=Date.now();fv(a)&&(d=(c-b)/1E3,a.Ua.sample(1,d),e=a.m,f=Math.max(0,e-ad(a.Ua)),a.u.V(f));ta(h,3);break;case 2:g=ua(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.u.V(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();G(h)}})}
|
|
1037
1037
|
function fv(a){return a.oa!=cv}function jv(a,b){a.oa=b;a.l&&a.l.gd(!fv(a));fv(a)||a.u.stop()}function Kv(a,b,c,d){if(!a.O)throw new R(2,7,7001);b=a.i.networkingEngine.request(c,b,d);mg(a.O,b);return b.promise}function Vv(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1038
|
-
function Xv(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,
|
|
1039
|
-
r));return D(C,a.sa.get(m),3);case 3:p=C.h,l=yc(p.data);case 2:t="00000000000000000000000000000000";if(!e){C.D(4);break}if(a.ma.has(e)){x=a.ma.get(e);C.D(5);break}w=pl(e.ka(),e.Mb(),e.Jb(),a.g.retryParameters);
|
|
1038
|
+
function Xv(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,B,v,A,z;return L(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new R(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new R(2,4,4041);g=Bu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=Iu(d(),Bu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=yc(wc(k[0].split("data:text/plain;base64,").pop()));C.D(2);break}m=k.sort().join("");a.sa.has(m)||(n=rg(k,a.g.retryParameters),r=Kv(a,n,6),a.sa.set(m,
|
|
1039
|
+
r));return D(C,a.sa.get(m),3);case 3:p=C.h,l=yc(p.data);case 2:t="00000000000000000000000000000000";if(!e){C.D(4);break}if(a.ma.has(e)){x=a.ma.get(e);C.D(5);break}w=pl(e.ka(),e.Mb(),e.Jb(),a.g.retryParameters);B=xg;return D(C,Kv(a,w,B,{type:0}),6);case 6:v=C.h,x=$u(v.data),a.ma.set(e,x);case 5:x&&(t=x);case 4:return A=new Map,A.set(t,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),C.return(Cc(A,z))}})}N("shaka.hls.HlsParser",av);
|
|
1040
1040
|
var Iv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},lw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
1041
1041
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Wv={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new R(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new R(2,4,4041);a=Bu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Bc("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
|
|
1042
1042
|
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Bu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Bu(a,"URI");b=Vu(b);b=Fb(b.data);c=Bc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=V(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Bu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
|
|
1043
|
-
b&&(c="cbcs");a=Bu(a,"URI");a=Vu(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Sg(a,b,new Set,0);return Bc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},cv="VOD",fw="EVENT",Lv="LIVE",iv={ei:cv,Ak:fw,Ik:Lv};ti["application/x-mpegurl"]=function(){return new av};ti["application/vnd.apple.mpegurl"]=function(){return new av};function mw(a){var b=0,c=Kb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function nw(a){if(a=
|
|
1044
|
-
function
|
|
1043
|
+
b&&(c="cbcs");a=Bu(a,"URI");a=Vu(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Sg(a,b,new Set,0);return Bc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},cv="VOD",fw="EVENT",Lv="LIVE",iv={ei:cv,Ak:fw,Ik:Lv};ti["application/x-mpegurl"]=function(){return new av};ti["application/vnd.apple.mpegurl"]=function(){return new av};function mw(a){var b=0,c=Kb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function nw(a){if(a=ow(a))a:{a=u(dh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=eh(b.value,"LA_URL")){a=bh(b);break a}a=""}else a="";return a}
|
|
1044
|
+
function ow(a){a=wc(bh(a));a=mw(a).filter(function(b){return b.type===Bw})[0];if(!a)return null;a=mc(a.value,!0);return(a=Ug(a,"WRMHEADER"))?a:null}var Bw=1,Cw=(new Map).set("com.microsoft.playready",nw).set("com.microsoft.playready.recommendation",nw).set("com.microsoft.playready.software",nw).set("com.microsoft.playready.hardware",nw);function Dw(a){if(!Ew){Ew=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Fw=Gw("ftyp",b,d,b,c);b=Gw("dref",Hw);Iw=Gw("dinf",b)}this.g=a}
|
|
1045
1045
|
function Jw(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Gw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Kw+1));m=Math.floor(m%(Kw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Lw(h,4)),[0,0,0,0],y(Lw(n,4)),y(Lw(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(Lw(k,2)),[0,0],y(Lw(l,
|
|
1046
1046
|
2)),[0,0]));h=Gw("tkhd",h);k=Gw;n=g.duration*g.timescale;l=Math.floor(n/(Kw+1));n=Math.floor(n%(Kw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Lw(g.timescale,4)),y(Lw(l,4)),y(Lw(n,4)),y(Lw(m,2)),[0,0]));l=Gw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Mw;break;case "audio":m=Nw}n=Gw("hdlr",m);a:{switch(g.type){case "video":g=Gw("minf",Gw("vmhd",Ow),Iw,Pw(g));break a;
|
|
1047
1047
|
case "audio":g=Gw("minf",Gw("smhd",Qw),Iw,Pw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=zc.apply(tc,y(b));f=a.g[0];c=Gw;d=f.duration*f.timescale;e=Math.floor(d/(Kw+1));d=Math.floor(d%(Kw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Lw(f.timescale,4)),y(Lw(e,4)),y(Lw(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
@@ -1056,7 +1056,7 @@ a=Gw(d,Uw(a),c,e)}c=a}a=Gw("stsd",Vw,c);return b("stbl",a,Gw("stts",Ww),Gw("stsc
|
|
|
1056
1056
|
function Tw(a){var b=Gw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(y(Lw(d,4))));c=Gw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Gw("schm",d);e=Gw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=u(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=u(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Rw(h.value)}a=new Uint8Array([0,
|
|
1057
1057
|
0,0,0,0,0,1,8]);f=Gw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1058
1058
|
function $w(a){var b=[];a=u(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Gw;var g=new Uint8Array([0,0,0,0].concat(y(Lw(c.data?c.data.Db:0,4))));g=Gw("mfhd",g);var h;var k=c.data?c.data.ob:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.eb<<4|m.hb<<2|m.gb}k=Gw("sdtp",l);var n=k.length+92;l=Gw;h=new Uint8Array([0,0,0,58].concat(y(Lw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Gw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1059
|
-
0;var r=Math.floor(m%(Kw+1));m=new Uint8Array([1,0,0,0].concat(y(Lw(Math.floor(m/(Kw+1)),4)),y(Lw(r,4))));m=Gw("tfdt",m);var p=n;n=c.data?c.data.ob:[];r=n.length;var t=12+16*r,x=new Uint8Array(t);p+=8+t;x.set(["video"===c.type?1:0,0,15,1].concat(y(Lw(r,4)),y(Lw(p,4))),0);for(p=0;p<r;p++){var w=n[p];t=Lw(w.duration,4);var
|
|
1059
|
+
0;var r=Math.floor(m%(Kw+1));m=new Uint8Array([1,0,0,0].concat(y(Lw(Math.floor(m/(Kw+1)),4)),y(Lw(r,4))));m=Gw("tfdt",m);var p=n;n=c.data?c.data.ob:[];r=n.length;var t=12+16*r,x=new Uint8Array(t);p+=8+t;x.set(["video"===c.type?1:0,0,15,1].concat(y(Lw(r,4)),y(Lw(p,4))),0);for(p=0;p<r;p++){var w=n[p];t=Lw(w.duration,4);var B=Lw(w.size,4),v=w.flags;w=Lw(w.qb,4);x.set([].concat(y(t),y(B),[v.sb<<2|v.eb,v.hb<<6|v.gb<<4|v.ub,v.cb&61440,v.cb&15],y(w)),12+16*p)}n=Gw("trun",x);k=l("traf",h,m,n,k);f=f("moof",
|
|
1060
1060
|
g,k);e.call(d,b,[f,ax(c)])}return zc.apply(tc,y(b))}function ax(a){a=(a.data?a.data.ob:[]).map(function(b){return b.data});a=zc.apply(tc,y(a));return Gw("mdat",a)}function Lw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Rw(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
1061
1061
|
function Gw(a){var b=Fa.apply(1,arguments),c=bx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],bx[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
1062
1062
|
var Ew=!1,Kw=Math.pow(2,32)-1,bx={},Mw=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Nw=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Ww=new Uint8Array([0,0,0,0,0,0,0,0]),Xw=new Uint8Array([0,0,0,0,0,0,0,0]),Zw=new Uint8Array([0,0,0,0,0,0,0,0]),Yw=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ow=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Qw=new Uint8Array([0,
|
|
@@ -1065,23 +1065,23 @@ function dx(a){var b;L(function(c){switch(c.g){case 1:return ra(c,2),D(c,ex(a),4
|
|
|
1065
1065
|
q.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),D(c,ex(a),4);if(2!=c.g)return ta(c,0);b=ua(c);if(!a.h||!b)return c.return();a.h.onError(b);G(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};
|
|
1066
1066
|
function ex(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=rg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),mg(a.A,e),D(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=im){ld("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Xt(m,"SmoothStreamingMedia");if(!m)throw new R(2,4,4046,
|
|
1067
1067
|
l);n(m);m=pc(m.outerHTML)}var r=Tg(m,"SmoothStreamingMedia");if(!r)throw new R(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=jm&&l(r);a.i||(a.i=new qk(null,0));if(l=hh(r,"IsLive",th,!1))throw new R(2,4,4047);a.i.gd(!l);n=hh(r,"TimeScale",rh,1E7);m=hh(r,"DVRWindowLength",rh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=hh(r,"CanSeek",th,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.$e(p);m=hh(r,
|
|
1068
|
-
"Duration",rh,Infinity);l||a.i.xb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=ah(r,"Protection");var t;n=a.g.mss.keySystemsBySystemId;m=[];p=u(p);for(t=p.next();!t.done;t=p.next())m=m.concat(ah(t.value,"ProtectionHeader"));if(m.length){p=[];for(t=0;t<m.length;t++){var x=m[t],w=x.attributes.SystemID.toLowerCase(),
|
|
1069
|
-
v[4],v[7],v[6]].concat(y(v.slice(8))));v=yc(v);break a}v=null}else v=null;
|
|
1070
|
-
hh(H,"d",rh);H=hh(H,"r",ph);if(!I)break;F=null!=F?F:C;H=H||0;if(0>H)if(J){J=hh(J,"t",rh);if(null==J)break;else if(F>=J)break;H=Math.ceil((J-F)/I)-1}else{if(Infinity==v)break;else if(F/w>=v)break;H=Math.ceil((v*w-F)/I)-1}for(J=0;J<=H;++J)C=F+I,z.push({start:F/w,end:C/w,Og:F}),F=C}w=z;
|
|
1071
|
-
p:[null]);for(t=p.next();!t.done;t=p.next())for(t=t.value,x=u(0<n.length?n:[null]),v=x.next();!v.done;v=x.next())
|
|
1068
|
+
"Duration",rh,Infinity);l||a.i.xb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=ah(r,"Protection");var t;n=a.g.mss.keySystemsBySystemId;m=[];p=u(p);for(t=p.next();!t.done;t=p.next())m=m.concat(ah(t.value,"ProtectionHeader"));if(m.length){p=[];for(t=0;t<m.length;t++){var x=m[t],w=x.attributes.SystemID.toLowerCase(),B=n[w];if(B){var v=ow(x);if(v)a:{v=u(dh(v,"DATA"));for(var A=v.next();!A.done;A=v.next())if(A=eh(A.value,"KID")){v=wc(bh(A));v=new Uint8Array([v[3],v[2],v[1],v[0],v[5],
|
|
1069
|
+
v[4],v[7],v[6]].concat(y(v.slice(8))));v=yc(v);break a}v=null}else v=null;A=wc(bh(x));w=xc(w.replace(/-/g,""));w=[{initData:Sg(A,w,new Set,0),initDataType:"cenc",keyId:v}];w=Bc(B,"cenc",w);v&&w.keyIds.add(v);if(B=Cw.get(B))w.licenseServerUri=B(x);p.push(w)}}n=p}else n=[];t=n;p=[];n=[];m=[];r=ah(r,"StreamIndex");r=u(r);for(x=r.next();!x.done;x=r.next()){x=x.value;B=ah(x,"QualityLevel");w=l.timescale;v=l.duration;A=ah(x,"c");for(var z=[],C=0,E=0;E<A.length;++E){var H=A[E],J=A[E+1],F=hh(H,"t",rh),I=
|
|
1070
|
+
hh(H,"d",rh);H=hh(H,"r",ph);if(!I)break;F=null!=F?F:C;H=H||0;if(0>H)if(J){J=hh(J,"t",rh);if(null==J)break;else if(F>=J)break;H=Math.ceil((J-F)/I)-1}else{if(Infinity==v)break;else if(F/w>=v)break;H=Math.ceil((v*w-F)/I)-1}for(J=0;J<=H;++J)C=F+I,z.push({start:F/w,end:C/w,Og:F}),F=C}w=z;B=u(B);for(v=B.next();!v.done;v=B.next())(v=fx(a,x,v.value,w,t,l))&&("audio"!=v.type||a.g.disableAudio?"video"!=v.type||a.g.disableVideo?v.type!=Gc||a.g.disableText||m.push(v):n.push(v):p.push(v))}r=[];p=u(0<p.length?
|
|
1071
|
+
p:[null]);for(t=p.next();!t.done;t=p.next())for(t=t.value,x=u(0<n.length?n:[null]),v=x.next();!v.done;v=x.next())B=r,w=B.push,v=v.value,A=0,t&&t.bandwidth&&0<t.bandwidth&&(A+=t.bandwidth),v&&v.bandwidth&&0<v.bandwidth&&(A+=v.bandwidth),v={id:a.u++,language:t?t.language:"und",disabledUntilTime:0,primary:!!t&&t.primary||!!v&&v.primary,audio:t,video:v,bandwidth:A,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(B,v);l.variants=r;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
|
|
1072
1072
|
l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null},a.i.Ge());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.F.sample(1,h);G(k)})}
|
|
1073
1073
|
function fx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Ua("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=hh(c,"Bitrate",qh),m=hh(c,"MaxWidth",qh),n=hh(c,"MaxHeight",qh),r=hh(c,"Channels",qh),p=hh(c,"SamplingRate",qh),t=f.duration;d.length&&(t=d[d.length-1].end-d[0].start);var x=a.i.getDuration();a.i.xb(Math.min(t,x));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1074
1074
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Mc(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:r,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],
|
|
1075
1075
|
mssPrivateData:{duration:t,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=gx[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Ua('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!hx.includes(e.toUpperCase()))return Ua("Codec not supported:",
|
|
1076
1076
|
e),null;c=ix(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=jx(e,c);break;case "video":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=kx(c);break;case "text":if(w.type=Gc,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(ie(w.mimeType,w.codecs));
|
|
1077
|
-
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var
|
|
1078
|
-
|
|
1077
|
+
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var B=a.m.get(w.id);else B=[],"video"==w.type&&(B=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),B={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,pb:B,wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:null,stream:w},B=Jw(new Dw([B])),a.m.set(w.id,B);B=lx(a,new yi(function(){return[]},0,null,null,void 0,
|
|
1078
|
+
B),w,b,d);w.segmentIndex=new Mk(B);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1079
1079
|
function ix(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1080
1080
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function jx(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function kx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1081
1081
|
function lx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=u(e);for(var h=e.next();!h.done;g={ud:g.ud},h=e.next())g.ud=h.value,d.push(new Ai(g.ud.start,g.ud.end,function(k){return function(){return Ac(a.l,[f.replace("{start time}",String(k.ud.Og))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}N("shaka.mss.MssParser",cx);var hx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),gx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1082
1082
|
ti["application/vnd.ms-sstr+xml"]=function(){return new cx};function mx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=oc(b)}catch(g){}throw new R(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function nx(){}function ox(a,b,c,d,e){var f=new px;Bg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new qx,h={Zg:!1,Wh:!1};a=rx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new eg(a,function(){h.Zg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Ob(function(){h.Wh=!0;g.abort()});k.V(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1083
|
-
function rx(a,b,c,d,e,f,g){var h,k,l,m,n,r,p,t,x,w,
|
|
1084
|
-
H.value.byteLength;if(!g){F.D(5);break}return D(F,g(H.value),5);case 5:J=Date.now();if(100<J-p||H.done)e(J-p,n-r,w-n),r=n,p=J;H.done?C.close():(C.enqueue(H.value),E());G(F)}})}E()};new k({start:
|
|
1083
|
+
function rx(a,b,c,d,e,f,g){var h,k,l,m,n,r,p,t,x,w,B,v,A;return L(function(z){switch(z.g){case 1:return h=sx,k=tx,r=n=0,p=Date.now(),ra(z,2),D(z,h(a,c),4);case 4:l=z.h;f(ux(l.headers));if("HEAD"==c.method){z.D(5);break}t=l.clone().body.getReader();w=(x=l.headers.get("Content-Length"))?parseInt(x,10):0;B=function(C){function E(){var H,J;return L(function(F){switch(F.g){case 1:return ra(F,2),D(F,t.read(),4);case 4:H=F.h;ta(F,3);break;case 2:return ua(F),F.return();case 3:if(H.done){F.D(5);break}n+=
|
|
1084
|
+
H.value.byteLength;if(!g){F.D(5);break}return D(F,g(H.value),5);case 5:J=Date.now();if(100<J-p||H.done)e(J-p,n-r,w-n),r=n,p=J;H.done?C.close():(C.enqueue(H.value),E());G(F)}})}E()};new k({start:B});return D(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:ta(z,3);break;case 2:v=ua(z);if(d.Zg)throw new R(1,1,7001,a,b);if(d.Wh)throw new R(1,1,1003,a,b);throw new R(1,1,1002,a,v,b);case 3:return A=ux(l.headers),z.return(mx(A,m,l.status,a,l.url,b))}})}
|
|
1085
1085
|
function ux(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function vx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",nx);nx.isSupported=vx;nx.parse=ox;var sx=window.fetch,qx=window.AbortController,tx=window.ReadableStream,px=window.Headers;
|
|
1086
1086
|
vx()&&(og("http",ox,2,!0),og("https",ox,2,!0),og("blob",ox,2,!0));function wx(){}
|
|
1087
1087
|
function xx(a,b,c,d,e){var f=new yx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new R(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=zx(f);e(p);n=!0}};f.onload=function(){var p=zx(f),t=f.response;try{var x=mx(p,t,f.status,a,f.responseURL,c);l(x)}catch(w){m(w)}};f.onerror=function(p){m(new R(1,1,1002,a,p,
|
|
@@ -1130,20 +1130,20 @@ q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m
|
|
|
1130
1130
|
q.onInitialVariantChosen=function(){};q.banLocation=function(){};ti["application/x-offline-manifest"]=function(){return new wy};function xy(){}function yy(a){var b=py(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=hg(a)):a=b&&"segment"==b.g?zy(b.key(),b):fg(new R(2,1,9004,a));return a}
|
|
1131
1131
|
function zy(a,b){var c=new Wx;return hg(void 0).Ma(function(){return c.init()}).Ma(function(){return $x(c,b.Ab(),b.Va())}).Ma(function(d){return d.getSegments([b.key()])}).Ma(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}N("shaka.offline.OfflineScheme",xy);xy.plugin=yy;og("offline",yy);function Ay(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),r=n.next();!r.done;r=n.next()){r=r.value;for(var p=!1,t=u(m),x=t.next();!x.done;x=t.next())if(x=x.value,By(x.info,r)){x.sessionIds.push(r.sessionId);p=!0;break}p||m.push({info:r,sessionIds:[r.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=Cy(a,b,g);return D(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l.return(d)}})}
|
|
1132
1132
|
function Cy(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new wh({Zb:b,onError:function(){},Pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),D(f,Eh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return ua(f),D(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],D(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==
|
|
1133
|
-
h.g)return ra(h,2),D(h,Qh(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);ua(h);G(h)})})),6);case 6:return D(f,d.destroy(),7);case 7:return f.return(e)}})}function By(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&
|
|
1133
|
+
h.g)return ra(h,2),D(h,Qh(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);ua(h);G(h)})})),6);case 6:return D(f,d.destroy(),7);case 7:return f.return(e)}})}function By(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&xd(a.audioCapabilities,b.audioCapabilities,c)&&xd(a.videoCapabilities,b.videoCapabilities,c)};function Dy(a,b,c){var d=b.presentationTimeline.getDuration();b=Ey(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Fy(a,b){var c=ry(new qy(a.Ab(),a.Va()),b),d=b.appMetadata||{};c=Ey(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
1134
1134
|
function Ey(a){var b=[],c=tf(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(kf(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(lf(c.value));return b};function Gy(){this.g={}}function Hy(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Iy(a,b){a.g[b.id]=b.bandwidth||2048}function Jy(a,b){a=a.g[b];null==a&&(a=0);return a};function Ky(a){var b=this;if(a&&a.constructor!=U)throw new R(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.fc()):(this.h=hm(),this.g=new ng);this.i=[];this.j=[];var c=!a;this.l=new zg(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return D(k,Promise.all(b.j.map(function(l){return Gx(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return D(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return D(k,b.g.destroy(),4);
|
|
1135
1135
|
case 4:b.h=null,b.g=null,G(k)}})})}function Ly(){if(Pb())a:{var a=u(Xx.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=Ky.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=$l(a,b));return lm(this.h,a)};q.getConfiguration=function(){var a=hm();lm(a,this.h,hm());return a};q.fc=function(){return this.g};
|
|
1136
1136
|
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Fx(this.g);this.j.push(f);b=My(this,a,b||{},function(){var g;return L(function(h){if(1==h.g)return c?h.D(2):D(h,Fm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=si(a,c||null);return h.return(g())})},e,f);b=new eg(b,function(){return Gx(f)});b.finally(function(){wd(d.j,f)});return Ny(this,b)};
|
|
1137
|
-
function My(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,
|
|
1138
|
-
r,b,c,e,f),x=t.wj,w=t.Lg,D(z,l.Va.addManifests([x]),11);case 11:
|
|
1139
|
-
Vy(m),19);case 19:throw n||
|
|
1140
|
-
function Ty(a,b,c,d,e,f,g,h,k){var l,m,n,r,p,t,x,w,
|
|
1141
|
-
2)}if(!C)return P.D(0);Qy(a);Uy(h,d,k,f);return D(P,g.updateManifest(c,d),0)})};r=!1;ra(
|
|
1142
|
-
v=Object.values(l),D(
|
|
1143
|
-
function Yy(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w;return L(function(
|
|
1144
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return D(
|
|
1145
|
-
function Ry(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
1146
|
-
t=u(a.imageStreams);for(x=t.next();!x.done;x=t.next())w=x.value,e.push(mf(w));return D(X,c.offline.trackSelectionCallback(e),3);case 3:
|
|
1137
|
+
function My(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w,B,v,A;return L(function(z){switch(z.g){case 1:return Oy(),h=g=null,k=new Wx,n=m=l=null,ra(z,2,3),D(z,d(),5);case 5:return g=z.h,D(z,Py(a,b,g,e),6);case 6:r=z.h;Qy(a);p=!r.presentationTimeline.U()&&!r.presentationTimeline.Ac();if(!p)throw new R(2,9,9005,b);return D(z,a.Rc(r,function(C){n=n||C},e),7);case 7:h=z.h;Qy(a);if(n)throw n;return D(z,Ry(r,h,e),8);case 8:return D(z,k.init(),9);case 9:return Qy(a),D(z,Yx(k),10);case 10:return l=z.h,Qy(a),t=Sy(h,
|
|
1138
|
+
r,b,c,e,f),x=t.wj,w=t.Lg,D(z,l.Va.addManifests([x]),11);case 11:B=z.h;Qy(a);m=B[0];Qy(a);if(n)throw n;return D(z,Ty(a,w,m,x,f,e,l.Va,r,h),12);case 12:return Qy(a),Uy(r,x,h,e),D(z,l.Va.updateManifest(m,x),13);case 13:return Qy(a),v=new oy("manifest",l.path.Ab,l.path.Va,m),z.return(Fy(v,x));case 3:return va(z),D(z,k.destroy(),14);case 14:if(!g){z.D(15);break}return D(z,g.stop(),15);case 15:if(!h){z.D(17);break}return D(z,h.destroy(),17);case 17:wa(z,0);break;case 2:A=ua(z);if(null==m){z.D(19);break}return D(z,
|
|
1139
|
+
Vy(m),19);case 19:throw n||A;}})}
|
|
1140
|
+
function Ty(a,b,c,d,e,f,g,h,k){var l,m,n,r,p,t,x,w,B,v;return L(function(A){switch(A.g){case 1:l={};m=0;n=function(z,C){var E,H,J,F,I,K,M;return L(function(P){if(1==P.g){E={};H=u(z);for(J=H.next();!J.done;E={qc:E.qc},J=H.next())E.qc=J.value,F=Cx(E.qc,f),I=E.qc.i,K=E.qc.h,M=function(O){return function(X){var W,Y,Da;return L(function(Ia){if(1==Ia.g)return D(Ia,g.addSegments([{data:X}]),2);W=Ia.h;Qy(a);Y=O.qc.g;Da=Bx(Y);l[Da]=W[0];m+=X.byteLength;G(Ia)})}}(E),Ix(e,E.qc.groupId,F,I,K,M);return D(P,Kx(e),
|
|
1141
|
+
2)}if(!C)return P.D(0);Qy(a);Uy(h,d,k,f);return D(P,g.updateManifest(c,d),0)})};r=!1;ra(A,2);if(!Wy(h)||!r||Xy(h)){A.D(4);break}return D(A,n(b.filter(function(z){return z.h}),!0),5);case 5:return Qy(a),b=b.filter(function(z){return!z.h}),p=l,t=m,l={},m=0,D(A,Yy(g,c,d,p,t,function(){return Qy(a)}),6);case 6:Qy(a);case 4:if(r){A.D(7);break}return D(A,n(b,!1),8);case 8:return Qy(a),x=l,w=m,l={},m=0,D(A,Yy(g,c,d,x,w,function(){return Qy(a)}),9);case 9:Qy(a);case 7:ta(A,0);break;case 2:return B=ua(A),
|
|
1142
|
+
v=Object.values(l),D(A,g.removeSegments(v,function(){}),10);case 10:throw B;}})}function Vy(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new Wx,D(f,b.init(),2);case 2:return D(f,Yx(b),3);case 3:return c=f.h,d=new oy("manifest",c.path.Ab,c.path.Va,a),D(f,b.destroy(),4);case 4:return e=new Ky,D(f,e.remove(d.toString()),0)}})}
|
|
1143
|
+
function Yy(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,x,w;return L(function(B){switch(B.g){case 1:g=!1;ra(B,2);h=!0;k=u(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=u(m.segments),r=n.next();!r.done;r=n.next())p=r.value,t=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=t&&(p.dataKey=t,p.pendingSegmentRefId=void 0),t=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=t&&(p.initSegmentKey=t,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
|
|
1144
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return D(B,a.updateManifest(b,c),4);case 4:g=!0;f();ta(B,0);break;case 2:return x=ua(B),D(B,Vy(b),5);case 5:if(g){B.D(6);break}w=Object.values(d);return D(B,a.removeSegments(w,function(){}),6);case 6:throw x;}})}
|
|
1145
|
+
function Ry(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z,C,E,H,J,F,I,K,M,P,O;return L(function(X){switch(X.g){case 1:return d={width:Infinity,height:Infinity},Qe(a,c.restrictions,d),D(X,Ue(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Oe(a,g,h,f);k=u(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(kf(m));n=u(a.textStreams);for(r=n.next();!r.done;r=n.next())p=r.value,e.push(lf(p));
|
|
1146
|
+
t=u(a.imageStreams);for(x=t.next();!x.done;x=t.next())w=x.value,e.push(mf(w));return D(X,c.offline.trackSelectionCallback(e),3);case 3:B=X.h;v=a.presentationTimeline.getDuration();A=0;z=u(B);for(C=z.next();!C.done;C=z.next())E=C.value,H=E.bandwidth*v/8,A+=H;ra(X,4);return D(X,c.offline.downloadSizeCallback(A),6);case 6:J=X.h;if(!J)throw new R(2,9,9014);ta(X,5);break;case 4:F=ua(X);if(F instanceof R)throw F;throw new R(2,9,9015);case 5:I=new Set;K=new Set;M=new Set;P=u(B);for(C=P.next();!C.done;C=
|
|
1147
1147
|
P.next())O=C.value,"variant"==O.type&&I.add(O.id),"text"==O.type&&K.add(O.id),"image"==O.type&&M.add(O.id);a.variants=a.variants.filter(function(W){return I.has(W.id)});a.textStreams=a.textStreams.filter(function(W){return K.has(W.id)});a.imageStreams=a.imageStreams.filter(function(W){return M.has(W.id)});Zy(a);G(X)}})}
|
|
1148
1148
|
function Sy(a,b,c,d,e,f){var g=Dy(c,b,d),h=e.offline.progressCallback;Hx(f,function(p,t){g.size=t;h(g,p)},function(p,t){k&&e.offline.usePersistentLicense&&l==t&&Mh(a,"cenc",p)});var k=Wy(b)&&!Xy(b),l=null;k&&(l=$y.get(a.g.keySystem));for(var m=new Gy,n=u(b.textStreams),r=n.next();!r.done;r=n.next())m.g[r.value.id]=52;n=u(b.imageStreams);for(r=n.next();!r.done;r=n.next())Iy(m,r.value);r=u(b.variants);for(n=r.next();!n.done;n=r.next())Hy(m,n.value);m=az(f,m,b,e);f=m.streams;m=m.Lg;r=a.g;n=e.offline.usePersistentLicense;
|
|
1149
1149
|
r&&n&&(r.initData=[]);return{wj:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hd(),streams:f,sessionIds:n?Wh(a):[],drmInfo:r,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Lg:m}}function Wy(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
@@ -1169,11 +1169,11 @@ function sz(){bb.call(this);this.h=!1;this.g=void 0;this.onabort=null}na(sz,bb);
|
|
|
1169
1169
|
function Bz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
1170
1170
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Cz);document.addEventListener("webkitfullscreenerror",Cz);document.addEventListener("mozfullscreenchange",Cz);document.addEventListener("mozfullscreenerror",Cz);document.addEventListener("MSFullscreenChange",Cz);document.addEventListener("MSFullscreenError",Cz)}}
|
|
1171
1171
|
function Cz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}nz.Fullscreen=Az;Az.install=Bz;qz(Bz);function Dz(){}function Ez(){var a=!0;if(bc()||ec()||dc()||Yb()||Vb()||Zb()||Ub("PC=EOS")||fc())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Fz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Gz)}
|
|
1172
|
-
function Gz(a){var b,c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
1172
|
+
function Gz(a){var b,c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A;return L(function(z){switch(z.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return z.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Pb())return z.return(b);if(c){if(Zb())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var C=c.contentType;c.width&&c.height&&(C+="; width="+c.width+"; height="+c.height);c.framerate&&(C+="; framerate="+c.framerate);"pq"===c.transferFunction&&
|
|
1173
1173
|
(C+="; eotf=smpte2084");if(C in Hz)var E=Hz[C];else E=cast.__platform__.canDisplayType(C),Hz[C]=E;e=E}else e=hd(c.contentType);else Vb()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=hd(f)):e=hd(c.contentType);if(!e)return z.return(b)}if(d&&(Zb()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=hd(h)):g=hd(d.contentType),!g))return z.return(b)}else if("file"==
|
|
1174
1174
|
a.type){if(c&&(k=c.contentType,l=Qb(k),!l)||d&&(m=d.contentType,n=Qb(m),!n))return z.return(b)}else return z.return(b);if(!a.keySystemConfiguration)return b.supported=!0,z.return(Promise.resolve(b));r=a.keySystemConfiguration;p=[];t=[];r.audio&&(x={robustness:r.audio.robustness||"",contentType:a.audio.contentType},Vb()&&a.audio.contentType.includes('codecs="ac-3"')&&(x={robustness:x.robustness,contentType:'audio/mp4; codecs="ec-3"'}),r.audio.encryptionScheme&&(x={robustness:x.robustness,contentType:x.contentType,
|
|
1175
|
-
encryptionScheme:r.audio.encryptionScheme}),p.push(x));r.video&&(w={robustness:r.video.robustness||"",contentType:a.video.contentType},r.video.encryptionScheme&&(w={robustness:w.robustness,contentType:w.contentType,encryptionScheme:r.video.encryptionScheme}),t.push(w));
|
|
1176
|
-
"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ra(z,3);if(v in Iz){
|
|
1175
|
+
encryptionScheme:r.audio.encryptionScheme}),p.push(x));r.video&&(w={robustness:r.video.robustness||"",contentType:a.video.contentType},r.video.encryptionScheme&&(w={robustness:w.robustness,contentType:w.contentType,encryptionScheme:r.video.encryptionScheme}),t.push(w));B={initDataTypes:[r.initDataType],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes};p.length&&(B.audioCapabilities=p);t.length&&(B.videoCapabilities=t);v=(a.video?a.video.contentType:
|
|
1176
|
+
"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ra(z,3);if(v in Iz){A=Iz[v];z.D(5);break}return D(z,navigator.requestMediaKeySystemAccess(r.keySystem,[B]),6);case 6:A=z.h,Iz[v]=A;case 5:ta(z,4);break;case 3:ua(z);case 4:A&&(b.supported=!0,b.keySystemAccess=A);case 2:return z.return(b)}})}nz.MediaCapabilities=Dz;Dz.install=Ez;var Fz=null;Dz.originalMcap=Fz;var Iz={};Dz.memoizedMediaKeySystemAccessRequests_=Iz;var Hz={};Dz.memoizedCanDisplayTypeRequests_=Hz;qz(Ez,-1);function Jz(){}function Kz(){var a=gc();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(Lz(),Mz()):15>=a&&Lz():(Xb()||Wb()||Ub("Tizen 4"))&&Nz();(window.MediaSource||window.ManagedMediaSource)&&Oz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Pz()}
|
|
1177
1177
|
function Lz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function Mz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1178
1178
|
function Oz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=oe(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=oe(c)&&b(c)}}}
|
|
1179
1179
|
function Nz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=ve(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=ve(c)&&b(c)}}}
|
|
@@ -1189,10 +1189,10 @@ function cA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(b),b=
|
|
|
1189
1189
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=u(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1190
1190
|
cA.prototype.createMediaKeys=function(){var a=new gA(this.keySystem);return Promise.resolve(a)};cA.prototype.getConfiguration=function(){return this.g};function gA(a){this.h=new WebKitMediaKeys(a);this.g=new cd}gA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new hA(this.h,a)};gA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1191
1191
|
function eA(a,b){a.g.mb();if(!b)return Promise.resolve();a.g.s(b,"webkitneedkey",fA);try{return xk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}gA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function hA(a){bb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new cd;this.sessionId="";this.expiration=NaN;this.closed=new dg;this.keyStatuses=new iA}na(hA,bb);q=hA.prototype;
|
|
1192
|
-
q.generateRequest=function(a,b){var c=this;this.h=new dg;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.s(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.
|
|
1192
|
+
q.generateRequest=function(a,b){var c=this;this.h=new dg;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.s(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.xc()?"license-request":"license-renewal").set("message",Gb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.s(d,"webkitkeyadded",function(){c.g&&(jA(c,"usable"),c.g.resolve(),c.g=null)});this.j.s(d,"webkitkeyerror",
|
|
1193
1193
|
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:jA(c,"output-not-allowed");break;default:jA(c,"internal-error")}});jA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1194
1194
|
q.update=function(a){this.g=new dg;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.mb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function jA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
|
|
1195
|
-
function iA(){this.size=0;this.g=void 0}q=iA.prototype;q.
|
|
1195
|
+
function iA(){this.size=0;this.g=void 0}q=iA.prototype;q.xc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,ji.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ji.value();return this.g&&Cb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function kA(){}function lA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=mA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=nA,window.MediaKeys=oA,window.MediaKeySystemAccess=pA,window.shakaMediaKeysPolyfill=!0)}function mA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1196
1196
|
function nA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}nz.PatchedMediaKeysNop=kA;kA.install=lA;function oA(){throw new TypeError("Illegal constructor.");}oA.prototype.createSession=function(){};oA.prototype.setServerCertificate=function(){};oA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function pA(){this.keySystem="";throw new TypeError("Illegal constructor.");}pA.prototype.getConfiguration=function(){};
|
|
1197
1197
|
pA.prototype.createMediaKeys=function(){};qz(lA,-10);function qA(){}
|
|
1198
1198
|
function rA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)sA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=tA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=uA;window.MediaKeys=vA;window.MediaKeySystemAccess=wA;window.shakaMediaKeysPolyfill=!0}}
|
|
@@ -1200,26 +1200,26 @@ function xA(a){var b=sA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}functi
|
|
|
1200
1200
|
function wA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=u(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=u(f.audioCapabilities),
|
|
1201
1201
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=u(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1202
1202
|
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}wA.prototype.createMediaKeys=function(){var a=new vA(this.g);return Promise.resolve(a)};wA.prototype.getConfiguration=function(){return this.h};function vA(a){this.l=a;this.h=null;this.g=new cd;this.i=[];this.j=new Map}
|
|
1203
|
-
function yA(a,b){a.h=b;a.g.mb();var c=sA;b&&(a.g.s(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.s(b,c+"keymessage",function(d){var e=zA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.
|
|
1203
|
+
function yA(a,b){a.h=b;a.g.mb();var c=sA;b&&(a.g.s(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.s(b,c+"keymessage",function(d){var e=zA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.xc()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.s(b,c+"keyadded",function(d){if(d=zA(a,d.sessionId))AA(d,"usable"),
|
|
1204
1204
|
d.g&&d.g.resolve(),d.g=null}),a.g.s(b,c+"keyerror",function(d){var e=zA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?AA(e,"output-restricted"):1==f?AA(e,"expired"):AA(e,"internal-error"))}}))}
|
|
1205
1205
|
vA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new BA(b,this.l,a);this.i.push(a);return a};vA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};vA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1206
1206
|
function zA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function BA(a,b,c){bb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new dg;this.keyStatuses=new CA}na(BA,bb);
|
|
1207
1207
|
function DA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Fb(pc("LOAD_SESSION|"+c));else{var e=pc("PERSISTENT|");d=zc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new dg;var f=xA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Ob(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).V(.01)}return a.h}
|
|
1208
1208
|
function EA(a,b,c){if(a.g)a.g.then(function(){return EA(a,b,c)}).catch(function(){return EA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=lc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=wc(e.keys[0].k);e=wc(e.keys[0].kid)}else d=Fb(c),e=null;var f=xA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1209
1209
|
function AA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}q=BA.prototype;q.generateRequest=function(a,b){return DA(this,b,null)};q.load=function(a){return"persistent-license"==this.l?DA(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new dg;EA(this,b,a);return b};
|
|
1210
|
-
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=xA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function CA(){this.size=0;this.g=void 0}q=CA.prototype;q.
|
|
1210
|
+
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=xA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function CA(){this.size=0;this.g=void 0}q=CA.prototype;q.xc=function(){return this.g};
|
|
1211
1211
|
q.forEach=function(a){this.g&&a(this.g,ji.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ji.value();return this.g&&Cb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var sA="";qz(rA);function FA(){}function GA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=HA,Object.defineProperty(a,"disablePictureInPicture",{get:IA,set:JA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=KA,document.addEventListener("webkitpresentationmodechanged",LA,!0))}}
|
|
1212
1212
|
function LA(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
1213
1213
|
function HA(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function KA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1214
1214
|
function IA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function JA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}nz.PiPWebkit=FA;FA.install=GA;qz(GA);function MA(){}function NA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=OA))}function OA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}nz.RandomUUID=MA;MA.install=NA;qz(NA);function PA(){}function QA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:RA})}function RA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}nz.Symbol=PA;PA.install=QA;qz(QA);function SA(){}function TA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}nz.VideoPlayPromise=SA;SA.install=TA;qz(TA);function UA(){}function VA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Yb()&&38===$b())&&(a.getVideoPlaybackQuality=WA)}}function WA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}nz.VideoPlaybackQuality=UA;UA.install=VA;qz(VA);function XA(){}function YA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ZA;else if(6==b)a=$A;else{try{var c=!!ZA(1,2,"")}catch(d){c=!1}c&&(a=ZA)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ZA(a,b,c){return new window.TextTrackCue(a,b,c)}function $A(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}nz.VTTCue=XA;XA.install=YA;qz(YA);function aB(){}aB.prototype.parseInit=function(){};aB.prototype.setSequenceMode=function(){};aB.prototype.setManifestType=function(){};aB.prototype.parseMedia=function(a,b){var c=null,d=[];a=lc(a).split(/\r?\n/);a=u(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=bB.exec(e))){var f=cB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Bd(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1215
1215
|
N("shaka.text.LrcTextParser",aB);aB.prototype.parseMedia=aB.prototype.parseMedia;aB.prototype.setManifestType=aB.prototype.setManifestType;aB.prototype.setSequenceMode=aB.prototype.setSequenceMode;aB.prototype.parseInit=aB.prototype.parseInit;var bB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,cB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Ce["application/x-subtitle-lrc"]=function(){return new aB};function dB(){}dB.prototype.parseInit=function(){};dB.prototype.setSequenceMode=function(){};dB.prototype.setManifestType=function(){};
|
|
1216
1216
|
dB.prototype.parseMedia=function(a,b,c){var d=lc(a);a=[];if(""==d)return a;var e=Ug(d,"tt");if(!e)throw new R(2,2,2005,"Failed to parse TTML.");d=dh(e,"body")[0];if(!d)return[];var f=jh(e,eB,"frameRate"),g=jh(e,eB,"subFrameRate"),h=jh(e,eB,"frameRateMultiplier"),k=jh(e,eB,"tickRate"),l=jh(e,eB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=jh(e,fB,"extent");if("default"!=m&&"preserve"!=m)throw new R(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new gB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
|
|
1217
|
-
{
|
|
1218
|
-
100*p.height/w)),p.widthUnits=
|
|
1217
|
+
{tc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=dh(e,"metadata")[0])?g.children:[];h=dh(e,"style");e=dh(e,"region");k=[];for(var r=u(e),p=r.next();!p.done;p=r.next()){var t=p.value;p=new Cd;var x=t.attributes["xml:id"];if(x){p.id=x;var w=null;n&&(w=hB.exec(n)||iB.exec(n));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var B,v=jB(t,h,"extent");if(v){var A=(B=hB.exec(v))||iB.exec(v);null!=A&&(p.width=Number(A[1]),p.height=Number(A[2]),B||(null!=x&&(p.width=100*p.width/x),null!=w&&(p.height=
|
|
1218
|
+
100*p.height/w)),p.widthUnits=B||null!=x?Yd:0,p.heightUnits=B||null!=w?Yd:0)}if(t=jB(t,h,"origin"))if(A=(B=hB.exec(t))||iB.exec(t),null!=A)p.viewportAnchorX=Number(A[1]),p.viewportAnchorY=Number(A[2]),B?v||(p.width=100-p.viewportAnchorX,p.widthUnits=Yd,p.height=100-p.viewportAnchorY,p.heightUnits=Yd):(null!=w&&(p.viewportAnchorY=100*p.viewportAnchorY/w),null!=x&&(p.viewportAnchorX=100*p.viewportAnchorX/x)),p.viewportAnchorUnits=B||null!=x?Yd:0}else p=null;p&&k.push(p)}if(ah(d,"p").length)throw new R(2,
|
|
1219
1219
|
2,2001,"<p> can only be inside <div> in TTML");n=u(ah(d,"div"));for(r=n.next();!r.done;r=n.next())if(ah(r.value,"span").length)throw new R(2,2,2001,"<span> can only be inside <p> in TTML");if(b=kB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1220
|
-
function kB(a,b,c,d,e,f,g,h,k,l,m,n){var r=l;if(Yg(a)){if(!m)return null;var p={tagName:"span",children:[bh(a)],attributes:{},parent:null}}else p=a;for(var t=null,x=u(lB),w=x.next();!w.done&&!(t=mB(p,"backgroundImage",d,"#",w.value)[0]);w=x.next());x=null;var
|
|
1221
|
-
[];if(!
|
|
1222
|
-
if(!
|
|
1220
|
+
function kB(a,b,c,d,e,f,g,h,k,l,m,n){var r=l;if(Yg(a)){if(!m)return null;var p={tagName:"span",children:[bh(a)],attributes:{},parent:null}}else p=a;for(var t=null,x=u(lB),w=x.next();!w.done&&!(t=mB(p,"backgroundImage",d,"#",w.value)[0]);w=x.next());x=null;var B=jh(p,lB,"backgroundImage");n&&B&&!B.startsWith("#")&&(w=new ib(n),B=new ib(B),(w=w.resolve(B).toString())&&(x=w));if("p"==a.tagName||t||x)m=!0;a=m;w="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));B=p.children.every(Yg);h=
|
|
1221
|
+
[];if(!B)for(var v=u(p.children),A=v.next();!A.done;A=v.next())(A=kB(A.value,b,c,d,e,f,g,w,k,p,m,n))&&h.push(A);d=null!=l;n=bh(p);n=p.children.length&&n&&/\S/.test(n);A=p.attributes.begin||p.attributes.end||p.attributes.dur;if(!(A||n||"br"==p.tagName||0!=h.length||d&&!w))return null;v=nB(p,c);n=v.start;for(v=v.end;r&&r.tagName&&"tt"!=r.tagName;)v=oB(r,c,n,v),n=v.start,v=v.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;v=null==v?Infinity:v+b.periodStart;n=Math.max(n,b.segmentStart);v=Math.min(v,b.segmentEnd);
|
|
1222
|
+
if(!A&&0<h.length)for(n=Infinity,v=0,b=u(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new Bd(n,v,""),e.lineBreak=!0,e;b="";B&&(b=sc(bh(p)||""),w&&(b=b.replace(/\s+/g," ")));b=new Bd(n,v,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=mB(p,"region",f,"")[0];if(p.attributes.region&&k&&k.attributes["xml:id"]){var z=k.attributes["xml:id"];b.region=g.filter(function(C){return C.id==z})[0]}g=k;l&&d&&!p.attributes.region&&
|
|
1223
1223
|
!p.attributes.style&&(g=mB(l,"region",f,"")[0]);pB(b,p,g,t,x,e,a,0==h.length);return b}
|
|
1224
1224
|
function pB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==qB(b,c,f,"direction",g)&&(a.direction="rtl");h=qB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Fd);(h=qB(b,c,f,"textAlign",!0))?(a.positionAlign=rB[h],a.lineAlign=sB[h],a.textAlign=Qd[h.toUpperCase()]):a.textAlign=Ed;if(h=qB(b,c,f,"displayAlign",!0))a.displayAlign=Rd[h.toUpperCase()];if(h=qB(b,c,f,"color",g))a.color=h;if(h=qB(b,c,f,"backgroundColor",
|
|
1225
1225
|
g))a.backgroundColor=h;if(h=qB(b,c,f,"border",g))a.border=h;if(h=qB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=qB(b,c,f,"fontWeight",g))&&
|
|
@@ -1254,8 +1254,8 @@ function KB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exe
|
|
|
1254
1254
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Dd);else if(d=/^region:(.*)$/.exec(b)){if(b=QB(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Sd[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Hd,a.line=Number(c[1]),c[2]&&(a.lineAlign=Sd[c[2].toUpperCase()])}
|
|
1255
1255
|
function QB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function IB(a){a=Mu(a,MB);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.VttTextParser",HB);HB.prototype.parseMedia=HB.prototype.parseMedia;HB.prototype.setManifestType=HB.prototype.setManifestType;HB.prototype.setSequenceMode=HB.prototype.setSequenceMode;HB.prototype.parseInit=HB.prototype.parseInit;var MB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1256
1256
|
Ce["text/vtt"]=function(){return new HB};Ce['text/vtt; codecs="vtt"']=function(){return new HB};Ce['text/vtt; codecs="wvtt"']=function(){return new HB};function RB(){this.g=null}RB.prototype.parseInit=function(a){var b=this,c=!1;(new Gg).box("moov",Lg).box("trak",Lg).box("mdia",Lg).T("mdhd",function(d){d=Si(d.reader,d.version);b.g=d.timescale}).box("minf",Lg).box("stbl",Lg).T("stsd",Ng).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new R(2,2,2008);if(!c)throw new R(2,2,2008);};RB.prototype.setSequenceMode=function(){};RB.prototype.setManifestType=function(){};
|
|
1257
|
-
RB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new R(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Gg).box("moof",Lg).box("traf",Lg).T("tfdt",function(
|
|
1258
|
-
r.value;var p=r.xg||l,t=r.We?c+r.We:a;a=t+(p||0);var x=0;do{var w=m.R();x+=w;var
|
|
1257
|
+
RB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new R(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Gg).box("moof",Lg).box("traf",Lg).T("tfdt",function(A){g=!0;c=Ri(A.reader,A.version).baseMediaDecodeTime}).T("tfhd",function(A){l=Qi(A.reader,A.flags).gh}).T("trun",function(A){h=!0;d=Ti(A.reader,A.version,A.flags).Hh}).box("mdat",Qg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new R(2,2,2008);a=c;for(var m=new Dg(e,0),n=u(d),r=n.next();!r.done;r=n.next()){r=
|
|
1258
|
+
r.value;var p=r.xg||l,t=r.We?c+r.We:a;a=t+(p||0);var x=0;do{var w=m.R();x+=w;var B=m.R(),v=null;"vttc"==Kg(B)?8<w&&(v=m.Pb(w-8)):m.skip(w-8);p&&v&&(w=SB(v,b.periodStart+t/this.g,b.periodStart+a/this.g),f.push(w))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Ke)};function SB(a,b,c){var d,e,f;(new Gg).box("payl",Qg(function(g){d=lc(g)})).box("iden",Qg(function(g){e=lc(g)})).box("sttg",Qg(function(g){f=lc(g)})).parse(a);return d?TB(d,e,f,b,c):null}
|
|
1259
1259
|
function TB(a,b,c,d,e){d=new Bd(d,e,"");LB(a,d,new Map);b&&(d.id=b);if(c)for(a=new Ku(c),b=Nu(a);b;)KB(d,b,[]),Lu(a),b=Nu(a);return d}N("shaka.text.Mp4VttParser",RB);RB.prototype.parseMedia=RB.prototype.parseMedia;RB.prototype.setManifestType=RB.prototype.setManifestType;RB.prototype.setSequenceMode=RB.prototype.setSequenceMode;RB.prototype.parseInit=RB.prototype.parseInit;Ce['application/mp4; codecs="wvtt"']=function(){return new RB};function UB(){}UB.prototype.parseInit=function(){};UB.prototype.setSequenceMode=function(){};UB.prototype.setManifestType=function(){};UB.prototype.parseMedia=function(a){var b=lc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=u(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Ku(c[0]),e=VB(d),f=Mu(d,/,/g);d=VB(d);if(null==e||null==f||null==d)throw new R(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Bd(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1260
1260
|
function VB(a){a=Mu(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.SbvTextParser",UB);UB.prototype.parseMedia=UB.prototype.parseMedia;UB.prototype.setManifestType=UB.prototype.setManifestType;UB.prototype.setSequenceMode=UB.prototype.setSequenceMode;UB.prototype.parseInit=UB.prototype.parseInit;Ce["text/x-subviewer"]=function(){return new UB};function WB(){this.g=new HB}WB.prototype.parseInit=function(){};WB.prototype.setSequenceMode=function(){};WB.prototype.setManifestType=function(){};WB.prototype.parseMedia=function(a,b,c){a=lc(a);a=XB(a);a=Fb(pc(a));return this.g.parseMedia(a,b,c)};
|
|
1261
1261
|
function XB(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=u(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}N("shaka.text.SrtTextParser",WB);WB.srt2webvtt=XB;WB.prototype.parseMedia=WB.prototype.parseMedia;
|
|
@@ -1285,10 +1285,10 @@ k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ea:a,Oa:d,Qa:e}}
|
|
|
1285
1285
|
function rC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=u(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=kj(new Yi(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
|
|
1286
1286
|
{data:zc.apply(tc,y(c)),Qd:b}:null}var qC=[100,110,122,244,44,83,86,118,128,138,139,134];function sC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=tC(b.fullData);a=uC(c.fullData);var f=vC(d.fullData);b=wC(b.fullData,c.fullData,d.fullData,{og:e.og,Kg:e.Kg,Sf:a.Sf,Tf:a.Tf,Mf:a.Mf,Rf:a.Rf,Nf:a.Nf,Of:a.Of,Pf:a.Pf,Qf:a.Qf,Gf:a.Gf,Hf:a.Hf,If:a.If,Jf:a.Jf,Kf:a.Kf,Lf:a.Lf,Df:a.Df,Ke:a.Ke,Cf:a.Cf,zf:a.zf,yf:a.yf,rg:f.rg});return{height:a.height,width:a.width,
|
|
1287
1287
|
Ea:b,Oa:a.Vj,Qa:a.Uj}}function tC(a){var b=new Yi(a,!0);ij(b);ij(b);aj(b,4);aj(b,2);aj(b,6);a=aj(b,3);b=hj(b);return{og:a+1,Kg:b}}
|
|
1288
|
-
function uC(a){a=new Yi(a,!0);ij(a);ij(a);var b=0,c=0,d=0,e=0;aj(a,4);var f=aj(a,3);hj(a);for(var g=aj(a,2),h=aj(a,1),k=aj(a,5),l=ij(a),m=ij(a),n=ij(a),r=ij(a),p=ij(a),t=ij(a),x=ij(a),w=ij(a),
|
|
1288
|
+
function uC(a){a=new Yi(a,!0);ij(a);ij(a);var b=0,c=0,d=0,e=0;aj(a,4);var f=aj(a,3);hj(a);for(var g=aj(a,2),h=aj(a,1),k=aj(a,5),l=ij(a),m=ij(a),n=ij(a),r=ij(a),p=ij(a),t=ij(a),x=ij(a),w=ij(a),B=ij(a),v=ij(a),A=ij(a),z=[],C=[],E=0;E<f;E++)z.push(hj(a)),C.push(hj(a));if(0<f)for(E=f;8>E;E++)aj(a,2);for(E=0;E<f;E++)z[E]&&aj(a,88),C[E]&&ij(a);S(a);z=S(a);3==z&&aj(a,1);C=S(a);E=S(a);hj(a)&&(b+=S(a),c+=S(a),d+=S(a),e+=S(a));var H=S(a),J=S(a),F=S(a);if(hj(a))for(var I=0;I<=f;I++)S(a),S(a),S(a);else S(a),
|
|
1289
1289
|
S(a),S(a);S(a);S(a);S(a);S(a);S(a);S(a);if(hj(a)&&hj(a))for(I=0;4>I;I++)for(var K=0;K<(3===I?2:6);K++)if(hj(a)){var M=Math.min(64,1<<4+(I<<1));1<I&&dj(a);for(var P=0;P<M;P++)dj(a)}else S(a);hj(a);hj(a);hj(a)&&(ij(a),S(a),S(a),hj(a));I=S(a);for(M=K=0;M<I;M++)if(P=!1,0!==M&&(P=hj(a)),P){M===I&&S(a);hj(a);S(a);for(var O=P=0;O<=K;O++){var X=hj(a),W=!1;X||(W=hj(a));(X||W)&&P++}K=P}else{O=S(a);P=S(a);K=O+P;for(X=0;X<O;X++)S(a),hj(a);for(O=0;O<P;O++)S(a),hj(a)}if(hj(a))for(I=S(a),K=0;K<I;K++){for(M=0;M<
|
|
1290
1290
|
F+4;M++)aj(a,1);aj(a,1)}I=F=1;K=0;hj(a);hj(a);if(hj(a)){hj(a)&&(M=ij(a),P=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],O=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(F=P[M-1],I=O[M-1]):255===M&&(F=aj(a,16),I=aj(a,16)));hj(a)&&hj(a);hj(a)&&(aj(a,3),hj(a),hj(a)&&(ij(a),ij(a),ij(a)));hj(a)&&(S(a),S(a));hj(a);hj(a);hj(a);if(M=hj(a))S(a),S(a),S(a),S(a);if(hj(a)&&(aj(a,32),aj(a,32),hj(a)&&S(a),hj(a))){O=!1;M=hj(a);P=hj(a);if(M||P){if(O=hj(a))ij(a),aj(a,5),hj(a),aj(a,5);aj(a,4);aj(a,4);O&&
|
|
1291
|
-
aj(a,4);aj(a,5);aj(a,5);aj(a,5)}for(X=0;X<=f;X++){var Y=!0;W=1;hj(a)||(Y=hj(a));var Da=!1;Y?S(a):Da=hj(a);Da||(W=S(a)+1);if(M){for(Y=0;Y<W;Y++)S(a),S(a),O&&(S(a),S(a));hj(a)}if(P){for(Y=0;Y<W;Y++)S(a),S(a),O&&(S(a),S(a));hj(a)}}}hj(a)&&(hj(a),hj(a),hj(a),K=S(a),S(a),S(a),S(a),S(a))}return{Mf:
|
|
1291
|
+
aj(a,4);aj(a,5);aj(a,5);aj(a,5)}for(X=0;X<=f;X++){var Y=!0;W=1;hj(a)||(Y=hj(a));var Da=!1;Y?S(a):Da=hj(a);Da||(W=S(a)+1);if(M){for(Y=0;Y<W;Y++)S(a),S(a),O&&(S(a),S(a));hj(a)}if(P){for(Y=0;Y<W;Y++)S(a),S(a),O&&(S(a),S(a));hj(a)}}}hj(a)&&(hj(a),hj(a),hj(a),K=S(a),S(a),S(a),S(a),S(a))}return{Mf:A,Sf:g,Tf:h,Rf:k,Nf:l,Of:m,Pf:n,Qf:r,Gf:p,Hf:t,If:x,Jf:w,Kf:B,Lf:v,Ke:K,Df:0,Cf:z,zf:H,yf:J,width:C-(b+c)*(1===z||2===z?2:1),height:E-(d+e)*(1===z?2:1),Vj:F,Uj:I}}
|
|
1292
1292
|
function vC(a){var b=new Yi(a,!0);ij(b);ij(b);S(b);S(b);hj(b);hj(b);aj(b,3);hj(b);hj(b);S(b);S(b);dj(b);hj(b);hj(b);hj(b)&&S(b);dj(b);dj(b);hj(b);hj(b);hj(b);hj(b);a=hj(b);b=hj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{rg:c}}
|
|
1293
1293
|
function wC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Sf&3)<<6|(d.Tf?1:0)<<5|d.Rf&31;e[2]=d.Nf;e[3]=d.Of;e[4]=d.Pf;e[5]=d.Qf;e[6]=d.Gf;e[7]=d.Hf;e[8]=d.If;e[9]=d.Jf;e[10]=d.Kf;e[11]=d.Lf;e[12]=d.Mf;e[13]=240|(d.Ke&3840)>>8;e[14]=d.Ke&255;e[15]=252|d.rg&3;e[16]=252|d.Cf&3;e[17]=248|d.zf&7;e[18]=248|d.yf&7;e[19]=0;e[20]=0;e[21]=(d.Df&3)<<6|(d.og&7)<<3|(d.Kg?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1294
1294
|
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function xC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*yC[14*(3===c?3-d:3===d?3:4)+e-1];f=zC[3*(3===c?0:2===c?1:2)+f];c=AC[c][d];var h=BC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,ba:k,Tj:8*c*h}}return null}
|
|
@@ -1311,26 +1311,26 @@ function HC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("
|
|
|
1311
1311
|
q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return hd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return hd(b)||hd(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
|
|
1312
1312
|
q.transmux=function(a,b,c){if(!c)return Promise.resolve(Fb(a));if(!b.mssPrivateData)return Promise.reject(new R(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
|
|
1313
1313
|
1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var r=e.fetch("saio");if(null===r){r=this.g.createFullBox("saio",h);r.version=0;r.flags=0;r.entry_count=1;r.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)p.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else p.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
|
|
1314
|
-
1;var t=e.fetch("moof");k.data_offset=t.getLength()+8;var x=e.fetch("saio");null!==x&&(x.offset[0]=JC(t,"traf")+JC(h,"senc")+16);var w=Fb(e.write());return Promise.resolve(w)}catch(
|
|
1314
|
+
1;var t=e.fetch("moof");k.data_offset=t.getLength()+8;var x=e.fetch("saio");null!==x&&(x.offset[0]=JC(t,"traf")+JC(h,"senc")+16);var w=Fb(e.write());return Promise.resolve(w)}catch(B){return B instanceof R?Promise.reject(B):Promise.reject(new R(2,3,3022))}};function JC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}N("shaka.transmuxer.MssTransmuxer",GC);GC.prototype.transmux=GC.prototype.transmux;GC.prototype.getOriginalMimeType=GC.prototype.getOriginalMimeType;
|
|
1315
1315
|
GC.prototype.convertCodecs=GC.prototype.convertCodecs;GC.prototype.isSupported=GC.prototype.isSupported;GC.prototype.destroy=GC.prototype.destroy;var IC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);ae("mss/audio/mp4",function(){return new GC("mss/audio/mp4")},ge);ae("mss/video/mp4",function(){return new GC("mss/video/mp4")},ge);function KC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=KC.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1316
1316
|
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=ye(c).split(",");c=Ec("audio",d);d=Ec("video",d);if(c&&(c=te(c),!LC.includes(c))||d&&(c=te(d),!MC.includes(c)))return!1;if(b)return hd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return hd(b)||hd(a)};
|
|
1317
1317
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=ye(b).replace("mp4a.40.34","mp3").split(",").map(this.Ii).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.Ii=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};q.getOriginalMimeType=function(){return this.l};
|
|
1318
1318
|
q.transmux=function(a,b,c,d,e){var f=Fb(a);if("audio"==e&&!sj(f)){for(var g=Pi(f),h=g.length;h<f.length;h++)if(DC(f,h))return Promise.reject(new R(2,3,3018));for(h=g.length;h<f.length;h++)if(hC(f,h))return this.h||(this.h=new jC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new R(2,3,3018))}this.j?this.j.clearData():this.j=new lj;var k=this.j.parse(f),l=[],m=k.Gd();try{var n=null;if("video"==e){switch(m.video){case "avc":var r=[],p=null,t=[],x=k.Xc();if(!x.length)throw new R(2,3,
|
|
1319
|
-
3023);for(var w=0;w<x.length;w++){var
|
|
1319
|
+
3023);for(var w=0;w<x.length;w++){var B=x[w],v=B.nalus;t.push.apply(t,y(v));var A=rC(v);if(A){null==p&&(p=B.dts);var z=void 0;z=w+1<x.length?(x[w+1].dts||0)-(B.dts||0):1<x.length?(B.dts||0)-(x[w-1].dts||0):9E4*(c.endTime-c.startTime);r.push({data:A.data,size:A.data.byteLength,duration:z,qb:Math.round((B.pts||0)-(B.dts||0)),flags:{sb:0,hb:0,gb:0,cb:0,eb:A.Qd?2:1,ub:A.Qd?0:1}})}}var C=pC(t);if(!C||null==p)throw new R(2,3,3018);b.height=C.height;b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",
|
|
1320
1320
|
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,pb:[],wa:new Uint8Array([]),Ea:C.Ea,Oa:C.Oa,Qa:C.Qa,data:{Db:this.g,baseMediaDecodeTime:p,ob:r},stream:b};break;case "hvc":var E=[],H=null,J=[],F=k.Xc();if(!F.length)throw new R(2,3,3023);for(var I=0;I<F.length;I++){var K=F[I],M=K.nalus;J.push.apply(J,y(M));for(var P=!1,O=[],X=!1,W=u(M),Y=W.next();!Y.done;Y=W.next()){var Da=Y.value;switch(Da.type){case 1:case 0:var Ia=X=!0;break;case 19:case 20:case 21:P=Ia=X=!0;break;case 32:Ia=
|
|
1321
|
-
!0;break;case 33:Ia=!0;break;case 34:Ia=!0;break;case 35:X=Ia=!0;break;case 39:case 40:Ia=!0;break;default:Ia=!1}if(X&&Ia){var
|
|
1321
|
+
!0;break;case 33:Ia=!0;break;case 34:Ia=!0;break;case 35:X=Ia=!0;break;case 39:case 40:Ia=!0;break;default:Ia=!1}if(X&&Ia){var mb=Da.fullData.byteLength,Ka=new Uint8Array(4);Ka[0]=mb>>24&255;Ka[1]=mb>>16&255;Ka[2]=mb>>8&255;Ka[3]=mb&255;O.push(Ka);O.push(Da.fullData)}}var ab=O.length?{data:zc.apply(tc,y(O)),Qd:P}:null;if(ab){null==H&&null!=K.dts&&(H=K.dts);var Aa=void 0;Aa=I+1<F.length?(F[I+1].dts||0)-(K.dts||0):1<F.length?(K.dts||0)-(F[I-1].dts||0):9E4*(c.endTime-c.startTime);E.push({data:ab.data,
|
|
1322
1322
|
size:ab.data.byteLength,duration:Aa,qb:Math.round((K.pts||0)-(K.dts||0)),flags:{sb:0,hb:0,gb:0,cb:0,eb:ab.Qd?2:1,ub:ab.Qd?0:1}})}}var sb=sC(J);if(!sb||null==H)throw new R(2,3,3018);b.height=sb.height;b.width=sb.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,pb:[],wa:new Uint8Array([]),Ea:sb.Ea,Oa:sb.Oa,Qa:sb.Qa,data:{Db:this.g,baseMediaDecodeTime:H,ob:E},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Ib=
|
|
1323
|
-
[],qb,eb=null,zf=u(k.ec()),Nd=zf.next();!Nd.done;Nd=zf.next()){var pe=Nd.value,
|
|
1323
|
+
[],qb,eb=null,zf=u(k.ec()),Nd=zf.next();!Nd.done;Nd=zf.next()){var pe=Nd.value,yd=pe.data;if(yd){var Lc=0;qb=gC(yd,Lc);if(!qb)throw new R(2,3,3018);b.audioSamplingRate=qb.sampleRate;b.channelsCount=qb.channelCount;null==eb&&null!==pe.pts&&(eb=pe.pts);for(;Lc<yd.length;){var qe=fC(yd,Lc);if(qe){var Af=qe.Be+qe.ba;Lc+Af<=yd.length&&Ib.push({data:yd.subarray(Lc+qe.Be,Lc+Af),size:qe.ba,duration:1024,qb:0,flags:{sb:0,hb:0,gb:0,cb:0,eb:2,ub:0}});Lc+=Af}else Lc++}}}if(!qb||null==eb){if(!k.Xc().length)throw new R(2,
|
|
1324
1324
|
3,3018);eb=9E4*c.startTime;var re=Ec("audio",b.codecs.split(","));if(!re||!b.channelsCount||!b.audioSamplingRate)throw new R(2,3,3018);qb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ab:re};var Od=iC(re,b.channelsCount);if(!Od)throw new R(2,3,3018);for(var ej=eb+9E4*(c.endTime-c.startTime),Zg=eb;Zg<ej;)Ib.push({data:Od,size:Od.byteLength,duration:1024,qb:0,flags:{sb:0,hb:0,gb:0,cb:0,eb:2,ub:0}}),Zg+=1024/qb.sampleRate*9E4}var fj=qb.sampleRate,gj=eb/9E4*fj;n={id:b.id,type:"audio",codecs:qb.ab,
|
|
1325
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:fj,duration:d,pb:[],wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:gj,ob:Ib},stream:b};break;case "ac3":for(var Bf=[],se=0,Cf=new Uint8Array([]),ac=null,
|
|
1326
|
-
Bf.push({data:
|
|
1327
|
-
|
|
1328
|
-
duration:d,pb:[],wa:
|
|
1329
|
-
3,3018);var
|
|
1330
|
-
break;case 5:Db=[1,3,2,0,4,1,2,3];break;case 6:Db=[1,4,2,0,4,1,2,3,5];break;case 7:Db=[1,4,2,0,4,1,2,3,5,6];break;case 8:Db=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Db=[1,1,2,0,1];break;case 131:Db=[1,1,3,0,1,2];break;case 132:Db=[1,1,4,0,1,2,3];break;case 133:Db=[1,1,5,0,1,2,3,4];break;case 134:Db=[1,1,6,0,1,2,3,4,5];break;case 135:Db=[1,1,7,0,1,2,3,4,5,6];break;case 136:Db=[1,1,8,0,1,2,3,4,5,6,7]}var
|
|
1331
|
-
8&255,
|
|
1332
|
-
3,3018);b.audioSamplingRate=
|
|
1333
|
-
this.i.get(b.id);else
|
|
1325
|
+
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:fj,duration:d,pb:[],wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:gj,ob:Ib},stream:b};break;case "ac3":for(var Bf=[],se=0,Cf=new Uint8Array([]),ac=null,pw=u(k.ec()),zn=pw.next();!zn.done;zn=pw.next()){var An=zn.value,Bn=An.data;null==ac&&null!==An.pts&&(ac=An.pts);for(var Lf=0;Lf<Bn.length;){var Td=kC(Bn,Lf);Td?(b.audioSamplingRate=Td.sampleRate,b.channelsCount=Td.channelCount,se=Td.sampleRate,Cf=Td.wa,
|
|
1326
|
+
Bf.push({data:Bn.subarray(Lf,Lf+Td.ba),size:Td.ba,duration:1536,qb:0,flags:{sb:0,hb:0,gb:0,cb:0,eb:2,ub:0}}),Lf+=Td.ba):Lf++}}if(0==se||0==Cf.byteLength||null==ac)throw new R(2,3,3018);var cG=ac/9E4*se;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:se,duration:d,pb:[],wa:Cf,Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:cG,ob:Bf},stream:b};break;case "ec3":for(var qw=[],Pj=0,Cn=new Uint8Array([]),Qj=null,rw=u(k.ec()),Dn=rw.next();!Dn.done;Dn=
|
|
1327
|
+
rw.next()){var En=Dn.value,Fn=En.data;null==Qj&&null!==En.pts&&(Qj=En.pts);for(var Mf=0;Mf<Fn.length;){var Ud=nC(Fn,Mf);Ud?(b.audioSamplingRate=Ud.sampleRate,b.channelsCount=Ud.channelCount,Pj=Ud.sampleRate,Cn=Ud.wa,qw.push({data:Fn.subarray(Mf,Mf+Ud.ba),size:Ud.ba,duration:1536,qb:0,flags:{sb:0,hb:0,gb:0,cb:0,eb:2,ub:0}}),Mf+=Ud.ba):Mf++}}if(0==Pj||0==Cn.byteLength||null==Qj)throw new R(2,3,3018);var dG=Qj/9E4*Pj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Pj,
|
|
1328
|
+
duration:d,pb:[],wa:Cn,Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:dG,ob:qw},stream:b};break;case "mp3":for(var sw=[],Rj,Sj=null,tw=u(k.ec()),Gn=tw.next();!Gn.done;Gn=tw.next()){var Hn=Gn.value,mh=Hn.data;if(mh){null==Sj&&null!==Hn.pts&&(Sj=Hn.pts);for(var xe=0;xe<mh.length;){var Nf=xC(mh,xe);Nf?(Rj||(Rj=Nf),xe+Nf.ba<=mh.length&&sw.push({data:mh.subarray(xe,xe+Nf.ba),size:Nf.ba,duration:1152,qb:0,flags:{sb:0,hb:0,gb:0,cb:0,eb:2,ub:0}}),xe+=Nf.ba):xe++}}}if(!Rj||null==Sj)throw new R(2,
|
|
1329
|
+
3,3018);var uw=Rj.sampleRate,eG=Sj/9E4*uw;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:uw,duration:d,pb:[],wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:eG,ob:sw},stream:b};break;case "opus":var vw=[],Tj=null,Zc=k.H;if(!Zc)throw new R(2,3,3018);var Db=[];switch(Zc.oi){case 1:case 2:Db=[0];break;case 0:Db=[255,1,1,0,1];break;case 128:Db=[255,2,0,0,1];break;case 3:Db=[1,2,1,0,2,1];break;case 4:Db=[1,2,2,0,1,2,3];
|
|
1330
|
+
break;case 5:Db=[1,3,2,0,4,1,2,3];break;case 6:Db=[1,4,2,0,4,1,2,3,5];break;case 7:Db=[1,4,2,0,4,1,2,3,5,6];break;case 8:Db=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Db=[1,1,2,0,1];break;case 131:Db=[1,1,3,0,1,2];break;case 132:Db=[1,1,4,0,1,2,3];break;case 133:Db=[1,1,5,0,1,2,3,4];break;case 134:Db=[1,1,6,0,1,2,3,4,5];break;case 135:Db=[1,1,7,0,1,2,3,4,5,6];break;case 136:Db=[1,1,8,0,1,2,3,4,5,6,7]}var ww=new Uint8Array([0,Zc.channelCount,0,0,Zc.sampleRate>>>24&255,Zc.sampleRate>>>17&255,Zc.sampleRate>>>
|
|
1331
|
+
8&255,Zc.sampleRate>>>0&255,0,0].concat(y(Db)));for(var xw=Zc.sampleRate,yw=u(k.ec()),In=yw.next();!In.done;In=yw.next()){var Jn=In.value,Of=Jn.data;null==Tj&&null!==Jn.pts&&(Tj=Jn.pts);for(var nh=0;nh<Of.length;){for(var fG=0!==(Of[nh+1]&16),gG=0!==(Of[nh+1]&8),zd=nh+2,Uj=0;255===Of[zd];)Uj+=255,zd+=1;Uj+=Of[zd];zd+=1;zd+=fG?2:0;zd+=gG?2:0;var zw=Of.slice(zd,zd+Uj);vw.push({data:zw,size:zw.byteLength,duration:960,qb:0,flags:{sb:0,hb:0,gb:0,cb:0,eb:2,ub:0}});nh=zd+Uj}}if(0==ww.byteLength||null==Tj)throw new R(2,
|
|
1332
|
+
3,3018);b.audioSamplingRate=Zc.sampleRate;b.channelsCount=Zc.channelCount;var hG=Tj/9E4*xw;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xw,duration:d,pb:[],wa:ww,Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:hG,ob:vw},stream:b}}n&&(l.push(n),n=null)}}catch(Kn){return Kn&&3023==Kn.code?Promise.resolve(new Uint8Array([])):Promise.reject(Kn)}if(!l.length)return Promise.reject(new R(2,3,3018));var Aw=new Dw(l);if(this.i.has(b.id))var Ln=
|
|
1333
|
+
this.i.get(b.id);else Ln=Jw(Aw),this.i.set(b.id,Ln);var iG=$w(Aw);this.g++;var jG=zc(Ln,iG);return Promise.resolve(jG)};N("shaka.transmuxer.TsTransmuxer",KC);KC.prototype.transmux=KC.prototype.transmux;KC.prototype.getOriginalMimeType=KC.prototype.getOriginalMimeType;KC.prototype.convertCodecs=KC.prototype.convertCodecs;KC.prototype.isSupported=KC.prototype.isSupported;KC.prototype.destroy=KC.prototype.destroy;var LC=["aac","ac-3","ec-3","mp3","opus"],MC=["avc","hevc"];
|
|
1334
1334
|
ae("video/mp2t",function(){return new KC("video/mp2t")},ee);/*
|
|
1335
1335
|
@license
|
|
1336
1336
|
EME Encryption Scheme Polyfill
|
|
@@ -1405,7 +1405,7 @@ function mD(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%6
|
|
|
1405
1405
|
c.h()});this.eventManager.s(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.s(this.button,"click",function(){c.ad&&c.ad.isLinear()?rD(c.controls):sD(c.controls)});this.ad&&(this.g(),this.h())}na(qD,gD);qD.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.Y;return a};
|
|
1406
1406
|
qD.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};qD.prototype.g=function(){};qD.prototype.h=function(){};N("shaka.ui.PlayButton",qD);function tD(a,b){qD.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}na(tD,qD);tD.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};tD.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",tD);function uD(a,b){gD.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=T("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.s(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";lD(c.g,!0)}else lD(c.g,
|
|
1407
1407
|
!1)});this.eventManager.s(window,"click",function(){lD(c.g,!1)});vD(this)}na(uD,gD);uD.prototype.release=function(){this.h=null;for(var a=u(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];gD.prototype.release.call(this)};function wD(a,b){xD.set(a,b)}function vD(a){for(var b=u(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=xD.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}N("shaka.ui.ContextMenu",uD);
|
|
1408
|
-
uD.registerElement=wD;var xD=new Map;function yD(a,b){gD.call(this,a,b);var c=this;this.m=null;this.o=!1;this.j=new Ob(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.Vf()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.o=!1;c.h.textContent="0s"});this.g=T("div");this.parent.appendChild(this.g);this.eventManager.s(this.g,"touchend",function(d){c.controls.kc()&&(c.controls.Bd()?(d.preventDefault(),c.controls.
|
|
1408
|
+
uD.registerElement=wD;var xD=new Map;function yD(a,b){gD.call(this,a,b);var c=this;this.m=null;this.o=!1;this.j=new Ob(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.Vf()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.o=!1;c.h.textContent="0s"});this.g=T("div");this.parent.appendChild(this.g);this.eventManager.s(this.g,"touchend",function(d){c.controls.kc()&&(c.controls.Bd()?(d.preventDefault(),c.controls.yc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.o)?
|
|
1409
1409
|
c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.V(1)):(c.o=!0,c.m=Date.now(),c.j.V(1))))});this.h=T("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=T("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}na(yD,gD);N("shaka.ui.HiddenSeekButton",yD);function zD(a,b){yD.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}na(zD,yD);N("shaka.ui.HiddenFastForwardButton",zD);function AD(a,b){yD.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}na(AD,yD);N("shaka.ui.HiddenRewindButton",AD);function BD(a,b,c,d){gD.call(this,a,b);var e=this;this.container=T("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,y(c));this.h=!1;this.bar=document.createElement("input");this.G=new Ob(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,y(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
|
|
1410
1410
|
this.parent.appendChild(this.container);this.eventManager.s(this.bar,"mousedown",function(){e.controls.kc()&&(e.h=!0,e.onChangeStart())});this.eventManager.s(this.bar,"touchstart",function(f){e.controls.kc()&&(e.h=!0,CD(e,f),e.onChangeStart())});this.eventManager.s(this.bar,"input",function(){e.onChange()});this.eventManager.s(this.bar,"touchmove",function(f){e.h&&(CD(e,f),e.onChange())});this.eventManager.s(this.bar,"touchend",function(f){e.h&&(e.h=!1,CD(e,f),e.onChangeEnd())});this.eventManager.s(this.bar,
|
|
1411
1411
|
"touchcancel",function(f){e.h&&(e.h=!1,CD(e,f),e.onChangeEnd())});this.eventManager.s(this.bar,"mouseup",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.s(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.s(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}na(BD,gD);q=BD.prototype;q.release=function(){this.G&&(this.G.stop(),this.G=null);gD.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};
|
|
@@ -1420,9 +1420,9 @@ q.update=function(){var a=this.H.seekBarColors,b=this.getValue(),c=this.video.bu
|
|
|
1420
1420
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):lD(this.container,!1)};
|
|
1421
1421
|
function ED(a){if(a.A.length){for(var b=a.player.Pa(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=u(a.A),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=u(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
1422
1422
|
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent"}function ID(a){ED(a);var b=a.player.Pa();b=b.end-b.start;a.player.U()&&5<b&&a.I.ya(1)}function HD(a){var b=a.player.Pa();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function GD(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1423
|
-
function JD(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
1423
|
+
function JD(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z;L(function(C){switch(C.g){case 1:d=KD(a);if(!d)return FD(a),C.return();0>c&&(c=0);e=a.player.Pa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return D(C,a.player.Zf(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return FD(a),C.return();a.player.U()?(h=e.end-c,a.u.textContent=1>h?a.localization.resolve("LIVE"):"-"+LD(h)):a.u.textContent=LD(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1424
1424
|
-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";r=g.uris[0].split("#xywh=")[0];if(a.l&&r===a.l.uris[0].split("#xywh=")[0]&&g.segment.Mb()==a.l.segment.Mb()&&g.segment.Jb()==a.l.segment.Jb()){C.D(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!r.startsWith("offline:")){C.D(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ra(C,5);p=xg;t=pl(g.segment.ka(),g.segment.Mb(),g.segment.Jb(),a.player.getConfiguration().streaming.retryParameters);
|
|
1425
|
-
a.j=a.player.fc().request(p,t,{type:1});return D(C,a.j.promise,7);case 7:x=C.h;a.j=null;"mjpg"==d.codecs?(w=(new Gg).box("mdat",Qg(function(E){r=URL.createObjectURL(new Blob([E],{type:"image/jpeg"}))})),w.parse(x.data,!1)):(
|
|
1425
|
+
a.j=a.player.fc().request(p,t,{type:1});return D(C,a.j.promise,7);case 7:x=C.h;a.j=null;"mjpg"==d.codecs?(w=(new Gg).box("mdat",Qg(function(E){r=URL.createObjectURL(new Blob([E],{type:"image/jpeg"}))})),w.parse(x.data,!1)):(B=d.mimeType||"image/jpeg",v=new Blob([x.data],{type:B}),r=URL.createObjectURL(v));ta(C,4);break;case 5:A=ua(C);if(7001==A.code)return C.return();throw A;case 4:try{a.i.removeChild(a.g)}catch(E){}a.g=T("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=r;
|
|
1426
1426
|
a.g.onload=function(){r.startsWith("blob:")&&URL.revokeObjectURL(r)};a.i.insertBefore(a.g,a.i.firstChild);case 3:z=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+z*g.positionX+"px",a.g.style.top="-"+z*g.positionY+"px",a.g.style.transform="scale("+z+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
1427
1427
|
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",G(C)}})}
|
|
1428
1428
|
function KD(a){var b=a.player.ve();if(!b.length)return null;for(var c={},d=u(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={lf:c.lf,jf:c.jf},e=d.next())if(c.lf=e.value,c.jf=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.lf&&g.bandwidth<.01*f.jf}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b.find(function(f){return"application/mp4"==f.mimeType&&
|
|
@@ -1433,8 +1433,8 @@ function KD(a){var b=a.player.ve();if(!b.length)return null;for(var c={},d=u(["i
|
|
|
1433
1433
|
SPDX-License-Identifier: MIT
|
|
1434
1434
|
*/
|
|
1435
1435
|
function ND(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function OD(a,b,c){b=1/Math.tan(b/2);a[0]=b/c;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[11]=-1;a[12]=0;a[13]=0;a[15]=0;c=1/-99.9;a[10]=100.1*c;a[14]=20*c}
|
|
1436
|
-
function PD(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],r=b[9],p=b[10],t=b[11],x=b[12],w=b[13],
|
|
1437
|
-
z=c[14];C=c[15];a[12]=v*d+
|
|
1436
|
+
function PD(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],r=b[9],p=b[10],t=b[11],x=b[12],w=b[13],B=b[14];b=b[15];var v=c[0],A=c[1],z=c[2],C=c[3];a[0]=v*d+A*h+z*n+C*x;a[1]=v*e+A*k+z*r+C*w;a[2]=v*f+A*l+z*p+C*B;a[3]=v*g+A*m+z*t+C*b;v=c[4];A=c[5];z=c[6];C=c[7];a[4]=v*d+A*h+z*n+C*x;a[5]=v*e+A*k+z*r+C*w;a[6]=v*f+A*l+z*p+C*B;a[7]=v*g+A*m+z*t+C*b;v=c[8];A=c[9];z=c[10];C=c[11];a[8]=v*d+A*h+z*n+C*x;a[9]=v*e+A*k+z*r+C*w;a[10]=v*f+A*l+z*p+C*B;a[11]=v*g+A*m+z*t+C*b;v=c[12];A=c[13];
|
|
1437
|
+
z=c[14];C=c[15];a[12]=v*d+A*h+z*n+C*x;a[13]=v*e+A*k+z*r+C*w;a[14]=v*f+A*l+z*p+C*B;a[15]=v*g+A*m+z*t+C*b}
|
|
1438
1438
|
function QD(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;0<m?(b=2*Math.sqrt(m+1),a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k-
|
|
1439
1439
|
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function RD(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function SD(){var a=new Float32Array(4);a[3]=1;return a}function TD(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function UD(a,b,c,d,e){this.m=a;this.oa=b;this.l=c;this.g=d;this.o=new cd;this.L=SD();this.h=SD();this.sa=this.ma=this.aa=this.j=null;this.G=ND();this.I=ND();this.M=ND();this.Y=ND();this.u=null;this.O=!1;this.J=this.F=null;this.qa=this.ra=0;this.$=this.P=this.S=this.K=null;this.H=0;this.i=75;this.X=0;this.A=e;VD(this)}UD.prototype.release=function(){this.o&&(this.o.release(),this.o=null);this.F&&(this.F.stop(),this.F=null);this.J&&(this.J.stop(),this.J=null)};
|
|
1440
1440
|
UD.prototype.hd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.l.width,this.l.height);WD(this,!1)};
|
|
@@ -1472,7 +1472,7 @@ q.configure=function(a){this.g=a;this.F.ah(a.castReceiverAppId,a.castAndroidRece
|
|
|
1472
1472
|
zE(this);this.g.seekOnTaps&&(AE(this),BE(this));this.Ua=T("div");this.Ua.classList.add("shaka-server-side-ad-container");this.h.appendChild(this.Ua);CE(this);this.J=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.J.push.apply(this.J,y(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));DE(this);this.Gb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));nE(this);a=u(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=
|
|
1473
1473
|
a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.s(b,"click",c);this.i.s(b,"dblclick",c)}};q.Dg=function(a){(this.S=a)?(this.j.setAttribute("shaka-controls","true"),this.o.tabIndex=-1,this.o.controls=!1):this.j.removeAttribute("shaka-controls");nE(this)};q.Lh=function(a){this.o.controls=a;this.o.tabIndex=a?0:-1;a&&this.Dg(!1)};q.getAd=function(){return this.m};q.Ci=function(){return this.F};q.Qi=function(){return this.ra};q.gj=function(){return this.j};q.jc=function(){return this.A};
|
|
1474
1474
|
q.Pi=function(){return this.o};q.Wc=function(){return this.G};q.Oi=function(){return this.oa};q.Hi=function(){return this.h};q.Yi=function(){return this.Ua};q.Ei=function(){return this.O};q.Fi=function(){return this.g};q.sj=function(){return this.Y};q.Gg=function(a){this.Y=a};q.mj=function(){return this.qa};q.Vf=function(){return this.l?this.l.getValue():this.A.currentTime};q.Nh=function(a){this.I=a};q.Bd=function(){return this.J.some(function(a){return!a.classList.contains("shaka-hidden")})};
|
|
1475
|
-
q.
|
|
1475
|
+
q.yc=function(){this.K.Ia()};q.Pd=function(){return document.fullscreenEnabled||this.o.webkitSupportsFullscreen?!0:!1};q.Zc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.o;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1476
1476
|
function EE(a){var b,c,d;return L(function(e){switch(e.g){case 1:ra(e,2);if(!document.fullscreenEnabled){b=a.o;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.D(4);break}if(!document.pictureInPictureElement){e.D(5);break}return D(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,D(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.D(4);break}ra(e,9);return D(e,screen.orientation.lock("landscape"),11);case 11:ta(e,
|
|
1477
1477
|
4,2);break;case 9:ua(e,2);case 4:ta(e,0);break;case 2:d=ua(e),a.dispatchEvent(new Q("error",(new Map).set("detail",d))),G(e)}})}function FE(a){var b;return L(function(c){if(!document.fullscreenEnabled)return b=a.o,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.D(0);screen.orientation&&screen.orientation.unlock();return D(c,document.exitFullscreen(),0)})}q.cf=function(){var a=this;return L(function(b){return a.Zc()?D(b,FE(a),0):D(b,EE(a),0)})};
|
|
1478
1478
|
q.De=function(){return this.F.Ga()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.o.disablePictureInPicture:!1};q.Ee=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
|
|
@@ -1485,9 +1485,9 @@ function vE(a){a.h=T("div");a.h.classList.add("shaka-controls-container");a.j.ap
|
|
|
1485
1485
|
function yE(a){var b=T("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Za=new tD(b,a);a.H.push(a.Za)}function xE(a){var b=T("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function KE(a){a.L=T("div");a.L.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();lD(a.L,b);a.M.appendChild(a.L);b=new oD(a.L,a);a.H.push(b);b=new nD(a.L,a);a.H.push(b)}
|
|
1486
1486
|
function zE(a){a.$=T("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=T("div");b.classList.add("shaka-spinner");a.$.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");b.setAttribute("fill",
|
|
1487
1487
|
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function AE(a){var b=T("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.Vb=new zD(b,a);a.H.push(a.Vb)}function BE(a){var b=T("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.Wb=new AD(b,a);a.H.push(a.Wb)}
|
|
1488
|
-
function CE(a){a.M=T("div");a.M.classList.add("shaka-bottom-controls");a.M.classList.add("shaka-no-propagation");a.h.appendChild(a.M);a.i.s(a.M,"click",function(d){d.target.closest(".shaka-overflow-button")||a.
|
|
1488
|
+
function CE(a){a.M=T("div");a.M.classList.add("shaka-bottom-controls");a.M.classList.add("shaka-no-propagation");a.h.appendChild(a.M);a.i.s(a.M,"click",function(d){d.target.closest(".shaka-overflow-button")||a.yc()});KE(a);a.X=T("div");a.X.classList.add("shaka-controls-button-panel");a.X.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.X.classList.add("shaka-tooltips-on");a.M.appendChild(a.X);for(var b=u(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,uE.get(c)?
|
|
1489
1489
|
(c=uE.get(c).create(a.X,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function DE(a){if(a.g.addSeekBar)a.l=LE.create(a.M,a),a.H.push(a.l);else{a=u(a.J);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function wE(a){a.O=T("div");a.O.classList.add("shaka-client-side-ad-container");lD(a.O,!1);a.i.s(a.O,"click",function(){JE(a)});a.j.appendChild(a.O)}
|
|
1490
|
-
function qE(a){a.i.s(a.G,"buffering",function(){a.S&&lD(a.$,a.G.Od())});a.S&&lD(a.$,a.G.Od());a.i.s(window,"keydown",function(b){ME(a,b)});a.i.s(window,"click",function(){return a.
|
|
1490
|
+
function qE(a){a.i.s(a.G,"buffering",function(){a.S&&lD(a.$,a.G.Od())});a.S&&lD(a.$,a.G.Od());a.i.s(window,"keydown",function(b){ME(a,b)});a.i.s(window,"click",function(){return a.yc()});a.i.s(a,"submenuopen",function(){a.yc()});a.i.s(a.A,"play",function(){nE(a)});a.i.s(a.A,"pause",function(){nE(a)});a.i.s(a.j,"mousemove",function(b){IE(a,b)});a.i.s(a.j,"touchmove",function(b){IE(a,b)},{passive:!0});a.i.s(a.j,"touchend",function(b){IE(a,b)},{passive:!0});a.i.s(a.j,"mouseleave",function(){a.I||a.P.Ia()});
|
|
1491
1491
|
a.i.s(a.F,"caststatuschanged",function(){rE(a)});a.i.s(a.u,"vrstatuschanged",function(){a.dispatchEvent(new Q("vrstatuschanged"))});a.i.s(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&IE(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&e&&!d&&0<c&&(b.preventDefault(),
|
|
1492
1492
|
NE(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&e&&!d&&0<c&&(b.preventDefault(),NE(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),NE(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),NE(a,a.l.getValue()+f));break;case "Home":a.l&&NE(a,a.G.Pa().start);break;case "End":a.l&&NE(a,a.G.Pa().end);break;case "f":a.Pd()&&a.cf();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.o.muted=!a.o.muted;break;case "p":a.De()&&a.$d();break;
|
|
1493
1493
|
case " ":e&&OE(a)}}});a.i.s(a.j,"keyup",function(b){a.ma.delete(b.key)});a.i.s(a.Ja,"ad-started",function(b){a.m=b.ad;a.Sh()});a.i.s(a.Ja,"ad-stopped",function(){a.m=null;a.ph()});screen.orientation&&a.i.s(screen.orientation,"change",function(){return L(function(b){return D(b,PE(a),0)})})}
|
|
@@ -1562,12 +1562,12 @@ a.Da("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1562
1562
|
"\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u89e3\u6790\u5ea6"],
|
|
1563
1563
|
["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.$g(navigator.languages||[]);return a}N("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.cg;Z.prototype.incrementPitch=Z.prototype.ag;Z.prototype.incrementYaw=Z.prototype.dg;
|
|
1564
1564
|
Z.prototype.toggleStereoscopicMode=Z.prototype.hd;Z.prototype.setVRFieldOfView=Z.prototype.fk;Z.prototype.getVRFieldOfView=Z.prototype.dj;Z.prototype.getVRNorth=Z.prototype.ej;Z.prototype.isPlayingVR=Z.prototype.Nb;Z.prototype.canPlayVR=Z.prototype.Bf;Z.prototype.hideUI=Z.prototype.lj;Z.prototype.showUI=Z.prototype.gk;Z.prototype.isOpaque=Z.prototype.kc;Z.prototype.hideAdUI=Z.prototype.ph;Z.prototype.showAdUI=Z.prototype.Sh;Z.prototype.togglePiP=Z.prototype.$d;Z.prototype.isPiPEnabled=Z.prototype.Ee;
|
|
1565
|
-
Z.prototype.isPiPAllowed=Z.prototype.De;Z.prototype.toggleFullScreen=Z.prototype.cf;Z.prototype.isFullScreenEnabled=Z.prototype.Zc;Z.prototype.isFullScreenSupported=Z.prototype.Pd;Z.prototype.hideSettingsMenus=Z.prototype.
|
|
1565
|
+
Z.prototype.isPiPAllowed=Z.prototype.De;Z.prototype.toggleFullScreen=Z.prototype.cf;Z.prototype.isFullScreenEnabled=Z.prototype.Zc;Z.prototype.isFullScreenSupported=Z.prototype.Pd;Z.prototype.hideSettingsMenus=Z.prototype.yc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Bd;Z.prototype.setLastTouchEventTime=Z.prototype.Nh;Z.prototype.getDisplayTime=Z.prototype.Vf;Z.prototype.isCastAllowed=Z.prototype.mj;Z.prototype.setSeeking=Z.prototype.Gg;Z.prototype.isSeeking=Z.prototype.sj;
|
|
1566
1566
|
Z.prototype.getConfig=Z.prototype.Fi;Z.prototype.getClientSideAdContainer=Z.prototype.Ei;Z.prototype.getServerSideAdContainer=Z.prototype.Yi;Z.prototype.getControlsContainer=Z.prototype.Hi;Z.prototype.getLocalPlayer=Z.prototype.Oi;Z.prototype.getPlayer=Z.prototype.Wc;Z.prototype.getLocalVideo=Z.prototype.Pi;Z.prototype.getVideo=Z.prototype.jc;Z.prototype.getVideoContainer=Z.prototype.gj;Z.prototype.getLocalization=Z.prototype.Qi;Z.prototype.getCastProxy=Z.prototype.Ci;Z.prototype.getAd=Z.prototype.getAd;
|
|
1567
1567
|
Z.prototype.setEnabledNativeControls=Z.prototype.Lh;Z.prototype.setEnabledShakaControls=Z.prototype.Dg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.vj;Z.prototype.allowCast=Z.prototype.li;Z.registerSeekBar=function(a){LE=a};Z.registerElement=tE;Z.prototype.destroy=Z.prototype.destroy;var uE=new Map,LE=new MD;function SE(a,b){gD.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=Pm();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=T("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
|
|
1568
1568
|
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);TE(this);this.eventManager.s(this.localization,"locale-updated",function(){UE(c)});this.eventManager.s(this.localization,"locale-changed",function(){UE(c)});this.eventManager.s(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&lD(c.g,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){lD(c.g,!0)});this.eventManager.s(this.controls,"submenuopen",function(){lD(c.h,!1)});this.eventManager.s(this.h,"touchstart",function(d){c.controls.Nh(Date.now());
|
|
1569
1569
|
d.stopPropagation()});this.eventManager.s(this.g,"click",function(){VE(c)});UE(this);this.ad&&this.ad.isLinear()&&lD(this.g,!1)}na(SE,gD);SE.prototype.release=function(){this.j=null;for(var a=u(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];gD.prototype.release.call(this)};function WE(a,b){XE.set(a,b)}
|
|
1570
|
-
function TE(a){for(var b=u(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,XE.get(c)?(c=XE.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function VE(a){if(a.controls.Bd())a.controls.
|
|
1570
|
+
function TE(a){for(var b=u(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,XE.get(c)?(c=XE.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function VE(a){if(a.controls.Bd())a.controls.yc();else{lD(a.h,!0);nE(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.h.childNodes,b)&&gb(a.h.childNodes,b)[0].focus()}}function UE(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1571
1571
|
N("shaka.ui.OverflowMenu",SE);SE.registerElement=WE;function YE(){}YE.prototype.create=function(a,b){return new SE(a,b)};tE("overflow_menu",new YE);var XE=new Map;function ZE(a,b){gD.call(this,a,b);var c=this;this.g=Pm();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=T("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=T("span");a.appendChild(this.j);
|
|
1572
1572
|
this.i=T("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);$E(this);aF(this);this.eventManager.s(this.localization,"locale-updated",function(){$E(c)});this.eventManager.s(this.localization,"locale-changed",function(){$E(c)});this.eventManager.s(this.g,"click",function(){c.controls.jc().webkitShowPlaybackTargetPicker()});a=this.controls.jc();this.eventManager.s(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1573
1573
|
c.player.Id()==Oo;lD(c.g,"available"==d.availability&&e)});this.eventManager.s(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){aF(c)})}na(ZE,gD);function aF(a){var b=a.controls.jc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function $E(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}N("shaka.ui.AirPlayButton",ZE);function bF(){}bF.prototype.create=function(a,b){return new ZE(a,b)};WE("airplay",new bF);
|
|
@@ -1578,19 +1578,19 @@ function dF(a){var b={controlPanelElements:"play_pause time_and_duration spacer
|
|
|
1578
1578
|
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
|
|
1579
1579
|
trackLabelFormat:eF,textTrackLabelFormat:eF,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!0,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular"};"remote"in HTMLMediaElement.prototype?
|
|
1580
1580
|
b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.fg()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1581
|
-
function fF(){var a,b,c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,
|
|
1582
|
-
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=iF(h,c,d),m=l.wh,n=l.$h,jF(h,g,m,n));C.D(2);break}r=u(a);p=r.next();case 4:if(p.done){C.D(2);break}t=p.value;if(t.ui){C.D(5);break}x=null;w=u(b);for(f=w.next();!f.done;f=w.next())if(
|
|
1581
|
+
function fF(){var a,b,c,d,e,f,g,h,k,l,m,n,r,p,t,x,w,B,v,A,z;return L(function(C){switch(C.g){case 1:oz();if(!$n())return gF("shaka-ui-load-failed",hF),C.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){C.D(2);break}if(b.length&&!a.length){e=u(b);for(f=e.next();!f.done;f=e.next())g=f.value,
|
|
1582
|
+
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=iF(h,c,d),m=l.wh,n=l.$h,jF(h,g,m,n));C.D(2);break}r=u(a);p=r.next();case 4:if(p.done){C.D(2);break}t=p.value;if(t.ui){C.D(5);break}x=null;w=u(b);for(f=w.next();!f.done;f=w.next())if(B=f.value,B.parentElement==t){x=B;break}x||(x=document.createElement("video"),x.setAttribute("playsinline",""),t.appendChild(x));v=iF(t,c,d);A=v.wh;z=v.$h;ra(C,7);return D(C,jF(t,x,A,z),9);case 9:ta(C,5);break;case 7:return ua(C),
|
|
1583
1583
|
gF("shaka-ui-load-failed",kF),C.return();case 5:p=r.next();C.D(4);break;case 2:gF("shaka-ui-loaded"),G(C)}})}function gF(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1584
1584
|
function jF(a,b,c,d){var e,f,g,h,k,l,m,n,r;return L(function(p){switch(p.g){case 1:e=new U;f=new cF(e,a,b,d);e.Wg(c);g="";h=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(g=a.dataset.shakaPlayerCastReceiverId,h="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(g=b.dataset.shakaPlayerCastReceiverId,h="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);g.length&&f.configure({castReceiverAppId:g,castAndroidReceiverCompatible:h});
|
|
1585
|
-
b.controls&&f.g.Lh(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");m=u(b.querySelectorAll("source"));n=m.next();case 2:if(n.done){p.D(4);break}r=n.value;ra(p,5);return D(p,f.g.Wc().load(r.getAttribute("src")),7);case 7:p.D(4);break;case 5:ua(p);case 3:n=m.next();p.D(2);break;case 4:return D(p,e.
|
|
1585
|
+
b.controls&&f.g.Lh(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");m=u(b.querySelectorAll("source"));n=m.next();case 2:if(n.done){p.D(4);break}r=n.value;ra(p,5);return D(p,f.g.Wc().load(r.getAttribute("src")),7);case 7:p.D(4);break;case 5:ua(p);case 3:n=m.next();p.D(2);break;case 4:return D(p,e.Pc(b),0)}})}
|
|
1586
1586
|
function iF(a,b,c){var d=null,e=u(b);for(b=e.next();!b.done;b=e.next())if(b=b.value,b.parentElement==a){d=b;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));e=null;c=u(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,b.parentElement==a){e=b;break}e||(e=document.createElement("canvas"),e.classList.add("shaka-vr-canvas-container"),a.appendChild(e));return{wh:d,$h:e}}N("shaka.ui.Overlay",cF);cF.prototype.setEnabled=cF.prototype.ck;
|
|
1587
1587
|
cF.prototype.getControls=cF.prototype.Gi;cF.prototype.configure=cF.prototype.configure;cF.prototype.getConfiguration=cF.prototype.getConfiguration;cF.prototype.isMobile=cF.prototype.fg;cF.prototype.destroy=cF.prototype.destroy;var eF=0;cF.TrackLabelFormat={LANGUAGE:eF,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var hF=0,kF=1;cF.FailReasonCode={NO_BROWSER_SUPPORT:hF,PLAYER_FAILED_TO_LOAD:kF};
|
|
1588
1588
|
"complete"==document.readyState?L(function(a){if(1==a.g)return D(a,Promise.resolve(),2);fF();G(a)}):window.addEventListener("load",fF);function lF(a,b,c,d,e,f,g,h){function k(H){var J="";5<=H&&(J=" "+f.resolve("SURROUND"));return J}function l(H,J,F,I){H=[H,J];h&&null!=I&&H.push(I);F&&3==g&&H.push(F);return H.join(": ")}function m(H){return"variant"==H.type?H.audioRoles?H.audioRoles.join(", "):void 0:H.roles.join(", ")}var n=a.find(function(H){return 1==H.active}),r=hD(b);Qm(b);b.appendChild(r);r=new Map;for(var p=u(a),t=p.next();!t.done;t=p.next())t=t.value,r.has(t.language)||r.set(t.language,new Set),r.get(t.language).add(m(t));
|
|
1589
|
-
r=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";p={};a=u(a);for(t=a.next();!t.done;p={Eb:p.Eb},t=a.next()){p.Eb=t.value;t=p.Eb.language;var x=p.Eb.forced,w=f.resolve("SUBTITLE_FORCED"),
|
|
1590
|
-
(E.textContent+=k(
|
|
1589
|
+
r=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";p={};a=u(a);for(t=a.next();!t.done;p={Eb:p.Eb},t=a.next()){p.Eb=t.value;t=p.Eb.language;var x=p.Eb.forced,w=f.resolve("SUBTITLE_FORCED"),B=m(p.Eb),v=p.Eb.label,A=p.Eb.channelsCount,z=l(t,B,v,A);if(!r.has(z)){r.add(z);var C=Pm();C.addEventListener("click",function(H){return function(){c(H.Eb)}}(p));var E=T("span");C.appendChild(E);E.textContent=mF(t,f);switch(g){case eF:h&&(E.textContent+=k(A));x&&(E.textContent+=" ("+w+")");break;case 1:h&&
|
|
1590
|
+
(E.textContent+=k(A));B?E.textContent=B:(Ua("Track #"+p.Eb.id+" does not have a role, but the UI is configured to only show role."),E.textContent="?");x&&(E.textContent+=" ("+w+")");break;case 2:h&&(E.textContent+=k(A));B&&(E.textContent+=": "+B);x&&(E.textContent+=" ("+w+")");break;case 3:v?E.textContent=v:(Ua("Track #"+p.Eb.id+" does not have a label, but the UI is configured to only show labels."),E.textContent="?")}d&&z==n&&(C.appendChild(kD()),E.classList.add("shaka-chosen-item"),C.ariaSelected=
|
|
1591
1591
|
"true",e.textContent=E.textContent);b.appendChild(C)}}}function mF(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Rc(a);return a in cD?cD[a].B:c in cD?cD[c].B+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function nF(a,b,c){gD.call(this,a,b);var d=this;oF(this,c);pF(this);qF(this);this.eventManager.s(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new Q("submenuopen")),lD(d.menu,!0),jD(d.menu)):lD(d.menu,!1)})}na(nF,gD);
|
|
1592
1592
|
function oF(a,b){a.button=Pm();a.button.classList.add("shaka-overflow-button");a.icon=T("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=T("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=T("span");b.appendChild(a.nameSpan);a.currentSelection=T("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
|
|
1593
|
-
function pF(a){a.menu=T("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Pm();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.s(a.backButton,"click",function(){a.controls.
|
|
1593
|
+
function pF(a){a.menu=T("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Pm();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.s(a.backButton,"click",function(){a.controls.yc()});var b=T("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1594
1594
|
T("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function qF(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.s(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}lD(a.parent,!0);fb(a.parent.childNodes,b)&&gb(a.parent.childNodes,b)[0].focus();nE(a.controls)}))}N("shaka.ui.SettingsMenu",nF);function rF(a,b){nF.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.s(this.localization,"locale-updated",function(){sF(c)});this.eventManager.s(this.localization,"locale-changed",function(){sF(c)});this.eventManager.s(this.player,"trackschanged",function(){var d=0<c.player.rb().length;lD(c.button,d);tF(c)});this.eventManager.s(this.player,"variantchanged",
|
|
1595
1595
|
function(){tF(c)});sF(this);tF(this)}na(rF,nF);
|
|
1596
1596
|
function tF(a){var b=a.player.rb();lF(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.Xe(c.language,c.roles[0],c.channelsCount):a.player.Xe(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);jD(a.menu);a.controls.dispatchEvent(new Q("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);lD(a.button,2<a.menu.getElementsByTagName("button").length)}
|
|
@@ -1598,7 +1598,7 @@ function sF(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ar
|
|
|
1598
1598
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);wF(this);xF(this);this.eventManager.s(this.localization,"locale-updated",function(){wF(c)});this.eventManager.s(this.localization,"locale-changed",function(){wF(c)});this.eventManager.s(this.g,"click",function(){yF(c)});this.eventManager.s(this.controls,"caststatuschanged",function(){xF(c)})}na(vF,gD);
|
|
1599
1599
|
function yF(a){var b;L(function(c){if(1==c.g){if(a.h.Ga())return a.h.Th(),c.D(0);ra(c,3);a.g.disabled=!0;return D(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ta(c,0);b=ua(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new Q("error",(new Map).set("detail",b)));G(c)})}function xF(a){var b=a.h.Af()&&a.controls.qa,c=a.h.Ga();lD(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");zF(a)}
|
|
1600
1600
|
function zF(a){a.j.textContent=a.h.Ga()?a.h.Ue():a.localization.resolve("OFF")}function wF(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");zF(a)}N("shaka.ui.CastButton",vF);function AF(){}AF.prototype.create=function(a,b){return new vF(a,b)};WE("cast",new AF);tE("cast",new AF);function BF(a,b){gD.call(this,a,b);var c=this;this.g=Pm();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);CF(this);this.h=this.controls.g.fastForwardRates;this.eventManager.s(this.localization,"locale-updated",function(){CF(c)});this.eventManager.s(this.localization,"locale-changed",function(){CF(c)});
|
|
1601
|
-
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1601
|
+
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Hc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(BF,gD);function CF(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",BF);function DF(){}DF.prototype.create=function(a,b){return new BF(a,b)};tE("fast_forward",new DF);function EF(a,b){gD.call(this,a,b);var c=this;this.h=this.controls.o;this.g=Pm();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");FF(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);GF(this);this.eventManager.s(this.localization,"locale-updated",function(){GF(c)});this.eventManager.s(this.localization,"locale-changed",function(){GF(c)});this.eventManager.s(this.g,"click",function(){return L(function(d){return D(d,
|
|
1602
1602
|
c.controls.cf(),0)})});this.eventManager.s(document,"fullscreenchange",function(){c.g.textContent=c.controls.Zc()?"fullscreen_exit":"fullscreen";GF(c)});this.eventManager.s(this.h,"loadedmetadata",function(){FF(c)});this.eventManager.s(this.h,"loadeddata",function(){FF(c)})}na(EF,gD);function FF(a){a.controls.Pd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function GF(a){a.g.ariaLabel=a.localization.resolve(a.controls.Zc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1603
1603
|
N("shaka.ui.FullscreenButton",EF);function HF(){}HF.prototype.create=function(a,b){return new EF(a,b)};tE("fullscreen",new HF);function IF(a,b){gD.call(this,a,b);var c=this;this.g=Pm();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=T("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=T("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=T("span");this.l.classList.add("shaka-current-selection-span");
|
|
1604
1604
|
a.appendChild(this.l);this.g.appendChild(a);JF(this);this.parent.appendChild(this.g);this.eventManager.s(this.localization,"locale-updated",function(){JF(c)});this.eventManager.s(this.localization,"locale-changed",function(){JF(c)});this.eventManager.s(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Ia();c.h.ya(1)});this.m=this.video.loop;this.h=new Ob(function(){c.m!=c.video.loop&&(JF(c),c.m=c.video.loop)});this.h.ya(1)}na(IF,gD);
|
|
@@ -1622,13 +1622,13 @@ function pG(a){var b,c;L(function(d){switch(d.g){case 1:if(a.controls.F.Af()&&a.
|
|
|
1622
1622
|
case 9:ta(d,8);break;case 7:ua(d);case 8:return ra(d,11),D(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;ta(d,0);break;case 11:ua(d),b(!0),G(d)}})}function oG(a){var b=a.localization.resolve("CAST"),c=gc();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}N("shaka.ui.RemoteButton",nG);function qG(){}qG.prototype.create=function(a,b){return new nG(a,b)};WE("remote",new qG);tE("remote",new qG);function rG(a,b){nF.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.s(this.localization,"locale-updated",function(){sG(c)});this.eventManager.s(this.localization,"locale-changed",function(){sG(c)});this.eventManager.s(this.player,"variantchanged",function(){tG(c)});this.eventManager.s(this.player,"trackschanged",function(){tG(c)});this.eventManager.s(this.player,
|
|
1623
1623
|
"abrstatuschanged",function(){tG(c)});tG(this)}na(rG,nF);
|
|
1624
1624
|
function tG(a){var b=[];a.player.Id()!=Oo&&(b=a.player.rb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=b.filter(function(k,l){var m=-1;m=a.player.Yc()?b.findIndex(function(n){return n.bandwidth==k.bandwidth}):b.findIndex(function(n){return n.height==
|
|
1625
|
-
k.height&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.Yc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=hD(a.menu);Qm(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=u(b),g=f.next();!g.done;e={Rb:e.Rb},g=f.next()){e.Rb=g.value;g=Pm();g.classList.add("explicit-resolution");a.eventManager.s(g,"click",function(k){return function(){var l=
|
|
1626
|
-
a.player.Ye(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=T("span");h.textContent=a.player.Yc()&&e.Rb.bandwidth?Math.round(e.Rb.bandwidth/1E3)+" kbits/s":e.Rb.height&&e.Rb.width?uG(e.Rb):"Unknown";g.appendChild(h);d||e.Rb!=c||(g.ariaSelected="true",g.appendChild(kD()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Pm();e.classList.add("shaka-enable-abr-button");a.eventManager.s(e,"click",
|
|
1627
|
-
tG(a)});a.g=T("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(kD()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);jD(a.menu);a.controls.dispatchEvent(new Q("resolutionselectionupdated"));
|
|
1628
|
-
function uG(a){var b=a.height||0,c=a.width||0,d=b;c/b>16/9&&(d=Math.round(9*c/16));b=d+"p";2160==d&&(b="4K");(d=a.frameRate)&&(50<=d||20>=d)&&(b+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)b+=" (HDR)";"CH-STEREO"==a.videoLayout&&(b+=" (3D)");return b}
|
|
1625
|
+
k.height&&n.videoBandwidth==k.videoBandwidth&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.Yc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=hD(a.menu);Qm(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=u(b),g=f.next();!g.done;e={Rb:e.Rb},g=f.next()){e.Rb=g.value;g=Pm();g.classList.add("explicit-resolution");a.eventManager.s(g,"click",function(k){return function(){var l=
|
|
1626
|
+
k.Rb;a.player.configure({abr:{enabled:!1}});a.player.Ye(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=T("span");h.textContent=a.player.Yc()&&e.Rb.bandwidth?Math.round(e.Rb.bandwidth/1E3)+" kbits/s":e.Rb.height&&e.Rb.width?uG(e.Rb):"Unknown";g.appendChild(h);d||e.Rb!=c||(g.ariaSelected="true",g.appendChild(kD()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Pm();e.classList.add("shaka-enable-abr-button");a.eventManager.s(e,"click",
|
|
1627
|
+
function(){a.player.configure({abr:{enabled:!0}});tG(a)});a.g=T("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(kD()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);jD(a.menu);a.controls.dispatchEvent(new Q("resolutionselectionupdated"));
|
|
1628
|
+
sG(a);lD(a.button,1<b.length)}function uG(a){var b=a.height||0,c=a.width||0,d=b;c/b>16/9&&(d=Math.round(9*c/16));b=d+"p";2160==d&&(b="4K");(d=a.frameRate)&&(50<=d||20>=d)&&(b+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)b+=" (HDR)";"CH-STEREO"==a.videoLayout&&(b+=" (3D)");return b}
|
|
1629
1629
|
function sG(a){var b=a.player.Yc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}N("shaka.ui.ResolutionSelection",rG);function vG(){}
|
|
1630
1630
|
vG.prototype.create=function(a,b){return new rG(a,b)};WE("quality",new vG);tE("quality",new vG);function wG(a,b){gD.call(this,a,b);var c=this;this.g=Pm();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);xG(this);this.h=this.controls.g.rewindRates;this.eventManager.s(this.localization,"locale-updated",function(){xG(c)});this.eventManager.s(this.localization,"locale-changed",function(){xG(c)});
|
|
1631
|
-
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1631
|
+
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Hc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(wG,gD);function xG(a){a.g.ariaLabel=a.localization.resolve("REWIND")}N("shaka.ui.RewindButton",wG);function yG(){}yG.prototype.create=function(a,b){return new wG(a,b)};tE("rewind",new yG);function zG(a,b){gD.call(this,a,b);var c=this;this.j=T("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=T("div");this.h.classList.add("shaka-skip-ad-counter");lD(this.h,!1);this.j.appendChild(this.h);this.g=Pm();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;lD(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);AG(this);this.i=new Ob(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1632
1632
|
d:(c.i.stop(),lD(c.h,!1))});this.eventManager.s(this.localization,"locale-updated",function(){AG(c)});this.eventManager.s(this.localization,"locale-changed",function(){AG(c)});this.eventManager.s(this.adManager,"ad-started",function(){BG(c)});this.eventManager.s(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),lD(c.h,!1))});this.eventManager.s(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;lD(c.g,!1);lD(c.h,!1)});this.eventManager.s(this.g,
|
|
1633
1633
|
"click",function(){c.ad.skip()});this.ad&&BG(this)}na(zG,gD);zG.prototype.release=function(){this.i.stop();this.i=null;gD.prototype.release.call(this)};function AG(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function BG(a){a.ad.isSkippable()&&(lD(a.g,!0),lD(a.h,!0),a.h.textContent="",a.i.Ia(),a.i.ya(.5))}N("shaka.ui.SkipAdButton",zG);function CG(a,b){qD.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}na(CG,qD);CG.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
|
|
1634
1634
|
CG.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};N("shaka.ui.SmallPlayButton",CG);function DG(){}DG.prototype.create=function(a,b){return new CG(a,b)};tE("play_pause",new DG);function EG(a,b){gD.call(this,a,b);a=T("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}na(EG,gD);N("shaka.ui.Spacer",EG);function FG(){}FG.prototype.create=function(a,b){return new EG(a,b)};tE("spacer",new FG);function GG(a,b){function c(k){return mD(h.g[k],!1)+" (m)"}function d(k){return Math.round(h.g[k]/1E3)+" (kbits/s)"}function e(k){return h.g[k].toFixed(2)+" (s)"}function f(k){return h.g[k]+" (frames)"}function g(k){return h.g[k]+" (px)"}gD.call(this,a,b);var h=this;this.i=Pm();this.i.classList.add("shaka-statistics-button");this.j=T("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=T("label");a.classList.add("shaka-overflow-button-label");
|
|
@@ -1637,10 +1637,10 @@ this.u={};this.A={width:g,height:g,completionPercent:function(k){return h.g[k]+"
|
|
|
1637
1637
|
"MB":1E3<k?(k/1E3).toFixed(2)+"KB":k+"B"}};this.l=new Ob(function(){h.g=h.player.getStats();for(var k=u(h.F),l=k.next();!l.done;l=k.next())l=l.value,h.u[l].textContent=h.A[l](l)});HG(this);IG(this);this.eventManager.s(this.localization,"locale-updated",function(){HG(h)});this.eventManager.s(this.localization,"locale-changed",function(){HG(h)});this.eventManager.s(this.i,"click",function(){lD(h.parent,!1);h.h.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ya(.1),lD(h.h,!0)):
|
|
1638
1638
|
(h.j.textContent="insert_chart_outlined",h.l.stop(),lD(h.h,!1));HG(h)})}na(GG,gD);function HG(a){a.o.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}
|
|
1639
1639
|
function IG(a){for(var b=u(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.G.includes(c)){var d=a.h,e=d.appendChild,f=a,g=T("div"),h=T("label");h.textContent=c+":";g.appendChild(h);h=T("span");h.textContent=f.A[c](c);g.appendChild(h);f.u[c]=h;e.call(d,g);a.F.push(c)}else Ua("Unrecognized statistic element:",c)}GG.prototype.release=function(){this.l.stop();this.l=null;gD.prototype.release.call(this)};N("shaka.ui.StatisticsButton",GG);function JG(){}
|
|
1640
|
-
JG.prototype.create=function(a,b){return new GG(a,b)};WE("statistics",new JG);wD("statistics",new JG);function KG(a,b){nF.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.
|
|
1640
|
+
JG.prototype.create=function(a,b){return new GG(a,b)};WE("statistics",new JG);wD("statistics",new JG);function KG(a,b){nF.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Bc()?this.button.ariaPressed="true":this.button.ariaPressed="false";LG(this);this.eventManager.s(this.localization,"locale-updated",function(){MG(c);NG(c)});this.eventManager.s(this.localization,"locale-changed",function(){MG(c);NG(c)});this.eventManager.s(this.player,
|
|
1641
1641
|
"texttrackvisibility",function(){OG(c);NG(c)});this.eventManager.s(this.player,"textchanged",function(){NG(c)});this.eventManager.s(this.player,"trackschanged",function(){PG(c)});OG(this);MG(this);NG(this);PG(this)}na(KG,nF);function LG(a){var b=Pm();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(kD());a.g=T("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1642
|
-
function OG(a){a.player.
|
|
1643
|
-
function NG(a){var b=a.player.ic();lF(b,a.menu,function(c){return QG(a,c)},a.player.
|
|
1642
|
+
function OG(a){a.player.Bc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new Q("captionselectionupdated"))}
|
|
1643
|
+
function NG(a){var b=a.player.ic();lF(b,a.menu,function(c){return QG(a,c)},a.player.Bc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=Pm();b.classList.add("shaka-turn-captions-off-button");a.eventManager.s(b,"click",function(){a.player.bf(!1);NG(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Bc()||(b.ariaSelected="true",b.appendChild(kD()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1644
1644
|
a.button.setAttribute("shaka-status",a.currentSelection.textContent);jD(a.menu);a.controls.dispatchEvent(new Q("captionselectionupdated"))}function QG(a,b){return L(function(c){a.player.Ag(b);return D(c,a.player.bf(!0),0)})}
|
|
1645
1645
|
function MG(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function PG(a){var b=0<a.player.ic().length;lD(a.button,b);NG(a)}N("shaka.ui.TextSelection",KG);function RG(){}RG.prototype.create=function(a,b){return new KG(a,b)};WE("captions",new RG);tE("captions",new RG);function SG(a,b){gD.call(this,a,b);var c=this;this.g=Pm();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=T("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=T("span");a.appendChild(this.j);this.i=T("span");this.i.classList.add("shaka-current-selection-span");
|
|
1646
1646
|
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);TG(this);this.eventManager.s(this.localization,"locale-updated",function(){TG(c)});this.eventManager.s(this.localization,"locale-changed",function(){TG(c)});var d=this.controls.u;this.eventManager.s(this.g,"click",function(){d.hd()});this.eventManager.s(d,"vrstatuschanged",function(){lD(c.g,c.controls.Nb())});lD(this.g,this.controls.Nb())}na(SG,gD);
|