shaka-player 4.6.13 → 4.6.14
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/CHANGELOG.md +16 -0
- package/CONTRIBUTORS +1 -0
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.debug.js +72 -72
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +88 -89
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +86 -86
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +93 -94
- package/dist/shaka-player.ui.map +3 -3
- 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/test/dash/dash_parser_segment_template_unit.js +1 -1
- package/test/media/buffering_observer_unit.js +13 -0
- package/test/test/util/waiter.js +5 -0
- package/test/transmuxer/transmuxer_integration.js +4 -4
- package/test/util/periods_unit.js +64 -0
package/dist/shaka-player.ui.js
CHANGED
|
@@ -68,10 +68,10 @@ var fb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
68
68
|
Copyright 2006 The Closure Library Authors
|
|
69
69
|
SPDX-License-Identifier: Apache-2.0
|
|
70
70
|
*/
|
|
71
|
-
function gb(a){var b;a instanceof gb?(jb(this,a.vb),this.vc=a.vc,kb(this,a.Ib),nb(this,a.Pc),this.Wa=a.Wa,ob(this,a.g.clone()),this.
|
|
72
|
-
p.toString=function(){var a=[],b=this.vb;b&&a.push(rb(b,tb,!0),":");if(b=this.Ib){a.push("//");var c=this.vc;c&&a.push(rb(c,tb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Pc;null!=b&&a.push(":",String(b))}if(b=this.Wa)this.Ib&&"/"!=b.charAt(0)&&a.push("/"),a.push(rb(b,"/"==b.charAt(0)?ub:vb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.
|
|
71
|
+
function gb(a){var b;a instanceof gb?(jb(this,a.vb),this.vc=a.vc,kb(this,a.Ib),nb(this,a.Pc),this.Wa=a.Wa,ob(this,a.g.clone()),this.jc=a.jc):a&&(b=String(a).match(fb))?(jb(this,b[1]||"",!0),this.vc=pb(b[2]||""),kb(this,b[3]||"",!0),nb(this,b[4]),this.Wa=pb(b[5]||"",!0),ob(this,b[6]||"",!0),this.jc=pb(b[7]||"")):this.g=new qb(null)}p=gb.prototype;p.vb="";p.vc="";p.Ib="";p.Pc=null;p.Wa="";p.jc="";
|
|
72
|
+
p.toString=function(){var a=[],b=this.vb;b&&a.push(rb(b,tb,!0),":");if(b=this.Ib){a.push("//");var c=this.vc;c&&a.push(rb(c,tb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Pc;null!=b&&a.push(":",String(b))}if(b=this.Wa)this.Ib&&"/"!=b.charAt(0)&&a.push("/"),a.push(rb(b,"/"==b.charAt(0)?ub:vb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.jc)&&a.push("#",rb(b,wb));return a.join("")};
|
|
73
73
|
p.resolve=function(a){var b=this.clone();"data"===b.vb&&(b=new gb);var c=!!a.vb;c?jb(b,a.vb):c=!!a.vc;c?b.vc=a.vc:c=!!a.Ib;c?kb(b,a.Ib):c=null!=a.Pc;var d=a.Wa;if(c)nb(b,a.Pc);else if(c=!!a.Wa){if("/"!=d.charAt(0))if(this.Ib&&!this.Wa)d="/"+d;else{var e=b.Wa.lastIndexOf("/");-1!=e&&(d=b.Wa.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(""):".."==
|
|
74
|
-
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.Wa=d:c=""!==a.g.toString();c?ob(b,a.g.clone()):c=!!a.
|
|
74
|
+
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.Wa=d:c=""!==a.g.toString();c?ob(b,a.g.clone()):c=!!a.jc;c&&(b.jc=a.jc);return b};p.clone=function(){return new gb(this)};function jb(a,b,c){a.vb=c?pb(b,!0):b;a.vb&&(a.vb=a.vb.replace(/:$/,""))}function kb(a,b,c){a.Ib=c?pb(b,!0):b}function nb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Pc=b}else a.Pc=null}
|
|
75
75
|
function ob(a,b,c){b instanceof qb?a.g=b:(c||(b=rb(b,xb)),a.g=new qb(b))}function pb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function rb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,yb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function yb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var tb=/[#\/\?@]/g,vb=/[#\?:]/g,ub=/[#\?]/g,xb=/[#\?@]/g,wb=/#/g;function qb(a){this.g=a||null}
|
|
76
76
|
function zb(a){if(!a.Na&&(a.Na={},a.nd=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=qb.prototype;p.Na=null;p.nd=null;function Ab(a){zb(a);return a.nd}p.add=function(a,b){zb(this);this.g=null;var c=this.Na.hasOwnProperty(a)?this.Na[a]:null;c||(this.Na[a]=c=[]);c.push(b);this.nd++;return this};
|
|
77
77
|
p.set=function(a,b){zb(this);this.g=null;this.Na.hasOwnProperty(a)?this.Na[a]=[b]:this.add(a,b);return this};p.get=function(a){zb(this);return this.Na[a]||[]};p.toString=function(){if(this.g)return this.g;if(!this.Na)return"";var a=[],b;for(b in this.Na)for(var c=encodeURIComponent(b),d=this.Na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
@@ -107,7 +107,7 @@ function lc(a,b,c){c=void 0===c?Infinity:c;return nc(a,void 0===b?0:b,c,Uint8Arr
|
|
|
107
107
|
M("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(){};M("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()};
|
|
108
108
|
rc.prototype.h=function(){this.g.clear()};rc.prototype.j=function(){return this.g.getStreams()};M("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={Ne:d.Ne},e=a.next()){d.Ne=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ne,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
109
109
|
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=Dc;this.lineInterpretation=Ec;this.line=null;this.lineHeight="";this.lineAlign=Fc;this.displayAlign=Gc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Hc;this.fontStyle=Ic;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
110
|
-
"";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={
|
|
110
|
+
"";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={ic:32,rows:15}}function Jc(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};
|
|
111
111
|
function Kc(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,Kc))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}M("shaka.text.Cue",yc);yc.equal=Kc;yc.prototype.clone=yc.prototype.clone;var Ac="auto";
|
|
112
112
|
yc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ac};var Bc="center",Lc={LEFT:"left",RIGHT:"right",CENTER:Bc,START:"start",END:"end"};yc.textAlign=Lc;var Gc="after",Mc={BEFORE:"before",CENTER:"center",AFTER:Gc};yc.displayAlign=Mc;var Cc="ltr";yc.direction={HORIZONTAL_LEFT_TO_RIGHT:Cc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Dc="horizontal-tb";yc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Dc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ec=0;
|
|
113
113
|
yc.lineInterpretation={LINE_NUMBER:Ec,PERCENTAGE:1};var Fc="start",Nc={CENTER:"center",START:Fc,END:"end"};yc.lineAlign=Nc;var Oc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};yc.defaultTextColor=Oc;var Pc={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=Pc;var Hc=400;yc.fontWeight={NORMAL:Hc,BOLD:700};
|
|
@@ -138,10 +138,10 @@ function be(a,b){var c,d,e;return K(function(f){switch(f.g){case 1:c=ae(b);ta(f,
|
|
|
138
138
|
function Xd(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B;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.Pe=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){C.F(7);break}n=m.value;q=de(n,b,c).filter(function(E){return function(H){return(H.keySystemConfiguration&&H.keySystemConfiguration.keySystem)===E.Pe}}(f));r=t(q);u=r.next();case 8:if(u.done){C.F(10);break}v=u.value;return D(C,
|
|
139
139
|
be(n,v),9);case 9:u=r.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={Pe:f.Pe};h=g.next();C.F(2);break;case 4:y=t(a),m=y.next();case 12:if(m.done){C.F(0);break}z=m.value;x=de(z,b,c).filter(function(E){E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||!d.includes(E)});A=t(x);u=A.next();case 15:if(u.done){m=y.next();C.F(12);break}B=u.value;return D(C,be(z,B),16);case 16:u=A.next(),C.F(15)}})}
|
|
140
140
|
function de(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=Eb("video",g);f=Zd(f);g=Eb("audio",g);g=$d(g);g=ed(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Zd(f);f=ed(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=
|
|
141
|
-
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f
|
|
141
|
+
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=$d(d.codecs),f=ed(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,
|
|
142
142
|
[]);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 q=new Set,r=t(h.initData),u=r.next();!u.done;u=r.next())q.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
143
143
|
(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}
|
|
144
|
-
function $d(a){return"fLaC"
|
|
144
|
+
function $d(a){return"fLaC"!==a||Jd()?"Opus"===a?"opus":a:"flac"}function Zd(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 Vd(a){a.textStreams=a.textStreams.filter(function(b){b=bd(b.mimeType,b.codecs);return kd(b)})}
|
|
145
145
|
function Wd(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(ee.has(f)){l.F(5);break}g=fe.get(f);if(!g){ee.set(f,!1);l.F(5);break}return D(l,ge(g),7);case 7:h=l.h,ee.set(f,h);case 5:(k=ee.get(f))&&b.push(e);d=c.next();l.F(2);break;case 4:a.imageStreams=b,F(l)}})}
|
|
146
146
|
function ge(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)}})}
|
|
147
147
|
function he(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),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=t(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
@@ -171,9 +171,9 @@ var ye=1;function ze(a,b){this.g=a;this.h=b}ze.prototype.toString=function(){ret
|
|
|
171
171
|
function Fe(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&&!Ge(e,f)||!He(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Ge(a,b))&&He(a.roles,b.roles)));return d?!1:!0}Ee.prototype.values=function(){return this.g.values()};
|
|
172
172
|
function Ge(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return gd(d)[0]});b=b.codecs.split(",").map(function(d){return gd(d)[0]});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 He(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 Ie(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 Je(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"","","",b,c)}Ie.prototype.create=function(a){var b=this,c="smooth"==this.h&&fc(),d=a.filter(function(e){return Fe(b.i,e,!c,b.g)});return d.length?new Ee(d[0],d,!c,this.g):this.j.create(a)};
|
|
173
173
|
function Je(a,b,c,d,e,f,g,h){this.s=a;this.u=b;this.g=c;this.h=d;this.j=e;this.i=void 0===f?"":f;this.l=void 0===g?"reload":g;this.m=void 0===h?!1:h}
|
|
174
|
-
Je.prototype.create=function(a){var b=[];b=Ke(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Le(b,this.u);a.length&&(b=a);this.j&&(a=
|
|
174
|
+
Je.prototype.create=function(a){var b=[];b=Ke(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Le(b,this.u);a.length&&(b=a);this.j&&(a=Me(b,this.j),a.length&&(b=a));this.h&&(a=Pe(b,this.h),a.length&&(b=a));this.g&&(a=Qe(b,this.g),a.length&&(b=a));this.i&&(a=Re(b,this.i),a.length&&(b=a));return new Ee(b[0],b,!("smooth"==this.l&&fc()),this.m)};function Ke(a,b){b=Nb(b);var c=Vb(b,a.map(function(d){return Ub(d)}));return c?a.filter(function(d){return c==Ub(d)}):[]}
|
|
175
175
|
function Le(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Re(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Qe(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}
|
|
176
|
-
function Pe(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
|
|
176
|
+
function Pe(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 Me(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})};function Se(){this.g=Te;this.h=(new Map).set(Te,2).set(Ue,1)}function Ve(a,b,c){a.h.set(Te,c).set(Ue,b)}var Ue=0,Te=1;function Xe(a,b){var c=Ye();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}
|
|
177
177
|
function Ze(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 vd(e)).T(c/1E3)}),2)}a.h*=a.m;F(d)})}function Ye(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function $e(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}$e.prototype.resolve=function(){};$e.prototype.reject=function(){};function af(a,b){this.promise=a;this.i=b;this.g=!1}function bf(a){return new af(Promise.reject(a),function(){return Promise.resolve()})}function cf(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new af(a,function(){return Promise.resolve()})}function df(a){return new af(Promise.resolve(a),function(){return Promise.resolve()})}function ef(a){return new af(a,function(){return a.catch(function(){})})}af.prototype.abort=function(){this.g=!0;return this.i()};
|
|
178
178
|
function ff(a){return new af(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}af.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
179
179
|
af.prototype.Da=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=gf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new $e,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new af(f,function(){return d()})};
|
|
@@ -187,9 +187,9 @@ m=!0,h.g=H)},function(C){a.j&&a.j(C,c,b);y=!0});if(!q)return x;var A=c.retryPara
|
|
|
187
187
|
A,B,v)}if(a.i)return cf();v&&(x=new P(1,1,1003,c.uris[f],b));if(x instanceof P){if(7001==x.code)throw x;if(1010==x.code)throw g;if(1==x.severity)return A=(new Map).set("error",x),A=new O("retry",A),a.dispatchEvent(A),f=(f+1)%c.uris.length,uf(a,b,c,d,e,f,x,h)}throw x;})}
|
|
188
188
|
function vf(a,b,c,d){var e=df(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Re:f.Re},g=a.next())f.Re=g.value,e=e.Da(function(h){return function(){var k=c.response;k.data&&(k.data=mc(k.data));return h.Re(b,k,d)}}(f));return e.Da(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 xf(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.D&&!b.C)return!1}return!0}M("shaka.net.NetworkingEngine",mf);
|
|
189
189
|
mf.prototype.request=mf.prototype.request;mf.prototype.destroy=mf.prototype.destroy;mf.makeRequest=qf;mf.defaultRetryParameters=function(){return Ye()};mf.prototype.clearAllResponseFilters=mf.prototype.Ch;mf.prototype.unregisterResponseFilter=mf.prototype.jj;mf.prototype.registerResponseFilter=mf.prototype.Qi;mf.prototype.clearAllRequestFilters=mf.prototype.Bh;mf.prototype.unregisterRequestFilter=mf.prototype.ij;mf.prototype.registerRequestFilter=mf.prototype.Pi;mf.unregisterScheme=function(a){delete pf[a]};
|
|
190
|
-
mf.registerScheme=nf;mf.prototype.setForceHTTPS=mf.prototype.gg;function rf(){this.g=0}mf.NumBytesRemainingClass=rf;function sf(a,b,c){af.call(this,a,b);this.h=c}pa(sf,af);mf.PendingRequest=sf;var wf=1;mf.RequestType={MANIFEST:0,SEGMENT:wf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};mf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var of=3;mf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:of};var pf={};function yf(a){this.g=!1;this.h=new $e;this.i=a}yf.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 zf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Af(){this.g=new $a}p=Af.prototype;p.release=function(){this.sb();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Bf(a,b,c,d),this.g.push(b,a))};p.ka=function(a,b,c,d){function e(g){f.
|
|
191
|
-
p.sb=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.
|
|
192
|
-
Bf.prototype.
|
|
190
|
+
mf.registerScheme=nf;mf.prototype.setForceHTTPS=mf.prototype.gg;function rf(){this.g=0}mf.NumBytesRemainingClass=rf;function sf(a,b,c){af.call(this,a,b);this.h=c}pa(sf,af);mf.PendingRequest=sf;var wf=1;mf.RequestType={MANIFEST:0,SEGMENT:wf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};mf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var of=3;mf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:of};var pf={};function yf(a){this.g=!1;this.h=new $e;this.i=a}yf.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 zf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Af(){this.g=new $a}p=Af.prototype;p.release=function(){this.sb();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Bf(a,b,c,d),this.g.push(b,a))};p.ka=function(a,b,c,d){function e(g){f.dc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.dc=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.dc(),this.g.remove(b,e))}};
|
|
191
|
+
p.sb=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.dc();this.g.g={}}};M("shaka.util.EventManager",Af);Af.prototype.removeAll=Af.prototype.sb;Af.prototype.unlisten=Af.prototype.dc;Af.prototype.listenOnce=Af.prototype.ka;Af.prototype.listen=Af.prototype.o;Af.prototype.release=Af.prototype.release;function Bf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Cf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
192
|
+
Bf.prototype.dc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Cf(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 Df(a)?b:b.capture||!1}
|
|
193
193
|
function Df(a){var b=Ef;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}Ef=b}return b||!1}var Ef=void 0;function Ff(a){this.h=a;this.g=void 0}Ff.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Gf(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 Hf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function If(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Jf(){}
|
|
194
194
|
function Kf(a){if(!a)return"";a=lc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Id())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ra('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==
|
|
195
195
|
(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}
|
|
@@ -261,13 +261,13 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
261
261
|
function(l){g.push({box:l,bb:1701733238})}).S("avc1",function(l){g.push({box:l,bb:1701733238})}).S("avc3",function(l){g.push({box:l,bb:1701733238})}).S("ac-3",function(l){g.push({box:l,bb:1701733217})}).S("ec-3",function(l){g.push({box:l,bb:1701733217})}).S("ac-4",function(l){g.push({box:l,bb:1701733217})}).S("mp4a",function(l){g.push({box:l,bb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw Za(ig(a)),new P(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
|
|
262
262
|
a=Ah(a,e,k.box,f,k.bb);return a}
|
|
263
263
|
function Ah(a,b,c,d,e){var f=Bh.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);Ch(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Ad()?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,Ch(e,d.start,d.size+k.byteLength);k=pc(e,b.start);b=Zf(b);a=k.getUint32(b);
|
|
264
|
-
k.setUint32(b,a+1);return e}function Ch(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 Bh=new Ff(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 Dh(a,b,c,d,e,f,g){this.aa=a;this.gb=b;this.Ma=c;this.Nf=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}Dh.prototype
|
|
264
|
+
k.setUint32(b,a+1);return e}function Ch(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 Bh=new Ff(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 Dh(a,b,c,d,e,f,g){this.aa=a;this.gb=b;this.Ma=c;this.Nf=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}Dh.prototype.$b=function(){return this.gb};Dh.prototype.Wb=function(){return this.Ma};function Eh(a,b){return a===b?!0:a&&b?a.$b()==b.$b()&&a.Wb()==b.Wb()&&xc(a.aa().sort(),b.aa().sort())&&jc(a.g,b.g):a==b}M("shaka.media.InitSegmentReference",Dh);Dh.prototype.getEndByte=Dh.prototype.Wb;Dh.prototype.getStartByte=Dh.prototype.$b;
|
|
265
265
|
function Fh(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v){l=void 0===l?[]:l;r=void 0===r?Gh:r;this.startTime=a;this.i=this.endTime=b;this.I=c;this.gb=d;this.Ma=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.H=void 0===n?null:n;this.ma=void 0===q?null:q;this.status=r;this.m=!1;this.l=!0;this.s=!1;this.aes128Key=void 0===u?null:u;this.G=null;this.j=0;this.u=void 0===v?!1:v;this.C=this.D=!1;a=t(this.h);for(b=a.next();!b.done;b=a.next())b.value.Vg();
|
|
266
|
-
this.u&&this.h.length&&this.h[this.h.length-1].Ug()}p=Fh.prototype;p.aa=function(){return this.I()};p.getStartTime=function(){return this.startTime};p.Uh=function(){return this.endTime};p
|
|
266
|
+
this.u&&this.h.length&&this.h[this.h.length-1].Ug()}p=Fh.prototype;p.aa=function(){return this.I()};p.getStartTime=function(){return this.startTime};p.Uh=function(){return this.endTime};p.$b=function(){return this.gb};p.Wb=function(){return this.Ma};p.li=function(){return this.tilesLayout};p.ki=function(){return this.H};p.mc=function(){return this.status};p.Hi=function(){this.status=Hh};p.Mf=function(){this.m=!0};p.Bi=function(){return this.m};p.qe=function(){this.l=!1};p.xi=function(){return this.l};
|
|
267
267
|
p.Vg=function(){this.D=!0};p.Ai=function(){return this.D};p.Ug=function(){this.C=!0};p.zi=function(){return this.C};p.Tg=function(){this.s=!0};p.si=function(){return this.s};p.ih=function(a){this.G=a};p.ji=function(){return this.G};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=t(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
|
|
268
268
|
p.mg=function(a){null==this.ma?Ra("Sync attempted without sync time!"):(a=this.ma-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};M("shaka.media.SegmentReference",Fh);Fh.prototype.syncAgainst=Fh.prototype.mg;Fh.prototype.offset=Fh.prototype.offset;Fh.prototype.getThumbnailSprite=Fh.prototype.ji;Fh.prototype.setThumbnailSprite=Fh.prototype.ih;Fh.prototype.hasByterangeOptimization=Fh.prototype.si;Fh.prototype.markAsByterangeOptimization=Fh.prototype.Tg;Fh.prototype.isLastPartial=Fh.prototype.zi;
|
|
269
269
|
Fh.prototype.markAsLastPartial=Fh.prototype.Ug;Fh.prototype.isPartial=Fh.prototype.Ai;Fh.prototype.markAsPartial=Fh.prototype.Vg;Fh.prototype.isIndependent=Fh.prototype.xi;Fh.prototype.markAsNonIndependent=Fh.prototype.qe;Fh.prototype.isPreload=Fh.prototype.Bi;Fh.prototype.markAsPreload=Fh.prototype.Mf;Fh.prototype.markAsUnavailable=Fh.prototype.Hi;Fh.prototype.getStatus=Fh.prototype.mc;Fh.prototype.getTileDuration=Fh.prototype.ki;Fh.prototype.getTilesLayout=Fh.prototype.li;
|
|
270
|
-
Fh.prototype.getEndByte=Fh.prototype.Wb;Fh.prototype.getStartByte=Fh.prototype
|
|
270
|
+
Fh.prototype.getEndByte=Fh.prototype.Wb;Fh.prototype.getStartByte=Fh.prototype.$b;Fh.prototype.getEndTime=Fh.prototype.Uh;Fh.prototype.getStartTime=Fh.prototype.getStartTime;Fh.prototype.getUris=Fh.prototype.aa;var Gh=0,Hh=1;Fh.Status={nj:Gh,ck:Hh,Gj:2};function Ih(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Jh(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 Kh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Lh(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}
|
|
271
271
|
function Mh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Lh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Lh(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};/*
|
|
272
272
|
@license
|
|
273
273
|
Shaka Player
|
|
@@ -309,16 +309,16 @@ function oi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8A
|
|
|
309
309
|
p.Ni=function(a){Ae("TsParser","Please use parseNalus function instead.");return this.Uf(a)};
|
|
310
310
|
p.Uf=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 q=a[n];if(q){if(2<=g&&1==q){b&&!h.length&&-1==k&&(q=n-(3<g?3:g),c&&0!=q&&(q=a.subarray(0,q),b.data=jg(b.data,q),b.fullData=jg(b.fullData,q)));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=jg(b.data,k),b.fullData=jg(b.fullData,k)));if(n>=e-f)return h;
|
|
311
311
|
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=jg(b.data,a),b.fullData=jg(b.fullData,a));return h};p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=jg.apply(cg,w(c.value)),(c=oi(c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Sh(c.data),dts:c.dts,pts:c.pts});return a};
|
|
312
|
-
p.
|
|
312
|
+
p.kc=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=jg.apply(cg,w(c.value)),e=oi(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=jg(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};
|
|
313
313
|
p.Ic=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=jg.apply(cg,w(d.value)),f=oi(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=jg(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.Uf(d,g,void 0),
|
|
314
|
-
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.
|
|
314
|
+
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.kc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Ic(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.pd=function(){return{audio:this.s,video:this.m}};
|
|
315
315
|
p.ee=function(){for(var a=[],b=t(this.Ic()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};p.oi=function(){Ae("TsParser","Please use getVideoInfo function instead.");var a=this.Df();return{height:a.height,width:a.width}};p.Df=function(){return"hvc"==this.m?pi(this):qi(this)};
|
|
316
316
|
function qi(a){var b={height:null,width:null,va:null};a=a.ee();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new ci(a.data);var c=ji(a),d=ji(a),e=ji(a);hi(a);if(ri.includes(c)){var f=Q(a);3===f&&ei(a,1);hi(a);hi(a);ei(a,1);if(S(a)){f=3!==f?8:12;for(var g=0;g<f;g++)S(a)&&(6>g?ki(a,16):ki(a,64))}}hi(a);f=Q(a);if(0===f)Q(a);else if(1===f)for(ei(a,1),hi(a),hi(a),f=Q(a),g=0;g<f;g++)hi(a);hi(a);ei(a,1);f=Q(a);g=Q(a);var h=fi(a,1);0===h&&ei(a,1);ei(a,1);var k=0,l=0,m=0,n=
|
|
317
317
|
0;S(a)&&(k=Q(a),l=Q(a),m=Q(a),n=Q(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.va="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
318
318
|
function pi(a){var b={height:null,width:null,va:null};a=a.ee();if(!a.length)return b;a=a.find(function(B){return 33==B.type});if(!a)return b;var c=new ci(a.fullData,!0);ji(c);ji(c);fi(c,4);var d=fi(c,3);S(c);var e=fi(c,2),f=fi(c,1),g=fi(c,5),h=fi(c,32);a=ji(c);for(var k=ji(c),l=ji(c),m=ji(c),n=ji(c),q=ji(c),r=ji(c),u=[],v=[],y=0;y<d;y++)u.push(S(c)),v.push(S(c));if(0<d)for(y=d;8>y;y++)fi(c,2);for(y=0;y<d;y++)u[y]&&fi(c,88),v[y]&&ji(c);Q(c);d=Q(c);3==d&&fi(c,1);u=Q(c);v=Q(c);var z=y=0,x=0,A=0;S(c)&&
|
|
319
319
|
(y+=Q(c),z+=Q(c),x+=Q(c),A+=Q(c));b.width=String(u-(y+z)*(1===d||2===d?2:1));b.height=String(v-(x+A)*(1===d?2:1));c=function(B){for(var C=0,E=0;32>E;E++)C|=(B>>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+r;q&&(e+="."+q.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+="."+
|
|
320
320
|
a.toString(16).toUpperCase());b.va=e;return b}function si(a){return 0>ni(a)?!1:!0}function ni(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}M("shaka.util.TsParser",mi);mi.syncOffset=ni;mi.probe=si;mi.prototype.getVideoInfo=mi.prototype.Df;mi.prototype.getVideoResolution=mi.prototype.oi;mi.prototype.getVideoNalus=mi.prototype.ee;mi.prototype.getCodecs=mi.prototype.pd;mi.prototype.getStartTime=mi.prototype.getStartTime;
|
|
321
|
-
mi.prototype.getVideoData=mi.prototype.Ic;mi.prototype.getAudioData=mi.prototype.
|
|
321
|
+
mi.prototype.getVideoData=mi.prototype.Ic;mi.prototype.getAudioData=mi.prototype.kc;mi.prototype.getMetadata=mi.prototype.getMetadata;mi.prototype.parseNalus=mi.prototype.Uf;mi.prototype.parseAvcNalus=mi.prototype.Ni;mi.prototype.parse=mi.prototype.parse;mi.prototype.clearData=mi.prototype.clearData;mi.Timescale=9E4;var ri=[100,110,122,244,44,83,86,118,128,138,139,134];function ti(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&&Sa("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,Ae("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Sa("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Sa("Could not find LCEVC Library on this page"),
|
|
322
322
|
a=!1):(this.h.SupportObject.SupportStatus||Sa(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 ui(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
323
323
|
ti.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function vi(a,b,c){var d=wi,e=xi;switch(b.mimeType){case "video/webm":d=yi;break;case "video/mp4":d=zi}switch(c){case "DASH":e=Ai;break;case "HLS":e=Bi}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}M("shaka.lcevc.Dec",ti);ti.prototype.release=ti.prototype.release;var wi=0,yi=1,zi=2,Bi=0,Ai=1,xi=-1;function Ci(a,b,c,d){var e=this;this.i=a;this.G=null;this.H=b;this.g={};this.I={};this.ea={};this.h=null;this.V=!1;this.ra=c||function(){};this.P=d||null;this.j={};this.u=new Af;this.m={};this.J=null;this.L=new $e;this.M="";this.Z=!1;this.l=Di(this,this.L);this.D=!1;this.K=new yf(function(){return Ei(e)});this.C=!1;this.U="UNKNOWN";this.qa=this.ha=!1;this.sa=new $e;this.s=!1;this.$=!0}
|
|
324
324
|
function Di(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.u.o(c,"startstreaming",function(){a.$=!0});a.u.o(c,"endstreaming",function(){a.$=!1});a.u.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.u.ka(a.i,"playing",function(){a.Z=!0});a.M=Gi(c);a.i.src=a.M;return c}c=new MediaSource;a.u.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.u.ka(a.i,"playing",function(){a.Z=!0});a.M=Gi(c);a.i.src=a.M;return c}
|
|
@@ -351,9 +351,9 @@ function aj(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return K(function(v){if(1==v.g){i
|
|
|
351
351
|
hj(a,d),3)}return v.return(!0)})}function ij(a,b,c){if(b==Jb)var d=!1;else{d=gd(id(a.I[b]))[0];var e=hd(a.I[b]),f=bd(c.mimeType,c.codecs),g=a.G.forceTransmux;if(!dc(f)||!a.C&&cd.includes(f))g=!0;c=dd(c.mimeType,c.codecs);g&&(g=Wc(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=gd(id(f))[0];f=hd(f);d=d!==b||e!==f}return d?"smooth"!==a.G.codecSwitchingStrategy||!fc()||a.s:!1}var Gi=window.URL.createObjectURL,Ji="sequence";function jj(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=jj.prototype;p.getDuration=function(){return this.j};p.ai=function(){return this.g};p.ig=function(a){this.i=a};p.fb=function(a){this.j=a};p.di=function(){return this.i};p.eh=function(a){this.u=a};p.Rc=function(a){this.G=a};p.Ge=function(a){this.C=a};p.fh=function(a){this.s=a};p.Th=function(){return this.s};
|
|
352
352
|
p.Yg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.we(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)}};
|
|
353
353
|
p.yd=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.we(b);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.m&&(this.i=d-this.h-this.g)}};p.oe=function(){this.m=!0};p.Di=function(){return this.m};p.we=function(a){this.l=null==this.l?a:Math.min(this.l,a)};
|
|
354
|
-
p.Pf=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.pc=function(){return Infinity!=this.j&&!this.G};p.yb=function(){return Math.max(this.H,this.
|
|
355
|
-
p.rd=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.
|
|
356
|
-
jj.prototype.getSeekRangeEnd=jj.prototype.Lb;jj.prototype.getSeekRangeStart=jj.prototype.Hc;jj.prototype.getSafeSeekRangeStart=jj.prototype.rd;jj.prototype.getSegmentAvailabilityEnd=jj.prototype.
|
|
354
|
+
p.Pf=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.pc=function(){return Infinity!=this.j&&!this.G};p.yb=function(){return Math.max(this.H,this.Zb()-this.C)};p.jh=function(a){this.H=a};p.Zb=function(){return this.R()||this.pc()?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};
|
|
355
|
+
p.rd=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.Zb()-this.C+a,this.Lb()))};p.Hc=function(){return this.rd(0)};p.Lb=function(){return Math.max(0,this.Zb()-(this.R()||this.pc()?this.s:0))};p.nh=function(){return null==this.i||null!=this.h&&this.D?!1:!0};p.dh=function(a){this.I=a};M("shaka.media.PresentationTimeline",jj);jj.prototype.setAvailabilityTimeOffset=jj.prototype.dh;jj.prototype.usingPresentationStartTime=jj.prototype.nh;
|
|
356
|
+
jj.prototype.getSeekRangeEnd=jj.prototype.Lb;jj.prototype.getSeekRangeStart=jj.prototype.Hc;jj.prototype.getSafeSeekRangeStart=jj.prototype.rd;jj.prototype.getSegmentAvailabilityEnd=jj.prototype.Zb;jj.prototype.setUserSeekStart=jj.prototype.jh;jj.prototype.getSegmentAvailabilityStart=jj.prototype.yb;jj.prototype.isInProgress=jj.prototype.pc;jj.prototype.isLive=jj.prototype.R;jj.prototype.offset=jj.prototype.offset;jj.prototype.notifyMaxSegmentDuration=jj.prototype.Pf;
|
|
357
357
|
jj.prototype.notifyMinSegmentStartTime=jj.prototype.we;jj.prototype.isStartTimeLocked=jj.prototype.Di;jj.prototype.lockStartTime=jj.prototype.oe;jj.prototype.notifySegments=jj.prototype.yd;jj.prototype.notifyTimeRange=jj.prototype.Yg;jj.prototype.getDelay=jj.prototype.Th;jj.prototype.setDelay=jj.prototype.fh;jj.prototype.setSegmentAvailabilityDuration=jj.prototype.Ge;jj.prototype.setStatic=jj.prototype.Rc;jj.prototype.setClockOffset=jj.prototype.eh;jj.prototype.getPresentationStartTime=jj.prototype.di;
|
|
358
358
|
jj.prototype.setDuration=jj.prototype.fb;jj.prototype.setPresentationStartTime=jj.prototype.ig;jj.prototype.getMaxSegmentDuration=jj.prototype.ai;jj.prototype.getDuration=jj.prototype.getDuration;function kj(a,b,c){this.j=c;this.l=a;this.u=lj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}kj.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function mj(a,b){a.i=b}function nj(a){this.g=a}function lj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Lh(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 oj(a,b,c,d,e){var f=this;this.C=e;this.g=a;this.D=b;this.u=c;this.l=new Af;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 pj(f)});this.m=(new vd(function(){pj(f)})).ya(this.u.gapJumpTimerTime)}oj.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};oj.prototype.Sf=function(){this.s=!0;pj(this)};
|
|
359
359
|
function pj(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=lj(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=Mh(c,b,a.u.gapDetectionThreshold),null==
|
|
@@ -365,21 +365,21 @@ function Aj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.
|
|
|
365
365
|
g.g.Hc():g.g.Lb():0>h&&(h=g.g.Lb()+h);return Dj(g,Ej(g,h))});this.m=new vd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=vj(g.h),k=g.g.Hc(),l=g.g.Lb();3>l-k&&(k=l-3);h<k&&(h=Cj(g,h),g.i.currentTime=h)}})}p=Aj.prototype;p.Ve=function(){this.m.ya(.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.We=function(a){wj(this.h,a)};
|
|
366
366
|
p.Sd=function(){var a=vj(this.h);return 0<this.i.readyState&&!this.i.paused?Ej(this,a):a};p.wg=function(){return this.s?this.s.s:0};p.vg=function(){return this.j.G};p.Xg=function(){this.j.Sf()};function Dj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
367
367
|
function Cj(a,b){var c=Math.max(a.D,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Hc(),f=a.g.Lb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.rd(c),k=a.g.rd(d);c=a.g.rd(c+d);return b>=g?Dj(a,b):b>f?f:b<e?Jh(a.i.buffered,k)?k:c:b>=h||Jh(a.i.buffered,b)?b:c}function Ej(a,b){var c=a.g.Hc();if(b<c)return c;a=a.g.Lb();return b>a?a:b}
|
|
368
|
-
function Bj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new kj(new nj(a),b.stallThreshold,c);mj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Fj(a){this.g=a;this.
|
|
368
|
+
function Bj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new kj(new nj(a),b.stallThreshold,c);mj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Fj(a){this.g=a;this.m=null;this.j=0;this.s=!1}p=Fj.prototype;p.Yb=function(){return this.g.length};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Ii=function(){this.s=!0};function Gj(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};
|
|
369
369
|
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.se=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))}};
|
|
370
370
|
p.xd=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.se(a);this.wb(b)};p.wb=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}};
|
|
371
371
|
p.Cc=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 Fh(a.startTime,b,a.I,a.gb,a.Ma,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.H,a.ma,a.status,a.aes128Key),this.g[this.g.length-1].j=a.j)}};
|
|
372
|
-
p.Je=function(a,b){var c=this;this.s||(this.
|
|
373
|
-
Fj.prototype.
|
|
374
|
-
Fj.prototype.getIteratorForTime=Fj.prototype.
|
|
372
|
+
p.Je=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new vd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.m.stop(),c.m=null)}),this.m.ya(a))};Fj.prototype[Symbol.iterator]=function(){return this.lc(0)};
|
|
373
|
+
Fj.prototype.lc=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.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.l;)e--,f=c.h[e];if(!f.l)return Ra("No independent partial segment found!"),null;b++;d=e-1;break}}return new Hj(this,b,d)};function Ij(a,b,c){a=new Fh(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Fj([a])}M("shaka.media.SegmentIndex",Fj);Fj.forSingleSegment=Ij;
|
|
374
|
+
Fj.prototype.getIteratorForTime=Fj.prototype.lc;Fj.prototype.updateEvery=Fj.prototype.Je;Fj.prototype.fit=Fj.prototype.Cc;Fj.prototype.evict=Fj.prototype.wb;Fj.prototype.mergeAndEvict=Fj.prototype.xd;Fj.prototype.offset=Fj.prototype.offset;Fj.prototype.get=Fj.prototype.get;Fj.prototype.find=Fj.prototype.find;Fj.prototype.markImmutable=Fj.prototype.Ii;Fj.prototype.release=Fj.prototype.release;function Hj(a,b,c){this.i=a;this.g=b;this.h=c}Hj.prototype.Eh=function(){return this.g};
|
|
375
375
|
Hj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.u&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};Hj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.u&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Hj);Hj.prototype.next=Hj.prototype.next;Hj.prototype.current=Hj.prototype.current;
|
|
376
|
-
Hj.prototype.currentPosition=Hj.prototype.Eh;function Jj(){Fj.call(this,[]);this.h=[]}pa(Jj,Fj);p=Jj.prototype;p.clone=function(){var a=new Jj;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.
|
|
377
|
-
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.
|
|
376
|
+
Hj.prototype.currentPosition=Hj.prototype.Eh;function Jj(){Fj.call(this,[]);this.h=[]}pa(Jj,Fj);p=Jj.prototype;p.clone=function(){var a=new Jj;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.Yb()}return null};
|
|
377
|
+
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.Yb()}return null};p.offset=function(){};p.se=function(){};p.wb=function(){};p.xd=function(){};p.Cc=function(){};p.Je=function(){};M("shaka.media.MetaSegmentIndex",Jj);Jj.prototype.updateEvery=Jj.prototype.Je;Jj.prototype.fit=Jj.prototype.Cc;Jj.prototype.mergeAndEvict=Jj.prototype.xd;Jj.prototype.evict=Jj.prototype.wb;Jj.prototype.merge=Jj.prototype.se;Jj.prototype.offset=Jj.prototype.offset;
|
|
378
378
|
Jj.prototype.get=Jj.prototype.get;Jj.prototype.find=Jj.prototype.find;Jj.prototype.release=Jj.prototype.release;function Kj(a){var b=this;this.g=a;this.h=this.g.ce();this.i=new vd(function(){b.g.Wg(.25*b.h)})}Kj.prototype.release=function(){this.set(this.Fc());this.i&&(this.i.stop(),this.i=null);this.g=null};Kj.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.ce()!=b&&this.g.jg(b);break a}catch(c){}this.i.ya(.25);0!=this.g.ce()&&this.g.jg(0)}};Kj.prototype.Fc=function(){return this.g.Fc()};function Lj(a){var b=this;this.h=a;this.g=new Set;this.i=(new vd(function(){Mj(b,!1)})).ya(.25)}Lj.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 Mj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Nj(a){ab.call(this);this.g=new Map;this.h=a}pa(Nj,ab);Nj.prototype.release=function(){this.g.clear();ab.prototype.release.call(this)};function Oj(a,b){var c=a.g.get(b);c||(c={Bd:[],Fg:null,contentType:b},a.g.set(b,c));return c}function Pj(a,b,c){var d=Oj(a,b.contentType);Qj(a,d);a={Nf:b,position:c};d=d.Bd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
379
379
|
Nj.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.Bd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Nf;break a}}d=null}if(e=d)e=c.Fg,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);
|
|
380
380
|
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.Fg=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Qj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Bd;b.Bd=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.Bd=[]};function Rj(a){ab.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new vd(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))})).ya(2)}pa(Rj,ab);Rj.prototype.release=function(){this.g.clear();this.h.stop();ab.prototype.release.call(this)};function Sj(a,b){ab.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{xc:null,wc:Tj,nc:function(d,e){return Uj(c,"enter",d,e)}},{xc:Vj,wc:Tj,nc:function(d,e){return Uj(c,"enter",d,e)}},{xc:Wj,wc:Tj,nc:function(d,e){return Uj(c,"enter",d,e)}},{xc:Tj,wc:Vj,nc:function(d,e){return Uj(c,"exit",d,e)}},{xc:Tj,wc:Wj,nc:function(d,e){return Uj(c,"exit",d,e)}},{xc:Vj,wc:Wj,nc:function(d,e){return Uj(c,"skip",d,e)}},{xc:Wj,wc:Vj,nc:function(d,e){return Uj(c,"skip",d,e)}}];this.h=new Af;this.h.o(this.i,
|
|
381
381
|
"regionremove",function(d){c.g.delete(d.region)})}pa(Sj,ab);Sj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ab.prototype.release.call(this)};Sj.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?Vj:a>d.endTime?Wj:Tj;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.xc==e&&h.wc==f&&h.nc(d,b)}}};
|
|
382
|
-
function Uj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Vj=1,Tj=2,Wj=3;function Xj(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function Yj(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.
|
|
382
|
+
function Uj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Vj=1,Tj=2,Wj=3;function Xj(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function Yj(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.lc(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.m&&null!=e.Ma&&(b=!1),2==e.mc()&&(b=!1),b&&!a.g.has(e)&&(b=new Zj(a.l),ak(b,e,a.h),a.g.set(e,b)),a.j=e.startTime,e=d.next().value}}}
|
|
383
383
|
function bk(a,b){if(a.h.segmentIndex&&a.g.size<a.i&&!a.g.has(b)){var c=new Zj(a.l);ak(c,b,a.h);a.g.set(b,c)}}function ck(a){if(0!==a.g.size){for(var b=t(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&dk(a,c);a.j=0}}function ek(a,b){b&&b!==a.h&&(ck(a),a.h=b)}function dk(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function Zj(a){this.i=a;this.g=this.h=null}
|
|
384
384
|
function ak(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=jg(d,e):d=e,a.h?D(f,a.h(d),3):f.F(0);d=new Uint8Array(0);F(f)})})}Zj.prototype.abort=function(){this.g&&this.g.abort()};function fk(a,b,c,d,e){a=qf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function gk(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.s=this.j=null;this.H=0;this.G=!1;this.h=new Map;this.D=!1;this.I=null;this.u=!1;this.l=new yf(function(){return hk(c)})}p=gk.prototype;p.destroy=function(){return this.l.destroy()};function hk(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,ik(e),b.push(jk(e));return D(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;F(f)})}
|
|
385
385
|
p.configure=function(a){this.i=a;this.I=new Xe({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.h.keys()),c=b.next();!c.done;c=b.next())if(c=this.h.get(c.value),c.Ga){var d=c.Ga,e=a.segmentPrefetchLimit;d.i=e;for(var f=Array.from(d.g.keys());f.length>e;){var g=f.pop();g&&dk(d,g)}0<a.segmentPrefetchLimit||
|
|
@@ -397,7 +397,7 @@ function yk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:zf(a.l);i
|
|
|
397
397
|
wa(h),D(h,Ak(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.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:zf(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.fb(g),F(h)}})}
|
|
398
398
|
function zk(a,b){if(Bk(b))return Wi(a.g.Y,b.stream.originalId||""),null;b.type==Jb&&Xi(a.g.Y);if(!a.g.Y.$&&b.type!=Jb)return a.i.updateIntervalSeconds/2;var c=a.g.be(),d=b.Ra?b.Ra.endTime:c,e=Pi(a.g.Y,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=Oi(a.g.Y,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(Jb))&&Bk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/
|
|
399
399
|
2;e=Ck(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;f=Infinity;g=Array.from(a.h.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Bk(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.Ga&&b.ba&&(d=e.g,!d||b.Ra&&Eh(d,b.Mc)||bk(b.Ga,d),Yj(b.Ga,e));Dk(a,b,c,e).catch(function(){});return null}
|
|
400
|
-
function Ck(a,b,c,d){if(b.ba)return b.ba.current();if(b.Ra||d)return c=b.Ra?b.Ra.endTime:d,b.Of=!0,b.ba=b.stream.segmentIndex.
|
|
400
|
+
function Ck(a,b,c,d){if(b.ba)return b.ba.current();if(b.Ra||d)return c=b.Ra?b.Ra.endTime:d,b.Of=!0,b.ba=b.stream.segmentIndex.lc(c),b.ba&&b.ba.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.lc(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.lc(c),e=b.ba&&b.ba.next().value);return e}
|
|
401
401
|
function Dk(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:e=Kb;f=b.stream;g=b.ba;b.Sa=!0;ta(B,2);if(2==d.mc())throw new P(1,1,1011);return D(B,Ek(a,b,d),4);case 4:zf(a.l);if(a.u)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.s))return n=new Uint8Array(0),r=q=!1,v=function(C){var E,H,G,I;return K(function(J){switch(J.g){case 1:if(q)return J.return();r=!0;zf(a.l);if(a.u)return J.return();
|
|
402
402
|
ta(J,2);n=Fk(n,C);E=!1;H=0;(new Tf).box("mdat",function(L){H=L.size+L.start;E=!0}).parse(n,!1,!0);if(!E){J.F(4);break}G=n.subarray(0,H);n=n.subarray(H);return D(J,Gk(a,b,c,f,d,G,!0),5);case 5:b.Ga&&b.ba&&Yj(b.Ga,d,!0);case 4:va(J,0);break;case 2:u=I=wa(J),F(J)}})},D(B,Hk(a,b,d,v),9);l=Hk(a,b,d);return D(B,l,7);case 7:m=B.h;zf(a.l);if(a.u)return B.return();zf(a.l);return b.Qb?(b.Sa=!1,ok(a,b,0),B.return()):D(B,Gk(a,b,c,f,d,m),6);case 9:y=B.h;if(u)throw u;if(r){B.F(10);break}q=!0;zf(a.l);return a.u?
|
|
403
403
|
B.return():b.Qb?(b.Sa=!1,ok(a,b,0),B.return()):D(B,Gk(a,b,c,f,d,y),10);case 10:b.Ga&&b.ba&&Yj(b.Ga,d,!0);case 6:zf(a.l);if(a.u)return B.return();b.Ra=d;g.next();b.Sa=!1;b.Xf=!1;z=a.g.Y.Jb();x=z[b.type];Ya(JSON.stringify(x));b.Qb||a.g.Sf(d.startTime,d.endTime,b.type);ok(a,b,0);va(B,0);break;case 2:A=wa(B);zf(a.l,A);if(a.u)return B.return();b.Sa=!1;if(7001==A.code)b.Sa=!1,ik(b),ok(a,b,0),B.F(0);else if(b.type==e.za&&a.i.ignoreTextStreamFailures)a.h.delete(e.za),B.F(0);else if(3017==A.code)Ik(a,b,A),
|
|
@@ -410,7 +410,7 @@ new Map,a.j.audio&&z.set(d.W,a.j.audio),a.j.video&&z.set(d.ua,a.j.video),ta(C,2)
|
|
|
410
410
|
function Gk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return K(function(r){switch(r.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;m=a.i.parsePrftBox&&!a.G;if(l||m)k=new Tf;l&&k.S("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var y=u.reader.Cd();var z=u.reader.Cd();var x=u.reader.N();var A=u.reader.N();var B=u.reader.N();var C=u.reader.N();var E=e.startTime+A/x}else x=u.reader.N(),E=u.reader.Qc()/
|
|
411
411
|
x+e.timestampOffset,A=E-e.startTime,B=u.reader.N(),C=u.reader.N(),y=u.reader.Cd(),z=u.reader.Cd();u=u.reader.Ob(u.reader.getLength()-u.reader.Ea());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.Li():(v=(new Map).set("detail",{startTime:E,endTime:E+B/x,schemeIdUri:y,value:z,timescale:x,presentationTimeDelta:A,eventDuration:B,id:C,messageData:u}),v=new O("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=y&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
412
412
|
y||(y=Sh(u),y.length&&e&&a.g.Mi([{cueTime:e.startTime,data:u,frames:y,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.S("prft",function(u){if(!a.G&&e.g.timescale){var v=u.reader,y=u.version;v.N();u=v.N();var z=v.N();u=1E3*u+z/Math.pow(2,32)*1E3;0===y?v=v.N():(y=v.N(),v=v.N(),v=y*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.g.timescale*1E3)});v=new O("prft",v);a.g.onEvent(v);
|
|
413
|
-
a.G=!0}});(l||m)&&k.parse(f);return D(r,Kk(a,b,c),2);case 2:return zf(a.l),n=b.Fd,b.Fd=!1,q=b.xg,b.xg=!1,D(r,a.g.zg(b.type,f),3);case 3:return D(r,Ri(a.g.Y,b.type,f,e,d,h,n,q,g),4);case 4:zf(a.l),F(r)}})}function Kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Mi(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return
|
|
413
|
+
a.G=!0}});(l||m)&&k.parse(f);return D(r,Kk(a,b,c),2);case 2:return zf(a.l),n=b.Fd,b.Fd=!1,q=b.xg,b.xg=!1,D(r,a.g.zg(b.type,f),3);case 3:return D(r,Ri(a.g.Y,b.type,f,e,d,h,n,q,g),4);case 4:zf(a.l),F(r)}})}function Kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Mi(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)}zf(a.l);F(h)})}
|
|
414
414
|
function Bk(a){return a&&a.type==Jb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
415
415
|
function Hk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Dh&&(e=c.g))return l.return(e);f=null;if(b.Ga){var m=b.Ga;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=xk(a,c,b.stream,d));g=0;b.ba&&(g=b.ba.g);b.cb=f;return D(l,f.promise,2);case 2:h=l.h;b.cb=null;k=h.data;if(!c.aes128Key){l.F(3);break}return D(l,Jk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
416
416
|
function xk(a,b,c,d){var e=b instanceof Fh?b:void 0,f=e?1:0;b=fk(b.aa(),b.gb,b.Ma,a.i.retryParameters,d);return a.g.tc.request(wf,b,{type:f,stream:c,segment:e})}
|
|
@@ -503,7 +503,7 @@ function rm(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B;return K(function(C){
|
|
|
503
503
|
"Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.Ka=new Je(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.Qa=a.h.preferredTextLanguage;a.Gb=a.h.preferredTextRole;a.Db=a.h.preferForcedSubs;Gm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);
|
|
504
504
|
a.u.init(function(E,H,G){a.j&&E!=a.j.j&&Hm(a,E,!0,void 0===H?!1:H,void 0===G?0:G)});a.u.setMediaElement(c);Od(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);a.j=Im(a);a.j.configure(a.h.streaming);a.l=Jm;c.textTracks&&a.s.o(c.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Km(a,E)}});a.dispatchEvent(am("streaming"));g=null;(h=a.j.j)||(g=Lm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(q=n.value)&&
|
|
505
505
|
!q.segmentIndex&&k.push(q.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);Gm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.G=Mm(a,a.ea);a.Va=Nm(a,b);r=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Om(a,c,r);if(h){C.F(4);break}Hm(a,g,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){C.F(4);break}u=a.G;v=u.We;return D(C,Pm(g,a.G.Sd()),6);case 6:v.call(u,C.h);case 4:return a.G.Ve(),
|
|
506
|
-
y=a
|
|
506
|
+
y=a.ac().find(function(E){return E.active}),y||((z=re(a.i.textStreams,a.Qa,a.Gb,a.Db)[0]||null)&&Ql(a.C.h,z,!0),g&&(z?(g.audio&&Qm(a,g.audio,z)&&(a.Z=!0),a.Z&&a.I.H.setTextVisibility(!0),Rm(a)):a.Z=!1),z&&(a.h.streaming.alwaysStreamText||a.rc())&&tk(a.j,z)),D(C,a.j.start(),7);case 7:a.h.abr.enabled&&(a.u.enable(),Sm(a));Dm(a);Tm(a);a.i.variants.some(function(E){return E.primary});(x=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription)?(A=function(){return Um(a)},a.s.o(c,"timeupdate",A)):x||(B=
|
|
507
507
|
function(){return Vm(a)},a.s.o(c,"timeupdate",B),Vm(a));if(a.D)a.D.onManifestUpdated(x);a.od=!0;a.s.ka(c,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b});F(C)}})}
|
|
508
508
|
function om(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Kb,d=Date.now()/1E3,e=!0,a.m=Am(a,{tc:a.J,onError:function(h){jm(a,h)},ze:function(h){Bm(a,h)},onExpirationUpdated:function(h,k){Cm(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.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
|
|
509
509
|
mimeType:b?hd(b):"",codecs:b?id(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ua,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,Pg(a.m,[f],[]),2)):D(g,a.m.Ac(a.g),0)})}
|
|
@@ -519,31 +519,31 @@ function Vl(a){return new mf(function(b,c,d){a.u&&a.u.segmentDownloaded(b,c,d)},
|
|
|
519
519
|
"d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.s=f}ol(e,c,{ot:ll,su:!e.j})}}catch(m){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case wf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.R()?"l":"v"};h.ot=rl(b);var k=h.ot===pl||h.ot===jl||h.ot===kl||h.ot===tl,l=b.stream;l&&(k&&(h.bl=vl(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==tl&&(h.tb=wl(e,h.ot)/1E3);ol(e,c,h)}}catch(m){Ta("CMCD_SEGMENT_ERROR",
|
|
520
520
|
"Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:ol(e,c,{ot:"k"});break;case 4:ol(e,c,{ot:"o"})}},function(b,c,d,e){a.H&&a.H.banLocation&&a.H.banLocation(e)})}function Mm(a,b){return new Aj(a.g,a.i,a.h.streaming,b,function(){a.Va&&Mj(a.Va,!0);a.j&&a.j.Fd();a.M&&cn(a)},function(c){return a.dispatchEvent(c)})}
|
|
521
521
|
function Nm(a,b){b=new Sj(a.ra,a.R()||0<b);b.addEventListener("enter",function(d){vm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){vm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(vm(a,"timelineregionenter",e),vm(a,"timelineregionexit",e))});var c=new Lj(a.g);c.g.add(b);a.ha&&c.g.add(a.ha);return c}
|
|
522
|
-
function Om(a,b,c){a.M=new Se;a.M.g=Ue;
|
|
523
|
-
function cn(a){switch(a.l){case Xm:if(a.g.ended)var b=!0;else{var c=Ih(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Jm:a:if(a.g.ended||Li(a.I))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.
|
|
522
|
+
function Om(a,b,c){a.M=new Se;a.M.g=Ue;Ve(a.M,c,Math.min(.5,c/2));lm(a);a.s.o(b,"waiting",function(){return cn(a)});a.s.o(b,"stalled",function(){return cn(a)});a.s.o(b,"canplaythrough",function(){return cn(a)});a.s.o(b,"progress",function(){return cn(a)})}
|
|
523
|
+
function cn(a){switch(a.l){case Xm:if(a.g.ended)var b=!0;else{var c=Ih(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Jm:a:if(a.g.ended||Li(a.I))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Zb();var d=Ih(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Kh(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Te:Ue;c.g=d;b!=d&&lm(a)}function tm(a,b,c,d){return new Ci(a,b,c,d)}
|
|
524
524
|
function Ul(a){return new gl({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Jb:function(){return a.Jb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Kb:function(){return a.Kb()},Xb:function(){return a.Xb()},kb:function(){return a.kb()},R:function(){return a.R()}},a.h.cmcd)}
|
|
525
525
|
function Im(a){return new gk(a.i,{be:function(){return a.G?a.G.Sd():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Y:a.I,tc:a.J,onError:function(b){return jm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Li:function(){a.H&&a.H.update&&a.H.update()},Sf:function(b,c,d){a.G&&a.G.Xg();cn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(am("segmentappended",b))},Ki:function(b,c){(c=c.Nf)&&a.ha&&Pj(a.ha,c,b)},zg:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&
|
|
526
526
|
!d.H&&["audio","video"].includes(b)){c=new kg(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;Yg(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Mi:function(b,c,d){um(a,b,c,d)},ef:function(b,c){return a.ef(b,c)}})}
|
|
527
527
|
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Ae("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Ae("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
528
528
|
a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2));var c=Ll(this.h,a,Tl(this));dn(this);return c};
|
|
529
529
|
function dn(a){if(a.H){var b=hf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{en(a,a.i)}catch(f){jm(a,f)}a.u&&Tm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||fn(a)}a.J&&a.J.gg(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.V=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Zf!=b)){var c=b(),d=a.I,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),
|
|
530
|
-
e.destroy());d.h&&(d.h.j=c);a.Zf=b;a.j&&(b=a.j,(c=b.h.get(Jb))&&rk(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Sm(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
530
|
+
e.destroy());d.h&&(d.h.j=c);a.Zf=b;a.j&&(b=a.j,(c=b.h.get(Jb))&&rk(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Sm(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ve(a.M,b,Math.min(.5,b/2)));a.i&&Gm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.D&&a.D.configure(a.h.ads);a.U&&a.U.configure(a.h.cmcd)}p.getConfiguration=function(){var a=Tl(this);Ll(a,this.h,Tl(this));return a};
|
|
531
531
|
p.Kh=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Fa().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};p.Wi=function(){for(var a in this.h)delete this.h[a];Ll(this.h,Tl(this),Tl(this));dn(this)};p.ae=function(){return this.l};p.Af=function(){return this.i?this.i.type:null};p.bi=function(){return this.g};
|
|
532
532
|
p.Xb=function(){return this.J};p.zf=function(){return this.$};p.Yd=function(){return this.D?this.D:null};p.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};p.pc=function(){return this.i?this.i.presentationTimeline.pc():!1};p.Kc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
533
533
|
p.Fa=function(){if(this.i){if(!this.od&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Hc(),end:a.Lb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};p.pi=function(){this.R()&&(this.g.currentTime=this.Fa().end)};p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.m?this.m.g:null};p.qd=function(){return this.m?this.m.qd():Infinity};
|
|
534
534
|
p.yf=function(){return this.m?this.m.yf():[]};p.$d=function(){return this.m?this.m.$d():{}};p.vd=function(){return this.M?this.M.g==Ue:!1};p.Kb=function(){return this.g?this.K?this.K.h:1:0};
|
|
535
535
|
p.Jd=function(a){var b=this;0==a?Sa("A trick play rate of 0 is unsupported!"):(this.sa.sb(),this.g.paused&&this.g.play(),this.K.set(a),this.l==Jm&&(this.u.playbackRateChanged(a),qk(this.j,1<Math.abs(a))),this.R()&&this.sa.o(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Fa(),e=b.h.streaming.safeSeekOffset;0<a?c>=d.end&&b.kd():c<=d.start+e&&b.kd()}))};p.kd=function(){var a=this.K.Fc();this.l==Xm&&this.K.set(a);this.l==Jm&&(this.K.set(a),this.u.playbackRateChanged(a),qk(this.j,!1));this.sa.sb()};
|
|
536
536
|
p.kb=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,pe(e)){var f=he(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return oe(g)}):[]};
|
|
537
|
-
p
|
|
538
|
-
p.Hh=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Jm&&b.l!=Xm)return g.return(null);c=b.Ub;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=[],Gj(d.segmentIndex,function(h){var k=gn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.
|
|
539
|
-
function gn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{
|
|
540
|
-
p.Cf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B;return K(function(C){if(1==C.g){if(c.l!=Jm&&c.l!=Xm)return C.return(null);d=c.Ub;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=gn(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.
|
|
541
|
-
u=g.H||r/q;v=g.startTime;z=y=0;1<q&&(x=Math.floor((b-g.startTime)/u),v=g.startTime+x*u,y=x%h.
|
|
537
|
+
p.ac=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=ie(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Zm(this).map(function(f){return me(f)}):[]};p.Zd=function(){var a=this.Ub;this.i&&(a=this.i.imageStreams);return a.map(function(b){return je(b)})};
|
|
538
|
+
p.Hh=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Jm&&b.l!=Xm)return g.return(null);c=b.Ub;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=[],Gj(d.segmentIndex,function(h){var k=gn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.ic;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.Cf(a,h.startTime+l*m/k))}}),D(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
539
|
+
function gn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{ic:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
540
|
+
p.Cf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B;return K(function(C){if(1==C.g){if(c.l!=Jm&&c.l!=Xm)return C.return(null);d=c.Ub;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=gn(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.ic;n=l/h.rows;q=h.ic*h.rows;r=g.i-g.startTime;
|
|
541
|
+
u=g.H||r/q;v=g.startTime;z=y=0;1<q&&(x=Math.floor((b-g.startTime)/u),v=g.startTime+x*u,y=x%h.ic*m,z=Math.floor(x/h.ic)*n);A=!1;if(B=g.G)A=!0,n=B.height,y=B.positionX,z=B.positionY,m=B.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:y,positionY:z,startTime:v,duration:u,uris:g.aa(),width:m,sprite:A})})};
|
|
542
542
|
p.dg=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&&(Ql(this.C.h,b,!1),tk(this.j,b),hn(this),this.Qa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Zm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ke(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";hn(this)}};
|
|
543
543
|
p.Fe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&pe(d)&&(Hm(this,d,!1,b,c),this.Ka=new Ie(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),Tm(this))}else if(this.g&&this.g.audioTracks)for(b=
|
|
544
|
-
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,ke(c)==a.id){jn(this,c);break}};p.Jh=function(){return kn(this.kb())};p.ii=function(){return kn(this
|
|
544
|
+
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,ke(c)==a.id){jn(this,c);break}};p.Jh=function(){return kn(this.kb())};p.ii=function(){return kn(this.ac())};p.Ih=function(){return Array.from(ln(this.kb()))};p.gi=function(){return Array.from(ln(this.ac()))};
|
|
545
545
|
p.Ee=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.G){this.Ka=new Je(a,b||"",c,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.Ka.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,b))c=
|
|
546
|
-
f;c?(a=he(c),this.Fe(a,!0,d)):fn(this)}else this.g&&this.g.audioTracks&&(d=re(this.kb(),a,b||"",!1)[0])&&this.Fe(d)};p.cg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Qa=a,this.Gb=b||"",this.Db=c,(a=re(this.i.textStreams,this.Qa,this.Gb,this.Db)[0]||null)&&a!=this.j.s&&(Ql(this.C.h,a,!1),this.h.streaming.alwaysStreamText||this.rc()))tk(this.j,a),hn(this)}else(a=re(this
|
|
546
|
+
f;c?(a=he(c),this.Fe(a,!0,d)):fn(this)}else this.g&&this.g.audioTracks&&(d=re(this.kb(),a,b||"",!1)[0])&&this.Fe(d)};p.cg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Qa=a,this.Gb=b||"",this.Db=c,(a=re(this.i.textStreams,this.Qa,this.Gb,this.Db)[0]||null)&&a!=this.j.s&&(Ql(this.C.h,a,!1),this.h.streaming.alwaysStreamText||this.rc()))tk(this.j,a),hn(this)}else(a=re(this.ac(),a,b||"",c)[0])&&this.dg(a)};
|
|
547
547
|
p.cj=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.Ka=new Je(d.language,"",0,"","",a,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),fn(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&jn(this,b)}};
|
|
548
548
|
p.rc=function(){var a=this.Z;return this.I&&this.l==Jm?this.I.H.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Zm(this).some(function(b){return"showing"==b.mode}):a};p.Lg=function(){return this.g&&this.g.src&&this.g.textTracks?mn(this).map(function(a){return me(a)}):[]};
|
|
549
549
|
p.Mh=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=Nb(a),c=mn(this).filter(function(h){return Nb(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};
|
|
@@ -555,11 +555,11 @@ p.getStats=function(){if(this.l!=Jm&&this.l!=Xm)return{width:NaN,height:NaN,stre
|
|
|
555
555
|
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.C.M=this.G.vg(),this.C.P=this.G.wg());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==Jm){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||
|
|
556
556
|
NaN,b.s=c.video.width||NaN,b.l=d);this.R()&&(c=this.Ng().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==Xm&&(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.P,k=f.M,l=f.C,m=f.i,n=f.m,q=f.H,r=f.j,u=Nl(f.g,"playing"),v=Nl(f.g,"paused"),y=Nl(f.g,"buffering"),z=f.u,x=f.G,A=f.I,B=Ol(f.g),C=[];f=t(f.h.g);
|
|
557
557
|
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:q,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:y,licenseTime:z,liveLatency:x,maxSegmentDuration:A,stateHistory:B,switchHistory:C}};
|
|
558
|
-
p.vh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,r,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:if(h.l!=Jm&&h.l!=Xm)throw new P(1,7,7004);"subtitles"!=c&&"captions"!=c&&Sa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){B.F(2);break}return D(B,nn(h,a),3);case 3:d=B.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=Xm){B.F(4);break}g&&(c="forced");return D(B,on(h,a,b,c,d,f||"",k),5);case 5:l=Nb(b);m=h
|
|
558
|
+
p.vh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,r,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:if(h.l!=Jm&&h.l!=Xm)throw new P(1,7,7004);"subtitles"!=c&&"captions"!=c&&Sa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){B.F(2);break}return D(B,nn(h,a),3);case 3:d=B.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=Xm){B.F(4);break}g&&(c="forced");return D(B,on(h,a,b,c,d,f||"",k),5);case 5:l=Nb(b);m=h.ac();if(n=m.find(function(C){return Nb(C.language)==
|
|
559
559
|
l&&C.label==(f||"")&&C.kind==c}))return Dm(h),B.return(n);throw new P(1,2,2012);case 4:q=Kb;r=h.g.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new P(1,4,4033);if(!k.length){B.F(6);break}return D(B,pn(h,a,h.J,h.h.streaming.retryParameters),7);case 7:u=B.h,v=qn(h,u,d,k),y=new Blob([v],{type:"text/vtt"}),a=Gi(y),d="text/vtt";case 6:z={id:h.rg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ij(0,r,[a]),mimeType:d||"",
|
|
560
560
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.za,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};x=bd(z.mimeType,z.codecs);A=kd(x);if(!A)throw new P(2,2,2014,d);h.i.textStreams.push(z);Dm(h);return B.return(ie(z))}})};
|
|
561
561
|
p.wh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x;return K(function(A){switch(A.g){case 1:if(c.l!=Jm&&c.l!=Xm)throw new P(1,7,7004);if(b){A.F(2);break}return D(A,nn(c,a),3);case 3:b=A.h;case 2:if("text/vtt"!=b)throw new P(1,2,2017,a);d=Kb;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new P(1,4,4045);return D(A,pn(c,a,c.J,c.h.streaming.retryParameters),4);case 4:f=A.h;g=ld[b];if(!g)throw new P(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
562
|
-
vttOffset:0};l=lc(f);m=h.parseMedia(l,k,a);n=[];q={};r=t(m);for(u=r.next();!u.done;q={ed:q.ed,
|
|
562
|
+
vttOffset:0};l=lc(f);m=h.parseMedia(l,k,a);n=[];q={};r=t(m);for(u=r.next();!u.done;q={ed:q.ed,ec:q.ec},u=r.next())q.ec=u.value,q.ed=null,v=function(B){return function(){null==B.ed&&(B.ed=Cb([a],[B.ec.payload]));return B.ed||[]}}(q),y=new Fh(q.ec.startTime,q.ec.endTime,v,0,null,null,0,0,Infinity),q.ec.payload.includes("#xywh")&&(z=q.ec.payload.split("#xywh=")[1].split(","),4===z.length&&y.ih({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
|
|
563
563
|
n.push(y);x={id:c.rg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.jd,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==Xm?c.Ub.push(x):
|
|
564
564
|
c.i.imageStreams.push(x);Dm(c);return A.return(je(x))}})};
|
|
565
565
|
p.uh=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Jm&&d.l!=Xm)throw new P(1,7,7004);if(c){k.F(2);break}return D(k,nn(d,a),3);case 3:c=k.h;case 2:return e=[],d.D&&(e=d.D.getCuePoints()),D(k,on(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Lg();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.ka(f,"load",l);d.s.ka(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return Dm(d),k.return(h);case 5:throw new P(1,
|
|
@@ -573,7 +573,7 @@ function xm(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.nex
|
|
|
573
573
|
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:Jb,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)}}
|
|
574
574
|
function wm(a,b){return K(function(c){if(1==c.g)return D(c,rn(a,b),2);en(a,b);F(c)})}function rn(a,b){return K(function(c){if(1==c.g)return D(c,Td(a.m,b),2);if(!b.variants.some(pe))throw new P(2,4,4032);F(c)})}function en(a,b){if(a.l!=bm){Sd(b.variants,a.h.restrictions,a.ve)&&a.j&&Dm(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,ym(a,c.keySystem,e.video),ym(a,c.keySystem,e.audio);sn(a,b)}}
|
|
575
575
|
function ym(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,Yg(a.m,e.initDataType,e.initData)}}}
|
|
576
|
-
function Pm(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,q;return K(function(r){if(1==r.g)return k?D(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.
|
|
576
|
+
function Pm(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,q;return K(function(r){if(1==r.g)return k?D(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.lc(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},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)})}
|
|
577
577
|
function lm(a){var b=a.vd();if(a.C&&a.M&&a.G){if(a.U){var c=a.U;b||c.j||(c.j=!0);c.j&&b&&(c.l=!0);c.m=b}Em(a)}b=(new Map).set("buffering",b);a.dispatchEvent(am("buffering",b))}function Fm(a){var b=a.g.playbackRate;0!=b&&(a.K&&a.K.set(b),b=am("ratechange"),a.dispatchEvent(b))}
|
|
578
578
|
function Em(a){if(a.C&&a.M){var b=a.C.g,c="playing";a.M.g==Ue?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(am("statechanged",c)))}}
|
|
579
579
|
function Um(a){if(a.R()){var b=a.Fa();if(Number.isFinite(b.end)&&!(a.g.currentTime<b.start)){if(a.h.streaming.liveSync){var c=a.h.streaming.liveSyncMaxLatency;var d=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var e=a.h.streaming.liveSyncMinLatency;var f=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&
|
|
@@ -594,12 +594,12 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a)
|
|
|
594
594
|
function kn(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=Nb(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));
|
|
595
595
|
h.push({language:l,role:m,label:n})}});return h}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.lg;V.prototype.getManifestParserFactory=V.prototype.$h;V.prototype.getManifest=V.prototype.Zh;V.prototype.retryStreaming=V.prototype.Yf;V.prototype.setMaxHardwareResolution=V.prototype.hg;V.prototype.addChaptersTrack=V.prototype.uh;V.prototype.addThumbnailsTrack=V.prototype.wh;V.prototype.addTextTrackAsync=V.prototype.vh;V.prototype.getStats=V.prototype.getStats;
|
|
596
596
|
V.prototype.getBufferedInfo=V.prototype.Jb;V.prototype.getPresentationStartTimeAsDate=V.prototype.Ng;V.prototype.getPlayheadTimeAsDate=V.prototype.ci;V.prototype.setTextTrackVisibility=V.prototype.He;V.prototype.getChapters=V.prototype.Mh;V.prototype.getChaptersTracks=V.prototype.Lg;V.prototype.isTextTrackVisible=V.prototype.rc;V.prototype.selectVariantsByLabel=V.prototype.cj;V.prototype.selectTextLanguage=V.prototype.cg;V.prototype.selectAudioLanguage=V.prototype.Ee;
|
|
597
|
-
V.prototype.getTextLanguages=V.prototype.gi;V.prototype.getAudioLanguages=V.prototype.Ih;V.prototype.getTextLanguagesAndRoles=V.prototype.ii;V.prototype.getAudioLanguagesAndRoles=V.prototype.Jh;V.prototype.selectVariantTrack=V.prototype.Fe;V.prototype.selectTextTrack=V.prototype.dg;V.prototype.getThumbnails=V.prototype.Cf;V.prototype.getAllThumbnails=V.prototype.Hh;V.prototype.getImageTracks=V.prototype.Zd;V.prototype.getTextTracks=V.prototype
|
|
597
|
+
V.prototype.getTextLanguages=V.prototype.gi;V.prototype.getAudioLanguages=V.prototype.Ih;V.prototype.getTextLanguagesAndRoles=V.prototype.ii;V.prototype.getAudioLanguagesAndRoles=V.prototype.Jh;V.prototype.selectVariantTrack=V.prototype.Fe;V.prototype.selectTextTrack=V.prototype.dg;V.prototype.getThumbnails=V.prototype.Cf;V.prototype.getAllThumbnails=V.prototype.Hh;V.prototype.getImageTracks=V.prototype.Zd;V.prototype.getTextTracks=V.prototype.ac;V.prototype.getVariantTracks=V.prototype.kb;
|
|
598
598
|
V.prototype.cancelTrickPlay=V.prototype.kd;V.prototype.trickPlay=V.prototype.Jd;V.prototype.getPlaybackRate=V.prototype.Kb;V.prototype.isBuffering=V.prototype.vd;V.prototype.getKeyStatuses=V.prototype.$d;V.prototype.getActiveSessionsMetadata=V.prototype.yf;V.prototype.getExpiration=V.prototype.qd;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.pi;V.prototype.seekRange=V.prototype.Fa;V.prototype.isAudioOnly=V.prototype.Kc;
|
|
599
599
|
V.prototype.isInProgress=V.prototype.pc;V.prototype.isLive=V.prototype.R;V.prototype.getAdManager=V.prototype.Yd;V.prototype.getAssetUri=V.prototype.zf;V.prototype.getNetworkingEngine=V.prototype.Xb;V.prototype.getMediaElement=V.prototype.bi;V.prototype.getManifestType=V.prototype.Af;V.prototype.getLoadMode=V.prototype.ae;V.prototype.resetConfiguration=V.prototype.Wi;V.prototype.getBufferFullness=V.prototype.Kh;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
|
|
600
600
|
V.prototype.releaseAllMutexes=V.prototype.Si;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.lj;V.prototype.unload=V.prototype.Sc;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.yg;V.prototype.attach=V.prototype.Ac;
|
|
601
601
|
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,qh(),3):h.F(2);2!=h.g&&(b=h.h);var k={};if(wd())for(var l in yh)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]=wd()?!!yh[m]:xd(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(cd));
|
|
602
|
-
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=wd()?kd(m)?!0:dc(m)||(Wc(m)?!0:!1):xd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=wn;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=cm;V.setAdManagerFactory=function(a){Wl=a};V.registerSupportPlugin=function(a,b){wn[a]=b};V.prototype.destroy=V.prototype.destroy;var bm=0,Sl=1,Jm=2,Xm=3;V.LoadMode={DESTROYED:bm,NOT_LOADED:Sl,MEDIA_SOURCE:Jm,SRC_EQUALS:Xm};V.version="v4.6.
|
|
602
|
+
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=wd()?kd(m)?!0:dc(m)||(Wc(m)?!0:!1):xd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=wn;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=cm;V.setAdManagerFactory=function(a){Wl=a};V.registerSupportPlugin=function(a,b){wn[a]=b};V.prototype.destroy=V.prototype.destroy;var bm=0,Sl=1,Jm=2,Xm=3;V.LoadMode={DESTROYED:bm,NOT_LOADED:Sl,MEDIA_SOURCE:Jm,SRC_EQUALS:Xm};V.version="v4.6.14";
|
|
603
603
|
var xn=["4","6"];Be=new function(a){this.g=a;this.i=Ce;this.h=De}(new ze(Number(xn[0]),Number(xn[1])));var vn=["output-restricted","internal-error"],wn={},Wl=null;function yn(){this.h=[];this.j=this.i=this.g=0};function zn(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 Af;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=zn.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};
|
|
604
604
|
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)};
|
|
605
605
|
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)};
|
|
@@ -607,7 +607,7 @@ p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.ge
|
|
|
607
607
|
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};M("shaka.ads.ClientSideAd",zn);zn.prototype.release=zn.prototype.release;
|
|
608
608
|
zn.prototype.getPodIndex=zn.prototype.getPodIndex;zn.prototype.getTimeOffset=zn.prototype.getTimeOffset;zn.prototype.getMediaUrl=zn.prototype.getMediaUrl;zn.prototype.getAdvertiserName=zn.prototype.getAdvertiserName;zn.prototype.getCreativeAdId=zn.prototype.getCreativeAdId;zn.prototype.getAdId=zn.prototype.getAdId;zn.prototype.getVastMediaWidth=zn.prototype.getVastMediaWidth;zn.prototype.getVastMediaHeight=zn.prototype.getVastMediaHeight;zn.prototype.getVastMediaBitrate=zn.prototype.getVastMediaBitrate;
|
|
609
609
|
zn.prototype.getDescription=zn.prototype.getDescription;zn.prototype.getTitle=zn.prototype.getTitle;zn.prototype.getPositionInSequence=zn.prototype.getPositionInSequence;zn.prototype.getSequenceLength=zn.prototype.getSequenceLength;zn.prototype.setMuted=zn.prototype.setMuted;zn.prototype.resize=zn.prototype.resize;zn.prototype.isLinear=zn.prototype.isLinear;zn.prototype.isMuted=zn.prototype.isMuted;zn.prototype.setVolume=zn.prototype.setVolume;zn.prototype.getVolume=zn.prototype.getVolume;
|
|
610
|
-
zn.prototype.play=zn.prototype.play;zn.prototype.pause=zn.prototype.pause;zn.prototype.skip=zn.prototype.skip;zn.prototype.canSkipNow=zn.prototype.canSkipNow;zn.prototype.getTimeUntilSkippable=zn.prototype.getTimeUntilSkippable;zn.prototype.isSkippable=zn.prototype.isSkippable;zn.prototype.isPaused=zn.prototype.isPaused;zn.prototype.getRemainingTime=zn.prototype.getRemainingTime;zn.prototype.getMinSuggestedDuration=zn.prototype.getMinSuggestedDuration;zn.prototype.getDuration=zn.prototype.getDuration;function An(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 Af;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.6.
|
|
610
|
+
zn.prototype.play=zn.prototype.play;zn.prototype.pause=zn.prototype.pause;zn.prototype.skip=zn.prototype.skip;zn.prototype.canSkipNow=zn.prototype.canSkipNow;zn.prototype.getTimeUntilSkippable=zn.prototype.getTimeUntilSkippable;zn.prototype.isSkippable=zn.prototype.isSkippable;zn.prototype.isPaused=zn.prototype.isPaused;zn.prototype.getRemainingTime=zn.prototype.getRemainingTime;zn.prototype.getMinSuggestedDuration=zn.prototype.getMinSuggestedDuration;zn.prototype.getDuration=zn.prototype.getDuration;function An(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 Af;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.6.14");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
611
611
|
function(g){Bn(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Cn(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.ka(this.i,"play",function(){f.D=!0})}An.prototype.configure=function(a){this.G=a};An.prototype.stop=function(){this.g&&this.g.stop();this.s&&Wk(this.s)};An.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
612
612
|
function Cn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new O("ad-error",b));Dn(a,null);a.m(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
613
613
|
function Bn(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",
|
|
@@ -625,7 +625,7 @@ p.isLinear=function(){return this.l};p.resize=function(){};p.setMuted=function(a
|
|
|
625
625
|
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};M("shaka.ads.MediaTailorAd",Hn);Hn.prototype.release=Hn.prototype.release;Hn.prototype.getPodIndex=Hn.prototype.getPodIndex;Hn.prototype.getTimeOffset=Hn.prototype.getTimeOffset;Hn.prototype.getMediaUrl=Hn.prototype.getMediaUrl;Hn.prototype.getAdvertiserName=Hn.prototype.getAdvertiserName;
|
|
626
626
|
Hn.prototype.getCreativeAdId=Hn.prototype.getCreativeAdId;Hn.prototype.getAdId=Hn.prototype.getAdId;Hn.prototype.getVastMediaWidth=Hn.prototype.getVastMediaWidth;Hn.prototype.getVastMediaHeight=Hn.prototype.getVastMediaHeight;Hn.prototype.getVastMediaBitrate=Hn.prototype.getVastMediaBitrate;Hn.prototype.getDescription=Hn.prototype.getDescription;Hn.prototype.getTitle=Hn.prototype.getTitle;Hn.prototype.getPositionInSequence=Hn.prototype.getPositionInSequence;Hn.prototype.getSequenceLength=Hn.prototype.getSequenceLength;
|
|
627
627
|
Hn.prototype.setMuted=Hn.prototype.setMuted;Hn.prototype.resize=Hn.prototype.resize;Hn.prototype.isLinear=Hn.prototype.isLinear;Hn.prototype.isMuted=Hn.prototype.isMuted;Hn.prototype.setVolume=Hn.prototype.setVolume;Hn.prototype.getVolume=Hn.prototype.getVolume;Hn.prototype.play=Hn.prototype.play;Hn.prototype.pause=Hn.prototype.pause;Hn.prototype.skip=Hn.prototype.skip;Hn.prototype.canSkipNow=Hn.prototype.canSkipNow;Hn.prototype.getTimeUntilSkippable=Hn.prototype.getTimeUntilSkippable;
|
|
628
|
-
Hn.prototype.isSkippable=Hn.prototype.isSkippable;Hn.prototype.isPaused=Hn.prototype.isPaused;Hn.prototype.getRemainingTime=Hn.prototype.getRemainingTime;Hn.prototype.getMinSuggestedDuration=Hn.prototype.getMinSuggestedDuration;Hn.prototype.getDuration=Hn.prototype.getDuration;function In(a,b,c,d){this.D=a;this.K=b;this.g=c;this.l=null;this.V=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.P="";this.U=!0;this.I="";this.s=new Af}In.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.
|
|
628
|
+
Hn.prototype.isSkippable=Hn.prototype.isSkippable;Hn.prototype.isPaused=Hn.prototype.isPaused;Hn.prototype.getRemainingTime=Hn.prototype.getRemainingTime;Hn.prototype.getMinSuggestedDuration=Hn.prototype.getMinSuggestedDuration;Hn.prototype.getDuration=Hn.prototype.getDuration;function In(a,b,c,d){this.D=a;this.K=b;this.g=c;this.l=null;this.V=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.P="";this.U=!0;this.I="";this.s=new Af}In.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.dc(b.target,b.type,b.listener);Jn(this);this.m=[];this.u=[];this.P="";this.U=!0;this.I="";this.C=null;this.j=[];this.M=[];this.H.clear()};
|
|
629
629
|
In.prototype.release=function(){this.stop();this.s&&this.s.release()};In.prototype.onManifestUpdated=function(a){this.J=a;""!=this.P&&(Kn(this,this.P,this.U),this.U=!1)};In.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};
|
|
630
630
|
function Ln(a,b,c){var d,e,f,g,h,k,l,m,n,q,r;K(function(u){if(1==u.g)return d=qf([b],Ye()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Of(e)),f=a.K.request(7,d),ta(u,2),D(u,f.promise,4);if(2!=u.g){g=u.h;h=Kf(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new gb(b),m=new gb(k.trackingUrl),a.P=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.V,a.i(new O("ads-loaded",(new Map).set("loadTime",q))),r=new gb(k.manifestUrl),a.l.resolve(l.resolve(r).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
631
631
|
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)})}
|
|
@@ -638,7 +638,7 @@ function Pn(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if
|
|
|
638
638
|
e=a.h.getDuration();0<e&&(0>=d||d>e)&&Jn(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}Jn(a);a.L=e;a.h=new Hn(g,f+1,e.ads.length,!0,a.g);a.G=g;0===f&&Rn(a,"breakStart");Sn(a);break}}}if(!a.h)for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
|
|
639
639
|
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(On(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Jn(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||
|
|
640
640
|
0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.D.appendChild(m)}a.L=e;a.h=new Hn(g,f+1,e.ads.length,!1,a.g);a.G=g;0===f&&Rn(a,"breakStart");Sn(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.C&&a.C>b&&(a.g.currentTime=a.C),a.C=null)}}}
|
|
641
|
-
function Jn(a){if(a.h){for(;a.D.lastChild;)a.D.removeChild(a.D.firstChild);a.J||a.M.push(a.G.adId);Rn(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.s.
|
|
641
|
+
function Jn(a){if(a.h){for(;a.D.lastChild;)a.D.removeChild(a.D.firstChild);a.J||a.M.push(a.G.adId);Rn(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.s.dc(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&Rn(a,"breakEnd");a.h=null;a.G=null;a.L=null}}
|
|
642
642
|
function Sn(a){var b=!1;a.g.paused?b=!0:(Rn(a,"impression"),Rn(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&Rn(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||Rn(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(Rn(a,"impression"),Rn(a,"start"),b=!1):Rn(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){Rn(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target,
|
|
643
643
|
d.type,d.listener)}
|
|
644
644
|
function Rn(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=qf([d],Ye()),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;
|
|
@@ -657,8 +657,8 @@ function Vn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
657
657
|
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);ab.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 yn};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)};
|
|
658
658
|
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 In(a,b,c,function(e){return Wn(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 $e,Ln(d,a,b),d.I=c||"",d.V=Date.now()/1E3,a=d.l);return a};
|
|
659
659
|
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 Un(a,b,this.m,function(d){return Wn(c,d)});this.g.configure(this.l)};
|
|
660
|
-
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)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.6.
|
|
661
|
-
(c.I=!0),c.j=new $e,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)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.6.
|
|
660
|
+
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)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.6.14";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
661
|
+
(c.I=!0),c.j=new $e,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)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.6.14";this.g.g.replaceAdTagParameters(a)};
|
|
662
662
|
p.getServerSideCuePoints=function(){Ae("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)};
|
|
663
663
|
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)};
|
|
664
664
|
function Wn(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)}M("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;
|
|
@@ -681,7 +681,7 @@ p.set=function(a,b,c){this.g[a][b]=c;wo(this,{type:"set",targetName:a,property:b
|
|
|
681
681
|
p.ah=function(a,b){wo(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};p.Ti=function(a,b){var c=Ga.apply(2,arguments),d=new $e,e=this.J.toString();this.J++;this.i[e]=d;try{wo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function ro(a,b){var c=a.K();a.l=new $e;a.C=!0;xo(a,c,b)}function qo(a){var b=po;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
682
682
|
function mo(a){var b=po?"connected"==po.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};oo(a)}a.h=b;a.L=b?po.receiver.friendlyName:"";a.j.Pa()}function oo(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function wo(a,b){b=Xn(b);var c=po;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.Dc(),b;}}var to=.02,so=!1,po=null,vo=null,no=new Set;
|
|
683
683
|
function uo(a){vo?window.__onGCastApiAvailable=vo:delete window.__onGCastApiAvailable;vo=null;if(a)for(var b=t(no),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Ao(a,b,c,d){d=void 0===d?!1:d;ab.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 lo(c,function(){return Bo(e)},function(){return Co(e)},function(f,g){return Do(e,f,g)},function(){return Eo(e)},function(){return Fo(e)},d);Go(this)}pa(Ao,ab);p=Ao.prototype;
|
|
684
|
-
p.destroy=function(a){a&&this.g.Dc();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;ab.prototype.release.call(this);return Promise.all(a)};p.
|
|
684
|
+
p.destroy=function(a){a&&this.g.Dc();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;ab.prototype.release.call(this);return Promise.all(a)};p.bc=function(){return this.l};p.Gc=function(){return this.u};p.$e=function(){return this.g.m&&so};p.Aa=function(){return this.g.Aa()};p.Ce=function(){return this.g.Ce()};
|
|
685
685
|
p.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Fo(a),D(c,a.g.cast(b),2)):a.h?D(c,a.h.Sc(),0):c.return()})};p.eg=function(a){this.g.eg(a)};p.lh=function(){zo(this.g)};p.Dc=function(){this.g.Dc()};
|
|
686
686
|
p.Cg=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.Dc();return D(d,c.g.destroy(),2)}c.g=null;c.g=new lo(a,function(){return Bo(c)},function(){return Co(c)},function(e,f){return Do(c,e,f)},function(){return Eo(c)},function(){return Fo(c)},b);c.g.init();F(d)})};
|
|
687
687
|
function Go(a){a.g.init();a.m=new Af;for(var b=t($n),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Aa()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Pa)a.m.o(a.h,Pa[d],function(f){a.g.Aa()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Wc=e,Object.defineProperty(a.l,b.Wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ho(a,f.Wc)}}(b),set:function(f){return function(g){var h=f.Wc;a.g.Aa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Wc:b.Wc};a.u={};Io(a,
|
|
@@ -695,7 +695,7 @@ function Ho(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addE
|
|
|
695
695
|
function Jo(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.Xb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Yd()};
|
|
696
696
|
if("setVideoContainer"==b)return function(c){return a.h.lg(c)};if(a.g.Aa()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Aa()&&0==Object.keys(a.g.g.video).length&&(eo[b]||fo[b])||!a.g.Aa()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
697
697
|
function Do(a,b,c){a.g.Aa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}M("shaka.cast.CastProxy",Ao);Ao.prototype.changeReceiverId=Ao.prototype.Cg;Ao.prototype.forceDisconnect=Ao.prototype.Dc;Ao.prototype.suggestDisconnect=Ao.prototype.lh;Ao.prototype.setAppData=Ao.prototype.eg;Ao.prototype.cast=Ao.prototype.cast;Ao.prototype.receiverName=Ao.prototype.Ce;Ao.prototype.isCasting=Ao.prototype.Aa;Ao.prototype.canCast=Ao.prototype.$e;Ao.prototype.getPlayer=Ao.prototype.Gc;
|
|
698
|
-
Ao.prototype.getVideo=Ao.prototype.
|
|
698
|
+
Ao.prototype.getVideo=Ao.prototype.bc;Ao.prototype.destroy=Ao.prototype.destroy;function Lo(a,b,c,d){ab.call(this);var e=this;this.g=a;this.h=b;this.j=new Af;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 vd(function(){Mo(e)});No(this)}pa(Lo,ab);p=Lo.prototype;p.isConnected=function(){return this.H};p.wi=function(){return this.s};p.fj=function(a){this.i=a};p.Dh=function(){this.i=null};
|
|
699
699
|
p.gj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.ej=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.dj=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
700
700
|
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,ab.prototype.release.call(a),D(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
701
701
|
function No(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Oo(a)};b.onSenderDisconnected=function(){return Oo(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Po(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Po(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 Qo(a,
|
|
@@ -771,23 +771,22 @@ function Wq(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,y,z,x,A,B,C;return K(function(E
|
|
|
771
771
|
H=G.g.byteOffset;G=new Iq(G.g);for(var I=null;G.wa();){var J=Jq(G);if(357149030==J.id){I=J;break}}if(!I)throw new P(2,3,3010);I=new Iq(I.g);J=1E6;for(G=null;I.wa();){var L=Jq(I);if(2807729==L.id)J=Nq(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new P(2,3,3003);}if(null==G)throw new P(2,3,3011);I=J/1E9;G*=I;J=Jq(new Iq(y));if(475249515!=J.id)throw new P(2,3,3007);H=Oq(J,H,I,G,d,c,A,B,C)}x=H;h.yd(x);r=new Fj(x);k&&r.Cc(B,C,
|
|
772
772
|
!0);return E.return(r)})}function Tq(a){return a.Gd}function Vq(a){var b=Cq(a,Tq,"RepresentationIndex");a=Bq(a,Tq,"indexRange");a=yg(a||"");b&&(a=vg(b,"range",yg,a));return a}function Uq(a,b){Xq(a,b);if(!Vq(a))throw new P(2,4,4002);}function Xq(a,b){var c=a.O.mimeType.split("/")[1];if(a.O.contentType!=Jb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
|
|
773
773
|
function Rq(a){var b=a.O;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.xe,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Yq(a,b,c){var d=Qq(a,Zq,c),e=$q(a);if(!e.Oa&&!e.timeline&&1<e.Nc.length)throw new P(2,4,4002);if(!e.Oa&&!a.ia.duration&&!e.timeline&&1==e.Nc.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.Ia.id&&a.O.id&&(g=b[a.Ia.id+","+a.O.id])&&(f=g.segmentIndex);var h=ar(a.ia.start,a.ia.duration,a.O.xb,e,d,c);b=!f;f?f.xd(h,a.presentationTimeline.yb()):f=new Fj(h);a.presentationTimeline.yd(h);a.Vb&&a.ia.Ef||f.Cc(a.ia.start,a.ia.duration?a.ia.start+
|
|
774
|
-
a.ia.duration:Infinity,b);g&&(g.segmentIndex=f);return{Ec:function(){f&&0!=f.
|
|
774
|
+
a.ia.duration:Infinity,b);g&&(g.segmentIndex=f);return{Ec:function(){f&&0!=f.Yb()||f.se(h);return Promise.resolve(f)}}}function Zq(a){return a.cc}function $q(a){var b=br(a);a=Aq(a,Zq);var c=a.Id;0==c&&(c=1);var d=0;a.Oa?d=a.Oa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Oa:a.Oa,startTime:d,Id:c,Pb:a.Pb,timeline:a.timeline,Nc:b}}
|
|
775
775
|
function ar(a,b,c,d,e,f){var g=d.Nc.length;d.timeline&&d.timeline.length!=d.Nc.length&&(g=Math.min(d.timeline.length,d.Nc.length));for(var h=a-d.Pb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},q=0;q<g;n={fd:n.fd,bd:n.bd},q++){n.bd=d.Nc[q];var r=void 0;r=null!=d.Oa?m+d.Oa:d.timeline?d.timeline[q].end:m+b;n.fd=null;l.push(new Fh(a+m,a+r,function(u){return function(){null==u.fd&&(u.fd=Cb(c(),[u.bd.Ji]));return u.fd}}(n),n.bd.start,n.bd.end,e,h,a,k,[],"",null,null,Gh,f));m=r}return l}
|
|
776
|
-
function br(a){return[a.O.
|
|
777
|
-
Infinity,r=!(a.Vb&&a.ia.Ef);m?(c=m,hr(c,k,n,q,r,h),c.wb(a.presentationTimeline.yb())):m=new ir(k,a.O.id,a.bandwidth,a.O.xb,n,q,h,r,g,a.O.ag);k.timeline&&"image"!==a.Ca.contentType&&a.presentationTimeline.Yg(k.timeline,n);d&&a.Vb&&(d.segmentIndex=m);return{Ec:function(){m instanceof ir&&0==m.
|
|
776
|
+
function br(a){return[a.O.cc,a.Ca.cc,a.Ia.cc].filter(td).map(function(b){return ng(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Qg&&(a.Qg=!0);var c=b.getAttribute("media");b=vg(b,"mediaRange",yg,{start:0,end:null});return{Ji:c,start:b.start,end:b.end}})};function cr(a,b,c,d,e,f,g){var h=dr(a,g),k=er(a);fr(k);var l=jf(a);if(k.ud)return Xq(a,h),{Ec:function(){var u=zq(k.ud,l.O.id,null,null,l.bandwidth||null,null);u=Cb(l.O.xb(),[u]);return Wq(l,b,h,u,0,null,k.Pb)}};if(k.Oa)return d||"image"===a.Ca.contentType||(a.presentationTimeline.Pf(k.Oa),a.presentationTimeline.we(a.ia.start)),{Ec:function(){return gr(l,k,e,h,f,g)}};var m=null;d=d=null;a.Ia.id&&a.O.id&&(d=a.Ia.id+","+a.O.id,d=c[d])&&(m=d.segmentIndex);var n=a.ia.start,q=a.ia.duration?n+a.ia.duration:
|
|
777
|
+
Infinity,r=!(a.Vb&&a.ia.Ef);m?(c=m,hr(c,k,n,q,r,h),c.wb(a.presentationTimeline.yb())):m=new ir(k,a.O.id,a.bandwidth,a.O.xb,n,q,h,r,g,a.O.ag);k.timeline&&"image"!==a.Ca.contentType&&a.presentationTimeline.Yg(k.timeline,n);d&&a.Vb&&(d.segmentIndex=m);return{Ec:function(){m instanceof ir&&0==m.Yb()&&hr(m,k,n,q,r,h);return Promise.resolve(m)}}}function jr(a){return a.Hd}
|
|
778
778
|
function er(a){var b=Aq(a,jr),c=Bq(a,jr,"media");a=Bq(a,jr,"index");return{Oa:b.Oa,timescale:b.timescale,Id:b.Id,Pb:b.Pb,sg:b.sg,timeline:b.timeline,Oc:c,ud:a}}function fr(a){var b=a.ud?1:0;b+=a.timeline?1:0;b+=a.Oa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.ud&&(a.timeline=null),a.Oa=null);if(!a.ud&&!a.Oc)throw new P(2,4,4002);}
|
|
779
|
-
function gr(a,b,c,d,e,f){function g(J){var L=(J-u)*r,N=L+b.Pb,R=L+m;L=R+r;var T=Math.min(L,k());R=new Fh(R,T,function(){var ea=N*v;"BigInt"in window&&ea>Number.MAX_SAFE_INTEGER&&(ea=BigInt(N)*BigInt(v));ea=zq(y,x,J,null,z,ea);return Cb(A(),[ea])},0,null,d,B,m,k(),[],"",null,null,Gh,f);R.i=L;return R}function h(){var J=[Math.max(l.yb(),m),Math.min(l.
|
|
780
|
-
return J?m+J:Infinity}var l=a.presentationTimeline,m=a.ia.start,n=a.Ia.id,q=a.ia.duration,r=b.Oa,u=b.Id,v=b.timescale,y=b.Oc,z=a.bandwidth||null,x=a.O.id,A=a.O.xb,B=m-b.Pb,C=h();a=a.Vb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++E){var H=g(E);c.push(H)}var G=new Fj(c);c=l.
|
|
781
|
-
function dr(a,b){var c=Bq(a,jr,"initialization");if(!c)return null;var d=a.O.id,e=a.bandwidth||null,f=a.O.xb;return new Dh(function(){var g=zq(c,d,null,null,e,null);return Cb(f(),[g])},0,null,Rq(a),null,null,b)}function ir(a,b,c,d,e,f,g,h,k,l){Fj.call(this,[]);this.h=a;this.H=b;this.D=c;this.G=d;this.i=e;this.
|
|
782
|
-
p.wb=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.
|
|
783
|
-
function kr(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.
|
|
784
|
-
p.
|
|
785
|
-
|
|
786
|
-
0==this.I?0<m&&n.qe():0!=m%this.I&&n.qe();h.push(n)}c=new Fh(this.i+e.start,this.i+e.end,function(){return 0<e.zb?[]:lr(d,b.H,f,b.D,g,null,b.G)},0,null,this.u,c,this.i,this.m,h,"",null,null,Gh,this.C,0<e.zb);this.g[a]=c}return c};function lr(a,b,c,d,e,f,g){a=zq(a,b,c,f,d||null,e);return Cb(g(),[a]).map(function(h){return h.toString()})};function mr(a){this.s=null;this.C=a;this.I=new kf;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"}mr.prototype.configure=function(a){this.s=a};mr.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()};mr.prototype.setManifestType=function(a){this.u=a};
|
|
779
|
+
function gr(a,b,c,d,e,f){function g(J){var L=(J-u)*r,N=L+b.Pb,R=L+m;L=R+r;var T=Math.min(L,k());R=new Fh(R,T,function(){var ea=N*v;"BigInt"in window&&ea>Number.MAX_SAFE_INTEGER&&(ea=BigInt(N)*BigInt(v));ea=zq(y,x,J,null,z,ea);return Cb(A(),[ea])},0,null,d,B,m,k(),[],"",null,null,Gh,f);R.i=L;return R}function h(){var J=[Math.max(l.yb(),m),Math.min(l.Zb(),k())].map(function(L){return L-m});return[Math.ceil(J[0]/r),Math.ceil(J[1]/r)-1].map(function(L){return L+u})}function k(){var J=null!=n&&e[n]||q;
|
|
780
|
+
return J?m+J:Infinity}var l=a.presentationTimeline,m=a.ia.start,n=a.Ia.id,q=a.ia.duration,r=b.Oa,u=b.Id,v=b.timescale,y=b.Oc,z=a.bandwidth||null,x=a.O.id,A=a.O.xb,B=m-b.Pb,C=h();a=a.Vb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++E){var H=g(E);c.push(H)}var G=new Fj(c);c=l.Zb()<k();E=l.R();if(c||E){var I=Math.max(a,C+1);G.Je(r,function(){var J=l.yb();G.wb(J);var L=t(h());L.next();L=L.next().value;for(var N=[];I<=L;){var R=g(I);N.push(R);I++}return J>k()&&!N.length?null:N})}return Promise.resolve(G)}
|
|
781
|
+
function dr(a,b){var c=Bq(a,jr,"initialization");if(!c)return null;var d=a.O.id,e=a.bandwidth||null,f=a.O.xb;return new Dh(function(){var g=zq(c,d,null,null,e,null);return Cb(f(),[g])},0,null,Rq(a),null,null,b)}function ir(a,b,c,d,e,f,g,h,k,l){Fj.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&&kr(this)}pa(ir,Fj);p=ir.prototype;p.Yb=function(){return this.h?this.h.timeline.length:0};p.release=function(){Fj.prototype.release.call(this);this.h=null};
|
|
782
|
+
p.wb=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.Yb()&&this.release())}};function hr(a,b,c,d,e,f){a.u=f;if(a.h){c=a.h.timeline;a.h.Oc=b.Oc;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&&kr(a)}
|
|
783
|
+
function kr(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.wb(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};
|
|
784
|
+
p.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Yb()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Oc,e=this.h.timeline[a],f=e.bj,g=this.h.sg+e.ug;c=this.i-this.h.Pb;var h=this.i+e.end,k=h;a===this.Yb()-1&&Infinity!==this.l&&(k=this.l);for(var l=[],m=(e.end-e.start)/e.zb,n={},q=0;q<e.zb;n={gd:n.gd,Te:n.Te},q++){var r=e.start+m*q,u=r+m;n.Te=q+1;n.gd=null;r=new Fh(this.i+r,this.i+u,function(v){return function(){if(!b.h)return[];null==v.gd&&(v.gd=lr(b.h.Oc,b.H,f,b.D,g,v.Te,b.G));return v.gd}}(n),
|
|
785
|
+
0,null,this.u,c,this.i,this.l,[],"",null,null,Gh,this.C);0==this.I?0<q&&r.qe():0!=q%this.I&&r.qe();l.push(r)}c=new Fh(this.i+e.start,k,function(){return 0<e.zb?[]:lr(d,b.H,f,b.D,g,null,b.G)},0,null,this.u,c,this.i,this.l,l,"",null,null,Gh,this.C,0<e.zb);c.i=h;this.g[a]=c}return c};function lr(a,b,c,d,e,f,g){a=zq(a,b,c,f,d||null,e);return Cb(g(),[a]).map(function(h){return h.toString()})};function mr(a){this.s=null;this.C=a;this.I=new kf;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"}mr.prototype.configure=function(a){this.s=a};mr.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()};mr.prototype.setManifestType=function(a){this.u=a};
|
|
787
786
|
function nr(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=Cb(a.j,[or(a,b)]),d=qf(c,a.s.retryParameters),e=a.C.networkingEngine.request(8,d),lf(a.I,e),ta(l,2),D(l,e.promise,4);if(2!=l.g)return f=l.h,g=Kf(f.data),h=JSON.parse(g),1==h.VERSION&&pr(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 vd(function(){nr(a,b)});a.g.T(a.G);F(l)})}
|
|
788
787
|
function or(a,b){if(!a.m.length)return b;b=new gb(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)));Ab(e)&&ob(b,e);return b.toString()}function pr(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new vd(function(){nr(a,d)});if(c=b.TTL)a.G=c;a.g.T(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
789
788
|
function qr(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
|
|
790
|
-
function rr(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={
|
|
789
|
+
function rr(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={hc:d.hc},f=e.next())if(d.hc=f.value,f=b.get(d.hc))c.push({Vf:d.hc,location:f});else if(f=a.H.find(function(h){return function(k){return k.Bj==h.hc}}(d))){var g=b.get(f["BASE-ID"]);g&&(f["URI-REPLACEMENT"].qh?(g=new gb(g),kb(g,f["URI-REPLACEMENT"].qh),c.push({Vf:d.hc,location:g.toString()})):c.push({Vf:d.hc,location:g}))}d=Date.now();e=t(a.i.keys());for(f=e.next();!f.done;f=e.next())f=f.value,g=a.i.get(f),d>g&&
|
|
791
790
|
a.i.delete(f);c=c.filter(function(h){for(var k=t(a.i.keys()),l=k.next();!l.done;l=k.next())if(l.value.includes((new gb(h.location)).Ib))return!1;return!0});c.length&&(a.D=c[0].Vf);c=c.map(function(h){return h.location});if(!c.length&&a.h)for(d=t(a.h.split(",")),f=d.next();!f.done;f=d.next())if(e=b.get(f.value))a.D=a.h,c.push(e);if(!c.length)for(b=t(b.values()),d=b.next();!d.done;d=b.next())c.push(d.value);return Cb(a.j,c)};function sr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=new Set}p=sr.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.mi=function(){return this.j};p.Bf=function(){return this.l.slice()};p.Vh=function(){return this.i};
|
|
792
791
|
p.Dg=function(a,b){var c,d,e,f,g=this,h,k,l,m,n,q,r,u,v,y,z,x,A,B,C,E,H,G,I,J,L,N,R,T,ea,Z,fa,Ha,Xa,Gb;return K(function(lb){if(1==lb.g){h=Kb;tr(a);if(!b&&1==a.length)return k=a[0],g.h=k.audioStreams,g.g=k.videoStreams,g.l=k.textStreams,g.i=k.imageStreams,lb.F(2);l=-1;for(m=0;m<a.length;m++)n=a[m],g.m.has(n.id)||(g.m.add(n.id),-1==l&&(l=m));if(-1==l)return lb.return();for(var bc=[],za=[],mb=[],hb=[],Hb=t(a),ib=Hb.next();!ib.done;ib=Hb.next())ib=ib.value,bc.push(ib.audioStreams),za.push(ib.videoStreams),
|
|
793
792
|
mb.push(ib.textStreams),hb.push(ib.imageStreams);c=bc;d=za;e=mb;f=hb;q=c;r=d;u=e;v=f;y=t(u);for(z=y.next();!z.done;z=y.next())x=z.value,x.push(ur(h.za));A=t(v);for(B=A.next();!B.done;B=A.next())C=B.value,C.push(ur(h.jd));return D(lb,Promise.all([vr(g.h,q,l,wr,xr),vr(g.g,r,l,wr,xr),vr(g.l,u,l,wr,xr),vr(g.i,v,l,wr,xr)]),2)}E=0;H=[];if(g.g.length&&g.h.length)for(R=t(g.h),T=R.next();!T.done;T=R.next())for(ea=T.value,Z=t(g.g),fa=Z.next();!fa.done;fa=Z.next())Ha=fa.value,Xa=uh(ea.drmInfos,Ha.drmInfos),
|
|
@@ -810,25 +809,25 @@ function xr(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSche
|
|
|
810
809
|
function Cr(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(w(a.keyIds),w(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,w(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
|
|
811
810
|
function Fr(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Ir,video:Ir,text:Jr,image:Kr}[e.type],g={audio:Lr,video:Mr,text:Nr,image:Or}[e.type],h=null;d=t(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}
|
|
812
811
|
function Ir(a,b){function c(d){if(!Pr.has(d)){var e=fd(d);Pr.set(d,e)}return Pr.get(d)}return b.mimeType!=a.mimeType||c(b.codecs)!=c(a.codecs)||a.drmInfos&&!th(a.drmInfos,b.drmInfos)?!1:!0}function Jr(a,b){return a.language?b.language?a.forced!==b.forced||0==Tb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Kr(a){return a.tilesLayout?!0:!1}
|
|
813
|
-
function Lr(a,b,c){if(a.id==c.id)return!0;var d=Tb(a.language,b.language),e=Tb(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;if(c.roles.length&&!b.roles.length)return!1;
|
|
814
|
-
d=Qr(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Rr)return!0;if(d==Sr)return!1;d=Qr(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Rr?!0:d==Sr?!1:a.bandwidth&&Tr(a.bandwidth,b.bandwidth,c.bandwidth)==Rr?!0:!1}
|
|
812
|
+
function Lr(a,b,c){if(a.id==c.id)return!0;var d=Tb(a.language,b.language),e=Tb(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;if(c.roles.length&&!b.roles.length)return!1;
|
|
813
|
+
if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Qr(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Rr)return!0;if(d==Sr)return!1;d=Qr(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Rr?!0:d==Sr?!1:a.bandwidth&&Tr(a.bandwidth,b.bandwidth,c.bandwidth)==Rr?!0:!1}
|
|
815
814
|
function Mr(a,b,c){if(a.id==c.id)return!0;var d=Qr(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Rr)return!0;if(d==Sr)return!1;if(a.frameRate){d=Qr(a.frameRate,b.frameRate,c.frameRate);if(d==Rr)return!0;if(d==Sr)return!1}return a.bandwidth&&Tr(a.bandwidth,b.bandwidth,c.bandwidth)==Rr?!0:!1}
|
|
816
|
-
function Nr(a,b,c){if(a.id==c.id)return!0;var d=Tb(a.language,b.language),e=Tb(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&&
|
|
817
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Or(a,b,c){return a.id==c.id?!0:Qr(a.width*a.height,b.width*b.height,c.width*c.height)==Rr?!0:!1}
|
|
815
|
+
function Nr(a,b,c){if(a.id==c.id)return!0;var d=Tb(a.language,b.language),e=Tb(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&&
|
|
816
|
+
b.roles.length)return!0;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 Or(a,b,c){return a.id==c.id?!0:Qr(a.width*a.height,b.width*b.height,c.width*c.height)==Rr?!0:!1}
|
|
818
817
|
function Ar(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}}
|
|
819
818
|
function ur(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fj([]),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}}
|
|
820
819
|
function Qr(a,b,c){if(b==a&&a!=c)return Sr;if(c==a&&a!=b)return Rr;if(b>a){if(c<=a||c-a<b-a)return Rr;if(c-a>b-a)return Sr}else{if(c>a)return Sr;if(a-c<a-b)return Rr;if(a-c>a-b)return Sr}return Ur}function Tr(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Rr:b<a?Sr:Ur}M("shaka.util.PeriodCombiner",sr);sr.prototype.combinePeriods=sr.prototype.Dg;sr.prototype.getImageStreams=sr.prototype.Vh;sr.prototype.getTextStreams=sr.prototype.Bf;sr.prototype.getVariants=sr.prototype.mi;
|
|
821
820
|
var Rr=1,Ur=0,Sr=-1,Pr=new Map;function Vr(){var a=this;this.i=this.g=null;this.s=[];this.j=null;this.K=1;this.m={};this.M={};this.l=new sr;this.H=0;this.J=new $b(5);this.I=new vd(function(){Wr(a)});this.G=new kf;this.C=null;this.L=[];this.D=Infinity;this.u=!1;this.h=null}p=Vr.prototype;p.configure=function(a){this.g=a;this.h&&this.h.configure(this.g)};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,Xr(c),2);d=e.h;c.i&&Yr(c,d);if(!c.i)throw new P(2,7,7001);return e.return(c.j)})};
|
|
822
821
|
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.g=this.i=null;this.s=[];this.j=null;this.m={};this.l=null;null!=this.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();return this.G.destroy()};p.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),D(c,Xr(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)})};
|
|
823
|
-
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.
|
|
822
|
+
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.Zb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Yr(this,0))}}};p.banLocation=function(a){this.h&&this.h.i.set(a,Date.now()+6E4)};
|
|
824
823
|
function Xr(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return b=qf(a.s,a.g.retryParameters),c=Date.now(),D(g,Zr(a,b,0,{type:4}),2);if(3!=g.g){d=g.h;if(!a.i)return g.return(0);d.uri&&d.uri!=d.originalUri&&!a.s.includes(d.uri)&&a.s.unshift(d.uri);return D(g,$r(a,d.data,d.uri),3)}e=Date.now();f=(e-c)/1E3;a.J.sample(1,f);return g.return(f)})}
|
|
825
824
|
function $r(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Hg(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(as(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Fq(d,a.g.retryParameters,f,c,a.i.networkingEngine);lf(a.G,g);return D(k,g.promise,2)}h=k.h;return k.return(as(a,h,c))})}
|
|
826
|
-
function as(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B,C,E,H,G,I,J,L,N,R,T,ea,Z,fa,Ha,Xa,Gb,lb,bc,za,mb,hb,Hb,ib,Wh,Md,
|
|
825
|
+
function as(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B,C,E,H,G,I,J,L,N,R,T,ea,Z,fa,Ha,Xa,Gb,lb,bc,za,mb,hb,Hb,ib,Wh,Md,Ne,Oe;return K(function(sb){switch(sb.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=ng(b,"Location").map(tg).filter(td);0<f.length&&(g=Cb(e,f),e=a.s=g);h=Promise.resolve();if((k=mg(b,"ContentSteering"))&&a.i)if(l=k.getAttribute("defaultServiceLocation"),a.h)a.h.j=e,a.h.h=l;else if(a.h=new mr(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.j=e,a.h.h=l,m=tg(k))(n=
|
|
827
826
|
vg(k,"queryBeforeStart",Dg,!1))?h=nr(a.h,m):nr(a.h,m);q=ng(b,"BaseURL");u=!1;if(a.h)for(a.h.l.clear(),v=t(q),y=v.next();!y.done;y=v.next())z=y.value,x=z.getAttribute("serviceLocation"),A=tg(z),x&&A&&(qr(a.h,"BaseURL",x,A),u=!0);u&&a.h||(B=q.map(tg),r=Cb(e,B));C=function(){return a.h&&u?rr(a.h,"BaseURL"):r?r:[]};E=0;q&&q.length&&(E=vg(q[0],"availabilityTimeOffset",Cg)||0);H=a.g.dash.ignoreMinBufferTime;G=0;H||(G=vg(b,"minBufferTime",xg)||0);a.H=vg(b,"minimumUpdatePeriod",xg,-1);I=vg(b,"availabilityStartTime",
|
|
828
827
|
wg);J=vg(b,"timeShiftBufferDepth",xg);L=a.g.dash.ignoreSuggestedPresentationDelay;N=null;L||(N=vg(b,"suggestedPresentationDelay",xg));R=a.g.dash.ignoreMaxSegmentDuration;T=null;R||(T=vg(b,"maxSegmentDuration",xg));ea=b.getAttribute("type")||"static";if(a.j)for(Z=a.j.presentationTimeline,fa=t(Object.values(a.m)),Ha=fa.next();!Ha.done;Ha=fa.next())Xa=Ha.value,Xa.segmentIndex&&Xa.segmentIndex.wb(Z.yb());else Gb=a.g.defaultPresentationDelay||1.5*G,lb=null!=N?N:Gb,Z=new jj(I,lb,a.g.dash.autoCorrectDrift);
|
|
829
828
|
Z.Rc("static"==ea);(bc=Z.R())&&!isNaN(a.g.availabilityWindowOverride)&&(J=a.g.availabilityWindowOverride);null==J&&(J=Infinity);Z.Ge(J);za=b.getAttribute("profiles")||"";mb={Vb:"static"!=ea,presentationTimeline:Z,Ia:null,ia:null,Ca:null,O:null,bandwidth:0,Qg:!1,Bc:E,profiles:za.split(",")};hb=bs(a,mb,C,b);Hb=hb.duration;ib=hb.periods;"static"!=ea&&hb.Ig||Z.fb(Hb||Infinity);a.D&&!a.u&&(Wh=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.u=a.i.isLowLatencyMode());a.u?Z.dh(a.D):a.D&&Sa("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.");
|
|
830
|
-
Z.Pf(T||1);return D(sb,a.l.Dg(ib,mb.Vb),2);case 2:return D(sb,h,3);case 3:a.u&&(G=0);if(a.j){a.j.variants=a.l.j;Md=a.l.Bf();0<Md.length&&(a.j.textStreams=Md);a.j.imageStreams=a.l.i;a.i.filter(a.j);sb.F(4);break}a.j={presentationTimeline:Z,variants:a.l.j,textStreams:a.l.Bf(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:G||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:cs(b)};if(!Z.nh()){sb.F(5);break}
|
|
831
|
-
ds(a,C,
|
|
829
|
+
Z.Pf(T||1);return D(sb,a.l.Dg(ib,mb.Vb),2);case 2:return D(sb,h,3);case 3:a.u&&(G=0);if(a.j){a.j.variants=a.l.j;Md=a.l.Bf();0<Md.length&&(a.j.textStreams=Md);a.j.imageStreams=a.l.i;a.i.filter(a.j);sb.F(4);break}a.j={presentationTimeline:Z,variants:a.l.j,textStreams:a.l.Bf(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:G||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:cs(b)};if(!Z.nh()){sb.F(5);break}Ne=ng(b,"UTCTiming");return D(sb,
|
|
830
|
+
ds(a,C,Ne),6);case 6:Oe=sb.h;if(!a.i)return sb.return();Z.eh(Oe);case 5:Z.oe();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),F(sb)}})}
|
|
832
831
|
function cs(a){a=mg(a,"ServiceDescription");if(!a)return null;var b=mg(a,"Latency"),c=mg(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}
|
|
833
832
|
function bs(a,b,c,d){var e=vg(d,"mediaPresentationDuration",xg),f=[],g=0;d=ng(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=vg(k,"start",xg,g),n=k.id,q=vg(k,"duration",xg),r=null;if(l){var u=vg(l,"start",xg);null!=u&&(r=u-m)}else null!=e&&(r=e-m);null==r&&(r=q);if(!(null!==a.C&&null!==n&&null!==m&&m<a.C)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.C||m>a.C)&&(a.C=m);g=es(a,b,c,{start:m,duration:r,node:k,Ef:null==r||!l});f.push(g);b.Ia.id&&r&&(a.M[b.Ia.id]=r);if(null==r){g=
|
|
834
833
|
null;break}g=m+r}}a.L=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Ig:!1}:{periods:f,duration:g,Ig:!0}}
|
|
@@ -843,7 +842,7 @@ u?y="visually impaired":"2"==u&&(y="hard of hearing"));if(l)return null;l=ng(c,"
|
|
|
843
842
|
k||f)return null;throw new P(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=ks(c[0].mimeType,c[0].codecs),k=t(c),r=k.next();!r.done;r=k.next())r.value.type=b.Ca.contentType;k=b.Ca.id||"__fake__"+a.K++;m=t(c);for(r=m.next();!r.done;r=m.next()){r=r.value;u=t(C.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&r.keyIds?new Set([].concat(w(z.keyIds),w(r.keyIds))):z.keyIds||r.keyIds;a.g.dash.enableAudioGroups&&(r.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(td);
|
|
844
843
|
return{id:k,contentType:b.Ca.contentType,language:E,ik:e,streams:c,drmInfos:C.drmInfos,qg:f,Vi:l}}
|
|
845
844
|
function js(a,b,c,d,e,f,g,h,k,l,m){b.O=fs(a,l,b.Ca,null);a.D=Math.min(a.D,b.O.Bc);if(!ls(b.O))return null;var n=b.ia.start;b.bandwidth=vg(l,"bandwidth",Ag)||0;var q=b.O.contentType,r=q==Jb||"application"==q;q="image"==q;try{var u=void 0;if(c.Xe){var v=b.O.xb,y=Cb(v(),[c.Xe.Ei]),z=qf(y,a.g.retryParameters);u={method:"AES-128",iv:c.Xe.iv,firstMediaSequenceNumber:0,fetchKey:function(){var I,J,L;return K(function(N){if(1==N.g)return D(N,Zr(a,z,6),2);if(3!=N.g){I=N.h;if(!I.data||16!=I.data.byteLength)throw new P(2,
|
|
846
|
-
4,4049);J={name:"AES-CBC"};L=u;return D(N,window.crypto.subtle.importKey("raw",I.data,J,!0,["decrypt"]),3)}L.cryptoKey=N.h;u.fetchKey=void 0;F(N)})}}}v=function(I,J,L,N){return ms(a,I,J,L,N)};if(b.O.Gd)var x=Sq(b,v,u);else if(b.O.
|
|
845
|
+
4,4049);J={name:"AES-CBC"};L=u;return D(N,window.crypto.subtle.importKey("raw",I.data,J,!0,["decrypt"]),3)}L.cryptoKey=N.h;u.fetchKey=void 0;F(N)})}}}v=function(I,J,L,N){return ms(a,I,J,L,N)};if(b.O.Gd)var x=Sq(b,v,u);else if(b.O.cc)x=Yq(b,a.m,u);else if(b.O.Hd)x=cr(b,v,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.M,u);else{var A=b.ia.duration||0,B=b.O.xb;x={Ec:function(){return Promise.resolve(Ij(n,A,B()))}}}}catch(I){if((r||q)&&4002==I.code)return null;throw I;}v=ng(l,"ContentProtection");v=sq(v,c,
|
|
847
846
|
a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);v=new Set(v?[v]:[]);y=!1;ng(l,"SupplementalProperty").some(function(I){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==I.getAttribute("schemeIdUri")&&"JOC"==I.getAttribute("value")})&&(y=!0);var C=!1;r&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var E;if(q&&((l=ng(l,"EssentialProperty").find(function(I){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(I.getAttribute("schemeIdUri"))}))&&
|
|
848
847
|
(E=l.getAttribute("value")),!E))return null;var H;l=b.O.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(H="PQ");l=b.O.id?b.Ia.id+","+b.O.id:"";var G=l&&a.m[l]?a.m[l]:{id:a.K++,originalId:b.O.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.O.mimeType,
|
|
849
848
|
codecs:b.O.codecs,frameRate:b.O.frameRate,pixelAspectRatio:b.O.pixelAspectRatio,bandwidth:b.bandwidth,width:b.O.width,height:b.O.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.Ca.language,label:f,type:b.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.O.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.O.xe,audioSamplingRate:b.O.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:H,videoLayout:void 0,tilesLayout:E,matchedStreams:[],
|
|
@@ -851,10 +850,10 @@ accessibilityPurpose:m,external:!1,fastSwitching:!1};G.createSegmentIndex=functi
|
|
|
851
850
|
function Wr(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,ta(d,2),D(d,Xr(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Yr(a,b);F(d)}})}function Yr(a,b){0>a.H||a.I.T(Math.max(a.H-b,ac(a.J)))}
|
|
852
851
|
function fs(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,xe:null,audioSamplingRate:null,Bc:0,ag:0};d=d||c.xb;var e=b.getAttribute("id"),f=ng(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.getAttribute("serviceLocation");m=tg(m);l&&m&&(qr(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(tg));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")||
|
|
853
852
|
c.codecs;var n=vg(b,"frameRate",Eg)||c.frameRate,q=b.getAttribute("sar")||c.pixelAspectRatio,r=ns(ng(b,"InbandEventStream"),c.emsgSchemeIdUris),u=ng(b,"AudioChannelConfiguration");u=os(u)||c.xe;var v=vg(b,"audioSamplingRate",Bg)||c.audioSamplingRate;k||(k=ks(l,m));var y=mg(b,"SegmentBase"),z=mg(b,"SegmentTemplate"),x=y?vg(y,"availabilityTimeOffset",Cg)||0:0,A=z?vg(z,"availabilityTimeOffset",Cg)||0:0,B=f&&f.length?vg(f[0],"availabilityTimeOffset",Cg)||0:0;x=c.Bc+B+x+A;A=null;(B=mg(b,"SegmentSequenceProperties"))&&
|
|
854
|
-
(B=mg(B,"SAP"))&&(A=vg(B,"cadence",zg));return{xb:function(){return Cb(d(),f.length?a.h&&h?rr(a.h,e):g?g:[]:[])},Gd:y||c.Gd,
|
|
853
|
+
(B=mg(B,"SAP"))&&(A=vg(B,"cadence",zg));return{xb:function(){return Cb(d(),f.length?a.h&&h?rr(a.h,e):g?g:[]:[])},Gd:y||c.Gd,cc:mg(b,"SegmentList")||c.cc,Hd:z||c.Hd,width:vg(b,"width",Bg)||c.width,height:vg(b,"height",Bg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:r,id:e,language:b.getAttribute("lang"),xe:u,audioSamplingRate:v,Bc:x,ag:A||c.ag}}
|
|
855
854
|
function ns(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}
|
|
856
855
|
function os(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=
|
|
857
|
-
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 ls(a){var b=a.Gd?1:0;b+=a.
|
|
856
|
+
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 ls(a){var b=a.Gd?1:0;b+=a.cc?1:0;b+=a.Hd?1:0;if(0==b)return a.contentType==Jb||"application"==a.contentType?!0:!1;1!=b&&(a.Gd&&(a.cc=null),a.Hd=null);return!0}
|
|
858
857
|
function ps(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=Cb(b(),[c]),f=qf(e,a.g.retryParameters),f.method=d,g=a.i.networkingEngine.request(4,f),lf(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=Kf(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
|
|
859
858
|
function ds(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(q){return{scheme:q.getAttribute("schemeIdUri"),value:q.getAttribute("value")}}),e=a.g.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);
|
|
860
859
|
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":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.F(9);break;case 7:return D(n,ps(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return D(n,ps(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
|
|
@@ -926,7 +925,7 @@ return mb.return({stream:G,type:g,$g:[],aa:d,sc:R,Mb:ea,Wd:Ha,Vd:Xa,sd:!1,gf:-1,
|
|
|
926
925
|
function Wt(a,b,c,d,e,f,g,h,k,l,m,n){var q=Jt(c,b)||Kt(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Jb?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");return{id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
927
926
|
segmentIndex:null,mimeType:q,codecs:b,kind:c==Jb?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Nb(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:r,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}}
|
|
928
927
|
function ht(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=As(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=xs(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=X(g,"KEYFORMAT")||"identity",g=(h=Ot[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,xh:d}}
|
|
929
|
-
function Zt(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Sa("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=gg(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=Ds(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,q,r;return K(function(u){if(1==u.g)return l=Es(d(),xs(b,"URI"),e),m=qf(
|
|
928
|
+
function Zt(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Sa("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=gg(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=Ds(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,q,r;return K(function(u){if(1==u.g)return l=Es(d(),xs(b,"URI"),e),m=qf(l,a.g.retryParameters),
|
|
930
929
|
D(u,Dt(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new P(2,4,4049);q={name:"AES-CBC"};r=k;return D(u,window.crypto.subtle.importKey("raw",n.data,q,!0,["decrypt"]),3)}r.cryptoKey=u.h;k.fetchKey=void 0;F(u)})}};return k}
|
|
931
930
|
function kt(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Cs(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Cs(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Cs(b.g,"EXT-X-PART-INF"))a.M=Number(xs(e,"PART-TARGET"));b=Cs(b.g,"EXT-X-SERVER-CONTROL");a.D&&a.M?(a.m=a.Va?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(xs(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
932
931
|
b.getAttribute("HOLD-BACK"):null,a.ea=c?Number(c.value):0);a.sa=Math.max(d,a.sa)}function zt(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ha)b=a.ha;else if(a.ea)b=a.ea;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.sa*c}a.l.ig(0);a.l.fh(b);a.l.Rc(!1)}
|
|
@@ -1046,7 +1045,7 @@ p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new mv(this.g);th
|
|
|
1046
1045
|
function tw(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:return vw(),h=g=null,k=new Dv,n=m=l=null,ta(B,2,3),D(B,d(),5);case 5:return g=B.h,D(B,ww(a,b,g,e),6);case 6:q=B.h;xw(a);r=!q.presentationTimeline.R()&&!q.presentationTimeline.pc();if(!r)throw new P(2,9,9005,b);return D(B,yw(a,q,function(C){n=n||C},e),7);case 7:h=B.h;xw(a);if(n)throw n;return D(B,zw(q,h,e),8);case 8:return D(B,k.init(),9);case 9:return xw(a),D(B,Fv(k),10);case 10:return l=B.h,xw(a),u=Aw(h,
|
|
1047
1046
|
q,b,c,e,f),v=u.Gi,y=u.og,D(B,l.La.addManifests([v]),11);case 11:z=B.h;xw(a);m=z[0];xw(a);if(n)throw n;return D(B,Bw(a,y,m,v,f,e,l.La,q,h),12);case 12:return xw(a),Cw(q,v,h,e),D(B,l.La.updateManifest(m,v),13);case 13:return xw(a),x=new Wv("manifest",l.path.pb,l.path.La,m),B.return(mw(x,v));case 3:return xa(B),D(B,k.destroy(),14);case 14:if(!g){B.F(15);break}return D(B,g.stop(),15);case 15:if(!h){B.F(17);break}return D(B,h.destroy(),17);case 17:ya(B,0);break;case 2:A=wa(B);if(null==m){B.F(19);break}return D(B,
|
|
1048
1047
|
Dw(m),19);case 19:throw n||A;}})}
|
|
1049
|
-
function Bw(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,v,y,z,x;return K(function(A){switch(A.g){case 1:l={};m=0;n=function(B,C){var E,H,G,I,J,L,N;return K(function(R){if(1==R.g){E={};H=t(B);for(G=H.next();!G.done;E={
|
|
1048
|
+
function Bw(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,v,y,z,x;return K(function(A){switch(A.g){case 1:l={};m=0;n=function(B,C){var E,H,G,I,J,L,N;return K(function(R){if(1==R.g){E={};H=t(B);for(G=H.next();!G.done;E={fc:E.fc},G=H.next())E.fc=G.value,I=jv(E.fc,f),J=E.fc.i,L=E.fc.h,N=function(T){return function(ea){var Z,fa,Ha;return K(function(Xa){if(1==Xa.g)return D(Xa,g.addSegments([{data:ea}]),2);Z=Xa.h;xw(a);fa=T.fc.g;Ha=iv(fa);l[Ha]=Z[0];m+=ea.byteLength;F(Xa)})}}(E),pv(e,E.fc.groupId,I,J,L,N);return D(R,
|
|
1050
1049
|
rv(e),2)}if(!C)return R.F(0);xw(a);Cw(h,d,k,f);return D(R,g.updateManifest(c,d),0)})};q=!1;ta(A,2);if(!Ew(h)||!q||Fw(h)){A.F(4);break}return D(A,n(b.filter(function(B){return B.h}),!0),5);case 5:return xw(a),b=b.filter(function(B){return!B.h}),r=l,u=m,l={},m=0,D(A,Gw(g,c,d,r,u,function(){return xw(a)}),6);case 6:xw(a);case 4:if(q){A.F(7);break}return D(A,n(b,!1),8);case 8:return xw(a),v=l,y=m,l={},m=0,D(A,Gw(g,c,d,v,y,function(){return xw(a)}),9);case 9:xw(a);case 7:va(A,0);break;case 2:return z=
|
|
1051
1050
|
wa(A),x=Object.values(l),D(A,g.removeSegments(x,function(){}),10);case 10:throw z;}})}function Dw(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Dv,D(f,b.init(),2);case 2:return D(f,Fv(b),3);case 3:return c=f.h,d=new Wv("manifest",c.path.pb,c.path.La,a),D(f,b.destroy(),4);case 4:return e=new rw,D(f,e.remove(d.toString()),0)}})}
|
|
1052
1051
|
function Gw(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,y;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),q=n.next();!q.done;q=n.next())r=q.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
|
|
@@ -1123,7 +1122,7 @@ function py(){return this.webkitSupportsPresentationMode("picture-in-picture")?(
|
|
|
1123
1122
|
function qy(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function ry(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ww.PiPWebkit=ny;ny.install=oy;Zw(oy);function uy(){}function vy(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=wy))}function wy(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Ww.RandomUUID=uy;uy.install=vy;Zw(vy);function xy(){}function yy(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=zy)}function zy(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ww.StorageEstimate=xy;xy.install=yy;Zw(yy);function Ay(){}function By(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Cy})}function Cy(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Ww.Symbol=Ay;Ay.install=By;Zw(By);function Dy(){}function Ey(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Ww.VideoPlayPromise=Dy;Dy.install=Ey;Zw(Ey);function Fy(){}function Gy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Fd())&&(a.getVideoPlaybackQuality=Hy)}}function Hy(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ww.VideoPlaybackQuality=Fy;Fy.install=Gy;Zw(Gy);function Iy(){}function Jy(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Ky;else if(6==b)a=Ly;else{try{var c=!!Ky(1,2,"")}catch(d){c=!1}c&&(a=Ky)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Ky(a,b,c){return new window.TextTrackCue(a,b,c)}function Ly(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ww.VTTCue=Iy;Iy.install=Jy;Zw(Jy);function My(){}My.prototype.parseInit=function(){};My.prototype.setSequenceMode=function(){};My.prototype.setManifestType=function(){};My.prototype.parseMedia=function(a,b){var c=null,d=[];a=Kf(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=Ny.exec(e))){var f=Oy.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};
|
|
1124
1123
|
M("shaka.text.LrcTextParser",My);My.prototype.parseMedia=My.prototype.parseMedia;My.prototype.setManifestType=My.prototype.setManifestType;My.prototype.setSequenceMode=My.prototype.setSequenceMode;My.prototype.parseInit=My.prototype.parseInit;var Ny=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Oy=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ld["application/x-subtitle-lrc"]=function(){return new My};function Py(){}Py.prototype.parseInit=function(){};Py.prototype.setSequenceMode=function(){};Py.prototype.setManifestType=function(){};
|
|
1125
1124
|
Py.prototype.parseMedia=function(a,b,c){var d=Kf(a);a=[];if(""==d)return a;var e=Fg(d,"tt");if(!e)throw new P(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=sg(e,Qy,"frameRate"),g=sg(e,Qy,"subFrameRate"),h=sg(e,Qy,"frameRateMultiplier"),k=sg(e,Qy,"tickRate"),l=sg(e,Qy,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=sg(e,Ry,"extent");if("default"!=m&&"preserve"!=m)throw new P(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Sy(f,
|
|
1126
|
-
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{
|
|
1125
|
+
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{ic:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?qg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var q=t(e),r=q.next();!r.done;r=q.next()){var u=r.value;r=new zc;var v=u.getAttribute("xml:id");if(v){r.id=v;var y=null;n&&(y=Ty.exec(n)||Uy.exec(n));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var z,x=Vy(u,h,"extent");if(x){var A=(z=Ty.exec(x))||Uy.exec(x);
|
|
1127
1126
|
null!=A&&(r.width=Number(A[1]),r.height=Number(A[2]),z||(null!=v&&(r.width=100*r.width/v),null!=y&&(r.height=100*r.height/y)),r.widthUnits=z||null!=v?Rc:0,r.heightUnits=z||null!=y?Rc:0)}if(u=Vy(u,h,"origin"))if(A=(z=Ty.exec(u))||Uy.exec(u),null!=A)r.viewportAnchorX=Number(A[1]),r.viewportAnchorY=Number(A[2]),z?x||(r.width=100-r.viewportAnchorX,r.widthUnits=Rc,r.height=100-r.viewportAnchorY,r.heightUnits=Rc):(null!=y&&(r.viewportAnchorY=100*r.viewportAnchorY/y),null!=v&&(r.viewportAnchorX=100*r.viewportAnchorX/
|
|
1128
1127
|
v)),r.viewportAnchorUnits=z||null!=v?Rc:0}else r=null;r&&k.push(r)}if(ng(d,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");n=t(ng(d,"div"));for(q=n.next();!q.done;q=n.next())if(ng(q.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Wy(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1129
1128
|
function Wy(a,b,c,d,e,f,g,h,k,l,m,n){var q=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var r=document.createElement("span");r.textContent=a.textContent}else r=a;for(var u=null,v=t(Xy),y=v.next();!y.done&&!(u=Yy(r,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;var z=sg(r,Xy,"backgroundImage");n&&z&&!z.startsWith("#")&&(y=new gb(n),z=new gb(z),(y=y.resolve(z).toString())&&(v=y));if("p"==a.nodeName||u||v)m=!0;a=m;y="default"==(r.getAttribute("xml:space")||
|
|
@@ -1208,7 +1207,7 @@ function nA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var jA=[3
|
|
|
1208
1207
|
p.transmux=function(a,b,c,d){a=lc(a);for(c=Th(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&nA(a,e)){var f=iA(a,e),g=4;f&&f.X&&(g=f.X);e+=g;e=e===a.length||e+1<a.length&&nA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=iA(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,jb:0,flags:{mb:0,ab:0,$a:0,Ya:0,Za:2,ob:0}});c+=f.X}if(!h)return Promise.reject(new P(2,3,3018));a=9E4*h.Zi/h.sampleRate*this.h;d={id:b.id,
|
|
1209
1208
|
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,hb:[],na:new Uint8Array([]),Ba:new Uint8Array([]),Ha:0,Ja:0,data:{Ab:this.h,baseMediaDecodeTime:a,eb:e},stream:b};h=new iu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=qu(h),this.g.set(b.id,d));b=Hu(h);this.h++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.Mp3Transmuxer",oA);oA.prototype.transmux=oA.prototype.transmux;oA.prototype.getOriginalMimeType=oA.prototype.getOriginalMimeType;
|
|
1210
1209
|
oA.prototype.convertCodecs=oA.prototype.convertCodecs;oA.prototype.isSupported=oA.prototype.isSupported;oA.prototype.destroy=oA.prototype.destroy;Uc("audio/mpeg",function(){return new oA("audio/mpeg")},$c);function pA(a){this.h=a;this.g=null}p=pA.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=id(a).split(","),c=Fb("audio",b);b=Fb("video",b);return!c||b||"mp3"!=fd(c)?!1:dc(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};
|
|
1211
|
-
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new mi;a=lc(a);a=this.g.parse(a);if("mp3"!=a.pd().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.
|
|
1210
|
+
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new mi;a=lc(a);a=this.g.parse(a);if("mp3"!=a.pd().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.kc());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=iA(b,c))?(c+d.X<=b.length&&(e=jg(e,b.subarray(c,c+d.X))),c+=d.X):c++;return Promise.resolve(e)};M("shaka.transmuxer.MpegTsTransmuxer",pA);pA.prototype.transmux=pA.prototype.transmux;pA.prototype.getOriginalMimeType=pA.prototype.getOriginalMimeType;
|
|
1212
1211
|
pA.prototype.convertCodecs=pA.prototype.convertCodecs;pA.prototype.isSupported=pA.prototype.isSupported;pA.prototype.destroy=pA.prototype.destroy;Uc("video/mp2t",function(){return new pA("video/mp2t")},Zc);/*
|
|
1213
1212
|
@license
|
|
1214
1213
|
MSS Transmuxer
|
|
@@ -1229,13 +1228,13 @@ p.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new mi;a=lc(a);v
|
|
|
1229
1228
|
duration:y,jb:Math.round((r.pts||0)-(r.dts||0)),flags:{mb:0,ab:0,$a:0,Ya:0,Za:v.wd?2:1,ob:v.wd?0:1}})}}var z=aA(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,hb:[],na:new Uint8Array([]),Ba:z.Ba,Ha:z.Ha,Ja:z.Ja,data:{Ab:this.g,baseMediaDecodeTime:l,eb:k},stream:b};break;case "hvc":n=[];r=null;u=[];k=f.Ic();if(!k.length)throw new P(2,3,3023);for(v=0;v<k.length;v++){l=
|
|
1230
1229
|
k[v];m=l.nalus;u.push.apply(u,w(m));z=!1;var x=[],A=!1;q=t(m);for(y=q.next();!y.done;y=q.next()){var B=y.value;switch(B.type){case 1:case 0:var C=A=!0;break;case 19:case 20:case 21:z=C=A=!0;break;case 32:C=!0;break;case 33:C=!0;break;case 34:C=!0;break;case 35:A=C=!0;break;case 39:case 40:C=!0;break;default:C=!1}if(A&&C){var E=B.fullData.byteLength,H=new Uint8Array(4);H[0]=E>>24&255;H[1]=E>>16&255;H[2]=E>>8&255;H[3]=E&255;x.push(jg(H,B.fullData))}}var G=x.length?{data:jg.apply(cg,w(x)),wd:z}:null;
|
|
1231
1230
|
G&&(null==r&&null!=l.dts&&(r=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,jb:Math.round((l.pts||0)-(l.dts||0)),flags:{mb:0,ab:0,$a:0,Ya:0,Za:G.wd?2:1,ob:G.wd?0:1}}))}var I=dA(u);if(!I||null==r)throw new P(2,3,3018);b.height=I.height;b.width=I.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,hb:[],na:new Uint8Array([]),
|
|
1232
|
-
Ba:I.Ba,Ha:I.Ha,Ja:I.Ja,data:{Ab:this.g,baseMediaDecodeTime:r,eb:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var J=[],L,N=null,R=t(f.
|
|
1231
|
+
Ba:I.Ba,Ha:I.Ha,Ja:I.Ja,data:{Ab:this.g,baseMediaDecodeTime:r,eb:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var J=[],L,N=null,R=t(f.kc()),T=R.next();!T.done;T=R.next()){var ea=T.value,Z=ea.data;if(Z){var fa=0;L=Sz(Z,fa);if(!L)throw new P(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==N&&null!==ea.pts&&(N=ea.pts);for(;fa<Z.length;){var Ha=Rz(Z,fa);if(Ha){var Xa=Ha.ge+Ha.X;fa+Xa<=Z.length&&J.push({data:Z.subarray(fa+Ha.ge,fa+Xa),
|
|
1233
1232
|
size:Ha.X,duration:1024,jb:0,flags:{mb:0,ab:0,$a:0,Ya:0,Za:2,ob:0}});fa+=Xa}else fa++}}}if(!L||null==N){if(!f.Ic().length)throw new P(2,3,3018);N=9E4*c.startTime;var Gb=Fb("audio",b.codecs.split(","));if(!Gb||!b.channelsCount||!b.audioSamplingRate)throw new P(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,va:Gb};var lb=Uz(Gb,b.channelsCount);if(!lb)throw new P(2,3,3018);var bc=N+9E4*(c.endTime-c.startTime);for(f=N;f<bc;)J.push({data:lb,size:lb.byteLength,duration:1024,jb:0,
|
|
1234
|
-
flags:{mb:0,ab:0,$a:0,Ya:0,Za:2,ob:0}}),f+=1024/L.sampleRate*9E4}var za=L.sampleRate;f=N/9E4*za;h={id:b.id,type:"audio",codecs:L.va,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:za,duration:d,hb:[],na:new Uint8Array([]),Ba:new Uint8Array([]),Ha:0,Ja:0,data:{Ab:this.g,baseMediaDecodeTime:f,eb:J},stream:b};break;case "ac3":L=[];za=0;J=new Uint8Array([]);N=null;fa=t(f.
|
|
1233
|
+
flags:{mb:0,ab:0,$a:0,Ya:0,Za:2,ob:0}}),f+=1024/L.sampleRate*9E4}var za=L.sampleRate;f=N/9E4*za;h={id:b.id,type:"audio",codecs:L.va,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:za,duration:d,hb:[],na:new Uint8Array([]),Ba:new Uint8Array([]),Ha:0,Ja:0,data:{Ab:this.g,baseMediaDecodeTime:f,eb:J},stream:b};break;case "ac3":L=[];za=0;J=new Uint8Array([]);N=null;fa=t(f.kc());for(var mb=fa.next();!mb.done;mb=fa.next()){var hb=mb.value,Hb=hb.data;null==N&&null!==hb.pts&&(N=hb.pts);for(f=0;f<Hb.length;){var ib=
|
|
1235
1234
|
Wz(Hb,f);ib?(b.audioSamplingRate=ib.sampleRate,b.channelsCount=ib.channelCount,za=ib.sampleRate,J=ib.na,L.push({data:Hb.subarray(f,f+ib.X),size:ib.X,duration:1536,jb:0,flags:{mb:0,ab:0,$a:0,Ya:0,Za:2,ob:0}}),f+=ib.X):f++}}if(0==za||0==J.byteLength||null==N)throw new P(2,3,3018);f=N/9E4*za;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:za,duration:d,hb:[],na:J,Ba:new Uint8Array([]),Ha:0,Ja:0,data:{Ab:this.g,baseMediaDecodeTime:f,eb:L},stream:b};break;case "ec3":L=
|
|
1236
|
-
[];za=0;N=new Uint8Array([]);J=null;for(var Wh=t(f.
|
|
1237
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:za,duration:d,hb:[],na:N,Ba:new Uint8Array([]),Ha:0,Ja:0,data:{Ab:this.g,baseMediaDecodeTime:f,eb:L},stream:b};break;case "mp3":L=[];var Fi;za=null;for(var ju=t(f.
|
|
1238
|
-
f+=
|
|
1235
|
+
[];za=0;N=new Uint8Array([]);J=null;for(var Wh=t(f.kc()),Md=Wh.next();!Md.done;Md=Wh.next()){var Ne=Md.value,Oe=Ne.data;null==J&&null!==Ne.pts&&(J=Ne.pts);for(f=0;f<Oe.length;){var sb=Zz(Oe,f);sb?(b.audioSamplingRate=sb.sampleRate,b.channelsCount=sb.channelCount,za=sb.sampleRate,N=sb.na,L.push({data:Oe.subarray(f,f+sb.X),size:sb.X,duration:1536,jb:0,flags:{mb:0,ab:0,$a:0,Ya:0,Za:2,ob:0}}),f+=sb.X):f++}}if(0==za||0==N.byteLength||null==J)throw new P(2,3,3018);f=J/9E4*za;h={id:b.id,type:"audio",codecs:"ec-3",
|
|
1236
|
+
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:za,duration:d,hb:[],na:N,Ba:new Uint8Array([]),Ha:0,Ja:0,data:{Ab:this.g,baseMediaDecodeTime:f,eb:L},stream:b};break;case "mp3":L=[];var Fi;za=null;for(var ju=t(f.kc()),gm=ju.next();!gm.done;gm=ju.next()){var hm=gm.value,hg=hm.data;if(hg)for(null==za&&null!==hm.pts&&(za=hm.pts),f=0;f<hg.length;){var We=iA(hg,f);We?(Fi||(Fi=We),f+We.X<=hg.length&&L.push({data:hg.subarray(f,f+We.X),size:We.X,duration:1152,jb:0,flags:{mb:0,ab:0,$a:0,Ya:0,Za:2,ob:0}}),
|
|
1237
|
+
f+=We.X):f++}}if(!Fi||null==za)throw new P(2,3,3018);var ku=Fi.sampleRate;f=za/9E4*ku;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ku,duration:d,hb:[],na:new Uint8Array([]),Ba:new Uint8Array([]),Ha:0,Ja:0,data:{Ab:this.g,baseMediaDecodeTime:f,eb:L},stream:b}}h&&a.push(h)}}catch(im){return im&&3023==im.code?Promise.resolve(new Uint8Array([])):Promise.reject(im)}if(!a.length)return Promise.reject(new P(2,3,3018));a=new iu(a);this.h.has(b.id)?d=this.h.get(b.id):
|
|
1239
1238
|
(d=qu(a),this.h.set(b.id,d));b=Hu(a);this.g++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.TsTransmuxer",uA);uA.prototype.transmux=uA.prototype.transmux;uA.prototype.getOriginalMimeType=uA.prototype.getOriginalMimeType;uA.prototype.convertCodecs=uA.prototype.convertCodecs;uA.prototype.isSupported=uA.prototype.isSupported;uA.prototype.destroy=uA.prototype.destroy;var vA=["aac","ac-3","ec-3","mp3"],wA=["avc","hevc"];Uc("video/mp2t",function(){return new uA("video/mp2t")},Yc);/*
|
|
1240
1239
|
@license
|
|
1241
1240
|
EME Encryption Scheme Polyfill
|
|
@@ -1302,7 +1301,7 @@ sw:{A:"Kiswahili",B:"Swahili"},"sw-KE":{A:"Kiswahili",B:"Swahili (Kenya)"},ta:{A
|
|
|
1302
1301
|
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",
|
|
1303
1302
|
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",
|
|
1304
1303
|
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"}},OA=t(Object.keys(NA)),PA=OA.next();!PA.done;PA=
|
|
1305
|
-
OA.next()){var QA=PA.value;NA[QA.toLowerCase()]=NA[QA]};function RA(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Af;this.localization=this.controls.Ka;this.player=this.controls.Gc();this.video=this.controls.
|
|
1304
|
+
OA.next()){var QA=PA.value;NA[QA.toLowerCase()]=NA[QA]};function RA(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Af;this.localization=this.controls.Ka;this.player=this.controls.Gc();this.video=this.controls.bc();this.adManager=this.player.Yd();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})}
|
|
1306
1305
|
RA.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};M("shaka.ui.Element",RA);RA.prototype.release=RA.prototype.release;function SA(a){return TA(a,"shaka-back-to-overflow-button")}function TA(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function UA(a){a&&(a=TA(a,"shaka-chosen-item"))&&a.parentElement.focus()}function VA(){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 WA(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
1307
1306
|
function XA(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 YA(a,b){RA.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 vd(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=XA(e-d,!1)+" / "+XA(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=
|
|
1308
1307
|
""))});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.Pa();c.g.ya(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Pa(),this.g.ya(.5))}pa(YA,RA);YA.prototype.release=function(){this.g.stop();this.g=null;RA.prototype.release.call(this)};M("shaka.ui.AdCounter",YA);function ZA(a,b){RA.call(this,a,b);var c=this;this.g=U("div");this.g.classList.add("shaka-ad-position");WA(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&&$A(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&$A(c)});this.eventManager.o(this.adManager,"ad-started",function(){$A(c)});this.eventManager.o(this.adManager,
|
|
@@ -1325,18 +1324,18 @@ a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.b
|
|
|
1325
1324
|
function lB(a){if(a.C.length){for(var b=a.player.Fa(),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 "+
|
|
1326
1325
|
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 pB(a){lB(a);var b=a.player.Fa();b=b.end-b.start;a.player.R()&&5<b&&a.I.ya(1)}function oB(a){var b=a.player.Fa();b=b.end-b.start;return a.player.R()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function nB(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1327
1326
|
function qB(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B;K(function(C){switch(C.g){case 1:d=rB(a);if(!d)return mB(a),C.return();0>c&&(c=0);e=a.player.Fa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return D(C,a.player.Cf(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return mB(a),C.return();a.player.R()?(h=e.end-c,a.u.textContent=1>h?a.localization.resolve("LIVE"):"-"+sB(h)):a.u.textContent=sB(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1328
|
-
-(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";q=g.uris[0].split("#xywh=")[0];if(a.l&&q===a.l.uris[0].split("#xywh=")[0]&&g.segment
|
|
1327
|
+
-(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";q=g.uris[0].split("#xywh=")[0];if(a.l&&q===a.l.uris[0].split("#xywh=")[0]&&g.segment.$b()==a.l.segment.$b()&&g.segment.Wb()==a.l.segment.Wb()){C.F(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!q.startsWith("offline:")){C.F(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(C,5);r=wf;u=fk(g.segment.aa(),g.segment.$b(),g.segment.Wb(),a.player.getConfiguration().streaming.retryParameters);
|
|
1329
1328
|
a.j=a.player.Xb().request(r,u,{type:1});return D(C,a.j.promise,7);case 7:v=C.h;a.j=null;"mjpg"==d.codecs?(y=(new Tf).box("mdat",bg(function(E){q=URL.createObjectURL(new Blob([E],{type:"image/jpeg"}))})),y.parse(v.data,!1)):(z=d.mimeType||"image/jpeg",x=new Blob([v.data],{type:z}),q=URL.createObjectURL(x));va(C,4);break;case 5:A=wa(C);if(7001==A.code)return C.return();throw A;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=q;
|
|
1330
1329
|
a.g.onload=function(){q.startsWith("blob:")&&URL.revokeObjectURL(q)};a.i.insertBefore(a.g,a.i.firstChild);case 3:B=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="-"+B*g.positionX+"px",a.g.style.top="-"+B*g.positionY+"px",a.g.style.transform="scale("+B+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
1331
1330
|
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",F(C)}})}
|
|
1332
1331
|
function rB(a){var b=a.player.Zd();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={Oe:c.Oe,Me:c.Me},e=d.next())if(c.Oe=e.value,c.Me=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Oe&&g.bandwidth<.01*f.Me}}(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&&
|
|
1333
|
-
"mjpg"==f.codecs})||b[0]}function mB(a){a.i.style.visibility="hidden";a.u.textContent=""}function sB(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}M("shaka.ui.SeekBar",kB);function tB(){}tB.prototype.create=function(a,b){return new kB(a,b)};kB.Factory=tB;function Y(a,b,c,d){ab.call(this);var e=this;this.P=!0;this.g=d;this.C=new Ao(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.sa=!0;this.u=this.C.
|
|
1332
|
+
"mjpg"==f.codecs})||b[0]}function mB(a){a.i.style.visibility="hidden";a.u.textContent=""}function sB(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}M("shaka.ui.SeekBar",kB);function tB(){}tB.prototype.create=function(a,b){return new kB(a,b)};kB.Factory=tB;function Y(a,b,c,d){ab.call(this);var e=this;this.P=!0;this.g=d;this.C=new Ao(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.sa=!0;this.u=this.C.bc();this.s=c;this.D=this.C.Gc();this.ra=a;this.j=b;this.Va=this.D.Yd();this.l=this.m=null;this.V=!1;this.G=[];this.Ub=[];this.Gb=!1;this.Z=new vd(function(){e.j.style.cursor="none";e.Gb=!1;uB(e)});this.ea=new vd(function(){e.h.removeAttribute("shown");e.I.T(2)});this.I=new vd(function(){for(var f=t(e.G),g=f.next();!g.done;g=f.next())WA(g.value,
|
|
1334
1333
|
!1)});this.Qa=new vd(function(){e.qc()&&vB(e)});this.J=null;this.H=[];this.Ka=wB();this.i=new Af;this.configure(this.g);xB(this);this.ha=new Set;yB(this);this.Qa.ya(.125);this.i.o(this.Ka,"locale-changed",function(f){e.Va.setLocale(f.locales[0])})}pa(Y,ab);p=Y.prototype;
|
|
1335
1334
|
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.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.Qa&&(a.Qa.stop(),a.Qa=null);zB(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.ra){b.F(6);break}return D(b,a.ra.destroy(),7);case 7:a.ra=
|
|
1336
1335
|
null;case 6:a.D=null,a.s=null,a.u=null,a.Ka=null,a.ha.clear(),ab.prototype.release.call(a),F(b)}})};function zB(a){for(var b=t(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function AB(a,b){BB.set(a,b)}p.yh=function(a){this.sa=a;yB(this)};p.Fi=function(){uB(this)};
|
|
1337
1336
|
p.configure=function(a){this.g=a;this.C.Cg(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Db&&(this.Db=null);this.Xa&&(this.Xa=null);this.h?(Wk(this.h),zB(this)):(CB(this),DB(this));this.j.classList.add("shaka-video-container");this.s.classList.add("shaka-video");EB(this);this.g.addBigPlayButton&&FB(this);this.g.customContextMenu&&(this.Xa=new eB(this.U,this),this.H.push(this.Xa));this.$||GB(this);this.Fb=U("div");this.Fb.classList.add("shaka-server-side-ad-container");
|
|
1338
1337
|
this.h.appendChild(this.Fb);HB(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,w(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));IB(this);this.Ub=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));uB(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",
|
|
1339
|
-
c)}};p.fg=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");uB(this)};p.gh=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.fg(!1)};p.getAd=function(){return this.m};p.Lh=function(){return this.C};p.Yh=function(){return this.Ka};p.ni=function(){return this.j};p.
|
|
1338
|
+
c)}};p.fg=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");uB(this)};p.gh=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.fg(!1)};p.getAd=function(){return this.m};p.Lh=function(){return this.C};p.Yh=function(){return this.Ka};p.ni=function(){return this.j};p.bc=function(){return this.u};p.Xh=function(){return this.s};p.Gc=function(){return this.D};p.Wh=function(){return this.ra};
|
|
1340
1339
|
p.Qh=function(){return this.h};p.ei=function(){return this.Fb};p.Nh=function(){return this.M};p.Oh=function(){return this.g};p.Ci=function(){return this.V};p.kg=function(a){this.V=a};p.ti=function(){return this.sa};p.Mg=function(){return this.l?this.l.getValue():this.u.currentTime};p.hh=function(a){this.J=a};p.Td=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};p.Jc=function(){this.I.Pa()};
|
|
1341
1340
|
p.ke=function(){return document.fullscreenEnabled||this.s.webkitSupportsFullscreen?!0:!1};p.Lc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.s;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1342
1341
|
function JB(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,
|
|
@@ -1361,7 +1360,7 @@ function NB(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navi
|
|
|
1361
1360
|
function uB(a){var b=a.m?a.m.isPaused():!1,c=a.u.paused&&!a.V,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Gb||d||VB(a)?(vB(a),a.h.setAttribute("shown","true"),a.ea.stop()):a.ea.T(a.g.fadeDelay)}function OB(a){a.P&&(a.Td()?a.I.Pa():a.g.singleClickForPlayAndPause&&TB(a))}function TB(a){a.m&&a.m.isLinear()?bB(a):cB(a)}
|
|
1362
1361
|
function yB(a){var b=a.C.Aa();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}p.qc=function(){return this.P?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function SB(a,b){a.l.changeTo(b);a.qc()&&vB(a)}
|
|
1363
1362
|
function vB(a){if(a.l)if(a.l.setValue(a.u.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
|
|
1364
|
-
function RB(a,b){a.ha.add(b.key);var c=a.Td();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),uB(a),a.i.o(window,"mousedown",function(){a.i.
|
|
1363
|
+
function RB(a,b){a.ha.add(b.key);var c=a.Td();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),uB(a),a.i.o(window,"mousedown",function(){a.i.dc(window,"mousedown")}));"Escape"==b.key&&a.I.Pa();c&&a.ha.has("Tab")&&WB(a,b)}
|
|
1365
1364
|
function WB(a,b){var c=a.G.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())}}}
|
|
1366
1365
|
function wB(){var a=new Wb("en");a.xa("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..."],
|
|
1367
1366
|
["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"],
|
|
@@ -1423,14 +1422,14 @@ a.xa("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1423
1422
|
["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"],
|
|
1424
1423
|
["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.Bg(navigator.languages||[]);return a}M("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.qc;Y.prototype.hideAdUI=Y.prototype.Og;Y.prototype.showAdUI=Y.prototype.kh;
|
|
1425
1424
|
Y.prototype.togglePiP=Y.prototype.Ie;Y.prototype.isPiPEnabled=Y.prototype.le;Y.prototype.isPiPAllowed=Y.prototype.Gf;Y.prototype.toggleFullScreen=Y.prototype.pg;Y.prototype.isFullScreenEnabled=Y.prototype.Lc;Y.prototype.isFullScreenSupported=Y.prototype.ke;Y.prototype.hideSettingsMenus=Y.prototype.Jc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Td;Y.prototype.setLastTouchEventTime=Y.prototype.hh;Y.prototype.getDisplayTime=Y.prototype.Mg;Y.prototype.isCastAllowed=Y.prototype.ti;
|
|
1426
|
-
Y.prototype.setSeeking=Y.prototype.kg;Y.prototype.isSeeking=Y.prototype.Ci;Y.prototype.getConfig=Y.prototype.Oh;Y.prototype.getClientSideAdContainer=Y.prototype.Nh;Y.prototype.getServerSideAdContainer=Y.prototype.ei;Y.prototype.getControlsContainer=Y.prototype.Qh;Y.prototype.getLocalPlayer=Y.prototype.Wh;Y.prototype.getPlayer=Y.prototype.Gc;Y.prototype.getLocalVideo=Y.prototype.Xh;Y.prototype.getVideo=Y.prototype.
|
|
1425
|
+
Y.prototype.setSeeking=Y.prototype.kg;Y.prototype.isSeeking=Y.prototype.Ci;Y.prototype.getConfig=Y.prototype.Oh;Y.prototype.getClientSideAdContainer=Y.prototype.Nh;Y.prototype.getServerSideAdContainer=Y.prototype.ei;Y.prototype.getControlsContainer=Y.prototype.Qh;Y.prototype.getLocalPlayer=Y.prototype.Wh;Y.prototype.getPlayer=Y.prototype.Gc;Y.prototype.getLocalVideo=Y.prototype.Xh;Y.prototype.getVideo=Y.prototype.bc;Y.prototype.getVideoContainer=Y.prototype.ni;Y.prototype.getLocalization=Y.prototype.Yh;
|
|
1427
1426
|
Y.prototype.getCastProxy=Y.prototype.Lh;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.gh;Y.prototype.setEnabledShakaControls=Y.prototype.fg;Y.prototype.configure=Y.prototype.configure;Y.prototype.loadComplete=Y.prototype.Fi;Y.prototype.allowCast=Y.prototype.yh;Y.registerSeekBar=function(a){QB=a};Y.registerElement=AB;Y.prototype.destroy=Y.prototype.destroy;var BB=new Map,QB=new tB;function XB(a,b){RA.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=Vk();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");
|
|
1428
1427
|
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);YB(this);this.eventManager.o(this.localization,"locale-updated",function(){ZB(c)});this.eventManager.o(this.localization,"locale-changed",function(){ZB(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&WA(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){WA(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){WA(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.hh(Date.now());
|
|
1429
1428
|
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){$B(c)});ZB(this);this.ad&&this.ad.isLinear()&&WA(this.g,!1)}pa(XB,RA);XB.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=[];RA.prototype.release.call(this)};function aC(a,b){bC.set(a,b)}
|
|
1430
1429
|
function YB(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,bC.get(c)?(c=bC.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function $B(a){if(a.controls.Td())a.controls.Jc();else{WA(a.h,!0);uB(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};db(a.h.childNodes,b)&&eb(a.h.childNodes,b)[0].focus()}}function ZB(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1431
1430
|
M("shaka.ui.OverflowMenu",XB);XB.registerElement=aC;function cC(){}cC.prototype.create=function(a,b){return new XB(a,b)};AB("overflow_menu",new cC);var bC=new Map;function dC(a,b){RA.call(this,a,b);var c=this;this.g=Vk();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);
|
|
1432
|
-
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);eC(this);fC(this);this.eventManager.o(this.localization,"locale-updated",function(){eC(c)});this.eventManager.o(this.localization,"locale-changed",function(){eC(c)});this.eventManager.o(this.g,"click",function(){c.controls.
|
|
1433
|
-
c.player.ae()==Xm;WA(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){fC(c)})}pa(dC,RA);function fC(a){var b=a.controls.
|
|
1431
|
+
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);eC(this);fC(this);this.eventManager.o(this.localization,"locale-updated",function(){eC(c)});this.eventManager.o(this.localization,"locale-changed",function(){eC(c)});this.eventManager.o(this.g,"click",function(){c.controls.bc().webkitShowPlaybackTargetPicker()});a=this.controls.bc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1432
|
+
c.player.ae()==Xm;WA(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){fC(c)})}pa(dC,RA);function fC(a){var b=a.controls.bc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function eC(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}M("shaka.ui.AirPlayButton",dC);function gC(){}gC.prototype.create=function(a,b){return new dC(a,b)};aC("airplay",new gC);
|
|
1434
1433
|
AB("airplay",new gC);function hC(a,b,c){this.i=a;this.j=b;this.h=iC(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ff()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.lg(b);b.ui=this;c.ui=this}p=hC.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)})};
|
|
1435
1434
|
p.Ff=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Hd()&&1<navigator.maxTouchPoints};p.getConfiguration=function(){var a=iC(this);yl(a,this.h,iC(this),{},"");return a};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zl(a,b));yl(this.h,a,iC(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.Ph=function(){return this.g};
|
|
1436
1435
|
p.hj=function(a){this.g.fg(a)};
|
|
@@ -1496,9 +1495,9 @@ function BD(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.n
|
|
|
1496
1495
|
CD.prototype.create=function(a,b){return new zD(a,b)};aC("statistics",new CD);gB("statistics",new CD);function DD(a,b){rC.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.rc()?this.button.ariaPressed="true":this.button.ariaPressed="false";ED(this);this.eventManager.o(this.localization,"locale-updated",function(){FD(c);GD(c)});this.eventManager.o(this.localization,"locale-changed",function(){FD(c);GD(c)});this.eventManager.o(this.player,
|
|
1497
1496
|
"texttrackvisibility",function(){HD(c);GD(c)});this.eventManager.o(this.player,"textchanged",function(){GD(c)});this.eventManager.o(this.player,"trackschanged",function(){ID(c)});HD(this);FD(this);GD(this);ID(this)}pa(DD,rC);function ED(a){var b=Vk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(VA());a.g=U("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1498
1497
|
function HD(a){a.player.rc()?(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"))}
|
|
1499
|
-
function GD(a){var b=a.player
|
|
1498
|
+
function GD(a){var b=a.player.ac();pC(b,a.menu,function(c){return JD(a,c)},a.player.rc(),a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=Vk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.He(!1);GD(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.rc()||(b.ariaSelected="true",b.appendChild(VA()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1500
1499
|
a.button.setAttribute("shaka-status",a.currentSelection.textContent);UA(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function JD(a,b){return K(function(c){a.player.dg(b);return D(c,a.player.He(!0),0)})}
|
|
1501
|
-
function FD(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 ID(a){var b=0<a.player
|
|
1500
|
+
function FD(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 ID(a){var b=0<a.player.ac().length;WA(a.button,b);GD(a)}M("shaka.ui.TextSelection",DD);function KD(){}KD.prototype.create=function(a,b){return new DD(a,b)};aC("captions",new KD);AB("captions",new KD);function LD(a,b){iB.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 MD(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return ND(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return ND(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return MD(c)});this.eventManager.o(this.localization,"locale-updated",function(){return OD(c)});
|
|
1502
1501
|
this.eventManager.o(this.localization,"locale-changed",function(){return OD(c)});MD(this);OD(this);if(this.ad)this.onChange()}pa(LD,iB);LD.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 MD(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);PD(a)}function ND(a){var b=a.ad.getVolume();a.setValue(100*b);PD(a)}
|
|
1503
1502
|
function PD(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 OD(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}M("shaka.ui.VolumeBar",LD);function QD(){}QD.prototype.create=function(a,b){return new LD(a,b)};AB("volume",new QD);}).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})();
|
|
1504
1503
|
|