shaka-player 4.7.9 → 4.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/CONTRIBUTORS +1 -0
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.debug.js +72 -72
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +92 -92
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +86 -87
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +112 -112
- package/dist/shaka-player.ui.map +2 -2
- package/lib/dash/segment_template.js +18 -13
- package/lib/hls/hls_parser.js +2 -2
- package/lib/media/segment_reference.js +4 -1
- package/lib/media/streaming_engine.js +2 -2
- package/lib/player.js +1 -1
- package/lib/util/periods.js +23 -1
- package/lib/util/stream_utils.js +1 -1
- package/package.json +2 -2
|
@@ -58,7 +58,7 @@ function hb(a,b,c){c=void 0===c?Infinity:c;return lb(a,void 0===b?0:b,c,Uint8Arr
|
|
|
58
58
|
N("shaka.util.BufferUtils",eb);eb.toDataView=nb;eb.toUint16=mb;eb.toUint8=hb;eb.toArrayBuffer=kb;eb.equal=fb;function ob(){}ob.prototype.init=function(){};ob.prototype.i=function(){};ob.prototype.h=function(){};ob.prototype.j=function(){};N("shaka.media.IClosedCaptionParser",ob);function pb(a){this.l=new db;if(a=qb[a.toLowerCase()])this.l=a();this.g=new cb;if(a=rb)this.g=a()}pb.prototype.init=function(a){this.l.init(a)};pb.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=hb(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};
|
|
59
59
|
pb.prototype.h=function(){this.g.clear()};pb.prototype.j=function(){return this.g.getStreams()};N("shaka.media.ClosedCaptionParser",pb);pb.findDecoder=function(){return rb};pb.unregisterDecoder=function(){rb=null};pb.registerDecoder=function(a){rb=a};pb.findParser=function(a){return qb[a]};pb.unregisterParser=function(a){delete qb[a]};pb.registerParser=function(a,b){qb[a]=b};var qb={},rb=null;function sb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function tb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function ub(a,b,c){c||(c=sb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={ae:d.ae},e=a.next()){d.ae=e.value;e=b.findIndex(function(f){return function(g){return c(f.ae,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
60
60
|
function xb(a,b,c){c||(c=sb);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 yb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new zb;this.position=null;this.positionAlign=Ab;this.size=0;this.textAlign=Bb;this.direction=Db;this.writingMode=Eb;this.lineInterpretation=Fb;this.line=null;this.lineHeight="";this.lineAlign=Gb;this.displayAlign=Hb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ib;this.fontStyle=Jb;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
61
|
-
"";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={
|
|
61
|
+
"";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={Kb:32,rows:15}}function Kb(a,b){a=new yb(a,b,"");a.lineBreak=!0;return a}yb.prototype.clone=function(){var a=new yb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
62
62
|
function Lb(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(!xb(a.nestedCues,b.nestedCues,Lb))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(!xb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",yb);yb.equal=Lb;yb.prototype.clone=yb.prototype.clone;var Ab="auto";
|
|
63
63
|
yb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ab};var Bb="center",Mb={LEFT:"left",RIGHT:"right",CENTER:Bb,START:"start",END:"end"};yb.textAlign=Mb;var Hb="after",Nb={BEFORE:"before",CENTER:"center",AFTER:Hb};yb.displayAlign=Nb;var Db="ltr";yb.direction={HORIZONTAL_LEFT_TO_RIGHT:Db,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Eb="horizontal-tb";yb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Eb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Fb=0;
|
|
64
64
|
yb.lineInterpretation={LINE_NUMBER:Fb,PERCENTAGE:1};var Gb="start",Ob={CENTER:"center",START:Gb,END:"end"};yb.lineAlign=Ob;var Pb={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};yb.defaultTextColor=Pb;var Qb={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};yb.defaultTextBackgroundColor=Qb;var Ib=400;yb.fontWeight={NORMAL:Ib,BOLD:700};
|
|
@@ -73,10 +73,10 @@ var ec=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
73
73
|
Copyright 2006 The Closure Library Authors
|
|
74
74
|
SPDX-License-Identifier: Apache-2.0
|
|
75
75
|
*/
|
|
76
|
-
function fc(a){var b;a instanceof fc?(gc(this,a.ab),this.Wb=a.Wb,hc(this,a.ob),ic(this,a.lc),this.Ga=a.Ga,jc(this,a.g.clone()),this.
|
|
77
|
-
r.toString=function(){var a=[],b=this.ab;b&&a.push(mc(b,nc,!0),":");if(b=this.ob){a.push("//");var c=this.Wb;c&&a.push(mc(c,nc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.lc;null!=b&&a.push(":",String(b))}if(b=this.Ga)this.ob&&"/"!=b.charAt(0)&&a.push("/"),a.push(mc(b,"/"==b.charAt(0)?oc:pc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.
|
|
76
|
+
function fc(a){var b;a instanceof fc?(gc(this,a.ab),this.Wb=a.Wb,hc(this,a.ob),ic(this,a.lc),this.Ga=a.Ga,jc(this,a.g.clone()),this.Lb=a.Lb):a&&(b=String(a).match(ec))?(gc(this,b[1]||"",!0),this.Wb=kc(b[2]||""),hc(this,b[3]||"",!0),ic(this,b[4]),this.Ga=kc(b[5]||"",!0),jc(this,b[6]||"",!0),this.Lb=kc(b[7]||"")):this.g=new lc(null)}r=fc.prototype;r.ab="";r.Wb="";r.ob="";r.lc=null;r.Ga="";r.Lb="";
|
|
77
|
+
r.toString=function(){var a=[],b=this.ab;b&&a.push(mc(b,nc,!0),":");if(b=this.ob){a.push("//");var c=this.Wb;c&&a.push(mc(c,nc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.lc;null!=b&&a.push(":",String(b))}if(b=this.Ga)this.ob&&"/"!=b.charAt(0)&&a.push("/"),a.push(mc(b,"/"==b.charAt(0)?oc:pc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Lb)&&a.push("#",mc(b,qc));return a.join("")};
|
|
78
78
|
r.resolve=function(a){var b=this.clone();"data"===b.ab&&(b=new fc);var c=!!a.ab;c?gc(b,a.ab):c=!!a.Wb;c?b.Wb=a.Wb:c=!!a.ob;c?hc(b,a.ob):c=null!=a.lc;var d=a.Ga;if(c)ic(b,a.lc);else if(c=!!a.Ga){if("/"!=d.charAt(0))if(this.ob&&!this.Ga)d="/"+d;else{var e=b.Ga.lastIndexOf("/");-1!=e&&(d=b.Ga.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(""):".."==
|
|
79
|
-
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.Ga=d:c=""!==a.g.toString();c?jc(b,a.g.clone()):c=!!a.
|
|
79
|
+
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.Ga=d:c=""!==a.g.toString();c?jc(b,a.g.clone()):c=!!a.Lb;c&&(b.Lb=a.Lb);return b};r.clone=function(){return new fc(this)};function gc(a,b,c){a.ab=c?kc(b,!0):b;a.ab&&(a.ab=a.ab.replace(/:$/,""))}function hc(a,b,c){a.ob=c?kc(b,!0):b}function ic(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.lc=b}else a.lc=null}
|
|
80
80
|
function jc(a,b,c){b instanceof lc?a.g=b:(c||(b=mc(b,rc)),a.g=new lc(b))}function kc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function mc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,sc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function sc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var nc=/[#\/\?@]/g,pc=/[#\?:]/g,oc=/[#\?]/g,rc=/[#\?@]/g,qc=/#/g;function lc(a){this.g=a||null}
|
|
81
81
|
function uc(a){if(!a.xa&&(a.xa={},a.Lc=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," ")))}}r=lc.prototype;r.xa=null;r.Lc=null;function vc(a){uc(a);return a.Lc}r.add=function(a,b){uc(this);this.g=null;var c=this.xa.hasOwnProperty(a)?this.xa[a]:null;c||(this.xa[a]=c=[]);c.push(b);this.Lc++;return this};
|
|
82
82
|
r.set=function(a,b){uc(this);this.g=null;this.xa.hasOwnProperty(a)?this.xa[a]=[b]:this.add(a,b);return this};r.get=function(a){uc(this);return this.xa[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.xa)return"";var a=[],b;for(b in this.xa)for(var c=encodeURIComponent(b),d=this.xa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
@@ -125,15 +125,15 @@ function Sd(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g)return C(k,Vd(b.
|
|
|
125
125
|
q,f.P);if(!Za(p))return!1;n=[n,q].join()}q=Jc(m.mimeType,n,f.$);if(!Za(q))return!1;m.codecs=n}m=l.audio;if(h&&m&&m.encrypted&&m.codecs.toLowerCase().includes("opus"))return Wa(Wd(l)),!1;if(m){n=Yd(m.codecs);q=Jc(m.mimeType,n,f.P);if(!Za(q))return!1;m.codecs=n}(m=l.decodingInfos.some(function(u){return!u.supported||d&&(u=u.keySystemAccess)&&u.keySystem!=d?!1:!0}))||Wa(Wd(l));return m});E(k)})}
|
|
126
126
|
function Zd(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=Zd(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
127
127
|
function $d(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=Zd(b),d=ae,d[c]?(a.decodingInfos.push(d[c]),l.B(0)):C(l,be(b),3);if((e=l.h)&&e.length){f=null;g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,f?(f.supported=f.supported&&k.supported,f.powerEfficient=f.powerEfficient&&k.powerEfficient,f.smooth=f.smooth&&k.smooth,k.keySystemAccess||(f.keySystemAccess=null)):f=k;f&&(d[c]=f,a.decodingInfos.push(f))}E(l)})}
|
|
128
|
-
function be(a){var b=[""];a.video&&(b=Oc(a.video.contentType).split(","));var c=[""];a.audio&&(c=Oc(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={
|
|
128
|
+
function be(a){var b=[""];a.video&&(b=Oc(a.video.contentType).split(","));var c=[""];a.audio&&(c=Oc(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={Gb:f.Gb},h=g.next())h=h.value,f.Gb=nd(a),a.video&&(f.Gb.video.contentType=Gc(Nc(f.Gb.video.contentType),e)),a.audio&&(f.Gb.audio.contentType=Gc(Nc(f.Gb.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Gb).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
129
129
|
return null})}
|
|
130
130
|
function Vd(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){switch(D.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return D.return();f={};g=t(d);h=g.next();case 2:if(h.done){D.B(4);break}f.be=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){D.B(7);break}n=m.value;q=ce(n,b,c).filter(function(F){return function(J){return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.be}}(f));p=t(q);u=p.next();case 8:if(u.done){D.B(10);break}v=u.value;return C(D,
|
|
131
131
|
$d(n,v),9);case 9:u=p.next();D.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();D.B(5);break;case 7:if(k)return D.return();f={be:f.be};h=g.next();D.B(2);break;case 4:x=t(a),m=x.next();case 12:if(m.done){D.B(0);break}z=m.value;y=ce(z,b,c).filter(function(F){F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});B=t(y);u=B.next();case 15:if(u.done){m=x.next();D.B(12);break}A=u.value;return C(D,$d(z,A),16);case 16:u=B.next(),D.B(15)}})}
|
|
132
132
|
function ce(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=zc("video",g);f=Xd(f);g=zc("audio",g);g=Yd(g);g=Jc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Xd(f);f=Jc(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=
|
|
133
|
-
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
133
|
+
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Yd(d.codecs),f=Jc(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,
|
|
134
134
|
[]);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,p=t(h.initData),u=p.next();!u.done;u=p.next())q.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
135
135
|
(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}
|
|
136
|
-
function Yd(a){return"fLaC"
|
|
136
|
+
function Yd(a){return"fLaC"!==a||Id()?"Opus"===a?"opus":a:"flac"}function Xd(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 Td(a){a.textStreams=a.textStreams.filter(function(b){b=Gc(b.mimeType,b.codecs);return Qc(b)})}
|
|
137
137
|
function Ud(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.B(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(de.has(f)){l.B(5);break}g=ee.get(f);if(!g){de.set(f,!1);l.B(5);break}return C(l,fe(g),7);case 7:h=l.h,de.set(f,h);case 5:(k=de.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,E(l)}})}
|
|
138
138
|
function fe(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)}})}
|
|
139
139
|
function ge(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,
|
|
@@ -253,11 +253,11 @@ function Vg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseSer
|
|
|
253
253
|
function mh(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={Fa:g.Fa},h=a.next()){g.Fa=h.value;b.includes(g.Fa.licenseServerUri)||b.push(g.Fa.licenseServerUri);d.includes(g.Fa.serverCertificateUri)||d.push(g.Fa.serverCertificateUri);g.Fa.serverCertificate&&(c.some(function(m){return function(n){return fb(n,m.Fa.serverCertificate)}}(g))||c.push(g.Fa.serverCertificate));if(g.Fa.initData){h={};for(var k=t(g.Fa.initData),l=k.next();!l.done;h={kd:h.kd},l=k.next())h.kd=l.value,e.some(function(m){return function(n){var q=
|
|
254
254
|
m.kd;return n.keyId&&n.keyId==q.keyId?!0:n.initDataType==q.initDataType&&fb(n.initData,q.initData)}}(h))||e.push(h.kd)}if(g.Fa.keyIds)for(h=t(g.Fa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
255
255
|
function Xg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
256
|
-
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var uh=1,ph=5,rh=.5,xh=new Hf(function(){return kb(new Uint8Array([0]))});function
|
|
256
|
+
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var uh=1,ph=5,rh=.5,xh=new Hf(function(){return kb(new Uint8Array([0]))});function yh(){}function Ah(a,b){if(b&&(b=Bh[b.toLowerCase()]))return b;throw new O(2,4,4E3,a);}N("shaka.media.ManifestParser",yh);yh.unregisterParserByMime=function(a){delete Bh[a]};yh.registerParserByMime=function(a,b){Bh[a]=b};yh.registerParserByExtension=function(){ze("ManifestParser","Please use an ManifestParser with registerParserByMime function.")};yh.AccessibilityPurpose={Yi:"visually impaired",ui:"hard of hearing"};var Bh={};function Ch(a){function b(){d=!0}function c(l){f.push(l);ag(l)}a=hb(a);var d=!1,e,f=[],g=[];(new Wf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);cg(l)}).O("encv",b).O("enca",b).O("dvav",function(l){g.push({box:l,Ma:1701733238})}).O("dva1",function(l){g.push({box:l,Ma:1701733238})}).O("dvh1",function(l){g.push({box:l,Ma:1701733238})}).O("dvhe",function(l){g.push({box:l,Ma:1701733238})}).O("hev1",function(l){g.push({box:l,Ma:1701733238})}).O("hvc1",
|
|
257
257
|
function(l){g.push({box:l,Ma:1701733238})}).O("avc1",function(l){g.push({box:l,Ma:1701733238})}).O("avc3",function(l){g.push({box:l,Ma:1701733238})}).O("ac-3",function(l){g.push({box:l,Ma:1701733217})}).O("ec-3",function(l){g.push({box:l,Ma:1701733217})}).O("ac-4",function(l){g.push({box:l,Ma:1701733217})}).O("mp4a",function(l){g.push({box:l,Ma:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw Ya(kg(a)),new O(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
|
|
258
258
|
a=Dh(a,e,k.box,f,k.Ma);return a}
|
|
259
259
|
function Dh(a,b,c,d,e){var f=Eh.value(),g=a.subarray(c.start,c.start+c.size),h=nb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=nb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Fh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=vd()?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,Fh(e,d.start,d.size+k.byteLength);k=nb(e,b.start);b=bg(b);a=k.getUint32(b);
|
|
260
|
-
k.setUint32(b,a+1);return e}function Fh(a,b,c){a=nb(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 Eh=new Hf(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 Gh(a,b,c,d,e,f,g){this.Z=a;this.Qa=b;this.wa=c;this.Ve=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Gh.prototype.Rc=function(){return this.Qa};Gh.prototype.Oc=function(){return this.wa};function Hh(a,b){return a&&b?a.Rc()==b.Rc()&&a.Oc()==b.Oc()&&xb(a.Z().sort(),b.Z().sort())&&fb(a.g,b.g):a==b}N("shaka.media.InitSegmentReference",Gh);Gh.prototype.getEndByte=Gh.prototype.Oc;
|
|
260
|
+
k.setUint32(b,a+1);return e}function Fh(a,b,c){a=nb(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 Eh=new Hf(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 Gh(a,b,c,d,e,f,g){this.Z=a;this.Qa=b;this.wa=c;this.Ve=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Gh.prototype.Rc=function(){return this.Qa};Gh.prototype.Oc=function(){return this.wa};function Hh(a,b){return a===b?!0:a&&b?a.Rc()==b.Rc()&&a.Oc()==b.Oc()&&xb(a.Z().sort(),b.Z().sort())&&fb(a.g,b.g):a==b}N("shaka.media.InitSegmentReference",Gh);Gh.prototype.getEndByte=Gh.prototype.Oc;
|
|
261
261
|
Gh.prototype.getStartByte=Gh.prototype.Rc;
|
|
262
262
|
function S(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v){l=void 0===l?[]:l;p=void 0===p?Ih:p;this.startTime=a;this.h=this.endTime=b;this.A=c;this.Qa=d;this.wa=e;this.aa=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.u=void 0===n?null:n;this.ca=void 0===q?null:q;this.status=p;this.l=!1;this.j=!0;this.m=!1;this.aes128Key=void 0===u?null:u;this.s=null;this.i=0;this.o=void 0===v?!1:v;this.Md=this.Zc=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.ag();
|
|
263
263
|
this.o&&this.g.length&&this.g[this.g.length-1].$f();this.mimeType=this.codecs=null}r=S.prototype;r.Z=function(){return this.A()};r.getStartTime=function(){return this.startTime};r.Ug=function(){return this.endTime};r.Rc=function(){return this.Qa};r.Oc=function(){return this.wa};r.lh=function(){return this.tilesLayout};r.kh=function(){return this.u};r.Pb=function(){return this.status};r.Bh=function(){this.status=Jh};r.Ue=function(){this.l=!0};r.xh=function(){return this.l};r.Od=function(){this.j=!1};
|
|
@@ -306,16 +306,16 @@ function pi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8A
|
|
|
306
306
|
r.Hh=function(a){ze("TsParser","Please use parseNalus function instead.");return this.cf(a)};
|
|
307
307
|
r.cf=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=lg(b.data,q),b.fullData=lg(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=lg(b.data,k),b.fullData=lg(b.fullData,k)));if(n>=e-f)return h;
|
|
308
308
|
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=lg(b.data,a),b.fullData=lg(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=lg.apply(fg,w(c.value)),(c=pi(c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Uh(c.data),dts:c.dts,pts:c.pts});return a};
|
|
309
|
-
r.
|
|
309
|
+
r.Mb=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=lg.apply(fg,w(c.value)),e=pi(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=lg(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};
|
|
310
310
|
r.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=lg.apply(fg,w(d.value)),f=pi(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=lg(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.cf(d,g,void 0),
|
|
311
|
-
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)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.
|
|
311
|
+
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)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Mb();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};r.Nc=function(){return{audio:this.o,video:this.m}};
|
|
312
312
|
r.Fd=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};r.oh=function(){ze("TsParser","Please use getVideoInfo function instead.");var a=this.Je();return{height:a.height,width:a.width}};r.Je=function(){return"hvc"==this.m?qi(this):ri(this)};
|
|
313
313
|
function ri(a){var b={height:null,width:null,ha:null};a=a.Fd();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new di(a.data);var c=ki(a),d=ki(a),e=ki(a);ii(a);if(si.includes(c)){var f=T(a);3===f&&fi(a,1);ii(a);ii(a);fi(a,1);if(U(a)){f=3!==f?8:12;for(var g=0;g<f;g++)U(a)&&(6>g?li(a,16):li(a,64))}}ii(a);f=T(a);if(0===f)T(a);else if(1===f)for(fi(a,1),ii(a),ii(a),f=T(a),g=0;g<f;g++)ii(a);ii(a);fi(a,1);f=T(a);g=T(a);var h=gi(a,1);0===h&&fi(a,1);fi(a,1);var k=0,l=0,m=0,n=
|
|
314
314
|
0;U(a)&&(k=T(a),l=T(a),m=T(a),n=T(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.ha="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
315
315
|
function qi(a){var b={height:null,width:null,ha:null};a=a.Fd();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new di(a.fullData,!0);ki(c);ki(c);gi(c,4);var d=gi(c,3);U(c);var e=gi(c,2),f=gi(c,1),g=gi(c,5),h=gi(c,32);a=ki(c);for(var k=ki(c),l=ki(c),m=ki(c),n=ki(c),q=ki(c),p=ki(c),u=[],v=[],x=0;x<d;x++)u.push(U(c)),v.push(U(c));if(0<d)for(x=d;8>x;x++)gi(c,2);for(x=0;x<d;x++)u[x]&&gi(c,88),v[x]&&ki(c);T(c);d=T(c);3==d&&gi(c,1);u=T(c);v=T(c);var z=x=0,y=0,B=0;U(c)&&
|
|
316
316
|
(x+=T(c),z+=T(c),y+=T(c),B+=T(c));b.width=String(u-(x+z)*(1===d||2===d?2:1));b.height=String(v-(y+B)*(1===d?2:1));c=function(A){for(var D=0,F=0;32>F;F++)D|=(A>>F&1)<<31-F;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;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+="."+
|
|
317
317
|
a.toString(16).toUpperCase());b.ha=e;return b}function ti(a){return 0>oi(a)?!1:!0}function oi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}N("shaka.util.TsParser",ni);ni.syncOffset=oi;ni.probe=ti;ni.prototype.getVideoInfo=ni.prototype.Je;ni.prototype.getVideoResolution=ni.prototype.oh;ni.prototype.getVideoNalus=ni.prototype.Fd;ni.prototype.getCodecs=ni.prototype.Nc;ni.prototype.getStartTime=ni.prototype.getStartTime;
|
|
318
|
-
ni.prototype.getVideoData=ni.prototype.ic;ni.prototype.getAudioData=ni.prototype.
|
|
318
|
+
ni.prototype.getVideoData=ni.prototype.ic;ni.prototype.getAudioData=ni.prototype.Mb;ni.prototype.getMetadata=ni.prototype.getMetadata;ni.prototype.parseNalus=ni.prototype.cf;ni.prototype.parseAvcNalus=ni.prototype.Hh;ni.prototype.parse=ni.prototype.parse;ni.prototype.clearData=ni.prototype.clearData;ni.Timescale=9E4;var si=[100,110,122,244,44,83,86,118,128,138,139,134];function ui(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&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,ze("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"),
|
|
319
319
|
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 vi(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
320
320
|
ui.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function wi(a,b,c){var d=xi,e=yi;switch(b.mimeType){case "video/webm":d=zi;break;case "video/mp4":d=Ai}switch(c){case "DASH":e=Bi;break;case "HLS":e=Ci}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}N("shaka.lcevc.Dec",ui);ui.prototype.release=ui.prototype.release;var xi=0,zi=1,Ai=2,Ci=0,Bi=1,yi=-1;function Di(a,b,c,d){var e=this;this.i=a;this.C=null;this.F=b;this.g={};this.G={};this.ma={};this.h=null;this.Y=!1;this.Aa=c||function(){};this.N=d||null;this.j={};this.s=new Af;this.m={};this.H=null;this.J=new Ze;this.K="";this.da=!1;this.l=Ei(this,this.J);this.A=!1;this.I=new yf(function(){return Fi(e)});this.u=!1;this.W="UNKNOWN";this.ka=this.za=!1;this.Ba=new Ze;this.o=!1;this.ea=!0;this.V=null}
|
|
321
321
|
function Ei(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.ea=!0});a.s.D(c,"endstreaming",function(){a.ea=!1});a.s.ja(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ja(a.i,"playing",function(){a.da=!0});a.K=Gi(c);a.i.src=a.K;return c}c=new MediaSource;a.s.ja(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ja(a.i,"playing",function(){a.da=!0});a.K=Gi(c);a.i.src=a.K;return c}
|
|
@@ -349,9 +349,9 @@ function aj(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){if
|
|
|
349
349
|
function ij(a,b,c){if(b==Dc)var d=!1;else{d=Mc(Oc(a.G[b]));var e=Nc(a.G[b]),f=Gc(c.mimeType,c.codecs),g=a.C.forceTransmux;if(!Za(f)||!a.u&&Hc.includes(f)||c.codecs.includes(","))g=!0;c=Ic(c.mimeType,c.codecs);g&&(g=$b(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=Mc(Oc(f));f=Nc(f);d=d!==b||e!==f}return d?"smooth"!==a.C.codecSwitchingStrategy||!bb()||a.o:!1}var Gi=window.URL.createObjectURL,Ji="sequence";function jj(a,b,c){this.i=a;this.o=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.C=!0;this.F=0;this.A=void 0===c?!0:c;this.G=0;this.m=!1}r=jj.prototype;r.getDuration=function(){return this.j};r.$g=function(){return this.g};r.qf=function(a){this.i=a};r.Pa=function(a){this.j=a};r.eh=function(){return this.i};r.mg=function(a){this.s=a};r.nc=function(a){this.C=a};r.Xd=function(a){this.u=a};r.ng=function(a){this.o=a};r.Tg=function(){return this.o};
|
|
350
350
|
r.dg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Sd(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.A&&!this.m&&(this.i=(Date.now()+this.s)/1E3-this.h-this.g)}};
|
|
351
351
|
r.Xc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.s)/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.Sd(b);this.h=Math.max(this.h,c);null!=this.i&&this.A&&!this.m&&(this.i=d-this.h-this.g)}};r.Nd=function(){this.m=!0};r.yh=function(){return this.m};r.Sd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};
|
|
352
|
-
r.Ye=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.R=function(){return Infinity==this.j&&!this.C};r.Rb=function(){return Infinity!=this.j&&!this.C};r.eb=function(){return Math.max(this.F,this.
|
|
353
|
-
r.Qc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.u?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.
|
|
354
|
-
jj.prototype.getSeekRangeEnd=jj.prototype.qb;jj.prototype.getSeekRangeStart=jj.prototype.fc;jj.prototype.getSafeSeekRangeStart=jj.prototype.Qc;jj.prototype.getSegmentAvailabilityEnd=jj.prototype.
|
|
352
|
+
r.Ye=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.R=function(){return Infinity==this.j&&!this.C};r.Rb=function(){return Infinity!=this.j&&!this.C};r.eb=function(){return Math.max(this.F,this.Bb()-this.u)};r.qg=function(a){this.F=a};r.Bb=function(){return this.R()||this.Rb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
|
|
353
|
+
r.Qc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.u?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Bb()-this.u+a,this.qb()))};r.fc=function(){return this.Qc(0)};r.qb=function(){return Math.max(0,this.Bb()-(this.R()||this.Rb()?this.o:0))};r.ug=function(){return null==this.i||null!=this.h&&this.A?!1:!0};r.lg=function(a){this.G=a};N("shaka.media.PresentationTimeline",jj);jj.prototype.setAvailabilityTimeOffset=jj.prototype.lg;jj.prototype.usingPresentationStartTime=jj.prototype.ug;
|
|
354
|
+
jj.prototype.getSeekRangeEnd=jj.prototype.qb;jj.prototype.getSeekRangeStart=jj.prototype.fc;jj.prototype.getSafeSeekRangeStart=jj.prototype.Qc;jj.prototype.getSegmentAvailabilityEnd=jj.prototype.Bb;jj.prototype.setUserSeekStart=jj.prototype.qg;jj.prototype.getSegmentAvailabilityStart=jj.prototype.eb;jj.prototype.isInProgress=jj.prototype.Rb;jj.prototype.isLive=jj.prototype.R;jj.prototype.offset=jj.prototype.offset;jj.prototype.notifyMaxSegmentDuration=jj.prototype.Ye;
|
|
355
355
|
jj.prototype.notifyMinSegmentStartTime=jj.prototype.Sd;jj.prototype.isStartTimeLocked=jj.prototype.yh;jj.prototype.lockStartTime=jj.prototype.Nd;jj.prototype.notifySegments=jj.prototype.Xc;jj.prototype.notifyTimeRange=jj.prototype.dg;jj.prototype.getDelay=jj.prototype.Tg;jj.prototype.setDelay=jj.prototype.ng;jj.prototype.setSegmentAvailabilityDuration=jj.prototype.Xd;jj.prototype.setStatic=jj.prototype.nc;jj.prototype.setClockOffset=jj.prototype.mg;jj.prototype.getPresentationStartTime=jj.prototype.eh;
|
|
356
356
|
jj.prototype.setDuration=jj.prototype.Pa;jj.prototype.setPresentationStartTime=jj.prototype.qf;jj.prototype.getMaxSegmentDuration=jj.prototype.$g;jj.prototype.getDuration=jj.prototype.getDuration;function kj(a,b,c){this.j=c;this.l=a;this.s=lj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=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(Nh(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.u=e;this.g=a;this.A=b;this.s=c;this.l=new Af;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return pj(f)});this.m=(new qd(function(){pj(f)})).$a(this.s.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.A=this.u=null};oj.prototype.af=function(){this.o=!0;pj(this)};
|
|
357
357
|
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.F&&(a.F=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.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Oh(c,b,a.s.gapDetectionThreshold),null==
|
|
@@ -363,21 +363,21 @@ function Aj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.
|
|
|
363
363
|
g.g.fc():g.g.qb():0>h&&(h=g.g.qb()+h);return Dj(g,Ej(g,h))});this.m=new qd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=vj(g.h),k=g.g.fc(),l=g.g.qb();3>l-k&&(k=l-3);h<k&&(h=Cj(g,h),g.i.currentTime=h)}})}r=Aj.prototype;r.ie=function(){this.m.$a(.25)};r.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.u=function(){}};r.je=function(a){wj(this.h,a)};
|
|
364
364
|
r.qd=function(){var a=vj(this.h);return 0<this.i.readyState&&!this.i.paused?Ej(this,a):a};r.Bf=function(){return this.o?this.o.o:0};r.Af=function(){return this.j.C};r.cg=function(){this.j.af()};function Dj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
365
365
|
function Cj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.fc(),f=a.g.qb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Qc(c),k=a.g.Qc(d);c=a.g.Qc(c+d);return b>=g?Dj(a,b):b>f?f:b<e?Lh(a.i.buffered,k)?k:c:b>=h||Lh(a.i.buffered,b)?b:c}function Ej(a,b){var c=a.g.fc();if(b<c)return c;a=a.g.qb();return b>a?a:b}
|
|
366
|
-
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.
|
|
366
|
+
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.o=!1}r=Fj.prototype;r.Ab=function(){return this.g.length};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.Ch=function(){this.o=!0};function Gj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}r.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};
|
|
367
367
|
r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};r.Qd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,w(a))}};
|
|
368
368
|
r.Wc=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.Qd(a);this.bb(b)};r.bb=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
369
369
|
r.bc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){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 S(a.startTime,b,a.A,a.Qa,a.wa,a.aa,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.u,a.ca,a.status,a.aes128Key),this.g[this.g.length-1].i=a.i)}};
|
|
370
|
-
r.Yd=function(a,b){var c=this;this.o||(this.
|
|
371
|
-
Fj.prototype.
|
|
372
|
-
Fj.prototype.getIteratorForTime=Fj.prototype.
|
|
370
|
+
r.Yd=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new qd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.m.stop(),c.m=null)}),this.m.$a(a))};Fj.prototype[Symbol.iterator]=function(){return this.Nb(0)};
|
|
371
|
+
Fj.prototype.Nb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.j;)e--,f=c.g[e];if(!f.j)return 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 S(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Fj([a])}N("shaka.media.SegmentIndex",Fj);Fj.forSingleSegment=Ij;
|
|
372
|
+
Fj.prototype.getIteratorForTime=Fj.prototype.Nb;Fj.prototype.updateEvery=Fj.prototype.Yd;Fj.prototype.fit=Fj.prototype.bc;Fj.prototype.evict=Fj.prototype.bb;Fj.prototype.mergeAndEvict=Fj.prototype.Wc;Fj.prototype.offset=Fj.prototype.offset;Fj.prototype.get=Fj.prototype.get;Fj.prototype.find=Fj.prototype.find;Fj.prototype.markImmutable=Fj.prototype.Ch;Fj.prototype.release=Fj.prototype.release;function Hj(a,b,c){this.i=a;this.g=b;this.h=c}Hj.prototype.Kg=function(){return this.g};
|
|
373
373
|
Hj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.g.length&&a.o&&this.h>=a.g.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.g.length?a.g[this.h]:a};Hj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.g.length?(this.h++,a.o&&this.h==a.g.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Hj);Hj.prototype.next=Hj.prototype.next;Hj.prototype.current=Hj.prototype.current;
|
|
374
|
-
Hj.prototype.currentPosition=Hj.prototype.Kg;function Jj(){Fj.call(this,[]);this.h=[]}oa(Jj,Fj);r=Jj.prototype;r.clone=function(){var a=new Jj;a.h=this.h.slice();return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.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.
|
|
375
|
-
r.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.
|
|
374
|
+
Hj.prototype.currentPosition=Hj.prototype.Kg;function Jj(){Fj.call(this,[]);this.h=[]}oa(Jj,Fj);r=Jj.prototype;r.clone=function(){var a=new Jj;a.h=this.h.slice();return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.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.Ab()}return null};
|
|
375
|
+
r.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.Ab()}return null};r.offset=function(){};r.Qd=function(){};r.bb=function(){};r.Wc=function(){};r.bc=function(){};r.Yd=function(){};N("shaka.media.MetaSegmentIndex",Jj);Jj.prototype.updateEvery=Jj.prototype.Yd;Jj.prototype.fit=Jj.prototype.bc;Jj.prototype.mergeAndEvict=Jj.prototype.Wc;Jj.prototype.evict=Jj.prototype.bb;Jj.prototype.merge=Jj.prototype.Qd;Jj.prototype.offset=Jj.prototype.offset;
|
|
376
376
|
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.Ed();this.i=new qd(function(){b.g.bg(.25*b.h)})}Kj.prototype.release=function(){this.set(this.ec());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.Ed()!=b&&this.g.rf(b);break a}catch(c){}this.i.$a(.25);0!=this.g.Ed()&&this.g.rf(0)}};Kj.prototype.ec=function(){return this.g.ec()};function Lj(a){var b=this;this.h=a;this.g=new Set;this.i=(new qd(function(){Mj(b,!1)})).$a(.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){jf.call(this);this.g=new Map;this.h=a}oa(Nj,jf);Nj.prototype.release=function(){this.g.clear();jf.prototype.release.call(this)};function Oj(a,b){var c=a.g.get(b);c||(c={$c:[],If: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={Ve:b,position:c};d=d.$c;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
377
377
|
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.$c;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Ve;break a}}d=null}if(e=d)e=c.If,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);
|
|
378
378
|
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.If=d,JSON.stringify(d),c=new Q("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.$c;b.$c=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.$c=[]};function Rj(a){jf.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new qd(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 Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).$a(2)}oa(Rj,jf);Rj.prototype.release=function(){this.g.clear();this.h.stop();jf.prototype.release.call(this)};function Sj(a,b){jf.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Yb:null,Xb:Tj,Qb:function(d,e){return Uj(c,"enter",d,e)}},{Yb:Vj,Xb:Tj,Qb:function(d,e){return Uj(c,"enter",d,e)}},{Yb:Wj,Xb:Tj,Qb:function(d,e){return Uj(c,"enter",d,e)}},{Yb:Tj,Xb:Vj,Qb:function(d,e){return Uj(c,"exit",d,e)}},{Yb:Tj,Xb:Wj,Qb:function(d,e){return Uj(c,"exit",d,e)}},{Yb:Vj,Xb:Wj,Qb:function(d,e){return Uj(c,"skip",d,e)}},{Yb:Wj,Xb:Vj,Qb:function(d,e){return Uj(c,"skip",d,e)}}];this.h=new Af;this.h.D(this.i,
|
|
379
379
|
"regionremove",function(d){c.g.delete(d.region)})}oa(Sj,jf);Sj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;jf.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.Yb==e&&h.Xb==f&&h.Qb(d,b)}}};
|
|
380
|
-
function Uj(a,b,c,d){b=new Q(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.
|
|
380
|
+
function Uj(a,b,c,d){b=new Q(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.Nb(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.size<a.i&&null!=e;){b=!0;e.l&&null!=e.wa&&(b=!1);2==e.Pb()&&(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;if(a.h.fastSwitching&&e.Zc&&e.Md)break;e=d.next().value}}}}
|
|
381
381
|
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}
|
|
382
382
|
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=lg(d,e):d=e,a.h?C(f,a.h(d),3):f.B(0);d=new Uint8Array(0);E(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.h=null;this.u=1;this.o=this.j=null;this.F=0;this.C=!1;this.i=new Map;this.A=!1;this.G=null;this.s=!1;this.l=new yf(function(){return hk(c)});this.H=Date.now()/1E3}r=gk.prototype;r.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.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,ik(e),b.push(jk(e));return C(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;E(f)})}
|
|
383
383
|
r.configure=function(a){this.h=a;this.G=new We({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);for(var b=t(this.i.keys()),c=b.next();!c.done;c=b.next())if(c=this.i.get(c.value),c.ra){var d=c.ra,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||
|
|
@@ -390,32 +390,32 @@ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Na.h.g>h?
|
|
|
390
390
|
r.dd=function(){if(this.g)for(var a=this.g.Dd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.X&&(e=c.X.current());if(!e||e.startTime>a||e.endTime<a)c.X=null;e=this.g.T;e.A?e=!1:d==Dc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Ni(e,d),e=Lh(e,a));e||((null!=Oi(this.g.T,d)||c.Da)&&wk(this,c),c.Na&&(c.Na.abort(),c.Na=null),d===Dc&&(d=this.g.T,d.H&&d.H.h()),c.dd=!0)}};
|
|
391
391
|
function wk(a,b){b.Jc||b.wb||(b.Da?(b.wb=!0,b.vd=0):null==Mi(a.g.T,b.type)?null==b.ib&&ok(a,b,0):(ik(b),uk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
392
392
|
function lk(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Ec;if(!a.j)throw new O(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.P,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.$,a.j.video),d.add(a.j.video));a.o&&(c.set(b.na,a.o),d.add(a.o));e=a.g.T;return C(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}zf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.i.has(h)||(l=nk(a,k),a.i.set(h,l),ok(a,l,0));
|
|
393
|
-
E(m)})}function nk(a,b){return{stream:b,type:b.type,X:null,ra:kk(a,b),Ca:null,
|
|
393
|
+
E(m)})}function nk(a,b){return{stream:b,type:b.type,X:null,ra:kk(a,b),Ca:null,Db:null,Re:null,Pe:null,Oe:null,Ub:null,endOfStream:!1,Da:!1,ib:null,wb:!1,vd:0,Zd:!1,Jc:!1,dd:!0,Xe:!1,ff:!1,Tc:!1,Na:null}}function kk(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.h.segmentPrefetchLimit?new Xj(a.h.segmentPrefetchLimit,b,function(c,d,e){return xk(a,c,d,e)}):null}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.T.Pa(a):this.g.T.Pa(Math.pow(2,32))};
|
|
394
394
|
function yk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:zf(a.l);if(b.Da||null==b.ib||b.Jc)return h.return();b.ib=null;if(!b.wb){h.B(2);break}return C(h,uk(a,b,b.Zd,b.vd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Da||b.ib||ok(a,b,0),h.return();case 4:sa(h,6);d=zk(a,b);null!=d&&(ok(a,b,d),b.Tc=!1);ua(h,7);break;case 6:return e=
|
|
395
395
|
va(h),C(h,Ak(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return C(h,a.g.T.endOfStream(),10);case 10:zf(a.l),g=a.g.T.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Pa(g),E(h)}})}
|
|
396
396
|
function zk(a,b){if(Bk(b))return Wi(a.g.T,b.stream.originalId||""),null;b.type==Dc&&Xi(a.g.T);if(!a.g.T.ea&&b.type!=Dc)return a.h.updateIntervalSeconds/2;var c=a.g.Dd(),d=b.Ca?b.Ca.endTime:c,e=Pi(a.g.T,b.type,c),f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u),g=a.m.presentationTimeline.getDuration()-d,h=Oi(a.g.T,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Dc))&&Bk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/
|
|
397
|
-
2;e=Dk(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Bk(h)||h.X&&!h.X.current()||(f=Math.min(f,h.Ca?h.Ca.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ra&&b.X&&(d=e.aa,!d||b.Ca&&Hh(d,b.
|
|
398
|
-
function Dk(a,b,c,d){if(b.X)return b.X.current();if(b.Ca||d)return c=b.Ca?b.Ca.endTime:d,b.Xe=!0,b.X=b.stream.segmentIndex.
|
|
397
|
+
2;e=Dk(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Bk(h)||h.X&&!h.X.current()||(f=Math.min(f,h.Ca?h.Ca.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ra&&b.X&&(d=e.aa,!d||b.Ca&&Hh(d,b.Db)||bk(b.ra,d),Yj(b.ra,e));Ek(a,b,c,e).catch(function(){});return null}
|
|
398
|
+
function Dk(a,b,c,d){if(b.X)return b.X.current();if(b.Ca||d)return c=b.Ca?b.Ca.endTime:d,b.Xe=!0,b.X=b.stream.segmentIndex.Nb(c),b.X&&b.X.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.X=b.stream.segmentIndex.Nb(d),e=b.X&&b.X.next().value);e||(b.X=b.stream.segmentIndex.Nb(c),e=b.X&&b.X.next().value);return e}
|
|
399
399
|
function Ek(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:e=Ec;f=b.stream;g=b.X;b.Da=!0;sa(A,2);if(2==d.Pb())throw new O(1,1,1011);return C(A,Fk(a,b,d),4);case 4:zf(a.l);if(a.s)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=q=!1,v=function(D){var F,J,G,H;return K(function(I){switch(I.g){case 1:if(q)return I.return();p=!0;zf(a.l);if(a.s)return I.return();
|
|
400
400
|
sa(I,2);n=Gk(n,D);F=!1;J=0;(new Wf).box("mdat",function(L){J=L.size+L.start;F=!0}).parse(n,!1,!0);if(!F){I.B(4);break}G=n.subarray(0,J);n=n.subarray(J);return C(I,Hk(a,b,c,f,d,G,!0),5);case 5:b.ra&&b.X&&Yj(b.ra,d,!0);case 4:ua(I,0);break;case 2:u=H=va(I),E(I)}})},C(A,Ik(a,b,d,v),9);l=Ik(a,b,d);return C(A,l,7);case 7:m=A.h;zf(a.l);if(a.s)return A.return();zf(a.l);return b.wb?(b.Da=!1,ok(a,b,0),A.return()):C(A,Hk(a,b,c,f,d,m),6);case 9:x=A.h;if(u)throw u;if(p){A.B(10);break}q=!0;zf(a.l);return a.s?
|
|
401
401
|
A.return():b.wb?(b.Da=!1,ok(a,b,0),A.return()):C(A,Hk(a,b,c,f,d,x),10);case 10:b.ra&&b.X&&Yj(b.ra,d,!0);case 6:zf(a.l);if(a.s)return A.return();b.Ca=d;g.next();b.Da=!1;b.ff=!1;z=a.g.T.pb();y=z[b.type];Xa(JSON.stringify(y));b.wb||a.g.af(d,b.stream);ok(a,b,0);ua(A,0);break;case 2:B=va(A);zf(a.l,B);if(a.s)return A.return();b.Da=!1;if(7001==B.code)b.Da=!1,ik(b),ok(a,b,0),A.B(0);else if(b.type==e.na&&a.h.ignoreTextStreamFailures)a.i.delete(e.na),A.B(0);else if(3017==B.code)Jk(a,b,B),A.B(0);else return b.Tc=
|
|
402
402
|
!0,B.severity=2,C(A,Ak(a,b,B),0)}})}function Kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.B(2):C(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=hb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Gk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
403
403
|
function Jk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.ff})){if(0<a.h.maxDisabledTime&&a.g.wd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.Tc=!0;a.s=!0;a.g.onError(c);return}b.ff=!0}ok(a,b,4)}
|
|
404
|
-
function Fk(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v;return K(function(x){if(1==x.g){d=Ec;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Mc(b.stream.codecs);k=Nc(b.stream.mimeType);l=c.timestampOffset;if(l==b.Re&&f==b.Pe&&g==b.Oe&&h==b.Qe&&k==b.Yf)return x.B(2);if(m=b.Qe&&b.Yf&&ij(a.g.T,b.type,b.stream))n=null,b.type===d.$?n=a.i.get(d.P):b.type===d.P&&(n=a.i.get(d.$)),n&&(n.
|
|
405
|
-
new Map,a.j.audio&&z.set(d.P,a.j.audio),a.j.video&&z.set(d.$,a.j.video),sa(D,2),b.Pe=f,b.Oe=g,b.Qe=h,b.Yf=k,b.Re=l,y=a.m.sequenceMode||"HLS"==a.m.type,C(D,$i(a.g.T,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=D.g)return m&&(B=null,b.type===d.$?B=a.i.get(d.P):b.type===d.P&&(B=a.i.get(d.$)),B&&(B.wb=!1,B.Da=!1,wk(a,B))),ua(D,0);A=va(D);b.Pe=null;b.Oe=null;b.Qe=null;b.Re=null;throw A;})};return C(x,q(),2)}Hh(c.aa,b.
|
|
404
|
+
function Fk(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v;return K(function(x){if(1==x.g){d=Ec;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Mc(b.stream.codecs);k=Nc(b.stream.mimeType);l=c.timestampOffset;if(l==b.Re&&f==b.Pe&&g==b.Oe&&h==b.Qe&&k==b.Yf)return x.B(2);if(m=b.Qe&&b.Yf&&ij(a.g.T,b.type,b.stream))n=null,b.type===d.$?n=a.i.get(d.P):b.type===d.P&&(n=a.i.get(d.$)),n&&(n.Db=null,wk(a,n),jk(n).catch(function(){}));q=function(){var z,y,B,A;return K(function(D){if(1==D.g)return z=
|
|
405
|
+
new Map,a.j.audio&&z.set(d.P,a.j.audio),a.j.video&&z.set(d.$,a.j.video),sa(D,2),b.Pe=f,b.Oe=g,b.Qe=h,b.Yf=k,b.Re=l,y=a.m.sequenceMode||"HLS"==a.m.type,C(D,$i(a.g.T,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=D.g)return m&&(B=null,b.type===d.$?B=a.i.get(d.P):b.type===d.P&&(B=a.i.get(d.$)),B&&(B.wb=!1,B.Da=!1,wk(a,B))),ua(D,0);A=va(D);b.Pe=null;b.Oe=null;b.Qe=null;b.Re=null;throw A;})};return C(x,q(),2)}Hh(c.aa,b.Db)||(b.Db=c.aa,c.j&&c.aa&&(p=Ik(a,b,c.aa),u=function(){var z,
|
|
406
406
|
y,B,A,D,F;return K(function(J){switch(J.g){case 1:return sa(J,2),C(J,p,4);case 4:return z=J.h,zf(a.l),y=null,B=new Map,A=new Wf,A.box("moov",ag).box("trak",ag).box("mdia",ag).O("mdhd",function(G){y=Yh(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.ub(4);var H=String.fromCharCode(G[0]);H+=String.fromCharCode(G[1]);H+=String.fromCharCode(G[2]);H+=String.fromCharCode(G[3]);switch(H){case "soun":B.set(d.P,y);break;case "vide":B.set(d.$,y)}y=null}).parse(z),B.has(b.type)?
|
|
407
|
-
c.aa.timescale=B.get(b.type):null!=y&&(c.aa.timescale=y),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(J,a.g.Ef(b.type,z),5);case 5:return C(J,Ri(a.g.T,b.type,z,null,b.stream,D),6);case 6:ua(J,0);break;case 2:throw F=va(J),b.
|
|
407
|
+
c.aa.timescale=B.get(b.type):null!=y&&(c.aa.timescale=y),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(J,a.g.Ef(b.type,z),5);case 5:return C(J,Ri(a.g.T,b.type,z,null,b.stream,D),6);case 6:ua(J,0);break;case 2:throw F=va(J),b.Db=null,F;}})},a.g.Eh(c.startTime,c.aa),e.push(u())));a.m.sequenceMode&&(v=b.Ca?b.Ca.i:null,c.i!=v||b.Xe)&&(b.Xe=!1,e.push(bj(a.g.T,b.type,c.startTime)));return C(x,Promise.all(e),0)})}
|
|
408
408
|
function Hk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return K(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.C;if(l||m)k=new Wf;l&&k.O("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var x=u.reader.ad();var z=u.reader.ad();var y=u.reader.L();var B=u.reader.L();var A=u.reader.L();var D=u.reader.L();var F=e.startTime+B/y}else y=u.reader.L(),F=u.reader.mc()/
|
|
409
409
|
y+e.timestampOffset,B=F-e.startTime,A=u.reader.L(),D=u.reader.L(),x=u.reader.ad(),z=u.reader.ad();u=u.reader.ub(u.reader.getLength()-u.reader.qa());if(v&&v.includes(x)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.Fh():(v=(new Map).set("detail",{startTime:F,endTime:F+A/y,schemeIdUri:x,value:z,timescale:y,presentationTimeDelta:B,eventDuration:A,id:D,messageData:u}),v=new Q("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
410
410
|
x||(x=Uh(u),x.length&&e&&a.g.Gh([{cueTime:e.startTime,data:u,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.O("prft",function(u){if(!a.C&&e.aa.timescale){var v=u.reader,x=u.version;v.L();u=v.L();var z=v.L();u=1E3*u+z/Math.pow(2,32)*1E3;0===x?v=v.L():(x=v.L(),v=v.L(),v=x*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.aa.timescale*1E3)});v=new Q("prft",v);a.g.onEvent(v);
|
|
411
|
-
a.C=!0}});(l||m)&&k.parse(f);return C(p,Lk(a,b,c),2);case 2:return zf(a.l),n=b.dd,b.dd=!1,q=b.Cf,b.Cf=!1,C(p,a.g.Ef(b.type,f),3);case 3:return C(p,Ri(a.g.T,b.type,f,e,d,h,n,q,g),4);case 4:zf(a.l),E(p)}})}function Lk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Mi(a.g.T,b.type);if(null==e)return h.return();f=c-e;g=f-d;return
|
|
411
|
+
a.C=!0}});(l||m)&&k.parse(f);return C(p,Lk(a,b,c),2);case 2:return zf(a.l),n=b.dd,b.dd=!1,q=b.Cf,b.Cf=!1,C(p,a.g.Ef(b.type,f),3);case 3:return C(p,Ri(a.g.T,b.type,f,e,d,h,n,q,g),4);case 4:zf(a.l),E(p)}})}function Lk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Mi(a.g.T,b.type);if(null==e)return h.return();f=c-e;g=f-d;return 1>=g?h.return():C(h,a.g.T.remove(b.type,e,e+g),2)}zf(a.l);E(h)})}
|
|
412
412
|
function Bk(a){return a&&a.type==Dc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
413
413
|
function Ik(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Gh&&(e=c.g))return l.return(e);f=null;if(b.ra){var m=b.ra;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.X&&(g=b.X.g);b.Na=f;return C(l,f.promise,2);case 2:h=l.h;b.Na=null;k=h.data;if(!c.aes128Key){l.B(3);break}return C(l,Kk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
414
414
|
function xk(a,b,c,d){var e=b instanceof S?b:void 0,f=e?1:0;b=fk(b.Z(),b.Qa,b.wa,a.h.retryParameters,d);return a.g.Tb.request(wf,b,{type:f,stream:c,segment:e})}
|
|
415
|
-
function uk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.wb=!1,b.Zd=!1,b.vd=0,b.Jc=!0,b.Ca=null,b.
|
|
415
|
+
function uk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.wb=!1,b.Zd=!1,b.vd=0,b.Jc=!0,b.Ca=null,b.Db=null,b.X=null,b.ra&&ck(b.ra),d?(e=a.g.Dd(),f=a.g.T.getDuration(),C(g,a.g.T.remove(b.type,e+d,f),3)):C(g,Zi(a.g.T,b.type),4);if(3!=g.g)return zf(a.l),c?C(g,a.g.T.flush(b.type),3):g.B(3);zf(a.l);b.Jc=!1;b.endOfStream=!1;b.Da||b.ib||ok(a,b,0);E(g)})}
|
|
416
416
|
function ok(a,b,c){var d=b.type;if(d!=Dc||a.i.has(d))b.ib=(new pd(function(){var e;return K(function(f){if(1==f.g)return sa(f,2),C(f,yk(a,b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);E(f)})})).U(c)}function ik(a){null!=a.ib&&(a.ib.stop(),a.ib=null)}function jk(a){return K(function(b){return a.Na?C(b,a.Na.abort(),0):b.B(0)})}
|
|
417
417
|
function Ak(a,b,c){var d;return K(function(e){if(1==e.g)return C(e,Ye(a.G),2);zf(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.wd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);E(e)})}
|
|
418
|
-
function Mk(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.H<c)return h.return(!1);a.H=b;d=Ec;if(e=a.i.get(d.P))e.
|
|
418
|
+
function Mk(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.H<c)return h.return(!1);a.H=b;d=Ec;if(e=a.i.get(d.P))e.Db=null,wk(a,e),jk(e).catch(function(){});if(f=a.i.get(d.$))f.Db=null,wk(a,f),jk(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.P,a.j.audio);a.j.video&&g.set(d.$,a.j.video);return C(h,hj(a.g.T,g),2)}return h.return(!0)})};function Nk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new fc(a)).Ga.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Ok[d])return m.return(e);f=0;g=qf([a],c);sa(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ua(m,3);break;case 2:k=va(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
419
419
|
e.toLowerCase().split(";").shift():"")}})}
|
|
420
420
|
var Ok={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Pk(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Pk(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Qk(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Qk(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;k=k.next().value;
|
|
421
421
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
@@ -452,7 +452,7 @@ function il(a,b,c){try{if(!a.g.enabled)return b;var d=jl(a);a:{switch(c.toLowerC
|
|
|
452
452
|
!0;var f=nl(d);return ol(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function jl(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
453
453
|
function pl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,jl(a));c.pr=a.h.Cd();var e=c.ot===ql||c.ot===ll;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);if(d)a=rl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=nl(c);f&&(b.uris=b.uris.map(function(g){return ol(g,f)}))}}}
|
|
454
454
|
function sl(a){if(0===a.type)return tl;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?ll:ql;if("audio"==b)return kl;if("text"==b)return"application/mp4"===a.mimeType?ul:vl}}function wl(a,b){b=a.h.pb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
455
|
-
function xl(a,b){var c=a.h.
|
|
455
|
+
function xl(a,b){var c=a.h.Cb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case ql:return a.videoBandwidth||NaN;case kl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
456
456
|
function nl(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
457
457
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function rl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=nl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
458
458
|
function ol(a,b){if(!b||a.includes("offline:"))return a;a=new fc(a);a.g.set("CMCD",b);return a.toString()}var ml="m",kl="a",ql="v",ll="av",tl="i",vl="c",ul="tt";N("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",yg:"s",OTHER:"o"});function yl(a){this.h=a;this.g=null}r=yl.prototype;r.configure=function(a){this.h=a};r.Rf=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(zl)?1E3*this.g.get(zl):null};r.Qf=function(){return this.h.enabled&&this.g&&this.g.has(Al)?1E3*this.g.get(Al):null};r.fh=function(){return this.h.enabled&&this.g&&this.g.has(Bl)?this.g.get(Bl):null};r.gh=function(){return this.h.enabled&&this.g&&this.g.has(Cl)?this.g.get(Cl):null};
|
|
@@ -480,7 +480,7 @@ function Rl(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").
|
|
|
480
480
|
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Dc&&"image"!=c.type||b.push(c);return b}N("shaka.util.PlayerConfiguration",Pl);Pl.mergeConfigObjects=Sl;Pl.createDefault=Ql;function Tl(){this.g=null;this.h=[]}function Ul(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Vl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Wl(){this.i=this.h=null;this.g=[]}function Xl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Yl(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.N=this.H=this.I=this.J=this.l=this.o=NaN;this.g=new Tl;this.h=new Wl};function W(a,b){jf.call(this);var c=this;this.l=Zl;this.xd=this.h=null;this.da=!1;this.Gd=new Af;this.qc=new Af;this.o=new Af;this.Ba=new Af;this.C=this.G=this.m=this.H=null;this.Kd=0;this.W=new Il;this.ma=this.ea=this.i=this.Ld=this.F=this.j=this.za=this.J=this.eg=this.Y=this.V=this.Aa=this.K=this.I=this.$b=null;this.mb=!1;this.Ne=this.s=null;this.We=1E9;this.Mc=[];this.N=NaN;this.g=$l(this);this.Id={width:Infinity,height:Infinity};this.u=null;this.kb=new Je(this.g.preferredAudioLanguage,this.g.preferredVariantRole,
|
|
481
481
|
this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.lb=this.g.preferredTextLanguage;this.Ic=this.g.preferredTextRole;this.Hc=this.g.preferForcedSubs;this.Fc=[];b&&b(this);this.V=am(this);this.Y=new yl(this.g.cmsd);this.H=bm(this);this.H.nf(this.g.streaming.forceHTTPS);this.A=null;cm&&(this.A=cm(),
|
|
482
482
|
this.A.configure(this.g.ads));this.Gd.D(window,"online",function(){dm(c);c.gf()});this.yd=new qd(function(){return em(c)});a&&(ze("Player","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Gc(a,!0))}oa(W,jf);function fm(a){null!=a.J&&(vi(a.J),a.J.release(),a.J=null)}
|
|
483
|
-
function gm(a,b){if(b.lcevc.enabled){var c=a.
|
|
483
|
+
function gm(a,b){if(b.lcevc.enabled){var c=a.Cb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(ud()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Sa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));fm(a);null==a.J&&(a.J=new ui(a.h,a.eg,b.lcevc),a.G&&(a.G.N=a.J))}else fm(a)}function hm(a,b){return new Q(a,b)}r=W.prototype;
|
|
484
484
|
r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==im)return c.return();fm(a);b=a.detach();a.l=im;return C(c,b,2);case 2:a.Gd&&(a.Gd.release(),a.Gd=null);a.qc&&(a.qc.release(),a.qc=null);a.o&&(a.o.release(),a.o=null);a.Ba&&(a.Ba.release(),a.Ba=null);a.Ne=null;a.g=null;a.u=null;a.xd=null;a.V=null;a.Y=null;if(!a.H){c.B(3);break}return C(c,a.H.destroy(),4);case 4:a.H=null;case 3:a.s&&(a.s.release(),a.s=null),jf.prototype.release.call(a),E(c)}})};
|
|
485
485
|
function jm(a,b){a.dispatchEvent(hm("onstatechange",(new Map).set("state",b)))}
|
|
486
486
|
r.Gc=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return K(function(f){switch(f.g){case 1:if(c.l==im)throw new O(2,7,7E3);if(!c.h||c.h==a){f.B(2);break}return C(f,c.detach(),2);case 2:return C(f,km(c,"attach"),4);case 4:if(f.h)return f.return();sa(f,5,6);jm(c,"attach");d=function(){var g=lm(c);g&&mm(c,g)};c.qc.D(a,"error",d);c.h=a;if(!b||!rd()||c.G){f.B(6);break}return C(f,nm(c),6);case 6:wa(f);c.W.release();ya(f,0);break;case 5:return e=va(f),C(f,c.detach(),10);case 10:throw e;}})};
|
|
@@ -494,7 +494,7 @@ d.ma=b;d.mb=!1;d.dispatchEvent(hm("loading"));h=Date.now()/1E3;d.u=new Yl;d.ea=a
|
|
|
494
494
|
sm(d,c),0)})},"parseManifestInner_"),13);case 13:return C(m,g(function(){return K(function(n){return C(n,tm(d),0)})},"initializeDrmInner_"),14);case 14:return C(m,g(function(){return K(function(n){return C(n,um(d,h),0)})},"loadInner_"),10);case 16:return C(m,g(function(){return K(function(n){return C(n,vm(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(hm("loaded"));ua(m,0);break;case 5:l=va(m);if(7E3==l.code){m.B(18);break}return C(m,d.pc(!1),18);case 18:throw l;}})};
|
|
495
495
|
function pm(a){var b,c;return K(function(d){if(1==d.g)return b=a.g.manifest.retryParameters,C(d,Nk(a.ea,a.H,b),2);c=d.h;"application/x-mpegurl"==c&&Cd()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function qm(a,b){if(!rd())return!0;if(b){if(""==(a.h||td()).canPlayType(b))return!1;if(!(rd()&&b in Bh))return!0;if("application/x-mpegurl"===b||"application/vnd.apple.mpegurl"===b){if(a.g.streaming.preferNativeHls)return!0;if(Cd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
496
496
|
function nm(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return jm(a,"media-source"),b=a.g.textDisplayFactory,c=b(),a.Te=b,d=wm(a.h,c,function(h,k,l){xm(a,h,k,l)},a.J),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.Y=f,C(g,d.J,2);a.G=d;E(g)})}
|
|
497
|
-
function sm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,jm(a,"manifest-parser"),a.Ld=Ah(a.ea,b||null),a.F=a.Ld(),d=nd(a.g.manifest),a.h&&"AUDIO"===a.h.nodeName&&(d.disableVideo=!0),a.F.configure(d),a.Aa=new Rj(function(){return a.
|
|
497
|
+
function sm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,jm(a,"manifest-parser"),a.Ld=Ah(a.ea,b||null),a.F=a.Ld(),d=nd(a.g.manifest),a.h&&"AUDIO"===a.h.nodeName&&(d.disableVideo=!0),a.F.configure(d),a.Aa=new Rj(function(){return a.Eb()}),a.Aa.addEventListener("regionadd",function(n){n=n.region;ym(a,"timelineregionadded",n);if(a.A)a.A.onDashTimedMetadata(n)}),a.za=null,a.g.streaming.observeQualityChanges&&(a.za=new Nj(function(){return a.pb()}),a.za.addEventListener("qualitychange",
|
|
498
498
|
function(n){var q=n.quality;n=n.position;q=(new Map).set("mediaQuality",{bandwidth:q.bandwidth,audioSamplingRate:q.audioSamplingRate,codecs:q.codecs,contentType:q.contentType,frameRate:q.frameRate,height:q.height,mimeType:q.mimeType,channelsCount:q.channelsCount,pixelAspectRatio:q.pixelAspectRatio,width:q.width}).set("position",n);a.dispatchEvent(hm("mediaqualitychanged",q))})),e={networkingEngine:c,filter:function(n){return zm(a,n)},makeTextStreamsForClosedCaptions:function(n){return Am(a,n)},onTimelineRegionAdded:function(n){var q=
|
|
499
499
|
a.Aa;a:{var p=t(q.g);for(var u=p.next();!u.done;u=p.next())if(u=u.value,u.schemeIdUri==n.schemeIdUri&&u.id==n.id&&u.startTime==n.startTime&&u.endTime==n.endTime){p=u;break a}p=null}null==p&&(q.g.add(n),n=new Q("regionadd",new Map([["region",n]])),q.dispatchEvent(n))},onEvent:function(n){return a.dispatchEvent(n)},onError:function(n){return mm(a,n)},isLowLatencyMode:function(){return a.g.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.g.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",
|
|
500
500
|
!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(n){var q=a.m?a.m.g:null;q&&a.m.s&&Bm(a,q.keySystem,n)},onManifestUpdated:function(){var n=(new Map).set("isLive",a.R());a.dispatchEvent(hm("manifestupdated",n));if(a.A)a.A.onManifestUpdated(a.R())},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}},f=Date.now()/1E3,jm(a,"manifest"),g=a,C(m,a.F.start(a.ea,e),2);g.i=m.h;h=hm("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);
|
|
@@ -513,7 +513,7 @@ function vm(a,b,c){var d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g)return
|
|
|
513
513
|
"ratechange",h),"none"!=d.preload&&a.o.ja(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.o.D(d.audioTracks,"addtrack",function(){return Gm(a)}),a.o.D(d.audioTracks,"removetrack",function(){return Gm(a)}),a.o.D(d.audioTracks,"change",function(){return Gm(a)})),d.textTracks&&(a.o.D(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Zm(a,u);break;case "chapters":Nm(a,u);break;default:Gm(a)}}),a.o.D(d.textTracks,"removetrack",function(){return Gm(a)}),
|
|
514
514
|
a.o.D(d.textTracks,"change",function(){return Gm(a)})),d.src=il(a.V,a.ea,c),(xd()||wd("Web0S"))&&d.load(),a.l=$m,a.dispatchEvent(hm("streaming")),k=new Ze,qj(d,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.C.ie();k.resolve()}),qj(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var u;return K(function(v){if(1==v.g)return an(a),u=bn(a),u.find(function(x){return"disabled"!=x.mode})?(0<u.length&&(a.da=!0),v.B(2)):C(v,new Promise(function(x){a.o.ja(d.textTracks,"change",x);(new qd(x)).U(1)}),2);
|
|
515
515
|
if(e)return v.return();cn(a);E(v)})}),d.error?k.reject(lm(a)):"none"==d.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.o.ja(d,"error",function(){k.reject(lm(a))}),C(p,k,2);(l=a.R())&&a.g.streaming.liveSync?(m=function(){return Xm(a)},a.o.D(d,"timeupdate",m)):l||(n=function(){return Ym(a)},
|
|
516
|
-
a.o.D(d,"timeupdate",n),Ym(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.
|
|
516
|
+
a.o.D(d,"timeupdate",n),Ym(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.Eb().end,a.o.D(d,"progress",function(){var u=a.Eb().end;q!=u&&(a.A.onManifestUpdated(a.R()),q=u)})));a.mb=!0;E(p)})}function an(a){var b=a.g.preferredAudioLanguage;""!=b&&a.jg(b,a.g.preferredVariantRole)}function cn(a){var b=a.g.preferredTextLanguage;""!=b&&a.kf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
517
517
|
function Zm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,dn(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new qd(function(){var d=en(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).oc().U(.5);a.Fc.push(function(){c.stop()})}}
|
|
518
518
|
function xm(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())dn(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function dn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(hm("metadata",b))}
|
|
519
519
|
function Nm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new qd(function(){b.mode="hidden"})).oc().U(.5);a.Fc.push(function(){c.stop()})}}function Cm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}r.Mh=function(){for(var a=this.W;a.g;)a.release()};function Dm(a,b){return new Kg(b,a.g.drm.updateExpirationTime)}
|
|
@@ -523,8 +523,8 @@ m)}break;case wf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.s
|
|
|
523
523
|
function Pm(a,b){return new Aj(a.h,a.i,a.g.streaming,b,function(){a.$b&&Mj(a.$b,!0);a.j&&a.j.dd();a.K&&fn(a)},function(c){return a.dispatchEvent(c)})}
|
|
524
524
|
function Qm(a,b){b=new Sj(a.Aa,a.R()||0<b);b.addEventListener("enter",function(d){ym(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){ym(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ym(a,"timelineregionenter",e),ym(a,"timelineregionexit",e))});var c=new Lj(a.h);c.g.add(b);a.za&&c.g.add(a.za);return c}
|
|
525
525
|
function Rm(a,b,c){a.K=new Se;a.K.g=Ue;Ve(a.K,c,Math.min(.5,c/2));om(a);a.o.D(b,"waiting",function(){return fn(a)});a.o.D(b,"stalled",function(){return fn(a)});a.o.D(b,"canplaythrough",function(){return fn(a)});a.o.D(b,"progress",function(){return fn(a)})}
|
|
526
|
-
function fn(a){switch(a.l){case $m:if(a.h.ended)var b=!0;else{var c=Kh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Mm:a:if(a.h.ended||Li(a.G))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.
|
|
527
|
-
function am(a){return new hl({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},pb:function(){return a.pb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Cd:function(){return a.Cd()},
|
|
526
|
+
function fn(a){switch(a.l){case $m:if(a.h.ended)var b=!0;else{var c=Kh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Mm:a:if(a.h.ended||Li(a.G))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Bb();var d=Kh(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Mh(a.h.buffered,a.h.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Te:Ue;c.g=d;b!=d&&om(a)}function wm(a,b,c,d){return new Di(a,b,c,d)}
|
|
527
|
+
function am(a){return new hl({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},pb:function(){return a.pb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Cd:function(){return a.Cd()},Ob:function(){return a.Ob()},Cb:function(){return a.Cb()},R:function(){return a.R()}},a.g.cmcd)}
|
|
528
528
|
function Lm(a){return new gk(a.i,{Dd:function(){return a.C?a.C.qd():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},T:a.G,Tb:a.H,onError:function(b){return mm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Fh:function(){a.F&&a.F.update&&a.F.update()},af:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;a.C&&a.C.cg();fn(a);d=(new Map).set("start",d).set("end",e).set("contentType",f);a.dispatchEvent(hm("segmentappended",d));a.s&&c.fastSwitching&&b.Zc&&b.Md&&a.s.trySuggestStreams()},
|
|
529
529
|
Eh:function(b,c){(c=c.Ve)&&a.za&&Pj(a.za,c,b)},Ef:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new mg(hb(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;$g(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Gh:function(b,c,d){xm(a,b,c,d)},wd:function(b,c){return a.wd(b,c)}})}
|
|
530
530
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(ze("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(ze("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
@@ -532,22 +532,22 @@ a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifest
|
|
|
532
532
|
(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));var c=Sl(this.g,a,$l(this));gn(this);return c};
|
|
533
533
|
function gn(a){if(a.F){var b=nd(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.F.configure(b)}a.m&&a.m.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{hn(a,a.i)}catch(f){mm(a,f)}a.s&&Wm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||jn(a)}a.H&&a.H.nf(a.g.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.g.mediaSource),a.G.Y=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,a.Te!=b)){var c=b(),d=a.G,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),
|
|
534
534
|
e.destroy());d.h&&(d.h.j=c);a.Te=b;a.j&&(b=a.j,(c=b.i.get(Dc))&&rk(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),Vm(a));a.K&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ve(a.K,b,Math.min(.5,b/2)));a.i&&Jm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.V&&a.V.configure(a.g.cmcd);a.Y&&a.Y.configure(a.g.cmsd)}r.getConfiguration=function(){var a=$l(this);Sl(a,this.g,$l(this));return a};
|
|
535
|
-
r.Qg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.
|
|
536
|
-
r.
|
|
537
|
-
r.
|
|
535
|
+
r.Qg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Eb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.Qh=function(){for(var a in this.g)delete this.g[a];Sl(this.g,$l(this),$l(this));gn(this)};r.Xg=function(){return this.l};r.He=function(){return this.i?this.i.type:null};r.ah=function(){return this.h};
|
|
536
|
+
r.Ob=function(){return this.H};r.Ge=function(){return this.ea};r.Of=function(){return this.A?this.A:null};r.R=function(){return this.i?this.i.presentationTimeline.R():this.h&&this.h.src?Infinity==this.h.duration:!1};r.Rb=function(){return this.i?this.i.presentationTimeline.Rb():!1};r.sh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
|
|
537
|
+
r.Eb=function(){if(this.i){if(!this.mb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.fc(),end:a.qb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.ph=function(){this.R()&&(this.h.currentTime=this.Eb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.Pc=function(){return this.m?this.m.Pc():Infinity};
|
|
538
538
|
r.Fe=function(){return this.m?this.m.Fe():[]};r.Bd=function(){return this.m?this.m.Bd():{}};r.Ke=function(){return this.K?this.K.g==Ue:!1};r.Cd=function(){return this.h?this.I?this.I.h:1:0};
|
|
539
|
-
r.xf=function(a){var b=this;0==a?Sa("A trick play rate of 0 is unsupported!"):(this.Ba.Za(),this.h.paused&&this.h.play(),this.I.set(a),this.l==Mm&&(this.s.playbackRateChanged(a),qk(this.j,1<Math.abs(a))),this.R()&&this.Ba.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.
|
|
540
|
-
r.
|
|
539
|
+
r.xf=function(a){var b=this;0==a?Sa("A trick play rate of 0 is unsupported!"):(this.Ba.Za(),this.h.paused&&this.h.play(),this.I.set(a),this.l==Mm&&(this.s.playbackRateChanged(a),qk(this.j,1<Math.abs(a))),this.R()&&this.Ba.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Eb(),e=b.g.streaming.safeSeekOffset;0<a?c>=d.end&&b.ud():c<=d.start+e&&b.ud()}))};r.ud=function(){var a=this.I.ec();this.l==$m&&this.I.set(a);this.l==Mm&&(this.I.set(a),this.s.playbackRateChanged(a),qk(this.j,!1));this.Ba.Za()};
|
|
540
|
+
r.Cb=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,oe(e)){var f=ge(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return ne(g)}):[]};
|
|
541
541
|
r.hc=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=he(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?bn(this).map(function(f){return le(f)}):[]};r.Wg=function(){var a=this.Mc;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ie(b)})};
|
|
542
|
-
r.Ng=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Mm&&b.l!=$m)return g.return(null);c=b.Mc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Gj(d.segmentIndex,function(h){var k=kn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.
|
|
543
|
-
function kn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{
|
|
544
|
-
r.Tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){if(1==D.g){if(c.l!=Mm&&c.l!=$m)return D.return(null);d=c.Mc;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.B(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=kn(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.
|
|
545
|
-
u=g.u||p/q;v=g.startTime;z=x=0;1<q&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.
|
|
542
|
+
r.Ng=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Mm&&b.l!=$m)return g.return(null);c=b.Mc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Gj(d.segmentIndex,function(h){var k=kn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Kb;for(var l=h.h-h.startTime,m=0;m<k;m++)e.push(b.Tf(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
543
|
+
function kn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Kb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
544
|
+
r.Tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){if(1==D.g){if(c.l!=Mm&&c.l!=$m)return D.return(null);d=c.Mc;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.B(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=kn(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Kb;n=l/h.rows;q=h.Kb*h.rows;p=g.h-g.startTime;
|
|
545
|
+
u=g.u||p/q;v=g.startTime;z=x=0;1<q&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.Kb*m,z=Math.floor(y/h.Kb)*n);B=!1;if(A=g.s)B=!0,n=A.height,x=A.positionX,z=A.positionY,m=A.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:v,duration:u,uris:g.Z(),width:m,sprite:B})})};
|
|
546
546
|
r.kg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Xl(this.u.h,b,!1),tk(this.j,b),ln(this),this.lb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=bn(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,je(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";ln(this)}};
|
|
547
547
|
r.lf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.g.abr.enabled&&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&&oe(d)&&(Km(this,d,!1,b,c),this.kb=new Ie(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Wm(this))}else if(this.h&&this.h.audioTracks)for(b=
|
|
548
|
-
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,je(c)==a.id){mn(this,c);break}};r.Pg=function(){return nn(this.
|
|
548
|
+
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,je(c)==a.id){mn(this,c);break}};r.Pg=function(){return nn(this.Cb())};r.ih=function(){return nn(this.hc())};r.Og=function(){return Array.from(on(this.Cb()))};r.hh=function(){return Array.from(on(this.hc()))};
|
|
549
549
|
r.jg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.kb=new Je(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.kb.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,
|
|
550
|
-
b))c=f;c?(a=ge(c),this.lf(a,!0,d)):jn(this)}else this.h&&this.h.audioTracks&&(d=qe(this.
|
|
550
|
+
b))c=f;c?(a=ge(c),this.lf(a,!0,d)):jn(this)}else this.h&&this.h.audioTracks&&(d=qe(this.Cb(),a,b||"",!1)[0])&&this.lf(d)};r.kf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.lb=a,this.Ic=b||"",this.Hc=c,(a=qe(this.i.textStreams,this.lb,this.Ic,this.Hc)[0]||null)&&a!=this.j.o&&(Xl(this.u.h,a,!1),this.g.streaming.alwaysStreamText||this.Me()))tk(this.j,a),ln(this)}else(a=qe(this.hc(),a,b||"",c)[0])&&this.kg(a)};
|
|
551
551
|
r.Wh=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){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.kb=new Je(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),jn(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&mn(this,b)}};
|
|
552
552
|
r.Me=function(){var a=this.da;return this.G&&this.l==Mm?this.G.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?bn(this).some(function(b){return"showing"==b.mode}):a};r.Pf=function(){return this.h&&this.h.src&&this.h.textTracks?pn(this).map(function(a){return le(a)}):[]};
|
|
553
553
|
r.Rg=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=dd(a),c=pn(this).filter(function(h){return dd(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};
|
|
@@ -563,7 +563,7 @@ r.Bg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,v,x,z,y,
|
|
|
563
563
|
l&&D.label==(f||"")&&D.kind==c}))return Gm(h),A.return(n);throw new O(1,2,2012);case 4:q=Ec;p=h.h.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new O(1,4,4033);if(!k.length){A.B(6);break}return C(A,sn(h,a,h.H,h.g.streaming.retryParameters),7);case 7:u=A.h,v=tn(h,u,d,k),x=new Blob([v],{type:"text/vtt"}),a=Gi(x),d="text/vtt";case 6:z={id:h.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ij(0,p,[a]),mimeType:d||"",
|
|
564
564
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};y=Gc(z.mimeType,z.codecs);B=Qc(y);if(!B)throw new O(2,2,2014,d);h.i.textStreams.push(z);Gm(h);return A.return(he(z))}})};
|
|
565
565
|
r.Cg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y;return K(function(B){switch(B.g){case 1:if(c.l!=Mm&&c.l!=$m)throw new O(1,7,7004);if(b){B.B(2);break}return C(B,qn(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new O(1,2,2017,a);d=Ec;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new O(1,4,4045);return C(B,sn(c,a,c.H,c.g.streaming.retryParameters),4);case 4:f=B.h;g=Rc[b];if(!g)throw new O(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
566
|
-
vttOffset:0};l=hb(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={Bc:q.Bc,
|
|
566
|
+
vttOffset:0};l=hb(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={Bc:q.Bc,Hb:q.Hb},u=p.next())q.Hb=u.value,q.Bc=null,v=function(A){return function(){null==A.Bc&&(A.Bc=xc([a],[A.Hb.payload]));return A.Bc||[]}}(q),x=new S(q.Hb.startTime,q.Hb.endTime,v,0,null,null,0,0,Infinity),q.Hb.payload.includes("#xywh")&&(z=q.Hb.payload.split("#xywh=")[1].split(","),4===z.length&&x.pg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
|
|
567
567
|
n.push(x);y={id:c.We++,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.he,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==$m?c.Mc.push(y):
|
|
568
568
|
c.i.imageStreams.push(y);Gm(c);return B.return(ie(y))}})};
|
|
569
569
|
r.Ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Mm&&d.l!=$m)throw new O(1,7,7004);if(c){k.B(2);break}return C(k,qn(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,rn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Pf();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return C(k,new Promise(function(l,m){d.o.ja(f,"load",l);d.o.ja(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return Gm(d),k.return(h);case 5:throw new O(1,
|
|
@@ -577,10 +577,10 @@ function Am(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.nex
|
|
|
577
577
|
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:Dc,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)}}
|
|
578
578
|
function zm(a,b){return K(function(c){if(1==c.g)return C(c,un(a,b),2);hn(a,b);E(c)})}function un(a,b){return K(function(c){if(1==c.g)return C(c,Rd(a.m,b),2);if(!b.variants.some(oe))throw new O(2,4,4032);E(c)})}function hn(a,b){if(a.l!=im){Qd(b.variants,a.g.restrictions,a.Id)&&a.j&&Gm(a);var c=a.m?a.m.g:null;if(c&&a.m.s)for(var d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Bm(a,c.keySystem,e.video),Bm(a,c.keySystem,e.audio);vn(a,b)}}
|
|
579
579
|
function Bm(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,$g(a.m,e.initDataType,e.initData)}}}
|
|
580
|
-
function Sm(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(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.
|
|
580
|
+
function Sm(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(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.Nb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(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)})}
|
|
581
581
|
function om(a){var b=a.Ke();if(a.u&&a.K&&a.C){if(a.V){var c=a.V;b||c.i||(c.i=!0);c.i&&b&&(c.j=!0);c.l=b}Hm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(hm("buffering",b))}function Im(a){var b=a.h.playbackRate;0!=b&&(a.I&&a.I.set(b),b=hm("ratechange"),a.dispatchEvent(b))}
|
|
582
582
|
function Hm(a){if(a.u&&a.K){var b=a.u.g,c="playing";a.K.g==Ue?c="buffering":a.h.paused?c="paused":a.h.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(hm("statechanged",c)))}}
|
|
583
|
-
function Xm(a){if(a.R()){var b=a.
|
|
583
|
+
function Xm(a){if(a.R()){var b=a.Eb();if(Number.isFinite(b.end)&&!(a.h.currentTime<b.start)){if(a.g.streaming.liveSync){var c=a.g.streaming.liveSyncMaxLatency;var d=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.g.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var e=a.g.streaming.liveSyncMinLatency;var f=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&
|
|
584
584
|
a.i.serviceDescription&&(e=a.i.serviceDescription.minLatency||a.g.streaming.liveSyncMinLatency,f=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);var g=a.h.playbackRate,h=b.end-a.h.currentTime,k=0;if(a.l==$m){var l=a.h.buffered;0<l.length&&(k=l.end(l.length-1),k=Math.max(d,k-b.end))}c&&d&&h-k>c?g!=d&&a.xf(d):e&&f&&h-k<e?g!=f&&a.xf(f):g!==a.I.ec()&&a.ud()}}}
|
|
585
585
|
function Ym(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=hm("started"):25==a.N?d=hm("firstquartile"):50==a.N?d=hm("midpoint"):75==a.N?d=hm("thirdquartile"):100==a.N&&(d=hm("complete"));d&&a.dispatchEvent(d)}}}function Wm(a){try{vn(a,a.i)}catch(c){return mm(a,c),!1}var b=pe(a.i.variants);b=a.kb.create(b);a.s.setVariants(Array.from(b.values()));return!0}
|
|
586
586
|
function Om(a,b){b=void 0===b?!1:b;return Wm(a)?a.s.chooseVariant(b):null}
|
|
@@ -598,21 +598,21 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new O(2,4,4012,a)
|
|
|
598
598
|
function nn(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=dd(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));
|
|
599
599
|
h.push({language:l,role:m,label:n})}});return h}N("shaka.Player",W);W.prototype.setVideoContainer=W.prototype.rg;W.prototype.getManifestParserFactory=W.prototype.Zg;W.prototype.getManifest=W.prototype.Yg;W.prototype.retryStreaming=W.prototype.gf;W.prototype.setMaxHardwareResolution=W.prototype.pf;W.prototype.addChaptersTrack=W.prototype.Ag;W.prototype.addThumbnailsTrack=W.prototype.Cg;W.prototype.addTextTrackAsync=W.prototype.Bg;W.prototype.getStats=W.prototype.getStats;
|
|
600
600
|
W.prototype.getBufferedInfo=W.prototype.pb;W.prototype.getPresentationStartTimeAsDate=W.prototype.Sf;W.prototype.getPlayheadTimeAsDate=W.prototype.dh;W.prototype.setTextTrackVisibility=W.prototype.og;W.prototype.getChapters=W.prototype.Rg;W.prototype.getChaptersTracks=W.prototype.Pf;W.prototype.isTextTrackVisible=W.prototype.Me;W.prototype.selectVariantsByLabel=W.prototype.Wh;W.prototype.selectTextLanguage=W.prototype.kf;W.prototype.selectAudioLanguage=W.prototype.jg;
|
|
601
|
-
W.prototype.getTextLanguages=W.prototype.hh;W.prototype.getAudioLanguages=W.prototype.Og;W.prototype.getTextLanguagesAndRoles=W.prototype.ih;W.prototype.getAudioLanguagesAndRoles=W.prototype.Pg;W.prototype.selectVariantTrack=W.prototype.lf;W.prototype.selectTextTrack=W.prototype.kg;W.prototype.getThumbnails=W.prototype.Tf;W.prototype.getAllThumbnails=W.prototype.Ng;W.prototype.getImageTracks=W.prototype.Wg;W.prototype.getTextTracks=W.prototype.hc;W.prototype.getVariantTracks=W.prototype.
|
|
602
|
-
W.prototype.cancelTrickPlay=W.prototype.ud;W.prototype.trickPlay=W.prototype.xf;W.prototype.getPlaybackRate=W.prototype.Cd;W.prototype.isBuffering=W.prototype.Ke;W.prototype.getKeyStatuses=W.prototype.Bd;W.prototype.getActiveSessionsMetadata=W.prototype.Fe;W.prototype.getExpiration=W.prototype.Pc;W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.keySystem=W.prototype.keySystem;W.prototype.goToLive=W.prototype.ph;W.prototype.seekRange=W.prototype.
|
|
603
|
-
W.prototype.isInProgress=W.prototype.Rb;W.prototype.isLive=W.prototype.R;W.prototype.getAdManager=W.prototype.Of;W.prototype.getAssetUri=W.prototype.Ge;W.prototype.getNetworkingEngine=W.prototype.
|
|
601
|
+
W.prototype.getTextLanguages=W.prototype.hh;W.prototype.getAudioLanguages=W.prototype.Og;W.prototype.getTextLanguagesAndRoles=W.prototype.ih;W.prototype.getAudioLanguagesAndRoles=W.prototype.Pg;W.prototype.selectVariantTrack=W.prototype.lf;W.prototype.selectTextTrack=W.prototype.kg;W.prototype.getThumbnails=W.prototype.Tf;W.prototype.getAllThumbnails=W.prototype.Ng;W.prototype.getImageTracks=W.prototype.Wg;W.prototype.getTextTracks=W.prototype.hc;W.prototype.getVariantTracks=W.prototype.Cb;
|
|
602
|
+
W.prototype.cancelTrickPlay=W.prototype.ud;W.prototype.trickPlay=W.prototype.xf;W.prototype.getPlaybackRate=W.prototype.Cd;W.prototype.isBuffering=W.prototype.Ke;W.prototype.getKeyStatuses=W.prototype.Bd;W.prototype.getActiveSessionsMetadata=W.prototype.Fe;W.prototype.getExpiration=W.prototype.Pc;W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.keySystem=W.prototype.keySystem;W.prototype.goToLive=W.prototype.ph;W.prototype.seekRange=W.prototype.Eb;W.prototype.isAudioOnly=W.prototype.sh;
|
|
603
|
+
W.prototype.isInProgress=W.prototype.Rb;W.prototype.isLive=W.prototype.R;W.prototype.getAdManager=W.prototype.Of;W.prototype.getAssetUri=W.prototype.Ge;W.prototype.getNetworkingEngine=W.prototype.Ob;W.prototype.getMediaElement=W.prototype.ah;W.prototype.getManifestType=W.prototype.He;W.prototype.getLoadMode=W.prototype.Xg;W.prototype.resetConfiguration=W.prototype.Qh;W.prototype.getBufferFullness=W.prototype.Qg;W.prototype.getConfiguration=W.prototype.getConfiguration;W.prototype.configure=W.prototype.configure;
|
|
604
604
|
W.prototype.releaseAllMutexes=W.prototype.Mh;W.prototype.load=W.prototype.load;W.prototype.updateStartTime=W.prototype.ei;W.prototype.unload=W.prototype.pc;W.prototype.detach=W.prototype.detach;W.prototype.attachCanvas=W.prototype.Eg;W.prototype.attach=W.prototype.Gc;
|
|
605
605
|
W.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?C(h,sh(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(rd())for(var l in Bh)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]=rd()?!!Bh[m]:sd(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(Hc));
|
|
606
606
|
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=rd()?Qc(m)?!0:Za(m)||($b(m)?!0:!1):sd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=zn;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
607
607
|
W.isBrowserSupported=function(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||wd("Trident/"))return!1;var a=Id();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:rd()?!0:sd("application/x-mpegurl")};W.setAdManagerFactory=function(a){cm=a};
|
|
608
|
-
W.registerSupportPlugin=function(a,b){zn[a]=b};W.prototype.destroy=W.prototype.destroy;var im=0,Zl=1,Mm=2,$m=3;W.LoadMode={DESTROYED:im,NOT_LOADED:Zl,MEDIA_SOURCE:Mm,SRC_EQUALS:$m};W.version="v4.7.
|
|
608
|
+
W.registerSupportPlugin=function(a,b){zn[a]=b};W.prototype.destroy=W.prototype.destroy;var im=0,Zl=1,Mm=2,$m=3;W.LoadMode={DESTROYED:im,NOT_LOADED:Zl,MEDIA_SOURCE:Mm,SRC_EQUALS:$m};W.version="v4.7.10";var An=["4","7"];Ae=new function(a){this.g=a;this.i=Be;this.h=Ce}(new ye(Number(An[0]),Number(An[1])));var yn=["output-restricted","internal-error"],zn={},cm=null;function Bn(){this.h=[];this.j=this.i=this.g=0};function Cn(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.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=Cn.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
609
609
|
r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
610
610
|
r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.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)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
611
611
|
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
612
612
|
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};N("shaka.ads.ClientSideAd",Cn);Cn.prototype.release=Cn.prototype.release;
|
|
613
613
|
Cn.prototype.getPodIndex=Cn.prototype.getPodIndex;Cn.prototype.getTimeOffset=Cn.prototype.getTimeOffset;Cn.prototype.getMediaUrl=Cn.prototype.getMediaUrl;Cn.prototype.getAdvertiserName=Cn.prototype.getAdvertiserName;Cn.prototype.getCreativeAdId=Cn.prototype.getCreativeAdId;Cn.prototype.getAdId=Cn.prototype.getAdId;Cn.prototype.getVastMediaWidth=Cn.prototype.getVastMediaWidth;Cn.prototype.getVastMediaHeight=Cn.prototype.getVastMediaHeight;Cn.prototype.getVastMediaBitrate=Cn.prototype.getVastMediaBitrate;
|
|
614
614
|
Cn.prototype.getDescription=Cn.prototype.getDescription;Cn.prototype.getTitle=Cn.prototype.getTitle;Cn.prototype.getPositionInSequence=Cn.prototype.getPositionInSequence;Cn.prototype.getSequenceLength=Cn.prototype.getSequenceLength;Cn.prototype.setMuted=Cn.prototype.setMuted;Cn.prototype.resize=Cn.prototype.resize;Cn.prototype.isLinear=Cn.prototype.isLinear;Cn.prototype.isMuted=Cn.prototype.isMuted;Cn.prototype.setVolume=Cn.prototype.setVolume;Cn.prototype.getVolume=Cn.prototype.getVolume;
|
|
615
|
-
Cn.prototype.play=Cn.prototype.play;Cn.prototype.pause=Cn.prototype.pause;Cn.prototype.skip=Cn.prototype.skip;Cn.prototype.canSkipNow=Cn.prototype.canSkipNow;Cn.prototype.getTimeUntilSkippable=Cn.prototype.getTimeUntilSkippable;Cn.prototype.isSkippable=Cn.prototype.isSkippable;Cn.prototype.isPaused=Cn.prototype.isPaused;Cn.prototype.getRemainingTime=Cn.prototype.getRemainingTime;Cn.prototype.getMinSuggestedDuration=Cn.prototype.getMinSuggestedDuration;Cn.prototype.getDuration=Cn.prototype.getDuration;function Dn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=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.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.
|
|
615
|
+
Cn.prototype.play=Cn.prototype.play;Cn.prototype.pause=Cn.prototype.pause;Cn.prototype.skip=Cn.prototype.skip;Cn.prototype.canSkipNow=Cn.prototype.canSkipNow;Cn.prototype.getTimeUntilSkippable=Cn.prototype.getTimeUntilSkippable;Cn.prototype.isSkippable=Cn.prototype.isSkippable;Cn.prototype.isPaused=Cn.prototype.isPaused;Cn.prototype.getRemainingTime=Cn.prototype.getRemainingTime;Cn.prototype.getMinSuggestedDuration=Cn.prototype.getMinSuggestedDuration;Cn.prototype.getDuration=Cn.prototype.getDuration;function Dn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=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.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.10");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
616
616
|
function(g){En(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Fn(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.ja(this.i,"play",function(){f.A=!0})}Dn.prototype.configure=function(a){this.C=a};Dn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Xk(this.o)};Dn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
617
617
|
function Fn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new Q("ad-error",b));Gn(a,null);a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
618
618
|
function En(a,b){a.m(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.C.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.u);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(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.u);a.m(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -662,8 +662,8 @@ function Yn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
662
662
|
r.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);jf.prototype.release.call(this)};r.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new Bn};r.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};
|
|
663
663
|
r.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.u=a;b.g&&b.g.updateAdsRenderingSettings(b.u)};r.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Ln(a,b,c,function(e){return Zn(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new O(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new O(1,10,10004)):(d.l=new Ze,On(d,a,b),d.G=c||"",d.W=Date.now()/1E3,a=d.l);return a};
|
|
664
664
|
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new Xn(a,b,this.m,function(d){return Zn(c,d)});this.g.configure(this.l)};
|
|
665
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(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.7.
|
|
666
|
-
(c.G=!0),c.j=new Ze,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(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.7.
|
|
665
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(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.7.10";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
666
|
+
(c.G=!0),c.j=new Ze,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(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.7.10";this.g.g.replaceAdTagParameters(a)};
|
|
667
667
|
r.getServerSideCuePoints=function(){ze("AdManager","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
668
668
|
r.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)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
669
669
|
function Zn(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}N("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
|
|
@@ -697,7 +697,7 @@ function Fo(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
|
697
697
|
function Ho(a){for(var b=t(ko),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(fo);for(d=c.next();!d.done;d=c.next())d=
|
|
698
698
|
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(fo),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(lo);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.og(h);g&&a.h.kf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new Q("error",l);a.h.dispatchEvent(l)})}
|
|
699
699
|
function Ko(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Ka()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ka()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
700
|
-
function Mo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.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.
|
|
700
|
+
function Mo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.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.Ob()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Of()};
|
|
701
701
|
if("setVideoContainer"==b)return function(c){return a.h.rg(c)};if(a.g.Ka()){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.Ka()&&0==Object.keys(a.g.g.video).length&&(ho[b]||io[b])||!a.g.Ka()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
702
702
|
function Go(a,b,c){a.g.Ka()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}N("shaka.cast.CastProxy",Do);Do.prototype.changeReceiverId=Do.prototype.Gg;Do.prototype.forceDisconnect=Do.prototype.cc;Do.prototype.suggestDisconnect=Do.prototype.ai;Do.prototype.setAppData=Do.prototype.mf;Do.prototype.cast=Do.prototype.cast;Do.prototype.receiverName=Do.prototype.ef;Do.prototype.isCasting=Do.prototype.Ka;Do.prototype.canCast=Do.prototype.Fg;Do.prototype.getPlayer=Do.prototype.bh;
|
|
703
703
|
Do.prototype.getVideo=Do.prototype.nh;Do.prototype.destroy=Do.prototype.destroy;function Oo(a,b,c,d){jf.call(this);var e=this;this.g=a;this.h=b;this.j=new Af;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.A=!1;this.u=!0;this.s=this.l=null;this.G=new qd(function(){Po(e)});Qo(this)}oa(Oo,jf);r=Oo.prototype;r.isConnected=function(){return this.F};r.th=function(){return this.o};r.Zh=function(a){this.i=a};r.Jg=function(){this.i=null};
|
|
@@ -777,23 +777,22 @@ function jr(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,x,z,y,B,A,D;return K(function(F
|
|
|
777
777
|
J=G.g.byteOffset;G=new Wq(G.g);for(var H=null;G.ia();){var I=Xq(G);if(357149030==I.id){H=I;break}}if(!H)throw new O(2,3,3010);H=new Wq(H.g);I=1E6;for(G=null;H.ia();){var L=Xq(H);if(2807729==L.id)I=ar(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 O(2,3,3003);}if(null==G)throw new O(2,3,3011);H=I/1E9;G*=H;I=Xq(new Wq(x));if(475249515!=I.id)throw new O(2,3,3007);J=br(I,J,H,G,d,c,B,A,D)}y=J;h.Xc(y);p=new Fj(y);k&&p.bc(A,D,
|
|
778
778
|
!0);return F.return(p)})}function gr(a){return a.ed}function ir(a){var b=Qq(a,gr,"RepresentationIndex");a=Pq(a,gr,"indexRange");a=Ag(a||"");b&&(a=xg(b,"range",Ag,a));return a}function hr(a,b){kr(a,b);if(!ir(a))throw new O(2,4,4002);}function kr(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Dc&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
|
|
779
779
|
function er(a){var b=a.M;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.Td,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lr(a,b,c){var d=dr(a,mr,c),e=nr(a);if(!e.ya&&!e.timeline&&1<e.jc.length)throw new O(2,4,4002);if(!e.ya&&!a.ba.duration&&!e.timeline&&1==e.jc.length)throw new O(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new O(2,4,4002);var f=null,g=null;a.ta.id&&a.M.id&&(g=b[a.ta.id+","+a.M.id])&&(f=g.segmentIndex);var h=or(a.ba.start,a.ba.duration,a.M.cb,e,d,c);b=!f;f?f.Wc(h,a.presentationTimeline.eb()):f=new Fj(h);a.presentationTimeline.Xc(h);a.zb&&a.ba.Le||f.bc(a.ba.start,a.ba.duration?a.ba.start+
|
|
780
|
-
a.ba.duration:Infinity,b);g&&(g.segmentIndex=f);return{dc:function(){f&&0!=f.
|
|
780
|
+
a.ba.duration:Infinity,b);g&&(g.segmentIndex=f);return{dc:function(){f&&0!=f.Ab()||f.Qd(h);return Promise.resolve(f)}}}function mr(a){return a.Fb}function nr(a){var b=pr(a);a=Oq(a,mr);var c=a.gd;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,gd:c,vb:a.vb,timeline:a.timeline,jc:b}}
|
|
781
781
|
function or(a,b,c,d,e,f){var g=d.jc.length;d.timeline&&d.timeline.length!=d.jc.length&&(g=Math.min(d.timeline.length,d.jc.length));for(var h=a-d.vb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},q=0;q<g;n={Cc:n.Cc,yc:n.yc},q++){n.yc=d.jc[q];var p=void 0;p=null!=d.ya?m+d.ya:d.timeline?d.timeline[q].end:m+b;n.Cc=null;l.push(new S(a+m,a+p,function(u){return function(){null==u.Cc&&(u.Cc=xc(c(),[u.yc.Dh]));return u.Cc}}(n),n.yc.start,n.yc.end,e,h,a,k,[],"",null,null,Ih,f));m=p}return l}
|
|
782
|
-
function pr(a){return[a.M.
|
|
783
|
-
Infinity,p=!(a.zb&&a.ba.Le);m?(c=m,vr(c,k,n,q,p,h),c.bb(a.presentationTimeline.eb())):m=new wr(k,a.M.id,a.bandwidth,a.M.cb,n,q,h,p,g,a.M.jf);k.timeline&&"image"!==a.oa.contentType&&a.presentationTimeline.dg(k.timeline,n);d&&a.zb&&(d.segmentIndex=m);return{dc:function(){m instanceof wr&&0==m.
|
|
782
|
+
function pr(a){return[a.M.Fb,a.oa.Fb,a.ta.Fb].filter(ad).map(function(b){return pg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Wf&&(a.Wf=!0);var c=b.getAttribute("media");b=xg(b,"mediaRange",Ag,{start:0,end:null});return{Dh:c,start:b.start,end:b.end}})};function qr(a,b,c,d,e,f,g){var h=rr(a,g),k=sr(a);tr(k);var l=od(a);if(k.Uc)return kr(a,h),{dc:function(){var u=Nq(k.Uc,l.M.id,null,null,l.bandwidth||null,null);u=xc(l.M.cb(),[u]);return jr(l,b,h,u,0,null,k.vb)}};if(k.ya)return d||"image"===a.oa.contentType||(a.presentationTimeline.Ye(k.ya),a.presentationTimeline.Sd(a.ba.start)),{dc:function(){return ur(l,k,e,h,f,g)}};var m=null;d=d=null;a.ta.id&&a.M.id&&(d=a.ta.id+","+a.M.id,d=c[d])&&(m=d.segmentIndex);var n=a.ba.start,q=a.ba.duration?n+a.ba.duration:
|
|
783
|
+
Infinity,p=!(a.zb&&a.ba.Le);m?(c=m,vr(c,k,n,q,p,h),c.bb(a.presentationTimeline.eb())):m=new wr(k,a.M.id,a.bandwidth,a.M.cb,n,q,h,p,g,a.M.jf);k.timeline&&"image"!==a.oa.contentType&&a.presentationTimeline.dg(k.timeline,n);d&&a.zb&&(d.segmentIndex=m);return{dc:function(){m instanceof wr&&0==m.Ab()&&vr(m,k,n,q,p,h);return Promise.resolve(m)}}}function xr(a){return a.fd}
|
|
784
784
|
function sr(a){var b=Oq(a,xr),c=Pq(a,xr,"media");a=Pq(a,xr,"index");return{ya:b.ya,timescale:b.timescale,gd:b.gd,vb:b.vb,yf:b.yf,timeline:b.timeline,kc:c,Uc:a}}function tr(a){var b=a.Uc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Uc&&(a.timeline=null),a.ya=null);if(!a.Uc&&!a.kc)throw new O(2,4,4002);}
|
|
785
|
-
function ur(a,b,c,d,e,f){function g(I){var L=(I-u)*p,M=L+b.vb,P=L+m;L=P+p;var V=Math.min(L,k());P=new S(P,V,function(){var X=M*v;"BigInt"in window&&X>Number.MAX_SAFE_INTEGER&&(X=BigInt(M)*BigInt(v));X=Nq(x,y,I,null,z,X);return xc(B(),[X])},0,null,d,A,m,k(),[],"",null,null,Ih,f);P.h=L;return P}function h(){var I=[Math.max(l.eb(),m),Math.min(l.
|
|
786
|
-
m+I:Infinity}var l=a.presentationTimeline,m=a.ba.start,n=a.ta.id,q=a.ba.duration,p=b.ya,u=b.gd,v=b.timescale,x=b.kc,z=a.bandwidth||null,y=a.M.id,B=a.M.cb,A=m-b.vb,D=h();a=a.zb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var F=a;F<=D;++F){var J=g(F);c.push(J)}var G=new Fj(c);c=l.
|
|
787
|
-
function rr(a,b){var c=Pq(a,xr,"initialization");if(!c)return null;var d=a.M.id,e=a.bandwidth||null,f=a.M.cb;return new Gh(function(){var g=Nq(c,d,null,null,e,null);return xc(f(),[g])},0,null,er(a),null,null,b)}function wr(a,b,c,d,e,f,g,h,k,l){Fj.call(this,[]);this.h=a;this.F=b;this.A=c;this.C=d;this.i=e;this.
|
|
788
|
-
r.bb=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.
|
|
789
|
-
function yr(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.
|
|
790
|
-
r.
|
|
791
|
-
|
|
792
|
-
0==this.G?0<m&&n.Od():0!=m%this.G&&n.Od();h.push(n)}c=new S(this.i+e.start,this.i+e.end,function(){return 0<e.fb?[]:zr(d,b.F,f,b.A,g,null,b.C)},0,null,this.s,c,this.i,this.m,h,"",null,null,Ih,this.u,0<e.fb);this.g[a]=c}return c};function zr(a,b,c,d,e,f,g){a=Nq(a,b,c,f,d||null,e);return xc(g(),[a]).map(function(h){return h.toString()})};function Ar(a){this.o=null;this.u=a;this.G=new kf;this.j=[];this.h=null;this.m=[];this.A=null;this.F=[];this.C=300;this.l=new Map;this.i=new Map;this.g=null;this.s="UNKNOWN"}Ar.prototype.configure=function(a){this.o=a};Ar.prototype.destroy=function(){this.u=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Ar.prototype.setManifestType=function(a){this.s=a};
|
|
785
|
+
function ur(a,b,c,d,e,f){function g(I){var L=(I-u)*p,M=L+b.vb,P=L+m;L=P+p;var V=Math.min(L,k());P=new S(P,V,function(){var X=M*v;"BigInt"in window&&X>Number.MAX_SAFE_INTEGER&&(X=BigInt(M)*BigInt(v));X=Nq(x,y,I,null,z,X);return xc(B(),[X])},0,null,d,A,m,k(),[],"",null,null,Ih,f);P.h=L;return P}function h(){var I=[Math.max(l.eb(),m),Math.min(l.Bb(),k())].map(function(L){return L-m});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(L){return L+u})}function k(){var I=null!=n&&e[n]||q;return I?
|
|
786
|
+
m+I:Infinity}var l=a.presentationTimeline,m=a.ba.start,n=a.ta.id,q=a.ba.duration,p=b.ya,u=b.gd,v=b.timescale,x=b.kc,z=a.bandwidth||null,y=a.M.id,B=a.M.cb,A=m-b.vb,D=h();a=a.zb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var F=a;F<=D;++F){var J=g(F);c.push(J)}var G=new Fj(c);c=l.Bb()<k();F=l.R();if(c||F){var H=Math.max(a,D+1);G.Yd(p,function(){var I=l.eb();G.bb(I);var L=t(h());L.next();L=L.next().value;for(var M=[];H<=L;){var P=g(H);M.push(P);H++}return I>k()&&!M.length?null:M})}return Promise.resolve(G)}
|
|
787
|
+
function rr(a,b){var c=Pq(a,xr,"initialization");if(!c)return null;var d=a.M.id,e=a.bandwidth||null,f=a.M.cb;return new Gh(function(){var g=Nq(c,d,null,null,e,null);return xc(f(),[g])},0,null,er(a),null,null,b)}function wr(a,b,c,d,e,f,g,h,k,l){Fj.call(this,[]);this.h=a;this.F=b;this.A=c;this.C=d;this.i=e;this.l=f;this.s=g;this.u=k;this.G=l;h&&yr(this)}oa(wr,Fj);r=wr.prototype;r.Ab=function(){return this.h?this.h.timeline.length:0};r.release=function(){Fj.prototype.release.call(this);this.h=null};
|
|
788
|
+
r.bb=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.Ab()&&this.release())}};function vr(a,b,c,d,e,f){a.s=f;if(a.h){c=a.h.timeline;a.h.kc=b.kc;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&&yr(a)}
|
|
789
|
+
function yr(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.bb(a.i)}}r.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};
|
|
790
|
+
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Ab()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.kc,e=this.h.timeline[a],f=e.Vh,g=this.h.yf+e.zf;c=this.i-this.h.vb;var h=this.i+e.end,k=h;a===this.Ab()-1&&Infinity!==this.l&&(k=this.l);for(var l=[],m=(e.end-e.start)/e.fb,n={},q=0;q<e.fb;n={Dc:n.Dc,fe:n.fe},q++){var p=e.start+m*q,u=p+m;n.fe=q+1;n.Dc=null;p=new S(this.i+p,this.i+u,function(v){return function(){if(!b.h)return[];null==v.Dc&&(v.Dc=zr(b.h.kc,b.F,f,b.A,g,v.fe,b.C));return v.Dc}}(n),
|
|
791
|
+
0,null,this.s,c,this.i,this.l,[],"",null,null,Ih,this.u);0==this.G?0<q&&p.Od():0!=q%this.G&&p.Od();l.push(p)}c=new S(this.i+e.start,k,function(){return 0<e.fb?[]:zr(d,b.F,f,b.A,g,null,b.C)},0,null,this.s,c,this.i,this.l,l,"",null,null,Ih,this.u,0<e.fb);c.h=h;this.g[a]=c}return c};function zr(a,b,c,d,e,f,g){a=Nq(a,b,c,f,d||null,e);return xc(g(),[a]).map(function(h){return h.toString()})};function Ar(a){this.o=null;this.u=a;this.G=new kf;this.j=[];this.h=null;this.m=[];this.A=null;this.F=[];this.C=300;this.l=new Map;this.i=new Map;this.g=null;this.s="UNKNOWN"}Ar.prototype.configure=function(a){this.o=a};Ar.prototype.destroy=function(){this.u=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Ar.prototype.setManifestType=function(a){this.s=a};
|
|
793
792
|
function Br(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=xc(a.j,[Cr(a,b)]),d=qf(c,a.o.retryParameters),e=a.u.networkingEngine.request(8,d),lf(a.G,e),sa(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=Nf(f.data),h=JSON.parse(g),1==h.VERSION&&Dr(a,h,f.uri),ua(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new qd(function(){Br(a,b)});a.g.U(a.C);E(l)})}
|
|
794
793
|
function Cr(a,b){if(!a.m.length)return b;b=new fc(b);var c=a.A||a.m[0],d=Math.round(a.u.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));vc(e)&&jc(b,e);return b.toString()}function Dr(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new qd(function(){Br(a,d)});if(c=b.TTL)a.C=c;a.g.U(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
795
794
|
function Er(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
|
|
796
|
-
function Fr(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={
|
|
795
|
+
function Fr(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={Jb:e.Jb},g=f.next())if(e.Jb=g.value,g=b.get(e.Jb))d.push({df:e.Jb,location:g});else if(g=a.F.find(function(k){return function(l){return l.vi==k.Jb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].xg?(h=new fc(h),hc(h,g["URI-REPLACEMENT"].xg),d.push({df:e.Jb,location:h.toString()})):d.push({df:e.Jb,location:h}))}e=Date.now();f=t(a.i.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
797
796
|
h=a.i.get(g),e>h&&a.i.delete(g);d=d.filter(function(k){for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new fc(k.location)).ob))return!1;return!0});d.length&&(a.A=d[0].df);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.A=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:xc(a.j,d)};function Gr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=!1;this.o=new Set}r=Gr.prototype;r.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=[]};r.mh=function(){return this.j};r.Ie=function(){return this.l.slice()};r.Vg=function(){return this.i};
|
|
798
797
|
function Hr(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Ir(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Jr(n),n]})),l=new Map(h.textStreams.map(function(n){return[Kr(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Lr(n),n]}));if(b){var m=Mr(Dc);l.set(Kr(m),m);m=Mr("image");h.set(Lr(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Df:c,vg:d,sg:e,Vf:f}}
|
|
799
798
|
r.Gf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X;return K(function(ba){if(1==ba.g){d=Ec;if(!b&&1==a.length)return e=Hr(a,!1),f=e.Df,g=e.vg,h=e.sg,k=e.Vf,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),ba.B(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.o.has(n.id)||(c.o.add(n.id),-1==l&&(l=m));if(-1==l)return ba.return();q=Hr(a,!0);p=q.Df;u=q.vg;v=q.sg;x=q.Vf;return C(ba,Promise.all([Nr(c,c.h,p,
|
|
@@ -815,23 +814,24 @@ b)}function Tr(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.d
|
|
|
815
814
|
function Yr(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=as(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
816
815
|
function as(a,b,c){var d=null,e=(0,{audio:Ir,video:Jr,text:Kr,image:Lr}[c.type])(c);if(b.has(e))d=b.get(e);else{e={audio:function(h,k){return Xr(a,h,k)},video:function(h,k){return Xr(a,h,k)},text:bs,image:cs}[c.type];var f={audio:ds,video:es,text:fs,image:gs}[c.type];b=t(b.values());for(var g=b.next();!g.done;g=b.next())g=g.value,!e(c,g)||c.fastSwitching!=g.fastSwitching||d&&!f(c,d,g)||(d=g)}return d}
|
|
817
816
|
function hs(a,b){function c(d){if(!is.has(d)){var e=Kc(d);is.set(d,e)}return is.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}function Xr(a,b,c){return!hs(b,c)&&!a.m||b.drmInfos&&!vh(b.drmInfos,c.drmInfos)?!1:!0}function bs(a,b){return b.language?a.forced!==b.forced||0==id(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function cs(){return!0}
|
|
818
|
-
function ds(a,b,c){var d=hs(a,b),e=hs(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=id(a.language,b.language);e=id(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;
|
|
819
|
-
if(b.primary&&!c.primary)return!1;d=js(a.channelsCount,b.channelsCount,c.channelsCount);if(d==ks)return!0;if(d==ls)return!1;d=js(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==ks?!0:d==ls?!1:a.bandwidth&&ms(a.bandwidth,b.bandwidth,c.bandwidth)==ks?!0:!1}
|
|
817
|
+
function ds(a,b,c){var d=hs(a,b),e=hs(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=id(a.language,b.language);e=id(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;
|
|
818
|
+
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=js(a.channelsCount,b.channelsCount,c.channelsCount);if(d==ks)return!0;if(d==ls)return!1;d=js(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==ks?!0:d==ls?!1:a.bandwidth&&ms(a.bandwidth,b.bandwidth,c.bandwidth)==ks?!0:!1}
|
|
820
819
|
function es(a,b,c){var d=hs(a,b),e=hs(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=js(a.width*a.height,b.width*b.height,c.width*c.height);if(d==ks)return!0;if(d==ls)return!1;if(a.frameRate){d=js(a.frameRate,b.frameRate,c.frameRate);if(d==ks)return!0;if(d==ls)return!1}return a.bandwidth&&ms(a.bandwidth,b.bandwidth,c.bandwidth)==ks?!0:!1}
|
|
821
|
-
function fs(a,b,c){var d=id(a.language,b.language),e=id(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
822
|
-
a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function gs(a,b,c){return js(a.width*a.height,b.width*b.height,c.width*c.height)==ks?!0:!1}
|
|
820
|
+
function fs(a,b,c){var d=id(a.language,b.language),e=id(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
821
|
+
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 gs(a,b,c){return js(a.width*a.height,b.width*b.height,c.width*c.height)==ks?!0:!1}
|
|
822
|
+
function Rr(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}}
|
|
823
823
|
function Mr(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}}
|
|
824
824
|
function js(a,b,c){if(b==a&&a!=c)return ls;if(c==a&&a!=b)return ks;if(b>a){if(c<=a||c-a<b-a)return ks;if(c-a>b-a)return ls}else{if(c>a)return ls;if(a-c<a-b)return ks;if(a-c>a-b)return ls}return ns}function ms(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?ks:b<a?ls:ns}function Wr(a){switch(a.type){case Dc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
825
825
|
function Jr(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Ir(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Kr(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
826
826
|
function Lr(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}N("shaka.util.PeriodCombiner",Gr);Gr.prototype.combinePeriods=Gr.prototype.Gf;Gr.prototype.getImageStreams=Gr.prototype.Vg;Gr.prototype.getTextStreams=Gr.prototype.Ie;Gr.prototype.getVariants=Gr.prototype.mh;var ks=1,ns=0,ls=-1,is=new Map;function os(){var a=this;this.i=this.h=null;this.o=[];this.j=null;this.I=1;this.m={};this.K={};this.l=new Gr;this.F=0;this.H=new Ma(5);this.G=new qd(function(){ps(a)});this.C=new kf;this.u=null;this.J=[];this.A=Infinity;this.s=!1;this.g=null}r=os.prototype;r.configure=function(a){this.h=a;this.g&&this.g.configure(this.h);this.l&&(this.l.m=this.h.dash.multiTypeVariantsAllowed&&bb())};
|
|
827
827
|
r.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,qs(c),2);d=e.h;c.i&&rs(c,d);if(!c.i)throw new O(2,7,7001);return e.return(c.j)})};r.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.h=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.G&&(this.G.stop(),this.G=null);this.g&&this.g.destroy();return this.C.destroy()};
|
|
828
|
-
r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return sa(c,2),C(c,qs(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);E(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.
|
|
828
|
+
r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return sa(c,2),C(c,qs(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);E(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Bb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,rs(this,0))}}};
|
|
829
829
|
r.banLocation=function(a){this.g&&this.g.i.set(a,Date.now()+6E4)};function qs(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.g&&(c=Fr(a.g,"Location",!0),c.length&&(b=c)),d=qf(b,a.h.retryParameters),e=Date.now(),C(k,ss(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return C(k,ts(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
|
|
830
830
|
function ts(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Jg(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.h.dash.disableXlinkProcessing)return k.return(us(a,d,c));f=a.h.dash.xlinkFailGracefully;g=Tq(d,a.h.retryParameters,f,c,a.i.networkingEngine);lf(a.C,g);return C(k,g.promise,2)}h=k.h;return k.return(us(a,h,c))})}
|
|
831
|
-
function us(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X,ba,R,Oa,ab,vb,Tb,Cb,xa,ib,wb,Ub,Vb,jb,Ed,hd,Fd,tc,Gd,
|
|
831
|
+
function us(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X,ba,R,Oa,ab,vb,Tb,Cb,xa,ib,wb,Ub,Vb,jb,Ed,hd,Fd,tc,Gd,zh,Ee,Hd,Ac,Wc,Lf,Mf,Ck,Yp,Zp;return K(function(Xc){switch(Xc.g){case 1:(d=a.h.dash.manifestPreprocessor)&&d(b);a.g&&a.g.l.clear();e=[c];f=[];g=new Map;h=pg(b,"Location");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=m.getAttribute("serviceLocation"),q=vg(m))p=xc(e,[q])[0],n&&(a.g?Er(a.g,"Location",n,p):g.set(n,p)),f.push(p);a.g?(u=Fr(a.g,"Location",!0),0<
|
|
832
832
|
u.length&&(e=a.o=u)):f.length&&(e=a.o=f);v=Promise.resolve();if((x=og(b,"ContentSteering"))&&a.i){z=x.getAttribute("defaultServiceLocation");if(a.g)a.g.j=e,a.g.h=z;else if(a.g=new Ar(a.i),a.g.configure(a.h),a.g.setManifestType("DASH"),a.g.j=e,a.g.h=z,y=vg(x))(B=xg(x,"queryBeforeStart",Fg,!1))?v=Br(a.g,y):Br(a.g,y);A=t(g.keys());for(D=A.next();!D.done;D=A.next())F=D.value,J=g.get(F),Er(a.g,"Location",F,J)}G=pg(b,"BaseURL");I=!1;if(a.g)for(L=t(G),M=L.next();!M.done;M=L.next())P=M.value,V=P.getAttribute("serviceLocation"),
|
|
833
833
|
X=vg(P),V&&X&&(Er(a.g,"BaseURL",V,X),I=!0);I&&a.g||(ba=G.map(vg),H=xc(e,ba));R=function(){return a.g&&I?Fr(a.g,"BaseURL"):H?H:[]};Oa=0;G&&G.length&&(Oa=xg(G[0],"availabilityTimeOffset",Eg)||0);ab=a.h.dash.ignoreMinBufferTime;vb=0;ab||(vb=xg(b,"minBufferTime",zg)||0);a.F=xg(b,"minimumUpdatePeriod",zg,-1);Tb=xg(b,"availabilityStartTime",yg);Cb=xg(b,"timeShiftBufferDepth",zg);xa=a.h.dash.ignoreSuggestedPresentationDelay;ib=null;xa||(ib=xg(b,"suggestedPresentationDelay",zg));wb=a.h.dash.ignoreMaxSegmentDuration;
|
|
834
|
-
Ub=null;wb||(Ub=xg(b,"maxSegmentDuration",zg));Vb=b.getAttribute("type")||"static";if(a.j)for(jb=a.j.presentationTimeline,Ed=t(Object.values(a.m)),hd=Ed.next();!hd.done;hd=Ed.next())Fd=hd.value,Fd.segmentIndex&&Fd.segmentIndex.bb(jb.eb());else tc=a.h.defaultPresentationDelay||1.5*vb,Gd=null!=ib?ib:tc,jb=new jj(Tb,Gd,a.h.dash.autoCorrectDrift);jb.nc("static"==Vb);(
|
|
834
|
+
Ub=null;wb||(Ub=xg(b,"maxSegmentDuration",zg));Vb=b.getAttribute("type")||"static";if(a.j)for(jb=a.j.presentationTimeline,Ed=t(Object.values(a.m)),hd=Ed.next();!hd.done;hd=Ed.next())Fd=hd.value,Fd.segmentIndex&&Fd.segmentIndex.bb(jb.eb());else tc=a.h.defaultPresentationDelay||1.5*vb,Gd=null!=ib?ib:tc,jb=new jj(Tb,Gd,a.h.dash.autoCorrectDrift);jb.nc("static"==Vb);(zh=jb.R())&&!isNaN(a.h.availabilityWindowOverride)&&(Cb=a.h.availabilityWindowOverride);null==Cb&&(Cb=Infinity);jb.Xd(Cb);Ee=b.getAttribute("profiles")||
|
|
835
835
|
"";Hd={zb:"static"!=Vb,presentationTimeline:jb,ta:null,ba:null,oa:null,M:null,bandwidth:0,Wf:!1,ac:Oa,profiles:Ee.split(",")};Ac=vs(a,Hd,R,b);Wc=Ac.duration;Lf=Ac.periods;"static"!=Vb&&Ac.Lf||jb.Pa(Wc||Infinity);a.A&&!a.s&&(Mf=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?jb.lg(a.A):a.A&&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.");
|
|
836
836
|
jb.Ye(Ub||1);return C(Xc,a.l.Gf(Lf,Hd.zb),2);case 2:return C(Xc,v,3);case 3:a.s&&(vb=0);if(a.j){a.j.variants=a.l.j;Ck=a.l.Ie();0<Ck.length&&(a.j.textStreams=Ck);a.j.imageStreams=a.l.i;a.i.filter(a.j);Xc.B(4);break}a.j={presentationTimeline:jb,variants:a.l.j,textStreams:a.l.Ie(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:vb||0,sequenceMode:a.h.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:ws(b)};if(!jb.ug()){Xc.B(5);break}Yp=pg(b,"UTCTiming");
|
|
837
837
|
return C(Xc,xs(a,R,Yp),6);case 6:Zp=Xc.h;if(!a.i)return Xc.return();jb.mg(Zp);case 5:jb.Nd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),E(Xc)}})}
|
|
@@ -849,7 +849,7 @@ u?x="visually impaired":"2"==u&&(x="hard of hearing"));if(l)return null;l=pg(c,"
|
|
|
849
849
|
k||f)return null;throw new O(2,4,4003);}if(!b.oa.contentType||"application"==b.oa.contentType)for(b.oa.contentType=Es(c[0].mimeType,c[0].codecs),k=t(c),p=k.next();!p.done;p=k.next())p.value.type=b.oa.contentType;k=b.oa.id||"__fake__"+a.I++;m=t(c);for(p=m.next();!p.done;p=m.next()){p=p.value;u=t(D.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&p.keyIds?new Set([].concat(w(z.keyIds),w(p.keyIds))):z.keyIds||p.keyIds;a.h.dash.enableAudioGroups&&(p.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(ad);
|
|
850
850
|
return{id:k,contentType:b.oa.contentType,language:F,bj:e,streams:c,drmInfos:D.drmInfos,wf:f,Ph:l}}
|
|
851
851
|
function Ds(a,b,c,d,e,f,g,h,k,l,m){b.M=zs(a,l,b.oa,null);a.A=Math.min(a.A,b.M.ac);if(!Fs(b.M))return null;var n=b.ba.start;b.bandwidth=xg(l,"bandwidth",Cg)||0;var q=b.M.contentType,p=q==Dc||"application"==q;q="image"==q;try{var u=void 0;if(c.ke){var v=b.M.cb,x=xc(v(),[c.ke.zh]),z=qf(x,a.h.retryParameters);u={method:"AES-128",iv:c.ke.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,I,L;return K(function(M){if(1==M.g)return C(M,ss(a,z,6),2);if(3!=M.g){H=M.h;if(!H.data||16!=H.data.byteLength)throw new O(2,
|
|
852
|
-
4,4049);I={name:"AES-CBC"};L=u;return C(M,window.crypto.subtle.importKey("raw",H.data,I,!0,["decrypt"]),3)}L.cryptoKey=M.h;u.fetchKey=void 0;E(M)})}}}v=function(H,I,L,M){return Gs(a,H,I,L,M)};if(b.M.ed)var y=fr(b,v,u);else if(b.M.
|
|
852
|
+
4,4049);I={name:"AES-CBC"};L=u;return C(M,window.crypto.subtle.importKey("raw",H.data,I,!0,["decrypt"]),3)}L.cryptoKey=M.h;u.fetchKey=void 0;E(M)})}}}v=function(H,I,L,M){return Gs(a,H,I,L,M)};if(b.M.ed)var y=fr(b,v,u);else if(b.M.Fb)y=lr(b,a.m,u);else if(b.M.fd)y=qr(b,v,a.m,!!a.j,a.h.dash.initialSegmentLimit,a.K,u);else{var B=b.ba.duration||0,A=b.M.cb;y={dc:function(){return Promise.resolve(Ij(n,B,A()))}}}}catch(H){if((p||q)&&4002==H.code)return null;throw H;}v=pg(l,"ContentProtection");v=Gq(v,c,
|
|
853
853
|
a.h.dash.ignoreDrmInfo,a.h.dash.keySystemsByURI);v=new Set(v?[v]:[]);x=!1;pg(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var F;if(q&&((l=pg(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
854
854
|
(F=l.getAttribute("value")),!F))return null;var J;l=b.M.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"))&&(J="PQ");l=b.M.id?b.ta.id+","+b.M.id:"";var G=l&&a.m[l]?a.m[l]:{id:a.I++,originalId:b.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,
|
|
855
855
|
codecs:b.M.codecs,frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.oa.language,label:f,type:b.oa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.M.Td,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:F,accessibilityPurpose:m,
|
|
@@ -857,10 +857,10 @@ external:!1,fastSwitching:!1};G.createSegmentIndex=function(){var H;return K(fun
|
|
|
857
857
|
function ps(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,sa(d,2),C(d,qs(a),4);case 4:b=d.h;ua(d,3);break;case 2:if(c=va(d),a.i){if(a.h.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();rs(a,b);E(d)}})}function rs(a,b){0>a.F||a.G.U(Math.max(a.F-b,Na(a.H)))}
|
|
858
858
|
function zs(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Td:null,audioSamplingRate:null,ac:0,jf:0};d=d||c.cb;var e=b.getAttribute("id"),f=pg(b,"BaseURL"),g,h=!1;if(a.g)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.getAttribute("serviceLocation");m=vg(m);l&&m&&(Er(a.g,e,l,m),h=!0)}h&&a.g||(g=f.map(vg));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")||
|
|
859
859
|
c.codecs;var n=xg(b,"frameRate",Gg)||c.frameRate,q=b.getAttribute("sar")||c.pixelAspectRatio,p=Hs(pg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=pg(b,"AudioChannelConfiguration");u=Is(u)||c.Td;var v=xg(b,"audioSamplingRate",Dg)||c.audioSamplingRate;k||(k=Es(l,m));var x=og(b,"SegmentBase"),z=og(b,"SegmentTemplate"),y=x?xg(x,"availabilityTimeOffset",Eg)||0:0,B=z?xg(z,"availabilityTimeOffset",Eg)||0:0,A=f&&f.length?xg(f[0],"availabilityTimeOffset",Eg)||0:0;y=c.ac+A+y+B;B=null;(A=og(b,"SegmentSequenceProperties"))&&
|
|
860
|
-
(A=og(A,"SAP"))&&(B=xg(A,"cadence",Bg));return{cb:function(){return xc(d(),f.length?a.g&&h?Fr(a.g,e):g?g:[]:[])},ed:x||c.ed,
|
|
860
|
+
(A=og(A,"SAP"))&&(B=xg(A,"cadence",Bg));return{cb:function(){return xc(d(),f.length?a.g&&h?Fr(a.g,e):g?g:[]:[])},ed:x||c.ed,Fb:og(b,"SegmentList")||c.Fb,fd:z||c.fd,width:xg(b,"width",Dg)||c.width,height:xg(b,"height",Dg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.getAttribute("lang"),Td:u,audioSamplingRate:v,ac:y,jf:B||c.jf}}
|
|
861
861
|
function Hs(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}
|
|
862
862
|
function Is(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=
|
|
863
|
-
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 Fs(a){var b=a.ed?1:0;b+=a.
|
|
863
|
+
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 Fs(a){var b=a.ed?1:0;b+=a.Fb?1:0;b+=a.fd?1:0;if(0==b)return a.contentType==Dc||"application"==a.contentType?!0:!1;1!=b&&(a.ed&&(a.Fb=null),a.fd=null);return!0}
|
|
864
864
|
function Js(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=xc(b(),[c]),f=qf(e,a.h.retryParameters),f.method=d,g=a.i.networkingEngine.request(4,f),lf(a.C,g),C(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=Nf(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
|
|
865
865
|
function xs(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.h.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;sa(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.B(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.B(8);
|
|
866
866
|
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.B(9);break;case 7:return C(n,Js(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,Js(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ua(n,
|
|
@@ -933,7 +933,7 @@ type:g,gg:[],Z:d,Sb:P,rb:X,td:Oa,sd:ab,Sc:!1,qe:-1,Xa:Cb,Ya:xa,Pd:H,Se:!1})})}fu
|
|
|
933
933
|
function pu(a,b,c,d,e,f,g,h,k,l,m,n){var q=cu(c,b)||du(c),p=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())p.push(u.value)}k=void 0;u=null;c==Dc?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");return{id:a.u++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
934
934
|
segmentIndex:null,mimeType:q,codecs:b,kind:c==Dc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:dd(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:p,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1}}
|
|
935
935
|
function Bt(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=Us(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=Rs(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=hu[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,Dg:d}}
|
|
936
|
-
function su(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 O(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=jg(g.substr(2));if(16!=h.byteLength)throw new O(2,4,4048);}else f=Xs(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,q,p;return K(function(u){if(1==u.g)return l=Ys(d(),Rs(b,"URI"),e),m=qf(
|
|
936
|
+
function su(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 O(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=jg(g.substr(2));if(16!=h.byteLength)throw new O(2,4,4048);}else f=Xs(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,q,p;return K(function(u){if(1==u.g)return l=Ys(d(),Rs(b,"URI"),e),m=qf(l,a.g.retryParameters),
|
|
937
937
|
C(u,Xt(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new O(2,4,4049);q={name:"AES-CBC"};p=k;return C(u,window.crypto.subtle.importKey("raw",n.data,q,!0,["decrypt"]),3)}p.cryptoKey=u.h;k.fetchKey=void 0;E(u)})}};return k}
|
|
938
938
|
function Et(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Ws(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Ws(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Ws(b.g,"EXT-X-PART-INF"))a.K=Number(Rs(e,"PART-TARGET"));b=Ws(b.g,"EXT-X-SERVER-CONTROL");a.A&&a.K?(a.m=a.lb?5*a.K<=c?Math.min(a.K,a.m):Math.min(c,a.m):Math.min(a.K,a.m),a.ma=b?Number(Rs(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
939
939
|
b.getAttribute("HOLD-BACK"):null,a.ka=c?Number(c.value):0);a.Aa=Math.max(d,a.Aa)}function Tt(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ma)b=a.ma;else if(a.ka)b=a.ka;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Aa*c}a.l.qf(0);a.l.ng(b);a.l.nc(!1)}
|
|
@@ -1047,13 +1047,13 @@ r.onInitialVariantChosen=function(){};r.banLocation=function(){};Bh["application
|
|
|
1047
1047
|
function yw(a,b){var c=new Vv;return cf(void 0).pa(function(){return c.init()}).pa(function(){return Zv(c,b.Wa(),b.va())}).pa(function(d){return d.getSegments([b.key()])}).pa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}N("shaka.offline.OfflineScheme",ww);ww.plugin=xw;nf("offline",xw);function zw(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Aw(v.info,q)){v.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Bw(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
|
|
1048
1048
|
function Bw(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new Kg({Tb:b,onError:function(){},Ud:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),sa(f,2),d.configure(a),C(f,Sg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==
|
|
1049
1049
|
h.g)return sa(h,2),C(h,dh(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);E(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function Aw(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ub(a.audioCapabilities,b.audioCapabilities,c)&&ub(a.videoCapabilities,b.videoCapabilities,c)};function Cw(a,b,c){var d=b.presentationTimeline.getDuration();b=Dw(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ew(a,b){var c=qw(new pw(a.Wa(),a.va()),b),d=b.appMetadata||{};c=Dw(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
1050
|
-
function Dw(a){var b=[],c=pe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(ge(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(he(c.value));return b};function Fw(){this.g={}}function Gw(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Hw(a,b){a.g[b.id]=b.bandwidth||2048}function Iw(a,b){a=a.g[b];null==a&&(a=0);return a};function Jw(a){var b=this;if(a&&a.constructor!=W)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.
|
|
1051
|
-
case 4:b.h=null,b.g=null,E(k)}})})}function Kw(){if(rd())a:{var a=t(Wv.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Jw.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));return Sl(this.h,a)};r.getConfiguration=function(){var a=Ql();Sl(a,this.h,Ql());return a};r.
|
|
1050
|
+
function Dw(a){var b=[],c=pe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(ge(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(he(c.value));return b};function Fw(){this.g={}}function Gw(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Hw(a,b){a.g[b.id]=b.bandwidth||2048}function Iw(a,b){a=a.g[b];null==a&&(a=0);return a};function Jw(a){var b=this;if(a&&a.constructor!=W)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Ob()):(this.h=Ql(),this.g=new mf);this.i=[];this.j=[];var c=!a;this.l=new yf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return Fv(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return C(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return C(k,b.g.destroy(),4);
|
|
1051
|
+
case 4:b.h=null,b.g=null,E(k)}})})}function Kw(){if(rd())a:{var a=t(Wv.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Jw.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));return Sl(this.h,a)};r.getConfiguration=function(){var a=Ql();Sl(a,this.h,Ql());return a};r.Ob=function(){return this.g};
|
|
1052
1052
|
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Ev(this.g);this.j.push(f);b=Lw(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.B(2):C(h,Nk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Ah(a,c||null);return h.return(g())})},e,f);b=new $e(b,function(){return Fv(f)});b.finally(function(){tb(d.j,f)});return Mw(this,b)};
|
|
1053
1053
|
function Lw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:return Nw(),h=g=null,k=new Vv,n=m=l=null,sa(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Ow(a,b,g,e),6);case 6:q=A.h;Pw(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.Rb();if(!p)throw new O(2,9,9005,b);return C(A,Qw(a,q,function(D){n=n||D},e),7);case 7:h=A.h;Pw(a);if(n)throw n;return C(A,Rw(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Pw(a),C(A,Xv(k),10);case 10:return l=A.h,Pw(a),u=Sw(h,
|
|
1054
1054
|
q,b,c,e,f),v=u.Ah,x=u.vf,C(A,l.va.addManifests([v]),11);case 11:z=A.h;Pw(a);m=z[0];Pw(a);if(n)throw n;return C(A,Tw(a,x,m,v,f,e,l.va,q,h),12);case 12:return Pw(a),Uw(q,v,h,e),C(A,l.va.updateManifest(m,v),13);case 13:return Pw(a),y=new nw("manifest",l.path.Wa,l.path.va,m),A.return(Ew(y,v));case 3:return wa(A),C(A,k.destroy(),14);case 14:if(!g){A.B(15);break}return C(A,g.stop(),15);case 15:if(!h){A.B(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.B(19);break}return C(A,
|
|
1055
1055
|
Vw(m),19);case 19:throw n||B;}})}
|
|
1056
|
-
function Tw(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,v,x,z,y;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var F,J,G,H,I,L,M;return K(function(P){if(1==P.g){F={};J=t(A);for(G=J.next();!G.done;F={
|
|
1056
|
+
function Tw(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,v,x,z,y;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var F,J,G,H,I,L,M;return K(function(P){if(1==P.g){F={};J=t(A);for(G=J.next();!G.done;F={Ib:F.Ib},G=J.next())F.Ib=G.value,H=Bv(F.Ib,f),I=F.Ib.i,L=F.Ib.h,M=function(V){return function(X){var ba,R,Oa;return K(function(ab){if(1==ab.g)return C(ab,g.addSegments([{data:X}]),2);ba=ab.h;Pw(a);R=V.Ib.g;Oa=Av(R);l[Oa]=ba[0];m+=X.byteLength;E(ab)})}}(F),Hv(e,F.Ib.groupId,H,I,L,M);return C(P,
|
|
1057
1057
|
Jv(e),2)}if(!D)return P.B(0);Pw(a);Uw(h,d,k,f);return C(P,g.updateManifest(c,d),0)})};q=!1;sa(B,2);if(!Ww(h)||!q||Xw(h)){B.B(4);break}return C(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return Pw(a),b=b.filter(function(A){return!A.h}),p=l,u=m,l={},m=0,C(B,Yw(g,c,d,p,u,function(){return Pw(a)}),6);case 6:Pw(a);case 4:if(q){B.B(7);break}return C(B,n(b,!1),8);case 8:return Pw(a),v=l,x=m,l={},m=0,C(B,Yw(g,c,d,v,x,function(){return Pw(a)}),9);case 9:Pw(a);case 7:ua(B,0);break;case 2:return z=
|
|
1058
1058
|
va(B),y=Object.values(l),C(B,g.removeSegments(y,function(){}),10);case 10:throw z;}})}function Vw(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Vv,C(f,b.init(),2);case 2:return C(f,Xv(b),3);case 3:return c=f.h,d=new nw("manifest",c.path.Wa,c.path.va,a),C(f,b.destroy(),4);case 4:return e=new Jw,C(f,e.remove(d.toString()),0)}})}
|
|
1059
1059
|
function Yw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,x;return K(function(z){switch(z.g){case 1:g=!1;sa(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())p=q.value,u=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=u&&(p.dataKey=u,p.pendingSegmentRefId=void 0),u=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=u&&(p.initSegmentKey=u,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
|
|
@@ -1079,7 +1079,7 @@ function bx(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ta(c,2),C(c,b
|
|
|
1079
1079
|
function gx(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=aw(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:fx(d,!1),videoCapabilities:fx(d,!0)}});return C(h,zw(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1080
1080
|
function kx(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
1081
1081
|
function Zw(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}N("shaka.offline.Storage",Jw);Jw.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new Vv,ta(b,2),C(b,bw(a),2)):5!=b.g?(wa(b),C(b,a.destroy(),5)):ya(b,0)})};
|
|
1082
|
-
Jw.prototype.list=Jw.prototype.list;Jw.prototype.removeEmeSessions=Jw.prototype.Oh;Jw.prototype.remove=Jw.prototype.remove;Jw.prototype.store=Jw.prototype.store;Jw.prototype.getNetworkingEngine=Jw.prototype.
|
|
1082
|
+
Jw.prototype.list=Jw.prototype.list;Jw.prototype.removeEmeSessions=Jw.prototype.Oh;Jw.prototype.remove=Jw.prototype.remove;Jw.prototype.store=Jw.prototype.store;Jw.prototype.getNetworkingEngine=Jw.prototype.Ob;Jw.prototype.getConfiguration=Jw.prototype.getConfiguration;Jw.prototype.configure=Jw.prototype.configure;Jw.prototype.destroy=Jw.prototype.destroy;Jw.support=Kw;
|
|
1083
1083
|
var $w=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
1084
1084
|
zn.offline=Kw;function nx(){}function ox(a,b){a={priority:b||0,callback:a};for(b=0;b<px.length;b++)if(px[b].priority<a.priority){px.splice(b,0,a);return}px.push(a)}N("shaka.polyfill",nx);nx.register=ox;nx.installAll=function(){for(var a=t(px),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Sa("Error installing polyfill!",c)}}};var px=[];function qx(){this.g=new rx}function sx(){window.AbortController||(window.AbortController=qx,window.AbortSignal=rx)}qx.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new Q("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};ea.Object.defineProperties(qx.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});nx.AbortController=qx;qx.install=sx;
|
|
1085
1085
|
function rx(){jf.call(this);this.h=!1;this.g=void 0;this.onabort=null}oa(rx,jf);ea.Object.defineProperties(rx.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});ox(sx);function tx(){}function ux(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())vx(b.value)}function vx(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}nx.Aria=tx;tx.install=ux;ox(ux);function wx(){}function xx(){yx()}nx.EncryptionScheme=wx;wx.install=xx;ox(xx,-2);function zx(){}
|
|
@@ -1130,7 +1130,7 @@ function Gy(){return this.webkitSupportsPresentationMode("picture-in-picture")?(
|
|
|
1130
1130
|
function Hy(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Iy(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}nx.PiPWebkit=Ey;Ey.install=Fy;ox(Fy);function Ly(){}function My(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Ny))}function Ny(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}nx.RandomUUID=Ly;Ly.install=My;ox(My);function Oy(){}function Py(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Qy)}function Qy(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}nx.StorageEstimate=Oy;Oy.install=Py;ox(Py);function Ry(){}function Sy(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Ty})}function Ty(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}nx.Symbol=Ry;Ry.install=Sy;ox(Sy);function Uy(){}function Vy(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}nx.VideoPlayPromise=Uy;Uy.install=Vy;ox(Vy);function Wy(){}function Xy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Ad())&&(a.getVideoPlaybackQuality=Yy)}}function Yy(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}nx.VideoPlaybackQuality=Wy;Wy.install=Xy;ox(Xy);function Zy(){}function $y(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=az;else if(6==b)a=bz;else{try{var c=!!az(1,2,"")}catch(d){c=!1}c&&(a=az)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function az(a,b,c){return new window.TextTrackCue(a,b,c)}function bz(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}nx.VTTCue=Zy;Zy.install=$y;ox($y);function cz(){}cz.prototype.parseInit=function(){};cz.prototype.setSequenceMode=function(){};cz.prototype.setManifestType=function(){};cz.prototype.parseMedia=function(a,b){var c=null,d=[];a=Nf(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=dz.exec(e))){var f=ez.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new yb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1131
1131
|
N("shaka.text.LrcTextParser",cz);cz.prototype.parseMedia=cz.prototype.parseMedia;cz.prototype.setManifestType=cz.prototype.setManifestType;cz.prototype.setSequenceMode=cz.prototype.setSequenceMode;cz.prototype.parseInit=cz.prototype.parseInit;var dz=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,ez=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Rc["application/x-subtitle-lrc"]=function(){return new cz};function fz(){}fz.prototype.parseInit=function(){};fz.prototype.setSequenceMode=function(){};fz.prototype.setManifestType=function(){};
|
|
1132
1132
|
fz.prototype.parseMedia=function(a,b,c){var d=Nf(a);a=[];if(""==d)return a;var e=Hg(d,"tt");if(!e)throw new O(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=ug(e,gz,"frameRate"),g=ug(e,gz,"subFrameRate"),h=ug(e,gz,"frameRateMultiplier"),k=ug(e,gz,"tickRate"),l=ug(e,gz,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=ug(e,hz,"extent");if("default"!=m&&"preserve"!=m)throw new O(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new iz(f,
|
|
1133
|
-
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{
|
|
1133
|
+
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{Kb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?sg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new zb;var v=u.getAttribute("xml:id");if(v){p.id=v;var x=null;n&&(x=jz.exec(n)||kz.exec(n));v=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,y=lz(u,h,"extent");if(y){var B=(z=jz.exec(y))||kz.exec(y);
|
|
1134
1134
|
null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=v&&(p.width=100*p.width/v),null!=x&&(p.height=100*p.height/x)),p.widthUnits=z||null!=v?Sb:0,p.heightUnits=z||null!=x?Sb:0)}if(u=lz(u,h,"origin"))if(B=(z=jz.exec(u))||kz.exec(u),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?y||(p.width=100-p.viewportAnchorX,p.widthUnits=Sb,p.height=100-p.viewportAnchorY,p.heightUnits=Sb):(null!=x&&(p.viewportAnchorY=100*p.viewportAnchorY/x),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/
|
|
1135
1135
|
v)),p.viewportAnchorUnits=z||null!=v?Sb:0}else p=null;p&&k.push(p)}if(pg(d,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");n=t(pg(d,"div"));for(q=n.next();!q.done;q=n.next())if(pg(q.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(b=mz(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1136
1136
|
function mz(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 p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var u=null,v=t(nz),x=v.next();!x.done&&!(u=oz(p,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;var z=ug(p,nz,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new fc(n),z=new fc(z),(x=x.resolve(z).toString())&&(v=x));if("p"==a.nodeName||u||v)m=!0;a=m;x="default"==(p.getAttribute("xml:space")||
|
|
@@ -1215,7 +1215,7 @@ function EA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var AA=[3
|
|
|
1215
1215
|
r.transmux=function(a,b,c,d){a=hb(a);for(c=Vh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&EA(a,e)){var f=zA(a,e),g=4;f&&f.S&&(g=f.S);e+=g;e=e===a.length||e+1<a.length&&EA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=zA(a,c);if(!f)return Promise.reject(new O(2,3,3018));h||(h=f);c+f.S<=a.length&&e.push({data:a.subarray(c,c+f.S),size:f.S,duration:1152,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}});c+=f.S}if(!h)return Promise.reject(new O(2,3,3018));a=9E4*h.Sh/h.sampleRate*this.h;d={id:b.id,
|
|
1216
1216
|
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:a,Oa:e},stream:b};h=new Cu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Iu(h),this.g.set(b.id,d));b=Zu(h);this.h++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Mp3Transmuxer",FA);FA.prototype.transmux=FA.prototype.transmux;FA.prototype.getOriginalMimeType=FA.prototype.getOriginalMimeType;
|
|
1217
1217
|
FA.prototype.convertCodecs=FA.prototype.convertCodecs;FA.prototype.isSupported=FA.prototype.isSupported;FA.prototype.destroy=FA.prototype.destroy;Yb("audio/mpeg",function(){return new FA("audio/mpeg")},dc);function GA(a){this.h=a;this.g=null}r=GA.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Oc(a).split(","),c=Bc("audio",b);b=Bc("video",b);return!c||b||"mp3"!=Kc(c)?!1:Za(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
|
|
1218
|
-
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new ni;a=hb(a);a=this.g.parse(a);if("mp3"!=a.Nc().audio||"audio"!=e)return Promise.reject(new O(2,3,3018));e=new Uint8Array([]);a=t(a.
|
|
1218
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new ni;a=hb(a);a=this.g.parse(a);if("mp3"!=a.Nc().audio||"audio"!=e)return Promise.reject(new O(2,3,3018));e=new Uint8Array([]);a=t(a.Mb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=zA(b,c))?(c+d.S<=b.length&&(e=lg(e,b.subarray(c,c+d.S))),c+=d.S):c++;return Promise.resolve(e)};N("shaka.transmuxer.MpegTsTransmuxer",GA);GA.prototype.transmux=GA.prototype.transmux;GA.prototype.getOriginalMimeType=GA.prototype.getOriginalMimeType;
|
|
1219
1219
|
GA.prototype.convertCodecs=GA.prototype.convertCodecs;GA.prototype.isSupported=GA.prototype.isSupported;GA.prototype.destroy=GA.prototype.destroy;Yb("video/mp2t",function(){return new GA("video/mp2t")},cc);/*
|
|
1220
1220
|
@license
|
|
1221
1221
|
MSS Transmuxer
|
|
@@ -1236,12 +1236,12 @@ r.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new ni;a=hb(a);v
|
|
|
1236
1236
|
duration:x,Ta:Math.round((p.pts||0)-(p.dts||0)),flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:v.Vc?2:1,Va:v.Vc?0:1}})}}var z=rA(m);if(!z||null==l)throw new O(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,Ra:[],fa:new Uint8Array([]),la:z.la,sa:z.sa,ua:z.ua,data:{gb:this.g,baseMediaDecodeTime:l,Oa:k},stream:b};break;case "hvc":n=[];p=null;u=[];k=f.ic();if(!k.length)throw new O(2,3,3023);for(v=0;v<k.length;v++){l=
|
|
1237
1237
|
k[v];m=l.nalus;u.push.apply(u,w(m));z=!1;var y=[],B=!1;q=t(m);for(x=q.next();!x.done;x=q.next()){var A=x.value;switch(A.type){case 1:case 0:var D=B=!0;break;case 19:case 20:case 21:z=D=B=!0;break;case 32:D=!0;break;case 33:D=!0;break;case 34:D=!0;break;case 35:B=D=!0;break;case 39:case 40:D=!0;break;default:D=!1}if(B&&D){var F=A.fullData.byteLength,J=new Uint8Array(4);J[0]=F>>24&255;J[1]=F>>16&255;J[2]=F>>8&255;J[3]=F&255;y.push(lg(J,A.fullData))}}var G=y.length?{data:lg.apply(fg,w(y)),Vc:z}:null;
|
|
1238
1238
|
G&&(null==p&&null!=l.dts&&(p=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,Ta:Math.round((l.pts||0)-(l.dts||0)),flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:G.Vc?2:1,Va:G.Vc?0:1}}))}var H=uA(u);if(!H||null==p)throw new O(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ra:[],fa:new Uint8Array([]),
|
|
1239
|
-
la:H.la,sa:H.sa,ua:H.ua,data:{gb:this.g,baseMediaDecodeTime:p,Oa:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=[],L,M=null,P=t(f.
|
|
1239
|
+
la:H.la,sa:H.sa,ua:H.ua,data:{gb:this.g,baseMediaDecodeTime:p,Oa:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=[],L,M=null,P=t(f.Mb()),V=P.next();!V.done;V=P.next()){var X=V.value,ba=X.data;if(ba){var R=0;L=iA(ba,R);if(!L)throw new O(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==M&&null!==X.pts&&(M=X.pts);for(;R<ba.length;){var Oa=hA(ba,R);if(Oa){var ab=Oa.Hd+Oa.S;R+ab<=ba.length&&I.push({data:ba.subarray(R+Oa.Hd,R+ab),size:Oa.S,
|
|
1240
1240
|
duration:1024,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}});R+=ab}else R++}}}if(!L||null==M){if(!f.ic().length)throw new O(2,3,3018);M=9E4*c.startTime;var vb=Bc("audio",b.codecs.split(","));if(!vb||!b.channelsCount||!b.audioSamplingRate)throw new O(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ha:vb};var Tb=kA(vb,b.channelsCount);if(!Tb)throw new O(2,3,3018);var Cb=M+9E4*(c.endTime-c.startTime);for(f=M;f<Cb;)I.push({data:Tb,size:Tb.byteLength,duration:1024,Ta:0,flags:{Ua:0,
|
|
1241
|
-
La:0,Ja:0,Ha:0,Ia:2,Va:0}}),f+=1024/L.sampleRate*9E4}var xa=L.sampleRate;f=M/9E4*xa;h={id:b.id,type:"audio",codecs:L.ha,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:I},stream:b};break;case "ac3":L=[];xa=0;I=new Uint8Array([]);M=null;R=t(f.
|
|
1241
|
+
La:0,Ja:0,Ha:0,Ia:2,Va:0}}),f+=1024/L.sampleRate*9E4}var xa=L.sampleRate;f=M/9E4*xa;h={id:b.id,type:"audio",codecs:L.ha,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:I},stream:b};break;case "ac3":L=[];xa=0;I=new Uint8Array([]);M=null;R=t(f.Mb());for(var ib=R.next();!ib.done;ib=R.next()){var wb=ib.value,Ub=wb.data;null==M&&null!==wb.pts&&(M=wb.pts);for(f=0;f<Ub.length;){var Vb=
|
|
1242
1242
|
mA(Ub,f);Vb?(b.audioSamplingRate=Vb.sampleRate,b.channelsCount=Vb.channelCount,xa=Vb.sampleRate,I=Vb.fa,L.push({data:Ub.subarray(f,f+Vb.S),size:Vb.S,duration:1536,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),f+=Vb.S):f++}}if(0==xa||0==I.byteLength||null==M)throw new O(2,3,3018);f=M/9E4*xa;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Ra:[],fa:I,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:L},stream:b};break;case "ec3":L=
|
|
1243
|
-
[];xa=0;M=new Uint8Array([]);I=null;for(var jb=t(f.
|
|
1244
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Ra:[],fa:M,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:L},stream:b};break;case "mp3":L=[];var Gd;xa=null;for(var
|
|
1243
|
+
[];xa=0;M=new Uint8Array([]);I=null;for(var jb=t(f.Mb()),Ed=jb.next();!Ed.done;Ed=jb.next()){var hd=Ed.value,Fd=hd.data;null==I&&null!==hd.pts&&(I=hd.pts);for(f=0;f<Fd.length;){var tc=pA(Fd,f);tc?(b.audioSamplingRate=tc.sampleRate,b.channelsCount=tc.channelCount,xa=tc.sampleRate,M=tc.fa,L.push({data:Fd.subarray(f,f+tc.S),size:tc.S,duration:1536,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),f+=tc.S):f++}}if(0==xa||0==M.byteLength||null==I)throw new O(2,3,3018);f=I/9E4*xa;h={id:b.id,type:"audio",codecs:"ec-3",
|
|
1244
|
+
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Ra:[],fa:M,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:L},stream:b};break;case "mp3":L=[];var Gd;xa=null;for(var zh=t(f.Mb()),Ee=zh.next();!Ee.done;Ee=zh.next()){var Hd=Ee.value,Ac=Hd.data;if(Ac)for(null==xa&&null!==Hd.pts&&(xa=Hd.pts),f=0;f<Ac.length;){var Wc=zA(Ac,f);Wc?(Gd||(Gd=Wc),f+Wc.S<=Ac.length&&L.push({data:Ac.subarray(f,f+Wc.S),size:Wc.S,duration:1152,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),
|
|
1245
1245
|
f+=Wc.S):f++}}if(!Gd||null==xa)throw new O(2,3,3018);var Lf=Gd.sampleRate;f=xa/9E4*Lf;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Lf,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:L},stream:b}}h&&a.push(h)}}catch(Mf){return Mf&&3023==Mf.code?Promise.resolve(new Uint8Array([])):Promise.reject(Mf)}if(!a.length)return Promise.reject(new O(2,3,3018));a=new Cu(a);this.h.has(b.id)?d=this.h.get(b.id):
|
|
1246
1246
|
(d=Iu(a),this.h.set(b.id,d));b=Zu(a);this.g++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.TsTransmuxer",LA);LA.prototype.transmux=LA.prototype.transmux;LA.prototype.getOriginalMimeType=LA.prototype.getOriginalMimeType;LA.prototype.convertCodecs=LA.prototype.convertCodecs;LA.prototype.isSupported=LA.prototype.isSupported;LA.prototype.destroy=LA.prototype.destroy;var MA=["aac","ac-3","ec-3","mp3"],NA=["avc","hevc"];Yb("video/mp2t",function(){return new LA("video/mp2t")},bc);/*
|
|
1247
1247
|
@license
|