shaka-player 4.7.9 → 4.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/CONTRIBUTORS +1 -0
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.debug.js +72 -72
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +92 -92
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +86 -87
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +112 -112
- package/dist/shaka-player.ui.map +2 -2
- package/lib/dash/segment_template.js +18 -13
- package/lib/hls/hls_parser.js +2 -2
- package/lib/media/segment_reference.js +4 -1
- package/lib/media/streaming_engine.js +2 -2
- package/lib/player.js +1 -1
- package/lib/util/periods.js +23 -1
- package/lib/util/stream_utils.js +1 -1
- package/package.json +2 -2
package/dist/shaka-player.ui.js
CHANGED
|
@@ -67,10 +67,10 @@ var eb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
67
67
|
Copyright 2006 The Closure Library Authors
|
|
68
68
|
SPDX-License-Identifier: Apache-2.0
|
|
69
69
|
*/
|
|
70
|
-
function fb(a){var b;a instanceof fb?(gb(this,a.wb),this.Bc=a.Bc,hb(this,a.Kb),jb(this,a.Tc),this.Ya=a.Ya,kb(this,a.g.clone()),this.
|
|
71
|
-
p.toString=function(){var a=[],b=this.wb;b&&a.push(nb(b,ob,!0),":");if(b=this.Kb){a.push("//");var c=this.Bc;c&&a.push(nb(c,ob,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Tc;null!=b&&a.push(":",String(b))}if(b=this.Ya)this.Kb&&"/"!=b.charAt(0)&&a.push("/"),a.push(nb(b,"/"==b.charAt(0)?pb:qb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.
|
|
70
|
+
function fb(a){var b;a instanceof fb?(gb(this,a.wb),this.Bc=a.Bc,hb(this,a.Kb),jb(this,a.Tc),this.Ya=a.Ya,kb(this,a.g.clone()),this.pc=a.pc):a&&(b=String(a).match(eb))?(gb(this,b[1]||"",!0),this.Bc=lb(b[2]||""),hb(this,b[3]||"",!0),jb(this,b[4]),this.Ya=lb(b[5]||"",!0),kb(this,b[6]||"",!0),this.pc=lb(b[7]||"")):this.g=new mb(null)}p=fb.prototype;p.wb="";p.Bc="";p.Kb="";p.Tc=null;p.Ya="";p.pc="";
|
|
71
|
+
p.toString=function(){var a=[],b=this.wb;b&&a.push(nb(b,ob,!0),":");if(b=this.Kb){a.push("//");var c=this.Bc;c&&a.push(nb(c,ob,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Tc;null!=b&&a.push(":",String(b))}if(b=this.Ya)this.Kb&&"/"!=b.charAt(0)&&a.push("/"),a.push(nb(b,"/"==b.charAt(0)?pb:qb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.pc)&&a.push("#",nb(b,tb));return a.join("")};
|
|
72
72
|
p.resolve=function(a){var b=this.clone();"data"===b.wb&&(b=new fb);var c=!!a.wb;c?gb(b,a.wb):c=!!a.Bc;c?b.Bc=a.Bc:c=!!a.Kb;c?hb(b,a.Kb):c=null!=a.Tc;var d=a.Ya;if(c)jb(b,a.Tc);else if(c=!!a.Ya){if("/"!=d.charAt(0))if(this.Kb&&!this.Ya)d="/"+d;else{var e=b.Ya.lastIndexOf("/");-1!=e&&(d=b.Ya.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.Ya=d:c=""!==a.g.toString();c?kb(b,a.g.clone()):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.Ya=d:c=""!==a.g.toString();c?kb(b,a.g.clone()):c=!!a.pc;c&&(b.pc=a.pc);return b};p.clone=function(){return new fb(this)};function gb(a,b,c){a.wb=c?lb(b,!0):b;a.wb&&(a.wb=a.wb.replace(/:$/,""))}function hb(a,b,c){a.Kb=c?lb(b,!0):b}function jb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Tc=b}else a.Tc=null}
|
|
74
74
|
function kb(a,b,c){b instanceof mb?a.g=b:(c||(b=nb(b,ub)),a.g=new mb(b))}function lb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function nb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,vb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function vb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ob=/[#\/\?@]/g,qb=/[#\?:]/g,pb=/[#\?]/g,ub=/[#\?@]/g,tb=/#/g;function mb(a){this.g=a||null}
|
|
75
75
|
function wb(a){if(!a.Oa&&(a.Oa={},a.rd=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," ")))}}p=mb.prototype;p.Oa=null;p.rd=null;function xb(a){wb(a);return a.rd}p.add=function(a,b){wb(this);this.g=null;var c=this.Oa.hasOwnProperty(a)?this.Oa[a]:null;c||(this.Oa[a]=c=[]);c.push(b);this.rd++;return this};
|
|
76
76
|
p.set=function(a,b){wb(this);this.g=null;this.Oa.hasOwnProperty(a)?this.Oa[a]=[b]:this.add(a,b);return this};p.get=function(a){wb(this);return this.Oa[a]||[]};p.toString=function(){if(this.g)return this.g;if(!this.Oa)return"";var a=[],b;for(b in this.Oa)for(var c=encodeURIComponent(b),d=this.Oa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
@@ -106,7 +106,7 @@ function lc(a,b,c){c=void 0===c?Infinity:c;return nc(a,void 0===b?0:b,c,Uint8Arr
|
|
|
106
106
|
L("shaka.util.BufferUtils",ic);ic.toDataView=pc;ic.toUint16=oc;ic.toUint8=lc;ic.toArrayBuffer=mc;ic.equal=jc;function qc(){}qc.prototype.init=function(){};qc.prototype.i=function(){};qc.prototype.h=function(){};qc.prototype.j=function(){};L("shaka.media.IClosedCaptionParser",qc);function rc(a){this.l=new hc;if(a=sc[a.toLowerCase()])this.l=a();this.g=new gc;if(a=tc)this.g=a()}rc.prototype.init=function(a){this.l.init(a)};rc.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=lc(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};
|
|
107
107
|
rc.prototype.h=function(){this.g.clear()};rc.prototype.j=function(){return this.g.getStreams()};L("shaka.media.ClosedCaptionParser",rc);rc.findDecoder=function(){return tc};rc.unregisterDecoder=function(){tc=null};rc.registerDecoder=function(a){tc=a};rc.findParser=function(a){return sc[a]};rc.unregisterParser=function(a){delete sc[a]};rc.registerParser=function(a,b){sc[a]=b};var sc={},tc=null;function uc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function vc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function wc(a,b,c){c||(c=uc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Ue:d.Ue},e=a.next()){d.Ue=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ue,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
108
108
|
function xc(a,b,c){c||(c=uc);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 yc(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new zc;this.position=null;this.positionAlign=Ac;this.size=0;this.textAlign=Bc;this.direction=Cc;this.writingMode=Ec;this.lineInterpretation=Fc;this.line=null;this.lineHeight="";this.lineAlign=Gc;this.displayAlign=Hc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ic;this.fontStyle=Jc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
109
|
-
"";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={
|
|
109
|
+
"";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={mc:32,rows:15}}function Kc(a,b){a=new yc(a,b,"");a.lineBreak=!0;return a}yc.prototype.clone=function(){var a=new yc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
110
110
|
function Mc(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(!xc(a.nestedCues,b.nestedCues,Mc))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(!xc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",yc);yc.equal=Mc;yc.prototype.clone=yc.prototype.clone;var Ac="auto";
|
|
111
111
|
yc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ac};var Bc="center",Nc={LEFT:"left",RIGHT:"right",CENTER:Bc,START:"start",END:"end"};yc.textAlign=Nc;var Hc="after",Oc={BEFORE:"before",CENTER:"center",AFTER:Hc};yc.displayAlign=Oc;var Cc="ltr";yc.direction={HORIZONTAL_LEFT_TO_RIGHT:Cc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ec="horizontal-tb";yc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ec,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Fc=0;
|
|
112
112
|
yc.lineInterpretation={LINE_NUMBER:Fc,PERCENTAGE:1};var Gc="start",Pc={CENTER:"center",START:Gc,END:"end"};yc.lineAlign=Pc;var Qc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};yc.defaultTextColor=Qc;var Rc={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};yc.defaultTextBackgroundColor=Rc;var Ic=400;yc.fontWeight={NORMAL:Ic,BOLD:700};
|
|
@@ -135,15 +135,15 @@ function ee(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g)return D(k,he(b.
|
|
|
135
135
|
r,f.U);if(!ac(q))return!1;n=[n,r].join()}r=gd(m.mimeType,n,f.ia);if(!ac(r))return!1;m.codecs=n}m=l.audio;if(h&&m&&m.encrypted&&m.codecs.toLowerCase().includes("opus"))return Wa(ie(l)),!1;if(m){n=ke(m.codecs);r=gd(m.mimeType,n,f.U);if(!ac(r))return!1;m.codecs=n}(m=l.decodingInfos.some(function(u){return!u.supported||d&&(u=u.keySystemAccess)&&u.keySystem!=d?!1:!0}))||Wa(ie(l));return m});F(k)})}
|
|
136
136
|
function le(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=le(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
137
137
|
function me(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=le(b),d=ne,d[c]?(a.decodingInfos.push(d[c]),l.F(0)):D(l,oe(b),3);if((e=l.h)&&e.length){f=null;g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,f?(f.supported=f.supported&&k.supported,f.powerEfficient=f.powerEfficient&&k.powerEfficient,f.smooth=f.smooth&&k.smooth,k.keySystemAccess||(f.keySystemAccess=null)):f=k;f&&(d[c]=f,a.decodingInfos.push(f))}F(l)})}
|
|
138
|
-
function oe(a){var b=[""];a.video&&(b=nd(a.video.contentType).split(","));var c=[""];a.audio&&(c=nd(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={
|
|
138
|
+
function oe(a){var b=[""];a.video&&(b=nd(a.video.contentType).split(","));var c=[""];a.audio&&(c=nd(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={ic:f.ic},h=g.next())h=h.value,f.ic=Ad(a),a.video&&(f.ic.video.contentType=dd(md(f.ic.video.contentType),e)),a.audio&&(f.ic.audio.contentType=dd(md(f.ic.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.ic).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
139
139
|
return null})}
|
|
140
140
|
function he(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){switch(C.g){case 1:if(e=a.some(function(E){return E.decodingInfos.length}))return C.return();f={};g=t(d);h=g.next();case 2:if(h.done){C.F(4);break}f.We=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){C.F(7);break}n=m.value;r=pe(n,b,c).filter(function(E){return function(I){return(I.keySystemConfiguration&&I.keySystemConfiguration.keySystem)===E.We}}(f));q=t(r);u=q.next();case 8:if(u.done){C.F(10);break}v=u.value;return D(C,
|
|
141
141
|
me(n,v),9);case 9:u=q.next();C.F(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();C.F(5);break;case 7:if(k)return C.return();f={We:f.We};h=g.next();C.F(2);break;case 4:x=t(a),m=x.next();case 12:if(m.done){C.F(0);break}z=m.value;y=pe(z,b,c).filter(function(E){E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||!d.includes(E)});B=t(y);u=B.next();case 15:if(u.done){m=x.next();C.F(12);break}A=u.value;return D(C,me(z,A),16);case 16:u=B.next(),C.F(15)}})}
|
|
142
142
|
function pe(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Bb("video",g);f=je(f);g=Bb("audio",g);g=ke(g);g=gd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=je(f);f=gd(e.mimeType,f,"video");c.video={contentType:f,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":c.video.transferFunction=
|
|
143
|
-
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
143
|
+
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ke(d.codecs),f=gd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,
|
|
144
144
|
[]);f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var r=new Set,q=t(h.initData),u=q.next();!u.done;u=q.next())r.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
145
145
|
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
|
|
146
|
-
function ke(a){return"fLaC"
|
|
146
|
+
function ke(a){return"fLaC"!==a||Rd()?"Opus"===a?"opus":a:"flac"}function je(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 fe(a){a.textStreams=a.textStreams.filter(function(b){b=dd(b.mimeType,b.codecs);return pd(b)})}
|
|
147
147
|
function ge(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.F(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(qe.has(f)){l.F(5);break}g=re.get(f);if(!g){qe.set(f,!1);l.F(5);break}return D(l,se(g),7);case 7:h=l.h,qe.set(f,h);case 5:(k=qe.get(f))&&b.push(e);d=c.next();l.F(2);break;case 4:a.imageStreams=b,F(l)}})}
|
|
148
148
|
function se(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
|
|
149
149
|
function te(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),r=n.next();!r.done;r=n.next())m.add(r.value);if(c)for(n=t(c.roles),r=n.next();!r.done;r=n.next())m.add(r.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
@@ -173,8 +173,8 @@ Ge.prototype.getBandwidthEstimate=Ge.prototype.getBandwidthEstimate;Ge.prototype
|
|
|
173
173
|
function Re(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!Se(e,f)||!Te(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Se(a,b))&&Te(a.roles,b.roles)));return d?!1:!0}Qe.prototype.values=function(){return this.g.values()};
|
|
174
174
|
function Se(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ld(d)});b=b.codecs.split(",").map(function(d){return ld(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Te(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Ue(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Ve(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Ue.prototype.create=function(a){var b=this,c="smooth"==this.h&&fc(),d=a.filter(function(e){return Re(b.i,e,!c,b.g)});return d.length?new Qe(d[0],d,!c,this.g):this.j.create(a)};
|
|
175
175
|
function Ve(a,b,c,d,e,f,g,h,k,l){this.u=a;this.C=b;this.h=c;this.i=d;this.D=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.s=void 0===l?!1:l}
|
|
176
|
-
Ve.prototype.create=function(a){var b=[];b=We(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=
|
|
177
|
-
function We(a,b){b=Kb(b);var c=Tb(b,a.map(function(d){return Sb(d)}));return c?a.filter(function(d){return c==Sb(d)}):[]}function
|
|
176
|
+
Ve.prototype.create=function(a){var b=[];b=We(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Xe(b,this.C);a.length&&(b=a);this.l&&(a=Ze(b,this.l),a.length&&(b=a));this.i&&(a=$e(b,this.i),a.length&&(b=a));this.h&&(a=af(b,this.h),a.length&&(b=a));this.g&&(a=bf(b,this.g),a.length&&(b=a));this.j&&(a=cf(b,this.j),a.length&&(b=a));a=df(b,this.D);a.length&&(b=a);return new Qe(b[0],b,!("smooth"==this.m&&fc()),this.s)};
|
|
177
|
+
function We(a,b){b=Kb(b);var c=Tb(b,a.map(function(d){return Sb(d)}));return c?a.filter(function(d){return c==Sb(d)}):[]}function Xe(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function bf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function cf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
178
178
|
function af(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function $e(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Ze(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function df(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function ef(){this.g=ff;this.h=(new Map).set(ff,2).set(gf,1)}function hf(a,b,c){a.h.set(ff,c).set(gf,b)}var gf=0,ff=1;function jf(a,b){var c=kf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
179
179
|
function lf(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return D(d,new Promise(function(e){(new Dd(e)).S(c/1E3)}),2)}a.h*=a.m;F(d)})}function kf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function mf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}mf.prototype.resolve=function(){};mf.prototype.reject=function(){};function nf(a,b){this.promise=a;this.i=b;this.g=!1}function of(a){return new nf(Promise.reject(a),function(){return Promise.resolve()})}function pf(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new nf(a,function(){return Promise.resolve()})}function qf(a){return new nf(Promise.resolve(a),function(){return Promise.resolve()})}function rf(a){return new nf(a,function(){return a.catch(function(){})})}nf.prototype.abort=function(){this.g=!0;return this.i()};
|
|
180
180
|
function sf(a){return new nf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}nf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
@@ -189,9 +189,9 @@ m=!0,h.g=I)},function(C){a.j&&a.j(C,c,b);x=!0});if(!r)return y;var B=c.retryPara
|
|
|
189
189
|
B,A,v)}if(a.i)return pf();v&&(y=new P(1,1,1003,c.uris[f],b));if(y instanceof P){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return B=(new Map).set("error",y),B=new O("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,Ef(a,b,c,d,e,f,y,h)}throw y;})}
|
|
190
190
|
function Ff(a,b,c,d){var e=qf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ye:f.Ye},g=a.next())f.Ye=g.value,e=e.Fa(function(h){return function(){var k=c.response;k.data&&(k.data=mc(k.data));return h.Ye(b,k,d)}}(f));return e.Fa(function(){return c},function(h){var k=2;if(h instanceof P){if(7001==h.code)throw h;k=h.severity}throw new P(k,1,1007,h);})}function Hf(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Fd)return!1}return!0}L("shaka.net.NetworkingEngine",wf);
|
|
191
191
|
wf.prototype.request=wf.prototype.request;wf.prototype.destroy=wf.prototype.destroy;wf.makeRequest=Af;wf.defaultRetryParameters=function(){return kf()};wf.prototype.clearAllResponseFilters=wf.prototype.Mh;wf.prototype.unregisterResponseFilter=wf.prototype.vj;wf.prototype.registerResponseFilter=wf.prototype.bj;wf.prototype.clearAllRequestFilters=wf.prototype.Lh;wf.prototype.unregisterRequestFilter=wf.prototype.uj;wf.prototype.registerRequestFilter=wf.prototype.aj;wf.unregisterScheme=function(a){delete zf[a]};
|
|
192
|
-
wf.registerScheme=xf;wf.prototype.setForceHTTPS=wf.prototype.mg;function Bf(){this.g=0}wf.NumBytesRemainingClass=Bf;function Cf(a,b,c){nf.call(this,a,b);this.h=c}pa(Cf,nf);wf.PendingRequest=Cf;var Gf=1;wf.RequestType={MANIFEST:0,SEGMENT:Gf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};wf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var yf=3;wf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:yf};var zf={};function If(a){this.g=!1;this.h=new mf;this.i=a}If.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 Jf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Kf(){this.g=new Za}p=Kf.prototype;p.release=function(){this.ub();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Lf(a,b,c,d),this.g.push(b,a))};p.na=function(a,b,c,d){function e(g){f.
|
|
193
|
-
p.ub=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.
|
|
194
|
-
Lf.prototype.
|
|
192
|
+
wf.registerScheme=xf;wf.prototype.setForceHTTPS=wf.prototype.mg;function Bf(){this.g=0}wf.NumBytesRemainingClass=Bf;function Cf(a,b,c){nf.call(this,a,b);this.h=c}pa(Cf,nf);wf.PendingRequest=Cf;var Gf=1;wf.RequestType={MANIFEST:0,SEGMENT:Gf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};wf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var yf=3;wf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:yf};var zf={};function If(a){this.g=!1;this.h=new mf;this.i=a}If.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 Jf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Kf(){this.g=new Za}p=Kf.prototype;p.release=function(){this.ub();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Lf(a,b,c,d),this.g.push(b,a))};p.na=function(a,b,c,d){function e(g){f.hc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.hc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.hc(),this.g.remove(b,e))}};
|
|
193
|
+
p.ub=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.hc();this.g.g={}}};L("shaka.util.EventManager",Kf);Kf.prototype.removeAll=Kf.prototype.ub;Kf.prototype.unlisten=Kf.prototype.hc;Kf.prototype.listenOnce=Kf.prototype.na;Kf.prototype.listen=Kf.prototype.o;Kf.prototype.release=Kf.prototype.release;function Lf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Mf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
194
|
+
Lf.prototype.hc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Mf(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 Nf(a)?b:b.capture||!1}
|
|
195
195
|
function Nf(a){var b=Of;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}Of=b}return b||!1}var Of=void 0;function Pf(a){this.h=a;this.g=void 0}Pf.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Qf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Rf(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Sf(){}
|
|
196
196
|
function Tf(a){if(!a)return"";a=lc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Qd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Qa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
197
197
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
@@ -263,14 +263,14 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
263
263
|
function(l){g.push({box:l,cb:1701733238})}).T("avc1",function(l){g.push({box:l,cb:1701733238})}).T("avc3",function(l){g.push({box:l,cb:1701733238})}).T("ac-3",function(l){g.push({box:l,cb:1701733217})}).T("ec-3",function(l){g.push({box:l,cb:1701733217})}).T("ac-4",function(l){g.push({box:l,cb:1701733217})}).T("mp4a",function(l){g.push({box:l,cb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw Ya(sg(a)),new P(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
|
|
264
264
|
a=Kh(a,e,k.box,f,k.cb);return a}
|
|
265
265
|
function Kh(a,b,c,d,e){var f=Lh.value(),g=a.subarray(c.start,c.start+c.size),h=pc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=pc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Mh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Id()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Mh(e,d.start,d.size+k.byteLength);k=pc(e,b.start);b=hg(b);a=k.getUint32(b);
|
|
266
|
-
k.setUint32(b,a+1);return e}function Mh(a,b,c){a=pc(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 Lh=new Pf(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 Nh(a,b,c,d,e,f,g){this.ba=a;this.hb=b;this.Na=c;this.Uf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Nh.prototype
|
|
267
|
-
Nh.prototype.getStartByte=Nh.prototype
|
|
266
|
+
k.setUint32(b,a+1);return e}function Mh(a,b,c){a=pc(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 Lh=new Pf(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 Nh(a,b,c,d,e,f,g){this.ba=a;this.hb=b;this.Na=c;this.Uf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Nh.prototype.ac=function(){return this.hb};Nh.prototype.Xb=function(){return this.Na};function Oh(a,b){return a===b?!0:a&&b?a.ac()==b.ac()&&a.Xb()==b.Xb()&&xc(a.ba().sort(),b.ba().sort())&&jc(a.g,b.g):a==b}L("shaka.media.InitSegmentReference",Nh);Nh.prototype.getEndByte=Nh.prototype.Xb;
|
|
267
|
+
Nh.prototype.getStartByte=Nh.prototype.ac;
|
|
268
268
|
function Ph(a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v){l=void 0===l?[]:l;q=void 0===q?Qh:q;this.startTime=a;this.h=this.endTime=b;this.D=c;this.hb=d;this.Na=e;this.ka=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.C=void 0===n?null:n;this.oa=void 0===r?null:r;this.status=q;this.l=!1;this.j=!0;this.m=!1;this.aes128Key=void 0===u?null:u;this.u=null;this.i=0;this.s=void 0===v?!1:v;this.ue=this.Fd=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.eh();
|
|
269
|
-
this.s&&this.g.length&&this.g[this.g.length-1].dh();this.mimeType=this.codecs=null}p=Ph.prototype;p.ba=function(){return this.D()};p.getStartTime=function(){return this.startTime};p.di=function(){return this.endTime};p
|
|
269
|
+
this.s&&this.g.length&&this.g[this.g.length-1].dh();this.mimeType=this.codecs=null}p=Ph.prototype;p.ba=function(){return this.D()};p.getStartTime=function(){return this.startTime};p.di=function(){return this.endTime};p.ac=function(){return this.hb};p.Xb=function(){return this.Na};p.Bi=function(){return this.tilesLayout};p.Ai=function(){return this.C};p.sc=function(){return this.status};p.Ti=function(){this.status=Rh};p.Tf=function(){this.l=!0};p.Ni=function(){return this.l};
|
|
270
270
|
p.xe=function(){this.j=!1};p.Ki=function(){return this.j};p.eh=function(){this.Fd=!0};p.Mi=function(){return this.Fd};p.dh=function(){this.ue=!0};p.Li=function(){return this.ue};p.bh=function(){this.m=!0};p.Hi=function(){return this.m};p.rh=function(a){this.u=a};p.zi=function(){return this.u};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.h+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.h+=a};
|
|
271
271
|
p.sg=function(a){null==this.oa?Qa("Sync attempted without sync time!"):(a=this.oa-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};L("shaka.media.SegmentReference",Ph);Ph.prototype.syncAgainst=Ph.prototype.sg;Ph.prototype.offset=Ph.prototype.offset;Ph.prototype.getThumbnailSprite=Ph.prototype.zi;Ph.prototype.setThumbnailSprite=Ph.prototype.rh;Ph.prototype.hasByterangeOptimization=Ph.prototype.Hi;Ph.prototype.markAsByterangeOptimization=Ph.prototype.bh;Ph.prototype.isLastPartial=Ph.prototype.Li;
|
|
272
272
|
Ph.prototype.markAsLastPartial=Ph.prototype.dh;Ph.prototype.isPartial=Ph.prototype.Mi;Ph.prototype.markAsPartial=Ph.prototype.eh;Ph.prototype.isIndependent=Ph.prototype.Ki;Ph.prototype.markAsNonIndependent=Ph.prototype.xe;Ph.prototype.isPreload=Ph.prototype.Ni;Ph.prototype.markAsPreload=Ph.prototype.Tf;Ph.prototype.markAsUnavailable=Ph.prototype.Ti;Ph.prototype.getStatus=Ph.prototype.sc;Ph.prototype.getTileDuration=Ph.prototype.Ai;Ph.prototype.getTilesLayout=Ph.prototype.Bi;
|
|
273
|
-
Ph.prototype.getEndByte=Ph.prototype.Xb;Ph.prototype.getStartByte=Ph.prototype
|
|
273
|
+
Ph.prototype.getEndByte=Ph.prototype.Xb;Ph.prototype.getStartByte=Ph.prototype.ac;Ph.prototype.getEndTime=Ph.prototype.di;Ph.prototype.getStartTime=Ph.prototype.getStartTime;Ph.prototype.getUris=Ph.prototype.ba;var Qh=0,Rh=1;Ph.Status={zj:Qh,qk:Rh,Sj:2};function Sh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Th(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 Uh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Vh(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}
|
|
274
274
|
function Wh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Vh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Vh(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};/*
|
|
275
275
|
@license
|
|
276
276
|
Shaka Player
|
|
@@ -312,16 +312,16 @@ function yi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8A
|
|
|
312
312
|
p.Zi=function(a){Me("TsParser","Please use parseNalus function instead.");return this.ag(a)};
|
|
313
313
|
p.ag=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var r=a[n];if(r){if(2<=g&&1==r){b&&!h.length&&-1==k&&(r=n-(3<g?3:g),c&&0!=r&&(r=a.subarray(0,r),b.data=tg(b.data,r),b.fullData=tg(b.fullData,r)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=tg(b.data,k),b.fullData=tg(b.fullData,k)));if(n>=e-f)return h;
|
|
314
314
|
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=tg(b.data,a),b.fullData=tg(b.fullData,a));return h};p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=tg.apply(ng,w(c.value)),(c=yi(c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:bi(c.data),dts:c.dts,pts:c.pts});return a};
|
|
315
|
-
p.
|
|
315
|
+
p.qc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=tg.apply(ng,w(c.value)),e=yi(d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=tg(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
316
316
|
p.Oc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=tg.apply(ng,w(d.value)),f=yi(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=tg(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.ag(d,g,void 0),
|
|
317
|
-
d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.
|
|
317
|
+
d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.qc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Oc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.sd=function(){return{audio:this.s,video:this.m}};
|
|
318
318
|
p.le=function(){for(var a=[],b=t(this.Oc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};p.Ei=function(){Me("TsParser","Please use getVideoInfo function instead.");var a=this.Lf();return{height:a.height,width:a.width}};p.Lf=function(){return"hvc"==this.m?zi(this):Ai(this)};
|
|
319
319
|
function Ai(a){var b={height:null,width:null,wa:null};a=a.le();if(!a.length)return b;a=a.find(function(r){return 7==r.type});if(!a)return b;a=new mi(a.data);var c=ti(a),d=ti(a),e=ti(a);ri(a);if(Bi.includes(c)){var f=R(a);3===f&&oi(a,1);ri(a);ri(a);oi(a,1);if(S(a)){f=3!==f?8:12;for(var g=0;g<f;g++)S(a)&&(6>g?ui(a,16):ui(a,64))}}ri(a);f=R(a);if(0===f)R(a);else if(1===f)for(oi(a,1),ri(a),ri(a),f=R(a),g=0;g<f;g++)ri(a);ri(a);oi(a,1);f=R(a);g=R(a);var h=pi(a,1);0===h&&oi(a,1);oi(a,1);var k=0,l=0,m=0,n=
|
|
320
320
|
0;S(a)&&(k=R(a),l=R(a),m=R(a),n=R(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.wa="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
321
321
|
function zi(a){var b={height:null,width:null,wa:null};a=a.le();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new mi(a.fullData,!0);ti(c);ti(c);pi(c,4);var d=pi(c,3);S(c);var e=pi(c,2),f=pi(c,1),g=pi(c,5),h=pi(c,32);a=ti(c);for(var k=ti(c),l=ti(c),m=ti(c),n=ti(c),r=ti(c),q=ti(c),u=[],v=[],x=0;x<d;x++)u.push(S(c)),v.push(S(c));if(0<d)for(x=d;8>x;x++)pi(c,2);for(x=0;x<d;x++)u[x]&&pi(c,88),v[x]&&ti(c);R(c);d=R(c);3==d&&pi(c,1);u=R(c);v=R(c);var z=x=0,y=0,B=0;S(c)&&
|
|
322
322
|
(x+=R(c),z+=R(c),y+=R(c),B+=R(c));b.width=String(u-(x+z)*(1===d||2===d?2:1));b.height=String(v-(y+B)*(1===d?2:1));c=function(A){for(var C=0,E=0;32>E;E++)C|=(A>>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+q;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+="."+
|
|
323
323
|
a.toString(16).toUpperCase());b.wa=e;return b}function Ci(a){return 0>xi(a)?!1:!0}function xi(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}L("shaka.util.TsParser",wi);wi.syncOffset=xi;wi.probe=Ci;wi.prototype.getVideoInfo=wi.prototype.Lf;wi.prototype.getVideoResolution=wi.prototype.Ei;wi.prototype.getVideoNalus=wi.prototype.le;wi.prototype.getCodecs=wi.prototype.sd;wi.prototype.getStartTime=wi.prototype.getStartTime;
|
|
324
|
-
wi.prototype.getVideoData=wi.prototype.Oc;wi.prototype.getAudioData=wi.prototype.
|
|
324
|
+
wi.prototype.getVideoData=wi.prototype.Oc;wi.prototype.getAudioData=wi.prototype.qc;wi.prototype.getMetadata=wi.prototype.getMetadata;wi.prototype.parseNalus=wi.prototype.ag;wi.prototype.parseAvcNalus=wi.prototype.Zi;wi.prototype.parse=wi.prototype.parse;wi.prototype.clearData=wi.prototype.clearData;wi.Timescale=9E4;var Bi=[100,110,122,244,44,83,86,118,128,138,139,134];function Di(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ra("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,Me("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ra("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ra("Could not find LCEVC Library on this page"),
|
|
325
325
|
a=!1):(this.h.SupportObject.SupportStatus||Ra(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 Ei(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
326
326
|
Di.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Fi(a,b,c){var d=Gi,e=Hi;switch(b.mimeType){case "video/webm":d=Ii;break;case "video/mp4":d=Ji}switch(c){case "DASH":e=Ki;break;case "HLS":e=Li}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}L("shaka.lcevc.Dec",Di);Di.prototype.release=Di.prototype.release;var Gi=0,Ii=1,Ji=2,Li=0,Ki=1,Hi=-1;function Mi(a,b,c,d){var e=this;this.i=a;this.G=null;this.H=b;this.g={};this.I={};this.ha={};this.h=null;this.Z=!1;this.ua=c||function(){};this.N=d||null;this.j={};this.u=new Kf;this.m={};this.J=null;this.L=new mf;this.M="";this.$=!1;this.l=Ni(this,this.L);this.D=!1;this.K=new If(function(){return Oi(e)});this.C=!1;this.W="UNKNOWN";this.Aa=this.sa=!1;this.va=new mf;this.s=!1;this.aa=!0;this.V=null}
|
|
327
327
|
function Ni(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.u.o(c,"startstreaming",function(){a.aa=!0});a.u.o(c,"endstreaming",function(){a.aa=!1});a.u.na(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.u.na(a.i,"playing",function(){a.$=!0});a.M=Pi(c);a.i.src=a.M;return c}c=new MediaSource;a.u.na(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.u.na(a.i,"playing",function(){a.$=!0});a.M=Pi(c);a.i.src=a.M;return c}
|
|
@@ -355,9 +355,9 @@ function jj(a,b,c,d,e){var f,g,h,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){if
|
|
|
355
355
|
function rj(a,b,c){if(b==Gb)var d=!1;else{d=ld(nd(a.I[b]));var e=md(a.I[b]),f=dd(c.mimeType,c.codecs),g=a.G.forceTransmux;if(!ac(f)||!a.C&&ed.includes(f)||c.codecs.includes(","))g=!0;c=fd(c.mimeType,c.codecs);g&&(g=Yc(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=ld(nd(f));f=md(f);d=d!==b||e!==f}return d?"smooth"!==a.G.codecSwitchingStrategy||!fc()||a.s:!1}var Pi=window.URL.createObjectURL,Si="sequence";function sj(a,b,c){this.i=a;this.s=b;this.C=this.j=Infinity;this.g=1;this.h=this.l=null;this.u=0;this.G=!0;this.H=0;this.D=void 0===c?!0:c;this.I=0;this.m=!1}p=sj.prototype;p.getDuration=function(){return this.j};p.mi=function(){return this.g};p.og=function(a){this.i=a};p.gb=function(a){this.j=a};p.pi=function(){return this.i};p.nh=function(a){this.u=a};p.Vc=function(a){this.G=a};p.Ne=function(a){this.C=a};p.oh=function(a){this.s=a};p.ci=function(){return this.s};
|
|
356
356
|
p.hh=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Ce(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.D&&!this.m&&(this.i=(Date.now()+this.u)/1E3-this.h-this.g)}};
|
|
357
357
|
p.Dd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.u)/1E3;a=t(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.Ce(b);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.m&&(this.i=d-this.h-this.g)}};p.ve=function(){this.m=!0};p.Pi=function(){return this.m};p.Ce=function(a){this.l=null==this.l?a:Math.min(this.l,a)};
|
|
358
|
-
p.Wf=function(a){this.g=Math.max(this.g,a)};p.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};p.R=function(){return Infinity==this.j&&!this.G};p.wc=function(){return Infinity!=this.j&&!this.G};p.Ab=function(){return Math.max(this.H,this
|
|
359
|
-
p.ud=function(a){var b=Math.max(this.l,this.H);return Infinity==this.C?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this
|
|
360
|
-
sj.prototype.getSeekRangeEnd=sj.prototype.Nb;sj.prototype.getSeekRangeStart=sj.prototype.Nc;sj.prototype.getSafeSeekRangeStart=sj.prototype.ud;sj.prototype.getSegmentAvailabilityEnd=sj.prototype
|
|
358
|
+
p.Wf=function(a){this.g=Math.max(this.g,a)};p.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};p.R=function(){return Infinity==this.j&&!this.G};p.wc=function(){return Infinity!=this.j&&!this.G};p.Ab=function(){return Math.max(this.H,this.$b()-this.C)};p.sh=function(a){this.H=a};p.$b=function(){return this.R()||this.wc()?Math.min(Math.max(0,(Date.now()+this.u)/1E3-this.g-this.i)+this.I,this.j):this.h?Math.min(this.h,this.j):this.j};
|
|
359
|
+
p.ud=function(a){var b=Math.max(this.l,this.H);return Infinity==this.C?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.$b()-this.C+a,this.Nb()))};p.Nc=function(){return this.ud(0)};p.Nb=function(){return Math.max(0,this.$b()-(this.R()||this.wc()?this.s:0))};p.yh=function(){return null==this.i||null!=this.h&&this.D?!1:!0};p.mh=function(a){this.I=a};L("shaka.media.PresentationTimeline",sj);sj.prototype.setAvailabilityTimeOffset=sj.prototype.mh;sj.prototype.usingPresentationStartTime=sj.prototype.yh;
|
|
360
|
+
sj.prototype.getSeekRangeEnd=sj.prototype.Nb;sj.prototype.getSeekRangeStart=sj.prototype.Nc;sj.prototype.getSafeSeekRangeStart=sj.prototype.ud;sj.prototype.getSegmentAvailabilityEnd=sj.prototype.$b;sj.prototype.setUserSeekStart=sj.prototype.sh;sj.prototype.getSegmentAvailabilityStart=sj.prototype.Ab;sj.prototype.isInProgress=sj.prototype.wc;sj.prototype.isLive=sj.prototype.R;sj.prototype.offset=sj.prototype.offset;sj.prototype.notifyMaxSegmentDuration=sj.prototype.Wf;
|
|
361
361
|
sj.prototype.notifyMinSegmentStartTime=sj.prototype.Ce;sj.prototype.isStartTimeLocked=sj.prototype.Pi;sj.prototype.lockStartTime=sj.prototype.ve;sj.prototype.notifySegments=sj.prototype.Dd;sj.prototype.notifyTimeRange=sj.prototype.hh;sj.prototype.getDelay=sj.prototype.ci;sj.prototype.setDelay=sj.prototype.oh;sj.prototype.setSegmentAvailabilityDuration=sj.prototype.Ne;sj.prototype.setStatic=sj.prototype.Vc;sj.prototype.setClockOffset=sj.prototype.nh;sj.prototype.getPresentationStartTime=sj.prototype.pi;
|
|
362
362
|
sj.prototype.setDuration=sj.prototype.gb;sj.prototype.setPresentationStartTime=sj.prototype.og;sj.prototype.getMaxSegmentDuration=sj.prototype.mi;sj.prototype.getDuration=sj.prototype.getDuration;function tj(a,b,c){this.j=c;this.l=a;this.u=uj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}tj.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function vj(a,b){a.i=b}function wj(a){this.g=a}function uj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Vh(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 xj(a,b,c,d,e){var f=this;this.C=e;this.g=a;this.D=b;this.u=c;this.l=new Kf;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.s=!1;this.l.o(a,"waiting",function(){return yj(f)});this.m=(new Dd(function(){yj(f)})).za(this.u.gapJumpTimerTime)}xj.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.D=this.C=null};xj.prototype.Zf=function(){this.s=!0;yj(this)};
|
|
363
363
|
function yj(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=uj(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.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new O("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Wh(c,b,a.u.gapDetectionThreshold),null==
|
|
@@ -369,21 +369,21 @@ function Jj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.
|
|
|
369
369
|
g.g.Nc():g.g.Nb():0>h&&(h=g.g.Nb()+h);return Mj(g,Nj(g,h))});this.m=new Dd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ej(g.h),k=g.g.Nc(),l=g.g.Nb();3>l-k&&(k=l-3);h<k&&(h=Lj(g,h),g.i.currentTime=h)}})}p=Jj.prototype;p.df=function(){this.m.za(.25)};p.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.C=function(){}};p.ef=function(a){Fj(this.h,a)};
|
|
370
370
|
p.Yd=function(){var a=Ej(this.h);return 0<this.i.readyState&&!this.i.paused?Nj(this,a):a};p.Cg=function(){return this.s?this.s.s:0};p.Bg=function(){return this.j.G};p.gh=function(){this.j.Zf()};function Mj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
371
371
|
function Lj(a,b){var c=Math.max(a.D,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Nc(),f=a.g.Nb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ud(c),k=a.g.ud(d);c=a.g.ud(c+d);return b>=g?Mj(a,b):b>f?f:b<e?Th(a.i.buffered,k)?k:c:b>=h||Th(a.i.buffered,b)?b:c}function Nj(a,b){var c=a.g.Nc();if(b<c)return c;a=a.g.Nb();return b>a?a:b}
|
|
372
|
-
function Kj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new tj(new wj(a),b.stallThreshold,c);vj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Oj(a){this.g=a;this.
|
|
372
|
+
function Kj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new tj(new wj(a),b.stallThreshold,c);vj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Oj(a){this.g=a;this.m=null;this.j=0;this.s=!1}p=Oj.prototype;p.Zb=function(){return this.g.length};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Ui=function(){this.s=!0};function Pj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.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};
|
|
373
373
|
p.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};p.ze=function(a){if(!this.s&&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,w(a))}};
|
|
374
374
|
p.Cd=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.ze(a);this.yb(b)};p.yb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
375
375
|
p.Ic=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new Ph(a.startTime,b,a.D,a.hb,a.Na,a.ka,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.C,a.oa,a.status,a.aes128Key),this.g[this.g.length-1].i=a.i)}};
|
|
376
|
-
p.Qe=function(a,b){var c=this;this.s||(this.
|
|
377
|
-
Oj.prototype.
|
|
378
|
-
Oj.prototype.getIteratorForTime=Oj.prototype.
|
|
376
|
+
p.Qe=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new Dd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.m.stop(),c.m=null)}),this.m.za(a))};Oj.prototype[Symbol.iterator]=function(){return this.rc(0)};
|
|
377
|
+
Oj.prototype.rc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.j;)e--,f=c.g[e];if(!f.j)return Qa("No independent partial segment found!"),null;b++;d=e-1;break}}return new Qj(this,b,d)};function Rj(a,b,c){a=new Ph(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Oj([a])}L("shaka.media.SegmentIndex",Oj);Oj.forSingleSegment=Rj;
|
|
378
|
+
Oj.prototype.getIteratorForTime=Oj.prototype.rc;Oj.prototype.updateEvery=Oj.prototype.Qe;Oj.prototype.fit=Oj.prototype.Ic;Oj.prototype.evict=Oj.prototype.yb;Oj.prototype.mergeAndEvict=Oj.prototype.Cd;Oj.prototype.offset=Oj.prototype.offset;Oj.prototype.get=Oj.prototype.get;Oj.prototype.find=Oj.prototype.find;Oj.prototype.markImmutable=Oj.prototype.Ui;Oj.prototype.release=Oj.prototype.release;function Qj(a,b,c){this.i=a;this.g=b;this.h=c}Qj.prototype.Oh=function(){return this.g};
|
|
379
379
|
Qj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.g.length&&a.s&&this.h>=a.g.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.g.length?a.g[this.h]:a};Qj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.g.length?(this.h++,a.s&&this.h==a.g.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};L("shaka.media.SegmentIterator",Qj);Qj.prototype.next=Qj.prototype.next;Qj.prototype.current=Qj.prototype.current;
|
|
380
|
-
Qj.prototype.currentPosition=Qj.prototype.Oh;function Sj(){Oj.call(this,[]);this.h=[]}pa(Sj,Oj);p=Sj.prototype;p.clone=function(){var a=new Sj;a.h=this.h.slice();return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};p.find=function(a){for(var b=0,c=t(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.j+d.
|
|
381
|
-
p.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.
|
|
380
|
+
Qj.prototype.currentPosition=Qj.prototype.Oh;function Sj(){Oj.call(this,[]);this.h=[]}pa(Sj,Oj);p=Sj.prototype;p.clone=function(){var a=new Sj;a.h=this.h.slice();return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};p.find=function(a){for(var b=0,c=t(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.j+d.Zb()}return null};
|
|
381
|
+
p.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.Zb()}return null};p.offset=function(){};p.ze=function(){};p.yb=function(){};p.Cd=function(){};p.Ic=function(){};p.Qe=function(){};L("shaka.media.MetaSegmentIndex",Sj);Sj.prototype.updateEvery=Sj.prototype.Qe;Sj.prototype.fit=Sj.prototype.Ic;Sj.prototype.mergeAndEvict=Sj.prototype.Cd;Sj.prototype.evict=Sj.prototype.yb;Sj.prototype.merge=Sj.prototype.ze;Sj.prototype.offset=Sj.prototype.offset;
|
|
382
382
|
Sj.prototype.get=Sj.prototype.get;Sj.prototype.find=Sj.prototype.find;Sj.prototype.release=Sj.prototype.release;function Tj(a){var b=this;this.g=a;this.h=this.g.ke();this.i=new Dd(function(){b.g.fh(.25*b.h)})}Tj.prototype.release=function(){this.set(this.Lc());this.i&&(this.i.stop(),this.i=null);this.g=null};Tj.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.ke()!=b&&this.g.pg(b);break a}catch(c){}this.i.za(.25);0!=this.g.ke()&&this.g.pg(0)}};Tj.prototype.Lc=function(){return this.g.Lc()};function Uj(a){var b=this;this.h=a;this.g=new Set;this.i=(new Dd(function(){Vj(b,!1)})).za(.25)}Uj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Vj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Wj(a){$a.call(this);this.g=new Map;this.h=a}pa(Wj,$a);Wj.prototype.release=function(){this.g.clear();$a.prototype.release.call(this)};function Xj(a,b){var c=a.g.get(b);c||(c={Gd:[],Mg:null,contentType:b},a.g.set(b,c));return c}function Yj(a,b,c){var d=Xj(a,b.contentType);Zj(a,d);a={Uf:b,position:c};d=d.Gd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
383
383
|
Wj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Gd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Uf;break a}}d=null}if(e=d)e=c.Mg,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);
|
|
384
384
|
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.Mg=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Zj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Gd;b.Gd=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.Gd=[]};function ak(a){$a.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Dd(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).za(2)}pa(ak,$a);ak.prototype.release=function(){this.g.clear();this.h.stop();$a.prototype.release.call(this)};function bk(a,b){$a.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Dc:null,Cc:ck,vc:function(d,e){return dk(c,"enter",d,e)}},{Dc:ek,Cc:ck,vc:function(d,e){return dk(c,"enter",d,e)}},{Dc:fk,Cc:ck,vc:function(d,e){return dk(c,"enter",d,e)}},{Dc:ck,Cc:ek,vc:function(d,e){return dk(c,"exit",d,e)}},{Dc:ck,Cc:fk,vc:function(d,e){return dk(c,"exit",d,e)}},{Dc:ek,Cc:fk,vc:function(d,e){return dk(c,"skip",d,e)}},{Dc:fk,Cc:ek,vc:function(d,e){return dk(c,"skip",d,e)}}];this.h=new Kf;this.h.o(this.i,
|
|
385
385
|
"regionremove",function(d){c.g.delete(d.region)})}pa(bk,$a);bk.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;$a.prototype.release.call(this)};bk.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?ek:a>d.endTime?fk:ck;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Dc==e&&h.Cc==f&&h.vc(d,b)}}};
|
|
386
|
-
function dk(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ek=1,ck=2,fk=3;function gk(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function hk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.
|
|
386
|
+
function dk(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ek=1,ck=2,fk=3;function gk(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function hk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.rc(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.size<a.i&&null!=e;){b=!0;e.l&&null!=e.Na&&(b=!1);2==e.sc()&&(b=!1);b&&!a.g.has(e)&&(b=new ik(a.l),jk(b,e,a.h),a.g.set(e,b));a.j=e.startTime;if(a.h.fastSwitching&&e.Fd&&e.ue)break;e=d.next().value}}}}
|
|
387
387
|
function kk(a,b){if(a.h.segmentIndex&&a.g.size<a.i&&!a.g.has(b)){var c=new ik(a.l);jk(c,b,a.h);a.g.set(b,c)}}function lk(a){if(0!==a.g.size){for(var b=t(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&mk(a,c);a.j=0}}function nk(a,b){b&&b!==a.h&&(lk(a),a.h=b)}function mk(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function ik(a){this.i=a;this.g=this.h=null}
|
|
388
388
|
function jk(a,b,c){var d=new Uint8Array(0);a.g=a.i(b,c,function(e){return K(function(f){if(1==f.g)return 0<d.byteLength?d=tg(d,e):d=e,a.h?D(f,a.h(d),3):f.F(0);d=new Uint8Array(0);F(f)})})}ik.prototype.abort=function(){this.g&&this.g.abort()};function ok(a,b,c,d,e){a=Af(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function pk(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.s=this.j=null;this.H=0;this.G=!1;this.i=new Map;this.D=!1;this.I=null;this.u=!1;this.l=new If(function(){return qk(c)});this.J=Date.now()/1E3}p=pk.prototype;p.destroy=function(){return this.l.destroy()};function qk(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,rk(e),b.push(sk(e));return D(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;F(f)})}
|
|
389
389
|
p.configure=function(a){this.h=a;this.I=new jf({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);for(var b=t(this.i.keys()),c=b.next();!c.done;c=b.next())if(c=this.i.get(c.value),c.Ia){var d=c.Ia,e=a.segmentPrefetchLimit;d.i=e;for(var f=Array.from(d.g.keys());f.length>e;){var g=f.pop();g&&mk(d,g)}0<a.segmentPrefetchLimit||
|
|
@@ -396,32 +396,32 @@ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.eb.h.g>h?
|
|
|
396
396
|
p.Kd=function(){if(this.g)for(var a=this.g.je(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.ea&&(e=c.ea.current());if(!e||e.startTime>a||e.endTime<a)c.ea=null;e=this.g.Y;e.D?e=!1:d==Gb?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Wi(e,d),e=Th(e,a));e||((null!=Xi(this.g.Y,d)||c.Ta)&&Fk(this,c),c.eb&&(c.eb.abort(),c.eb=null),d===Gb&&(d=this.g.Y,d.J&&d.J.h()),c.Kd=!0)}};
|
|
397
397
|
function Fk(a,b){b.pd||b.Sb||(b.Ta?(b.Sb=!0,b.be=0):null==Vi(a.g.Y,b.type)?null==b.Eb&&xk(a,b,0):(rk(b),Dk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
398
398
|
function uk(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Hb;if(!a.j)throw new P(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.U,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.ia,a.j.video),d.add(a.j.video));a.s&&(c.set(b.Da,a.s),d.add(a.s));e=a.g.Y;return D(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}Jf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.i.has(h)||(l=wk(a,k),a.i.set(h,l),xk(a,l,
|
|
399
|
-
0));F(m)})}function wk(a,b){return{stream:b,type:b.type,ea:null,Ia:tk(a,b),Sa:null,
|
|
399
|
+
0));F(m)})}function wk(a,b){return{stream:b,type:b.type,ea:null,Ia:tk(a,b),Sa:null,ec:null,Rf:null,Pf:null,Of:null,Ac:null,endOfStream:!1,Ta:!1,Eb:null,Sb:!1,be:0,Re:!1,pd:!1,Kd:!0,Vf:!1,dg:!1,wd:!1,eb:null}}function tk(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.h.segmentPrefetchLimit?new gk(a.h.segmentPrefetchLimit,b,function(c,d,e){return Gk(a,c,d,e)}):null}p.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Y.gb(a):this.g.Y.gb(Math.pow(2,32))};
|
|
400
400
|
function Hk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:Jf(a.l);if(b.Ta||null==b.Eb||b.pd)return h.return();b.Eb=null;if(!b.Sb){h.F(2);break}return D(h,Dk(a,b,b.Re,b.be),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.F(4);break}c=b.stream;return D(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ta||b.Eb||xk(a,b,0),h.return();case 4:ta(h,6);d=Ik(a,b);null!=d&&(xk(a,b,d),b.wd=!1);va(h,7);break;case 6:return e=
|
|
401
401
|
wa(h),D(h,Jk(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.D||!f.every(function(k){return k.endOfStream})){h.F(0);break}return D(h,a.g.Y.endOfStream(),10);case 10:Jf(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.gb(g),F(h)}})}
|
|
402
402
|
function Ik(a,b){if(Kk(b))return ej(a.g.Y,b.stream.originalId||""),null;b.type==Gb&&fj(a.g.Y);if(!a.g.Y.aa&&b.type!=Gb)return a.h.updateIntervalSeconds/2;var c=a.g.je(),d=b.Sa?b.Sa.endTime:c,e=Yi(a.g.Y,b.type,c),f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C),g=a.m.presentationTimeline.getDuration()-d,h=Xi(a.g.Y,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Gb))&&Kk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/
|
|
403
|
-
2;e=Lk(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Kk(h)||h.ea&&!h.ea.current()||(f=Math.min(f,h.Sa?h.Sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.Ia&&b.ea&&(d=e.ka,!d||b.Sa&&Oh(d,b.
|
|
404
|
-
function Lk(a,b,c,d){if(b.ea)return b.ea.current();if(b.Sa||d)return c=b.Sa?b.Sa.endTime:d,b.Vf=!0,b.ea=b.stream.segmentIndex.
|
|
403
|
+
2;e=Lk(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Kk(h)||h.ea&&!h.ea.current()||(f=Math.min(f,h.Sa?h.Sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.Ia&&b.ea&&(d=e.ka,!d||b.Sa&&Oh(d,b.ec)||kk(b.Ia,d),hk(b.Ia,e));Mk(a,b,c,e).catch(function(){});return null}
|
|
404
|
+
function Lk(a,b,c,d){if(b.ea)return b.ea.current();if(b.Sa||d)return c=b.Sa?b.Sa.endTime:d,b.Vf=!0,b.ea=b.stream.segmentIndex.rc(c),b.ea&&b.ea.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ea=b.stream.segmentIndex.rc(d),e=b.ea&&b.ea.next().value);e||(b.ea=b.stream.segmentIndex.rc(c),e=b.ea&&b.ea.next().value);return e}
|
|
405
405
|
function Mk(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:e=Hb;f=b.stream;g=b.ea;b.Ta=!0;ta(A,2);if(2==d.sc())throw new P(1,1,1011);return D(A,Nk(a,b,d),4);case 4:Jf(a.l);if(a.u)return A.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),q=r=!1,v=function(C){var E,I,G,H;return K(function(J){switch(J.g){case 1:if(r)return J.return();q=!0;Jf(a.l);if(a.u)return J.return();
|
|
406
406
|
ta(J,2);n=Ok(n,C);E=!1;I=0;(new bg).box("mdat",function(M){I=M.size+M.start;E=!0}).parse(n,!1,!0);if(!E){J.F(4);break}G=n.subarray(0,I);n=n.subarray(I);return D(J,Pk(a,b,c,f,d,G,!0),5);case 5:b.Ia&&b.ea&&hk(b.Ia,d,!0);case 4:va(J,0);break;case 2:u=H=wa(J),F(J)}})},D(A,Qk(a,b,d,v),9);l=Qk(a,b,d);return D(A,l,7);case 7:m=A.h;Jf(a.l);if(a.u)return A.return();Jf(a.l);return b.Sb?(b.Ta=!1,xk(a,b,0),A.return()):D(A,Pk(a,b,c,f,d,m),6);case 9:x=A.h;if(u)throw u;if(q){A.F(10);break}r=!0;Jf(a.l);return a.u?
|
|
407
407
|
A.return():b.Sb?(b.Ta=!1,xk(a,b,0),A.return()):D(A,Pk(a,b,c,f,d,x),10);case 10:b.Ia&&b.ea&&hk(b.Ia,d,!0);case 6:Jf(a.l);if(a.u)return A.return();b.Sa=d;g.next();b.Ta=!1;b.dg=!1;z=a.g.Y.Lb();y=z[b.type];Xa(JSON.stringify(y));b.Sb||a.g.Zf(d,b.stream);xk(a,b,0);va(A,0);break;case 2:B=wa(A);Jf(a.l,B);if(a.u)return A.return();b.Ta=!1;if(7001==B.code)b.Ta=!1,rk(b),xk(a,b,0),A.F(0);else if(b.type==e.Da&&a.h.ignoreTextStreamFailures)a.i.delete(e.Da),A.F(0);else if(3017==B.code)Rk(a,b,B),A.F(0);else return b.wd=
|
|
408
408
|
!0,B.severity=2,D(A,Jk(a,b,B),0)}})}function Sk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.F(2):D(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=lc(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Ok(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
409
409
|
function Rk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.dg})){if(0<a.h.maxDisabledTime&&a.g.ce(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.wd=!0;a.u=!0;a.g.onError(c);return}b.dg=!0}xk(a,b,4)}
|
|
410
|
-
function Nk(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v;return K(function(x){if(1==x.g){d=Hb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=ld(b.stream.codecs);k=md(b.stream.mimeType);l=c.timestampOffset;if(l==b.Rf&&f==b.Pf&&g==b.Of&&h==b.Qf&&k==b.ah)return x.F(2);if(m=b.Qf&&b.ah&&rj(a.g.Y,b.type,b.stream))n=null,b.type===d.ia?n=a.i.get(d.U):b.type===d.U&&(n=a.i.get(d.ia)),n&&(n.
|
|
411
|
-
new Map,a.j.audio&&z.set(d.U,a.j.audio),a.j.video&&z.set(d.ia,a.j.video),ta(C,2),b.Pf=f,b.Of=g,b.Qf=h,b.ah=k,b.Rf=l,y=a.m.sequenceMode||"HLS"==a.m.type,D(C,ij(a.g.Y,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=C.g)return m&&(B=null,b.type===d.ia?B=a.i.get(d.U):b.type===d.U&&(B=a.i.get(d.ia)),B&&(B.Sb=!1,B.Ta=!1,Fk(a,B))),va(C,0);A=wa(C);b.Pf=null;b.Of=null;b.Qf=null;b.Rf=null;throw A;})};return D(x,r(),2)}Oh(c.ka,b.
|
|
410
|
+
function Nk(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v;return K(function(x){if(1==x.g){d=Hb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=ld(b.stream.codecs);k=md(b.stream.mimeType);l=c.timestampOffset;if(l==b.Rf&&f==b.Pf&&g==b.Of&&h==b.Qf&&k==b.ah)return x.F(2);if(m=b.Qf&&b.ah&&rj(a.g.Y,b.type,b.stream))n=null,b.type===d.ia?n=a.i.get(d.U):b.type===d.U&&(n=a.i.get(d.ia)),n&&(n.ec=null,Fk(a,n),sk(n).catch(function(){}));r=function(){var z,y,B,A;return K(function(C){if(1==C.g)return z=
|
|
411
|
+
new Map,a.j.audio&&z.set(d.U,a.j.audio),a.j.video&&z.set(d.ia,a.j.video),ta(C,2),b.Pf=f,b.Of=g,b.Qf=h,b.ah=k,b.Rf=l,y=a.m.sequenceMode||"HLS"==a.m.type,D(C,ij(a.g.Y,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=C.g)return m&&(B=null,b.type===d.ia?B=a.i.get(d.U):b.type===d.U&&(B=a.i.get(d.ia)),B&&(B.Sb=!1,B.Ta=!1,Fk(a,B))),va(C,0);A=wa(C);b.Pf=null;b.Of=null;b.Qf=null;b.Rf=null;throw A;})};return D(x,r(),2)}Oh(c.ka,b.ec)||(b.ec=c.ka,c.j&&c.ka&&(q=Qk(a,b,c.ka),u=
|
|
412
412
|
function(){var z,y,B,A,C,E;return K(function(I){switch(I.g){case 1:return ta(I,2),D(I,q,4);case 4:return z=I.h,Jf(a.l),y=null,B=new Map,A=new bg,A.box("moov",gg).box("trak",gg).box("mdia",gg).T("mdhd",function(G){y=fi(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.Qb(4);var H=String.fromCharCode(G[0]);H+=String.fromCharCode(G[1]);H+=String.fromCharCode(G[2]);H+=String.fromCharCode(G[3]);switch(H){case "soun":B.set(d.U,y);break;case "vide":B.set(d.ia,y)}y=null}).parse(z),
|
|
413
|
-
B.has(b.type)?c.ka.timescale=B.get(b.type):null!=y&&(c.ka.timescale=y),C=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,D(I,a.g.Gg(b.type,z),5);case 5:return D(I,$i(a.g.Y,b.type,z,null,b.stream,C),6);case 6:va(I,0);break;case 2:throw E=wa(I),b.
|
|
413
|
+
B.has(b.type)?c.ka.timescale=B.get(b.type):null!=y&&(c.ka.timescale=y),C=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,D(I,a.g.Gg(b.type,z),5);case 5:return D(I,$i(a.g.Y,b.type,z,null,b.stream,C),6);case 6:va(I,0);break;case 2:throw E=wa(I),b.ec=null,E;}})},a.g.Wi(c.startTime,c.ka),e.push(u())));a.m.sequenceMode&&(v=b.Sa?b.Sa.i:null,c.i!=v||b.Vf)&&(b.Vf=!1,e.push(kj(a.g.Y,b.type,c.startTime)));return D(x,Promise.all(e),0)})}
|
|
414
414
|
function Pk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return K(function(q){switch(q.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.G;if(l||m)k=new bg;l&&k.T("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var x=u.reader.Hd();var z=u.reader.Hd();var y=u.reader.O();var B=u.reader.O();var A=u.reader.O();var C=u.reader.O();var E=e.startTime+B/y}else y=u.reader.O(),E=u.reader.Uc()/
|
|
415
415
|
y+e.timestampOffset,B=E-e.startTime,A=u.reader.O(),C=u.reader.O(),x=u.reader.Hd(),z=u.reader.Hd();u=u.reader.Qb(u.reader.getLength()-u.reader.Ga());if(v&&v.includes(x)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.Xi():(v=(new Map).set("detail",{startTime:E,endTime:E+A/y,schemeIdUri:x,value:z,timescale:y,presentationTimeDelta:B,eventDuration:A,id:C,messageData:u}),v=new O("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
416
416
|
x||(x=bi(u),x.length&&e&&a.g.Yi([{cueTime:e.startTime,data:u,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.T("prft",function(u){if(!a.G&&e.ka.timescale){var v=u.reader,x=u.version;v.O();u=v.O();var z=v.O();u=1E3*u+z/Math.pow(2,32)*1E3;0===x?v=v.O():(x=v.O(),v=v.O(),v=x*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.ka.timescale*1E3)});v=new O("prft",v);a.g.onEvent(v);
|
|
417
|
-
a.G=!0}});(l||m)&&k.parse(f);return D(q,Tk(a,b,c),2);case 2:return Jf(a.l),n=b.Kd,b.Kd=!1,r=b.Dg,b.Dg=!1,D(q,a.g.Gg(b.type,f),3);case 3:return D(q,$i(a.g.Y,b.type,f,e,d,h,n,r,g),4);case 4:Jf(a.l),F(q)}})}function Tk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Vi(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return
|
|
417
|
+
a.G=!0}});(l||m)&&k.parse(f);return D(q,Tk(a,b,c),2);case 2:return Jf(a.l),n=b.Kd,b.Kd=!1,r=b.Dg,b.Dg=!1,D(q,a.g.Gg(b.type,f),3);case 3:return D(q,$i(a.g.Y,b.type,f,e,d,h,n,r,g),4);case 4:Jf(a.l),F(q)}})}function Tk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Vi(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return 1>=g?h.return():D(h,a.g.Y.remove(b.type,e,e+g),2)}Jf(a.l);F(h)})}
|
|
418
418
|
function Kk(a){return a&&a.type==Gb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
419
419
|
function Qk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Nh&&(e=c.g))return l.return(e);f=null;if(b.Ia){var m=b.Ia;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=Gk(a,c,b.stream,d));g=0;b.ea&&(g=b.ea.g);b.eb=f;return D(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aes128Key){l.F(3);break}return D(l,Sk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
420
420
|
function Gk(a,b,c,d){var e=b instanceof Ph?b:void 0,f=e?1:0;b=ok(b.ba(),b.hb,b.Na,a.h.retryParameters,d);return a.g.zc.request(Gf,b,{type:f,stream:c,segment:e})}
|
|
421
|
-
function Dk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Sb=!1,b.Re=!1,b.be=0,b.pd=!0,b.Sa=null,b.
|
|
421
|
+
function Dk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Sb=!1,b.Re=!1,b.be=0,b.pd=!0,b.Sa=null,b.ec=null,b.ea=null,b.Ia&&lk(b.Ia),d?(e=a.g.je(),f=a.g.Y.getDuration(),D(g,a.g.Y.remove(b.type,e+d,f),3)):D(g,hj(a.g.Y,b.type),4);if(3!=g.g)return Jf(a.l),c?D(g,a.g.Y.flush(b.type),3):g.F(3);Jf(a.l);b.pd=!1;b.endOfStream=!1;b.Ta||b.Eb||xk(a,b,0);F(g)})}
|
|
422
422
|
function xk(a,b,c){var d=b.type;if(d!=Gb||a.i.has(d))b.Eb=(new Cd(function(){var e;return K(function(f){if(1==f.g)return ta(f,2),D(f,Hk(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);F(f)})})).S(c)}function rk(a){null!=a.Eb&&(a.Eb.stop(),a.Eb=null)}function sk(a){return K(function(b){return a.eb?D(b,a.eb.abort(),0):b.F(0)})}
|
|
423
423
|
function Jk(a,b,c){var d;return K(function(e){if(1==e.g)return D(e,lf(a.I),2);Jf(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.ce(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
|
|
424
|
-
function Uk(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.J<c)return h.return(!1);a.J=b;d=Hb;if(e=a.i.get(d.U))e.
|
|
424
|
+
function Uk(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.J<c)return h.return(!1);a.J=b;d=Hb;if(e=a.i.get(d.U))e.ec=null,Fk(a,e),sk(e).catch(function(){});if(f=a.i.get(d.ia))f.ec=null,Fk(a,f),sk(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.U,a.j.audio);a.j.video&&g.set(d.ia,a.j.video);return D(h,qj(a.g.Y,g),2)}return h.return(!0)})};function Vk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new fb(a)).Ya.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Wk[d])return m.return(e);f=0;g=Af([a],c);ta(m,2);g.method="HEAD";return D(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=wa(m);if(!k||1002!=k.code&&1001!=k.code){m.F(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?
|
|
425
425
|
e.toLowerCase().split(";").shift():"")}})}
|
|
426
426
|
var Wk={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 Xk(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Xk(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=Yk(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Yk(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;k=k.next().value;
|
|
427
427
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
@@ -484,7 +484,7 @@ logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};f.trackSelectionCallback
|
|
|
484
484
|
function bm(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 Pl(a,b,c||$l(),d,"")}
|
|
485
485
|
function am(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=Tb(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Kb(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-
|
|
486
486
|
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=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Gb&&"image"!=c.type||b.push(c);return b}L("shaka.util.PlayerConfiguration",Zl);Zl.mergeConfigObjects=bm;Zl.createDefault=$l;function cm(){this.g=null;this.h=[]}function dm(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(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 em(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(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 fm(){this.i=this.h=null;this.g=[]}function gm(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 hm(){this.C=this.D=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.M=this.N=this.J=this.K=this.L=this.l=this.s=NaN;this.g=new cm;this.h=new fm};function V(a,b){$a.call(this);var c=this;this.l=im;this.oe=this.h=null;this.$=!1;this.Be=new Kf;this.Fb=new Kf;this.s=new Kf;this.va=new Kf;this.G=this.I=this.m=this.J=null;this.He=0;this.W=new Sl;this.ha=this.aa=this.i=this.Ie=this.H=this.j=this.sa=this.L=this.Bh=this.Z=this.V=this.ua=this.M=this.K=this.xb=null;this.Xa=!1;this.fg=this.u=null;this.Ag=1E9;this.tc=[];this.N=NaN;this.g=jm(this);this.Ee={width:Infinity,height:Infinity};this.C=null;this.Ra=new Ve(this.g.preferredAudioLanguage,this.g.preferredVariantRole,
|
|
487
|
-
this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Wa=this.g.preferredTextLanguage;this.
|
|
487
|
+
this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Wa=this.g.preferredTextLanguage;this.nc=this.g.preferredTextRole;this.Vb=this.g.preferForcedSubs;this.Ib=[];b&&b(this);this.V=km(this);this.Z=new Il(this.g.cmsd);this.J=lm(this);this.J.mg(this.g.streaming.forceHTTPS);this.D=null;mm&&(this.D=mm(),
|
|
488
488
|
this.D.configure(this.g.ads));this.Be.o(window,"online",function(){nm(c);c.eg()});this.se=new Dd(function(){return om(c)});a&&(Me("Player","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Gc(a,!0))}pa(V,$a);function pm(a){null!=a.L&&(Ei(a.L),a.L.release(),a.L=null)}
|
|
489
489
|
function qm(a,b){if(b.lcevc.enabled){var c=a.mb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Hd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Ra("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));pm(a);null==a.L&&(a.L=new Di(a.h,a.Bh,b.lcevc),a.I&&(a.I.N=a.L))}else pm(a)}function rm(a,b){return new O(a,b)}p=V.prototype;
|
|
490
490
|
p.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==sm)return c.return();pm(a);b=a.detach();a.l=sm;return D(c,b,2);case 2:a.Be&&(a.Be.release(),a.Be=null);a.Fb&&(a.Fb.release(),a.Fb=null);a.s&&(a.s.release(),a.s=null);a.va&&(a.va.release(),a.va=null);a.fg=null;a.g=null;a.C=null;a.oe=null;a.V=null;a.Z=null;if(!a.J){c.F(3);break}return D(c,a.J.destroy(),4);case 4:a.J=null;case 3:a.u&&(a.u.release(),a.u=null),$a.prototype.release.call(a),F(c)}})};
|
|
@@ -509,9 +509,9 @@ function Em(a){var b,c,d,e;return K(function(f){return 1==f.g?(um(a,"drm-engine"
|
|
|
509
509
|
Km(a,a.i),0)})}
|
|
510
510
|
function Fm(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){switch(C.g){case 1:um(a,"load");c=a.h;a.K=new Tj({ke:function(){return c.playbackRate},Lc:function(){return c.defaultPlaybackRate},pg:function(E){c.playbackRate=E},fh:function(E){c.currentTime+=E}});d=function(){return Sm(a)};e=function(){return Tm(a)};a.s.o(c,"playing",d);a.s.o(c,"pause",d);a.s.o(c,"ended",d);a.s.o(c,"ratechange",e);qm(a,a.g);f=a.g.abrFactory;a.u&&a.fg==f||(a.fg=f,a.u=f(),"function"!=typeof a.u.setMediaElement&&(Me("AbrManager",
|
|
511
511
|
"Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),"function"!=typeof a.u.setCmsdManager&&(Me("AbrManager","Please use an AbrManager with setCmsdManager function."),a.u.setCmsdManager=function(){}),"function"!=typeof a.u.trySuggestStreams&&(Me("AbrManager","Please use an AbrManager with trySuggestStreams function."),a.u.trySuggestStreams=function(){}),a.u.configure(a.g.abr));a.Ra=new Ve(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,
|
|
512
|
-
a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups);a.Wa=a.g.preferredTextLanguage;a.
|
|
512
|
+
a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups);a.Wa=a.g.preferredTextLanguage;a.nc=a.g.preferredTextRole;a.Vb=a.g.preferForcedSubs;Um(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u.init(function(E,I,G){a.j&&E!=a.j.j&&Vm(a,E,!0,void 0===I?!1:I,void 0===G?0:G)});a.u.setMediaElement(c);a.u.setCmsdManager(a.Z);Zd(a.i,a.g.preferredVideoCodecs,
|
|
513
513
|
a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes);a.j=Wm(a);a.j.configure(a.g.streaming);a.l=Xm;c.textTracks&&a.s.o(c.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Ym(a,E)}});a.dispatchEvent(rm("streaming"));g=null;(h=a.j.j)||(g=Zm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(r=n.value)&&!r.segmentIndex&&k.push(r.createSegmentIndex());if(!(0<k.length)){C.F(2);break}return D(C,Promise.all(k),2);case 2:if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(l);
|
|
514
|
-
Um(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.G=$m(a,a.ha);a.xb=an(a,b);q=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);bn(a,c,q);if(h){C.F(4);break}Vm(a,g,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){C.F(4);break}u=a.G;v=u.ef;return D(C,cn(g,a.G.Yd()),6);case 6:v.call(u,C.h);case 4:return a.G.df(),x=a.
|
|
514
|
+
Um(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.G=$m(a,a.ha);a.xb=an(a,b);q=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);bn(a,c,q);if(h){C.F(4);break}Vm(a,g,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){C.F(4);break}u=a.G;v=u.ef;return D(C,cn(g,a.G.Yd()),6);case 6:v.call(u,C.h);case 4:return a.G.df(),x=a.bc().find(function(E){return E.active}),x||((z=De(a.i.textStreams,a.Wa,a.nc,a.Vb)[0]||null)&&gm(a.C.h,z,!0),g&&(z?(g.audio&&dn(a,g.audio,z)&&(a.$=!0),a.$&&a.I.H.setTextVisibility(!0),
|
|
515
515
|
en(a)):a.$=!1),z&&(a.g.streaming.alwaysStreamText||a.xc())&&Ck(a.j,z)),D(C,a.j.start(),7);case 7:a.g.abr.enabled&&(a.u.enable(),fn(a));Rm(a);gn(a);a.i.variants.some(function(E){return E.primary});(y=a.R())&&(a.g.streaming.liveSync||a.i.serviceDescription)?(B=function(){return hn(a)},a.s.o(c,"timeupdate",B)):y||(A=function(){return jn(a)},a.s.o(c,"timeupdate",A),jn(a));if(a.D)a.D.onManifestUpdated(y);a.Xa=!0;a.s.na(c,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b});F(C)}})}
|
|
516
516
|
function Cm(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Hb,d=Date.now()/1E3,e=!0,a.m=Om(a,{zc:a.J,onError:function(h){xm(a,h)},Fe:function(h){Pm(a,h)},onExpirationUpdated:function(h,k){Qm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.C.j=Date.now()/1E3-d)}}),a.m.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
|
|
517
517
|
mimeType:b?md(b):"",codecs:b?nd(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ia,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Z=!0,D(g,Zg(a.m,[f],[]),2)):D(g,a.m.Gc(a.h),0)})}
|
|
@@ -529,7 +529,7 @@ m)}break;case Gf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.s
|
|
|
529
529
|
function $m(a,b){return new Jj(a.h,a.i,a.g.streaming,b,function(){a.xb&&Vj(a.xb,!0);a.j&&a.j.Kd();a.M&&rn(a)},function(c){return a.dispatchEvent(c)})}
|
|
530
530
|
function an(a,b){b=new bk(a.ua,a.R()||0<b);b.addEventListener("enter",function(d){Jm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Jm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Jm(a,"timelineregionenter",e),Jm(a,"timelineregionexit",e))});var c=new Uj(a.h);c.g.add(b);a.sa&&c.g.add(a.sa);return c}
|
|
531
531
|
function bn(a,b,c){a.M=new ef;a.M.g=gf;hf(a.M,c,Math.min(.5,c/2));zm(a);a.s.o(b,"waiting",function(){return rn(a)});a.s.o(b,"stalled",function(){return rn(a)});a.s.o(b,"canplaythrough",function(){return rn(a)});a.s.o(b,"progress",function(){return rn(a)})}
|
|
532
|
-
function rn(a){switch(a.l){case ln:if(a.h.ended)var b=!0;else{var c=Sh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Xm:a:if(a.h.ended||Ui(a.I))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline
|
|
532
|
+
function rn(a){switch(a.l){case ln:if(a.h.ended)var b=!0;else{var c=Sh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Xm:a:if(a.h.ended||Ui(a.I))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.$b();var d=Sh(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Uh(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ff:gf;c.g=d;b!=d&&zm(a)}function Hm(a,b,c,d){return new Mi(a,b,c,d)}
|
|
533
533
|
function km(a){return new ql({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Lb:function(){return a.Lb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Mb:function(){return a.Mb()},Yb:function(){return a.Yb()},mb:function(){return a.mb()},R:function(){return a.R()}},a.g.cmcd)}
|
|
534
534
|
function Wm(a){return new pk(a.i,{je:function(){return a.G?a.G.Yd():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Y:a.I,zc:a.J,onError:function(b){return xm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Xi:function(){a.H&&a.H.update&&a.H.update()},Zf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;a.G&&a.G.gh();rn(a);d=(new Map).set("start",d).set("end",e).set("contentType",f);a.dispatchEvent(rm("segmentappended",d));a.u&&c.fastSwitching&&b.Fd&&b.ue&&a.u.trySuggestStreams()},
|
|
535
535
|
Wi:function(b,c){(c=c.Uf)&&a.sa&&Yj(a.sa,c,b)},Gg:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new ug(lc(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;hh(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Yi:function(b,c,d){Im(a,b,c,d)},ce:function(b,c){return a.ce(b,c)}})}
|
|
@@ -544,32 +544,32 @@ p.Ha=function(){if(this.i){if(!this.Xa&&"HLS"==this.i.type)return{start:0,end:0}
|
|
|
544
544
|
p.Ff=function(){return this.m?this.m.Ff():[]};p.ge=function(){return this.m?this.m.ge():{}};p.yd=function(){return this.M?this.M.g==gf:!1};p.Mb=function(){return this.h?this.K?this.K.h:1:0};
|
|
545
545
|
p.Pd=function(a){var b=this;0==a?Ra("A trick play rate of 0 is unsupported!"):(this.va.ub(),this.h.paused&&this.h.play(),this.K.set(a),this.l==Xm&&(this.u.playbackRateChanged(a),zk(this.j,1<Math.abs(a))),this.R()&&this.va.o(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Ha(),e=b.g.streaming.safeSeekOffset;0<a?c>=d.end&&b.od():c<=d.start+e&&b.od()}))};p.od=function(){var a=this.K.Lc();this.l==ln&&this.K.set(a);this.l==Xm&&(this.K.set(a),this.u.playbackRateChanged(a),zk(this.j,!1));this.va.ub()};
|
|
546
546
|
p.mb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Be(e)){var f=te(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return Ae(g)}):[]};
|
|
547
|
-
p.
|
|
548
|
-
p.Rh=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Xm&&b.l!=ln)return g.return(null);c=b.tc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.F(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Pj(d.segmentIndex,function(h){var k=vn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.
|
|
549
|
-
function vn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{
|
|
550
|
-
p.Kf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){if(1==C.g){if(c.l!=Xm&&c.l!=ln)return C.return(null);d=c.tc;c.i&&(d=c.i.imageStreams);return(e=d.find(function(E){return E.id==a}))?e.segmentIndex?C.F(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=vn(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.
|
|
551
|
-
u=g.C||q/r;v=g.startTime;z=x=0;1<r&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.
|
|
547
|
+
p.bc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ue(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?nn(this).map(function(f){return ye(f)}):[]};p.fe=function(){var a=this.tc;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ve(b)})};
|
|
548
|
+
p.Rh=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Xm&&b.l!=ln)return g.return(null);c=b.tc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.F(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Pj(d.segmentIndex,function(h){var k=vn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.mc;for(var l=h.h-h.startTime,m=0;m<k;m++)e.push(b.Kf(a,h.startTime+l*m/k))}}),D(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
549
|
+
function vn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{mc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
550
|
+
p.Kf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){if(1==C.g){if(c.l!=Xm&&c.l!=ln)return C.return(null);d=c.tc;c.i&&(d=c.i.imageStreams);return(e=d.find(function(E){return E.id==a}))?e.segmentIndex?C.F(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=vn(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.mc;n=l/h.rows;r=h.mc*h.rows;q=g.h-g.startTime;
|
|
551
|
+
u=g.C||q/r;v=g.startTime;z=x=0;1<r&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.mc*m,z=Math.floor(y/h.mc)*n);B=!1;if(A=g.u)B=!0,n=A.height,x=A.positionX,z=A.positionY,m=A.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:v,duration:u,uris:g.ba(),width:m,sprite:B})})};
|
|
552
552
|
p.jg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(gm(this.C.h,b,!1),Ck(this.j,b),wn(this),this.Wa=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=nn(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,we(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";wn(this)}};
|
|
553
553
|
p.Me=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.g.abr.enabled&&Ra("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&&Be(d)&&(Vm(this,d,!1,b,c),this.Ra=new Ue(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),gn(this))}else if(this.h&&this.h.audioTracks)for(b=
|
|
554
|
-
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,we(c)==a.id){xn(this,c);break}};p.Th=function(){return yn(this.mb())};p.xi=function(){return yn(this.
|
|
554
|
+
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,we(c)==a.id){xn(this,c);break}};p.Th=function(){return yn(this.mb())};p.xi=function(){return yn(this.bc())};p.Sh=function(){return Array.from(zn(this.mb()))};p.wi=function(){return Array.from(zn(this.bc()))};
|
|
555
555
|
p.Le=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.G){this.Ra=new Ve(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.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.Ra.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
556
|
-
b))c=f;c?(a=te(c),this.Me(a,!0,d)):un(this)}else this.h&&this.h.audioTracks&&(d=De(this.mb(),a,b||"",!1)[0])&&this.Me(d)};p.ig=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Wa=a,this.
|
|
556
|
+
b))c=f;c?(a=te(c),this.Me(a,!0,d)):un(this)}else this.h&&this.h.audioTracks&&(d=De(this.mb(),a,b||"",!1)[0])&&this.Me(d)};p.ig=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Wa=a,this.nc=b||"",this.Vb=c,(a=De(this.i.textStreams,this.Wa,this.nc,this.Vb)[0]||null)&&a!=this.j.s&&(gm(this.C.h,a,!1),this.g.streaming.alwaysStreamText||this.xc()))Ck(this.j,a),wn(this)}else(a=De(this.bc(),a,b||"",c)[0])&&this.jg(a)};
|
|
557
557
|
p.oj=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=t(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.Ra=new Ve(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),un(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&xn(this,b)}};
|
|
558
558
|
p.xc=function(){var a=this.$;return this.I&&this.l==Xm?this.I.H.isTextVisible():this.h&&this.h.src&&this.h.textTracks?nn(this).some(function(b){return"showing"==b.mode}):a};p.Sg=function(){return this.h&&this.h.src&&this.h.textTracks?An(this).map(function(a){return ye(a)}):[]};
|
|
559
559
|
p.Wh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Kb(a),c=An(this).filter(function(h){return Kb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(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};
|
|
560
560
|
function nn(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function qn(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function An(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
561
|
-
p.Oe=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Xm)this.I.H.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=De(this.i.textStreams,this.Wa,this.
|
|
561
|
+
p.Oe=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Xm)this.I.H.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=De(this.i.textStreams,this.Wa,this.nc,this.Vb),0<a.length&&(Ck(this.j,a[0]),wn(this))):yk(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=nn(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}en(this)}};
|
|
562
562
|
p.oi=function(){if(!this.R())return null;if(this.G)var a=this.G.Yd();else{if(null==this.ha)return new Date;a=this.ha}if(this.i)return new Date(1E3*(this.i.presentationTimeline.i+a));if(this.h&&this.h.getStartDate){var b=this.h.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)}return null};
|
|
563
563
|
p.Vg=function(){if(!this.R())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.h&&this.h.getStartDate){var a=this.h.getStartDate();return isNaN(a.getTime())?null:a}return null};p.Lb=function(){if(this.l==Xm)return this.I.Lb();var a={total:[],audio:[],video:[],text:[]};this.l==ln&&(a.total=Vh(this.h.buffered));return a};
|
|
564
564
|
p.getStats=function(){if(this.l!=Xm&&this.l!=ln)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,switchHistory:[],stateHistory:[]};Sm(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=
|
|
565
565
|
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.C.M=this.G.Bg(),this.C.N=this.G.Cg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.C;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.C.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.K?c.K:NaN):c=NaN;this.C.u=c;if(this.l==Xm){c=this.j.j;b=this.j.s;if(c){d=this.K?this.K.h:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.C.D=e}c&&c.video&&(b=this.C,d=c.video.height||
|
|
566
566
|
NaN,b.s=c.video.width||NaN,b.l=d);this.R()&&(c=this.Vg().valueOf()+1E3*a.currentTime,this.C.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.C.I=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.C.C=c}this.l==ln&&(c=this.C,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var f=this.C;a=f.s;c=f.l;b=f.D;d=f.K;e=f.L;var g=f.J,h=f.N,k=f.M,l=f.C,m=f.i,n=f.m,r=f.H,q=f.j,u=dm(f.g,"playing"),v=dm(f.g,"paused"),x=dm(f.g,"buffering"),z=f.u,y=f.G,B=f.I,A=em(f.g),C=[];f=t(f.h.g);
|
|
567
567
|
for(var E=f.next();!E.done;E=f.next())E=E.value,C.push({timestamp:E.timestamp,id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.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:q,playTime:u,pauseTime:v,bufferingTime:x,licenseTime:z,liveLatency:y,maxSegmentDuration:B,stateHistory:A,switchHistory:C}};
|
|
568
|
-
p.Hh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:if(h.l!=Xm&&h.l!=ln)throw new P(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ra("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.F(2);break}return D(A,Bn(h,a),3);case 3:d=A.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=ln){A.F(4);break}g&&(c="forced");return D(A,Cn(h,a,b,c,d,f||"",k),5);case 5:l=Kb(b);m=h.
|
|
568
|
+
p.Hh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:if(h.l!=Xm&&h.l!=ln)throw new P(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ra("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.F(2);break}return D(A,Bn(h,a),3);case 3:d=A.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=ln){A.F(4);break}g&&(c="forced");return D(A,Cn(h,a,b,c,d,f||"",k),5);case 5:l=Kb(b);m=h.bc();if(n=m.find(function(C){return Kb(C.language)==
|
|
569
569
|
l&&C.label==(f||"")&&C.kind==c}))return Rm(h),A.return(n);throw new P(1,2,2012);case 4:r=Hb;q=h.h.duration;h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new P(1,4,4033);if(!k.length){A.F(6);break}return D(A,Dn(h,a,h.J,h.g.streaming.retryParameters),7);case 7:u=A.h,v=En(h,u,d,k),x=new Blob([v],{type:"text/vtt"}),a=Pi(x),d="text/vtt";case 6:z={id:h.Ag++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Rj(0,q,[a]),mimeType:d||"",
|
|
570
570
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:r.Da,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};y=dd(z.mimeType,z.codecs);B=pd(y);if(!B)throw new P(2,2,2014,d);h.i.textStreams.push(z);Rm(h);return A.return(ue(z))}})};
|
|
571
571
|
p.Ih=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(B){switch(B.g){case 1:if(c.l!=Xm&&c.l!=ln)throw new P(1,7,7004);if(b){B.F(2);break}return D(B,Bn(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new P(1,2,2017,a);d=Hb;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new P(1,4,4045);return D(B,Dn(c,a,c.J,c.g.streaming.retryParameters),4);case 4:f=B.h;g=qd[b];if(!g)throw new P(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
572
|
-
vttOffset:0};l=lc(f);m=h.parseMedia(l,k,a);n=[];r={};q=t(m);for(u=q.next();!u.done;r={jd:r.jd,
|
|
572
|
+
vttOffset:0};l=lc(f);m=h.parseMedia(l,k,a);n=[];r={};q=t(m);for(u=q.next();!u.done;r={jd:r.jd,jc:r.jc},u=q.next())r.jc=u.value,r.jd=null,v=function(A){return function(){null==A.jd&&(A.jd=zb([a],[A.jc.payload]));return A.jd||[]}}(r),x=new Ph(r.jc.startTime,r.jc.endTime,v,0,null,null,0,0,Infinity),r.jc.payload.includes("#xywh")&&(z=r.jc.payload.split("#xywh=")[1].split(","),4===z.length&&x.rh({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
|
|
573
573
|
n.push(x);y={id:c.Ag++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.cf,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};c.l==ln?c.tc.push(y):
|
|
574
574
|
c.i.imageStreams.push(y);Rm(c);return B.return(ve(y))}})};
|
|
575
575
|
p.Gh=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Xm&&d.l!=ln)throw new P(1,7,7004);if(c){k.F(2);break}return D(k,Bn(d,a),3);case 3:c=k.h;case 2:return e=[],d.D&&(e=d.D.getCuePoints()),D(k,Cn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Sg();h=g.find(function(l){return l.language==b});if(!h){k.F(5);break}return D(k,new Promise(function(l,m){d.s.na(f,"load",l);d.s.na(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return Rm(d),k.return(h);case 5:throw new P(1,
|
|
@@ -583,7 +583,7 @@ function Lm(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.nex
|
|
|
583
583
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1};b.textStreams.push(h);c.add(g)}}
|
|
584
584
|
function Km(a,b){return K(function(c){if(1==c.g)return D(c,Fn(a,b),2);tn(a,b);F(c)})}function Fn(a,b){return K(function(c){if(1==c.g)return D(c,de(a.m,b),2);if(!b.variants.some(Be))throw new P(2,4,4032);F(c)})}function tn(a,b){if(a.l!=sm){ce(b.variants,a.g.restrictions,a.Ee)&&a.j&&Rm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Mm(a,c.keySystem,e.video),Mm(a,c.keySystem,e.audio);Gn(a,b)}}
|
|
585
585
|
function Mm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,hh(a.m,e.initDataType,e.initData)}}}
|
|
586
|
-
function cn(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,r;return K(function(q){if(1==q.g)return k?D(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.
|
|
586
|
+
function cn(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,r;return K(function(q){if(1==q.g)return k?D(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.rc(l))?m.next().value:null;if(!n)return q.return(null);r=n.startTime;return q.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)})}
|
|
587
587
|
function zm(a){var b=a.yd();if(a.C&&a.M&&a.G){if(a.V){var c=a.V;b||c.i||(c.i=!0);c.i&&b&&(c.j=!0);c.l=b}Sm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(rm("buffering",b))}function Tm(a){var b=a.h.playbackRate;0!=b&&(a.K&&a.K.set(b),b=rm("ratechange"),a.dispatchEvent(b))}
|
|
588
588
|
function Sm(a){if(a.C&&a.M){var b=a.C.g,c="playing";a.M.g==gf?c="buffering":a.h.paused?c="paused":a.h.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(rm("statechanged",c)))}}
|
|
589
589
|
function hn(a){if(a.R()){var b=a.Ha();if(Number.isFinite(b.end)&&!(a.h.currentTime<b.start)){if(a.g.streaming.liveSync){var c=a.g.streaming.liveSyncMaxLatency;var d=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.g.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var e=a.g.streaming.liveSyncMinLatency;var f=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&
|
|
@@ -604,20 +604,20 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a)
|
|
|
604
604
|
function yn(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Kb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(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=t(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));
|
|
605
605
|
h.push({language:l,role:m,label:n})}});return h}L("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.rg;V.prototype.getManifestParserFactory=V.prototype.li;V.prototype.getManifest=V.prototype.ki;V.prototype.retryStreaming=V.prototype.eg;V.prototype.setMaxHardwareResolution=V.prototype.ng;V.prototype.addChaptersTrack=V.prototype.Gh;V.prototype.addThumbnailsTrack=V.prototype.Ih;V.prototype.addTextTrackAsync=V.prototype.Hh;V.prototype.getStats=V.prototype.getStats;
|
|
606
606
|
V.prototype.getBufferedInfo=V.prototype.Lb;V.prototype.getPresentationStartTimeAsDate=V.prototype.Vg;V.prototype.getPlayheadTimeAsDate=V.prototype.oi;V.prototype.setTextTrackVisibility=V.prototype.Oe;V.prototype.getChapters=V.prototype.Wh;V.prototype.getChaptersTracks=V.prototype.Sg;V.prototype.isTextTrackVisible=V.prototype.xc;V.prototype.selectVariantsByLabel=V.prototype.oj;V.prototype.selectTextLanguage=V.prototype.ig;V.prototype.selectAudioLanguage=V.prototype.Le;
|
|
607
|
-
V.prototype.getTextLanguages=V.prototype.wi;V.prototype.getAudioLanguages=V.prototype.Sh;V.prototype.getTextLanguagesAndRoles=V.prototype.xi;V.prototype.getAudioLanguagesAndRoles=V.prototype.Th;V.prototype.selectVariantTrack=V.prototype.Me;V.prototype.selectTextTrack=V.prototype.jg;V.prototype.getThumbnails=V.prototype.Kf;V.prototype.getAllThumbnails=V.prototype.Rh;V.prototype.getImageTracks=V.prototype.fe;V.prototype.getTextTracks=V.prototype.
|
|
607
|
+
V.prototype.getTextLanguages=V.prototype.wi;V.prototype.getAudioLanguages=V.prototype.Sh;V.prototype.getTextLanguagesAndRoles=V.prototype.xi;V.prototype.getAudioLanguagesAndRoles=V.prototype.Th;V.prototype.selectVariantTrack=V.prototype.Me;V.prototype.selectTextTrack=V.prototype.jg;V.prototype.getThumbnails=V.prototype.Kf;V.prototype.getAllThumbnails=V.prototype.Rh;V.prototype.getImageTracks=V.prototype.fe;V.prototype.getTextTracks=V.prototype.bc;V.prototype.getVariantTracks=V.prototype.mb;
|
|
608
608
|
V.prototype.cancelTrickPlay=V.prototype.od;V.prototype.trickPlay=V.prototype.Pd;V.prototype.getPlaybackRate=V.prototype.Mb;V.prototype.isBuffering=V.prototype.yd;V.prototype.getKeyStatuses=V.prototype.ge;V.prototype.getActiveSessionsMetadata=V.prototype.Ff;V.prototype.getExpiration=V.prototype.td;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.Fi;V.prototype.seekRange=V.prototype.Ha;V.prototype.isAudioOnly=V.prototype.Pc;
|
|
609
609
|
V.prototype.isInProgress=V.prototype.wc;V.prototype.isLive=V.prototype.R;V.prototype.getAdManager=V.prototype.ee;V.prototype.getAssetUri=V.prototype.Gf;V.prototype.getNetworkingEngine=V.prototype.Yb;V.prototype.getMediaElement=V.prototype.ni;V.prototype.getManifestType=V.prototype.If;V.prototype.getLoadMode=V.prototype.ie;V.prototype.resetConfiguration=V.prototype.hj;V.prototype.getBufferFullness=V.prototype.Uh;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
|
|
610
610
|
V.prototype.releaseAllMutexes=V.prototype.dj;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.xj;V.prototype.unload=V.prototype.Wc;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.Eg;V.prototype.attach=V.prototype.Gc;
|
|
611
611
|
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?D(h,Ah(),3):h.F(2);2!=h.g&&(b=h.h);var k={};if(Ed())for(var l in Ih)k[l]=!0;l=t(["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]=Ed()?!!Ih[m]:Fd(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(w(ed));
|
|
612
|
-
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Ed()?pd(m)?!0:ac(m)||(Yc(m)?!0:!1):Fd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=Kn;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=tm;V.setAdManagerFactory=function(a){mm=a};V.registerSupportPlugin=function(a,b){Kn[a]=b};V.prototype.destroy=V.prototype.destroy;var sm=0,im=1,Xm=2,ln=3;V.LoadMode={DESTROYED:sm,NOT_LOADED:im,MEDIA_SOURCE:Xm,SRC_EQUALS:ln};V.version="v4.7.
|
|
613
|
-
Ne=new function(a){this.g=a;this.i=Oe;this.h=Pe}(new Le(Number(Ln[0]),Number(Ln[1])));var Jn=["output-restricted","internal-error"],Kn={},mm=null;function Mn(){this.h=[];this.j=this.i=this.g=0};function Nn(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 Kf;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Nn.prototype;p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};
|
|
612
|
+
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Ed()?pd(m)?!0:ac(m)||(Yc(m)?!0:!1):Fd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=Kn;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=tm;V.setAdManagerFactory=function(a){mm=a};V.registerSupportPlugin=function(a,b){Kn[a]=b};V.prototype.destroy=V.prototype.destroy;var sm=0,im=1,Xm=2,ln=3;V.LoadMode={DESTROYED:sm,NOT_LOADED:im,MEDIA_SOURCE:Xm,SRC_EQUALS:ln};V.version="v4.7.10";
|
|
613
|
+
var Ln=["4","7"];Ne=new function(a){this.g=a;this.i=Oe;this.h=Pe}(new Le(Number(Ln[0]),Number(Ln[1])));var Jn=["output-restricted","internal-error"],Kn={},mm=null;function Mn(){this.h=[];this.j=this.i=this.g=0};function Nn(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 Kf;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Nn.prototype;p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};
|
|
614
614
|
p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
615
615
|
p.isMuted=function(){return 0==this.h.getVolume()};p.isLinear=function(){return this.g.isLinear()};p.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)};p.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
616
616
|
p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
617
617
|
p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};L("shaka.ads.ClientSideAd",Nn);Nn.prototype.release=Nn.prototype.release;
|
|
618
618
|
Nn.prototype.getPodIndex=Nn.prototype.getPodIndex;Nn.prototype.getTimeOffset=Nn.prototype.getTimeOffset;Nn.prototype.getMediaUrl=Nn.prototype.getMediaUrl;Nn.prototype.getAdvertiserName=Nn.prototype.getAdvertiserName;Nn.prototype.getCreativeAdId=Nn.prototype.getCreativeAdId;Nn.prototype.getAdId=Nn.prototype.getAdId;Nn.prototype.getVastMediaWidth=Nn.prototype.getVastMediaWidth;Nn.prototype.getVastMediaHeight=Nn.prototype.getVastMediaHeight;Nn.prototype.getVastMediaBitrate=Nn.prototype.getVastMediaBitrate;
|
|
619
619
|
Nn.prototype.getDescription=Nn.prototype.getDescription;Nn.prototype.getTitle=Nn.prototype.getTitle;Nn.prototype.getPositionInSequence=Nn.prototype.getPositionInSequence;Nn.prototype.getSequenceLength=Nn.prototype.getSequenceLength;Nn.prototype.setMuted=Nn.prototype.setMuted;Nn.prototype.resize=Nn.prototype.resize;Nn.prototype.isLinear=Nn.prototype.isLinear;Nn.prototype.isMuted=Nn.prototype.isMuted;Nn.prototype.setVolume=Nn.prototype.setVolume;Nn.prototype.getVolume=Nn.prototype.getVolume;
|
|
620
|
-
Nn.prototype.play=Nn.prototype.play;Nn.prototype.pause=Nn.prototype.pause;Nn.prototype.skip=Nn.prototype.skip;Nn.prototype.canSkipNow=Nn.prototype.canSkipNow;Nn.prototype.getTimeUntilSkippable=Nn.prototype.getTimeUntilSkippable;Nn.prototype.isSkippable=Nn.prototype.isSkippable;Nn.prototype.isPaused=Nn.prototype.isPaused;Nn.prototype.getRemainingTime=Nn.prototype.getRemainingTime;Nn.prototype.getMinSuggestedDuration=Nn.prototype.getMinSuggestedDuration;Nn.prototype.getDuration=Nn.prototype.getDuration;function On(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new Kf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.
|
|
620
|
+
Nn.prototype.play=Nn.prototype.play;Nn.prototype.pause=Nn.prototype.pause;Nn.prototype.skip=Nn.prototype.skip;Nn.prototype.canSkipNow=Nn.prototype.canSkipNow;Nn.prototype.getTimeUntilSkippable=Nn.prototype.getTimeUntilSkippable;Nn.prototype.isSkippable=Nn.prototype.isSkippable;Nn.prototype.isPaused=Nn.prototype.isPaused;Nn.prototype.getRemainingTime=Nn.prototype.getRemainingTime;Nn.prototype.getMinSuggestedDuration=Nn.prototype.getMinSuggestedDuration;Nn.prototype.getDuration=Nn.prototype.getDuration;function On(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new Kf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.10");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
621
621
|
function(g){Pn(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Qn(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.D=!0})}On.prototype.configure=function(a){this.G=a};On.prototype.stop=function(){this.g&&this.g.stop();this.s&&fl(this.s)};On.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
622
622
|
function Qn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new O("ad-error",b));Rn(a,null);a.m(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
623
623
|
function Pn(a,b){a.m(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.G.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(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.C);a.m(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -635,7 +635,7 @@ p.isLinear=function(){return this.l};p.resize=function(){};p.setMuted=function(a
|
|
|
635
635
|
p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.j=this.i=this.g=this.h=null};L("shaka.ads.MediaTailorAd",Vn);Vn.prototype.release=Vn.prototype.release;Vn.prototype.getPodIndex=Vn.prototype.getPodIndex;Vn.prototype.getTimeOffset=Vn.prototype.getTimeOffset;Vn.prototype.getMediaUrl=Vn.prototype.getMediaUrl;Vn.prototype.getAdvertiserName=Vn.prototype.getAdvertiserName;
|
|
636
636
|
Vn.prototype.getCreativeAdId=Vn.prototype.getCreativeAdId;Vn.prototype.getAdId=Vn.prototype.getAdId;Vn.prototype.getVastMediaWidth=Vn.prototype.getVastMediaWidth;Vn.prototype.getVastMediaHeight=Vn.prototype.getVastMediaHeight;Vn.prototype.getVastMediaBitrate=Vn.prototype.getVastMediaBitrate;Vn.prototype.getDescription=Vn.prototype.getDescription;Vn.prototype.getTitle=Vn.prototype.getTitle;Vn.prototype.getPositionInSequence=Vn.prototype.getPositionInSequence;Vn.prototype.getSequenceLength=Vn.prototype.getSequenceLength;
|
|
637
637
|
Vn.prototype.setMuted=Vn.prototype.setMuted;Vn.prototype.resize=Vn.prototype.resize;Vn.prototype.isLinear=Vn.prototype.isLinear;Vn.prototype.isMuted=Vn.prototype.isMuted;Vn.prototype.setVolume=Vn.prototype.setVolume;Vn.prototype.getVolume=Vn.prototype.getVolume;Vn.prototype.play=Vn.prototype.play;Vn.prototype.pause=Vn.prototype.pause;Vn.prototype.skip=Vn.prototype.skip;Vn.prototype.canSkipNow=Vn.prototype.canSkipNow;Vn.prototype.getTimeUntilSkippable=Vn.prototype.getTimeUntilSkippable;
|
|
638
|
-
Vn.prototype.isSkippable=Vn.prototype.isSkippable;Vn.prototype.isPaused=Vn.prototype.isPaused;Vn.prototype.getRemainingTime=Vn.prototype.getRemainingTime;Vn.prototype.getMinSuggestedDuration=Vn.prototype.getMinSuggestedDuration;Vn.prototype.getDuration=Vn.prototype.getDuration;function Wn(a,b,c,d){this.D=a;this.K=b;this.g=c;this.l=null;this.W=NaN;this.i=d;this.J=!1;this.C=null;this.j=[];this.M=[];this.L=this.G=this.h=null;this.H=new Map;this.m=[];this.u=[];this.N="";this.V=!0;this.I="";this.s=new Kf}Wn.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.
|
|
638
|
+
Vn.prototype.isSkippable=Vn.prototype.isSkippable;Vn.prototype.isPaused=Vn.prototype.isPaused;Vn.prototype.getRemainingTime=Vn.prototype.getRemainingTime;Vn.prototype.getMinSuggestedDuration=Vn.prototype.getMinSuggestedDuration;Vn.prototype.getDuration=Vn.prototype.getDuration;function Wn(a,b,c,d){this.D=a;this.K=b;this.g=c;this.l=null;this.W=NaN;this.i=d;this.J=!1;this.C=null;this.j=[];this.M=[];this.L=this.G=this.h=null;this.H=new Map;this.m=[];this.u=[];this.N="";this.V=!0;this.I="";this.s=new Kf}Wn.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.hc(b.target,b.type,b.listener);Xn(this);this.m=[];this.u=[];this.N="";this.V=!0;this.I="";this.C=null;this.j=[];this.M=[];this.H.clear()};
|
|
639
639
|
Wn.prototype.release=function(){this.stop();this.s&&this.s.release()};Wn.prototype.onManifestUpdated=function(a){this.J=a;""!=this.N&&(Yn(this,this.N,this.V),this.V=!1)};Wn.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(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};
|
|
640
640
|
function Zn(a,b,c){var d,e,f,g,h,k,l,m,n,r,q;K(function(u){if(1==u.g)return d=Af([b],kf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Xf(e)),f=a.K.request(7,d),ta(u,2),D(u,f.promise,4);if(2!=u.g){g=u.h;h=Tf(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new fb(b),m=new fb(k.trackingUrl),a.N=l.resolve(m).toString(),n=Date.now()/1E3,r=n-a.W,a.i(new O("ads-loaded",(new Map).set("loadTime",r))),q=new fb(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
641
641
|
return va(u,0)}wa(u);if(!a.I.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.I);a.l=null;F(u)})}
|
|
@@ -648,7 +648,7 @@ function co(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if
|
|
|
648
648
|
e=a.h.getDuration();0<e&&(0>=d||d>e)&&Xn(a)}if(!a.h||!a.h.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.M.includes(g.adId)){if(a.g.ended)continue;a.g.currentTime=h;break a}Xn(a);a.L=e;a.h=new Vn(g,f+1,e.ads.length,!0,a.g);a.G=g;0===f&&fo(a,"breakStart");go(a);break}}}if(!a.h)for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
|
|
649
649
|
if(a.h)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.H.get(bo(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Xn(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||0)+"%";m.style.maxWidth=100-(l.placeholder.left||
|
|
650
650
|
0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.D.appendChild(m)}a.L=e;a.h=new Vn(g,f+1,e.ads.length,!1,a.g);a.G=g;0===f&&fo(a,"breakStart");go(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.C&&a.C>b&&(a.g.currentTime=a.C),a.C=null)}}}
|
|
651
|
-
function Xn(a){if(a.h){for(;a.D.lastChild;)a.D.removeChild(a.D.firstChild);a.J||a.M.push(a.G.adId);fo(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.s.
|
|
651
|
+
function Xn(a){if(a.h){for(;a.D.lastChild;)a.D.removeChild(a.D.firstChild);a.J||a.M.push(a.G.adId);fo(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.s.hc(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&fo(a,"breakEnd");a.h=null;a.G=null;a.L=null}}
|
|
652
652
|
function go(a){var b=!1;a.g.paused?b=!0:(fo(a,"impression"),fo(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&fo(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||fo(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(fo(a,"impression"),fo(a,"start"),b=!1):fo(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){fo(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target,
|
|
653
653
|
d.type,d.listener)}
|
|
654
654
|
function fo(a,b){var c=a.G.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=Af([d],kf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new O("ad-impression"));break;case "start":a.i(new O("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new O("ad-muted"));break;case "unmute":a.i(new O("ad-volume-changed"));break;
|
|
@@ -667,8 +667,8 @@ function jo(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
667
667
|
p.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);$a.prototype.release.call(this)};p.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.j=new Mn};p.requestClientSideAds=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.H=Date.now()/1E3;b.l.requestAds(a)};
|
|
668
668
|
p.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Wn(a,b,c,function(e){return ko(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new P(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new P(1,10,10004)):(d.l=new mf,Zn(d,a,b),d.I=c||"",d.W=Date.now()/1E3,a=d.l);return a};
|
|
669
669
|
p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new io(a,b,this.m,function(d){return ko(c,d)});this.g.configure(this.l)};
|
|
670
|
-
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ra('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.7.
|
|
671
|
-
(c.I=!0),c.j=new mf,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ra('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.7.
|
|
670
|
+
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ra('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.7.10";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
671
|
+
(c.I=!0),c.j=new mf,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ra('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.7.10";this.g.g.replaceAdTagParameters(a)};
|
|
672
672
|
p.getServerSideCuePoints=function(){Me("AdManager","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
673
673
|
p.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};p.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
674
674
|
function ko(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)}L("shaka.ads.AdManager",W);W.prototype.onCueMetadataChange=W.prototype.onCueMetadataChange;W.prototype.onHlsTimedMetadata=W.prototype.onHlsTimedMetadata;W.prototype.onDashTimedMetadata=W.prototype.onDashTimedMetadata;W.prototype.onManifestUpdated=W.prototype.onManifestUpdated;W.prototype.getStats=W.prototype.getStats;
|
|
@@ -691,7 +691,7 @@ p.set=function(a,b,c){this.g[a][b]=c;Ko(this,{type:"set",targetName:a,property:b
|
|
|
691
691
|
p.kh=function(a,b){Ko(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};p.ej=function(a,b){var c=Ga.apply(2,arguments),d=new mf,e=this.J.toString();this.J++;this.i[e]=d;try{Ko(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Fo(a,b){var c=a.K();a.l=new mf;a.C=!0;Lo(a,c,b)}function Eo(a){var b=Do;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
692
692
|
function Ao(a){var b=Do?"connected"==Do.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Co(a)}a.h=b;a.L=b?Do.receiver.friendlyName:"";a.j.Qa()}function Co(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function Ko(a,b){b=lo(b);var c=Do;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Va)}catch(d){throw b=new P(2,8,8005,d),c=new O("error",(new Map).set("detail",b)),a.u("player",c),a.Jc(),b;}}var Ho=.02,Go=!1,Do=null,Jo=null,Bo=new Set;
|
|
693
693
|
function Io(a){Jo?window.__onGCastApiAvailable=Jo:delete window.__onGCastApiAvailable;Jo=null;if(a)for(var b=t(Bo),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Oo(a,b,c,d){d=void 0===d?!1:d;$a.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.D=d;this.C=new Map;this.g=new zo(c,function(){return Po(e)},function(){return Qo(e)},function(f,g){return Ro(e,f,g)},function(){return So(e)},function(){return To(e)},d);Uo(this)}pa(Oo,$a);p=Oo.prototype;
|
|
694
|
-
p.destroy=function(a){a&&this.g.Jc();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;$a.prototype.release.call(this);return Promise.all(a)};p.
|
|
694
|
+
p.destroy=function(a){a&&this.g.Jc();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;$a.prototype.release.call(this);return Promise.all(a)};p.cc=function(){return this.l};p.Mc=function(){return this.u};p.kf=function(){return this.g.m&&Go};p.Ba=function(){return this.g.Ba()};p.Je=function(){return this.g.Je()};
|
|
695
695
|
p.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=To(a),D(c,a.g.cast(b),2)):a.h?D(c,a.h.Wc(),0):c.return()})};p.kg=function(a){this.g.kg(a)};p.vh=function(){No(this.g)};p.Jc=function(){this.g.Jc()};
|
|
696
696
|
p.Jg=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.D)return d.return();c.G=a;c.D=b;c.g.Jc();return D(d,c.g.destroy(),2)}c.g=null;c.g=new zo(a,function(){return Po(c)},function(){return Qo(c)},function(e,f){return Ro(c,e,f)},function(){return So(c)},function(){return To(c)},b);c.g.init();F(d)})};
|
|
697
697
|
function Uo(a){a.g.init();a.m=new Kf;for(var b=t(oo),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ba()||(f=Na(f),a.j.dispatchEvent(f))});for(var d in Oa)a.m.o(a.h,Oa[d],function(f){a.g.Ba()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.$c=e,Object.defineProperty(a.l,b.$c,{configurable:!1,enumerable:!0,get:function(f){return function(){return Vo(a,f.$c)}}(b),set:function(f){return function(g){var h=f.$c;a.g.Ba()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={$c:b.$c};a.u={};Wo(a,
|
|
@@ -705,7 +705,7 @@ function Vo(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addE
|
|
|
705
705
|
function Xo(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Yb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.ee()};
|
|
706
706
|
if("setVideoContainer"==b)return function(c){return a.h.rg(c)};if(a.g.Ba()){if("getManifest"==b||"drmInfo"==b)return function(){Ra(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ra(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ba()&&0==Object.keys(a.g.g.video).length&&(so[b]||to[b])||!a.g.Ba()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
707
707
|
function Ro(a,b,c){a.g.Ba()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}L("shaka.cast.CastProxy",Oo);Oo.prototype.changeReceiverId=Oo.prototype.Jg;Oo.prototype.forceDisconnect=Oo.prototype.Jc;Oo.prototype.suggestDisconnect=Oo.prototype.vh;Oo.prototype.setAppData=Oo.prototype.kg;Oo.prototype.cast=Oo.prototype.cast;Oo.prototype.receiverName=Oo.prototype.Je;Oo.prototype.isCasting=Oo.prototype.Ba;Oo.prototype.canCast=Oo.prototype.kf;Oo.prototype.getPlayer=Oo.prototype.Mc;
|
|
708
|
-
Oo.prototype.getVideo=Oo.prototype.
|
|
708
|
+
Oo.prototype.getVideo=Oo.prototype.cc;Oo.prototype.destroy=Oo.prototype.destroy;function Zo(a,b,c,d){$a.call(this);var e=this;this.g=a;this.h=b;this.j=new Kf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.D=!1;this.C=!0;this.u=this.l=null;this.I=new Dd(function(){$o(e)});ap(this)}pa(Zo,$a);p=Zo.prototype;p.isConnected=function(){return this.H};p.Ji=function(){return this.s};p.rj=function(a){this.i=a};p.Nh=function(){this.i=null};
|
|
709
709
|
p.sj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.qj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.pj=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
710
710
|
p.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.s=!0,a.l=null,a.u=null,$a.prototype.release.call(a),D(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
711
711
|
function ap(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return bp(a)};b.onSenderDisconnected=function(){return bp(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&cp(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);cp(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return dp(a,
|
|
@@ -782,23 +782,22 @@ function sr(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,B,A,C;return K(function(E
|
|
|
782
782
|
I=G.g.byteOffset;G=new er(G.g);for(var H=null;G.xa();){var J=fr(G);if(357149030==J.id){H=J;break}}if(!H)throw new P(2,3,3010);H=new er(H.g);J=1E6;for(G=null;H.xa();){var M=fr(H);if(2807729==M.id)J=jr(M);else if(17545==M.id)if(4==M.g.byteLength)G=M.g.getFloat32(0);else if(8==M.g.byteLength)G=M.g.getFloat64(0);else throw new P(2,3,3003);}if(null==G)throw new P(2,3,3011);H=J/1E9;G*=H;J=fr(new er(x));if(475249515!=J.id)throw new P(2,3,3007);I=kr(J,I,H,G,d,c,B,A,C)}y=I;h.Dd(y);q=new Oj(y);k&&q.Ic(A,C,
|
|
783
783
|
!0);return E.return(q)})}function pr(a){return a.Ld}function rr(a){var b=Zq(a,pr,"RepresentationIndex");a=Yq(a,pr,"indexRange");a=Ig(a||"");b&&(a=Fg(b,"range",Ig,a));return a}function qr(a,b){tr(a,b);if(!rr(a))throw new P(2,4,4002);}function tr(a,b){var c=a.P.mimeType.split("/")[1];if(a.P.contentType!=Gb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
|
|
784
784
|
function nr(a){var b=a.P;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.De,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function ur(a,b,c){var d=mr(a,vr,c),e=wr(a);if(!e.Pa&&!e.timeline&&1<e.Rc.length)throw new P(2,4,4002);if(!e.Pa&&!a.ma.duration&&!e.timeline&&1==e.Rc.length)throw new P(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new P(2,4,4002);var f=null,g=null;a.Ka.id&&a.P.id&&(g=b[a.Ka.id+","+a.P.id])&&(f=g.segmentIndex);var h=xr(a.ma.start,a.ma.duration,a.P.zb,e,d,c);b=!f;f?f.Cd(h,a.presentationTimeline.Ab()):f=new Oj(h);a.presentationTimeline.Dd(h);a.Wb&&a.ma.Mf||f.Ic(a.ma.start,a.ma.duration?a.ma.start+
|
|
785
|
-
a.ma.duration:Infinity,b);g&&(g.segmentIndex=f);return{Kc:function(){f&&0!=f.
|
|
785
|
+
a.ma.duration:Infinity,b);g&&(g.segmentIndex=f);return{Kc:function(){f&&0!=f.Zb()||f.ze(h);return Promise.resolve(f)}}}function vr(a){return a.fc}function wr(a){var b=yr(a);a=Xq(a,vr);var c=a.Nd;0==c&&(c=1);var d=0;a.Pa?d=a.Pa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Pa:a.Pa,startTime:d,Nd:c,Rb:a.Rb,timeline:a.timeline,Rc:b}}
|
|
786
786
|
function xr(a,b,c,d,e,f){var g=d.Rc.length;d.timeline&&d.timeline.length!=d.Rc.length&&(g=Math.min(d.timeline.length,d.Rc.length));for(var h=a-d.Rb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},r=0;r<g;n={kd:n.kd,fd:n.fd},r++){n.fd=d.Rc[r];var q=void 0;q=null!=d.Pa?m+d.Pa:d.timeline?d.timeline[r].end:m+b;n.kd=null;l.push(new Ph(a+m,a+q,function(u){return function(){null==u.kd&&(u.kd=zb(c(),[u.fd.Vi]));return u.kd}}(n),n.fd.start,n.fd.end,e,h,a,k,[],"",null,null,Qh,f));m=q}return l}
|
|
787
|
-
function yr(a){return[a.P.
|
|
788
|
-
Infinity,q=!(a.Wb&&a.ma.Mf);m?(c=m,Er(c,k,n,r,q,h),c.yb(a.presentationTimeline.Ab())):m=new Fr(k,a.P.id,a.bandwidth,a.P.zb,n,r,h,q,g,a.P.hg);k.timeline&&"image"!==a.Ea.contentType&&a.presentationTimeline.hh(k.timeline,n);d&&a.Wb&&(d.segmentIndex=m);return{Kc:function(){m instanceof Fr&&0==m.
|
|
787
|
+
function yr(a){return[a.P.fc,a.Ea.fc,a.Ka.fc].filter(zd).map(function(b){return xg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Zg&&(a.Zg=!0);var c=b.getAttribute("media");b=Fg(b,"mediaRange",Ig,{start:0,end:null});return{Vi:c,start:b.start,end:b.end}})};function zr(a,b,c,d,e,f,g){var h=Ar(a,g),k=Br(a);Cr(k);var l=Bd(a);if(k.xd)return tr(a,h),{Kc:function(){var u=Wq(k.xd,l.P.id,null,null,l.bandwidth||null,null);u=zb(l.P.zb(),[u]);return sr(l,b,h,u,0,null,k.Rb)}};if(k.Pa)return d||"image"===a.Ea.contentType||(a.presentationTimeline.Wf(k.Pa),a.presentationTimeline.Ce(a.ma.start)),{Kc:function(){return Dr(l,k,e,h,f,g)}};var m=null;d=d=null;a.Ka.id&&a.P.id&&(d=a.Ka.id+","+a.P.id,d=c[d])&&(m=d.segmentIndex);var n=a.ma.start,r=a.ma.duration?n+a.ma.duration:
|
|
788
|
+
Infinity,q=!(a.Wb&&a.ma.Mf);m?(c=m,Er(c,k,n,r,q,h),c.yb(a.presentationTimeline.Ab())):m=new Fr(k,a.P.id,a.bandwidth,a.P.zb,n,r,h,q,g,a.P.hg);k.timeline&&"image"!==a.Ea.contentType&&a.presentationTimeline.hh(k.timeline,n);d&&a.Wb&&(d.segmentIndex=m);return{Kc:function(){m instanceof Fr&&0==m.Zb()&&Er(m,k,n,r,q,h);return Promise.resolve(m)}}}function Gr(a){return a.Md}
|
|
789
789
|
function Br(a){var b=Xq(a,Gr),c=Yq(a,Gr,"media");a=Yq(a,Gr,"index");return{Pa:b.Pa,timescale:b.timescale,Nd:b.Nd,Rb:b.Rb,yg:b.yg,timeline:b.timeline,Sc:c,xd:a}}function Cr(a){var b=a.xd?1:0;b+=a.timeline?1:0;b+=a.Pa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.xd&&(a.timeline=null),a.Pa=null);if(!a.xd&&!a.Sc)throw new P(2,4,4002);}
|
|
790
|
-
function Dr(a,b,c,d,e,f){function g(J){var M=(J-u)*q,N=M+b.Rb,Q=M+m;M=Q+q;var Y=Math.min(M,k());Q=new Ph(Q,Y,function(){var aa=N*v;"BigInt"in window&&aa>Number.MAX_SAFE_INTEGER&&(aa=BigInt(N)*BigInt(v));aa=Wq(x,y,J,null,z,aa);return zb(B(),[aa])},0,null,d,A,m,k(),[],"",null,null,Qh,f);Q.h=M;return Q}function h(){var J=[Math.max(l.Ab(),m),Math.min(l
|
|
791
|
-
return J?m+J:Infinity}var l=a.presentationTimeline,m=a.ma.start,n=a.Ka.id,r=a.ma.duration,q=b.Pa,u=b.Nd,v=b.timescale,x=b.Sc,z=a.bandwidth||null,y=a.P.id,B=a.P.zb,A=m-b.Rb,C=h();a=a.Wb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++E){var I=g(E);c.push(I)}var G=new Oj(c);c=l
|
|
792
|
-
function Ar(a,b){var c=Yq(a,Gr,"initialization");if(!c)return null;var d=a.P.id,e=a.bandwidth||null,f=a.P.zb;return new Nh(function(){var g=Wq(c,d,null,null,e,null);return zb(f(),[g])},0,null,nr(a),null,null,b)}function Fr(a,b,c,d,e,f,g,h,k,l){Oj.call(this,[]);this.h=a;this.H=b;this.D=c;this.G=d;this.i=e;this.
|
|
793
|
-
p.yb=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.
|
|
794
|
-
function Hr(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.
|
|
795
|
-
p.
|
|
796
|
-
|
|
797
|
-
0==this.I?0<m&&n.xe():0!=m%this.I&&n.xe();h.push(n)}c=new Ph(this.i+e.start,this.i+e.end,function(){return 0<e.Bb?[]:Ir(d,b.H,f,b.D,g,null,b.G)},0,null,this.u,c,this.i,this.m,h,"",null,null,Qh,this.C,0<e.Bb);this.g[a]=c}return c};function Ir(a,b,c,d,e,f,g){a=Wq(a,b,c,f,d||null,e);return zb(g(),[a]).map(function(h){return h.toString()})};function Jr(a){this.s=null;this.C=a;this.I=new uf;this.j=[];this.h=null;this.m=[];this.D=null;this.H=[];this.G=300;this.l=new Map;this.i=new Map;this.g=null;this.u="UNKNOWN"}Jr.prototype.configure=function(a){this.s=a};Jr.prototype.destroy=function(){this.C=this.s=null;this.j=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};Jr.prototype.setManifestType=function(a){this.u=a};
|
|
790
|
+
function Dr(a,b,c,d,e,f){function g(J){var M=(J-u)*q,N=M+b.Rb,Q=M+m;M=Q+q;var Y=Math.min(M,k());Q=new Ph(Q,Y,function(){var aa=N*v;"BigInt"in window&&aa>Number.MAX_SAFE_INTEGER&&(aa=BigInt(N)*BigInt(v));aa=Wq(x,y,J,null,z,aa);return zb(B(),[aa])},0,null,d,A,m,k(),[],"",null,null,Qh,f);Q.h=M;return Q}function h(){var J=[Math.max(l.Ab(),m),Math.min(l.$b(),k())].map(function(M){return M-m});return[Math.ceil(J[0]/q),Math.ceil(J[1]/q)-1].map(function(M){return M+u})}function k(){var J=null!=n&&e[n]||r;
|
|
791
|
+
return J?m+J:Infinity}var l=a.presentationTimeline,m=a.ma.start,n=a.Ka.id,r=a.ma.duration,q=b.Pa,u=b.Nd,v=b.timescale,x=b.Sc,z=a.bandwidth||null,y=a.P.id,B=a.P.zb,A=m-b.Rb,C=h();a=a.Wb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++E){var I=g(E);c.push(I)}var G=new Oj(c);c=l.$b()<k();E=l.R();if(c||E){var H=Math.max(a,C+1);G.Qe(q,function(){var J=l.Ab();G.yb(J);var M=t(h());M.next();M=M.next().value;for(var N=[];H<=M;){var Q=g(H);N.push(Q);H++}return J>k()&&!N.length?null:N})}return Promise.resolve(G)}
|
|
792
|
+
function Ar(a,b){var c=Yq(a,Gr,"initialization");if(!c)return null;var d=a.P.id,e=a.bandwidth||null,f=a.P.zb;return new Nh(function(){var g=Wq(c,d,null,null,e,null);return zb(f(),[g])},0,null,nr(a),null,null,b)}function Fr(a,b,c,d,e,f,g,h,k,l){Oj.call(this,[]);this.h=a;this.H=b;this.D=c;this.G=d;this.i=e;this.l=f;this.u=g;this.C=k;this.I=l;h&&Hr(this)}pa(Fr,Oj);p=Fr.prototype;p.Zb=function(){return this.h?this.h.timeline.length:0};p.release=function(){Oj.prototype.release.call(this);this.h=null};
|
|
793
|
+
p.yb=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.Zb()&&this.release())}};function Er(a,b,c,d,e,f){a.u=f;if(a.h){c=a.h.timeline;a.h.Sc=b.Sc;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,w(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Hr(a)}
|
|
794
|
+
function Hr(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.yb(a.i)}}p.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};
|
|
795
|
+
p.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Zb()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Sc,e=this.h.timeline[a],f=e.nj,g=this.h.yg+e.zg;c=this.i-this.h.Rb;var h=this.i+e.end,k=h;a===this.Zb()-1&&Infinity!==this.l&&(k=this.l);for(var l=[],m=(e.end-e.start)/e.Bb,n={},r=0;r<e.Bb;n={ld:n.ld,$e:n.$e},r++){var q=e.start+m*r,u=q+m;n.$e=r+1;n.ld=null;q=new Ph(this.i+q,this.i+u,function(v){return function(){if(!b.h)return[];null==v.ld&&(v.ld=Ir(b.h.Sc,b.H,f,b.D,g,v.$e,b.G));return v.ld}}(n),
|
|
796
|
+
0,null,this.u,c,this.i,this.l,[],"",null,null,Qh,this.C);0==this.I?0<r&&q.xe():0!=r%this.I&&q.xe();l.push(q)}c=new Ph(this.i+e.start,k,function(){return 0<e.Bb?[]:Ir(d,b.H,f,b.D,g,null,b.G)},0,null,this.u,c,this.i,this.l,l,"",null,null,Qh,this.C,0<e.Bb);c.h=h;this.g[a]=c}return c};function Ir(a,b,c,d,e,f,g){a=Wq(a,b,c,f,d||null,e);return zb(g(),[a]).map(function(h){return h.toString()})};function Jr(a){this.s=null;this.C=a;this.I=new uf;this.j=[];this.h=null;this.m=[];this.D=null;this.H=[];this.G=300;this.l=new Map;this.i=new Map;this.g=null;this.u="UNKNOWN"}Jr.prototype.configure=function(a){this.s=a};Jr.prototype.destroy=function(){this.C=this.s=null;this.j=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};Jr.prototype.setManifestType=function(a){this.u=a};
|
|
798
797
|
function Kr(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=zb(a.j,[Lr(a,b)]),d=Af(c,a.s.retryParameters),e=a.C.networkingEngine.request(8,d),vf(a.I,e),ta(l,2),D(l,e.promise,4);if(2!=l.g)return f=l.h,g=Tf(f.data),h=JSON.parse(g),1==h.VERSION&&Mr(a,h,f.uri),va(l,0);if((k=wa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Dd(function(){Kr(a,b)});a.g.S(a.G);F(l)})}
|
|
799
798
|
function Lr(a,b){if(!a.m.length)return b;b=new fb(b);var c=a.D||a.m[0],d=Math.round(a.C.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)));xb(e)&&kb(b,e);return b.toString()}function Mr(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Dd(function(){Kr(a,d)});if(c=b.TTL)a.G=c;a.g.S(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
800
799
|
function Nr(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
|
|
801
|
-
function Or(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={
|
|
800
|
+
function Or(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={lc:e.lc},g=f.next())if(e.lc=g.value,g=b.get(e.lc))d.push({cg:e.lc,location:g});else if(g=a.H.find(function(k){return function(l){return l.Nj==k.lc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Dh?(h=new fb(h),hb(h,g["URI-REPLACEMENT"].Dh),d.push({cg:e.lc,location:h.toString()})):d.push({cg:e.lc,location:h}))}e=Date.now();f=t(a.i.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
802
801
|
h=a.i.get(g),e>h&&a.i.delete(g);d=d.filter(function(k){for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new fb(k.location)).Kb))return!1;return!0});d.length&&(a.D=d[0].cg);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.D=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:zb(a.j,d)};function Pr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=!1;this.s=new Set}p=Pr.prototype;p.release=function(){for(var a=t(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=[]};p.Ci=function(){return this.j};p.Jf=function(){return this.l.slice()};p.ei=function(){return this.i};
|
|
803
802
|
function Qr(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Rr(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Sr(n),n]})),l=new Map(h.textStreams.map(function(n){return[Tr(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ur(n),n]}));if(b){var m=Vr(Gb);l.set(Tr(m),m);m=Vr("image");h.set(Ur(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Fg:c,Ah:d,wh:e,Yg:f}}
|
|
804
803
|
p.Kg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A,C,E,I,G,H,J,M,N,Q,Y,aa;return K(function(da){if(1==da.g){d=Hb;if(!b&&1==a.length)return e=Qr(a,!1),f=e.Fg,g=e.Ah,h=e.wh,k=e.Yg,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()),da.F(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.s.has(n.id)||(c.s.add(n.id),-1==l&&(l=m));if(-1==l)return da.return();r=Qr(a,!0);q=r.Fg;u=r.Ah;v=r.wh;x=r.Yg;return D(da,Promise.all([Wr(c,c.h,
|
|
@@ -820,24 +819,25 @@ b)}function ds(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.d
|
|
|
820
819
|
function is(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=ls(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
821
820
|
function ls(a,b,c){var d=null,e=(0,{audio:Rr,video:Sr,text:Tr,image:Ur}[c.type])(c);if(b.has(e))d=b.get(e);else{e={audio:function(h,k){return hs(a,h,k)},video:function(h,k){return hs(a,h,k)},text:ms,image:ns}[c.type];var f={audio:os,video:ps,text:qs,image:rs}[c.type];b=t(b.values());for(var g=b.next();!g.done;g=b.next())g=g.value,!e(c,g)||c.fastSwitching!=g.fastSwitching||d&&!f(c,d,g)||(d=g)}return d}
|
|
822
821
|
function ss(a,b){function c(d){if(!ts.has(d)){var e=hd(d);ts.set(d,e)}return ts.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}function hs(a,b,c){return!ss(b,c)&&!a.m||b.drmInfos&&!Dh(b.drmInfos,c.drmInfos)?!1:!0}function ms(a,b){return b.language?a.forced!==b.forced||0==Rb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function ns(){return!0}
|
|
823
|
-
function os(a,b,c){var d=ss(a,b),e=ss(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Rb(a.language,b.language);e=Rb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
|
|
824
|
-
if(b.primary&&!c.primary)return!1;d=us(a.channelsCount,b.channelsCount,c.channelsCount);if(d==vs)return!0;if(d==ws)return!1;d=us(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==vs?!0:d==ws?!1:a.bandwidth&&xs(a.bandwidth,b.bandwidth,c.bandwidth)==vs?!0:!1}
|
|
822
|
+
function os(a,b,c){var d=ss(a,b),e=ss(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Rb(a.language,b.language);e=Rb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
|
|
823
|
+
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=us(a.channelsCount,b.channelsCount,c.channelsCount);if(d==vs)return!0;if(d==ws)return!1;d=us(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==vs?!0:d==ws?!1:a.bandwidth&&xs(a.bandwidth,b.bandwidth,c.bandwidth)==vs?!0:!1}
|
|
825
824
|
function ps(a,b,c){var d=ss(a,b),e=ss(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=us(a.width*a.height,b.width*b.height,c.width*c.height);if(d==vs)return!0;if(d==ws)return!1;if(a.frameRate){d=us(a.frameRate,b.frameRate,c.frameRate);if(d==vs)return!0;if(d==ws)return!1}return a.bandwidth&&xs(a.bandwidth,b.bandwidth,c.bandwidth)==vs?!0:!1}
|
|
826
|
-
function qs(a,b,c){var d=Rb(a.language,b.language),e=Rb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
827
|
-
a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function rs(a,b,c){return us(a.width*a.height,b.width*b.height,c.width*c.height)==vs?!0:!1}
|
|
825
|
+
function qs(a,b,c){var d=Rb(a.language,b.language),e=Rb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
826
|
+
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function rs(a,b,c){return us(a.width*a.height,b.width*b.height,c.width*c.height)==vs?!0:!1}
|
|
827
|
+
function bs(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
|
|
828
828
|
function Vr(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1}}
|
|
829
829
|
function us(a,b,c){if(b==a&&a!=c)return ws;if(c==a&&a!=b)return vs;if(b>a){if(c<=a||c-a<b-a)return vs;if(c-a>b-a)return ws}else{if(c>a)return ws;if(a-c<a-b)return vs;if(a-c>a-b)return ws}return ys}function xs(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?vs:b<a?ws:ys}function gs(a){switch(a.type){case Gb:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
830
830
|
function Sr(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Rr(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Tr(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
831
831
|
function Ur(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}L("shaka.util.PeriodCombiner",Pr);Pr.prototype.combinePeriods=Pr.prototype.Kg;Pr.prototype.getImageStreams=Pr.prototype.ei;Pr.prototype.getTextStreams=Pr.prototype.Jf;Pr.prototype.getVariants=Pr.prototype.Ci;var vs=1,ys=0,ws=-1,ts=new Map;function zs(){var a=this;this.i=this.h=null;this.s=[];this.j=null;this.K=1;this.m={};this.M={};this.l=new Pr;this.H=0;this.J=new Yb(5);this.I=new Dd(function(){As(a)});this.G=new uf;this.C=null;this.L=[];this.D=Infinity;this.u=!1;this.g=null}p=zs.prototype;p.configure=function(a){this.h=a;this.g&&this.g.configure(this.h);this.l&&(this.l.m=this.h.dash.multiTypeVariantsAllowed&&fc())};
|
|
832
832
|
p.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.u=b.isLowLatencyMode(),c.s=[a],c.i=b,D(e,Bs(c),2);d=e.h;c.i&&Cs(c,d);if(!c.i)throw new P(2,7,7001);return e.return(c.j)})};p.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.h=this.i=null;this.s=[];this.j=null;this.m={};this.l=null;null!=this.I&&(this.I.stop(),this.I=null);this.g&&this.g.destroy();return this.G.destroy()};
|
|
833
|
-
p.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),D(c,Bs(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline
|
|
833
|
+
p.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),D(c,Bs(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.$b();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Cs(this,0))}}};
|
|
834
834
|
p.banLocation=function(a){this.g&&this.g.i.set(a,Date.now()+6E4)};function Bs(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=a.s,1<a.s.length&&a.g&&(c=Or(a.g,"Location",!0),c.length&&(b=c)),d=Af(b,a.h.retryParameters),e=Date.now(),D(k,Ds(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.s.includes(f.uri)&&a.s.unshift(f.uri);return D(k,Es(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.J.sample(1,h);return k.return(h)})}
|
|
835
835
|
function Es(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Rg(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.h.dash.disableXlinkProcessing)return k.return(Fs(a,d,c));f=a.h.dash.xlinkFailGracefully;g=br(d,a.h.retryParameters,f,c,a.i.networkingEngine);vf(a.G,g);return D(k,g.promise,2)}h=k.h;return k.return(Fs(a,h,c))})}
|
|
836
|
-
function Fs(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A,C,E,I,G,H,J,M,N,Q,Y,aa,da,T,Ua,ib,Eb,bc,Lb,Ca,rb,Fb,cc,dc,sb,Td,vd,Ud,Dc,Vd,ii,
|
|
836
|
+
function Fs(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A,C,E,I,G,H,J,M,N,Q,Y,aa,da,T,Ua,ib,Eb,bc,Lb,Ca,rb,Fb,cc,dc,sb,Td,vd,Ud,Dc,Vd,ii,Ye,Wd,Lc,id,lg,mg,yl,Xr,Yr;return K(function(jd){switch(jd.g){case 1:(d=a.h.dash.manifestPreprocessor)&&d(b);a.g&&a.g.l.clear();e=[c];f=[];g=new Map;h=xg(b,"Location");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=m.getAttribute("serviceLocation"),r=Dg(m))q=zb(e,[r])[0],n&&(a.g?Nr(a.g,"Location",n,q):g.set(n,q)),f.push(q);a.g?(u=Or(a.g,"Location",!0),
|
|
837
837
|
0<u.length&&(e=a.s=u)):f.length&&(e=a.s=f);v=Promise.resolve();if((x=wg(b,"ContentSteering"))&&a.i){z=x.getAttribute("defaultServiceLocation");if(a.g)a.g.j=e,a.g.h=z;else if(a.g=new Jr(a.i),a.g.configure(a.h),a.g.setManifestType("DASH"),a.g.j=e,a.g.h=z,y=Dg(x))(B=Fg(x,"queryBeforeStart",Ng,!1))?v=Kr(a.g,y):Kr(a.g,y);A=t(g.keys());for(C=A.next();!C.done;C=A.next())E=C.value,I=g.get(E),Nr(a.g,"Location",E,I)}G=xg(b,"BaseURL");J=!1;if(a.g)for(M=t(G),N=M.next();!N.done;N=M.next())Q=N.value,Y=Q.getAttribute("serviceLocation"),
|
|
838
838
|
aa=Dg(Q),Y&&aa&&(Nr(a.g,"BaseURL",Y,aa),J=!0);J&&a.g||(da=G.map(Dg),H=zb(e,da));T=function(){return a.g&&J?Or(a.g,"BaseURL"):H?H:[]};Ua=0;G&&G.length&&(Ua=Fg(G[0],"availabilityTimeOffset",Mg)||0);ib=a.h.dash.ignoreMinBufferTime;Eb=0;ib||(Eb=Fg(b,"minBufferTime",Hg)||0);a.H=Fg(b,"minimumUpdatePeriod",Hg,-1);bc=Fg(b,"availabilityStartTime",Gg);Lb=Fg(b,"timeShiftBufferDepth",Hg);Ca=a.h.dash.ignoreSuggestedPresentationDelay;rb=null;Ca||(rb=Fg(b,"suggestedPresentationDelay",Hg));Fb=a.h.dash.ignoreMaxSegmentDuration;
|
|
839
|
-
cc=null;Fb||(cc=Fg(b,"maxSegmentDuration",Hg));dc=b.getAttribute("type")||"static";if(a.j)for(sb=a.j.presentationTimeline,Td=t(Object.values(a.m)),vd=Td.next();!vd.done;vd=Td.next())Ud=vd.value,Ud.segmentIndex&&Ud.segmentIndex.yb(sb.Ab());else Dc=a.h.defaultPresentationDelay||1.5*Eb,Vd=null!=rb?rb:Dc,sb=new sj(bc,Vd,a.h.dash.autoCorrectDrift);sb.Vc("static"==dc);(ii=sb.R())&&!isNaN(a.h.availabilityWindowOverride)&&(Lb=a.h.availabilityWindowOverride);null==Lb&&(Lb=Infinity);sb.Ne(Lb);
|
|
840
|
-
"";Wd={Wb:"static"!=dc,presentationTimeline:sb,Ka:null,ma:null,Ea:null,P:null,bandwidth:0,Zg:!1,Hc:Ua,profiles:
|
|
839
|
+
cc=null;Fb||(cc=Fg(b,"maxSegmentDuration",Hg));dc=b.getAttribute("type")||"static";if(a.j)for(sb=a.j.presentationTimeline,Td=t(Object.values(a.m)),vd=Td.next();!vd.done;vd=Td.next())Ud=vd.value,Ud.segmentIndex&&Ud.segmentIndex.yb(sb.Ab());else Dc=a.h.defaultPresentationDelay||1.5*Eb,Vd=null!=rb?rb:Dc,sb=new sj(bc,Vd,a.h.dash.autoCorrectDrift);sb.Vc("static"==dc);(ii=sb.R())&&!isNaN(a.h.availabilityWindowOverride)&&(Lb=a.h.availabilityWindowOverride);null==Lb&&(Lb=Infinity);sb.Ne(Lb);Ye=b.getAttribute("profiles")||
|
|
840
|
+
"";Wd={Wb:"static"!=dc,presentationTimeline:sb,Ka:null,ma:null,Ea:null,P:null,bandwidth:0,Zg:!1,Hc:Ua,profiles:Ye.split(",")};Lc=Gs(a,Wd,T,b);id=Lc.duration;lg=Lc.periods;"static"!=dc&&Lc.Pg||sb.gb(id||Infinity);a.D&&!a.u&&(mg=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.u=a.i.isLowLatencyMode());a.u?sb.mh(a.D):a.D&&Ra("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.");
|
|
841
841
|
sb.Wf(cc||1);return D(jd,a.l.Kg(lg,Wd.Wb),2);case 2:return D(jd,v,3);case 3:a.u&&(Eb=0);if(a.j){a.j.variants=a.l.j;yl=a.l.Jf();0<yl.length&&(a.j.textStreams=yl);a.j.imageStreams=a.l.i;a.i.filter(a.j);jd.F(4);break}a.j={presentationTimeline:sb,variants:a.l.j,textStreams:a.l.Jf(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Eb||0,sequenceMode:a.h.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Hs(b)};if(!sb.yh()){jd.F(5);break}Xr=xg(b,"UTCTiming");
|
|
842
842
|
return D(jd,Is(a,T,Xr),6);case 6:Yr=jd.h;if(!a.i)return jd.return();sb.nh(Yr);case 5:sb.ve();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),F(jd)}})}
|
|
843
843
|
function Hs(a){a=wg(a,"ServiceDescription");if(!a)return null;var b=wg(a,"Latency"),c=wg(a,"PlaybackRate");if(b&&b.getAttribute("max")||c){a=b&&b.getAttribute("max")?parseInt(b.getAttribute("max"),10)/1E3:null;var d=c?parseFloat(c.getAttribute("max")):null;b=b&&b.getAttribute("min")?parseInt(b.getAttribute("min"),10)/1E3:null;c=c?parseFloat(c.getAttribute("min")):null;return{maxLatency:a,maxPlaybackRate:d,minLatency:b,minPlaybackRate:c}}return null}
|
|
@@ -854,7 +854,7 @@ u?x="visually impaired":"2"==u&&(x="hard of hearing"));if(l)return null;l=xg(c,"
|
|
|
854
854
|
k||f)return null;throw new P(2,4,4003);}if(!b.Ea.contentType||"application"==b.Ea.contentType)for(b.Ea.contentType=Ps(c[0].mimeType,c[0].codecs),k=t(c),q=k.next();!q.done;q=k.next())q.value.type=b.Ea.contentType;k=b.Ea.id||"__fake__"+a.K++;m=t(c);for(q=m.next();!q.done;q=m.next()){q=q.value;u=t(C.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&q.keyIds?new Set([].concat(w(z.keyIds),w(q.keyIds))):z.keyIds||q.keyIds;a.h.dash.enableAudioGroups&&(q.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(zd);
|
|
855
855
|
return{id:k,contentType:b.Ea.contentType,language:E,yk:e,streams:c,drmInfos:C.drmInfos,wg:f,gj:l}}
|
|
856
856
|
function Os(a,b,c,d,e,f,g,h,k,l,m){b.P=Ks(a,l,b.Ea,null);a.D=Math.min(a.D,b.P.Hc);if(!Qs(b.P))return null;var n=b.ma.start;b.bandwidth=Fg(l,"bandwidth",Kg)||0;var r=b.P.contentType,q=r==Gb||"application"==r;r="image"==r;try{var u=void 0;if(c.gf){var v=b.P.zb,x=zb(v(),[c.gf.Qi]),z=Af(x,a.h.retryParameters);u={method:"AES-128",iv:c.gf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,J,M;return K(function(N){if(1==N.g)return D(N,Ds(a,z,6),2);if(3!=N.g){H=N.h;if(!H.data||16!=H.data.byteLength)throw new P(2,
|
|
857
|
-
4,4049);J={name:"AES-CBC"};M=u;return D(N,window.crypto.subtle.importKey("raw",H.data,J,!0,["decrypt"]),3)}M.cryptoKey=N.h;u.fetchKey=void 0;F(N)})}}}v=function(H,J,M,N){return Rs(a,H,J,M,N)};if(b.P.Ld)var y=or(b,v,u);else if(b.P.
|
|
857
|
+
4,4049);J={name:"AES-CBC"};M=u;return D(N,window.crypto.subtle.importKey("raw",H.data,J,!0,["decrypt"]),3)}M.cryptoKey=N.h;u.fetchKey=void 0;F(N)})}}}v=function(H,J,M,N){return Rs(a,H,J,M,N)};if(b.P.Ld)var y=or(b,v,u);else if(b.P.fc)y=ur(b,a.m,u);else if(b.P.Md)y=zr(b,v,a.m,!!a.j,a.h.dash.initialSegmentLimit,a.M,u);else{var B=b.ma.duration||0,A=b.P.zb;y={Kc:function(){return Promise.resolve(Rj(n,B,A()))}}}}catch(H){if((q||r)&&4002==H.code)return null;throw H;}v=xg(l,"ContentProtection");v=Pq(v,c,
|
|
858
858
|
a.h.dash.ignoreDrmInfo,a.h.dash.keySystemsByURI);v=new Set(v?[v]:[]);x=!1;xg(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var C=!1;q&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var E;if(r&&((l=xg(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
859
859
|
(E=l.getAttribute("value")),!E))return null;var I;l=b.P.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"))&&(I="PQ");l=b.P.id?b.Ka.id+","+b.P.id:"";var G=l&&a.m[l]?a.m[l]:{id:a.K++,originalId:b.P.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.P.mimeType,
|
|
860
860
|
codecs:b.P.codecs,frameRate:b.P.frameRate,pixelAspectRatio:b.P.pixelAspectRatio,bandwidth:b.bandwidth,width:b.P.width,height:b.P.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.Ea.language,label:f,type:b.Ea.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.P.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.P.De,audioSamplingRate:b.P.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:I,videoLayout:void 0,tilesLayout:E,accessibilityPurpose:m,
|
|
@@ -862,10 +862,10 @@ external:!1,fastSwitching:!1};G.createSegmentIndex=function(){var H;return K(fun
|
|
|
862
862
|
function As(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,ta(d,2),D(d,Bs(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.i){if(a.h.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();Cs(a,b);F(d)}})}function Cs(a,b){0>a.H||a.I.S(Math.max(a.H-b,Zb(a.J)))}
|
|
863
863
|
function Ks(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,De:null,audioSamplingRate:null,Hc:0,hg:0};d=d||c.zb;var e=b.getAttribute("id"),f=xg(b,"BaseURL"),g,h=!1;if(a.g)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.getAttribute("serviceLocation");m=Dg(m);l&&m&&(Nr(a.g,e,l,m),h=!0)}h&&a.g||(g=f.map(Dg));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")||
|
|
864
864
|
c.codecs;var n=Fg(b,"frameRate",Og)||c.frameRate,r=b.getAttribute("sar")||c.pixelAspectRatio,q=Ss(xg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=xg(b,"AudioChannelConfiguration");u=Ts(u)||c.De;var v=Fg(b,"audioSamplingRate",Lg)||c.audioSamplingRate;k||(k=Ps(l,m));var x=wg(b,"SegmentBase"),z=wg(b,"SegmentTemplate"),y=x?Fg(x,"availabilityTimeOffset",Mg)||0:0,B=z?Fg(z,"availabilityTimeOffset",Mg)||0:0,A=f&&f.length?Fg(f[0],"availabilityTimeOffset",Mg)||0:0;y=c.Hc+A+y+B;B=null;(A=wg(b,"SegmentSequenceProperties"))&&
|
|
865
|
-
(A=wg(A,"SAP"))&&(B=Fg(A,"cadence",Jg));return{zb:function(){return zb(d(),f.length?a.g&&h?Or(a.g,e):g?g:[]:[])},Ld:x||c.Ld,
|
|
865
|
+
(A=wg(A,"SAP"))&&(B=Fg(A,"cadence",Jg));return{zb:function(){return zb(d(),f.length?a.g&&h?Or(a.g,e):g?g:[]:[])},Ld:x||c.Ld,fc:wg(b,"SegmentList")||c.fc,Md:z||c.Md,width:Fg(b,"width",Lg)||c.width,height:Fg(b,"height",Lg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:q,id:e,language:b.getAttribute("lang"),De:u,audioSamplingRate:v,Hc:y,hg:B||c.hg}}
|
|
866
866
|
function Ss(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.getAttribute("schemeIdUri"),b.includes(c)||b.push(c);return b}
|
|
867
867
|
function Ts(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("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=
|
|
868
|
-
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 Qs(a){var b=a.Ld?1:0;b+=a.
|
|
868
|
+
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 Qs(a){var b=a.Ld?1:0;b+=a.fc?1:0;b+=a.Md?1:0;if(0==b)return a.contentType==Gb||"application"==a.contentType?!0:!1;1!=b&&(a.Ld&&(a.fc=null),a.Md=null);return!0}
|
|
869
869
|
function Us(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=zb(b(),[c]),f=Af(e,a.h.retryParameters),f.method=d,g=a.i.networkingEngine.request(4,f),vf(a.G,g),D(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=Tf(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
|
|
870
870
|
function Is(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(r){return{scheme:r.getAttribute("schemeIdUri"),value:r.getAttribute("value")}}),e=a.h.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.F(4);break}h=g.value;ta(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.F(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.F(8);
|
|
871
871
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ra("NTP UTCTiming scheme is not supported");break;default:Ra("Unrecognized scheme in UTCTiming element",k)}n.F(9);break;case 7:return D(n,Us(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return D(n,Us(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
|
|
@@ -938,7 +938,7 @@ return rb.return({stream:G,type:g,jh:[],ba:d,yc:Q,Ob:aa,ae:Ua,$d:ib,vd:!1,pf:-1,
|
|
|
938
938
|
function Au(a,b,c,d,e,f,g,h,k,l,m,n){var r=nu(c,b)||ou(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Gb?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");return{id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
939
939
|
segmentIndex:null,mimeType:r,codecs:b,kind:c==Gb?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Kb(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:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1}}
|
|
940
940
|
function Mt(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=et(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=bt(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=X(g,"KEYFORMAT")||"identity",g=(h=su[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,Jh:d}}
|
|
941
|
-
function Du(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ra("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var f=0,g=X(b,"IV","");if(g){var h=rg(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=ht(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,r,q;return K(function(u){if(1==u.g)return l=it(d(),bt(b,"URI"),e),m=Af(
|
|
941
|
+
function Du(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ra("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var f=0,g=X(b,"IV","");if(g){var h=rg(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=ht(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,r,q;return K(function(u){if(1==u.g)return l=it(d(),bt(b,"URI"),e),m=Af(l,a.g.retryParameters),
|
|
942
942
|
D(u,hu(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new P(2,4,4049);r={name:"AES-CBC"};q=k;return D(u,window.crypto.subtle.importKey("raw",n.data,r,!0,["decrypt"]),3)}q.cryptoKey=u.h;k.fetchKey=void 0;F(u)})}};return k}
|
|
943
943
|
function Pt(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=gt(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=gt(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=gt(b.g,"EXT-X-PART-INF"))a.M=Number(bt(e,"PART-TARGET"));b=gt(b.g,"EXT-X-SERVER-CONTROL");a.D&&a.M?(a.m=a.Wa?5*a.M<=c?Math.min(a.M,a.m):Math.min(c,a.m):Math.min(a.M,a.m),a.ha=b?Number(bt(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
944
944
|
b.getAttribute("HOLD-BACK"):null,a.Aa=c?Number(c.value):0);a.ua=Math.max(d,a.ua)}function du(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ha)b=a.ha;else if(a.Aa)b=a.Aa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ua*c}a.l.og(0);a.l.oh(b);a.l.Vc(!1)}
|
|
@@ -1058,7 +1058,7 @@ p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Pv(this.g);th
|
|
|
1058
1058
|
function Ww(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:return Yw(),h=g=null,k=new fw,n=m=l=null,ta(A,2,3),D(A,d(),5);case 5:return g=A.h,D(A,Zw(a,b,g,e),6);case 6:r=A.h;$w(a);q=!r.presentationTimeline.R()&&!r.presentationTimeline.wc();if(!q)throw new P(2,9,9005,b);return D(A,ax(a,r,function(C){n=n||C},e),7);case 7:h=A.h;$w(a);if(n)throw n;return D(A,bx(r,h,e),8);case 8:return D(A,k.init(),9);case 9:return $w(a),D(A,hw(k),10);case 10:return l=A.h,$w(a),u=cx(h,
|
|
1059
1059
|
r,b,c,e,f),v=u.Si,x=u.vg,D(A,l.Ma.addManifests([v]),11);case 11:z=A.h;$w(a);m=z[0];$w(a);if(n)throw n;return D(A,dx(a,x,m,v,f,e,l.Ma,r,h),12);case 12:return $w(a),ex(r,v,h,e),D(A,l.Ma.updateManifest(m,v),13);case 13:return $w(a),y=new yw("manifest",l.path.qb,l.path.Ma,m),A.return(Pw(y,v));case 3:return xa(A),D(A,k.destroy(),14);case 14:if(!g){A.F(15);break}return D(A,g.stop(),15);case 15:if(!h){A.F(17);break}return D(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=wa(A);if(null==m){A.F(19);break}return D(A,
|
|
1060
1060
|
fx(m),19);case 19:throw n||B;}})}
|
|
1061
|
-
function dx(a,b,c,d,e,f,g,h,k){var l,m,n,r,q,u,v,x,z,y;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,C){var E,I,G,H,J,M,N;return K(function(Q){if(1==Q.g){E={};I=t(A);for(G=I.next();!G.done;E={
|
|
1061
|
+
function dx(a,b,c,d,e,f,g,h,k){var l,m,n,r,q,u,v,x,z,y;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,C){var E,I,G,H,J,M,N;return K(function(Q){if(1==Q.g){E={};I=t(A);for(G=I.next();!G.done;E={kc:E.kc},G=I.next())E.kc=G.value,H=Mv(E.kc,f),J=E.kc.i,M=E.kc.h,N=function(Y){return function(aa){var da,T,Ua;return K(function(ib){if(1==ib.g)return D(ib,g.addSegments([{data:aa}]),2);da=ib.h;$w(a);T=Y.kc.g;Ua=Lv(T);l[Ua]=da[0];m+=aa.byteLength;F(ib)})}}(E),Sv(e,E.kc.groupId,H,J,M,N);return D(Q,
|
|
1062
1062
|
Uv(e),2)}if(!C)return Q.F(0);$w(a);ex(h,d,k,f);return D(Q,g.updateManifest(c,d),0)})};r=!1;ta(B,2);if(!gx(h)||!r||hx(h)){B.F(4);break}return D(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return $w(a),b=b.filter(function(A){return!A.h}),q=l,u=m,l={},m=0,D(B,ix(g,c,d,q,u,function(){return $w(a)}),6);case 6:$w(a);case 4:if(r){B.F(7);break}return D(B,n(b,!1),8);case 8:return $w(a),v=l,x=m,l={},m=0,D(B,ix(g,c,d,v,x,function(){return $w(a)}),9);case 9:$w(a);case 7:va(B,0);break;case 2:return z=
|
|
1063
1063
|
wa(B),y=Object.values(l),D(B,g.removeSegments(y,function(){}),10);case 10:throw z;}})}function fx(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new fw,D(f,b.init(),2);case 2:return D(f,hw(b),3);case 3:return c=f.h,d=new yw("manifest",c.path.qb,c.path.Ma,a),D(f,b.destroy(),4);case 4:return e=new Uw,D(f,e.remove(d.toString()),0)}})}
|
|
1064
1064
|
function ix(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x;return K(function(z){switch(z.g){case 1:g=!1;ta(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),r=n.next();!r.done;r=n.next())q=r.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
|
|
@@ -1135,7 +1135,7 @@ function Sy(){return this.webkitSupportsPresentationMode("picture-in-picture")?(
|
|
|
1135
1135
|
function Ty(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Uy(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}yx.PiPWebkit=Qy;Qy.install=Ry;Bx(Ry);function Xy(){}function Yy(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Zy))}function Zy(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}yx.RandomUUID=Xy;Xy.install=Yy;Bx(Yy);function $y(){}function az(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=bz)}function bz(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}yx.StorageEstimate=$y;$y.install=az;Bx(az);function cz(){}function dz(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:ez})}function ez(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}yx.Symbol=cz;cz.install=dz;Bx(dz);function fz(){}function gz(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}yx.VideoPlayPromise=fz;fz.install=gz;Bx(gz);function hz(){}function iz(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Nd())&&(a.getVideoPlaybackQuality=jz)}}function jz(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}yx.VideoPlaybackQuality=hz;hz.install=iz;Bx(iz);function kz(){}function lz(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=mz;else if(6==b)a=nz;else{try{var c=!!mz(1,2,"")}catch(d){c=!1}c&&(a=mz)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function mz(a,b,c){return new window.TextTrackCue(a,b,c)}function nz(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}yx.VTTCue=kz;kz.install=lz;Bx(lz);function oz(){}oz.prototype.parseInit=function(){};oz.prototype.setSequenceMode=function(){};oz.prototype.setManifestType=function(){};oz.prototype.parseMedia=function(a,b){var c=null,d=[];a=Tf(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=pz.exec(e))){var f=qz.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new yc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1136
1136
|
L("shaka.text.LrcTextParser",oz);oz.prototype.parseMedia=oz.prototype.parseMedia;oz.prototype.setManifestType=oz.prototype.setManifestType;oz.prototype.setSequenceMode=oz.prototype.setSequenceMode;oz.prototype.parseInit=oz.prototype.parseInit;var pz=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,qz=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;qd["application/x-subtitle-lrc"]=function(){return new oz};function rz(){}rz.prototype.parseInit=function(){};rz.prototype.setSequenceMode=function(){};rz.prototype.setManifestType=function(){};
|
|
1137
1137
|
rz.prototype.parseMedia=function(a,b,c){var d=Tf(a);a=[];if(""==d)return a;var e=Pg(d,"tt");if(!e)throw new P(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=Cg(e,sz,"frameRate"),g=Cg(e,sz,"subFrameRate"),h=Cg(e,sz,"frameRateMultiplier"),k=Cg(e,sz,"tickRate"),l=Cg(e,sz,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Cg(e,tz,"extent");if("default"!=m&&"preserve"!=m)throw new P(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new uz(f,
|
|
1138
|
-
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{
|
|
1138
|
+
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{mc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Ag(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var r=t(e),q=r.next();!q.done;q=r.next()){var u=q.value;q=new zc;var v=u.getAttribute("xml:id");if(v){q.id=v;var x=null;n&&(x=vz.exec(n)||wz.exec(n));v=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,y=xz(u,h,"extent");if(y){var B=(z=vz.exec(y))||wz.exec(y);
|
|
1139
1139
|
null!=B&&(q.width=Number(B[1]),q.height=Number(B[2]),z||(null!=v&&(q.width=100*q.width/v),null!=x&&(q.height=100*q.height/x)),q.widthUnits=z||null!=v?Tc:0,q.heightUnits=z||null!=x?Tc:0)}if(u=xz(u,h,"origin"))if(B=(z=vz.exec(u))||wz.exec(u),null!=B)q.viewportAnchorX=Number(B[1]),q.viewportAnchorY=Number(B[2]),z?y||(q.width=100-q.viewportAnchorX,q.widthUnits=Tc,q.height=100-q.viewportAnchorY,q.heightUnits=Tc):(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=v&&(q.viewportAnchorX=100*q.viewportAnchorX/
|
|
1140
1140
|
v)),q.viewportAnchorUnits=z||null!=v?Tc:0}else q=null;q&&k.push(q)}if(xg(d,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");n=t(xg(d,"div"));for(r=n.next();!r.done;r=n.next())if(xg(r.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=yz(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1141
1141
|
function yz(a,b,c,d,e,f,g,h,k,l,m,n){var r=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var q=document.createElement("span");q.textContent=a.textContent}else q=a;for(var u=null,v=t(zz),x=v.next();!x.done&&!(u=Az(q,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;var z=Cg(q,zz,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new fb(n),z=new fb(z),(x=x.resolve(z).toString())&&(v=x));if("p"==a.nodeName||u||v)m=!0;a=m;x="default"==(q.getAttribute("xml:space")||
|
|
@@ -1220,7 +1220,7 @@ function QA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var MA=[3
|
|
|
1220
1220
|
p.transmux=function(a,b,c,d){a=lc(a);for(c=ci(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&QA(a,e)){var f=LA(a,e),g=4;f&&f.X&&(g=f.X);e+=g;e=e===a.length||e+1<a.length&&QA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=LA(a,c);if(!f)return Promise.reject(new P(2,3,3018));h||(h=f);c+f.X<=a.length&&e.push({data:a.subarray(c,c+f.X),size:f.X,duration:1152,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});c+=f.X}if(!h)return Promise.reject(new P(2,3,3018));a=9E4*h.kj/h.sampleRate*this.h;d={id:b.id,
|
|
1221
1221
|
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.h,baseMediaDecodeTime:a,fb:e},stream:b};h=new Nu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Tu(h),this.g.set(b.id,d));b=jv(h);this.h++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Mp3Transmuxer",RA);RA.prototype.transmux=RA.prototype.transmux;RA.prototype.getOriginalMimeType=RA.prototype.getOriginalMimeType;
|
|
1222
1222
|
RA.prototype.convertCodecs=RA.prototype.convertCodecs;RA.prototype.isSupported=RA.prototype.isSupported;RA.prototype.destroy=RA.prototype.destroy;Wc("audio/mpeg",function(){return new RA("audio/mpeg")},bd);function SA(a){this.h=a;this.g=null}p=SA.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=nd(a).split(","),c=Cb("audio",b);b=Cb("video",b);return!c||b||"mp3"!=hd(c)?!1:ac(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
|
|
1223
|
-
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new wi;a=lc(a);a=this.g.parse(a);if("mp3"!=a.sd().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.
|
|
1223
|
+
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new wi;a=lc(a);a=this.g.parse(a);if("mp3"!=a.sd().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.qc());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=LA(b,c))?(c+d.X<=b.length&&(e=tg(e,b.subarray(c,c+d.X))),c+=d.X):c++;return Promise.resolve(e)};L("shaka.transmuxer.MpegTsTransmuxer",SA);SA.prototype.transmux=SA.prototype.transmux;SA.prototype.getOriginalMimeType=SA.prototype.getOriginalMimeType;
|
|
1224
1224
|
SA.prototype.convertCodecs=SA.prototype.convertCodecs;SA.prototype.isSupported=SA.prototype.isSupported;SA.prototype.destroy=SA.prototype.destroy;Wc("video/mp2t",function(){return new SA("video/mp2t")},ad);/*
|
|
1225
1225
|
@license
|
|
1226
1226
|
MSS Transmuxer
|
|
@@ -1241,12 +1241,12 @@ p.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new wi;a=lc(a);v
|
|
|
1241
1241
|
duration:x,kb:Math.round((q.pts||0)-(q.dts||0)),flags:{ob:0,bb:0,ab:0,Za:0,$a:v.Bd?2:1,pb:v.Bd?0:1}})}}var z=DA(m);if(!z||null==l)throw new P(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ib:[],qa:new Uint8Array([]),Ca:z.Ca,Ja:z.Ja,La:z.La,data:{Cb:this.g,baseMediaDecodeTime:l,fb:k},stream:b};break;case "hvc":n=[];q=null;u=[];k=f.Oc();if(!k.length)throw new P(2,3,3023);for(v=0;v<k.length;v++){l=
|
|
1242
1242
|
k[v];m=l.nalus;u.push.apply(u,w(m));z=!1;var y=[],B=!1;r=t(m);for(x=r.next();!x.done;x=r.next()){var A=x.value;switch(A.type){case 1:case 0:var C=B=!0;break;case 19:case 20:case 21:z=C=B=!0;break;case 32:C=!0;break;case 33:C=!0;break;case 34:C=!0;break;case 35:B=C=!0;break;case 39:case 40:C=!0;break;default:C=!1}if(B&&C){var E=A.fullData.byteLength,I=new Uint8Array(4);I[0]=E>>24&255;I[1]=E>>16&255;I[2]=E>>8&255;I[3]=E&255;y.push(tg(I,A.fullData))}}var G=y.length?{data:tg.apply(ng,w(y)),Bd:z}:null;
|
|
1243
1243
|
G&&(null==q&&null!=l.dts&&(q=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,kb:Math.round((l.pts||0)-(l.dts||0)),flags:{ob:0,bb:0,ab:0,Za:0,$a:G.Bd?2:1,pb:G.Bd?0:1}}))}var H=GA(u);if(!H||null==q)throw new P(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ib:[],qa:new Uint8Array([]),
|
|
1244
|
-
Ca:H.Ca,Ja:H.Ja,La:H.La,data:{Cb:this.g,baseMediaDecodeTime:q,fb:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var J=[],M,N=null,Q=t(f.
|
|
1244
|
+
Ca:H.Ca,Ja:H.Ja,La:H.La,data:{Cb:this.g,baseMediaDecodeTime:q,fb:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var J=[],M,N=null,Q=t(f.qc()),Y=Q.next();!Y.done;Y=Q.next()){var aa=Y.value,da=aa.data;if(da){var T=0;M=uA(da,T);if(!M)throw new P(2,3,3018);b.audioSamplingRate=M.sampleRate;b.channelsCount=M.channelCount;null==N&&null!==aa.pts&&(N=aa.pts);for(;T<da.length;){var Ua=tA(da,T);if(Ua){var ib=Ua.me+Ua.X;T+ib<=da.length&&J.push({data:da.subarray(T+Ua.me,T+ib),
|
|
1245
1245
|
size:Ua.X,duration:1024,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});T+=ib}else T++}}}if(!M||null==N){if(!f.Oc().length)throw new P(2,3,3018);N=9E4*c.startTime;var Eb=Cb("audio",b.codecs.split(","));if(!Eb||!b.channelsCount||!b.audioSamplingRate)throw new P(2,3,3018);M={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,wa:Eb};var bc=wA(Eb,b.channelsCount);if(!bc)throw new P(2,3,3018);var Lb=N+9E4*(c.endTime-c.startTime);for(f=N;f<Lb;)J.push({data:bc,size:bc.byteLength,duration:1024,kb:0,
|
|
1246
|
-
flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=1024/M.sampleRate*9E4}var Ca=M.sampleRate;f=N/9E4*Ca;h={id:b.id,type:"audio",codecs:M.wa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:J},stream:b};break;case "ac3":M=[];Ca=0;J=new Uint8Array([]);N=null;T=t(f.
|
|
1246
|
+
flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=1024/M.sampleRate*9E4}var Ca=M.sampleRate;f=N/9E4*Ca;h={id:b.id,type:"audio",codecs:M.wa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:J},stream:b};break;case "ac3":M=[];Ca=0;J=new Uint8Array([]);N=null;T=t(f.qc());for(var rb=T.next();!rb.done;rb=T.next()){var Fb=rb.value,cc=Fb.data;null==N&&null!==Fb.pts&&(N=Fb.pts);for(f=0;f<cc.length;){var dc=
|
|
1247
1247
|
yA(cc,f);dc?(b.audioSamplingRate=dc.sampleRate,b.channelsCount=dc.channelCount,Ca=dc.sampleRate,J=dc.qa,M.push({data:cc.subarray(f,f+dc.X),size:dc.X,duration:1536,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=dc.X):f++}}if(0==Ca||0==J.byteLength||null==N)throw new P(2,3,3018);f=N/9E4*Ca;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:J,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b};break;case "ec3":M=
|
|
1248
|
-
[];Ca=0;N=new Uint8Array([]);J=null;for(var sb=t(f.
|
|
1249
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:N,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b};break;case "mp3":M=[];var Vd;Ca=null;for(var ii=t(f.
|
|
1248
|
+
[];Ca=0;N=new Uint8Array([]);J=null;for(var sb=t(f.qc()),Td=sb.next();!Td.done;Td=sb.next()){var vd=Td.value,Ud=vd.data;null==J&&null!==vd.pts&&(J=vd.pts);for(f=0;f<Ud.length;){var Dc=BA(Ud,f);Dc?(b.audioSamplingRate=Dc.sampleRate,b.channelsCount=Dc.channelCount,Ca=Dc.sampleRate,N=Dc.qa,M.push({data:Ud.subarray(f,f+Dc.X),size:Dc.X,duration:1536,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=Dc.X):f++}}if(0==Ca||0==N.byteLength||null==J)throw new P(2,3,3018);f=J/9E4*Ca;h={id:b.id,type:"audio",codecs:"ec-3",
|
|
1249
|
+
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:N,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b};break;case "mp3":M=[];var Vd;Ca=null;for(var ii=t(f.qc()),Ye=ii.next();!Ye.done;Ye=ii.next()){var Wd=Ye.value,Lc=Wd.data;if(Lc)for(null==Ca&&null!==Wd.pts&&(Ca=Wd.pts),f=0;f<Lc.length;){var id=LA(Lc,f);id?(Vd||(Vd=id),f+id.X<=Lc.length&&M.push({data:Lc.subarray(f,f+id.X),size:id.X,duration:1152,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),
|
|
1250
1250
|
f+=id.X):f++}}if(!Vd||null==Ca)throw new P(2,3,3018);var lg=Vd.sampleRate;f=Ca/9E4*lg;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:lg,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b}}h&&a.push(h)}}catch(mg){return mg&&3023==mg.code?Promise.resolve(new Uint8Array([])):Promise.reject(mg)}if(!a.length)return Promise.reject(new P(2,3,3018));a=new Nu(a);this.h.has(b.id)?d=this.h.get(b.id):
|
|
1251
1251
|
(d=Tu(a),this.h.set(b.id,d));b=jv(a);this.g++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.TsTransmuxer",XA);XA.prototype.transmux=XA.prototype.transmux;XA.prototype.getOriginalMimeType=XA.prototype.getOriginalMimeType;XA.prototype.convertCodecs=XA.prototype.convertCodecs;XA.prototype.isSupported=XA.prototype.isSupported;XA.prototype.destroy=XA.prototype.destroy;var YA=["aac","ac-3","ec-3","mp3"],ZA=["avc","hevc"];Wc("video/mp2t",function(){return new XA("video/mp2t")},$c);/*
|
|
1252
1252
|
@license
|
|
@@ -1314,7 +1314,7 @@ sw:{A:"Kiswahili",B:"Swahili"},"sw-KE":{A:"Kiswahili",B:"Swahili (Kenya)"},ta:{A
|
|
|
1314
1314
|
B:"Thai"},"th-TH":{A:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",B:"Thai (Thailand)"},tl:{A:"Filipino",B:"Filipino"},"tl-PH":{A:"Filipino",B:"Filipino"},tlh:{A:"tlhIngan-Hol",B:"Klingon"},tr:{A:"T\u00fcrk\u00e7e",B:"Turkish"},"tr-TR":{A:"T\u00fcrk\u00e7e",B:"Turkish"},"tt-RU":{A:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",B:"Tatar"},uk:{A:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",B:"Ukrainian"},"uk-UA":{A:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
1315
1315
|
B:"Ukrainian"},ur:{A:"\u0627\u0631\u062f\u0648",B:"Urdu"},"ur-PK":{A:"\u0627\u0631\u062f\u0648",B:"Urdu"},uz:{A:"O'zbek",B:"Uzbek"},"uz-UZ":{A:"O'zbek",B:"Uzbek"},vi:{A:"Ti\u1ebfng Vi\u1ec7t",B:"Vietnamese"},"vi-VN":{A:"Ti\u1ebfng Vi\u1ec7t",B:"Vietnamese"},"xh-ZA":{A:"isiXhosa",B:"Xhosa"},yi:{A:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",B:"Yiddish"},"yi-DE":{A:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",B:"Yiddish (German)"},zh:{A:"\u4e2d\u6587",B:"Chinese"},"zh-HANS":{A:"\u4e2d\u6587\u7b80\u4f53",
|
|
1316
1316
|
B:"Chinese Simplified"},"zh-HANT":{A:"\u4e2d\u6587\u7e41\u9ad4",B:"Chinese Traditional"},"zh-CN":{A:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",B:"Chinese Simplified (China)"},"zh-HK":{A:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",B:"Chinese Traditional (Hong Kong)"},"zh-SG":{A:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",B:"Chinese Simplified (Singapore)"},"zh-TW":{A:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",B:"Chinese Traditional (Taiwan)"},"zu-ZA":{A:"isiZulu",B:"Zulu"}},qB=t(Object.keys(pB)),rB=qB.next();!rB.done;rB=
|
|
1317
|
-
qB.next()){var sB=rB.value;pB[sB.toLowerCase()]=pB[sB]};function tB(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Kf;this.localization=this.controls.va;this.player=this.controls.Mc();this.video=this.controls.
|
|
1317
|
+
qB.next()){var sB=rB.value;pB[sB.toLowerCase()]=pB[sB]};function tB(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Kf;this.localization=this.controls.va;this.player=this.controls.Mc();this.video=this.controls.cc();this.adManager=this.player.ee();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
|
|
1318
1318
|
tB.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};L("shaka.ui.Element",tB);tB.prototype.release=tB.prototype.release;function uB(a){return vB(a,"shaka-back-to-overflow-button")}function vB(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function wB(a){a&&(a=vB(a,"shaka-chosen-item"))&&a.parentElement.focus()}function xB(){var a=U("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function yB(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
1319
1319
|
function zB(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function AB(a,b){tB.call(this,a,b);var c=this;this.i=U("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=U("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Dd(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=zB(e-d,!1)+" / "+zB(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
|
|
1320
1320
|
""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.Qa();c.g.za(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Qa(),this.g.za(.5))}pa(AB,tB);AB.prototype.release=function(){this.g.stop();this.g=null;tB.prototype.release.call(this)};L("shaka.ui.AdCounter",AB);function BB(a,b){tB.call(this,a,b);var c=this;this.g=U("div");this.g.classList.add("shaka-ad-position");yB(this.g,!1);this.parent.appendChild(this.g);this.h=U("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&CB(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&CB(c)});this.eventManager.o(this.adManager,"ad-started",function(){CB(c)});this.eventManager.o(this.adManager,
|
|
@@ -1322,9 +1322,9 @@ function zB(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%6
|
|
|
1322
1322
|
c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?EB(c.controls):FB(c.controls)});this.ad&&(this.g(),this.h())}pa(DB,tB);DB.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.u.paused&&!a.W;return a};
|
|
1323
1323
|
DB.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};DB.prototype.g=function(){};DB.prototype.h=function(){};L("shaka.ui.PlayButton",DB);function GB(a,b){DB.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(GB,DB);GB.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};GB.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};L("shaka.ui.BigPlayButton",GB);function HB(a,b){tB.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=U("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.o(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";yB(c.g,!0)}else yB(c.g,
|
|
1324
1324
|
!1)});this.eventManager.o(window,"click",function(){yB(c.g,!1)});IB(this)}pa(HB,tB);HB.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];tB.prototype.release.call(this)};function JB(a,b){KB.set(a,b)}function IB(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=KB.get(c);d?a.i.push(d.create(a.g,a.controls)):Ra("Unrecognized context menu element:",c)}}L("shaka.ui.ContextMenu",HB);
|
|
1325
|
-
HB.registerElement=JB;var KB=new Map;function LB(a,b){tB.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Dd(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.Hf()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=U("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.
|
|
1325
|
+
HB.registerElement=JB;var KB=new Map;function LB(a,b){tB.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Dd(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.Hf()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=U("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.dc()&&(c.controls.nd()?(d.preventDefault(),c.controls.uc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
|
|
1326
1326
|
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.S(1)):(c.s=!0,c.m=Date.now(),c.j.S(1))))});this.h=U("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=U("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}pa(LB,tB);L("shaka.ui.HiddenSeekButton",LB);function MB(a,b){LB.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}pa(MB,LB);L("shaka.ui.HiddenFastForwardButton",MB);function NB(a,b){LB.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}pa(NB,LB);L("shaka.ui.HiddenRewindButton",NB);function OB(a,b,c,d){tB.call(this,a,b);var e=this;this.container=U("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,w(c));this.h=!1;this.bar=document.createElement("input");this.G=new Dd(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,w(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);
|
|
1327
|
-
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.
|
|
1327
|
+
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.dc()&&(e.h=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.dc()&&(e.h=!0,PB(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(PB(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.h&&(e.h=!1,PB(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
|
|
1328
1328
|
"touchcancel",function(f){e.h&&(e.h=!1,PB(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,"mouseup",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}pa(OB,tB);p=OB.prototype;p.release=function(){this.G&&(this.G.stop(),this.G=null);tB.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};
|
|
1329
1329
|
p.onChangeStart=function(){};p.onChange=function(){};p.onChangeEnd=function(){};p.changeTo=function(a){this.h||(this.h=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.G.S(.5)};p.getValue=function(){return parseFloat(this.bar.value)};p.setValue=function(a){this.h||(this.bar.value=a)};
|
|
1330
1330
|
function PB(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}L("shaka.ui.RangeElement",OB);OB.prototype.setValue=OB.prototype.setValue;OB.prototype.getValue=OB.prototype.getValue;OB.prototype.changeTo=OB.prototype.changeTo;OB.prototype.onChangeEnd=OB.prototype.onChangeEnd;OB.prototype.onChange=OB.prototype.onChange;OB.prototype.onChangeStart=OB.prototype.onChangeStart;
|
|
@@ -1338,18 +1338,18 @@ a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.b
|
|
|
1338
1338
|
function RB(a){if(a.C.length){for(var b=a.player.Ha(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=t(a.C),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=t(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 "+
|
|
1339
1339
|
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.D.style.background="linear-gradient("+d.join(",")+")"}else a.D.style.background="transparent"}function VB(a){RB(a);var b=a.player.Ha();b=b.end-b.start;a.player.R()&&5<b&&a.I.za(1)}function UB(a){var b=a.player.Ha();b=b.end-b.start;return a.player.R()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function TB(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1340
1340
|
function WB(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;K(function(C){switch(C.g){case 1:d=XB(a);if(!d)return SB(a),C.return();0>c&&(c=0);e=a.player.Ha();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return D(C,a.player.Kf(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return SB(a),C.return();a.player.R()?(h=e.end-c,a.u.textContent=1>h?a.localization.resolve("LIVE"):"-"+YB(h)):a.u.textContent=YB(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1341
|
-
-(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
|
|
1341
|
+
-(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.ac()==a.l.segment.ac()&&g.segment.Xb()==a.l.segment.Xb()){C.F(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!r.startsWith("offline:")){C.F(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(C,5);q=Gf;u=ok(g.segment.ba(),g.segment.ac(),g.segment.Xb(),a.player.getConfiguration().streaming.retryParameters);
|
|
1342
1342
|
a.j=a.player.Yb().request(q,u,{type:1});return D(C,a.j.promise,7);case 7:v=C.h;a.j=null;"mjpg"==d.codecs?(x=(new bg).box("mdat",kg(function(E){r=URL.createObjectURL(new Blob([E],{type:"image/jpeg"}))})),x.parse(v.data,!1)):(z=d.mimeType||"image/jpeg",y=new Blob([v.data],{type:z}),r=URL.createObjectURL(y));va(C,4);break;case 5:B=wa(C);if(7001==B.code)return C.return();throw B;case 4:try{a.i.removeChild(a.g)}catch(E){}a.g=U("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=r;
|
|
1343
1343
|
a.g.onload=function(){r.startsWith("blob:")&&URL.revokeObjectURL(r)};a.i.insertBefore(a.g,a.i.firstChild);case 3:A=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="-"+A*g.positionX+"px",a.g.style.top="-"+A*g.positionY+"px",a.g.style.transform="scale("+A+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
1344
1344
|
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",F(C)}})}
|
|
1345
1345
|
function XB(a){var b=a.player.fe();if(!b.length)return null;for(var c={},d=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Ve:c.Ve,Te:c.Te},e=d.next())if(c.Ve=e.value,c.Te=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Ve&&g.bandwidth<.01*f.Te}}(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&&
|
|
1346
|
-
"mjpg"==f.codecs})||b[0]}function SB(a){a.i.style.visibility="hidden";a.u.textContent=""}function YB(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}L("shaka.ui.SeekBar",QB);function ZB(){}ZB.prototype.create=function(a,b){return new QB(a,b)};QB.Factory=ZB;function Z(a,b,c,d){$a.call(this);var e=this;this.N=!0;this.g=d;this.C=new Oo(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.ua=!0;this.u=this.C.
|
|
1347
|
-
!1)});this.Ra=new Dd(function(){e.
|
|
1346
|
+
"mjpg"==f.codecs})||b[0]}function SB(a){a.i.style.visibility="hidden";a.u.textContent=""}function YB(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}L("shaka.ui.SeekBar",QB);function ZB(){}ZB.prototype.create=function(a,b){return new QB(a,b)};QB.Factory=ZB;function Z(a,b,c,d){$a.call(this);var e=this;this.N=!0;this.g=d;this.C=new Oo(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.ua=!0;this.u=this.C.cc();this.s=c;this.G=this.C.Mc();this.sa=a;this.j=b;this.Wa=this.G.ee();this.l=this.m=null;this.W=!1;this.H=[];this.Vb=[];this.Ib=!1;this.Z=new Dd(function(){e.j.style.cursor="none";e.Ib=!1;$B(e)});this.aa=new Dd(function(){e.h.removeAttribute("shown");e.I.S(2)});this.I=new Dd(function(){for(var f=t(e.H),g=f.next();!g.done;g=f.next())yB(g.value,
|
|
1347
|
+
!1)});this.Ra=new Dd(function(){e.dc()&&aC(e)});this.J=null;this.D=[];this.va=bC();this.i=new Kf;this.configure(this.g);cC(this);this.ha=new Set;dC(this);this.Ra.za(.125);this.i.o(this.va,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}pa(Z,$a);p=Z.prototype;
|
|
1348
1348
|
p.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.s){b.F(2);break}return D(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.Ra&&(a.Ra.stop(),a.Ra=null);eC(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.C){b.F(4);break}return D(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.sa){b.F(6);break}return D(b,a.sa.destroy(),7);case 7:a.sa=
|
|
1349
1349
|
null;case 6:a.G=null,a.s=null,a.u=null,a.va=null,a.ha.clear(),$a.prototype.release.call(a),F(b)}})};function eC(a){for(var b=t(a.D),c=b.next();!c.done;c=b.next())c.value.release();a.D=[]}function fC(a,b){gC.set(a,b)}p.Kh=function(a){this.ua=a;dC(this)};p.Ri=function(){$B(this)};
|
|
1350
1350
|
p.configure=function(a){this.g=a;this.C.Jg(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Fb&&(this.Fb=null);this.Xa&&(this.Xa=null);this.h?(fl(this.h),eC(this)):(hC(this),iC(this));this.j.classList.add("shaka-video-container");this.s.classList.add("shaka-video");jC(this);this.g.addBigPlayButton&&kC(this);this.g.customContextMenu&&(this.Xa=new HB(this.V,this),this.D.push(this.Xa));this.$||lC(this);this.g.seekOnTaps&&(mC(this),nC(this));this.xb=U("div");this.xb.classList.add("shaka-server-side-ad-container");
|
|
1351
1351
|
this.h.appendChild(this.xb);oC(this);this.H=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.H.push.apply(this.H,w(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));pC(this);this.Vb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));$B(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.o(b,"click",c);this.i.o(b,"dblclick",
|
|
1352
|
-
c)}};p.lg=function(a){(this.N=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");$B(this)};p.ph=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.lg(!1)};p.getAd=function(){return this.m};p.Vh=function(){return this.C};p.ji=function(){return this.va};p.Di=function(){return this.j};p.
|
|
1352
|
+
c)}};p.lg=function(a){(this.N=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");$B(this)};p.ph=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.lg(!1)};p.getAd=function(){return this.m};p.Vh=function(){return this.C};p.ji=function(){return this.va};p.Di=function(){return this.j};p.cc=function(){return this.u};p.ii=function(){return this.s};p.Mc=function(){return this.G};p.gi=function(){return this.sa};
|
|
1353
1353
|
p.$h=function(){return this.h};p.ti=function(){return this.xb};p.Xh=function(){return this.M};p.Yh=function(){return this.g};p.Oi=function(){return this.W};p.qg=function(a){this.W=a};p.Ii=function(){return this.ua};p.Hf=function(){return this.l?this.l.getValue():this.u.currentTime};p.qh=function(a){this.J=a};p.nd=function(){return this.H.some(function(a){return!a.classList.contains("shaka-hidden")})};p.uc=function(){this.I.Qa()};
|
|
1354
1354
|
p.zd=function(){return document.fullscreenEnabled||this.s.webkitSupportsFullscreen?!0:!1};p.Qc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.s;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1355
1355
|
function qC(a){var b,c,d;return K(function(e){switch(e.g){case 1:ta(e,2);if(!document.fullscreenEnabled){b=a.s;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.F(4);break}if(!document.pictureInPictureElement){e.F(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.F(4);break}ta(e,9);return D(e,screen.orientation.lock("landscape"),11);case 11:va(e,
|
|
@@ -1360,21 +1360,21 @@ function sC(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){if(window.documen
|
|
|
1360
1360
|
d.document.head.append(g);d.document.body.append(b);a.i.na(d,"pagehide",function(){f.replaceWith(b)});F(h)})}
|
|
1361
1361
|
function tC(a){var b=[].concat(w(document.styleSheets)).map(function(d){try{return[].concat(w(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}p.uh=function(){yB(this.K,!0);yB(this.M,!0);this.h.setAttribute("ad-active","true")};
|
|
1362
1362
|
p.Wg=function(){yB(this.K,!1);yB(this.M,!1);this.h.removeAttribute("ad-active")};function FB(a){a.N&&a.u.duration&&(a.G.od(),a.u.paused&&!a.W?a.u.play():a.u.pause())}function EB(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
1363
|
-
function hC(a){a.h=U("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.u.duration&&(a.
|
|
1363
|
+
function hC(a){a.h=U("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.u.duration&&(a.dc()?a.J=Date.now():(uC(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){vC(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.zd()&&a.Pe()})}
|
|
1364
1364
|
function kC(a){var b=U("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Fb=new GB(b,a);a.D.push(a.Fb)}function jC(a){var b=U("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function wC(a){a.K=U("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();yB(a.K,b);a.L.appendChild(a.K);b=new BB(a.K,a);a.D.push(b);b=new AB(a.K,a);a.D.push(b)}
|
|
1365
1365
|
function lC(a){a.$=U("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=U("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",
|
|
1366
|
-
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function mC(a){var b=U("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.
|
|
1366
|
+
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function mC(a){var b=U("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.nc=new MB(b,a);a.D.push(a.nc)}function nC(a){var b=U("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.tc=new NB(b,a);a.D.push(a.tc)}
|
|
1367
1367
|
function oC(a){a.L=U("div");a.L.classList.add("shaka-bottom-controls");a.L.classList.add("shaka-no-propagation");a.h.appendChild(a.L);a.i.o(a.L,"click",function(d){d.target.closest(".shaka-overflow-button")||a.uc()});wC(a);a.V=U("div");a.V.classList.add("shaka-controls-button-panel");a.V.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.V.classList.add("shaka-tooltips-on");a.L.appendChild(a.V);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,gC.get(c)?
|
|
1368
1368
|
(c=gC.get(c).create(a.V,a),a.D.push(c)):Ra("Unrecognized control panel element requested:",c)}function pC(a){if(a.g.addSeekBar)a.l=xC.create(a.L,a),a.D.push(a.l);else{a=t(a.H);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function iC(a){a.M=U("div");a.M.classList.add("shaka-client-side-ad-container");yB(a.M,!1);a.i.o(a.M,"click",function(){vC(a)});a.j.appendChild(a.M)}
|
|
1369
1369
|
function cC(a){a.i.o(a.G,"buffering",function(){a.N&&yB(a.$,a.G.yd())});a.N&&yB(a.$,a.G.yd());a.i.o(window,"keydown",function(b){yC(a,b)});a.i.o(window,"click",function(){return a.uc()});a.i.o(a,"submenuopen",function(){a.uc()});a.i.o(a.u,"play",function(){$B(a)});a.i.o(a.u,"pause",function(){$B(a)});a.i.o(a.j,"mousemove",function(b){uC(a,b)});a.i.o(a.j,"touchmove",function(b){uC(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){uC(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.J||a.Z.Qa()});
|
|
1370
1370
|
a.i.o(a.C,"caststatuschanged",function(){dC(a)});a.i.o(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)&&uC(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),zC(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),
|
|
1371
1371
|
zC(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),zC(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),zC(a,a.l.getValue()+f));break;case "Home":a.l&&zC(a,a.G.Ha().start);break;case "End":a.l&&zC(a,a.G.Ha().end);break;case "f":a.zd()&&a.Pe();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.s.muted=!a.s.muted;break;case "p":a.qe()&&a.Od();break;case " ":e&&AC(a)}}});a.i.o(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.o(a.Wa,"ad-started",
|
|
1372
1372
|
function(b){a.m=b.ad;a.uh()});a.i.o(a.Wa,"ad-stopped",function(){a.m=null;a.Wg()});screen.orientation&&a.i.o(screen.orientation,"change",function(){return K(function(b){return D(b,BC(a),0)})})}function BC(a){return K(function(b){return a.u&&0!=a.u.readyState&&!a.C.Ba()&&a.g.enableFullscreenOnRotation&&a.zd()?screen.orientation.type.includes("landscape")&&!a.Qc()?D(b,qC(a),0):screen.orientation.type.includes("portrait")&&a.Qc()?D(b,rC(a),0):b.F(0):b.return()})}
|
|
1373
|
-
function uC(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),$B(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.Ib=!0,a.I.stop(),a.
|
|
1373
|
+
function uC(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),$B(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.Ib=!0,a.I.stop(),a.dc()||(aC(a),$B(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.S(3))}function CC(a){return window.matchMedia("hover: hover").matches?a.Vb.some(function(b){return b.matches(":hover")}):!1}
|
|
1374
1374
|
function $B(a){var b=a.m?a.m.isPaused():!1,c=a.u.paused&&!a.W,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Ib||d||CC(a)?(aC(a),a.h.setAttribute("shown","true"),a.aa.stop()):a.aa.S(a.g.fadeDelay)}function vC(a){a.N&&(a.nd()?a.I.Qa():a.g.singleClickForPlayAndPause&&AC(a))}function AC(a){a.m&&a.m.isLinear()?EB(a):FB(a)}
|
|
1375
|
-
function dC(a){var b=a.C.Ba();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}p.
|
|
1375
|
+
function dC(a){var b=a.C.Ba();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}p.dc=function(){return this.N?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function zC(a,b){a.l.changeTo(b);a.dc()&&aC(a)}
|
|
1376
1376
|
function aC(a){if(a.l)if(a.l.setValue(a.u.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.H),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.H),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
|
|
1377
|
-
function yC(a,b){a.ha.add(b.key);var c=a.nd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),$B(a),a.i.o(window,"mousedown",function(){a.i.
|
|
1377
|
+
function yC(a,b){a.ha.add(b.key);var c=a.nd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),$B(a),a.i.o(window,"mousedown",function(){a.i.hc(window,"mousedown")}));"Escape"==b.key&&a.I.Qa();c&&a.ha.has("Tab")&&DC(a,b)}
|
|
1378
1378
|
function DC(a,b){var c=a.H.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ha.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
1379
1379
|
function bC(){var a=new Ub("en");a.ya("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
|
|
1380
1380
|
["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
|
|
@@ -1434,16 +1434,16 @@ a.ya("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1434
1434
|
["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.ya("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
|
|
1435
1435
|
["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
|
|
1436
1436
|
["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\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"],
|
|
1437
|
-
["RESOLUTION","\u89e3\u6790\u5ea6"],["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.Ig(navigator.languages||[]);return a}L("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.
|
|
1437
|
+
["RESOLUTION","\u89e3\u6790\u5ea6"],["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.Ig(navigator.languages||[]);return a}L("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.dc;Z.prototype.hideAdUI=Z.prototype.Wg;Z.prototype.showAdUI=Z.prototype.uh;
|
|
1438
1438
|
Z.prototype.togglePiP=Z.prototype.Od;Z.prototype.isPiPEnabled=Z.prototype.re;Z.prototype.isPiPAllowed=Z.prototype.qe;Z.prototype.toggleFullScreen=Z.prototype.Pe;Z.prototype.isFullScreenEnabled=Z.prototype.Qc;Z.prototype.isFullScreenSupported=Z.prototype.zd;Z.prototype.hideSettingsMenus=Z.prototype.uc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.nd;Z.prototype.setLastTouchEventTime=Z.prototype.qh;Z.prototype.getDisplayTime=Z.prototype.Hf;Z.prototype.isCastAllowed=Z.prototype.Ii;
|
|
1439
|
-
Z.prototype.setSeeking=Z.prototype.qg;Z.prototype.isSeeking=Z.prototype.Oi;Z.prototype.getConfig=Z.prototype.Yh;Z.prototype.getClientSideAdContainer=Z.prototype.Xh;Z.prototype.getServerSideAdContainer=Z.prototype.ti;Z.prototype.getControlsContainer=Z.prototype.$h;Z.prototype.getLocalPlayer=Z.prototype.gi;Z.prototype.getPlayer=Z.prototype.Mc;Z.prototype.getLocalVideo=Z.prototype.ii;Z.prototype.getVideo=Z.prototype.
|
|
1439
|
+
Z.prototype.setSeeking=Z.prototype.qg;Z.prototype.isSeeking=Z.prototype.Oi;Z.prototype.getConfig=Z.prototype.Yh;Z.prototype.getClientSideAdContainer=Z.prototype.Xh;Z.prototype.getServerSideAdContainer=Z.prototype.ti;Z.prototype.getControlsContainer=Z.prototype.$h;Z.prototype.getLocalPlayer=Z.prototype.gi;Z.prototype.getPlayer=Z.prototype.Mc;Z.prototype.getLocalVideo=Z.prototype.ii;Z.prototype.getVideo=Z.prototype.cc;Z.prototype.getVideoContainer=Z.prototype.Di;Z.prototype.getLocalization=Z.prototype.ji;
|
|
1440
1440
|
Z.prototype.getCastProxy=Z.prototype.Vh;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.ph;Z.prototype.setEnabledShakaControls=Z.prototype.lg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ri;Z.prototype.allowCast=Z.prototype.Kh;Z.registerSeekBar=function(a){xC=a};Z.registerElement=fC;Z.prototype.destroy=Z.prototype.destroy;var gC=new Map,xC=new ZB;function EC(a,b){tB.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=el();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=U("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");
|
|
1441
1441
|
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);FC(this);this.eventManager.o(this.localization,"locale-updated",function(){GC(c)});this.eventManager.o(this.localization,"locale-changed",function(){GC(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&yB(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){yB(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){yB(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.qh(Date.now());
|
|
1442
1442
|
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){HC(c)});GC(this);this.ad&&this.ad.isLinear()&&yB(this.g,!1)}pa(EC,tB);EC.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];tB.prototype.release.call(this)};function IC(a,b){JC.set(a,b)}
|
|
1443
1443
|
function FC(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,JC.get(c)?(c=JC.get(c),a.i.push(c.create(a.h,a.controls))):Ra("Unrecognized overflow menu element requested:",c)}function HC(a){if(a.controls.nd())a.controls.uc();else{yB(a.h,!0);$B(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};cb(a.h.childNodes,b)&&db(a.h.childNodes,b)[0].focus()}}function GC(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1444
1444
|
L("shaka.ui.OverflowMenu",EC);EC.registerElement=IC;function KC(){}KC.prototype.create=function(a,b){return new EC(a,b)};fC("overflow_menu",new KC);var JC=new Map;function LC(a,b){tB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=U("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=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");a.appendChild(this.j);
|
|
1445
|
-
this.i=U("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);MC(this);NC(this);this.eventManager.o(this.localization,"locale-updated",function(){MC(c)});this.eventManager.o(this.localization,"locale-changed",function(){MC(c)});this.eventManager.o(this.g,"click",function(){c.controls.
|
|
1446
|
-
c.player.ie()==ln;yB(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){NC(c)})}pa(LC,tB);function NC(a){var b=a.controls.
|
|
1445
|
+
this.i=U("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);MC(this);NC(this);this.eventManager.o(this.localization,"locale-updated",function(){MC(c)});this.eventManager.o(this.localization,"locale-changed",function(){MC(c)});this.eventManager.o(this.g,"click",function(){c.controls.cc().webkitShowPlaybackTargetPicker()});a=this.controls.cc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1446
|
+
c.player.ie()==ln;yB(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){NC(c)})}pa(LC,tB);function NC(a){var b=a.controls.cc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function MC(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}L("shaka.ui.AirPlayButton",LC);function OC(){}OC.prototype.create=function(a,b){return new LC(a,b)};IC("airplay",new OC);
|
|
1447
1447
|
fC("airplay",new OC);function PC(a,b,c){this.i=a;this.j=b;this.h=QC(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Nf()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.rg(b);b.ui=this;c.ui=this}p=PC.prototype;p.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?D(b,a.g.destroy(),2):b.F(2);if(4!=b.g)return a.g=null,a.i?D(b,a.i.destroy(),4):b.F(4);a.i=null;F(b)})};
|
|
1448
1448
|
p.Nf=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Pd()&&1<navigator.maxTouchPoints};p.getConfiguration=function(){var a=QC(this);Pl(a,this.h,QC(this),{},"");return a};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ql(a,b));Pl(this.h,a,QC(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};p.Zh=function(){return this.g};
|
|
1449
1449
|
p.tj=function(a){this.g.lg(a)};
|
|
@@ -1509,9 +1509,9 @@ function iE(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.n
|
|
|
1509
1509
|
jE.prototype.create=function(a,b){return new gE(a,b)};IC("statistics",new jE);JB("statistics",new jE);function kE(a,b){ZC.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.xc()?this.button.ariaPressed="true":this.button.ariaPressed="false";lE(this);this.eventManager.o(this.localization,"locale-updated",function(){mE(c);nE(c)});this.eventManager.o(this.localization,"locale-changed",function(){mE(c);nE(c)});this.eventManager.o(this.player,
|
|
1510
1510
|
"texttrackvisibility",function(){oE(c);nE(c)});this.eventManager.o(this.player,"textchanged",function(){nE(c)});this.eventManager.o(this.player,"trackschanged",function(){pE(c)});oE(this);mE(this);nE(this);pE(this)}pa(kE,ZC);function lE(a){var b=el();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(xB());a.g=U("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1511
1511
|
function oE(a){a.player.xc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
|
|
1512
|
-
function nE(a){var b=a.player.
|
|
1512
|
+
function nE(a){var b=a.player.bc();XC(b,a.menu,function(c){return qE(a,c)},a.player.xc(),a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=el();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Oe(!1);nE(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.xc()||(b.ariaSelected="true",b.appendChild(xB()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1513
1513
|
a.button.setAttribute("shaka-status",a.currentSelection.textContent);wB(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function qE(a,b){return K(function(c){a.player.jg(b);return D(c,a.player.Oe(!0),0)})}
|
|
1514
|
-
function mE(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 pE(a){var b=0<a.player.
|
|
1514
|
+
function mE(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 pE(a){var b=0<a.player.bc().length;yB(a.button,b);nE(a)}L("shaka.ui.TextSelection",kE);function rE(){}rE.prototype.create=function(a,b){return new kE(a,b)};IC("captions",new rE);fC("captions",new rE);function sE(a,b){OB.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return tE(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return uE(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return uE(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return tE(c)});this.eventManager.o(this.localization,"locale-updated",function(){return vE(c)});
|
|
1515
1515
|
this.eventManager.o(this.localization,"locale-changed",function(){return vE(c)});tE(this);vE(this);if(this.ad)this.onChange()}pa(sE,OB);sE.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function tE(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);wE(a)}function uE(a){var b=a.ad.getVolume();a.setValue(100*b);wE(a)}
|
|
1516
1516
|
function wE(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function vE(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}L("shaka.ui.VolumeBar",sE);function xE(){}xE.prototype.create=function(a,b){return new sE(a,b)};fC("volume",new xE);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1517
1517
|
|