shaka-player 4.9.6 → 4.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales.js +59 -39
- package/dist/shaka-player.compiled.debug.js +281 -281
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +957 -957
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +344 -344
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +1175 -1174
- package/dist/shaka-player.ui.map +3 -3
- package/lib/media/drm_engine.js +1 -2
- package/lib/media/playhead.js +16 -9
- package/lib/media/segment_utils.js +33 -48
- package/lib/media/streaming_engine.js +23 -2
- package/lib/player.js +3 -1
- package/lib/util/mime_utils.js +6 -1
- package/lib/util/mp4_box_parsers.js +4 -4
- package/package.json +1 -1
- package/ui/locales/es.json +2 -0
- package/ui/locales/fr.json +12 -3
- package/ui/locales/pt-BR.json +9 -0
- package/ui/locales/pt-PT.json +9 -0
|
@@ -56,9 +56,9 @@ ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)La(
|
|
|
56
56
|
function Sa(){}function Ta(){};function Ua(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ua.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Va(a){return a.h/(1-Math.pow(a.g,a.i))};function Xa(){this.h=new Ua(2);this.j=new Ua(5);this.g=0;this.i=128E3;this.l=16E3}Xa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Xa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Xa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Va(this.h),Va(this.j))};function Ya(){}function $a(){}function ab(){}function bb(a){var b=Ka.apply(1,arguments);cb.has(a)||(cb.add(a),ab.apply(Ya,x(b)))}function db(){}function eb(){}function fb(){}var cb=new Set;window.console&&(ab=function(){return console.warn.apply(console,x(Ka.apply(0,arguments)))},$a=function(){console.error.apply(console,x(Ka.apply(0,arguments)))});function gb(){this.g={}}r=gb.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function hb(){this.g=new gb}r=hb.prototype;r.release=function(){this.nb();this.g=null};r.D=function(a,b,c,d){this.g&&(a=new ib(a,b,c,d),this.g.push(b,a))};r.qa=function(a,b,c,d){function e(g){f.Hb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};r.Hb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Hb(),this.g.remove(b,e))}};
|
|
57
57
|
r.nb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Hb();this.g.g={}}};S("shaka.util.EventManager",hb);hb.prototype.removeAll=hb.prototype.nb;hb.prototype.unlisten=hb.prototype.Hb;hb.prototype.listenOnce=hb.prototype.qa;hb.prototype.listen=hb.prototype.D;hb.prototype.release=hb.prototype.release;function ib(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=jb(a,d);this.target.addEventListener(b,c,this.g)}
|
|
58
58
|
ib.prototype.Hb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function jb(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return kb(a)?b:b.capture||!1}
|
|
59
|
-
function kb(a){var b=lb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}lb=b}return b||!1}var lb=void 0;function mb(a){if(nb.has(a))return nb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);nb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),nb.set(a,b),b):!1}function ob(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var nb=new Map;function pb(a,b){this.g=a;this.h=b}pb.prototype.toString=function(){return"v"+this.g+"."+this.h};function qb(a,b){var c=new pb(5,0),d=rb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function sb(a,b,c,d){ab([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function tb(a,b,c,d){$a([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var rb=null;function ub(){}ub.prototype.extract=function(){};ub.prototype.decode=function(){return[]};ub.prototype.clear=function(){};ub.prototype.getStreams=function(){return[]};function vb(){}vb.prototype.init=function(){};vb.prototype.parse=function(){return[]};function wb(){}function
|
|
59
|
+
function kb(a){var b=lb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}lb=b}return b||!1}var lb=void 0;function mb(a){if(nb.has(a))return nb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);nb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),nb.set(a,b),b):!1}function ob(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var nb=new Map;function pb(a,b){this.g=a;this.h=b}pb.prototype.toString=function(){return"v"+this.g+"."+this.h};function qb(a,b){var c=new pb(5,0),d=rb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function sb(a,b,c,d){ab([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function tb(a,b,c,d){$a([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var rb=null;function ub(){}ub.prototype.extract=function(){};ub.prototype.decode=function(){return[]};ub.prototype.clear=function(){};ub.prototype.getStreams=function(){return[]};function vb(){}vb.prototype.init=function(){};vb.prototype.parse=function(){return[]};function wb(){}function yb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(zb(a)==zb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Ab(a);b=Ab(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function zb(a){return a instanceof ArrayBuffer?a:a.buffer}function Bb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
60
60
|
function Ab(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint8Array)}function Db(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint16Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,DataView)}function Cb(a,b,c,d){var e=zb(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
|
|
61
|
-
S("shaka.util.BufferUtils",wb);wb.toDataView=Eb;wb.toUint16=Db;wb.toUint8=Ab;wb.toArrayBuffer=Bb;wb.equal=
|
|
61
|
+
S("shaka.util.BufferUtils",wb);wb.toDataView=Eb;wb.toUint16=Db;wb.toUint8=Ab;wb.toArrayBuffer=Bb;wb.equal=yb;function Fb(){}Fb.prototype.init=function(){};Fb.prototype.i=function(){};Fb.prototype.g=function(){};Fb.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Fb);function Gb(a){this.l=new vb;if(a=Hb[a.toLowerCase()])this.l=a();this.h=new ub;if(a=Ib)this.h=a()}Gb.prototype.init=function(a,b){void 0!==b&&b||(this.g(),this.l.init(a))};Gb.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=Ab(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
62
62
|
Gb.prototype.g=function(){this.h.clear()};Gb.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Gb);Gb.findDecoder=function(){return Ib};Gb.unregisterDecoder=function(){Ib=null};Gb.registerDecoder=function(a){Ib=a};Gb.findParser=function(a){return Hb[a]};Gb.unregisterParser=function(a){delete Hb[a]};Gb.registerParser=function(a,b){Hb[a]=b};var Hb={},Ib=null;function Jb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Kb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Lb(a,b,c){c||(c=Jb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={ye:d.ye},e=a.next()){d.ye=e.value;e=b.findIndex(function(f){return function(g){return c(f.ye,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
63
63
|
function Mb(a,b,c){c||(c=Jb);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 Nb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Ob;this.position=null;this.positionAlign=Pb;this.size=0;this.textAlign=Qb;this.direction=Rb;this.writingMode=Sb;this.lineInterpretation=Tb;this.line=null;this.lineHeight="";this.lineAlign=Ub;this.displayAlign=Vb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Wb;this.fontStyle=Xb;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
64
64
|
"";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={Ub:32,rows:15}}function Yb(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}Nb.prototype.clone=function(){var a=new Nb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
@@ -116,7 +116,7 @@ audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUr
|
|
|
116
116
|
function Od(a,b){var c=[];a=t(Md[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Nd="text",Pd={ga:"video",U:"audio",ma:Nd,Fe:"image",Vi:"application"},Md={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Qd(){}function Rd(a,b){var c=a;b&&!Sd.includes(a)&&(c+='; codecs="'+b+'"');return c}function Td(a,b){b&&(a+='; codecs="'+b+'"');return a}function Ud(a,b,c){var d=Rd(a,b);b=Td(a,b);lc(b)?(a=lc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
117
117
|
function Vd(a,b,c){var d=[b];Wd.forEach(function(e,f){var g=a[f];"codecs"==f?Sd.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Xd(a){return a.split(";")[0].split("/")[1]}
|
|
118
118
|
function Yd(a){var b=Zd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
119
|
-
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function $d(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Zd(c.value),b.push(c[0]);return b.sort().join(",")}function ae(a){return a.split(";")[0]}
|
|
119
|
+
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function $d(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Zd(c.value),b.push(c[0]);return b.sort().join(",")}function ae(a){return a.split(";")[0]}
|
|
120
120
|
function ge(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function he(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function Zd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",Qd);Qd.getFullTypeWithAllCodecs=Td;Qd.getFullType=Rd;
|
|
121
121
|
var Wd=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Sd=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function ie(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function je(a){return le[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Ib:!1}ie.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
122
122
|
function me(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return E(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Ab(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Ab(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(q){return q.startTime>=a.l&&q.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);F(p)})}
|
|
@@ -134,7 +134,7 @@ var ze=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
134
134
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
135
135
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
136
136
|
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ee(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer instanceof ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Fe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ge(){}
|
|
137
|
-
function He(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Ie(e,b,c);if(d.length){b=new gb;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var w=[],A={};v=t(v);for(var z=v.next();!z.done;A={Zc:A.Zc},z=v.next())A.Zc=z.value,z=d.filter(function(
|
|
137
|
+
function He(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Ie(e,b,c);if(d.length){b=new gb;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var w=[],A={};v=t(v);for(var z=v.next();!z.done;A={Zc:A.Zc},z=v.next())A.Zc=z.value,z=d.filter(function(B){return function(y){return B.Zc.decodingInfos[0][y]}}(A)).length,z>u?(u=z,w=[A.Zc]):z==u&&w.push(A.Zc);f.push.apply(f,x(w))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
|
|
138
138
|
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Yd(m.codecs),p=Yd(g.codecs);n==p&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(u,
|
|
139
139
|
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=ob();var q=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Yd(m.codecs),p=Yd(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),q.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Yd(m.codecs),p=Yd(g.codecs),n==p&&g.bandwidth>m.bandwidth&&(l.push(g),q.push(g.id)))}else l.push(g),
|
|
140
140
|
q.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!q.includes(u.id)?!1:!0})}
|
|
@@ -148,8 +148,8 @@ function We(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,
|
|
|
148
148
|
null;n=t(n||[]);for(var q=n.next();!q.done;q=n.next())p=c(p,q.value);p&&(m.Lc[m.Mc]=p,d=c(d,p))}}(f)));return E(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);F(l)})}
|
|
149
149
|
function Ye(a){var b=[""];a.video&&(b=ge(a.video.contentType).split(","));var c=[""];a.audio&&(c=ge(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={Qb:f.Qb},h=g.next())h=h.value,f.Qb=Ee(a),a.video&&(f.Qb.video.contentType=Rd(ae(f.Qb.video.contentType),e)),a.audio&&(f.Qb.audio.contentType=Rd(ae(f.Qb.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Qb).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
150
150
|
return null})}
|
|
151
|
-
function Qe(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y
|
|
152
|
-
return E(
|
|
151
|
+
function Qe(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y;return O(function(D){switch(D.g){case 1:if(e=a.some(function(C){return C.decodingInfos.length}))return D.return();f={};g=t(d);h=g.next();case 2:if(h.done){D.u(4);break}f.ze=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){D.u(7);break}n=m.value;p=Ze(n,b,c).filter(function(C){return function(I){I=I[0];return(I.keySystemConfiguration&&I.keySystemConfiguration.keySystem)===C.ze}}(f));q=t(p);u=q.next();case 8:if(u.done){D.u(10);break}v=u.value;
|
|
152
|
+
return E(D,We(n,v),9);case 9:u=q.next();D.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();D.u(5);break;case 7:if(k)return D.return();f={ze:f.ze};h=g.next();D.u(2);break;case 4:w=t(a),m=w.next();case 12:if(m.done){D.u(0);break}A=m.value;z=Ze(A,b,c).filter(function(C){C=C[0];C=C.keySystemConfiguration&&C.keySystemConfiguration.keySystem;return!C||!d.includes(C)});B=t(z);u=B.next();case 15:if(u.done){m=w.next();D.u(12);break}y=u.value;return E(D,We(A,y),16);case 16:u=B.next(),D.u(15)}})}
|
|
153
153
|
function Ze(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=ge(k);if(l.includes(",")&&!d){var m=l.split(","),n=ae(k);l=Kd("video",m);m=Kd("audio",m);m=Ue(m,n);n=Ud(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Te(l);k={contentType:Ud(ae(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
|
|
154
154
|
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=ae(l),l=Ue(ge(l),k),k=Ud(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
|
|
155
155
|
k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(var p=g.next();!p.done;p=g.next())f=p.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=
|
|
@@ -202,8 +202,8 @@ r.request=function(a,b,c){var d=this,e=new mg;if(this.i){var f=Promise.reject(ne
|
|
|
202
202
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.wa(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.Yh||!d.l||u.fromCache||"HEAD"==b.method||a!=rg||d.l(u.timeMs,u.data.byteLength,sg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new ng(n.promise,function(){return n.abort()},e);fg(this.m,f);return f};
|
|
203
203
|
function og(a,b,c,d){function e(h){f=f.wa(function(){c.body&&(c.body=Bb(c.body));return h(b,c,d)})}var f=Yf(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.wa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
204
204
|
function pg(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new rc(c.uris[f]),l=k.wb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),sc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=jg[l])?l.qe:null;if(!n)return Wf(new T(2,1,1E3,k));var p=l.ri,q=null,u=null,v=!1,w=!1,A;return Zf(Tf(e)).wa(function(){if(a.i)return Xf();A=Date.now();var z=0;c.requestStartTime=Date.now();
|
|
205
|
-
var
|
|
206
|
-
Yh:m};!w&&a.j&&a.j(z.headers,c,b);return
|
|
205
|
+
var B=n(c.uris[f],c,b,function(C,I,J){q&&q.stop();u&&u.W(D/1E3);a.l&&b==rg&&(z++,c.packetNumber=z,a.l(C,I,sg(d),c),m=!0,h.g=J)},function(C){a.j&&a.j(C,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return B;var y=c.retryParameters.connectionTimeout;y&&(q=new Mc(function(){v=!0;B.abort()}),q.W(y/1E3));var D=c.retryParameters.stallTimeout;D&&(u=new Mc(function(){v=!0;B.abort()}));return B}).wa(function(z){q&&q.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-A);var B={response:z,
|
|
206
|
+
Yh:m};!w&&a.j&&a.j(z.headers,c,b);return B},function(z){q&&q.stop();u&&u.stop();if(a.A){var B=null,y=0;z instanceof T&&(B=z,1001==z.code&&(y=z.data[1]));a.A(c,B,y,v)}if(a.i)return Xf();v&&(z=new T(1,1,1003,c.uris[f],b));if(z instanceof T){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity)return B=(new Map).set("error",z),B=new U("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,pg(a,b,c,d,e,f,z,h)}throw z;})}
|
|
207
207
|
function qg(a,b,c,d){var e=Yf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Be:f.Be},g=a.next())f.Be=g.value,e=e.wa(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return h.Be(b,k,d)}}(f));return e.wa(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function sg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.wd)return!1}return!0}S("shaka.net.NetworkingEngine",gg);
|
|
208
208
|
gg.prototype.request=gg.prototype.request;gg.prototype.destroy=gg.prototype.destroy;gg.makeRequest=lg;gg.defaultRetryParameters=function(){return Sf()};gg.prototype.clearAllResponseFilters=gg.prototype.qh;gg.prototype.unregisterResponseFilter=gg.prototype.Ri;gg.prototype.registerResponseFilter=gg.prototype.vi;gg.prototype.clearAllRequestFilters=gg.prototype.ph;gg.prototype.unregisterRequestFilter=gg.prototype.Qi;gg.prototype.registerRequestFilter=gg.prototype.ui;gg.unregisterScheme=function(a){delete jg[a]};
|
|
209
209
|
gg.registerScheme=hg;gg.prototype.setForceHTTPS=gg.prototype.Of;gg.prototype.setForceHTTP=gg.prototype.Nf;function mg(){this.g=0}gg.NumBytesRemainingClass=mg;function ng(a,b,c){Vf.call(this,a,b);this.h=c}oa(ng,Vf);gg.PendingRequest=ng;var rg=1;gg.RequestType={MANIFEST:0,SEGMENT:rg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};gg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var ig=3;
|
|
@@ -234,24 +234,24 @@ function lh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]
|
|
|
234
234
|
function rh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
235
235
|
function sh(a){var b=[];a=wd(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,position:f?Number(f[1])-1:null,Kb:c.split("/@")[1]||null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Kb=c.slice(1))}return b}
|
|
236
236
|
function th(a,b){var c=sh(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Kb)?uh(a[c],e,d,bh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}function uh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
237
|
-
function vh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&vh(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=vh(b,!1,!0),d.appendChild(c);return d}var Xg=new Map([]);function wh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.fa=this.ca=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new Uf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.da=new Map;this.
|
|
238
|
-
function zh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.
|
|
237
|
+
function vh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&vh(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=vh(b,!1,!0),d.appendChild(c);return d}var Xg=new Map([]);function wh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.fa=this.ca=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new Uf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.da=new Map;this.L=new Mc(function(){return xh(b)});this.S=!1;this.N=[];this.V=!1;this.K=new Mc(function(){yh(b)});this.l.catch(function(){});this.j=new tg(function(){return zh(b)});this.ba=!1;this.F=this.G=null}r=wh.prototype;r.destroy=function(){return this.j.destroy()};
|
|
238
|
+
function zh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,E(b,Ah(a),2);case 2:if(!a.m){b.u(3);break}ua(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:xa(b,5);break;case 4:ya(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.ba=!1,a.G=null,F(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Ua(this.h.updateExpirationTime)};
|
|
239
239
|
function Bh(a,b,c){a.fa=!0;a.A=new Map;a.S=c;return Ch(a,b)}function Dh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.S=0<a.A.size;return Ch(a,b)}
|
|
240
240
|
function Eh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Fh(a,g,[])}
|
|
241
|
-
function Ch(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z;return O(function(
|
|
242
|
-
v.next())w=q.value,Jh(w,zg(a.h.servers),zg(a.h.advanced||{}),a.h.keySystemsMapping);return E(
|
|
241
|
+
function Ch(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z;return O(function(B){if(1==B.g){if(c=Gh(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(y){return y.video&&y.video.drmInfos.length||y.audio&&y.audio.drmInfos.length?!0:!1});g||(h=zg(a.h.servers),Hh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Ih(m),p=t(n),q=p.next();!q.done;q=p.next())u=q.value,k.add(u);v=t(k);for(q=v.next();!q.done;q=
|
|
242
|
+
v.next())w=q.value,Jh(w,zg(a.h.servers),zg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,Qe(b,a.S,a.ba,a.h.preferredKeySystems),2)}ug(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.ca=!0,B.return(Promise.resolve());z=Fh(a,void 0,b);return B.return(g?z:z.catch(function(){}))})}
|
|
243
243
|
function Kh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return E(c,a.G,3);case 3:return ug(a.j),c.return();case 2:return ua(c,4),a.G=a.m.setMediaKeys(a.s),E(c,a.G,6);case 6:xa(c,5);break;case 4:b=ya(c),a.o(new T(2,6,6003,b.message));case 5:ug(a.j),F(c)}})}function Lh(a,b){return O(function(c){if(1==c.g)return E(c,Kh(a),2);Mh(a,b.initDataType,Ab(b.initData));F(c)})}
|
|
244
244
|
r.tc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.qa(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.qa(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Nh(b,e.value);b.V=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ah(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
|
|
245
245
|
b.A.size?E(c,Kh(b),2):c.u(2)}Oh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Lh(b,d)});F(c)})};
|
|
246
246
|
function Ph(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=lg([a.g.serverCertificateUri],a.h.retryParameters);ua(g,3);c=a.C.Db.request(5,b);return E(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ab(d.data);xa(g,4);break;case 3:throw e=ya(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
247
247
|
ua(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:xa(g,0);break;case 6:throw f=ya(g),new T(2,6,6004,f.message);}})}function Qh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Rh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.fb=new Uf,d.push(e.fb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);F(f)})}
|
|
248
248
|
function Oh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){Rh(a,k,h)});return E(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Sh(a))return g.return(a.l);a.l=new Uf;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Mh(a,f.initDataType,f.initData);Th(a)&&a.l.resolve();return g.return(a.l)})}
|
|
249
|
-
function Mh(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(
|
|
249
|
+
function Mh(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(yb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Th(a)&&(a.l.resolve(),a.l=new Uf,a.l.catch(function(){}));Uh(a,b,c,a.g.sessionType)}}function Vh(a){a=a.i.keys();a=vg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
250
250
|
r.df=function(){var a=this,b=this.i.keys();b=vg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.jd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Td=function(){return Ag(this.da)};
|
|
251
|
-
function Fh(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A;return O(function(z){switch(z.g){case 1:d=new Map;if(c.length){e=Wh(a,c,d);z.u(2);break}return E(z,Xh(a,b),3);case 3:e=z.h;case 2:f=e;if(!f)throw new T(2,6,6001);ug(a.j);ua(z,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.H.add(q.contentType.toLowerCase());if(c.length){var
|
|
252
|
-
f.keySystem;var
|
|
253
|
-
for(
|
|
254
|
-
sessionType:
|
|
251
|
+
function Fh(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A;return O(function(z){switch(z.g){case 1:d=new Map;if(c.length){e=Wh(a,c,d);z.u(2);break}return E(z,Xh(a,b),3);case 3:e=z.h;case 2:f=e;if(!f)throw new T(2,6,6001);ug(a.j);ua(z,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.H.add(q.contentType.toLowerCase());if(c.length){var B=
|
|
252
|
+
f.keySystem;var y=d.get(f.keySystem);var D=[],C=[],I=[],J=[],H=[],K=new Set;Yh(y,D,C,J,I,H,K);var G=a.S?"persistent-license":"temporary";B={keySystem:B,encryptionScheme:D[0],licenseServerUri:C[0],distinctiveIdentifierRequired:y[0].distinctiveIdentifierRequired,persistentStateRequired:y[0].persistentStateRequired,sessionType:y[0].sessionType||G,audioRobustness:y[0].audioRobustness||"",videoRobustness:y[0].videoRobustness||"",serverCertificate:J[0],serverCertificateUri:I[0],initData:H,keyIds:K};y=t(y);
|
|
253
|
+
for(D=y.next();!D.done;D=y.next())D=D.value,D.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(B.persistentStateRequired=D.persistentStateRequired);y=B}else y=f.keySystem,B=b.get(f.keySystem),D=[],C=[],I=[],J=[],H=[],K=new Set,Yh(B.drmInfos,D,C,J,I,H,K),y={keySystem:y,encryptionScheme:D[0],licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,
|
|
254
|
+
sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:J[0],serverCertificateUri:I[0],initData:H,keyIds:K};a.g=y;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return E(z,f.createMediaKeys(),6);case 6:u=z.h;ug(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){z.u(7);break}ua(z,8);return E(z,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
|
|
255
255
|
10);case 10:v=z.h;if("usable"!=v)throw new T(2,6,6018);ug(a.j);xa(z,7,4);break;case 8:w=ya(z,4);if(w instanceof T)throw w;throw new T(2,6,6019,w.message);case 7:return a.ca=!0,E(z,Ph(a),11);case 11:ug(a.j);xa(z,0);break;case 4:A=ya(z);ug(a.j,A);a.g=null;a.H.clear();if(A instanceof T)throw A;throw new T(2,6,6002,A.message);}})}
|
|
256
256
|
function Wh(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ih(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Ae:d.Ae},e=a.next())for(d.Ae=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
257
257
|
l.Ae}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
@@ -263,25 +263,25 @@ d.load(b),4);case 4:return g=m.h,ug(a.j),g||(a.i.delete(d),h=a.h.persistentSessi
|
|
|
263
263
|
function Uh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.V?a.N.push(f):Nh(a,f)});a.B.D(e,"keystatuseschange",function(f){return bi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,xf:Infinity,fb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&zd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
264
264
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new T(2,6,6006,f.message,f,h))}})}
|
|
265
265
|
function Nh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&zd(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=lg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
|
|
266
|
-
f.headers[h];if(Kc(a.g.keySystem)){var A=nd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Ug(A,"PlayReadyKeyMessage");var z=ch(A,"HttpHeader");z=t(z);for(var
|
|
267
|
-
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.reject(p),a.i.delete(c),Th(a)&&(a.l.resolve(),a.
|
|
266
|
+
f.headers[h];if(Kc(a.g.keySystem)){var A=nd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Ug(A,"PlayReadyKeyMessage");var z=ch(A,"HttpHeader");z=t(z);for(var B=z.next();!B.done;B=z.next()){var y=B.value;B=ch(y,"name")[0];y=ch(y,"value")[0];g.headers[ah(B)]=ah(y)}A=ch(A,"Challenge")[0];g.body=Ad(ah(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();ua(w,2);m=a.C.Db.request(2,g);return E(w,m.promise,4);case 4:l=w.h;xa(w,3);break;case 2:n=ya(w);if(a.j.g)return w.return();
|
|
267
|
+
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.reject(p),a.i.delete(c),Th(a)&&(a.l.resolve(),a.L.W(.1)));return w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&zd(l.data);ua(w,5);return E(w,c.update(l.data),7);case 7:xa(w,6);break;case 5:return q=ya(w),u=new T(2,6,6008,q.message),a.o(u),d&&d.fb&&d.fb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.fb&&d.fb.resolve(),
|
|
268
268
|
$h(a,d));F(w)}})}
|
|
269
269
|
function bi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Kc(a.g.keySystem)&&16==g.byteLength&&(Rc()||cd())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Cd(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.fb&&(a.i.delete(b),b.close().catch(function(){}));Th(a)&&
|
|
270
|
-
(a.l.resolve(),a.
|
|
271
|
-
function di(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
270
|
+
(a.l.resolve(),a.L.W(ci))}function xh(a){var b=a.aa,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new T(2,6,6014));a.C.me(Ag(c))}
|
|
271
|
+
function di(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H;return O(function(K){if(1==K.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
|
|
272
|
+
{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(G,M){var L,N,P,R,Q,fa,sa,Ia;return O(function(wa){switch(wa.g){case 1:return ua(wa,2),E(wa,M.createMediaKeys(),4);case 4:xa(wa,3);break;case 2:return ya(wa),wa.return();case 3:N=(L=M.getConfiguration().sessionTypes)?L.includes("persistent-license"):
|
|
273
|
+
!1,Vc()&&(N=!1),P=M.getConfiguration().videoCapabilities,R=M.getConfiguration().audioCapabilities,Q={persistentState:N,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(G)&&k.get(G)?Q=k.get(G):k.set(G,Q),(fa=P[0].encryptionScheme)&&!Q.encryptionSchemes.includes(fa)&&Q.encryptionSchemes.push(fa),(sa=P[0].robustness)&&!Q.videoRobustnessLevels.includes(sa)&&Q.videoRobustnessLevels.push(sa),(Ia=R[0].robustness)&&!Q.audioRobustnessLevels.includes(Ia)&&Q.audioRobustnessLevels.push(Ia),
|
|
274
|
+
F(wa)}})};m=function(G,M,L,N){var P,R,Q,fa,sa,Ia,wa,Ja,Qa;return O(function(Aa){switch(Aa.g){case 1:ua(Aa,2);P=Ee(g);R=t(P.videoCapabilities);for(Q=R.next();!Q.done;Q=R.next())fa=Q.value,fa.encryptionScheme=M,fa.robustness=L;sa=t(P.audioCapabilities);for(Q=sa.next();!Q.done;Q=sa.next())Ia=Q.value,Ia.encryptionScheme=M,Ia.robustness=N;wa=Ee(P);wa.persistentState="required";wa.sessionTypes=["persistent-license"];Ja=[wa,P];return E(Aa,navigator.requestMediaKeySystemAccess(G,Ja),4);case 4:return Qa=Aa.h,
|
|
275
|
+
E(Aa,l(G,Qa),5);case 5:xa(Aa,0);break;case 2:ya(Aa),F(Aa)}})};n=function(G,M,L,N){var P,R,Q;return O(function(fa){switch(fa.g){case 1:return ua(fa,2),P={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:G,video:{encryptionScheme:M,robustness:L},audio:{encryptionScheme:M,robustness:N}}},E(fa,navigator.mediaCapabilities.decodingInfo(P),4);case 4:return R=
|
|
276
|
+
fa.h,Q=R.keySystemAccess,E(fa,l(G,Q),5);case 5:xa(fa,0);break;case 2:ya(fa),F(fa)}})};p=t(a);for(q=p.next();!q.done;q=p.next())u=q.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(z=A.value,B=t(a),q=B.next();!q.done;q=B.next())y=q.value,"org.w3.clearkey"===y&&fd()||(v.push(m(y,z,"","")),v.push(n(y,z,"","")));D=t(a);for(q=D.next();!q.done;q=D.next())for(C=q.value,I=t(d[C]||[]),J=I.next();!J.done;J=I.next())H=J.value,v.push(m(C,null,H,"")),v.push(m(C,null,"",H)),v.push(n(C,null,
|
|
277
|
+
H,"")),v.push(n(C,null,"",H));return E(K,Promise.all(v),2)}return K.return(Ag(k))})}function ei(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Mc(e)).W(fi)}),ua(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return xa(c,0);ya(c);F(c)})}
|
|
278
278
|
function Ah(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return E(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return ua(g,2),a.fa||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,ei(e),5):E(g,e.remove(),5);if(2!=g.g)return xa(g,0);ya(g);F(g)})})),0)})}function gi(a,b){return a.length&&b.length&&a!==b?0<hi(a,b).length:!0}
|
|
279
279
|
function hi(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
280
280
|
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
|
|
281
281
|
function Ih(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function yh(a){a.i.forEach(function(b,c){var d=b.xf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.xf=e)})}function Th(a){a=a.i.values();return wg(a,function(b){return b.loaded})}function Sh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.aa.get(c.value))return!1;return!0}
|
|
282
282
|
function Hh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
283
283
|
function Yh(a,b,c,d,e,f,g){var h=[],k={};a=t(a);for(var l=a.next();!l.done;k={la:k.la},l=a.next()){k.la=l.value;b.includes(k.la.encryptionScheme)||b.push(k.la.encryptionScheme);"org.w3.clearkey"==k.la.keySystem&&k.la.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(k.la.licenseServerUri)||h.push(k.la.licenseServerUri):c.includes(k.la.licenseServerUri)||c.push(k.la.licenseServerUri);e.includes(k.la.serverCertificateUri)||e.push(k.la.serverCertificateUri);k.la.serverCertificate&&
|
|
284
|
-
(d.some(function(p){return function(q){return
|
|
284
|
+
(d.some(function(p){return function(q){return yb(q,p.la.serverCertificate)}}(k))||d.push(k.la.serverCertificate));if(k.la.initData){l={};for(var m=t(k.la.initData),n=m.next();!n.done;l={Fd:l.Fd},n=m.next())l.Fd=n.value,f.some(function(p){return function(q){var u=p.Fd;return q.keyId&&q.keyId==u.keyId?!0:q.initDataType==u.initDataType&&yb(q.initData,u.initData)}}(l))||f.push(l.Fd)}if(k.la.keyIds)for(l=t(k.la.keyIds),m=l.next();!m.done;m=l.next())g.add(m.value)}if(1==h.length)c.push(h[0]);else if(0<
|
|
285
285
|
h.length){b=[];h=t(h);for(d=h.next();!d.done;d=h.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));h=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(h))}}
|
|
286
286
|
function Jh(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=
|
|
287
287
|
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 fi=1,ai=5,ci=.5,ii=new Jc(function(){return Bb(new Uint8Array([0]))}),ji=new Map;/*
|
|
@@ -297,14 +297,14 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a)
|
|
|
297
297
|
function(m){k.push({box:m,cb:1701733238})}).P("avc1",function(m){k.push({box:m,cb:1701733238})}).P("avc3",function(m){k.push({box:m,cb:1701733238})}).P("ac-3",function(m){k.push({box:m,cb:1701733217})}).P("ec-3",function(m){k.push({box:m,cb:1701733217})}).P("ac-4",function(m){k.push({box:m,cb:1701733217})}).P("mp4a",function(m){k.push({box:m,cb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Cd(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
|
|
298
298
|
e=ui(e,g,l.box,h,l.cb);return Rc()&&gd()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
299
299
|
function ui(a,b,c,d,e){var f=vi.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);wi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Sc()||Rc()?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,wi(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Kg(b);
|
|
300
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function wi(a,b,c){a=Eb(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 vi=new Jc(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 xi(a,b,c,d,e,f,g){this.
|
|
300
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function wi(a,b,c){a=Eb(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 vi=new Jc(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 xi(a,b,c,d,e,f,g){this.M=a;this.Ba=b;this.ja=c;this.uf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}xi.prototype.ac=function(){return this.Ba};xi.prototype.Yb=function(){return this.ja};xi.prototype.ld=function(){return this.g};function yi(a,b){return a===b?!0:a&&b?a.ac()==b.ac()&&a.Yb()==b.Yb()&&Mb(a.M().sort(),b.M().sort())&&yb(a.ld(),b.ld()):a==b}S("shaka.media.InitSegmentReference",xi);
|
|
301
301
|
xi.prototype.getEndByte=xi.prototype.Yb;xi.prototype.getStartByte=xi.prototype.ac;
|
|
302
302
|
function Ci(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v){l=void 0===l?[]:l;q=void 0===q?Di:q;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Ba=d;this.ja=e;this.ea=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===p?null:p;this.status=q;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.s=null;this.j=0;this.o=void 0===v?!1:v;this.be=this.wd=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
303
|
-
a.next())b.value.Cg();this.o&&this.g.length&&this.g[this.g.length-1].Bg();this.B=this.mimeType=this.codecs=null}r=Ci.prototype;r.
|
|
303
|
+
a.next())b.value.Cg();this.o&&this.g.length&&this.g[this.g.length-1].Bg();this.B=this.mimeType=this.codecs=null}r=Ci.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.Ah=function(){return this.endTime};r.ac=function(){return this.Ba};r.Yb=function(){return this.ja};r.Th=function(){return this.tilesLayout};r.Sh=function(){return this.A};r.bc=function(){return this.status};r.ki=function(){this.status=Ei};r.tf=function(){this.preload=!0};r.ei=function(){return this.preload};
|
|
304
304
|
r.ee=function(){this.l=!1};r.bi=function(){return this.l};r.Cg=function(){this.wd=!0};r.di=function(){return this.wd};r.Bg=function(){this.be=!0};r.ci=function(){return this.be};r.Ag=function(){this.m=!0};r.Zh=function(){return this.m};r.Sg=function(a){this.s=a};r.Rh=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
|
|
305
305
|
r.Rf=function(a){null==this.h?$a("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.Ni=function(a){this.B=a};r.ld=function(){return this.B};function Fi(a,b){a.ea=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Fi(c.value,b)}S("shaka.media.SegmentReference",Ci);Ci.prototype.getSegmentData=Ci.prototype.ld;Ci.prototype.setSegmentData=Ci.prototype.Ni;Ci.prototype.syncAgainst=Ci.prototype.Rf;Ci.prototype.offset=Ci.prototype.offset;
|
|
306
306
|
Ci.prototype.getThumbnailSprite=Ci.prototype.Rh;Ci.prototype.setThumbnailSprite=Ci.prototype.Sg;Ci.prototype.hasByterangeOptimization=Ci.prototype.Zh;Ci.prototype.markAsByterangeOptimization=Ci.prototype.Ag;Ci.prototype.isLastPartial=Ci.prototype.ci;Ci.prototype.markAsLastPartial=Ci.prototype.Bg;Ci.prototype.isPartial=Ci.prototype.di;Ci.prototype.markAsPartial=Ci.prototype.Cg;Ci.prototype.isIndependent=Ci.prototype.bi;Ci.prototype.markAsNonIndependent=Ci.prototype.ee;Ci.prototype.isPreload=Ci.prototype.ei;
|
|
307
|
-
Ci.prototype.markAsPreload=Ci.prototype.tf;Ci.prototype.markAsUnavailable=Ci.prototype.ki;Ci.prototype.getStatus=Ci.prototype.bc;Ci.prototype.getTileDuration=Ci.prototype.Sh;Ci.prototype.getTilesLayout=Ci.prototype.Th;Ci.prototype.getEndByte=Ci.prototype.Yb;Ci.prototype.getStartByte=Ci.prototype.ac;Ci.prototype.getEndTime=Ci.prototype.Ah;Ci.prototype.getStartTime=Ci.prototype.getStartTime;Ci.prototype.getUris=Ci.prototype.
|
|
307
|
+
Ci.prototype.markAsPreload=Ci.prototype.tf;Ci.prototype.markAsUnavailable=Ci.prototype.ki;Ci.prototype.getStatus=Ci.prototype.bc;Ci.prototype.getTileDuration=Ci.prototype.Sh;Ci.prototype.getTilesLayout=Ci.prototype.Th;Ci.prototype.getEndByte=Ci.prototype.Yb;Ci.prototype.getStartByte=Ci.prototype.ac;Ci.prototype.getEndTime=Ci.prototype.Ah;Ci.prototype.getStartTime=Ci.prototype.getStartTime;Ci.prototype.getUris=Ci.prototype.M;var Di=0,Ei=1;Ci.Status={Wi:Di,Mj:Ei,oj:2};function Gi(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Hi(a){return!a||Gi(a)?null:a.length?a.end(a.length-1):null}function Ii(a,b){return!a||!a.length||Gi(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ji(a,b){if(!a||!a.length||Gi(a))return 0;var c=0;a=t(Ki(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
308
308
|
function Li(a,b,c){if(!a||!a.length||Gi(a))return null;a=Ki(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ki(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
|
|
309
309
|
@license
|
|
310
310
|
Shaka Player
|
|
@@ -318,7 +318,8 @@ c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7]
|
|
|
318
318
|
function Ri(a){for(var b=0,c=[];Ni(a,b);){var d=Pi(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Pi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Qi(e))&&c.push(f);b+=e.size+10}Oi(a,b)&&(b+=10)}return c}function Si(a,b){for(var c=b=void 0===b?0:b,d=0;Ni(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Pi(a,b+6),Oi(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Mi);Mi.getID3Data=Si;
|
|
319
319
|
Mi.getID3Frames=Ri;function Ti(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Hc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,kg:c,uh:d,Qj:e}}function Ui(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Vi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ta();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
320
320
|
function Wi(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Hf:null,sampleSize:null,se:null};c&256&&(h.Hf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.se=0==b?a.O():a.Gg());e.push(h)}return{Uj:d,Jg:e,th:f}}
|
|
321
|
-
function Xi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.O();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.ta()+a.ta()/16;a=a.ta()+a.ta()/16;return{trackId:c,width:b,height:a}}function Yi(a){a
|
|
321
|
+
function Xi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.O();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.ta()+a.ta()/16;a=a.ta()+a.ta()/16;return{trackId:c,width:b,height:a}}function Yi(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ta();a.skip(2);a.skip(2);a.skip(2);a=a.ta()+a.ta()/65536;return{channelCount:b,sampleRate:a}}function Zi(a){a=a.O();return{Ga:Ig(a)}}
|
|
322
|
+
function $i(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function aj(a){return(10>a?"0":"")+a};/*
|
|
322
323
|
|
|
323
324
|
Copyright Brightcove, Inc.
|
|
324
325
|
|
|
@@ -334,346 +335,346 @@ function Xi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.O();1=
|
|
|
334
335
|
See the License for the specific language governing permissions and
|
|
335
336
|
limitations under the License.
|
|
336
337
|
*/
|
|
337
|
-
function
|
|
338
|
-
function
|
|
339
|
-
function
|
|
340
|
-
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,
|
|
338
|
+
function bj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Ab(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function cj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Bg(c,0)).O(),a.g=8*d,a.i-=d)}function dj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;cj(a)}a.h<<=b;a.g-=b}
|
|
339
|
+
function ej(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&cj(a);c=b-c;return 0<c?d<<c|ej(a,c):d}function fj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;cj(a);return b+fj(a)}function gj(a){dj(a,1+fj(a))}function V(a){var b=fj(a);return ej(a,b+1)-1}function hj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===ej(a,1)}function ij(a){return ej(a,8)}
|
|
340
|
+
function qj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=hj(a),d=(c+d+256)%256),c=0===d?c:d}function rj(a){ij(a);V(a);return V(a)}S("shaka.util.ExpGolomb",bj);function sj(){this.G=null;this.H=!1;this.m=this.J=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}r=sj.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
341
|
+
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,tj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Zd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
341
342
|
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var q=f[n+1]+2;switch(f[n]){case 5:var u=qd(f.subarray(n+2,n+q));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
|
|
342
343
|
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,oh:u,sampleRate:48E3}))}n+=q;p-=q}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Zd&&(g.Zd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
|
|
343
344
|
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.J=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Zd&&(this.C=f.Zd);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.J:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
344
345
|
break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
345
|
-
function
|
|
346
|
+
function uj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=vj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=vj(d,
|
|
346
347
|
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.pi=function(a){qb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Af(a)};
|
|
347
348
|
r.Af=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 p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Ed(b.data,p),b.fullData=Ed(b.fullData,p)));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=Ed(b.data,k),b.fullData=Ed(b.fullData,k)));if(n>=e-f)return h;
|
|
348
|
-
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=Ed(b.data,a),b.fullData=Ed(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Ed.apply(xd,x(c.value)),(c=
|
|
349
|
-
r.Lb=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=Ed.apply(xd,x(c.value)),e=
|
|
350
|
-
r.Ac=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=Ed.apply(xd,x(d.value)),f=
|
|
349
|
+
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=Ed(b.data,a),b.fullData=Ed(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Ed.apply(xd,x(c.value)),(c=uj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Ri(c.data),dts:c.dts,pts:c.pts});return a};
|
|
350
|
+
r.Lb=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=Ed.apply(xd,x(c.value)),e=uj(this,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=Ed(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};
|
|
351
|
+
r.Ac=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=Ed.apply(xd,x(d.value)),f=uj(this,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=Ed(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.Af(d,
|
|
351
352
|
g,void 0),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.Lb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Ac(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};
|
|
352
|
-
r.hd=function(){return{audio:this.A,video:this.m}};r.Xd=function(){for(var a=[],b=t(this.Ac()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.Wh=function(){qb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.hf();return{height:a.height,width:a.width}};r.hf=function(){return"hvc"==this.m?
|
|
353
|
-
function
|
|
353
|
+
r.hd=function(){return{audio:this.A,video:this.m}};r.Xd=function(){for(var a=[],b=t(this.Ac()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.Wh=function(){qb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.hf();return{height:a.height,width:a.width}};r.hf=function(){return"hvc"==this.m?wj(this):xj(this)};
|
|
354
|
+
function xj(a){var b={height:null,width:null,Ga:null};a=a.Xd();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new bj(a.data);var c=ij(a),d=ij(a),e=ij(a);gj(a);if(yj.includes(c)){var f=V(a);3===f&&dj(a,1);gj(a);gj(a);dj(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?qj(a,16):qj(a,64))}}gj(a);f=V(a);if(0===f)V(a);else if(1===f)for(dj(a,1),gj(a),gj(a),f=V(a),g=0;g<f;g++)gj(a);gj(a);dj(a,1);f=V(a);g=V(a);var h=ej(a,1);0===h&&dj(a,1);dj(a,1);var k=0,l=0,m=0,n=
|
|
354
355
|
0;W(a)&&(k=V(a),l=V(a),m=V(a),n=V(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.Ga="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
355
|
-
function
|
|
356
|
-
(w+=V(c),A+=V(c),z+=V(c),
|
|
357
|
-
a.toString(16).toUpperCase());b.Ga=e;return b}function
|
|
358
|
-
|
|
359
|
-
a=!1):(this.h.SupportObject.SupportStatus||ab(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
|
|
360
|
-
|
|
361
|
-
function
|
|
362
|
-
function
|
|
363
|
-
Vd(a,h,k),p=Td(h,k),!mb(n)&&!lc(p))return q.return(!1);return q.return(!0)})}r=
|
|
364
|
-
function
|
|
365
|
-
a.j={};a.S=null;a.K=null;a.V=null;F(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Pd,E(m,e.
|
|
366
|
-
function
|
|
367
|
-
|
|
356
|
+
function wj(a){var b={height:null,width:null,Ga:null};a=a.Xd();if(!a.length)return b;a=a.find(function(y){return 33==y.type});if(!a)return b;var c=new bj(a.fullData,!0);ij(c);ij(c);ej(c,4);var d=ej(c,3);W(c);var e=ej(c,2),f=ej(c,1),g=ej(c,5),h=ej(c,32);a=ij(c);for(var k=ij(c),l=ij(c),m=ij(c),n=ij(c),p=ij(c),q=ij(c),u=[],v=[],w=0;w<d;w++)u.push(W(c)),v.push(W(c));if(0<d)for(w=d;8>w;w++)ej(c,2);for(w=0;w<d;w++)u[w]&&ej(c,88),v[w]&&ij(c);V(c);d=V(c);3==d&&ej(c,1);u=V(c);v=V(c);var A=w=0,z=0,B=0;W(c)&&
|
|
357
|
+
(w+=V(c),A+=V(c),z+=V(c),B+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(z+B)*(1===d?2:1));c=function(y){for(var D=0,C=0;32>C;C++)D|=(y>>C&1)<<31-C;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+q;p&&(e+="."+p.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+="."+
|
|
358
|
+
a.toString(16).toUpperCase());b.Ga=e;return b}function vj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function zj(a){return 0>tj(a)?!1:!0}function tj(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}S("shaka.util.TsParser",sj);sj.syncOffset=tj;sj.probe=zj;sj.prototype.getVideoInfo=sj.prototype.hf;sj.prototype.getVideoResolution=sj.prototype.Wh;sj.prototype.getVideoNalus=sj.prototype.Xd;
|
|
359
|
+
sj.prototype.getCodecs=sj.prototype.hd;sj.prototype.getStartTime=sj.prototype.getStartTime;sj.prototype.getVideoData=sj.prototype.Ac;sj.prototype.getAudioData=sj.prototype.Lb;sj.prototype.getMetadata=sj.prototype.getMetadata;sj.prototype.parseNalus=sj.prototype.Af;sj.prototype.parseAvcNalus=sj.prototype.pi;sj.prototype.parse=sj.prototype.parse;sj.prototype.clearData=sj.prototype.clearData;sj.Timescale=9E4;var yj=[100,110,122,244,44,83,86,118,128,138,139,134];function Aj(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&&ab("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,qb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ab("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(ab("Could not find LCEVC Library on this page"),
|
|
360
|
+
a=!1):(this.h.SupportObject.SupportStatus||ab(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 Bj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
361
|
+
Aj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Cj(a,b,c){var d=Dj,e=Ej;switch(b.mimeType){case "video/webm":d=Fj;break;case "video/mp4":d=Gj}switch(c){case "DASH":e=Hj;break;case "HLS":e=Ij}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Aj);Aj.prototype.release=Aj.prototype.release;var Dj=0,Fj=1,Gj=2,Ij=0,Hj=1,Ej=-1;function Jj(a,b,c,d){var e=this;this.i=a;this.V=c;this.A=null;this.F=b;this.h={};this.G={};this.oa={};this.g=null;this.ca=!1;this.S=d||null;this.j={};this.o=new hb;this.m={};this.H=null;this.L=new Uf;this.N="";this.da=!1;this.l=Kj(this,this.L);this.C=!1;this.J=new tg(function(){return Lj(e)});this.B=!1;this.ba="UNKNOWN";this.na=this.va=!1;this.ua=new Uf;this.s=!1;this.fa=!0;this.K=this.aa=null}
|
|
362
|
+
function Kj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.fa=!0});a.o.D(c,"endstreaming",function(){a.fa=!1});a.o.qa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.qa(a.i,"playing",function(){a.da=!0});a.N=Mj(c);a.i.src=a.N;return c}c=new MediaSource;a.o.qa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.qa(a.i,"playing",function(){a.da=!0});a.N=Mj(c);a.i.src=a.N;return c}
|
|
363
|
+
function Nj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(q){if(1==q.g)return a.createSegmentIndex?E(q,a.createSegmentIndex(),2):q.u(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=Pd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ma){if(m=Rd(h,k),!je(m))return q.return(!1)}else if(b==c.ga?k=Te(k):b==c.U&&(k=Ue(k,h)),n=
|
|
364
|
+
Vd(a,h,k),p=Td(h,k),!mb(n)&&!lc(p))return q.return(!1);return q.return(!0)})}r=Jj.prototype;r.destroy=function(){return this.J.destroy()};
|
|
365
|
+
function Lj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(se)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.m)b.push(a.m[k].destroy());return E(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.F=null;a.h={};a.m={};a.H=null;
|
|
366
|
+
a.j={};a.S=null;a.K=null;a.V=null;F(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Pd,E(m,e.L,2);case 2:e.B=b,e.ba=c,e.va=d,e.na=!e.B&&"HLS"==e.ba&&!e.va,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return E(m,Oj(e,k,l,l.codecs),6);case 6:e.s?(e.j[f.U]=[],e.j[f.ga]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
|
|
367
|
+
function Oj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v;return O(function(w){switch(w.g){case 1:return e=Pd,f=Sa,g=Ta,E(w,Nj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Rd(c.mimeType,d);if(b==e.ma){Pj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&Sd.includes(h))k=!0;l=Td(c.mimeType,d);if(!k){w.u(4);break}m=Ld(e.U,(d||"").split(","));n=Ld(e.ga,(d||"").split(","));if(!m||!n){w.u(5);break}a.s=!0;return E(w,Oj(a,e.U,c,m),6);case 6:return E(w,
|
|
368
|
+
Oj(a,e.ga,c,n),7);case 7:return w.return();case 5:if(p=lc(l))q=p(),a.m[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);ug(a.J);try{v=a.l.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.l.readyState+" expected 'open'",null);}a.B&&(v.mode=Qj);a.o.D(v,"error",function(){var A=a.j[b][0];A.p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.o.D(v,"updateend",function(){return Rj(a,b)});a.h[b]=v;a.G[b]=h;a.oa[b]=!!c.drmInfos.length;
|
|
368
369
|
F(w)}})}r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
369
|
-
function
|
|
370
|
-
function
|
|
371
|
-
r.rb=function(){var a={total:this.C?[]:Ki(this.i.buffered),audio:this.C?[]:Ki(
|
|
372
|
-
function
|
|
373
|
-
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!
|
|
374
|
-
function
|
|
375
|
-
case 6:if(!a.h[b])return
|
|
376
|
-
p)):a.H.init(c,h));if(!a.m[b]){
|
|
377
|
-
function
|
|
378
|
-
function
|
|
379
|
-
function
|
|
380
|
-
b)},null));a.s&&m.push(
|
|
381
|
-
function
|
|
382
|
-
r.Ta=function(a){var b=this;return O(function(c){return E(c,
|
|
383
|
-
function
|
|
384
|
-
function
|
|
385
|
-
null);}})}function
|
|
386
|
-
function
|
|
387
|
-
function
|
|
388
|
-
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.
|
|
389
|
-
|
|
390
|
-
function
|
|
391
|
-
a.A.codecSwitchingStrategy&&ob())return E(
|
|
370
|
+
function Pj(a,b,c,d){a.g||(a.g=new ie(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ca;a=a.ba;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,le[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):qb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):qb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
371
|
+
function Sj(a){return a.C?!1:a.l?"ended"==a.l.readyState:!0}function Tj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Nd?a=a.g.g:(a=Uj(a,b),a=!a||Gi(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Vj(a,b){return a.C?null:b==Nd?a.g.h:Hi(Uj(a,b))}function Wj(a,b,c){if(a.C)return 0;if(b==Nd)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Uj(a,b);return Ji(a,c)}
|
|
372
|
+
r.rb=function(){var a={total:this.C?[]:Ki(this.i.buffered),audio:this.C?[]:Ki(Uj(this,"audio")),video:this.C?[]:Ki(Uj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Uj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
373
|
+
function Xj(a,b,c,d,e,f){var g=null,h=Ab(c);if(Sd.includes(e))f=Ri(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.V.ne([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ea&&d.ea.timescale){var k=d.ea.timescale;if(!isNaN(k)){var l=0,m=!1;(new Eg).box("moof",Jg).box("traf",Jg).P("tfdt",function(n){l=Ui(n.reader,
|
|
374
|
+
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!zj(h)||(a.K?a.K.clearData():a.K=new sj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.V.ne(h,f,d?d.endTime:null));return g}
|
|
375
|
+
function Yj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,q,u,v,w,A,z,B,y;return O(function(D){switch(D.g){case 1:m=Pd;if(b!=m.ma){D.u(2);break}if(!a.B){D.u(3);break}return E(D,a.ua,4);case 4:n=D.h,a.g.s=n;case 3:return E(D,me(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return D.return();case 2:if(l||!a.s){D.u(6);break}return E(D,Yj(a,m.U,c,d,e,f,g,h,k,!0),7);case 7:return E(D,Yj(a,m.ga,c,d,e,f,g,h,k,!0),8);case 8:return D.return();
|
|
376
|
+
case 6:if(!a.h[b])return D.return();p=a.h[b].timestampOffset;q=a.G[b];a.m[b]&&(q=a.m[b].getOriginalMimeType());d&&(u=Xj(a,b,c,d,q,p),null!=u&&(v=d.startTime-u,w=Math.abs(p-v),(.001<=w||g||h)&&(!k||0<v||!p)&&(p=v,a.na&&(Zj(a,b,function(){return ak(a,b)},null),Zj(a,b,function(){return bk(a,b,p)},null))),A=b==m.ga||!(m.ga in a.h),a.B&&A&&a.ua.resolve(p)));f&&b==m.ga&&(a.g||Pj(a,"application/cea-608",a.B,!1),a.H||(z=q.split(";",1)[0],a.H=new Gb(z)),d?(B=a.H.i(c),B.length&&qe(a.g,B,d.startTime,d.endTime,
|
|
377
|
+
p)):a.H.init(c,h));if(!a.m[b]){D.u(9);break}return E(D,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=D.h;case 9:return c=ck(a,c,d?d.startTime:null,b,d?d.M()[0]:null),d&&a.B&&b!=m.ma&&(g||h)&&(y=d.startTime,Zj(a,b,function(){return ak(a,b)},null),Zj(a,b,function(){return bk(a,b,y)},null)),E(D,Zj(a,b,function(){var C=c;if("video"==b&&a.S){var I=a.S;I.g&&I.g.appendBuffer(C,"video",I.o,-p)}a.h[b].appendBuffer(C)},d?d.M()[0]:null),11);case 11:F(D)}})}
|
|
378
|
+
function dk(a,b){var c=Vj(a,"video")||0;oe(a.g,b,c)}function ek(a){a.g&&oe(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Pd,a==e.ma?E(f,d.g.remove(b,c),0):E(f,Zj(d,a,function(){return fk(d,a,b,c)},null),4)):d.s?E(f,Zj(d,e.U,function(){return fk(d,e.U,b,c)},null),0):f.u(0)})};
|
|
379
|
+
function gk(a,b){var c;return O(function(d){return 1==d.g?(c=Pd,b==c.ma?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,Zj(a,b,function(){return fk(a,b,0,a.l.duration)},null),4)):a.s?E(d,Zj(a,c.U,function(){return fk(a,c.U,0,a.l.duration)},null),0):d.u(0)})}r.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Pd,a==c.ma?d.return():E(d,Zj(b,a,function(){b.i.currentTime-=.001;Rj(b,a)},null),2)):b.s?E(d,Zj(b,c.U,function(){var e=c.U;b.i.currentTime-=.001;Rj(b,e)},null),0):d.u(0)})};
|
|
380
|
+
function hk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Pd;if(b==l.ma)return f||(a.g.s=c),ne(a.g,d,e),p.return();m=[];return E(p,ik(a,b,g,h,k),2)}n=p.h;n||(m.push(Zj(a,b,function(){return ak(a,b)},null)),a.s&&m.push(Zj(a,l.U,function(){return ak(a,l.U)},null)));f||(m.push(Zj(a,b,function(){return bk(a,b,c)},null)),a.s&&m.push(Zj(a,l.U,function(){return bk(a,l.U,c)},null)));m.push(Zj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Rj(a,
|
|
381
|
+
b)},null));a.s&&m.push(Zj(a,l.U,function(){var q=l.U;a.h[q].appendWindowStart=0;a.h[q].appendWindowEnd=e;a.h[q].appendWindowStart=d;Rj(a,q)},null));return E(p,Promise.all(m),0)})}
|
|
382
|
+
function jk(a,b,c){var d;return O(function(e){if(1==e.g){d=Pd;if(b==d.ma)return e.return();b==d.ga&&(a.ua=new Uf);Zj(a,b,function(){return ak(a,b)},null);a.s&&Zj(a,d.U,function(){return ak(a,d.U)},null);return E(e,Zj(a,b,function(){return bk(a,b,c)},null),2)}return a.s?E(e,Zj(a,d.U,function(){return bk(a,d.U,c)},null),0):e.u(0)})}r.endOfStream=function(a){var b=this;return O(function(c){return E(c,kk(b,function(){Sj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};
|
|
383
|
+
r.Ta=function(a){var b=this;return O(function(c){return E(c,kk(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Uf,uri:null};b.j[d].unshift(e)}b.l.duration=a;b.aa=a}),0)})};r.getDuration=function(){return this.l.duration};function fk(a,b,c,d){d<=c?Rj(a,b):a.h[b].remove(c,d)}function ak(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Rj(a,b)}
|
|
384
|
+
function bk(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Rj(a,b)}function Rj(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),lk(a,b))}}function Zj(a,b,c,d){ug(a.J);c={start:c,p:new Uf,uri:d};a.j[b].push(c);1==a.j[b].length&&mk(a,b);return c.p}
|
|
385
|
+
function kk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:ug(a.J);c=[];d={};for(e in a.h)d.Rc=new Uf,f={start:function(m){return function(){return m.Rc.resolve()}}(d),p:d.Rc,uri:null},a.j[e].push(f),c.push(d.Rc),1==a.j[e].length&&f.start(),d={Rc:d.Rc};ua(l,2);return E(l,Promise.all(c),4);case 4:xa(l,3);break;case 2:throw g=ya(l),g;case 3:return ua(l,5,6),E(l,b(),6);case 6:za(l);for(h in a.h)lk(a,h);Ba(l,0);break;case 5:throw k=ya(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
|
|
386
|
+
null);}})}function lk(a,b){a.j[b].shift();mk(a,b)}function mk(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),lk(a,b)}}function ck(a,b,c,d,e){var f=null==c,g=a.oa[d];c=a.V.Eh();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Kc(c),f=Uc()||Sc()||bd()||Rc()&&gd()&&c;f&&"mp4"==Xd(a.G[d])&&(b=ti(b,e));return b}
|
|
387
|
+
function nk(a,b,c,d){return Zj(a,b,function(){b!==Nd&&(ob()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Rj(a,b))},null)}
|
|
388
|
+
function ok(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H;return O(function(K){switch(K.g){case 1:c=Pd;a.C=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);va(K,2);a.o.nb();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(se)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())q=p.value,q.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.l.removeSourceBuffer(v)}catch(G){}}return E(K,
|
|
389
|
+
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.L=new Uf,a.l=Kj(a,a.L),E(K,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.aa)&&a.aa&&(a.l.duration=a.aa),A=new Uf,z=a.l.sourceBuffers,B=b.size,y=0,D=function(){y++;y===B&&(A.resolve(),a.o.Hb(z,"addsourcebuffer",D))},a.o.D(z,"addsourcebuffer",D),C=t(b.keys()),I=C.next();case 6:if(I.done)return a.i.currentTime=d,E(K,A,2);J=I.value;H=b.get(J);return E(K,Oj(a,J,H,H.codecs),9);case 9:a.s?(a.j[c.U]=[],a.j[c.ga]=[]):a.j[J]=[];I=C.next();
|
|
390
|
+
K.u(6);break;case 2:za(K),a.C=!1,ug(a.J),a.o.qa(a.i,"canplaythrough",function(){a.J.g||(a.i.autoplay=e,f||a.i.play())}),Ba(K,0)}})}function pk(a,b){return kk(a,function(){return ok(a,b)})}
|
|
391
|
+
function ik(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){if(1==y.g){f=Pd;if(b==f.ma)return y.return(!1);g=$d(ge(a.G[b]));h=ae(a.G[b]);l=!1;m=Rd(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&Sd.includes(m))n=!0;n&&(p=Td(c,d),q=lc(p))&&(k=q(),u=Ld(f.U,(d||"").split(",")),v=Ld(f.ga,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.U&&(w=u),m=k.convertCodecs(b,Td(c,w))):m=k.convertCodecs(b,p));A=$d(ge(m));z=ae(m);if(g===A&&h===z)return y.return(!1);B=!0;if(a.s||l&&k&&!a.m[b])B=!1;if(B&&"smooth"===
|
|
392
|
+
a.A.codecSwitchingStrategy&&ob())return E(y,nk(a,b,m,k),3);k&&k.destroy();return E(y,pk(a,e),3)}return y.return(!0)})}function qk(a,b,c,d){if(b==Nd)var e=!1;else{e=$d(ge(a.G[b]));var f=ae(a.G[b]),g=Rd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Sd.includes(g))h=!0;c=Td(c,d);h&&(h=lc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=$d(ge(g));g=ae(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.s:!1}var Mj=window.URL.createObjectURL,Qj="sequence";function rk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}r=rk.prototype;r.getDuration=function(){return this.j};r.Hh=function(){return this.g};r.Qg=function(a){this.i=a};r.Ta=function(a){this.j=a};r.Mh=function(){return this.i};r.Og=function(a){this.A=a};r.lc=function(a){this.F=a};r.ue=function(a){this.m=a};r.Wd=function(){return this.m};r.Mf=function(a){this.s=a};r.zh=function(){return this.s};
|
|
392
393
|
r.Fg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.ke(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.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
393
394
|
r.vd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/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.ke(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.ce=function(){this.o=!0};r.fi=function(){return this.o};r.Pg=function(a){this.B=a};r.Dh=function(){return this.B};
|
|
394
395
|
r.ke=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.vf=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.T=function(){return Infinity==this.j&&!this.F};r.ec=function(){return Infinity!=this.j&&!this.F};r.jb=function(){return Math.max(this.G,this.Mb()-this.m)};r.Ug=function(a){this.G=a};
|
|
395
396
|
r.Mb=function(){return this.T()||this.ec()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};r.kd=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Mb()-this.m+a,this.sb()))};r.$b=function(){return this.kd(0)};r.sb=function(){return Math.max(0,this.Mb()-(this.T()||this.ec()?this.s:0))};r.Yg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
|
|
396
|
-
r.Ng=function(a){this.H=a};S("shaka.media.PresentationTimeline",
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
function
|
|
401
|
-
null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Sc())e=Math.ceil(100*(e+.01))/100;e>=a.B.sb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function
|
|
402
|
-
function
|
|
403
|
-
function
|
|
404
|
-
r.bg=function(){return 0};r.Eg=function(){};
|
|
405
|
-
function
|
|
406
|
-
g.g.$b():g.g.sb():0>h&&(h=g.g.sb()+h);return
|
|
407
|
-
r.Md=function(){var a=
|
|
408
|
-
function
|
|
409
|
-
function
|
|
397
|
+
r.Ng=function(a){this.H=a};S("shaka.media.PresentationTimeline",rk);rk.prototype.setAvailabilityTimeOffset=rk.prototype.Ng;rk.prototype.usingPresentationStartTime=rk.prototype.Yg;rk.prototype.getSeekRangeEnd=rk.prototype.sb;rk.prototype.getSeekRangeStart=rk.prototype.$b;rk.prototype.getSafeSeekRangeStart=rk.prototype.kd;rk.prototype.getSegmentAvailabilityEnd=rk.prototype.Mb;rk.prototype.setUserSeekStart=rk.prototype.Ug;rk.prototype.getSegmentAvailabilityStart=rk.prototype.jb;
|
|
398
|
+
rk.prototype.isInProgress=rk.prototype.ec;rk.prototype.isLive=rk.prototype.T;rk.prototype.offset=rk.prototype.offset;rk.prototype.notifyMaxSegmentDuration=rk.prototype.vf;rk.prototype.notifyMinSegmentStartTime=rk.prototype.ke;rk.prototype.getInitialProgramDateTime=rk.prototype.Dh;rk.prototype.setInitialProgramDateTime=rk.prototype.Pg;rk.prototype.isStartTimeLocked=rk.prototype.fi;rk.prototype.lockStartTime=rk.prototype.ce;rk.prototype.notifySegments=rk.prototype.vd;rk.prototype.notifyTimeRange=rk.prototype.Fg;
|
|
399
|
+
rk.prototype.getDelay=rk.prototype.zh;rk.prototype.setDelay=rk.prototype.Mf;rk.prototype.getSegmentAvailabilityDuration=rk.prototype.Wd;rk.prototype.setSegmentAvailabilityDuration=rk.prototype.ue;rk.prototype.setStatic=rk.prototype.lc;rk.prototype.setClockOffset=rk.prototype.Og;rk.prototype.getPresentationStartTime=rk.prototype.Mh;rk.prototype.setDuration=rk.prototype.Ta;rk.prototype.setPresentationStartTime=rk.prototype.Qg;rk.prototype.getMaxSegmentDuration=rk.prototype.Hh;
|
|
400
|
+
rk.prototype.getDuration=rk.prototype.getDuration;function sk(a,b,c){this.j=c;this.l=a;this.s=tk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}sk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function uk(a,b){a.i=b}function vk(a){this.g=a}function tk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Ki(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 wk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new hb;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 xk(f)});this.m=(new Mc(function(){xk(f)})).Ua(this.s.gapJumpTimerTime)}wk.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.B=this.A=null};wk.prototype.yf=function(){this.o=!0;xk(this)};
|
|
401
|
+
function xk(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=tk(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.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Li(c,b,a.s.gapDetectionThreshold),
|
|
402
|
+
null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Sc())e=Math.ceil(100*(e+.01))/100;e>=a.B.sb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function yk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=zk.value().get(b),c.qa(a,b,d))}var zk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ak(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new hb;this.i=new Bk(a);yk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ck(e,e.j())})}Ak.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Dk(a){return a.o?a.g.currentTime:a.j()}
|
|
403
|
+
function Ek(a,b){0<a.g.readyState?Fk(a.i,b):yk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ck(a,a.j())})}function Ck(a,b){.001>Math.abs(a.g.currentTime-b)?Gk(a):(a.h.qa(a.g,"seeking",function(){Gk(a)}),Fk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Gk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
404
|
+
function Bk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Bk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Fk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ua(.1)};function Hk(a){this.h=a;this.j=!1;this.g=null;this.i=new hb}r=Hk.prototype;r.Ge=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.qa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;yk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};r.He=function(a){this.g=this.j?this.g:a};
|
|
405
|
+
r.Md=function(){return(this.j?this.h.currentTime:this.g)||0};r.cg=function(){return 0};r.bg=function(){return 0};r.Eg=function(){};
|
|
406
|
+
function Ik(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Jk(a,c,f);this.j=new wk(a,b.presentationTimeline,c,this.o,f);this.h=new Ak(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Dk(g.h);h=Kk(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;Ek(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
407
|
+
g.g.$b():g.g.sb():0>h&&(h=g.g.sb()+h);return Lk(g,Mk(g,h))});this.m=new Mc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Dk(g.h),k=g.g.$b(),l=g.g.sb();3>l-k&&(k=l-3);h<k&&(h=Kk(g,h),g.i.currentTime=h)}})}r=Ik.prototype;r.Ge=function(){this.m.Ua(.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.A=function(){}};r.He=function(a){Ek(this.h,a)};
|
|
408
|
+
r.Md=function(){var a=Dk(this.h);return 0<this.i.readyState&&!this.i.paused?Mk(this,a):a};r.cg=function(){return this.o?this.o.o:0};r.bg=function(){return this.j.C};r.Eg=function(){this.j.yf()};function Lk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
409
|
+
function Kk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.$b(),f=a.g.sb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.kd(c),k=a.g.kd(d);c=a.g.kd(c+d);return b>=g?Lk(a,b):b>f?f:b<e?Ii(a.i.buffered,k)?k:c:b>=h||Ii(a.i.buffered,b)?b:c}function Mk(a,b){var c=a.g.$b();if(b<c)return c;a=a.g.sb();return b>a?a:b}
|
|
410
|
+
function Jk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new sk(new vk(a),b.stallThreshold,c);uk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Nk(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Nk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.li=function(){this.o=!0};r.wc=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
410
411
|
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};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)};
|
|
411
412
|
r.ge=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,x(a))}};r.ud=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.ge(a);this.Ha(b)};r.Ha=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}};
|
|
412
413
|
r.vc=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],b=new Ci(a.startTime,b,a.C,a.Ba,a.ja,a.ea,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.j=a.j,this.g[this.g.length-1]=b)}};
|
|
413
|
-
r.ve=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Mc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Ua(a))};
|
|
414
|
-
|
|
415
|
-
S("shaka.media.SegmentIndex",
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
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;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.ge=function(){};r.Ha=function(){};r.ud=function(){};r.vc=function(){};r.ve=function(){};S("shaka.media.MetaSegmentIndex",
|
|
420
|
-
|
|
421
|
-
function
|
|
422
|
-
function
|
|
423
|
-
function
|
|
424
|
-
function
|
|
425
|
-
|
|
426
|
-
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.ig=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function
|
|
427
|
-
function
|
|
428
|
-
r.configure=function(a){this.h=a;this.J=new Rf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.Z&&(
|
|
429
|
-
b.Z&&(
|
|
430
|
-
function
|
|
431
|
-
function
|
|
432
|
-
function Fl(a,b){O(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();
|
|
433
|
-
function
|
|
434
|
-
|
|
435
|
-
function
|
|
414
|
+
r.ve=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Mc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Ua(a))};Nk.prototype[Symbol.iterator]=function(){return this.Ab(0)};
|
|
415
|
+
Nk.prototype.Ab=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;d--;var e=this.get(d+1),f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return $a("No independent partial segment found!"),null}d++;f=g-1;break}}return new Ok(this,d,f,c)};function Pk(a,b,c){a=new Ci(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Nk([a])}
|
|
416
|
+
S("shaka.media.SegmentIndex",Nk);Nk.forSingleSegment=Pk;Nk.prototype.getIteratorForTime=Nk.prototype.Ab;Nk.prototype.updateEvery=Nk.prototype.ve;Nk.prototype.fit=Nk.prototype.vc;Nk.prototype.evict=Nk.prototype.Ha;Nk.prototype.mergeAndEvict=Nk.prototype.ud;Nk.prototype.offset=Nk.prototype.offset;Nk.prototype.get=Nk.prototype.get;Nk.prototype.find=Nk.prototype.find;Nk.prototype.markImmutable=Nk.prototype.li;Nk.prototype.release=Nk.prototype.release;Nk.prototype.getNumEvicted=Nk.prototype.getNumEvicted;
|
|
417
|
+
Nk.prototype.getNumReferences=Nk.prototype.getNumReferences;function Ok(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Ok.prototype.te=function(a){this.reverse=a};Ok.prototype.sh=function(){return this.h};Ok.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
418
|
+
Ok.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Ok);Ok.prototype.next=Ok.prototype.next;Ok.prototype.current=Ok.prototype.current;Ok.prototype.currentPosition=Ok.prototype.sh;
|
|
419
|
+
Ok.prototype.setReverse=Ok.prototype.te;function Qk(){Nk.call(this,[]);this.h=[]}oa(Qk,Nk);r=Qk.prototype;r.clone=function(){var a=new Qk;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.wc=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.wc(a)};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.getNumEvicted()+d.getNumReferences()}return null};
|
|
420
|
+
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;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.ge=function(){};r.Ha=function(){};r.ud=function(){};r.vc=function(){};r.ve=function(){};S("shaka.media.MetaSegmentIndex",Qk);Qk.prototype.updateEvery=Qk.prototype.ve;Qk.prototype.fit=Qk.prototype.vc;Qk.prototype.mergeAndEvict=Qk.prototype.ud;Qk.prototype.evict=Qk.prototype.Ha;Qk.prototype.merge=Qk.prototype.ge;
|
|
421
|
+
Qk.prototype.offset=Qk.prototype.offset;Qk.prototype.get=Qk.prototype.get;Qk.prototype.find=Qk.prototype.find;Qk.prototype.forEachTopLevelReference=Qk.prototype.wc;Qk.prototype.release=Qk.prototype.release;function Rk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Vd();this.h=new Mc(function(){b.g.Dg(.25*b.i)})}Rk.prototype.release=function(){this.set(this.Xb());this.h&&(this.h.stop(),this.h=null);this.g=null};Rk.prototype.set=function(a){this.i=a;Sk(this)};Rk.prototype.Xb=function(){return this.g.Xb()};function Sk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Vd()!=b&&a.g.Pf(b);return}catch(c){}a.h.Ua(.25);0!=a.g.Vd()&&a.g.Pf(0)};function Tk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Mc(function(){Uk(b,!1)})).Ua(.25)}Tk.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 Uk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Vk(){this.g=null;this.h=[]}function Wk(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 Xk(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 Yk(){this.i=this.h=null;this.g=[]}function Zk(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 $k(){this.Nd=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.J=this.K=this.l=this.o=NaN;this.g=new Vk;this.h=new Yk};function al(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function bl(a,b){a.j=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
422
|
+
function cl(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.Ab(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.ja&&(c=!1);2==d.bc()&&(c=!1);c&&d.ea&&dl(a,d.ea);c&&!a.g.has(d)&&(c=new el(a.j),fl(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.wd&&d.be)break;d=b.next().value}gl(a)}}}
|
|
423
|
+
function dl(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return yi(d,b)})){var c=new el(a.j);fl(c,b,a.h);a.i.set(b,c)}}function hl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&il(a,c)}function jl(a){hl(a,a.g);hl(a,a.i);a.l=0}al.prototype.Ha=function(a,b){b=void 0===b?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&il(this,d);b&&gl(this)};
|
|
424
|
+
function gl(a){for(var b=Array.from(a.g.keys()),c={},d=t(a.i.keys()),e=d.next();!e.done;c={Gd:c.Gd},e=d.next())c.Gd=e.value,b.some(function(f){return function(g){return yi(g.ea,f.Gd)}}(c))||il(a,c.Gd)}function kl(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&il(a,d)}gl(a)}function ll(a,b){b&&b!==a.h&&(jl(a),a.h=b)}function il(a,b){var c=a.g;b instanceof xi&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function el(a){this.g=a;this.oe=this.Qf=null}
|
|
425
|
+
function fl(a,b,c){var d=new Uint8Array(0);a.oe=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Ed(d,e):d=e,a.Qf?E(f,a.Qf(d),3):f.u(0);d=new Uint8Array(0);F(f)})})}el.prototype.abort=function(){this.oe&&this.oe.abort()};function ml(a){dg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Mc(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 U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ua(2)}oa(ml,dg);ml.prototype.release=function(){this.g.clear();this.h.stop();dg.prototype.release.call(this)};function nl(a){dg.call(this);this.g=new Map;this.h=a}oa(nl,dg);nl.prototype.release=function(){this.g.clear();dg.prototype.release.call(this)};function ol(a,b){var c=a.g.get(b);c||(c={yd:[],ig:null,contentType:b},a.g.set(b,c));return c}function pl(a,b,c){var d=ol(a,b.contentType);ql(a,d);a={uf:b,position:c};d=d.yd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
426
|
+
nl.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.yd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.uf;break a}}d=null}if(e=d)e=c.ig,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);
|
|
427
|
+
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.ig=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ql(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.yd;b.yd=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.yd=[]};function rl(a,b,c,d,e){a=lg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function sl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.J=null;this.A=!1;this.l=new tg(function(){return tl(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null};this.N=0;this.L=Infinity}r=sl.prototype;r.destroy=function(){return this.l.destroy()};
|
|
428
|
+
function tl(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,ul(e),b.push(vl(e));f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,jl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;F(k)})}
|
|
429
|
+
r.configure=function(a){this.h=a;this.J=new Rf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.Z&&(jl(b.Z),b.Z=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,jl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Nd))&&
|
|
430
|
+
b.Z&&(jl(b.Z),b.Z=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.Z&&(jl(b.Z),b.Z=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.Z?(kl(c.Z,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.Z=null)):0<a.segmentPrefetchLimit&&(c.Z=wl(this,c.stream));a.disableAudioPrefetch||xl(this)};function yl(a,b,c){a.m.presentationTimeline.T()||(a.N=b,a.L=c)}
|
|
431
|
+
r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,zl(b,a||new Map),2);ug(b.l);b.C=!0;F(c)})};function Al(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Pd,a.H++,d=a.H,ua(l,2),E(l,gk(a.g.Y,c.ma),4);case 4:xa(l,3);break;case 2:if(e=ya(l),a.g)a.g.onError(e);case 3:f=Rd(b.mimeType,b.codecs),Pj(a.g.Y,f,a.m.sequenceMode,b.external),g=a.g.Y.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=Bl(a,b),a.i.set(c.ma,k),Cl(a,k,0)),F(l)}})}
|
|
432
|
+
function Dl(a){var b=a.i.get(Nd);b&&(ul(b),vl(b).catch(function(){}),a.i.delete(Nd));a.s=null}function El(a,b){var c=0>a.g.ib(),d=a.i.get("video");d&&d.$&&d.$.te(c);(d=a.i.get("audio"))&&d.$&&d.$.te(c);(d=a.i.get(Nd))&&d.$&&d.$.te(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.kc&&(Fl(a,b,!1,0,!1),c.kc=d);else if(b=c.kc)c.kc=null,Fl(a,b,!0,0,!1)}
|
|
433
|
+
function Gl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.C&&(b.video&&Fl(a,b.video,c,d,e,f),b.audio&&Fl(a,b.audio,c,d,e,f))}function Hl(a,b){O(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();Fl(a,b,!0,0,!1);F(c)})}
|
|
434
|
+
function Fl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Nd?g&&(g.kc&&(b.trickModeVideo?(g.kc=b,b=b.trickModeVideo):g.kc=null),g.stream!=b||e)&&(a.o.has(b)?g.Z=a.o.get(b):g.Z&&ll(g.Z,b),b.type==Nd&&(e=Rd(b.mimeType,b.codecs),Pj(a.g.Y,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.$=null,g.dg=!!f,c&&(g.ad?g.we=!0:g.Ra?(g.Pb=!0,g.Rd=d,g.we=!0):(ul(g),Il(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Jl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
435
|
+
Al(a,b)}
|
|
436
|
+
function Jl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Ud();var g=Vj(a.g.Y,b.type),h=b.stream.segmentIndex.find(b.Pa?b.Pa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ea)&&(h+=(k.ja?k.ja-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),f=
|
|
436
437
|
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.eb.h.g>h?!0:!1):f=!1;f&&b.eb.abort();F(e)})}
|
|
437
|
-
r.zd=function(){if(this.g)for(var a=this.g.Ud(),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.$&&(e=c.$.current());if(!e||e.startTime>a||e.endTime<a)c.$=null;e=this.g.Y;e.C?e=!1:d==Nd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=
|
|
438
|
-
function
|
|
439
|
-
function
|
|
440
|
-
b.get(l.id),
|
|
441
|
-
function
|
|
442
|
-
function
|
|
438
|
+
r.zd=function(){if(this.g)for(var a=this.g.Ud(),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.$&&(e=c.$.current());if(!e||e.startTime>a||e.endTime<a)c.$=null;e=this.g.Y;e.C?e=!1:d==Nd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Uj(e,d),e=Ii(e,a));e||((null!=Vj(this.g.Y,d)||c.Ra)&&Kl(this,c),c.eb&&(c.eb.abort(),c.eb=null),d===Nd&&(d=this.g.Y,d.H&&d.H.g()),c.zd=!0)}};
|
|
439
|
+
function Kl(a,b){b.ad||b.Pb||(b.Ra?(b.Pb=!0,b.Rd=0):null==Tj(a.g.Y,b.type)?null==b.xb&&Cl(a,b,0):(ul(b),Il(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
440
|
+
function zl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Pd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.U,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ga,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.Y;return E(p,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}ug(a.l);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Bl(a,l),b.has(l.id)&&(n=
|
|
441
|
+
b.get(l.id),bl(n,function(q,u,v){return Ll(q,u,v||null,a.h.retryParameters,a.g.Db)}),m.Z=n),a.i.set(k,m),Cl(a,m,0));F(p)})}function Bl(a,b){return{stream:b,type:b.type,$:null,Z:wl(a,b),Pa:null,fc:null,qf:null,nf:null,mf:null,kc:null,endOfStream:!1,Ra:!1,xb:null,Pb:!1,Rd:0,we:!1,ad:!1,zd:!0,Ef:!1,od:!1,eb:null}}
|
|
442
|
+
function wl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Nd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Nd&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.Z)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new al(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ll(d,e,f||null,a.h.retryParameters,a.g.Db)}):null}
|
|
443
|
+
function xl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Ia:d.Ia},f=e.next())if(d.Ia=f.value,d.Ia.audio)if(a.o.has(d.Ia.audio)){if(f=a.o.get(d.Ia.audio),kl(f,b),!(0<b&&c.some(function(h){return function(k){return ve(h.Ia.audio.language,k)}}(d)))){var g=a.i.get(d.Ia.audio.type);f!==(g&&g.Z)&&jl(f);a.o.delete(d.Ia.audio)}}else 0>=b||!c.some(function(h){return function(k){return ve(h.Ia.audio.language,k)}}(d))||!(f=wl(a,d.Ia.audio))||
|
|
443
444
|
(d.Ia.audio.segmentIndex||d.Ia.audio.createSegmentIndex(),a.o.set(d.Ia.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Y.Ta(a):this.g.Y.Ta(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
444
|
-
function
|
|
445
|
-
ya(h),E(h,
|
|
446
|
-
function
|
|
447
|
-
!0,"video"==b.type&&(a=a.i.get(Nd))&&
|
|
448
|
-
function
|
|
449
|
-
function
|
|
450
|
-
ua(
|
|
451
|
-
|
|
452
|
-
!0,1==
|
|
453
|
-
function
|
|
454
|
-
function
|
|
455
|
-
function(){var A,z,
|
|
456
|
-
2),E(
|
|
457
|
-
Jg).box("proj",Jg).P("prji",function(H){H=H.reader.ic();
|
|
458
|
-
b.type,c.startTime))),E(w,Promise.all(e),0)}})}
|
|
459
|
-
function
|
|
460
|
-
z+e.timestampOffset,
|
|
445
|
+
function Ml(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:ug(a.l);if(b.Ra||null==b.xb||b.ad)return h.return();b.xb=null;if(!b.Pb){h.u(2);break}return E(h,Il(a,b,b.we,b.Rd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return E(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ra||b.xb||Cl(a,b,0),h.return();case 4:ua(h,6);d=Nl(a,b);null!=d&&(Cl(a,b,d),b.od=!1);xa(h,7);break;case 6:return e=
|
|
446
|
+
ya(h),E(h,Ol(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.Y.endOfStream(),10);case 10:ug(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ta(g),F(h)}})}
|
|
447
|
+
function Nl(a,b){if(Pl(b))return dk(a.g.Y,b.stream.originalId||""),null;b.type==Nd&&ek(a.g.Y);if(!a.g.Y.fa&&b.type!=Nd)return a.h.updateIntervalSeconds/2;var c=a.g.Ud();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ha(c,!0),cl(e,c);d=b.Pa?b.Pa.endTime:c;e=Wj(a.g.Y,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Vj(a.g.Y,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
448
|
+
!0,"video"==b.type&&(a=a.i.get(Nd))&&Pl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Ql(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,Pl(h)||h.$&&!h.$.current()||(f=Math.min(f,h.Pa?h.Pa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.Z&&b.$&&!a.o.has(b.stream)&&(b.Z.Ha(c),cl(b.Z,e.startTime));Rl(a,b,c,e).catch(function(){});return null}
|
|
449
|
+
function Ql(a,b,c,d){if(b.$)return b.$.current();if(b.Pa||d)return b.$=b.stream.segmentIndex.Ab(b.Pa?b.Pa.endTime:d,!1,0>a.g.ib()),b.$&&b.$.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.ib();var f=null;d&&(b.$=b.stream.segmentIndex.Ab(e,!1,a),f=b.$&&b.$.next().value);f||(b.$=b.stream.segmentIndex.Ab(c,!1,a),f=b.$&&b.$.next().value);return f}
|
|
450
|
+
function Rl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:e=Pd;f=b.stream;g=b.$;b.Ra=!0;ua(y,2);if(2==d.bc())throw new T(1,1,1011);return E(y,Sl(a,b,d),4);case 4:ug(a.l);if(a.A)return y.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),q=p=!1,v=function(D){var C,I,J,H;return O(function(K){switch(K.g){case 1:if(p)return K.return();q=!0;ug(a.l);if(a.A)return K.return();
|
|
451
|
+
ua(K,2);n=Tl(n,D);C=!1;I=0;(new Eg).box("mdat",function(G){I=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C){K.u(4);break}J=n.subarray(0,I);n=n.subarray(I);return E(K,Ul(a,b,c,f,d,J,!0),5);case 5:b.Z&&b.$&&cl(b.Z,d.startTime,!0);case 4:xa(K,0);break;case 2:u=H=ya(K),F(K)}})},E(y,Vl(a,b,d,v),9);l=Vl(a,b,d);return E(y,l,7);case 7:m=y.h;ug(a.l);if(a.A)return y.return();ug(a.l);return b.Pb?(b.Ra=!1,Cl(a,b,0),y.return()):E(y,Ul(a,b,c,f,d,m),6);case 9:w=y.h;if(u)throw u;if(q){y.u(10);break}p=!0;ug(a.l);return a.A?
|
|
452
|
+
y.return():b.Pb?(b.Ra=!1,Cl(a,b,0),y.return()):E(y,Ul(a,b,c,f,d,w),10);case 10:b.Z&&b.$&&cl(b.Z,d.startTime,!0);case 6:ug(a.l);if(a.A)return y.return();b.Pa=d;g.next();b.Ra=!1;b.Ef=!1;A=a.g.Y.rb();z=A[b.type];eb(JSON.stringify(z));b.Pb||a.g.yf(d,b.stream);Cl(a,b,0);xa(y,0);break;case 2:B=ya(y);ug(a.l,B);if(a.A)return y.return();b.Ra=!1;if(7001==B.code)b.Ra=!1,ul(b),Cl(a,b,0),y.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),y.u(0);else if(3017==B.code)Wl(a,b,B),y.u(0);else return b.od=
|
|
453
|
+
!0,1==B.category&&b.Z&&il(b.Z,d),B.severity=2,E(y,Ol(a,b,B),0)}})}function Xl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
|
|
454
|
+
function Tl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Wl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Ef})){if(0<a.h.maxDisabledTime&&a.g.Sd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.od=!0;a.A=!0;a.g.onError(c);return}b.Ef=!0}Cl(a,b,4)}
|
|
455
|
+
function Sl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v;return O(function(w){switch(w.g){case 1:d=Pd;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=$d(b.stream.codecs);k=ae(b.stream.mimeType);l=c.timestampOffset;if(l==b.qf&&f==b.nf&&g==b.mf&&h==b.pf&&k==b.zg){w.u(2);break}m=b.pf&&b.zg&&qk(a.g.Y,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.ga?n=a.i.get(d.U):b.type===d.U&&(n=a.i.get(d.ga));if(!n){w.u(3);break}return E(w,vl(n).catch(function(){}),5);case 5:n.fc=
|
|
456
|
+
null,Kl(a,n);case 3:return p=function(){var A,z,B;return O(function(y){if(1==y.g)return A=new Map,a.j.audio&&A.set(d.U,a.j.audio),a.j.video&&A.set(d.ga,a.j.video),ua(y,2),b.nf=f,b.mf=g,b.pf=h,b.zg=k,b.qf=l,z=a.m.sequenceMode||"HLS"==a.m.type,E(y,hk(a.g.Y,b.type,l,f,g,z,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,A),4);if(2!=y.g)return xa(y,0);B=ya(y);b.nf=null;b.mf=null;b.pf=null;b.qf=null;throw B;})},E(w,p(),2);case 2:return yi(c.ea,b.fc)||(b.fc=c.ea,c.l&&c.ea&&(q=Vl(a,b,c.ea),u=function(){var A,
|
|
457
|
+
z,B,y,D,C,I;return O(function(J){switch(J.g){case 1:return ua(J,2),E(J,q,4);case 4:return A=J.h,ug(a.l),z=null,B=new Map,y={projection:null,hfov:null},D=new Eg,D.box("moov",Jg).box("trak",Jg).box("mdia",Jg).P("mdhd",function(H){z=Vi(H.reader,H.version).timescale}).box("hdlr",function(H){H=H.reader;H.skip(8);switch(H.ic()){case "soun":B.set(d.U,z);break;case "vide":B.set(d.ga,z)}z=null}).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("encv",Og).box("avc1",Og).box("avc3",Og).box("hev1",Og).box("hvc1",
|
|
458
|
+
Og).box("dvav",Og).box("dva1",Og).box("dvh1",Og).box("dvhe",Og).box("vexu",Jg).box("proj",Jg).P("prji",function(H){H=H.reader.ic();y.projection=H}).box("hfov",function(H){H=H.reader.O()/1E3;y.hfov=H}).parse(A),Yl(a,y),B.has(b.type)?c.ea.timescale=B.get(b.type):null!=z&&(c.ea.timescale=z),C=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(J,a.g.fg(b.type,A),5);case 5:return E(J,Yj(a.g.Y,b.type,A,null,b.stream,C),6);case 6:xa(J,0);break;case 2:throw I=ya(J),b.fc=null,I;}})},a.g.ni(c.startTime,
|
|
459
|
+
c.ea),e.push(u()))),a.m.sequenceMode&&(v=b.Pa?b.Pa.j:null,c.j!=v&&e.push(jk(a.g.Y,b.type,c.startTime))),E(w,Promise.all(e),0)}})}
|
|
460
|
+
function Ul(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p;return O(function(q){switch(q.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.F;if(l||m)k=new Eg;l&&k.P("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.ic();var A=u.reader.ic();var z=u.reader.O();var B=u.reader.O();var y=u.reader.O();var D=u.reader.O();var C=e.startTime+B/z}else z=u.reader.O(),C=u.reader.Hc()/
|
|
461
|
+
z+e.timestampOffset,B=C-e.startTime,y=u.reader.O(),D=u.reader.O(),w=u.reader.ic(),A=u.reader.ic();u=u.reader.vb(u.reader.getLength()-u.reader.xa());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.oi():(v=(new Map).set("detail",{startTime:C,endTime:C+y/z,schemeIdUri:w,value:A,timescale:z,presentationTimeDelta:B,eventDuration:y,id:D,messageData:u}),v=new U("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
461
462
|
w||(w=Ri(u),w.length&&e&&a.g.ne([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.P("prft",function(u){if(!a.F&&e.ea.timescale){var v=u.reader,w=u.version;v.O();u=v.O();var A=v.O();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.O():(w=v.O(),v=v.O(),v=w*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.ea.timescale*1E3)});v=new U("prft",v);a.g.onEvent(v);
|
|
462
|
-
a.F=!0}});(l||m)&&k.parse(f);return E(q,
|
|
463
|
-
function
|
|
464
|
-
function
|
|
465
|
-
function
|
|
466
|
-
function
|
|
467
|
-
function
|
|
468
|
-
function
|
|
469
|
-
function
|
|
470
|
-
function
|
|
471
|
-
function
|
|
472
|
-
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&ab("Unexpected number of arguments for "+m),a[l]=b[l]):($a("Invalid config, unrecognized key "+m),k=!1)}return k}function
|
|
473
|
-
function
|
|
474
|
-
function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",
|
|
475
|
-
function
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
function
|
|
463
|
+
a.F=!0}});(l||m)&&k.parse(f);return E(q,Zl(a,b,c),2);case 2:return ug(a.l),n=b.zd,b.zd=!1,p=b.dg,b.dg=!1,E(q,a.g.fg(b.type,f),3);case 3:return E(q,Yj(a.g.Y,b.type,f,e,d,h,n,p,g),4);case 4:ug(a.l),F(q)}})}function Zl(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Tj(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():E(h,a.g.Y.remove(b.type,e,e+g),2)}ug(a.l);F(h)})}
|
|
464
|
+
function Pl(a){return a&&a.type==Nd&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
465
|
+
function Vl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.ld())return l.return(e);f=null;if(b.Z){var m=b.Z,n=m.g;c instanceof xi&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Qf=d),f=m.oe):f=null}f||(f=Ll(c,b.stream,d||null,a.h.retryParameters,a.g.Db));g=0;b.$&&(g=b.$.h);b.eb=f;return E(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Xl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
466
|
+
function Ll(a,b,c,d,e){var f=a instanceof Ci?a:void 0,g=f?1:0;a=rl(a.M(),a.Ba,a.ja,d,c);a.contentType=b.type;return e.request(rg,a,{type:g,stream:b,segment:f})}
|
|
467
|
+
function Il(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Pb=!1,b.we=!1,b.Rd=0,b.ad=!0,b.Pa=null,b.fc=null,b.$=null,b.Z&&!a.o.has(b.stream)&&jl(b.Z),d?(e=a.g.Ud(),f=a.g.Y.getDuration(),E(g,a.g.Y.remove(b.type,e+d,f),3)):E(g,gk(a.g.Y,b.type),4);if(3!=g.g)return ug(a.l),c?E(g,a.g.Y.flush(b.type),3):g.u(3);ug(a.l);b.ad=!1;b.endOfStream=!1;b.Ra||b.xb||Cl(a,b,0);F(g)})}
|
|
468
|
+
function Cl(a,b,c){var d=b.type;if(d!=Nd||a.i.has(d))b.xb=(new Lc(function(){var e;return O(function(f){if(1==f.g)return ua(f,2),E(f,Ml(a,b),4);if(2!=f.g)return xa(f,0);e=ya(f);if(a.g)a.g.onError(e);F(f)})})).W(c)}function ul(a){null!=a.xb&&(a.xb.stop(),a.xb=null)}function vl(a){return O(function(b){return a.eb?E(b,a.eb.abort(),0):b.u(0)})}
|
|
469
|
+
function Ol(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Tf(a.J),2);ug(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Sd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
|
|
470
|
+
function $l(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Pd;if(e=a.i.get(d.U))e.fc=null,Kl(a,e),vl(e).catch(function(){});if(f=a.i.get(d.ga))f.fc=null,Kl(a,f),vl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.U,a.j.audio);a.j.video&&g.set(d.ga,a.j.video);return E(h,pk(a.g.Y,g),2)}return h.return(!0)})}
|
|
471
|
+
function Yl(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function am(){}
|
|
472
|
+
function bm(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Ee(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ee(n)),m=bm(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?($a("Invalid config, wrong type for "+m),
|
|
473
|
+
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&ab("Unexpected number of arguments for "+m),a[l]=b[l]):($a("Invalid config, unrecognized key "+m),k=!1)}return k}function cm(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function dm(a,b){return a&&b}
|
|
474
|
+
function em(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&c(g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||m!==h[l]&&(k[l]=m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}
|
|
475
|
+
function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",am);am.getDifferenceFromConfigObjects=em;am.convertToConfigObject=cm;am.mergeConfigObjects=bm;function fm(){}function gm(a){a=rd(a);return(new rc(a)).zb}function hm(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=ud(b,!0):e=b;a=rd(a);a=ud(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function im(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=rd(a).split("skd://").pop();return hm(a,c,b)}
|
|
476
|
+
function jm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",fm);fm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=md(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Bb(Ad(c)))}};fm.expressplayFairPlayRequest=function(a,b){jm(a,b)};
|
|
477
|
+
fm.conaxFairPlayRequest=function(a,b){jm(a,b)};fm.ezdrmFairPlayRequest=function(a,b){jm(a,b)};fm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ab(b.body),a=zd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=td("spc="+a))};fm.expressplayInitDataTransform=function(a,b,c){return im(a,b,c)};
|
|
478
|
+
fm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=rd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return hm(a,d,b)};fm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=rd(a).split(";").pop();return hm(a,c,b)};fm.verimatrixInitDataTransform=function(a,b,c){return im(a,b,c)};fm.initDataTransform=hm;
|
|
479
|
+
fm.defaultGetContentId=gm;fm.isFairPlaySupported=function(){var a;return O(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ua(b,2),E(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);ya(b);return b.return(!1)})};function km(){}
|
|
480
|
+
function lm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Sf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){jd()&&"skd"==n&&(n=p.serverCertificate,p=gm(m),m=hm(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Sc(),minHdcpVersion:"",ignoreDuplicateInitData:!Wc()};
|
|
480
481
|
(Sc()||cd())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Wc()||Vc()||Tc("Tizen 4")||Tc("Tizen 5")||Tc("Tizen 6")||Yc()||Xc()&&53===Zc()||Xc()&&68===Zc()||!(!$c()||$c()&&Tc("Android")||$c()&&Tc("Fuchsia"))||gd()&&Rc()||(c="smooth",d=!0);d={retryParameters:Sf(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",
|
|
481
482
|
ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
482
|
-
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:
|
|
483
|
-
useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Vc()||Wc()||Yc()||cd()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:
|
|
483
|
+
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:mm,manifestPreprocessorTXml:nm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',
|
|
484
|
+
useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Vc()||Wc()||Yc()||cd()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:mm,manifestPreprocessorTXml:nm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Sf(),failureCallback:function(m){return dm([m])},
|
|
484
485
|
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,
|
|
485
486
|
maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncTargetLatencyTolerance:.5,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:.95,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,
|
|
486
|
-
infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:cd()||dd()};if(Xc()||Uc()||$c()||ed())e.stallSkip=0;var f={trackSelectionCallback:function(m){return O(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return O(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?E(p,navigator.storage.estimate(),3):p.return(!0);n=p.h;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return
|
|
487
|
+
infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:cd()||dd()};if(Xc()||Uc()||$c()||ed())e.stallSkip=0;var f={trackSelectionCallback:function(m){return O(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return O(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?E(p,navigator.storage.estimate(),3):p.return(!0);n=p.h;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return dm([m,n])},usePersistentLicense:!0,
|
|
487
488
|
numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,
|
|
488
|
-
ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return
|
|
489
|
+
ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return dm([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return dm([m,n])}};var g=!1,h=!1,k=!0;if(Uc()||Xc()||Sc()||cd()||dd()||Tc("AFT")||Tc("PC=EOS")||Tc("PC=APL")||Tc("VirginMedia")||bd()||Tc("WPE")||$c()||ed()||Tc("DT_STB_BCM"))h=g=!0,k=!1;var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,
|
|
489
490
|
abrFactory:function(){return new uf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,
|
|
490
491
|
minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,
|
|
491
|
-
skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(
|
|
492
|
-
function
|
|
493
|
-
function
|
|
494
|
-
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!=Nd&&"image"!=c.type||b.push(c);return b}function
|
|
495
|
-
function
|
|
496
|
-
function
|
|
497
|
-
r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return ua(c,3),E(c,
|
|
498
|
-
if(a.Xa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Wa){d=a.h.presentationTimeline.T();var e=nf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.fa=e,e.video&&
|
|
499
|
-
r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function
|
|
500
|
-
function
|
|
501
|
-
function
|
|
502
|
-
Promise.resolve(),7);case 7:a.dispatchEvent(f),F(g)}})}r.configure=function(a,b){a=
|
|
503
|
-
function
|
|
504
|
-
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.da){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.ba){e.u(4);break}return E(e,a.i.stop(),4);case 4:a.F&&!a.na&&a.F.release();if(!a.l||a.ca){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.oa)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,
|
|
505
|
-
function
|
|
506
|
-
"regionremove",function(d){c.g.delete(d.region)})}oa(
|
|
507
|
-
function
|
|
492
|
+
skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(om(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
493
|
+
function pm(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return bm(a,b,c||lm(),d,"")}
|
|
494
|
+
function om(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=De(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return we(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
495
|
+
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!=Nd&&"image"!=c.type||b.push(c);return b}function mm(a){return dm([a],a)}function nm(a){return dm([a],a)}S("shaka.util.PlayerConfiguration",km);km.mergeConfigObjects=pm;km.createDefault=lm;function qm(a,b,c,d,e){dg.call(this);this.K=a;this.S=b;this.Ja=e.networkingEngine;this.V=d;this.o=null;this.pb=c;this.va=0;this.gb=e.uc;this.B=e.ii;this.hb=e.ji;this.g=e.config;this.j=this.C=this.h=null;this.da=!1;this.F=e.ti;this.na=!1;this.l=null;this.ca=!1;this.i=this.A=null;this.ba=!1;this.J=new Map;this.oa=!1;this.Ka=e.si;this.aa=new $k;this.m=new Uf;this.L=null;this.s=!1;this.Wa=e.kh;this.fa=null;this.Xa=e.jh;this.N=!1;this.H=[];this.G=[]}oa(qm,dg);
|
|
496
|
+
function rm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function sm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function tm(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=qm.prototype;r.getStartTime=function(){return this.V};r.yc=function(){return this.K};r.ef=function(){return this.h};function um(a){a.ba=!0;return a.i}function vm(a){a.da=!0;return a.j}function wm(a){a.na=!0;return a.F}r.getStats=function(){return this.aa};
|
|
497
|
+
function xm(a){a.ca=!0;return a.l}function ym(a){a.oa=!0;return a.J}
|
|
498
|
+
r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return ua(c,3),E(c,zm(a),5);case 5:return Am(a),E(c,Bm(a),6);case 6:Am(a);a.o||(a.o=new Ef(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
|
|
499
|
+
if(a.Xa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Wa){d=a.h.presentationTimeline.T();var e=nf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.fa=e,e.video&&Cm(a,e.video,d),e.audio&&Cm(a,e.audio,d)}return E(c,void 0,7);case 7:Am(a);a.m.resolve();xa(c,0);break;case 3:b=ya(c),a.m.reject(b),F(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):dg.prototype.dispatchEvent.call(this,a)};
|
|
500
|
+
r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Am(a){if(a.s)throw new T(2,7,7003);}function Dm(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
|
|
501
|
+
function zm(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Dm(a,"manifest-parser");a.j||(a.C=ri(a.K,a.S),a.j=a.C(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Dm(a,"manifest");if(a.h)return g.u(2);c=a;return E(g,a.j.start(a.K,a.hb),3)}2!=g.g&&(c.h=g.h);d=new U("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new T(2,4,4036);Em(a.h);e=Date.now()/1E3;f=e-b;a.aa.F=f;F(g)})}
|
|
502
|
+
function Bm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Dm(a,"drm-engine");a.va=Date.now()/1E3;a.l=a.gb();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Le(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return E(g,Promise.resolve(),3);case 3:Am(a),a.dispatchEvent(c);case 2:return d=nf(a.h.variants),E(g,Dh(a.l,d,a.h.offlineSessionIds),4);case 4:return Am(a),E(g,li(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return E(g,
|
|
503
|
+
Promise.resolve(),7);case 7:a.dispatchEvent(f),F(g)}})}r.configure=function(a,b){a=cm(a,b);pm(this.g,a)};r.getConfiguration=function(){return Ee(this.g)};
|
|
504
|
+
function Cm(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new al(d,b,function(l,m,n){return Ll(l,m,n||null,a.g.streaming.retryParameters,a.Ja)}),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.V||0;(h=(g=b.segmentIndex.Ab(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ea&&dl(e,h.ea):cl(e,h.startTime));F(k)})}r.Ui=function(){return this.m};
|
|
505
|
+
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.da){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.ba){e.u(4);break}return E(e,a.i.stop(),4);case 4:a.F&&!a.na&&a.F.release();if(!a.l||a.ca){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.oa)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,jl(d);F(e)}})};
|
|
506
|
+
function Em(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))}S("shaka.media.PreloadManager",qm);qm.prototype.destroy=qm.prototype.destroy;qm.prototype.waitForFinish=qm.prototype.Ui;function Fm(a,b){dg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{qc:null,pc:Gm,dc:function(d,e){return Hm(c,"enter",d,e)}},{qc:Vm,pc:Gm,dc:function(d,e){return Hm(c,"enter",d,e)}},{qc:Wm,pc:Gm,dc:function(d,e){return Hm(c,"enter",d,e)}},{qc:Gm,pc:Vm,dc:function(d,e){return Hm(c,"exit",d,e)}},{qc:Gm,pc:Wm,dc:function(d,e){return Hm(c,"exit",d,e)}},{qc:Vm,pc:Wm,dc:function(d,e){return Hm(c,"skip",d,e)}},{qc:Wm,pc:Vm,dc:function(d,e){return Hm(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
|
|
507
|
+
"regionremove",function(d){c.g.delete(d.region)})}oa(Fm,dg);Fm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;dg.prototype.release.call(this)};Fm.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?Vm:a>d.endTime?Wm:Gm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.qc==e&&h.pc==f&&h.dc(d,b)}}};
|
|
508
|
+
function Hm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Vm=1,Gm=2,Wm=3;function Xm(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new rc(a)).Qa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Ym[d])return m.return(e);f=0;g=lg([a],c);ua(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];xa(m,3);break;case 2:k=ya(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
508
509
|
e.toLowerCase().split(";").shift():"")}})}
|
|
509
|
-
var
|
|
510
|
+
var Ym={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 Zm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Zm(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=$m(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=$m(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;
|
|
510
511
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
511
|
-
function
|
|
512
|
-
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function
|
|
513
|
-
r.append=function(a){var b=
|
|
514
|
-
c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(
|
|
515
|
-
function
|
|
516
|
-
function
|
|
517
|
-
|
|
518
|
-
r.append=function(a){var b=[].concat(x(this.h)),c={};a=t(a);for(var d=a.next();!d.done;c={Ed:c.Ed},d=a.next())c.Ed=d.value,b.some(function(e){return function(f){return Zb(f,e.Ed)}}(c))||this.h.push(c.Ed);
|
|
519
|
-
r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});
|
|
520
|
-
function
|
|
521
|
-
q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.jc?(d.jc.contains(c)&&d.jc.removeChild(c),c.appendChild(d.jc),d.jc.appendChild(d.Oe)):c.appendChild(d.Oe)}}function
|
|
522
|
-
function
|
|
512
|
+
function $m(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
513
|
+
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function an(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(an(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Zm(d,b);c.push(e)}return c};function bn(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=bn.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;cn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
514
|
+
r.append=function(a){var b=an(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={sc:d.sc},e=b.next())d.sc=e.value,a.some(function(f){return function(g){return g.startTime==f.sc.startTime&&g.endTime==f.sc.endTime&&g.text==f.sc.payload?!0:!1}}(d))||(e=dn(d.sc))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
|
|
515
|
+
c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(cn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
516
|
+
function dn(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
517
|
+
function cn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",bn);bn.prototype.setTextVisibility=bn.prototype.setTextVisibility;bn.prototype.isTextVisible=bn.prototype.isTextVisible;bn.prototype.destroy=bn.prototype.destroy;bn.prototype.append=bn.prototype.append;bn.prototype.remove=bn.prototype.remove;bn.prototype.configure=bn.prototype.configure;function en(){}r=en.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",en);en.prototype.setTextVisibility=en.prototype.setTextVisibility;en.prototype.isTextVisible=en.prototype.isTextVisible;en.prototype.destroy=en.prototype.destroy;en.prototype.append=en.prototype.append;en.prototype.remove=en.prototype.remove;en.prototype.configure=en.prototype.configure;function fn(){}function gn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",fn);fn.removeAllChildren=gn;function hn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||qb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Mc(function(){d.A.paused||
|
|
518
|
+
jn(d)})).Ua(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new hb;this.j.D(document,"fullscreenchange",function(){jn(d,!0)});this.j.D(this.A,"seeking",function(){jn(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){jn(d,!0)}),this.o.observe(this.g));this.B=new Map}r=hn.prototype;r.configure=function(a){this.C&&this.C.Ua(a.captionsUpdatePeriod)};
|
|
519
|
+
r.append=function(a){var b=[].concat(x(this.h)),c={};a=t(a);for(var d=a.next();!d.done;c={Ed:c.Ed},d=a.next())c.Ed=d.value,b.some(function(e){return function(f){return Zb(f,e.Ed)}}(c))||this.h.push(c.Ed);jn(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
520
|
+
r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});jn(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function kn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
521
|
+
function ln(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.$g:null;l&&(g.push(l.Oe),l.jc&&g.push(l.jc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?kn(a,n)||(f=!0):(mn(a,k,e),l=a.i.get(k),n=l.$g,f=!0));0<k.nestedCues.length&&n&&ln(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
|
|
522
|
+
q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.jc?(d.jc.contains(c)&&d.jc.removeChild(c),c.appendChild(d.jc),d.jc.appendChild(d.Oe)):c.appendChild(d.Oe)}}function jn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())gn(d.value);gn(a.g);a.i.clear();a.B.clear()}a.m&&ln(a,a.h,a.g,c,[])}}
|
|
523
|
+
function mn(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&nn(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.l===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==gc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==gc?"%":"px");if(a.B.has(g))c=a.B.get(g);else{var h=document.createElement("span"),k=c.heightUnits==gc?"%":"px",l=c.widthUnits==
|
|
523
524
|
gc?"%":"px",m=c.viewportAnchorUnits==gc?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.l===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):
|
|
524
525
|
(h.style.top=c.viewportAnchorY-c.regionAnchorY*c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(g,h);c=h}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,
|
|
525
|
-
{Oe:f,$g:e,jc:c})}function
|
|
526
|
-
function
|
|
527
|
-
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=
|
|
528
|
-
1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=
|
|
529
|
-
c.writingMode==Sb?(f.width="100%",c.lineAlign==Ub?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Ub?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Ub?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Sb?f.paddingLeft=c.position:f.paddingTop=c.position);a=
|
|
526
|
+
{Oe:f,$g:e,jc:c})}function on(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Pb?c:"left"===a||"start"===a&&b===Rb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Rb?"line-right":"center"}
|
|
527
|
+
function nn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=pn(c.linePadding,c,a.s);f.paddingRight=pn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
528
|
+
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=qn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=qn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-
|
|
529
|
+
1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=pn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Tb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",
|
|
530
|
+
c.writingMode==Sb?(f.width="100%",c.lineAlign==Ub?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Ub?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Ub?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Sb?f.paddingLeft=c.position:f.paddingTop=c.position);a=on(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");
|
|
530
531
|
f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Sb?f.width=c.size+"%":f.height=c.size+"%")}
|
|
531
|
-
function
|
|
532
|
-
|
|
533
|
-
break;case "right":g.push("align:right");break;case Qb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function
|
|
534
|
-
function
|
|
535
|
-
!0;var f=
|
|
536
|
-
function
|
|
537
|
-
function
|
|
538
|
-
function
|
|
539
|
-
function
|
|
540
|
-
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function
|
|
541
|
-
function
|
|
542
|
-
r.getBandwidthEstimate=function(a){var b=this.sg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function
|
|
543
|
-
|
|
544
|
-
this.Gf=[];this.s=null;this.Ja=new Ef(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Wa=this.g.preferredTextLanguage;this.pd=this.g.preferredTextRole;this.md=this.g.preferForcedSubs;this.gd=[];b&&b(this);this.N=
|
|
545
|
-
this.G=
|
|
546
|
-
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.Zf.stop();if(c.na)return h.u(0);c.ag=c.h;g=c;return E(h,c.lg(!0),3)}g.na=h.h;F(h)})}),this.ed.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Zf.W(.1)}));this.pe.D(window,"online",function(){
|
|
547
|
-
this.tc(a,!0))}oa(X,dg);function
|
|
548
|
-
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==
|
|
549
|
-
null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),dg.prototype.release.call(a),F(g)}})};function
|
|
550
|
-
r.tc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==
|
|
551
|
-
}})};r.lh=function(a){this.ah=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==
|
|
552
|
-
r.nc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:return c.l!=
|
|
532
|
+
function pn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function qn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",hn);hn.prototype.setTextVisibility=hn.prototype.setTextVisibility;
|
|
533
|
+
hn.prototype.isTextVisible=hn.prototype.isTextVisible;hn.prototype.remove=hn.prototype.remove;hn.prototype.destroy=hn.prototype.destroy;hn.prototype.append=hn.prototype.append;hn.prototype.configure=hn.prototype.configure;function rn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=an(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
534
|
+
break;case "right":g.push("align:right");break;case Qb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function sn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}sn.prototype.configure=function(a){this.g=a};function tn(a){a.i=!1;a.l=!0;a.j=!1}
|
|
535
|
+
function un(a,b,c){try{if(!a.g.enabled)return b;var d=vn(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=wn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=xn;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=yn;break a}e=void 0}d.ot=e;d.su=
|
|
536
|
+
!0;var f=zn(d);return An(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function vn(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}}
|
|
537
|
+
function Bn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,vn(a));c.pr=a.h.ib();var e=c.ot===Cn||c.ot===xn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Dn(a,c);if(d)d=En(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=zn(a);f&&(b.uris=b.uris.map(function(g){return An(g,f)}))}}}function Dn(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
|
|
538
|
+
function Fn(a){if(0===a.type)return Gn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?xn:Cn;if("audio"==b)return wn;if("text"==b)return"application/mp4"===a.mimeType?Hn:In}}function Jn(a,b){b=a.h.rb()[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}
|
|
539
|
+
function Kn(a,b){b=a.h.rb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Ln(a,b){var c=a.h.cc();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 Cn:return a.videoBandwidth||NaN;case wn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
540
|
+
function zn(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"===
|
|
541
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function En(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=zn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
542
|
+
function An(a,b){if(!b||a.includes("offline:"))return a;a=new rc(a);a.g.set("CMCD",b);return a.toString()}var yn="m",wn="a",Cn="v",xn="av",Gn="i",In="c",Hn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",dh:"s",OTHER:"o"});function Mn(a){this.h=a;this.g=null}r=Mn.prototype;r.configure=function(a){this.h=a};r.tg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Nn)?1E3*this.g.get(Nn):null};r.sg=function(){return this.h.enabled&&this.g&&this.g.has(On)?1E3*this.g.get(On):null};r.Nh=function(){return this.h.enabled&&this.g&&this.g.has(Pn)?this.g.get(Pn):null};r.Oh=function(){return this.h.enabled&&this.g&&this.g.has(Qn)?this.g.get(Qn):null};
|
|
543
|
+
r.getBandwidthEstimate=function(a){var b=this.sg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Rn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Mn);Mn.prototype.getBandwidthEstimate=Mn.prototype.getBandwidthEstimate;Mn.prototype.getRoundTripTime=Mn.prototype.Oh;Mn.prototype.getResponseDelay=Mn.prototype.Nh;Mn.prototype.getEstimatedThroughput=Mn.prototype.sg;
|
|
544
|
+
Mn.prototype.getMaxBitrate=Mn.prototype.tg;var On="etp",Nn="mb",Pn="rd",Qn="rtt";function Sn(){this.g=null;this.h=[]}function Tn(a,b){return O(function(c){if(1==c.g)return a.g?E(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;F(c)})}Sn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){dg.call(this);var c=this;this.l=Un;this.ae=this.h=null;this.da=!1;this.pe=new hb;this.fd=new hb;this.m=new hb;this.Ka=new hb;this.ed=new hb;this.C=this.F=this.A=this.G=null;this.re=0;this.V=new Sn;this.fa=this.Cf=this.aa=this.i=this.Xa=this.J=this.j=this.pb=this.K=this.ah=this.ba=this.N=this.dd=this.L=this.de=this.H=this.hb=null;this.gb=!1;this.va=this.o=null;this.Wf=1E9;this.td=[];this.S=NaN;this.g=Vn(this);this.ca={width:Infinity,height:Infinity};this.$d=new ki(this.g,this.ca,null);
|
|
545
|
+
this.Gf=[];this.s=null;this.Ja=new Ef(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Wa=this.g.preferredTextLanguage;this.pd=this.g.preferredTextRole;this.md=this.g.preferForcedSubs;this.gd=[];b&&b(this);this.N=Wn(this);this.ba=new Mn(this.g.cmsd);
|
|
546
|
+
this.G=Xn(this);this.G.Nf(this.g.streaming.forceHTTP);this.G.Of(this.g.streaming.forceHTTPS);this.ag=this.na=this.B=null;this.Zf=new Mc(function(){return O(function(d){if(1==d.g)return c.na?E(d,c.tc(c.ag,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.na),4);c.ag.play();c.na=null;F(d)})});Yn&&(this.B=Yn(),this.B.configure(this.g.ads),this.ed.D(this.B,"ad-started",function(d){var e,f,g;return O(function(h){if(1==h.g){if(c.g.ads.supportsMultipleMediaElements)return h.return();e=d.originalEvent;if(!e)return h.return();
|
|
547
|
+
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.Zf.stop();if(c.na)return h.u(0);c.ag=c.h;g=c;return E(h,c.lg(!0),3)}g.na=h.h;F(h)})}),this.ed.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Zf.W(.1)}));this.pe.D(window,"online",function(){Zn(c);c.Ff()});this.je=new Mc(function(){return $n(c)});this.oa=null;a&&(qb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
|
|
548
|
+
this.tc(a,!0))}oa(X,dg);function ao(a){null!=a.K&&(Bj(a.K),a.K.release(),a.K=null)}function bo(a,b){b.lcevc.enabled?(ao(a),null==a.K&&(a.K=new Aj(a.h,a.ah,b.lcevc),a.F&&(a.F.S=a.K))):ao(a)}function co(a,b){return new U(a,b)}r=X.prototype;
|
|
549
|
+
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==eo)return g.return();ao(a);b=a.detach();a.l=eo;return E(g,b,2);case 2:c=[];d=t(a.Gf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.Gf=[];return E(g,Promise.all(c),3);case 3:a.pe&&(a.pe.release(),a.pe=null);a.fd&&(a.fd.release(),a.fd=null);a.m&&(a.m.release(),a.m=null);a.Ka&&(a.Ka.release(),a.Ka=null);a.ed&&(a.ed.release(),a.ed=null);a.va=null;a.g=null;a.s=null;a.ae=null;a.N=null;a.ba=
|
|
550
|
+
null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),dg.prototype.release.call(a),F(g)}})};function fo(a,b){a.dispatchEvent(co("onstatechange",(new Map).set("state",b)))}
|
|
551
|
+
r.tc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==eo)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,go(c,"attach"),4);case 4:if(g.h)return g.return();ua(g,5,6);d||(fo(c,"attach"),e=function(){var h=ho(c);h&&io(c,h)},c.fd.D(a,"error",e),c.h=a);if(!b||!Nc()||c.F){g.u(6);break}return E(g,jo(c),6);case 6:za(g);c.V.release();Ba(g,0);break;case 5:return f=ya(g),E(g,c.detach(),10);case 10:throw f;
|
|
552
|
+
}})};r.lh=function(a){this.ah=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==eo)throw new T(2,7,7E3);return E(c,b.nc(!1,a),2)}if(3!=c.g)return E(c,go(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.fd.nb(),b.h=null),fo(b,"detach"),b.B&&!a&&b.B.release()}finally{b.V.release()}F(c)})};function go(a,b){var c;return O(function(d){return 1==d.g?(c=++a.re,E(d,Tn(a.V,b),2)):c!=a.re?(a.V.release(),d.return(!0)):d.return(!1)})}
|
|
553
|
+
r.nc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:return c.l!=eo&&(c.l=Un),E(p,go(c,"unload"),2);case 2:if(p.h)return p.return();va(p,3);c.gb=!1;fo(c,"unload");a&&!Nc()&&(a=!1);ao(c);d=c.gd.map(function(q){return q()});c.gd=[];return E(p,Promise.all(d),5);case 5:c.dispatchEvent(co("unloading"));c.dd&&(c.dd.release(),c.dd=null);c.h&&(c.m.nb(),c.Ka.nb());c.je.stop();c.hb&&(c.hb.release(),c.hb=null);c.de&&(c.de.stop(),c.de=null);
|
|
553
554
|
if(!c.J){p.u(6);break}return E(p,c.J.stop(),7);case 7:c.J=null,c.Xa=null;case 6:if(!c.o){p.u(8);break}return E(p,c.o.stop(),8);case 8:if(!c.j){p.u(10);break}return E(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!jd("webkit")||!c.A){p.u(12);break}return E(p,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.F){p.u(14);break}return E(p,c.F.destroy(),15);case 15:c.F=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.na&&!b&&(c.na.destroy(),c.na=
|
|
554
|
-
null);b||c.Zf.stop();c.N&&
|
|
555
|
-
h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(Xe={},ji.clear());c.i=null;c.s=new
|
|
556
|
-
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==
|
|
557
|
-
2),E(
|
|
558
|
-
A.h)?(
|
|
559
|
-
e.getConfiguration();d.$d=e.B;d.Xa=e.C;d.J=
|
|
560
|
-
function(){}),"function"!=typeof d.o.setCmsdManager&&(qb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(qb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=
|
|
561
|
-
k(function(){return O(function(z){return E(z,
|
|
562
|
-
function
|
|
563
|
-
r.lg=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,
|
|
564
|
-
function
|
|
565
|
-
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,
|
|
566
|
-
function
|
|
567
|
-
filter:function(
|
|
568
|
-
new U("regionadd",new Map([["region",
|
|
569
|
-
(new Map).set("isLive",a.T());k.dispatchEvent(
|
|
570
|
-
|
|
571
|
-
var G=Object.keys(H);1==G.length&&""==G[0]&&(G=["00"],H={"00":H[""]});
|
|
572
|
-
!pi.includes(Q)}P!=L.allowedByKeySystem&&(
|
|
573
|
-
kh:f,jh:h};k=new
|
|
574
|
-
function
|
|
575
|
-
function
|
|
576
|
-
function
|
|
577
|
-
|
|
578
|
-
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){
|
|
579
|
-
w=a.fa||a.h.currentTime;A=v.$b();z=v.sb();w<A?w=A:w>z&&(w=z);return E(
|
|
580
|
-
if((
|
|
581
|
-
4)}
|
|
582
|
-
function
|
|
555
|
+
null);b||c.Zf.stop();c.N&&tn(c.N);c.ba&&(c.ba.g=null);c.h&&gn(c.h);if(!c.h||!c.h.src){p.u(16);break}return E(p,new Promise(function(q){return(new Mc(q)).W(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.A){p.u(18);break}return E(p,c.A.destroy(),19);case 19:c.A=null;case 18:c.oa&&c.aa!=c.oa.yc()&&(c.oa.s||c.oa.destroy(),c.oa=null);c.aa=null;c.Cf=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=
|
|
556
|
+
h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(Xe={},ji.clear());c.i=null;c.s=new $k;c.Sf=null;c.td=[];c.S=NaN;ko(c);case 3:za(p);c.V.release();Ba(p,4);break;case 4:if(a&&Nc()&&!c.F)return E(p,jo(c),0);p.u(0)}})};r.Ti=function(a){this.fa=a};
|
|
557
|
+
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==eo)throw new T(2,7,7E3);e=null;f="";a instanceof qm?(e=a,f=e.yc()||""):f=a||"";return E(A,Tn(d.V,"load"),2);case 2:d.V.release();if(!d.h)throw new T(2,7,7002);if(!d.aa){A.u(3);break}d.aa=f;return E(A,d.nc(!1),3);case 3:g=++d.re;h=function(){return O(function(z){if(1==z.g)return d.re==g?z.u(0):e?E(z,e.destroy(),3):z.u(3);throw new T(2,7,7E3);})};k=function(z,B){return O(function(y){switch(y.g){case 1:return va(y,
|
|
558
|
+
2),E(y,Tn(d.V,B),4);case 4:return E(y,h(),5);case 5:return E(y,z(),6);case 6:return E(y,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:za(y),d.V.release(),Ba(y,0)}})};ua(A,5,6);null==b&&e&&(b=e.getStartTime());d.fa=b;d.gb=!1;d.dispatchEvent(co("loading"));if(e){c=e.S;A.u(8);break}if(c){A.u(8);break}return E(A,k(function(){return O(function(z){if(1==z.g)return E(z,lo(d,f),2);c=z.h;F(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){tm(e,d);d.s=e.getStats();A.u(11);break}return E(A,mo(d,f,b,c,!0),12);case 12:(e=
|
|
559
|
+
A.h)?(tm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new $k;case 11:m=!e;n=e?e.pb:Date.now()/1E3;d.s=e?e.getStats():new $k;d.aa=f;d.Cf=c||null;if(m)return E(A,k(function(){return O(function(z){return E(z,no(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){A.u(15);break}return E(A,k(function(){return O(function(z){return E(z,jo(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return E(A,k(function(){return O(function(z){return E(z,e.m,0)})},"waitForFinish"),17);case 17:d.g=
|
|
560
|
+
e.getConfiguration();d.$d=e.B;d.Xa=e.C;d.J=vm(e);d.dd=wm(e);d.pb=e.Ka;d.i=e.ef();if(p=e.o)d.Ja=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(oo(d),d.configure("manifest.disableVideo",!0));d.A=xm(e);return E(A,k(function(){return O(function(z){return E(z,d.A.tc(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(q=e.A)||d.va&&d.va==q||(d.o=um(e),d.va=e.A,"function"!=typeof d.o.setMediaElement&&(qb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
|
|
561
|
+
function(){}),"function"!=typeof d.o.setCmsdManager&&(qb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(qb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=ym(e),v=e.fa,E(A,k(function(){return O(function(z){return E(z,po(d,n,v,u),0)})},"loadInner_"),19);case 19:sm(e);A.u(14);break;case 20:return E(A,
|
|
562
|
+
k(function(){return O(function(z){return E(z,qo(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(co("loaded"));case 6:za(A);if(!e){A.u(22);break}return E(A,e.destroy(),22);case 22:d.oa=null;Ba(A,0);break;case 5:w=ya(A);if(7E3==w.code){A.u(24);break}return E(A,d.nc(!1),24);case 24:throw w;}})};
|
|
563
|
+
function oo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}r.Pi=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?E(e,ro(c),2):3!=e.g?(d=e.h,E(e,c.nc(a,b),3)):e.return(d)})};
|
|
564
|
+
r.lg=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,ro(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
|
|
565
|
+
function ro(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Xa&&a.aa))return e.u(2);c=a.h.currentTime;a.T()&&(c=null);d=Date.now()/1E3;return E(e,so(a,a.aa,c,a.Cf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Xa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.va;f.i=a.o;f.A=g;b.o=a.Ja;b.start();a.i=null;a.J=null;a.Xa=null;a.o=null;a.va=null}return e.return(b)})}
|
|
566
|
+
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,mo(d,a,b,c),2);(e=f.h)?e.start():io(d,new T(2,7,7005));return f.return(e)})};function mo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):E(l,lo(a,b),3);2!=l.g&&(d=l.h);if(g=to(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.va==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(so(a,b,c,d||null,f,!e,h,k))})}
|
|
567
|
+
function so(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,p,q,u,v,w,A,z,B,y,D,C;return O(function(I){if(1==I.g)return k=null,l=Ee(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.N&&k.s?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(J,H){m()?k.configure(J,H):a.configure(J,H)},Infinity!=a.ca.width||Infinity!=a.ca.height?I.u(2):E(I,kd(),3);2!=I.g&&(q=I.h,a.ca.width=q.width,a.ca.height=q.height);u=new ki(l,a.ca,null);v={networkingEngine:a.G,
|
|
568
|
+
filter:function(J){var H,K;return O(function(G){if(1==G.g)return E(G,li(u,J),2);if(4!=G.g){H=G.h;if(!H)return G.u(0);K=co("trackschanged");return E(G,Promise.resolve(),4)}k.dispatchEvent(K);F(G)})},makeTextStreamsForClosedCaptions:function(J){return uo(a,J)},onTimelineRegionAdded:function(J){var H=k.F;a:{var K=t(H.g);for(var G=K.next();!G.done;G=K.next())if(G=G.value,G.schemeIdUri==J.schemeIdUri&&G.id==J.id&&G.startTime==J.startTime&&G.endTime==J.endTime){K=G;break a}K=null}null==K&&(H.g.add(J),J=
|
|
569
|
+
new U("regionadd",new Map([["region",J]])),H.dispatchEvent(J))},onEvent:function(J){return k.dispatchEvent(J)},onError:function(J){return k.onError(J)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){p("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.N&&a.j.updateDuration()},newDrmInfo:function(J){var H=k.l,K=H?H.g:null;K&&H.s&&ni(u,K.keySystem,J)},onManifestUpdated:function(){var J=
|
|
570
|
+
(new Map).set("isLive",a.T());k.dispatchEvent(co("manifestupdated",J));rm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new ml(function(){return a.Nb()});w.addEventListener("regionadd",function(J){var H=J.region;vo(a,"timelineregionadded",H,k);rm(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(H)})});A=null;l.streaming.observeQualityChanges&&(A=new nl(function(){return a.rb()}),A.addEventListener("qualitychange",function(J){var H=
|
|
571
|
+
J.quality;J=J.position;H=(new Map).set("mediaQuality",{bandwidth:H.bandwidth,audioSamplingRate:H.audioSamplingRate,codecs:H.codecs,contentType:H.contentType,frameRate:H.frameRate,height:H.height,mimeType:H.mimeType,channelsCount:H.channelsCount,pixelAspectRatio:H.pixelAspectRatio,width:H.width}).set("position",J);a.dispatchEvent(co("mediaqualitychanged",H))}));z=!0;B={Db:a.G,onError:function(J){return k.onError(J)},me:function(J){rm(k,!0,function(){a:{var H=J,K=co("keystatuschanged");a.dispatchEvent(K);
|
|
572
|
+
var G=Object.keys(H);1==G.length&&""==G[0]&&(G=["00"],H={"00":H[""]});K=1==G.length&&"00"==G[0];var M=!1;if(G.length){G=t(a.i.variants);for(var L=G.next();!L.done;L=G.next()){L=L.value;var N=[];L.audio&&N.push(L.audio);L.video&&N.push(L.video);N=t(N);for(var P=N.next();!P.done;P=N.next()){var R=P.value;P=L.allowedByKeySystem;if(R.keyIds.size){L.allowedByKeySystem=!0;R=t(R.keyIds);for(var Q=R.next();!Q.done;Q=R.next())if(Q=Q.value,(Q=H[K?"00":Q])||a.A.F)L.allowedByKeySystem=L.allowedByKeySystem&&!!Q&&
|
|
573
|
+
!pi.includes(Q)}P!=L.allowedByKeySystem&&(M=!0)}}}if(M&&(wo(a),!xo(a)))break a;(H=a.j.j)&&!H.allowedByKeySystem&&yo(a)}})},onExpirationUpdated:function(J,H){var K=co("expirationupdated");k.dispatchEvent(K);if((K=k.j)&&K.onExpirationUpdated)K.onExpirationUpdated(J,H)},onEvent:function(J){k.dispatchEvent(J);"drmsessionupdate"==J.type&&z&&(z=!1,J=Date.now()/1E3-k.va,(a.s||k.getStats()).j=J,a.K&&Bj(a.K))}};y=Xn(a,m);kg(a.G,y);D=function(){return a.uc(B)};C={config:l,ji:v,ti:w,si:A,uc:D,ii:u,networkingEngine:y,
|
|
574
|
+
kh:f,jh:h};k=new qm(b,d,e,c,C);a.Gf.push(k);return I.return(k)})}function lo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Xm(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&ad()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
575
|
+
function to(a,b){if(!Nc())return!0;if(b){if(""==(a.h||Qc()).canPlayType(b))return!1;if(!(Nc()&&b in si))return!0;if(he(b)){if(a.g.streaming.preferNativeHls)return!0;if(ad()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(ad())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
576
|
+
function jo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return fo(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Sf=b,d=zo(a.h,c,{Eh:function(){return a.keySystem()},ne:function(h,k,l){Ao(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ca=f,E(g,d.L,2);a.F=d;F(g)})}
|
|
577
|
+
function po(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H;return O(function(K){switch(K.g){case 1:fo(a,"load");e=a.h;a.H=new Rk({Vd:function(){return e.playbackRate},Xb:function(){return e.defaultPlaybackRate},Pf:function(G){e.playbackRate=G},Dg:function(G){e.currentTime+=G}});f=function(){return Bo(a)};g=function(){return Co(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);bo(a,a.g);a.Wa=a.g.preferredTextLanguage;a.pd=a.g.preferredTextRole;a.md=a.g.preferForcedSubs;
|
|
578
|
+
Do(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,M,L){a.i&&a.j&&G!=a.j.j&&Eo(a,G,!0,void 0===M?!1:M,void 0===L?0:L)});a.o.setMediaElement(e);a.o.setCmsdManager(a.ba);a.j=Fo(a);a.j.configure(a.g.streaming);a.l=Go;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Ho(a,G)}});a.dispatchEvent(co("streaming"));h=c;(k=a.j.j)||h||(h=Io(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(q=
|
|
579
|
+
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){K.u(2);break}return E(K,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Do(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);yl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.C=Jo(a,G);a.hb=Ko(a,G);Lo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.fa);if(k){K.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){K.u(5);
|
|
580
|
+
break}v=a.i.presentationTimeline;w=a.fa||a.h.currentTime;A=v.$b();z=v.sb();w<A?w=A:w>z&&(w=z);return E(K,Mo(h,w),6);case 6:B=K.h,u(B);case 5:Eo(a,h,!0,!1,0);case 4:return a.C.Ge(),y=a.zc().find(function(G){return G.active}),y||((D=of(a.i.textStreams,a.Wa,a.pd,a.md)[0]||null)&&Zk(a.s.h,D,!0),h&&(D?(h.audio&&No(a,h.audio,D)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),Oo(a)):a.da=!1),D&&(a.g.streaming.alwaysStreamText||a.lf())&&Hl(a.j,D)),E(K,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Po(a));
|
|
581
|
+
wo(a);xo(a);a.i.variants.some(function(G){return G.primary});if((C=a.T())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)I=function(){return Qo(a)},a.m.D(e,"timeupdate",I);C||(J=function(){return Ro(a)},a.m.D(e,"timeupdate",J),Ro(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(H=function(){var G,M;return O(function(L){if(1==L.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return L.u(0);
|
|
582
|
+
a.m.Hb(e,"timeupdate",H);M=a;return E(L,a.preload(a.i.nextUrl),4)}M.oa=L.h;F(L)})},a.m.D(e,"timeupdate",H)),a.m.D(e,"ended",function(){a.load(a.oa||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(C);a.gb=!0;a.m.qa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});F(K)}})}
|
|
583
|
+
function no(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Pd,d=Date.now()/1E3,e=!0,a.A=a.uc({Db:a.G,onError:function(k){io(a,k)},me:function(){},onExpirationUpdated:function(){var k=co("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
583
584
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?ae(b):"",codecs:b?ge(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ga,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Rd(g.mimeType,
|
|
584
585
|
g.codecs)),b.startsWith("audio/")?(g.type=c.U,f.audio=g):f.video=g,a.A.ba=!0,E(h,Dh(a.A,[f],[]),2)):E(h,a.A.tc(a.h),0)})}
|
|
585
|
-
function
|
|
586
|
-
"ratechange",h),"none"!=d.preload&&a.m.qa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return
|
|
587
|
-
a.m.D(d.textTracks,"change",function(){return
|
|
588
|
-
"change",A);(new Mc(A)).W(1)}),2);if(e)return w.return();
|
|
589
|
-
l]),2);if((m=a.T())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return
|
|
590
|
-
function
|
|
591
|
-
function
|
|
592
|
-
function
|
|
593
|
-
function
|
|
594
|
-
function
|
|
595
|
-
|
|
596
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}
|
|
597
|
-
if(q.segmentIndex&&m){var w=q.segmentIndex.Ab(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Mb(m.
|
|
598
|
-
500,
|
|
599
|
-
function
|
|
600
|
-
function
|
|
601
|
-
function
|
|
602
|
-
function
|
|
603
|
-
function
|
|
604
|
-
function
|
|
605
|
-
f);a.dispatchEvent(
|
|
606
|
-
return d},ne:function(b,c,d){
|
|
607
|
-
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
586
|
+
function qo(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return fo(a,"src-equals"),d=a.h,a.C=new Hk(d),e=!1,a.gd.push(function(){e=!0}),null!=a.fa&&a.C.He(a.fa),a.H=new Rk({Vd:function(){return d.playbackRate},Xb:function(){return d.defaultPlaybackRate},Pf:function(v){d.playbackRate=v},Dg:function(v){d.currentTime+=v}}),f=a.g.streaming.rebufferingGoal,Lo(a,d,f),g=function(){return Bo(a)},h=function(){return Co(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
587
|
+
"ratechange",h),"none"!=d.preload&&a.m.qa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return wo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return wo(a)}),a.m.D(d.audioTracks,"change",function(){return wo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "metadata":So(a,v);break;case "chapters":Ho(a,v);break;default:wo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return wo(a)}),
|
|
588
|
+
a.m.D(d.textTracks,"change",function(){return wo(a)})),d.src=un(a.N,a.aa,c),(Uc()||Xc())&&d.load(),"none"!=d.preload&&!d.autoplay&&he(c)&&fd()&&d.load(),a.l=To,a.dispatchEvent(co("streaming")),k=new Uf,yk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.Ge();k.resolve()}),yk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var v;return O(function(w){if(1==w.g)return Uo(a),v=Vo(a),v.find(function(A){return"disabled"!=A.mode})?(0<v.length&&(a.da=!0),w.u(2)):E(w,new Promise(function(A){a.m.qa(d.textTracks,
|
|
589
|
+
"change",A);(new Mc(A)).W(1)}),2);if(e)return w.return();Wo(a);F(w)})}),d.error?k.reject(ho(a)):"none"==d.preload&&(ab('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.qa(d,"error",function(){k.reject(ho(a))}),l=new Promise(function(v,w){(new Mc(w)).W(a.g.streaming.loadTimeout)}),E(u,Promise.race([k,
|
|
590
|
+
l]),2);if((m=a.T())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return Qo(a)},a.m.D(d,"timeupdate",n);m||(p=function(){return Ro(a)},a.m.D(d,"timeupdate",p),Ro(a));a.B&&(a.B.onManifestUpdated(m),m&&(q=a.Nb().end,a.m.D(d,"progress",function(){var v=a.Nb().end;q!=v&&(a.B.onManifestUpdated(a.T()),q=v)})));a.gb=!0;F(u)})}function Uo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Kg(b,a.g.preferredVariantRole)}
|
|
591
|
+
function Wo(a){var b=a.g.preferredTextLanguage;""!=b&&a.Jf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
592
|
+
function So(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.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,Xo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Yo(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).mc().W(.5);a.gd.push(function(){c.stop()})}}
|
|
593
|
+
function Ao(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())Xo(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function Xo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(co("metadata",b))}
|
|
594
|
+
function Ho(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).mc().W(.5);a.gd.push(function(){c.stop()})}}r.xi=function(){for(var a=this.V;a.g;)a.release()};r.uc=function(a){return new wh(a)};
|
|
595
|
+
function Xn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?rm(b(),!0,e):e()}b||(b=function(){return null});return new gg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(co("downloadheadersreceived",f));d(function(){if(a.ba){var h=a.ba;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
596
|
+
Rn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,q=l.split(";");for(l=1;l<q.length;l++){var u=q[l].split("=");p.set(u[0],Rn(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(co("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Bn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
597
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Bn(h,f,{ot:yn,su:!h.i})}}catch(N){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case rg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.T()?"l":"v"};n.ot=Fn(k);var p=n.ot===Cn||n.ot===wn||n.ot===xn||n.ot===Hn,q=k.stream;if(q){var u=h.h.ib();if(p&&(n.bl=Jn(h,q.type),n.ot!==Hn)){var v=Kn(h,q.type);n.dl=u?v/Math.abs(u):v}q.bandwidth&&(n.br=q.bandwidth/1E3);
|
|
598
|
+
if(q.segmentIndex&&m){var w=q.segmentIndex.Ab(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Mb(m.M(),A.M())){var z=A.M()[0],B=f.uris[0],y=new URL(z),D=new URL(B);if(y.origin!==D.origin)var C=z;else{for(var I=y.pathname.split("/").slice(1),J=D.pathname.split("/").slice(1,-1);I[0]===J[0];)I.shift(),J.shift();for(;J.length;)J.shift(),I.unshift("..");C=I.join("/")}n.nor=C}if((A.Ba||A.ja)&&(m.Ba!=A.Ba||m.ja!=A.ja)){var H=A.Ba+"-";A.ja&&(H+=A.ja);n.nrr=H}}}var K=h.h.ib()||1,G=Kn(h,q.type)||
|
|
599
|
+
500,M=q.bandwidth;var L=M?M*(m.endTime-m.startTime)/1E3/(G/K/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(L)||(n.rtp=L)}}p&&n.ot!==Hn&&(n.tb=Ln(h,n.ot)/1E3);Bn(h,f,n)}}catch(N){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:Bn(h,f,{ot:"k"});break;case 4:Bn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Nd=isNaN(f.Nd)?e:f.Nd+e)})}
|
|
600
|
+
function Jo(a,b){return new Ik(a.h,a.i,a.g.streaming,b,function(){a.hb&&Uk(a.hb,!0);a.j&&a.j.zd();a.L&&Zo(a)},function(c){return a.dispatchEvent(c)})}
|
|
601
|
+
function Ko(a,b){b=new Fm(a.dd,a.T()||0<b);b.addEventListener("enter",function(d){vo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){vo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(vo(a,"timelineregionenter",e),vo(a,"timelineregionexit",e))});var c=new Tk(a.h);c.g.add(b);a.pb&&c.g.add(a.pb);return c}
|
|
602
|
+
function Lo(a,b,c){a.L=new Nf;a.L.g=Pf;Qf(a.L,c,Math.min(.5,c/2));ko(a);a.de=(new Mc(function(){Zo(a)})).Ua(.25);a.m.D(b,"waiting",function(){return Zo(a)});a.m.D(b,"stalled",function(){return Zo(a)});a.m.D(b,"canplaythrough",function(){return Zo(a)});a.m.D(b,"progress",function(){return Zo(a)})}
|
|
603
|
+
function Zo(a){switch(a.l){case To:if(a.h.ended)var b=!0;else{var c=Hi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Go:a:if(a.h.ended||Sj(a.F))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Mb();var d=Hi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ji(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Of:Pf;c.g=d;(b=b!=d)&&d===Of&&(c.h=Date.now());b&&ko(a)}function zo(a,b,c,d){return new Jj(a,b,c,d)}
|
|
604
|
+
function Wn(a){return new sn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},rb:function(){return a.rb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},ib:function(){return a.ib()},Zb:function(){return a.Zb()},cc:function(){return a.cc()},T:function(){return a.T()}},a.g.cmcd)}
|
|
605
|
+
function Fo(a){return new sl(a.i,{Ud:function(){return a.C?a.C.Md():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},ib:function(){return a.ib()},Y:a.F,Db:a.G,onError:function(b){return io(a,b)},onEvent:function(b){return a.dispatchEvent(b)},oi:function(){a.J&&a.J.update&&a.J.update()},yf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.Eg();var g=Tj(a.F,f);!a.T()&&a.h.paused&&null!=g&&0<g&&a.C.Md()<g&&a.C.He(g)}Zo(a);d=(new Map).set("start",d).set("end",e).set("contentType",
|
|
606
|
+
f);a.dispatchEvent(co("segmentappended",d));a.o&&c.fastSwitching&&b.wd&&b.be&&a.o.trySuggestStreams()},ni:function(b,c){(c=c.uf)&&a.pb&&pl(a.pb,c,b)},fg:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Rg(Ab(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;Mh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
|
|
607
|
+
return d},ne:function(b,c,d){Ao(a,b,c,d)},Sd:function(b,c){return a.Sd(b,c)}})}
|
|
608
|
+
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(qb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(qb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
608
609
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&qb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){qb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
|
|
609
610
|
a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==
|
|
610
611
|
a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(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&&
|
|
611
|
-
(a.drm.retryParameters.baseDelay=100));var d=
|
|
612
|
-
function
|
|
613
|
-
a.Sf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Sf=b;a.j&&(b=a.j,(c=b.i.get(Nd))&&
|
|
614
|
-
Qf(a.
|
|
615
|
-
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.Nb().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.Bi=function(){for(var a in this.g)delete this.g[a];
|
|
612
|
+
(a.drm.retryParameters.baseDelay=100));var d=pm(this.g,a,Vn(this));$o(this);return d};
|
|
613
|
+
function $o(a){a.$d=new ki(a.g,a.ca,a.A);if(a.J){var b=Ee(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.A&&a.A.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=eo&&mi(a.$d,a.i)&&wo(a)}catch(f){io(a,f)}a.o&&xo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||yo(a)}a.G&&(a.G.Nf(a.g.streaming.forceHTTP),a.G.Of(a.g.streaming.forceHTTPS));if(a.F)if(a.F.configure(a.g.mediaSource),a.F.ca=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
614
|
+
a.Sf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Sf=b;a.j&&(b=a.j,(c=b.i.get(Nd))&&Fl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Po(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
615
|
+
Qf(a.L,b,Math.min(.5,b/2)));a.i&&Do(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.ba&&a.ba.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Vn(this);pm(a,this.g,Vn(this));return a};r.Jh=function(){var a=Vn(this);pm(a,this.g,Vn(this));return em(this.g,Vn(this))};
|
|
616
|
+
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.Nb().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.Bi=function(){for(var a in this.g)delete this.g[a];pm(this.g,Vn(this),Vn(this));$o(this)};r.Fh=function(){return this.l};r.ff=function(){return this.i?this.i.type:null};r.Ih=function(){return this.h};
|
|
616
617
|
r.Zb=function(){return this.G};r.yc=function(){return this.aa};r.pg=function(){return this.B?this.B:null};r.T=function(){return this.i?this.i.presentationTimeline.T():this.h&&this.h.src?Infinity==this.h.duration:!1};r.ec=function(){return this.i?this.i.presentationTimeline.ec():!1};r.$h=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};
|
|
617
618
|
r.Nb=function(){if(this.i){if(!this.gb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.$b(),end:a.sb()}}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.Xh=function(){this.T()&&(this.h.currentTime=this.Nb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.jd=function(){return this.A?this.A.jd():Infinity};
|
|
618
|
-
r.df=function(){return this.A?this.A.df():[]};r.Td=function(){return this.A?this.A.Td():{}};r.kf=function(){return this.
|
|
619
|
-
r.Cd=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.Ka.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==
|
|
620
|
-
r.$c=function(){var a=this.H.Xb();this.l==
|
|
619
|
+
r.df=function(){return this.A?this.A.df():[]};r.Td=function(){return this.A?this.A.Td():{}};r.kf=function(){return this.L?this.L.g==Pf:!1};r.ib=function(){return this.h?this.H?this.H.i:1:0};
|
|
620
|
+
r.Cd=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.Ka.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Go&&(this.o.playbackRateChanged(a),El(this.j,1<Math.abs(a))),this.T()&&this.Ka.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Nb(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.$c():Math.floor(c)<=Math.floor(d.start+e)&&b.$c()}))};
|
|
621
|
+
r.$c=function(){var a=this.H.Xb();this.l==To&&this.H.set(a);this.l==Go&&(this.H.set(a),this.o.playbackRateChanged(a),El(this.j,!1));this.Ka.nb()};
|
|
621
622
|
r.cc=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,mf(e)){var f=cf(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 lf(g)}):[]};
|
|
622
|
-
r.zc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=df(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?
|
|
623
|
-
r.vh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=
|
|
624
|
-
function
|
|
625
|
-
r.vg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y
|
|
626
|
-
u=g.A||q/p;v=g.startTime;A=w=0;1<p&&(z=Math.floor((b-g.startTime)/u),v=g.startTime+z*u,w=z%h.Ub*m,A=Math.floor(z/h.Ub)*n);
|
|
627
|
-
r.Lg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(
|
|
628
|
-
r.Kf=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&&ab("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&&mf(d)&&(
|
|
629
|
-
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,gf(c)==a.id){
|
|
623
|
+
r.zc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=df(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Vo(this).map(function(f){return jf(f)}):[]};r.Ch=function(){var a=this.td;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ef(b)})};
|
|
624
|
+
r.vh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Go&&b.l!=To)return g.return(null);c=b.td;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):E(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.wc(function(h){var k=ap(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Ub;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.vg(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
625
|
+
function ap(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Ub:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
626
|
+
r.vg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y;return O(function(D){if(1==D.g){if(c.l!=Go&&c.l!=To)return D.return(null);d=c.td;c.i&&(d=c.i.imageStreams);return(e=d.find(function(C){return C.id==a}))?e.segmentIndex?D.u(2):E(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=ap(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Ub;n=l/h.rows;p=h.Ub*h.rows;q=g.i-g.startTime;
|
|
627
|
+
u=g.A||q/p;v=g.startTime;A=w=0;1<p&&(z=Math.floor((b-g.startTime)/u),v=g.startTime+z*u,w=z%h.Ub*m,A=Math.floor(z/h.Ub)*n);B=!1;if(y=g.s)B=!0,n=y.height,w=y.positionX,A=y.positionY,m=y.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.M(),width:m,sprite:B})})};
|
|
628
|
+
r.Lg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Zk(this.s.h,b,!1),Hl(this.j,b),bp(this),this.Wa=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Vo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,gf(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";bp(this)}};
|
|
629
|
+
r.Kf=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&&ab("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&&mf(d)&&(Eo(this,d,!1,b,c),this.Ja=new Df(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),xo(this))}else if(this.h&&this.h.audioTracks)for(b=
|
|
630
|
+
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,gf(c)==a.id){cp(this,c);break}};r.xh=function(){return dp(this.cc())};r.Qh=function(){return dp(this.zc())};r.wh=function(){return Array.from(ep(this.cc()))};r.Ph=function(){return Array.from(ep(this.zc()))};
|
|
630
631
|
r.Kg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.Ja=new Ef(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.Ja.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,
|
|
631
|
-
b))c=f;c?(a=cf(c),this.Kf(a,!0,d)):
|
|
632
|
-
r.Hi=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.Ja=new Ef(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),
|
|
633
|
-
r.lf=function(){var a=this.da;return this.F&&this.l==
|
|
634
|
-
r.yh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=we(a),c=
|
|
635
|
-
function
|
|
636
|
-
r.Rg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==
|
|
632
|
+
b))c=f;c?(a=cf(c),this.Kf(a,!0,d)):yo(this)}else this.h&&this.h.audioTracks&&(d=of(this.cc(),a,b||"",!1)[0])&&this.Kf(d)};r.Jf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Wa=a,this.pd=b||"",this.md=c,(a=of(this.i.textStreams,this.Wa,this.pd,this.md)[0]||null)&&a!=this.j.s&&(Zk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.lf()))Hl(this.j,a),bp(this)}else(a=of(this.zc(),a,b||"",c)[0])&&this.Lg(a)};
|
|
633
|
+
r.Hi=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.Ja=new Ef(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),yo(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&&cp(this,b)}};
|
|
634
|
+
r.lf=function(){var a=this.da;return this.F&&this.l==Go?this.F.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Vo(this).some(function(b){return"showing"==b.mode}):a};r.rg=function(){return this.h&&this.h.src&&this.h.textTracks?fp(this).map(function(a){return jf(a)}):[]};
|
|
635
|
+
r.yh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=we(a),c=fp(this).filter(function(h){return we(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};
|
|
636
|
+
function Vo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Yo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function fp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
637
|
+
r.Rg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Go)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=of(this.i.textStreams,this.Wa,this.pd,this.md),0<a.length&&(Hl(this.j,a[0]),bp(this))):Dl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Vo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Oo(this)}};
|
|
637
638
|
r.Lh=function(){if(this.C)var a=this.C.Md();else{if(null==this.fa)return new Date;a=this.fa}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.ug=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
638
|
-
r.Wd=function(){return this.T()?this.i?this.i.presentationTimeline.Wd():null:null};r.rb=function(){if(this.l==
|
|
639
|
-
r.getStats=function(){if(this.l!=
|
|
640
|
-
this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.
|
|
641
|
-
NaN,b.o=c.video.width||NaN,b.l=d);this.T()&&(c=this.ug().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==
|
|
642
|
-
f=t(f.h.g);for(var
|
|
643
|
-
switchHistory:
|
|
644
|
-
r.gh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,u,v,w,A,z,
|
|
645
|
-
l&&
|
|
646
|
-
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Rd(d||"",e||"")])};z=Rd(A.mimeType,A.codecs);
|
|
647
|
-
r.hh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z;return O(function(
|
|
648
|
-
vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a);n=[];p={};q=t(m);for(u=q.next();!u.done;p={Wc:p.Wc,Rb:p.Rb},u=q.next())p.Rb=u.value,p.Wc=null,v=function(
|
|
649
|
-
n.push(w);z={id:c.Wf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new
|
|
650
|
-
"","")])};c.l==
|
|
651
|
-
r.fh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=
|
|
652
|
-
2,2012);}})};function
|
|
653
|
-
function
|
|
654
|
-
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function
|
|
655
|
-
function
|
|
639
|
+
r.Wd=function(){return this.T()?this.i?this.i.presentationTimeline.Wd():null:null};r.rb=function(){if(this.l==Go)return this.F.rb();var a={total:[],audio:[],video:[],text:[]};this.l==To&&(a.total=Ki(this.h.buffered));return a};
|
|
640
|
+
r.getStats=function(){if(this.l!=Go&&this.l!=To)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};Bo(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
|
|
641
|
+
this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.bg(),this.s.N=this.C.cg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==Go){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||
|
|
642
|
+
NaN,b.o=c.video.width||NaN,b.l=d);this.T()&&(c=this.ug().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==To&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.J;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,p=f.F,q=f.j,u=Wk(f.g,"playing"),v=Wk(f.g,"paused"),w=Wk(f.g,"buffering"),A=f.s,z=f.C,B=f.G,y=f.Nd,D=Xk(f.g),C=[];
|
|
643
|
+
f=t(f.h.g);for(var I=f.next();!I.done;I=f.next())I=I.value,C.push({timestamp:I.timestamp,id:I.id,type:I.type,fromAdaptation:I.fromAdaptation,bandwidth:I.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:z,maxSegmentDuration:B,bytesDownloaded:y,stateHistory:D,
|
|
644
|
+
switchHistory:C}};
|
|
645
|
+
r.gh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:if(h.l!=Go&&h.l!=To)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&ab("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){y.u(2);break}return E(y,gp(h,a),3);case 3:d=y.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=To){y.u(4);break}g&&(c="forced");return E(y,hp(h,a,b,c,d,f||"",k),5);case 5:l=we(b);m=h.zc();if(n=m.find(function(D){return we(D.language)==
|
|
646
|
+
l&&D.label==(f||"")&&D.kind==c}))return wo(h),y.return(n);throw new T(1,2,2012);case 4:p=Pd;q=h.h.duration;h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new T(1,4,4033);if(!k.length){y.u(6);break}return E(y,ip(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=y.h,v=jp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Mj(w),d="text/vtt";case 6:A={id:h.Wf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pk(0,q,[a]),mimeType:d||"",
|
|
647
|
+
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Rd(d||"",e||"")])};z=Rd(A.mimeType,A.codecs);B=je(z);if(!B)throw new T(2,2,2014,d);h.i.textStreams.push(A);wo(h);return y.return(df(A))}})};
|
|
648
|
+
r.hh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z;return O(function(B){switch(B.g){case 1:if(c.l!=Go&&c.l!=To)throw new T(1,7,7004);if(b){B.u(2);break}return E(B,gp(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Pd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return E(B,ip(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=B.h;g=le[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
649
|
+
vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a);n=[];p={};q=t(m);for(u=q.next();!u.done;p={Wc:p.Wc,Rb:p.Rb},u=q.next())p.Rb=u.value,p.Wc=null,v=function(y){return function(){null==y.Wc&&(y.Wc=Fd([a],[y.Rb.payload]));return y.Wc||[]}}(p),w=new Ci(p.Rb.startTime,p.Rb.endTime,v,0,null,null,0,0,Infinity),p.Rb.payload.includes("#xywh")&&(A=p.Rb.payload.split("#xywh=")[1].split(","),4===A.length&&w.Sg({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
650
|
+
n.push(w);z={id:c.Wf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Nk(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Fe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Rd(b||
|
|
651
|
+
"","")])};c.l==To?c.td.push(z):c.i.imageStreams.push(z);wo(c);return B.return(ef(z))}})};
|
|
652
|
+
r.fh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Go&&d.l!=To)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,gp(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),E(k,hp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.rg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return E(k,new Promise(function(l,m){d.m.qa(f,"load",l);d.m.qa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return wo(d),k.return(h);case 5:throw new T(1,
|
|
653
|
+
2,2012);}})};function gp(a,b){var c;return O(function(d){switch(d.g){case 1:return ua(d,2),E(d,Xm(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;xa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
654
|
+
function hp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?E(n,ip(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=jp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Mj(l),e="text/vtt");m=document.createElement("track");var p=a.N,q=b;try{if(p.g.enabled){var u=vn(p);u.ot=In;u.su=!0;var v=zn(u);var w=An(q,v)}else w=q}catch(A){bb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=q}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
655
|
+
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function ip(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=rg;f=lg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Bn(k,f,{ot:In,su:!0})}catch(l){bb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return E(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
656
|
+
function jp(a,b,c,d){var e=le[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null),rn(b,d);throw new T(2,2,2014,c);}r.Mi=function(a,b){this.ca.width=a;this.ca.height=b};r.Ff=function(a){if(this.l==Go){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.od||d.Ra||d.xb||(d.od=!1,Cl(b,d,a));b=!0}}else b=!1;return b};
|
|
656
657
|
r.ef=function(){ab("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.Gh=function(){return this.Xa};
|
|
657
|
-
function
|
|
658
|
-
function
|
|
658
|
+
function Vn(a){var b=lm();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Ff(d))}};b.textDisplayFactory=function(){if(a.ae){var c=a.getConfiguration();return new hn(a.h,a.ae,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new bn(a.h,"Shaka Player TextTrack"):new en};return b}r.Vg=function(a){this.ae=a};
|
|
659
|
+
function uo(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Qk,l=e.closedCaptions.get(g);h={id:a.Wf++,originalId:g,groupId:null,
|
|
659
660
|
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:Nd,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,fullMimeTypes:new Set([Rd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
660
|
-
function
|
|
661
|
-
function
|
|
662
|
-
function
|
|
663
|
-
function
|
|
661
|
+
function Mo(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(q){if(1==q.g)return k?E(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.Ab(l))?m.next().value:null;if(!n)return q.return(null);p=n.startTime;return q.return(p)})},E(h,e(c,b),2);if(3!=h.g)return f=h.h,E(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)})}
|
|
662
|
+
function ko(a){var b=a.kf();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Sk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Bo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(co("buffering",b))}function Co(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=co("ratechange"),a.dispatchEvent(b))}
|
|
663
|
+
function Bo(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Pf?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(co("statechanged",c)))}}
|
|
664
|
+
function Qo(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.qg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Cd(d):1==e&&b!==a.H.Xb()&&a.$c()}if(c&&(e=a.Nb(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
|
|
664
665
|
f=a.i.serviceDescription.targetLatency+a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.maxLatency&&(f=a.i.serviceDescription.maxLatency),g=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var h=a.g.streaming.liveSyncMinLatency;var k=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.g.streaming.liveSyncMinLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency-
|
|
665
|
-
a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==
|
|
666
|
-
d>f?b!=g&&a.Cd(g):h&&k&&c-d<h?b!=k&&a.Cd(k):b!==a.H.Xb()&&a.$c()}}function
|
|
667
|
-
function
|
|
668
|
-
function
|
|
669
|
-
function
|
|
670
|
-
function
|
|
671
|
-
function
|
|
672
|
-
r.Sd=function(a,b){if(!this.g.abr.enabled||this.l===
|
|
673
|
-
function
|
|
674
|
-
function
|
|
675
|
-
function
|
|
676
|
-
function
|
|
666
|
+
a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==To){var l=a.h.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.g.streaming.liveSyncPanicMode;l=1E3*a.g.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.Cd(k):f&&g&&c-
|
|
667
|
+
d>f?b!=g&&a.Cd(g):h&&k&&c-d<h?b!=k&&a.Cd(k):b!==a.H.Xb()&&a.$c()}}function Ro(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.S)?(a.S=c,b=!0):(c=Math.max(a.S,c),a.S!=c&&(a.S=c,b=!0)));if(b){var d;0==a.S?d=co("started"):25==a.S?d=co("firstquartile"):50==a.S?d=co("midpoint"):75==a.S?d=co("thirdquartile"):100==a.S&&(d=co("complete"));d&&a.dispatchEvent(d)}}}
|
|
668
|
+
function xo(a){try{oi(a.$d,a.i)}catch(c){return io(a,c),!1}var b=nf(a.i.variants);b=a.Ja.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Io(a,b){b=void 0===b?!1:b;return xo(a)?a.o.chooseVariant(b):null}
|
|
669
|
+
function $n(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,fb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.je.stop();d&&yo(a,!0,void 0,!1,!1)}
|
|
670
|
+
function yo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=Io(a);f&&Eo(a,f,e,b,c,d)}function Eo(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Gl(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Gl(a.j,b,d,e,f,c);d=null;g&&(d=cf(g));b=cf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Cj(a.K,b,a.ff()),c=co("adaptation",c),kp(a,c)):lp(a,d,b)}}
|
|
671
|
+
function cp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=lf(c),b=lf(b),lp(a,c,b))}function No(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=we(a.g.preferredTextLanguage);c=we(c.language);if(2==a.g.autoShowText)return ve(c,d);if(3==a.g.autoShowText)return a=we(b.language),ve(c,d)&&!ve(a,c);ab("Invalid autoShowText setting!");return!1}function wo(a){var b=co("trackschanged");kp(a,b)}
|
|
672
|
+
function lp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Cj(a.K,c,a.ff());c=co("variantchanged",b);kp(a,c)}function bp(a){var b=co("textchanged");kp(a,b)}function Oo(a){var b=co("texttrackvisibility");kp(a,b)}function Po(a){a.g.abr.enabled||Zn(a);var b=(new Map).set("newStatus",a.g.abr.enabled);kp(a,co("abrstatuschanged",b))}function Zn(a,b){b=void 0===b?!0:b;if(a.l==Go){a.je.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&xo(a)}}
|
|
673
|
+
r.Sd=function(a,b){if(!this.g.abr.enabled||this.l===eo||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.je.Ua(1);b=this.rb().video.reduce(function(f,g){return f+g.end-g.start},0);yo(this,!0,b,!0,!1);return!0}return!1};
|
|
674
|
+
function io(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==eo)return f.return();c=!0;if(!(a.gb&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ua(f,3);return E(f,$l(a.j),5);case 5:d=f.h;c=!d;xa(f,2);break;case 3:ya(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&Zn(a,!1);e=co("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);F(f)}})}
|
|
675
|
+
function vo(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(co(b,a))}function ho(a){if(!a.h.error)return null;var b=a.h.error.code;if(1==b)return null;var c=a.h.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new T(2,3,3016,b,c,a.h.error.message)}
|
|
676
|
+
function Do(a,b,c){0<b&&(a.T()||a.Ug(b));b=a.getDuration();c<b&&(a.T()||a.Ta(c))}function kp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=eo&&a.dispatchEvent(b);F(c)})}function ep(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(we(c.language)):b.add("und");return b}
|
|
677
|
+
function dp(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=we(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));
|
|
677
678
|
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Vg;X.prototype.getManifestParserFactory=X.prototype.Gh;X.prototype.getManifest=X.prototype.ef;X.prototype.retryStreaming=X.prototype.Ff;X.prototype.setMaxHardwareResolution=X.prototype.Mi;X.prototype.addChaptersTrack=X.prototype.fh;X.prototype.addThumbnailsTrack=X.prototype.hh;X.prototype.addTextTrackAsync=X.prototype.gh;X.prototype.getStats=X.prototype.getStats;
|
|
678
679
|
X.prototype.getBufferedInfo=X.prototype.rb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Wd;X.prototype.getPresentationStartTimeAsDate=X.prototype.ug;X.prototype.getPlayheadTimeAsDate=X.prototype.Lh;X.prototype.setTextTrackVisibility=X.prototype.Rg;X.prototype.getChapters=X.prototype.yh;X.prototype.getChaptersTracks=X.prototype.rg;X.prototype.isTextTrackVisible=X.prototype.lf;X.prototype.selectVariantsByLabel=X.prototype.Hi;X.prototype.selectTextLanguage=X.prototype.Jf;
|
|
679
680
|
X.prototype.selectAudioLanguage=X.prototype.Kg;X.prototype.getTextLanguages=X.prototype.Ph;X.prototype.getAudioLanguages=X.prototype.wh;X.prototype.getTextLanguagesAndRoles=X.prototype.Qh;X.prototype.getAudioLanguagesAndRoles=X.prototype.xh;X.prototype.selectVariantTrack=X.prototype.Kf;X.prototype.selectTextTrack=X.prototype.Lg;X.prototype.getThumbnails=X.prototype.vg;X.prototype.getAllThumbnails=X.prototype.vh;X.prototype.getImageTracks=X.prototype.Ch;X.prototype.getTextTracks=X.prototype.zc;
|
|
@@ -681,708 +682,707 @@ X.prototype.getVariantTracks=X.prototype.cc;X.prototype.cancelTrickPlay=X.protot
|
|
|
681
682
|
X.prototype.isAudioOnly=X.prototype.$h;X.prototype.isInProgress=X.prototype.ec;X.prototype.isLive=X.prototype.T;X.prototype.getAdManager=X.prototype.pg;X.prototype.getAssetUri=X.prototype.yc;X.prototype.getNetworkingEngine=X.prototype.Zb;X.prototype.getMediaElement=X.prototype.Ih;X.prototype.getManifestType=X.prototype.ff;X.prototype.getLoadMode=X.prototype.Fh;X.prototype.resetConfiguration=X.prototype.Bi;X.prototype.getBufferFullness=X.prototype.qg;X.prototype.getNonDefaultConfiguration=X.prototype.Jh;
|
|
682
683
|
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.xi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.lg;X.prototype.unloadAndSavePreload=X.prototype.Pi;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Ti;X.prototype.unload=X.prototype.nc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.lh;X.prototype.attach=X.prototype.tc;
|
|
683
684
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return E(k,di(),3);case 3:b=k.h;case 2:var l={};if(Nc())for(var m in si)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Nc()?!!si[n]:Pc(n);c=l;m='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.02.01.01",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(x(Sd));
|
|
684
|
-
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=je(n)?!0:Nc()?mb(n)||(lc(n)?!0:!1):Pc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,kd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=
|
|
685
|
-
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=fd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Pc("application/x-mpegurl")};X.setAdManagerFactory=function(a){
|
|
686
|
-
X.registerSupportPlugin=function(a,b){
|
|
685
|
+
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=je(n)?!0:Nc()?mb(n)||(lc(n)?!0:!1):Pc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,kd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=mp;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
686
|
+
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=fd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Pc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Yn=a};
|
|
687
|
+
X.registerSupportPlugin=function(a,b){mp[a]=b};X.prototype.destroy=X.prototype.destroy;var eo=0,Un=1,Go=2,To=3;X.LoadMode={DESTROYED:eo,NOT_LOADED:Un,MEDIA_SOURCE:Go,SRC_EQUALS:To};X.version="v4.9.8";var np=["4","9"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(np[0]),Number(np[1])));var mp={},Yn=null;function op(){this.h=[];this.j=this.i=this.g=0};function pp(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 hb;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=pp.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};
|
|
687
688
|
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)};
|
|
688
689
|
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)};
|
|
689
690
|
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()};
|
|
690
|
-
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};S("shaka.ads.ClientSideAd",
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){
|
|
695
|
-
|
|
696
|
-
function
|
|
697
|
-
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
|
|
698
|
-
a.i.offsetHeight,
|
|
699
|
-
function
|
|
700
|
-
function
|
|
701
|
-
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
691
|
+
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};S("shaka.ads.ClientSideAd",pp);pp.prototype.release=pp.prototype.release;
|
|
692
|
+
pp.prototype.getPodIndex=pp.prototype.getPodIndex;pp.prototype.getTimeOffset=pp.prototype.getTimeOffset;pp.prototype.getMediaUrl=pp.prototype.getMediaUrl;pp.prototype.getAdvertiserName=pp.prototype.getAdvertiserName;pp.prototype.getCreativeAdId=pp.prototype.getCreativeAdId;pp.prototype.getAdId=pp.prototype.getAdId;pp.prototype.getVastMediaWidth=pp.prototype.getVastMediaWidth;pp.prototype.getVastMediaHeight=pp.prototype.getVastMediaHeight;pp.prototype.getVastMediaBitrate=pp.prototype.getVastMediaBitrate;
|
|
693
|
+
pp.prototype.getDescription=pp.prototype.getDescription;pp.prototype.getTitle=pp.prototype.getTitle;pp.prototype.getPositionInSequence=pp.prototype.getPositionInSequence;pp.prototype.getSequenceLength=pp.prototype.getSequenceLength;pp.prototype.setMuted=pp.prototype.setMuted;pp.prototype.resize=pp.prototype.resize;pp.prototype.isLinear=pp.prototype.isLinear;pp.prototype.isMuted=pp.prototype.isMuted;pp.prototype.setVolume=pp.prototype.setVolume;pp.prototype.getVolume=pp.prototype.getVolume;
|
|
694
|
+
pp.prototype.play=pp.prototype.play;pp.prototype.pause=pp.prototype.pause;pp.prototype.skip=pp.prototype.skip;pp.prototype.canSkipNow=pp.prototype.canSkipNow;pp.prototype.getTimeUntilSkippable=pp.prototype.getTimeUntilSkippable;pp.prototype.isSkippable=pp.prototype.isSkippable;pp.prototype.isPaused=pp.prototype.isPaused;pp.prototype.getRemainingTime=pp.prototype.getRemainingTime;pp.prototype.getMinSuggestedDuration=pp.prototype.getMinSuggestedDuration;pp.prototype.getDuration=pp.prototype.getDuration;function qp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.8");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
695
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){rp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){sp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.qa(this.i,"play",function(){f.F=!0})}qp.prototype.configure=function(a){this.s=a};qp.prototype.stop=function(){this.g&&this.g.stop();this.o&&gn(this.o)};
|
|
696
|
+
qp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function sp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));tp(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
697
|
+
function rp(a,b){a.m(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);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.B);a.m(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
698
|
+
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}up(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,vp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,vp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
699
|
+
a.i.offsetHeight,vp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,vp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.qa(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){tp(a,null)}}
|
|
700
|
+
function vp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
701
|
+
function up(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new U(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){sp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){wp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){wp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
702
|
+
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){tp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){tp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
702
703
|
a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
703
704
|
a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
|
|
704
705
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
705
|
-
function
|
|
706
|
-
function
|
|
706
|
+
function wp(a,b){var c=b.getAd();c?(a.j=new pp(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new U("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):ab("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
707
|
+
function tp(a,b){a.m(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function xp(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.m=d;this.l=!1}r=xp.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h.skipOffset?!0:!1};
|
|
707
708
|
r.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var a=this.getRemainingTime()-this.h.skipOffset;return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.l=!0;this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};
|
|
708
709
|
r.isLinear=function(){return this.m};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.j?this.j:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};
|
|
709
|
-
r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
function
|
|
710
|
+
r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",xp);xp.prototype.release=xp.prototype.release;xp.prototype.getPodIndex=xp.prototype.getPodIndex;xp.prototype.getTimeOffset=xp.prototype.getTimeOffset;xp.prototype.getMediaUrl=xp.prototype.getMediaUrl;xp.prototype.getAdvertiserName=xp.prototype.getAdvertiserName;
|
|
711
|
+
xp.prototype.getCreativeAdId=xp.prototype.getCreativeAdId;xp.prototype.getAdId=xp.prototype.getAdId;xp.prototype.getVastMediaWidth=xp.prototype.getVastMediaWidth;xp.prototype.getVastMediaHeight=xp.prototype.getVastMediaHeight;xp.prototype.getVastMediaBitrate=xp.prototype.getVastMediaBitrate;xp.prototype.getDescription=xp.prototype.getDescription;xp.prototype.getTitle=xp.prototype.getTitle;xp.prototype.getPositionInSequence=xp.prototype.getPositionInSequence;xp.prototype.getSequenceLength=xp.prototype.getSequenceLength;
|
|
712
|
+
xp.prototype.setMuted=xp.prototype.setMuted;xp.prototype.resize=xp.prototype.resize;xp.prototype.isLinear=xp.prototype.isLinear;xp.prototype.isMuted=xp.prototype.isMuted;xp.prototype.setVolume=xp.prototype.setVolume;xp.prototype.getVolume=xp.prototype.getVolume;xp.prototype.play=xp.prototype.play;xp.prototype.pause=xp.prototype.pause;xp.prototype.skip=xp.prototype.skip;xp.prototype.canSkipNow=xp.prototype.canSkipNow;xp.prototype.getTimeUntilSkippable=xp.prototype.getTimeUntilSkippable;
|
|
713
|
+
xp.prototype.isSkippable=xp.prototype.isSkippable;xp.prototype.isPaused=xp.prototype.isPaused;xp.prototype.getRemainingTime=xp.prototype.getRemainingTime;xp.prototype.getMinSuggestedDuration=xp.prototype.getMinSuggestedDuration;xp.prototype.getDuration=xp.prototype.getDuration;function yp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.V=NaN;this.i=d;this.J=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.S=!0;this.H="";this.o=new hb}yp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Hb(b.target,b.type,b.listener);zp(this);this.m=[];this.s=[];this.G="";this.S=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
714
|
+
yp.prototype.release=function(){this.stop();this.o&&this.o.release()};yp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(Ap(this,this.G,this.S),this.S=!1)};yp.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
715
|
+
function Bp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=lg([b],Sf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=td(e)),f=a.K.request(7,d),ua(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=md(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.V,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),q=new rc(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
715
716
|
return xa(u,0)}ya(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;F(u)})}
|
|
716
|
-
function
|
|
717
|
-
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),
|
|
718
|
-
function
|
|
719
|
-
function
|
|
720
|
-
function
|
|
721
|
-
function
|
|
722
|
-
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&
|
|
723
|
-
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(
|
|
724
|
-
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.
|
|
725
|
-
function
|
|
726
|
-
function
|
|
717
|
+
function Ap(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A;O(function(z){if(1==z.g)return d=lg([b],Sf()),e=a.K.request(7,d),ua(z,2),E(z,e.promise,4);if(2!=z.g){f=z.h;g=[];h=md(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),q=p.next();!q.done;q=p.next())for(u=q.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,Cp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
|
|
718
|
+
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),zp(a),a.j=[];c&&(a.J||0<g.length)&&Dp(a);return xa(z,0)}ya(z);F(z)})}
|
|
719
|
+
function Cp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Ep(b);if(d=a.F.get(c))return m.return();e=lg([b.staticResource],Sf());f=a.K.request(7,e);ua(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=md(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),xa(m,0);ya(m);a.F.delete(c);F(m)})}
|
|
720
|
+
function Ep(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Dp(a){Fp(a);a.J||(Gp(a),a.o.D(a.h,"seeked",function(){Gp(a)}),a.o.D(a.h,"ended",function(){zp(a)}));a.o.D(a.h,"timeupdate",function(){Fp(a)})}
|
|
721
|
+
function Gp(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
722
|
+
function Fp(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),Hp(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),Hp(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),Hp(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
723
|
+
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Hp(a,"skipStateChanged");0<e&&(0>=d||d>e)&&zp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}zp(a);a.L=e;a.g=new xp(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&Hp(a,"breakStart");Ip(a);break}}}if(!a.g)for(d=
|
|
724
|
+
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(Ep(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){zp(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
|
|
725
|
+
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new xp(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&Hp(a,"breakStart");Ip(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
726
|
+
function zp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.N.push(a.C.adId);var b=a.g.l;(void 0===b?0:b)?Hp(a,"skip"):Hp(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Hb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Hp(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
|
|
727
|
+
function Ip(a){var b=!1;a.h.paused?b=!0:(Hp(a,"impression"),Hp(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Hp(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Hp(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Hp(a,"impression"),Hp(a,"start"),b=!1):Hp(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Hp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
|
|
727
728
|
d.type,d.listener)}
|
|
728
|
-
function
|
|
729
|
+
function Hp(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=lg([d],Sf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
|
|
729
730
|
case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
|
|
730
|
-
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function
|
|
731
|
+
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function Jp(a,b){this.g=a;this.i=null;this.h=b}r=Jp.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
731
732
|
r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.h.muted=a};
|
|
732
733
|
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 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};r.getAdId=function(){return this.g.getAdId()};
|
|
733
|
-
r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};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.i=this.g=null};S("shaka.ads.ServerSideAd",
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new
|
|
734
|
+
r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};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.i=this.g=null};S("shaka.ads.ServerSideAd",Jp);Jp.prototype.release=Jp.prototype.release;Jp.prototype.getPodIndex=Jp.prototype.getPodIndex;
|
|
735
|
+
Jp.prototype.getTimeOffset=Jp.prototype.getTimeOffset;Jp.prototype.getMediaUrl=Jp.prototype.getMediaUrl;Jp.prototype.getAdvertiserName=Jp.prototype.getAdvertiserName;Jp.prototype.getCreativeAdId=Jp.prototype.getCreativeAdId;Jp.prototype.getAdId=Jp.prototype.getAdId;Jp.prototype.getVastMediaWidth=Jp.prototype.getVastMediaWidth;Jp.prototype.getVastMediaHeight=Jp.prototype.getVastMediaHeight;Jp.prototype.getVastMediaBitrate=Jp.prototype.getVastMediaBitrate;Jp.prototype.getDescription=Jp.prototype.getDescription;
|
|
736
|
+
Jp.prototype.getTitle=Jp.prototype.getTitle;Jp.prototype.getPositionInSequence=Jp.prototype.getPositionInSequence;Jp.prototype.getSequenceLength=Jp.prototype.getSequenceLength;Jp.prototype.setMuted=Jp.prototype.setMuted;Jp.prototype.resize=Jp.prototype.resize;Jp.prototype.isLinear=Jp.prototype.isLinear;Jp.prototype.isMuted=Jp.prototype.isMuted;Jp.prototype.setVolume=Jp.prototype.setVolume;Jp.prototype.getVolume=Jp.prototype.getVolume;Jp.prototype.play=Jp.prototype.play;Jp.prototype.pause=Jp.prototype.pause;
|
|
737
|
+
Jp.prototype.skip=Jp.prototype.skip;Jp.prototype.canSkipNow=Jp.prototype.canSkipNow;Jp.prototype.getTimeUntilSkippable=Jp.prototype.getTimeUntilSkippable;Jp.prototype.isSkippable=Jp.prototype.isSkippable;Jp.prototype.isPaused=Jp.prototype.isPaused;Jp.prototype.getRemainingTime=Jp.prototype.getRemainingTime;Jp.prototype.getMinSuggestedDuration=Jp.prototype.getMinSuggestedDuration;Jp.prototype.getDuration=Jp.prototype.getDuration;function Kp(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new hb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Lp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
738
|
+
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Jp(f,e.l);e.A&&(e.m.i=e.A);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
738
739
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
|
|
739
740
|
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
|
|
740
|
-
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=
|
|
741
|
-
function
|
|
742
|
-
r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);dg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new
|
|
743
|
-
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new
|
|
744
|
-
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new
|
|
745
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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.9.
|
|
746
|
-
(c.G=!0),c.j=new Uf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('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.9.
|
|
741
|
+
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=Kp.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
|
|
742
|
+
function Lp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){dg.call(this);this.g=this.h=this.i=null;this.j=new op;this.m=navigator.language;this.l=null}oa(Y,dg);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new qp(a,b,this.m,c,function(e){return Mp(d,e)});this.i.configure(this.l)};
|
|
743
|
+
r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);dg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new op};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
|
|
744
|
+
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new yp(a,b,c,function(e){return Mp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Uf,Bp(d,a,b),d.H=c||"",d.V=Date.now()/1E3,a=d.l);return a};
|
|
745
|
+
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Kp(a,b,this.m,function(d){return Mp(c,d)});this.g.configure(this.l)};
|
|
746
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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.9.8";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
747
|
+
(c.G=!0),c.j=new Uf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('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.9.8";this.g.g.replaceAdTagParameters(a)};
|
|
747
748
|
r.getServerSideCuePoints=function(){qb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.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.h)this.h.onManifestUpdated(a)};
|
|
748
749
|
r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};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)};
|
|
749
|
-
function
|
|
750
|
+
function Mp(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)}S("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;
|
|
750
751
|
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
|
|
751
752
|
Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";
|
|
752
753
|
Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";
|
|
753
|
-
Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";
|
|
754
|
+
Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Yn=function(){return new Y};function Np(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
|
|
754
755
|
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Ki(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
755
|
-
function
|
|
756
|
-
function
|
|
757
|
-
var
|
|
758
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},
|
|
759
|
-
|
|
760
|
-
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;
|
|
761
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.mc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(
|
|
762
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Uf,this.s=!0,
|
|
763
|
-
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!
|
|
764
|
-
r.get=function(a,b){var c=this;if("video"==a){if(
|
|
765
|
-
r.set=function(a,b,c){this.g[a][b]=c;
|
|
766
|
-
r.Ig=function(a,b){
|
|
767
|
-
function
|
|
768
|
-
function
|
|
769
|
-
r.destroy=function(a){a&&this.g.xc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;dg.prototype.release.call(this);return Promise.all(a)};r.Vh=function(){return this.l};r.Kh=function(){return this.s};r.mh=function(){return this.g.m&&
|
|
770
|
-
r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.nc(),0):b.return()})};r.Lf=function(a){this.g.Lf(a)};r.Oi=function(){
|
|
771
|
-
r.nh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.xc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new
|
|
772
|
-
function
|
|
773
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
774
|
-
function
|
|
775
|
-
function
|
|
776
|
-
function
|
|
777
|
-
function
|
|
778
|
-
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(
|
|
779
|
-
function
|
|
780
|
-
function
|
|
781
|
-
if("setVideoContainer"==b)return function(c){return a.h.Vg(c)};if(a.g.$a()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return a.g.$a()&&0==Object.keys(a.g.g.video).length&&(
|
|
782
|
-
function
|
|
783
|
-
|
|
756
|
+
function Op(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Pp(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
757
|
+
function Pp(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
758
|
+
var Qp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Rp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Sp=["loop","playbackRate"],Tp=["pause","play"],Up={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
759
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Vp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Wp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Xp=[["getConfiguration","configure"]],Yp=[["isTextTrackVisible","setTextTrackVisibility"]],Zp="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
760
|
+
$p=["attach","attachCanvas","detach","load","unload"];function aq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Mc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.J="";this.o=null;this.B=function(){return bq(h)};this.C=function(k,l){k=Op(l);switch(k.type){case "event":var m=k.targetName,n=bg(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
|
|
761
|
+
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;cq.add(this)}r=aq.prototype;r.destroy=function(){cq.delete(this);dq(this);eq&&fq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.$a=function(){return this.h};r.Df=function(){return this.J};
|
|
762
|
+
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.mc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(cq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Uf;d.s=!0;gq(d,e)}},function(b){for(var c=t(cq),d=c.next();!d.done;d=c.next())d=d.value,hq="available"==b,d.l.mc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});hq&&this.l.W(iq);(a=eq)&&
|
|
763
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Uf,this.s=!0,gq(this,a)):eq=null}else window.__onGCastApiAvailable!==jq&&(kq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=jq)};r.Lf=function(a){this.o=a;this.h&&lq(this,{type:"appData",appData:this.o})};
|
|
764
|
+
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!hq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Uf;chrome.cast.requestSession(function(c){return gq(a,c)},function(c){return mq(a,c)});return E(b,a.j,0)})};function nq(a){a.h&&chrome.cast.requestSession(function(b){return gq(a,b)},function(b){return mq(a,b)})}r.xc=function(){if(this.h){dq(this);if(eq){fq(this);try{eq.stop(function(){},function(){})}catch(a){}eq=null}bq(this)}};
|
|
765
|
+
r.get=function(a,b){var c=this;if("video"==a){if(Tp.includes(b))return function(){return c.Ig.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))}}else if("player"==a){if(Wp[b]&&!this.get("player","isLive")())return function(){};if(Zp.includes(b))return function(){return c.Ig.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))};if($p.includes(b))return function(){return c.yi.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))};if(Up[b]||Vp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
766
|
+
r.set=function(a,b,c){this.g[a][b]=c;lq(this,{type:"set",targetName:a,property:b,value:c})};function gq(a,b){var c=a.N();eq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);bq(a);lq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function mq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
|
|
767
|
+
r.Ig=function(a,b){lq(this,{type:"call",targetName:a,methodName:b,args:Ka.apply(2,arguments)})};r.yi=function(a,b){var c=Ka.apply(2,arguments),d=new Uf,e=this.H.toString();this.H++;this.i[e]=d;try{lq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function fq(a){var b=eq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
768
|
+
function bq(a){var b=eq?"connected"==eq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};dq(a)}a.h=b;a.J=b?eq.receiver.friendlyName:"";a.l.mc()}function dq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function lq(a,b){b=Np(b);var c=eq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.xc(),b;}}var iq=.02,hq=!1,eq=null,kq=null,cq=new Set;
|
|
769
|
+
function jq(a){kq?window.__onGCastApiAvailable=kq:delete window.__onGCastApiAvailable;kq=null;if(a)for(var b=t(cq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function oq(a,b,c,d){d=void 0===d?!1:d;dg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new aq(c,function(){return pq(e)},function(){return qq(e)},function(f,g){return rq(e,f,g)},function(){return sq(e)},function(){return tq(e)},d);uq(this)}oa(oq,dg);r=oq.prototype;
|
|
770
|
+
r.destroy=function(a){a&&this.g.xc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;dg.prototype.release.call(this);return Promise.all(a)};r.Vh=function(){return this.l};r.Kh=function(){return this.s};r.mh=function(){return this.g.m&&hq};r.$a=function(){return this.g.$a()};r.Df=function(){return this.g.Df()};
|
|
771
|
+
r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.nc(),0):b.return()})};r.Lf=function(a){this.g.Lf(a)};r.Oi=function(){nq(this.g)};r.xc=function(){this.g.xc()};
|
|
772
|
+
r.nh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.xc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new aq(a,function(){return pq(c)},function(){return qq(c)},function(e,f){return rq(c,e,f)},function(){return sq(c)},function(){return tq(c)},b);c.g.init();F(d)})};
|
|
773
|
+
function uq(a){a.g.init();a.m=new hb;for(var b=t(Qp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.$a()||(f=bg(f),a.j.dispatchEvent(f))});for(var d in cg)a.m.D(a.h,cg[d],function(f){a.g.$a()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Pc=e,Object.defineProperty(a.l,b.Pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return vq(a,f.Pc)}}(b),set:function(f){return function(g){var h=f.Pc;a.g.$a()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Pc:b.Pc};a.s={};wq(a,
|
|
774
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return xq(a,f)}})});yq(a);a.j=new dg;a.j.le=a.l;a.o=new dg;a.o.le=a.s}function yq(a){var b=new Map;wq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
775
|
+
function wq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
776
|
+
function tq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.yc(),startTime:null};a.i.pause();for(var c=t(Sp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(Xp);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Yp);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function pq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
|
|
777
|
+
function qq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
778
|
+
function sq(a){for(var b=t(Xp),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(Sp);for(d=c.next();!d.done;d=c.next())d=
|
|
779
|
+
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Sp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Yp);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.Rg(h);g&&a.h.Jf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new U("error",l);a.h.dispatchEvent(l)})}
|
|
780
|
+
function vq(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.$a()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.$a()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
781
|
+
function xq(a,b){a.A.has(b)&&(b=a.A.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.Zb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.pg()};
|
|
782
|
+
if("setVideoContainer"==b)return function(c){return a.h.Vg(c)};if(a.g.$a()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return a.g.$a()&&0==Object.keys(a.g.g.video).length&&(Up[b]||Vp[b])||!a.g.$a()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
783
|
+
function rq(a,b,c){a.g.$a()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",oq);oq.prototype.changeReceiverId=oq.prototype.nh;oq.prototype.forceDisconnect=oq.prototype.xc;oq.prototype.suggestDisconnect=oq.prototype.Oi;oq.prototype.setAppData=oq.prototype.Lf;oq.prototype.cast=oq.prototype.cast;oq.prototype.receiverName=oq.prototype.Df;oq.prototype.isCasting=oq.prototype.$a;oq.prototype.canCast=oq.prototype.mh;oq.prototype.getPlayer=oq.prototype.Kh;
|
|
784
|
+
oq.prototype.getVideo=oq.prototype.Vh;oq.prototype.destroy=oq.prototype.destroy;function zq(a,b,c,d){dg.call(this);var e=this;this.g=a;this.h=b;this.j=new hb;this.H={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Mc(function(){Aq(e)});Bq(this)}oa(zq,dg);r=zq.prototype;r.isConnected=function(){return this.F};r.ai=function(){return this.o};r.Ki=function(a){this.i=a};r.rh=function(){this.i=null};
|
|
784
785
|
r.Li=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Ji=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Ii=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
785
786
|
r.destroy=function(){var a=this,b,c;return O(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,dg.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
786
|
-
function
|
|
787
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
788
|
-
a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,
|
|
789
|
-
function
|
|
790
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
791
|
-
function
|
|
792
|
-
1);
|
|
793
|
-
function
|
|
794
|
-
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return
|
|
795
|
-
function
|
|
796
|
-
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||
|
|
797
|
-
function
|
|
798
|
-
S("shaka.cast.CastReceiver",
|
|
799
|
-
q||-1===u)p=
|
|
800
|
-
function
|
|
801
|
-
function
|
|
802
|
-
var
|
|
803
|
-
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),
|
|
804
|
-
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]])
|
|
805
|
-
var
|
|
806
|
-
function
|
|
807
|
-
50;e.regionAnchorY=50;break;case
|
|
808
|
-
function
|
|
809
|
-
b=null;c=t(
|
|
810
|
-
b.skip(1),d=
|
|
811
|
-
function
|
|
812
|
-
var
|
|
813
|
-
function
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
function
|
|
817
|
-
"white";e=!1;7>f?d=
|
|
818
|
-
|
|
819
|
-
e-1,e,b.h),
|
|
820
|
-
function
|
|
821
|
-
0,v=1;16>v;v++,u++)p.i[u]=p.i[v];for(v=0;1>v;v++,u++)p.i[u]=
|
|
822
|
-
"\u266a"):
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
b).box("dvh1",b).box("dvhe",b).box("encv",Og).box("sinf",Jg).box("frma",function(f){f=
|
|
826
|
-
|
|
827
|
-
new T(2,2,2010);
|
|
828
|
-
function
|
|
829
|
-
c+(n[l].Hf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",
|
|
830
|
-
S("shaka.cea.TsCeaParser",
|
|
831
|
-
l.Ic});f.length&&(a=
|
|
832
|
-
function
|
|
833
|
-
function
|
|
834
|
-
function
|
|
835
|
-
function
|
|
836
|
-
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Sg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Id(h,b,g.init||a||k||l);if(h=
|
|
837
|
-
function
|
|
838
|
-
function
|
|
787
|
+
function Bq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Cq(a)};b.onSenderDisconnected=function(){return Cq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Dq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Dq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Eq(a,
|
|
788
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Fq(a,e)};b.start();b=t(Qp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Gq(a,"video",e)});for(var d in cg)a.j.D(a.h,cg[d],function(e){return Gq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;Hq(a)});a.j.D(a.g,"playing",function(){a.o=!1;Hq(a)});a.j.D(a.g,"pause",function(){Hq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Hq(a)});
|
|
789
|
+
a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,Hq(a))})).W(Iq)})}function Cq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Hq(a)}function Hq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);Jq(a)||Kq(a);F(c)})}
|
|
790
|
+
function Lq(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(q){switch(q.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ua(q,5),E(q,a.h.load(b.manifest,b.startTime),7)):E(q,Promise.resolve(),3);case 7:xa(q,3);break;case 5:return g=ya(q),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),q.return();case 3:if(!a.h)return q.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
791
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),Kq(a));F(q)}})}function Gq(a,b,c){a.h&&(Aq(a),Dq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
792
|
+
function Aq(a){a.G.W(Mq);for(var b={video:{},player:{}},c=t(Rp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in Wp)0==a.m%Wp[e]&&(b.player[e]=a.h[e]());for(var f in Up)0==a.m%Up[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Dq(a,{type:"update",update:b},a.l);for(var g in Vp)0==a.m%Vp[g]&&(b={player:{}},b.player[g]=a.h[g](),Dq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
793
|
+
1);Jq(a)}function Jq(a){return a.A&&(a.g.duration||a.h.T())?(Nq(a),a.A=!1,!0):!1}function Nq(a,b){var c={contentId:a.h.yc(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Kq(a,void 0===b?0:b,c)}
|
|
794
|
+
function Fq(a,b){var c=Op(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Lq(a,c.initState,c.appData);Aq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
795
|
+
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Oq(a,g,f,null)},function(h){return Oq(a,g,f,h)})}}
|
|
796
|
+
function Eq(a,b){var c=Op(b.data);switch(c.type){case "PLAY":a.g.play();Kq(a);break;case "PAUSE":a.g.pause();Kq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Kq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Kq(a));break;case "STOP":a.h.nc().then(function(){a.h&&Kq(a)});break;case "GET_STATUS":Nq(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
797
|
+
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Kq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Nq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Dq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Dq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
798
|
+
function Oq(a,b,c,d){a.h&&Dq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Dq(a,b,c,d){a.F&&(a=Np(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Kq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Pq:a.h.kf()?Qq:a.g.paused?Rq:Sq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Dq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
799
|
+
S("shaka.cast.CastReceiver",zq);zq.prototype.destroy=zq.prototype.destroy;zq.prototype.setContentArtist=zq.prototype.Ii;zq.prototype.setContentImage=zq.prototype.Ji;zq.prototype.setContentTitle=zq.prototype.Li;zq.prototype.clearContentMetadata=zq.prototype.rh;zq.prototype.setContentMetadata=zq.prototype.Ki;zq.prototype.isIdle=zq.prototype.ai;zq.prototype.isConnected=zq.prototype.isConnected;var Mq=.5,Iq=5,Pq="IDLE",Sq="PLAYING",Qq="BUFFERING",Rq="PAUSED";function Tq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(y){return null!=y&&""!=y.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(y){return null!=y&&""!=y.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Uq(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){q=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
800
|
+
q||-1===u)p=Vq(d,e),a.nestedCues.push(p);else{for(;q<=u;q++)if(v=p[q]){var w=v.l,A=v.i,z=v.j,B=v.h;if(w!=h||A!=k||z!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Uq(d,e,w,A,z,B),h=w,k=A,l=z,m=B;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Vq(d,e),a.nestedCues.push(n));n=Uq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
801
|
+
function Uq(a,b,c,d,e,f){a=new Nb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Vq(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}function Wq(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Xq(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Yq(this)}function Zq(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Nb(b,c,"");e.lineInterpretation=1;var f=$q.get(a.g);f&&(e.line=f);return Tq(e,d,a.i,b,c)}function Yq(a){ar(a,0,15);a.g=1}
|
|
802
|
+
function br(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case cr:d=dr.has(c)?dr.get(c):String.fromCharCode(c);break;case er:d=fr.get(c);break;case gr:a.i[a.g].pop();d=hr.get(c);break;case ir:a.i[a.g].pop(),d=jr.get(c)}d&&a.i[a.g].push(new Wq(d,a.m,a.j,a.o,a.l))}}function kr(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function ar(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
803
|
+
var cr=0,er=1,gr=2,ir=3,dr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),fr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),hr=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
|
|
804
|
+
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),jr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
805
|
+
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),$q=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function lr(a,b){this.h=mr;this.o=new Xq(a,b);this.i=new Xq(a,b);this.g=this.j=new Xq(a,b);this.l=0;this.m=null}function nr(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==or&&a.h!==pr&&(e=Zq(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,ar(c,0,15),c=a.j,c.g=0<c.h?c.h:0,ar(c,0,15),d.g=15);a.h=or;d.h=b;return e}function qr(a){a.h=rr;a.g=a.j;a.g.h=0}function sr(a){bb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=pr}
|
|
806
|
+
var mr=0,rr=1,or=3,pr=4,tr="black green blue cyan red yellow magenta black".split(" "),ur="white green blue cyan red yellow magenta white_italics".split(" ");function vr(a,b){this.J=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=wr;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";xr(this)}function xr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(yr())}function yr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function zr(a,b){Ar(a)&&(a.i[a.h][a.g]=new Wq(b,a.C,a.A,a.s,a.B),a.g++)}function Ar(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}vr.prototype.isVisible=function(){return this.l};
|
|
807
|
+
function Br(a,b,c){var d=new Nb(a.j,b,"");d.textAlign=a.F===Cr?"left":a.F===Dr?"right":Qb;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?gc:2;switch(a.G){case Er:e.regionAnchorX=0;e.regionAnchorY=0;break;case Fr:e.regionAnchorX=50;e.regionAnchorY=0;break;case Gr:e.regionAnchorX=100;e.regionAnchorY=0;break;case Hr:e.regionAnchorX=0;e.regionAnchorY=50;break;case Ir:e.regionAnchorX=
|
|
808
|
+
50;e.regionAnchorY=50;break;case Jr:e.regionAnchorX=100;e.regionAnchorY=50;break;case Kr:e.regionAnchorX=0;e.regionAnchorY=100;break;case Lr:e.regionAnchorX=50;e.regionAnchorY=100;break;case Mr:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Tq(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Cr=0,Dr=1,wr=2,Er=0,Fr=1,Gr=2,Hr=3,Ir=4,Jr=5,Kr=6,Lr=7,Mr=8;function Nr(){this.i=[];this.h=null;this.g=0}function Or(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Pr(a.h)),a.h=null,a.g=0))}function Pr(a){this.g=0;this.h=a}Pr.prototype.ka=function(){return this.g<this.h.length};Pr.prototype.xa=function(){return this.g};function Qr(a){if(!a.ka())throw new T(2,2,3E3);return a.h[a.g++]}Pr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function Rr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
809
|
+
function Sr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Qr(b).value;b=null;c=t(Tr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Br(e,d,a.i)),xr(e);return b}if(137===c)for(b=Qr(b).value,b=t(Tr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Qr(b).value;b=null;c=t(Tr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Br(e,d,a.i)),e.l=!1;return b}if(139===c){c=Qr(b).value;
|
|
810
|
+
b=null;c=t(Tr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Br(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Qr(b).value,Ur(a,b,d);if(143===c)return d=Ur(a,255,d),Vr(a),d;if(144===c)b.skip(1),d=Qr(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Qr(b).value,c=Qr(b).value,b.skip(1),a.g&&(b=Wr((c&48)>>4,(c&12)>>2,c&3),a.g.B=Wr((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Qr(b).value,b=Qr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
811
|
+
b.skip(1),d=Qr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new vr(c,a.i);f.j=d;a.h[c]=f}d=Qr(b).value;f=Qr(b).value;var g=Qr(b).value,h=Qr(b).value,k=Qr(b).value;b=Qr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
812
|
+
function Tr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Ur(a,b,c){var d=null;b=t(Tr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Br(f,c,a.i));a.h[e]=null}return d}function Vr(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Wr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Xr[a<<2|b<<1|c]}
|
|
813
|
+
var Yr=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Xr="black blue green cyan red magenta yellow white".split(" ");function Zr(){this.h=[];this.g=[];this.i=new Nr;this.l=0;this.m=new Map([["CC1",new lr(0,0)],["CC2",new lr(0,1)],["CC3",new lr(1,0)],["CC4",new lr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;$r(this)}Zr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;$r(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Vr(b.value)};
|
|
814
|
+
function $r(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=mr,c.g=c.j,c.m=null,Yq(c.i),Yq(c.j),Yq(c.o);a.B=!0}
|
|
815
|
+
Zr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Bg(a,0);if(!(8>a.getLength())&&181===a.R()&&49===a.ta()&&1195456820===a.O()&&3===a.R()&&(c=a.R(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.R(),f=(e&4)>>2,g=a.R(),h=a.R();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ya:g,yb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
816
|
+
Zr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=as(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Or(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=bs(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
817
|
+
function as(a,b){var c=b.type;if(16===(b.Ya&112)){var d=b.Ya>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Ya&&255===b.yb||!b.Ya&&!b.yb||!cs(b.Ya)||!cs(b.yb))return 45<=++a.l&&$r(a),null;a.l=0;b.Ya&=127;b.yb&=127;var e=b.Ya;if(1<=e&&15>=e||!b.Ya&&!b.yb)return null;e=null;if(16===(b.Ya&112))a:{a.A.add(d),d=b.Ya;a=b.yb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
818
|
+
"white";e=!1;7>f?d=ur[f]:7===f&&(e=!0);a=1===(a&1);c.h!==pr&&(f=c.g,c.h===or&&b!==f.g&&(c=1+b-f.h,kr(f,c,1+f.g-f.h,f.h),ar(f,0,c-1),ar(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",br(c.g,cr,32),d=!1,b=ur[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=tr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))br(c.g,
|
|
819
|
+
er,a);else if(18===(d&246)&&32===(a&224))br(c.g,d&1?ir:gr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.yb){case 32:qr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=nr(c,2,a);break;case 38:d=nr(c,3,a);break;case 39:d=nr(c,4,a);break;case 40:br(c.g,cr,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Yq(c.o);sr(c);break;case 43:sr(c);break;case 44:b=c.i;d=null;c.h!==pr&&(d=Zq(b,c.l,a));ar(b,0,15);break;case 45:b=c.g;c.h!==or?d=null:(d=Zq(b,c.l,a),e=b.g-b.h+1,kr(b,
|
|
820
|
+
e-1,e,b.h),ar(b,0,e-1),ar(b,b.g,15-b.g),c.l=a);break;case 46:ar(c.j,0,15);break;case 47:b=null,c.h!==pr&&(b=Zq(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,qr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.yb,br(c.g,cr,b.Ya),br(c.g,cr,a);return e}
|
|
821
|
+
function bs(a,b){var c=[];try{for(;b.ka();){var d=Qr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Qr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Rr(e));for(var g=a.j.get(e),h=b.xa();b.xa()-h<f;){e=b;var k=Qr(e),l=k.value,m=k.pts;if(16===l){var n=Qr(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Ar(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.m-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Br(q,p,g.i));if(q.h+1>=q.o){p=q;for(var u=
|
|
822
|
+
0,v=1;16>v;v++,u++)p.i[u]=p.i[v];for(v=0;1>v;v++,u++)p.i[u]=yr()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Br(q,p,g.i));q.i[q.h]=yr();q.g=0;break;case 12:q.isVisible()&&(e=Br(q,p,g.i)),xr(q),p=q,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Sr(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?zr(g.g,
|
|
823
|
+
"\u266a"):zr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&zr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Yr.has(e)){var A=Yr.get(e);zr(g.g,A)}else zr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?zr(g.g,"_"):zr(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(z){if(z instanceof T&&3E3===z.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw z;}return c}function cs(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
824
|
+
Zr.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",Zr);Ib=function(){return new Zr};function ds(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function es(){this.j=new Map;this.i=this.h=0;this.g=fs}
|
|
825
|
+
es.prototype.init=function(a){function b(f){f=f.name;f in gs&&(c.g=gs[f])}var c=this,d=[],e=[];(new Eg).box("moov",Jg).box("mvex",Jg).P("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Jg).P("tkhd",function(f){f=Xi(f.reader,f.version);d.push(f.trackId)}).box("mdia",Jg).P("mdhd",function(f){f=Vi(f.reader,f.version);e.push(f.timescale)}).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
|
|
826
|
+
b).box("dvh1",b).box("dvhe",b).box("encv",Og).box("sinf",Jg).box("frma",function(f){f=Zi(f.reader).Ga;f in gs&&(c.g=gs[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==fs&&ab("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
827
|
+
es.prototype.parse=function(a){var b=this;if(this.g==fs)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Eg).box("moof",function(l){f=l.start;g=[];Jg(l)}).box("traf",Jg).P("trun",function(l){l=Wi(l.reader,l.version,l.flags);g.push(l)}).P("tfhd",function(l){l=Ti(l.reader,l.flags);d=l.kg||b.h;e=l.uh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).P("tfdt",function(l){h=Ui(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw ab("Unable to find base media decode time for CEA captions!"),
|
|
828
|
+
new T(2,2,2010);hs(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
829
|
+
function hs(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Jg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].th);b.ka();){g=b.O();var p=b.R(),q=null;q=!1;h=1;switch(a.g){case is:q=p&31;q=6==q;break;case js:h=2;b.skip(1);q=p>>1&63;q=39==q||40==q;break;default:return}if(q)for(p=0,l<n.length&&(p=n[l].se||0),p=(c+p)/d,h=t(ds(b.vb(g-h))),q=h.next();!q.done;q=h.next())k.push({packet:q.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
830
|
+
c+(n[l].Hf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",es);var fs=0,is=1,js=2,gs={avc1:is,avc3:is,hev1:js,hvc1:js,dvav:is,dva1:is,dvh1:js,dvhe:js};Hb["video/mp4"]=function(){return new es};function ks(){this.g=null}ks.prototype.init=function(){};ks.prototype.parse=function(a){this.g?this.g.clearData():this.g=new sj;var b=[];a=Ab(a);if(!zj(a))return b;a=this.g.parse(a);var c=a.hd(),d=a.Xd();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(ds(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
831
|
+
S("shaka.cea.TsCeaParser",ks);Hb["video/mp2t"]=function(){return new ks};function ls(a,b,c){var d=ms(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Ic});if(1<f.length)throw new T(2,4,4050);f.length&&(g=ns(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ic}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ic?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
832
|
+
l.Ic});f.length&&(a=os(e,k,f,c,h),0==a.length&&(a=[Id("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Id(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{jg:h,Rj:e,drmInfos:a,Ie:g,og:!0}}
|
|
833
|
+
function ps(a,b,c,d){var e=ls(a,c,d);if(b.og){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.og=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.jg||b.jg}
|
|
834
|
+
function qs(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function rs(a){a=t(ch(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return ah(c)}return""}
|
|
835
|
+
function ss(a){var b=eh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=ah(b)))return b;a=eh(a.node,"urn:microsoft:playready","pro");if(!a||!ah(a))return"";a=ah(a);a=Ad(a);a=qs(a).filter(function(c){return c.type===ts})[0];if(!a)return"";a=nd(a.value,!0);return(a=Ug(a,"WRMHEADER"))?rs(a):""}
|
|
836
|
+
function os(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Ic];if(h){var k;if((k=eh(g.node,"urn:microsoft:playready","pro"))&&ah(k)){k=ah(k);k=Ad(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Sg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Ic)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
|
|
837
|
+
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Sg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Id(h,b,g.init||a||k||l);if(h=us.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function ms(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=vs(c.value))&&b.push(c);return b}
|
|
838
|
+
function vs(a){var b=a.attributes.schemeIdUri,c=hh(a,"urn:mpeg:cenc:2013","default_KID"),d=fh(a,"urn:mpeg:cenc:2013","pssh").map(bh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Ad(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Ic:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
839
|
+
function ns(a){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=eh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=eh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=wd(b.attributes.keyUriTemplate);
|
|
839
840
|
if(!a||!b)throw new T(2,4,4051);a=Bd(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{gi:b,iv:a}}
|
|
840
|
-
var
|
|
841
|
-
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=ah(a))?a:""});function
|
|
841
|
+
var ts=1,us=(new Map).set("com.widevine.alpha",function(a){var b=eh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ah(b))?b:(a=eh(a.node,"urn:microsoft","laurl"))?wd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",ss).set("com.microsoft.playready.recommendation",ss).set("com.microsoft.playready.software",ss).set("com.microsoft.playready.hardware",ss).set("org.w3.clearkey",function(a){var b=eh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ah(b))?b:(a=eh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
842
|
+
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=ah(a))?a:""});function ws(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&ab("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
842
843
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
843
|
-
function
|
|
844
|
-
p)break;else if(q>=p)break;v=Math.ceil((p-q)/u)-1}else{if(Infinity==a)break;else if(q/e>=a)break;v=Math.ceil((a*e-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/e);for(p=0;p<=v;++p)l=q+u,k.push({start:q/e,end:l/e,Yf:q,ub:n,Gi:k.length+h}),q=l}e=k}return{timescale:d,Fa:c,Bd:g,Fb:f/d||0,Xf:f,timeline:e}}function
|
|
845
|
-
function
|
|
846
|
-
function
|
|
847
|
-
[];q.children.length;){var u=q.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(q.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=q.attributes[v];return
|
|
848
|
-
function
|
|
849
|
-
;function
|
|
850
|
-
function
|
|
851
|
-
function
|
|
852
|
-
d)}function
|
|
853
|
-
function
|
|
854
|
-
function
|
|
855
|
-
function
|
|
856
|
-
function
|
|
857
|
-
3,3009);
|
|
858
|
-
|
|
859
|
-
function
|
|
860
|
-
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{Wb:function(){f&&0!=f.getNumReferences()||f.ge(h);return Promise.resolve(f)}}}function
|
|
861
|
-
function
|
|
862
|
-
function
|
|
863
|
-
(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity,v=!(a.qb&&a.ha.sd);p?(c=p,
|
|
864
|
-
function
|
|
865
|
-
function
|
|
866
|
-
v})}function l(){var G=null!=p&&e[p]||q;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.ra.id,q=a.ha.duration,u=b.Fa,v=b.Bd,w=b.timescale,A=b.Dc,z=a.bandwidth||null,
|
|
867
|
-
h(
|
|
868
|
-
function
|
|
844
|
+
function xs(a,b){var c=ys(a,b,"timescale"),d=1;c&&(d=nh(c)||1);c=ys(a,b,"duration");(c=nh(c||""))&&(c/=d);var e=ys(a,b,"startNumber"),f=Number(ys(a,b,"presentationTimeOffset"))||0,g=oh(e||"");if(null==e||null==g)g=1;e=null;if(b=zs(a,b,"SegmentTimeline")){b=$g(b,"S");e=d;a=a.ha.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],q=gh(n,"t",oh),u=gh(n,"d",oh),v=gh(n,"r",mh);n=gh(n,"k",mh)||0;null!=q&&(q-=f);if(!u)break;q=null!=q?q:l;v=v||0;if(0>v)if(p){p=gh(p,"t",oh);if(null==
|
|
845
|
+
p)break;else if(q>=p)break;v=Math.ceil((p-q)/u)-1}else{if(Infinity==a)break;else if(q/e>=a)break;v=Math.ceil((a*e-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/e);for(p=0;p<=v;++p)l=q+u,k.push({start:q/e,end:l/e,Yf:q,ub:n,Gi:k.length+h}),q=l}e=k}return{timescale:d,Fa:c,Bd:g,Fb:f/d||0,Xf:f,timeline:e}}function As(a,b){return[b(a.I),b(a.pa),b(a.ra)].filter(te)}function ys(a,b,c){b=As(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
846
|
+
function zs(a,b,c){b=As(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=dh(d.value,c));d=b.next());return a}
|
|
847
|
+
function Bs(a,b,c,d,e,f){for(var g=hh(a,"http://www.w3.org/1999/xlink","href"),h=hh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Wg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Wf(new T(2,4,4028));if("onLoad"!=h)return Wf(new T(2,4,4027));var p=Fd([d],[g]);return e.request(0,lg(p,b)).wa(function(q){q=Tg(q.data,a.tagName);if(!q)return Wf(new T(2,4,4001,g));for(a.children=
|
|
848
|
+
[];q.children.length;){var u=q.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(q.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=q.attributes[v];return Cs(a,b,c,p[0],e,f+1)})}
|
|
849
|
+
function Cs(a,b,c,d,e,f){f=void 0===f?0:f;if(hh(a,"http://www.w3.org/1999/xlink","href")){var g=Bs(a,b,c,d,e,f);c&&(g=g.wa(void 0,function(){return Cs(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(Zg(a)),l=k.next();!l.done;h={rc:h.rc},l=k.next())h.rc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==hh(h.rc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.rc}}(h)):"SegmentTimeline"!=h.rc.tagName&&g.push(Cs(h.rc,b,c,d,e,f));return $f(g).wa(function(){return a})}
|
|
850
|
+
;function Ds(a,b,c,d,e,f,g){var h,k=(new Eg).P("sidx",function(l){h=Es(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
851
|
+
function Es(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Hc(),m=g.reader.Hc();g.reader.skip(2);var n=g.reader.ta();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.O(),q=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==q)throw new T(2,3,3006);h.push(new Ci(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Fs(a){this.h=Eb(a);this.g=new Bg(this.h,0)}Fs.prototype.ka=function(){return this.g.ka()};
|
|
852
|
+
function Gs(a){var b=Hs(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Hs(a);a:{d=t(Is);for(var e=d.next();!e.done;e=d.next())if(yb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.xa();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.xa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.xa();d=Eb(a.h,a.g.xa(),b);a.g.skip(b);return new Js(c,
|
|
853
|
+
d)}function Hs(a){var b=a.g.xa(),c=a.g.R();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ab(a.h,b,c)}var Is=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Js(a,b){this.id=a;this.g=b}
|
|
854
|
+
function Ks(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ls(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Fs(a.g);for(var n=null,p=null;a.ka();){var q=Gs(a);if(187==q.id){var u=Ms(q);u&&(q=c*u.Si,u=b+u.wi,null!=n&&m.push(new Ci(n+g,q+g,l,p,u-1,f,g,h,k)),n=q,p=u)}}null!=n&&m.push(new Ci(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
855
|
+
function Ms(a){var b=new Fs(a.g);a=Gs(b);if(179!=a.id)throw new T(2,3,3013);a=Ks(a);b=Gs(b);if(183!=b.id)throw new T(2,3,3012);b=new Fs(b.g);for(var c=0;b.ka();){var d=Gs(b);if(241==d.id){c=Ks(d);break}}return{Si:a,wi:c}};function Ns(a,b,c){b=zs(a,b,"Initialization");if(!b)return null;var d=a.I.Aa(),e=b.attributes.sourceURL;e&&(d=Fd(d,[wd(e)]));e=0;var f=null;if(b=gh(b,"range",lh))e=b.start,f=b.end;c=new xi(function(){return d},e,f,Os(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
|
|
856
|
+
function Ps(a,b,c){var d=Number(ys(a,Qs,"presentationTimeOffset"))||0,e=ys(a,Qs,"timescale"),f=1;e&&(f=nh(e)||1);var g=d/f||0,h=Ns(a,Qs,c);Rs(a,h);var k=Fe(a);return{Wb:function(){var l=zs(k,Qs,"RepresentationIndex");var m=k.I.Aa();l&&(l=wd(l.attributes.sourceURL))&&(m=Fd(m,[l]));l=Ss(k);return Ts(k,b,h,m,l.start,l.end,g)}}}
|
|
857
|
+
function Ts(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J;return O(function(H){if(1==H.g)return h=a.presentationTimeline,k=!a.qb||!a.ha.sd,l=a.ha.start,m=a.ha.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Ba,c.ja,!0):null],p=null,E(H,Promise.all(u),2);v=H.h;w=v[0];A=v[1]||null;z=null;B=l-g;y=l;D=m?l+m:Infinity;if("mp4"==n)var K=Ds(w,e,d,c,B,y,D);else{K=new Fs(A);if(440786851!=Gs(K).id)throw new T(2,3,3008);var G=Gs(K);if(408125543!=G.id)throw new T(2,
|
|
858
|
+
3,3009);K=G.g.byteOffset;G=new Fs(G.g);for(var M=null;G.ka();){var L=Gs(G);if(357149030==L.id){M=L;break}}if(!M)throw new T(2,3,3010);M=new Fs(M.g);L=1E6;for(G=null;M.ka();){var N=Gs(M);if(2807729==N.id)L=Ks(N);else if(17545==N.id)if(4==N.g.byteLength)G=N.g.getFloat32(0);else if(8==N.g.byteLength)G=N.g.getFloat64(0);else throw new T(2,3,3003);}if(null==G)throw new T(2,3,3011);M=L/1E9;G*=M;L=Gs(new Fs(w));if(475249515!=L.id)throw new T(2,3,3007);K=Ls(L,K,M,G,d,c,B,y,D)}z=K;C=t(z);for(I=C.next();!I.done;I=
|
|
859
|
+
C.next())J=I.value,J.codecs=a.I.codecs,J.mimeType=a.I.mimeType;h.vd(z);q=new Nk(z);k&&q.vc(y,D,!0);return H.return(q)})}function Qs(a){return a.Jc}function Ss(a){var b=zs(a,Qs,"RepresentationIndex");a=ys(a,Qs,"indexRange");a=lh(a||"");b&&(a=gh(b,"range",lh,a));return a}function Rs(a,b){Us(a,b);if(!Ss(a))throw new T(2,4,4002);}function Us(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Nd&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
860
|
+
function Os(a){var b=a.I;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.Ec,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Vs(a,b,c){var d=Ns(a,Ws,c),e=Xs(a);if(!e.Fa&&!e.timeline&&1<e.Cc.length)throw new T(2,4,4002);if(!e.Fa&&!a.ha.duration&&!e.timeline&&1==e.Cc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.ra.id&&a.I.id&&(g=b[a.ra.id+","+a.I.id])&&(f=g.segmentIndex);var h=Ys(a.ha.start,a.ha.duration,a.I.Aa,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.ud(h,a.presentationTimeline.jb()):f=new Nk(h);a.presentationTimeline.vd(h);a.qb&&a.ha.sd||f.vc(a.ha.start,
|
|
861
|
+
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{Wb:function(){f&&0!=f.getNumReferences()||f.ge(h);return Promise.resolve(f)}}}function Ws(a){return a.Gb}function Xs(a){var b=Zs(a);a=xs(a,Ws);var c=a.Bd;0==c&&(c=1);var d=0;a.Fa?d=a.Fa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Fa:a.Fa,startTime:d,Bd:c,Fb:a.Fb,timeline:a.timeline,Cc:b}}
|
|
862
|
+
function Ys(a,b,c,d,e,f,g,h){var k=d.Cc.length;d.timeline&&d.timeline.length!=d.Cc.length&&(k=Math.min(d.timeline.length,d.Cc.length));for(var l=a-d.Fb,m=b?a+b:Infinity,n=[],p=d.startTime,q={},u=0;u<k;q={Xc:q.Xc,Tc:q.Tc},u++){q.Tc=d.Cc[u];var v=p;p=void 0;p=null!=d.Fa?v+d.Fa:d.timeline?d.timeline[u].end:v+b;q.Xc=null;v=new Ci(a+v,a+p,function(w){return function(){null==w.Xc&&(w.Xc=Fd(c(),[w.Tc.mi]));return w.Xc}}(q),q.Tc.start,q.Tc.end,e,l,a,m,[],"",null,null,Di,f);v.codecs=h;v.mimeType=g;n.push(v)}return n}
|
|
863
|
+
function Zs(a){return[a.I.Gb,a.pa.Gb,a.ra.Gb].filter(te).map(function(b){return $g(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.jf&&(a.jf=!0);var c=wd(b.attributes.media);b=gh(b,"mediaRange",lh,{start:0,end:null});return{mi:c,start:b.start,end:b.end}})};function $s(a,b,c,d,e,f,g,h,k){k||a.I.Bc||(a.I.Bc=ys(a,at,"initialization"));var l=a.I.Bc?bt(a,g):null,m=ct(a);dt(m);var n=Fe(a);if(m.qd)return Us(a,l),{Wb:function(){var w=ws(m.qd,n.I.id,null,null,n.bandwidth||null,null);w=Fd(n.I.Aa(),[w]);return Ts(n,b,l,w,0,null,m.Fb)}};if(m.Fa)return d||"image"===a.pa.contentType||(a.presentationTimeline.vf(m.Fa),a.presentationTimeline.ke(a.ha.start)),{Wb:function(){return et(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.ra.id&&a.I.id&&(d=a.ra.id+","+a.I.id,d=c[d])&&
|
|
864
|
+
(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity,v=!(a.qb&&a.ha.sd);p?(c=p,ft(c,m,q,u,v,l),c.Ha(a.presentationTimeline.jb())):p=new gt(m,a.I.id,a.bandwidth,a.I.Aa,q,u,l,v,g,a.I.If);m.timeline&&"image"!==a.pa.contentType&&a.presentationTimeline.Fg(m.timeline,q);d&&a.qb&&(d.segmentIndex=p);return{Wb:function(){p instanceof gt&&0==p.getNumReferences()&&ft(p,m,q,u,v,l);return Promise.resolve(p)}}}function at(a){return a.Ob}
|
|
865
|
+
function ct(a){var b=xs(a,at),c=ys(a,at,"media"),d=ys(a,at,"index");return{Fa:b.Fa,timescale:b.timescale,Bd:b.Bd,Fb:b.Fb,Xf:b.Xf,timeline:b.timeline,Dc:c&&wd(c),qd:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function dt(a){var b=a.qd?1:0;b+=a.timeline?1:0;b+=a.Fa?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.qd&&(a.timeline=null),a.Fa=null);if(!a.qd&&!a.Dc)throw new T(2,4,4002);}
|
|
866
|
+
function et(a,b,c,d,e,f,g){function h(G){var M=(G-v)*u,L=M+b.Fb,N=M+n;M=N+u;var P=Math.min(M,l());N=new Ci(N,P,function(){var R=L*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(L)*BigInt(w));R=ws(A,B,G,null,z,R);return Fd(y(),[R])},0,null,d,D,n,l(),[],"",null,null,Di,f);N.codecs=a.I.codecs;N.mimeType=a.I.mimeType;N.i=M;return N}function k(){var G=[Math.max(m.jb(),n),Math.min(m.Mb(),l())].map(function(M){return M-n});G=[Math.ceil(G[0]/u),Math.ceil(G[1]/u)-1];a.I.Ca&&G[1]++;return G.map(function(M){return M+
|
|
867
|
+
v})}function l(){var G=null!=p&&e[p]||q;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.ra.id,q=a.ha.duration,u=b.Fa,v=b.Bd,w=b.timescale,A=b.Dc,z=a.bandwidth||null,B=a.I.id,y=a.I.Aa,D=n-b.Fb,C=k();c=a.qb?Math.max(C[0],C[1]-c+1):C[0];g=g||C[1];C=[];for(var I=c;I<=g;++I){var J=h(I);C.push(J)}var H=new Nk(C);C=m.Mb()<l();I=m.T();if(C||I){var K=Math.max(c,g+1);c=u;a.I.Ca&&(c=.1);H.ve(c,function(){var G=m.jb();H.Ha(G);var M=t(k());M.next();M=M.next().value;for(var L=[];K<=M;){var N=
|
|
868
|
+
h(K);L.push(N);K++}return G>l()&&!L.length?null:L})}return Promise.resolve(H)}function bt(a,b){var c=a.I.Bc;c||(c=ys(a,at,"initialization"));if(!c)return null;c=wd(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.Aa;b=new xi(function(){var g=ws(c,d,null,null,e,null);return Fd(f(),[g])},0,null,Os(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
|
|
869
|
+
function gt(a,b,c,d,e,f,g,h,k,l){Nk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&ht(this)}oa(gt,Nk);r=gt.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Nk.prototype.release.call(this);this.h=null};
|
|
869
870
|
r.Ha=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.getNumReferences()&&this.release())}};
|
|
870
|
-
function
|
|
871
|
-
function
|
|
871
|
+
function ft(a,b,c,d,e,f){it(a,f);if(a.h){c=a.h.timeline;a.h.Dc=b.Dc;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&ht(a)}function it(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Fi(c,b)}}
|
|
872
|
+
function ht(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.Ha(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};
|
|
872
873
|
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Dc,e=this.h.timeline[a],f=e.Gi,g=this.h.Xf+e.Yf;c=this.i-this.h.Fb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],p=(e.end-e.start)/e.ub,q={},u=0;u<e.ub;q={Yc:q.Yc,De:q.De},u++){var v=e.start+p*u,w=v+p;q.De=u+1;q.Yc=null;v=new Ci(this.i+v,this.i+w,function(A){return function(){if(!b.h)return[];
|
|
873
|
-
null==A.Yc&&(A.Yc=
|
|
874
|
-
function
|
|
875
|
-
function
|
|
876
|
-
null,p=null,q=null,u=null,v;(new Eg).box("moov",Jg).box("trak",Jg).P("tkhd",function(y){y=Xi(y.reader,y.version);
|
|
877
|
-
y.R();
|
|
878
|
-
|
|
879
|
-
"
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
function
|
|
884
|
-
function
|
|
885
|
-
function
|
|
886
|
-
function
|
|
887
|
-
function
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
function
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
function
|
|
900
|
-
function
|
|
901
|
-
function
|
|
902
|
-
function
|
|
903
|
-
function
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
function
|
|
908
|
-
function
|
|
909
|
-
function
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
function
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
function
|
|
916
|
-
function
|
|
917
|
-
function
|
|
918
|
-
function
|
|
919
|
-
function
|
|
920
|
-
|
|
921
|
-
r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.l&&this.l.presentationTimeline.T()&&this.G.mc();this.h&&this.h.configure(this.g);this.m&&(this.m.Mg(this.g.dash.multiTypeVariantsAllowed&&ob()),this.m.Tg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.A=[a],c.i=b,E(e,gu(c),2);d=e.h;c.i&&hu(c,d);if(!c.i)throw new T(2,7,7001);return e.return(c.l)})};
|
|
874
|
+
null==A.Yc&&(A.Yc=jt(b.h.Dc,b.F,f,b.B,g,A.De,b.C));return A.Yc}}(q),0,null,this.s,c,this.i,this.l,[],"",null,null,Di,this.A);v.codecs=l;v.mimeType=m;0==this.G?0<u&&v.ee():0!=u%this.G&&v.ee();n.push(v)}c=new Ci(this.i+e.start,k,function(){return 0<e.ub?[]:jt(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,Di,this.A,0<e.ub);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
|
|
875
|
+
function jt(a,b,c,d,e,f,g){a=ws(a,b,c,f,d||null,e);return Fd(g(),[a]).map(function(h){return h.toString()})};function kt(a){var b=ae(a),c=b.split("/")[0];a=ge(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,$f:null,colorGamut:null}}
|
|
876
|
+
function lt(a,b){function c(y){w=y.name;Og(y)}function d(y){var D=Yi(y.reader);p=D.channelCount;q=D.sampleRate;e(y.name)}function e(y){y=y.toLowerCase();switch(y){case "avc1":case "avc3":g.push(y+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(y+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(y+".05.04");k=!0;break;case "vp09":g.push(y+".00.10.08");k=!0;break;case "av01":g.push(y+".0.01M.08");k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(y),
|
|
877
|
+
h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,q=null,u=null,v=null,w;(new Eg).box("moov",Jg).box("trak",Jg).P("tkhd",function(y){y=Xi(y.reader,y.version);m=String(y.height);n=String(y.width)}).box("mdia",Jg).P("mdhd",function(y){l=Vi(y.reader,y.version).language}).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("mp4a",function(y){var D=Yi(y.reader);p=D.channelCount;q=D.sampleRate;y.reader.ka()?Jg(y):e(y.name)}).box("esds",function(y){y=y.reader;for(var D="mp4a",C,I;y.ka();){C=y.R();for(var J=
|
|
878
|
+
y.R();J&128;)J=y.R();if(3==C)y.ta(),J=y.R(),J&128&&y.ta(),J&64&&y.skip(y.R()),J&32&&y.ta();else if(4==C)I=y.R(),y.skip(12);else if(5==C)break}I&&(D+="."+$i(I),5==C&&y.ka()&&(C=y.R(),I=(C&248)>>3,31===I&&y.ka()&&(I=32+((C&7)<<3)+((y.R()&224)>>5)),D+="."+I));f.push(D);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",c).box("av01",c).box("avcC",function(y){var D=
|
|
879
|
+
w||"";switch(w){case "dvav":D="avc3";break;case "dva1":D="avc1"}y=y.reader;y.skip(1);y=D+"."+$i(y.R())+$i(y.R())+$i(y.R());g.push(y);k=!0}).box("hvcC",function(y){var D=w||"";switch(w){case "dvh1":D="hvc1";break;case "dvhe":D="hev1"}var C=y.reader;C.skip(1);y=C.R();var I=["","A","B","C"][y>>6],J=y&31,H=C.O(),K=(y&32)>>5?"H":"L";y=[C.R(),C.R(),C.R(),C.R(),C.R(),C.R()];C=C.R();for(var G=0,M=0;32>M;M++){G|=H&1;if(31==M)break;G<<=1;H>>=1}D=D+("."+I+J)+("."+$i(G,!0));D+="."+K+C;I="";for(J=y.length;J--;)if((K=
|
|
880
|
+
y[J])||I)I="."+K.toString(16).toUpperCase()+I;D+=I;g.push(D);k=!0}).box("dvcC",function(y){var D=w||"";switch(w){case "hvc1":D="dvh1";break;case "hev1":D="dvhe";break;case "avc1":D="dva1";break;case "avc3":D="dvav"}var C=y.reader;C.skip(2);y=C.R();C=C.R();g.push(D+"."+aj(y>>1&127)+"."+aj(y<<5&32|C>>3&31));k=!0}).P("vpcC",function(y){var D=w||"",C=y.reader;y=C.R();var I=C.R();C=C.R()>>4&15;g.push(D+"."+aj(y)+"."+aj(I)+"."+aj(C));k=!0}).box("av1C",function(y){var D=w||"",C=y.reader;C.skip(1);y=C.R();
|
|
881
|
+
C=C.R();var I=y>>>5,J=(C&64)>>6;g.push(D+"."+I+"."+aj(y&31)+(C>>>7?"H":"M")+"."+aj(2===I&&J?(C&32)>>5?12:10:J?10:8)+"."+((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+aj(1)+"."+aj(1)+"."+aj(1)+".0");k=!0}).box("enca",Pg).box("encv",Og).box("sinf",Jg).box("frma",function(y){y=Zi(y.reader).Ga;e(y)}).box("colr",function(y){y=y.reader;var D=null,C=null,I=y.vb(4);var J=String.fromCharCode(I[0]);J+=String.fromCharCode(I[1]);J+=String.fromCharCode(I[2]);J+=String.fromCharCode(I[3]);if("nclx"===J){switch(y.ta()){case 1:case 5:case 6:case 7:D=
|
|
882
|
+
"srgb";break;case 9:D="rec2020";break;case 11:case 12:D="p3"}I=y.ta();y.ta();switch(I){case 1:case 6:case 13:case 14:case 15:C="SDR";break;case 16:C="PQ";break;case 18:C="HLG"}}u=C;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,z=new Map;if(k){var B=new Gb("video/mp4");a&&B.init(a);B.i(b);a=t(B.j());for(b=a.next();!b.done;b=a.next())b=b.value,z.set(b,b);B.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:mt(f.concat(g)).join(", "),language:l,height:m,
|
|
883
|
+
width:n,channelCount:p,sampleRate:q,closedCaptions:z,$f:u,colorGamut:v}}function mt(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=$d(d);b.has(e)||(c.push(d),b.add(e))}b=Od("audio",c);d=Od("video",c);a=Od(Nd,c);d=nt(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
884
|
+
function nt(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?mb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function ot(a){var b=null;(new Eg).box("moov",Jg).box("trak",Jg).box("mdia",Jg).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("encv",Og).box("enca",Pg).box("sinf",Jg).box("schi",Jg).P("tenc",function(c){c=c.reader;c.R();c.R();c.R();c.R();b=Cd(c.vb(16))}).parse(a,!0);return b};function pt(a){this.o=null;this.A=a;this.G=new eg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}pt.prototype.configure=function(a){this.o=a};pt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};pt.prototype.setManifestType=function(a){this.s=a};
|
|
885
|
+
function qt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Fd(a.i,[rt(a,b)]),d=lg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),fg(a.G,e),ua(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=md(f.data),h=JSON.parse(g),1==h.VERSION&&st(a,h,f.uri),xa(l,0);if((k=ya(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){qt(a,b)});a.g.W(a.C);F(l)})}
|
|
886
|
+
function rt(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.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)));Hc(e)&&vc(b,e);return b.toString()}function st(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){qt(a,d)});if(c=b.TTL)a.C=c;a.g.W(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
887
|
+
function tt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}pt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
888
|
+
function ut(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={Tb:e.Tb},g=f.next())if(e.Tb=g.value,g=b.get(e.Tb))d.push({Bf:e.Tb,location:g});else if(g=a.F.find(function(k){return function(l){return l.jj==k.Tb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].bh?(h=new rc(h),tc(h,g["URI-REPLACEMENT"].bh),d.push({Bf:e.Tb,location:h.toString()})):d.push({Bf:e.Tb,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
889
|
+
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new rc(k.location)).zb))return!1;return!0});d.length&&(a.B=d[0].Bf);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.B=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:Fd(a.i,d)};function vt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=vt.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.Uh=function(){return this.j};r.gf=function(){return this.l.slice()};r.Bh=function(){return this.i};
|
|
890
|
+
function wt(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[xt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[yt(n),n]})),l=new Map(h.textStreams.map(function(n){return[zt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[At(n),n]}));if(b){var m=Bt(Nd);l.set(zt(m),m);m=Bt("image");h.set(At(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{eg:c,Zg:d,Wg:e,xg:f}}
|
|
891
|
+
r.Me=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H,K,G,M,L,N,P,R,Q;return O(function(fa){if(1==fa.g){e=Pd;if(!b&&1==a.length)return f=wt(a,!1),g=f.eg,h=f.Zg,k=f.Wg,l=f.xg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.i=Array.from(l[0].values()),fa.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)q=a[p],d.m.has(q.id)||(d.m.add(q.id),-1==n&&(n=p));if(-1==n)return fa.return();u=wt(a,!0);v=u.eg;w=u.Zg;A=u.Wg;z=u.xg;
|
|
892
|
+
return E(fa,Promise.all([Ct(d,d.h,v,n,Dt,Et,m),Ct(d,d.g,w,n,Dt,Et,m),Ct(d,d.l,A,n,Dt,Et,m),Ct(d,d.i,z,n,Dt,Et,m)]),2)}B=0;y=[];if(d.g.length&&d.h.length)for(K=t(d.h),G=K.next();!G.done;G=K.next())for(M=G.value,L=t(d.g),N=L.next();!N.done;N=L.next())P=N.value,R=hi(M.drmInfos,P.drmInfos),M.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=B++,y.push({id:Q,language:M.language,disabledUntilTime:0,primary:M.primary,audio:M,video:P,bandwidth:(M.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,
|
|
893
|
+
allowedByKeySystem:!0,decodingInfos:[]}));else for(D=d.g.length?d.g:d.h,C=t(D),I=C.next();!I.done;I=C.next())J=I.value,H=B++,y.push({id:H,language:J.language,disabledUntilTime:0,primary:J.primary,audio:J.type==e.U?J:null,video:J.type==e.ga?J:null,bandwidth:J.bandwidth||0,drmInfos:J.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=y;F(fa)})};
|
|
894
|
+
function Ft(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H,K,G,M,L,N;return O(function(P){switch(P.g){case 1:b=Pd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.U}).map(function(Q){return[xt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ga}).map(function(Q){return[yt(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ma}).map(function(Q){return[zt(Q),Q]}))});
|
|
895
|
+
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Fe}).map(function(Q){return[At(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Gt(b.ma),k.set(zt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=Gt(b.Fe),p.set(At(q),q);u=new vt;return E(P,Ct(u,[],c,0,Ht,It,0),2);case 2:return v=P.h,E(P,Ct(u,[],d,0,Ht,It,0),3);case 3:return w=P.h,E(P,Ct(u,[],e,0,Ht,It,0),4);case 4:return A=P.h,E(P,Ct(u,[],f,0,Ht,It,0),5);case 5:z=P.h;B=0;if(w.length&&v.length)for(J=
|
|
896
|
+
t(v),H=J.next();!H.done;H=J.next())for(K=H.value,G=t(w),M=G.next();!M.done;M=G.next())L=M.value,N=B++,L.variantIds.push(N),K.variantIds.push(N);else for(y=w.concat(v),D=t(y),C=D.next();!C.done;C=D.next())I=C.value,I.variantIds=[B++];return P.return(w.concat(v).concat(A).concat(z))}})}
|
|
897
|
+
function Ct(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J;return O(function(H){switch(H.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){H.u(4);break}n=m.value;return E(H,Jt(a,n,c,d,f,h,g),5);case 5:p=H.h;if(!p)throw new T(2,4,4037);m=l.next();H.u(2);break;case 4:q=t(h);for(u=q.next();!u.done;u=q.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())z=A.value,(B=Kt(a,z,c,e,f,h))&&b.push(B);y=t(h);for(u=y.next();!u.done;u=
|
|
898
|
+
y.next())for(D=u.value,C={},I=t(D),A=I.next();!A.done;C={Kd:C.Kd},A=I.next())if(C.Kd=A.value,!Lt(C.Kd)&&(J=b.some(function(K){return function(G){return Mt(a,K.Kd,G)}}(C))))throw new T(2,4,4037);return H.return(b)}})}function Jt(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return Nt(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,Ot(b,d+g),2):h.u(2):h.return(!1);Pt(b,d,e,f,g);return h.return(!0)})}
|
|
899
|
+
function Ot(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return E(l,Promise.all(c),2)}if(a.segmentIndex instanceof Qk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);F(l)})}
|
|
900
|
+
function Kt(a,b,c,d,e,f){if(Lt(b))return null;var g=d(b);Nt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Qk;return E(h,Ot(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Pt(g,0,e,f,0);return g}
|
|
901
|
+
function Pt(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==Ae(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
902
|
+
function Dt(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
903
|
+
function Ht(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
904
|
+
function Et(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=hi(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,4,4038);a.drmInfos=
|
|
905
|
+
d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Dt(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Et(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Et(a.trickModeVideo,
|
|
906
|
+
b)}function It(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
907
|
+
function Nt(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=Qt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
908
|
+
function Qt(a,b,c){var d={audio:xt,video:yt,text:zt,image:At}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return Mt(a,l,m)},video:function(l,m){return Mt(a,l,m)},text:Rt,image:St}[c.type];for(var g={audio:Tt,video:Ut,text:Vt,image:Wt}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!Lt(e)&&b.delete(d(e));return e}
|
|
909
|
+
function Xt(a,b){function c(d){if(!Yt.has(d)){var e=Yd(d);Yt.set(d,e)}return Yt.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}r.Mg=function(a){this.o=a};r.Tg=function(a){this.s=a};function Mt(a,b,c){return!Xt(b,c)&&!a.o||b.drmInfos&&!gi(b.drmInfos,c.drmInfos)?!1:!0}function Rt(a,b){return b.language?a.forced!==b.forced||0==Ae(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function St(){return!0}
|
|
910
|
+
function Tt(a,b,c){var d=Xt(a,b),e=Xt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Ae(a.language,b.language);e=Ae(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;
|
|
911
|
+
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Zt(a.channelsCount,b.channelsCount,c.channelsCount);if(d==$t)return!0;if(d==au)return!1;d=Zt(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==$t?!0:d==au?!1:a.bandwidth&&bu(a.bandwidth,b.bandwidth,c.bandwidth)==$t?!0:!1}
|
|
912
|
+
function Ut(a,b,c){var d=Xt(a,b),e=Xt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Zt(a.width*a.height,b.width*b.height,c.width*c.height);if(d==$t)return!0;if(d==au)return!1;if(a.frameRate){d=Zt(a.frameRate,b.frameRate,c.frameRate);if(d==$t)return!0;if(d==au)return!1}return a.bandwidth&&bu(a.bandwidth,b.bandwidth,c.bandwidth)==$t?!0:!1}
|
|
913
|
+
function Vt(a,b,c){var d=Ae(a.language,b.language),e=Ae(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;
|
|
914
|
+
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 Wt(a,b,c){return Zt(a.width*a.height,b.width*b.height,c.width*c.height)==$t?!0:!1}
|
|
915
|
+
function Gt(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}}
|
|
916
|
+
function Bt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Nk([]),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,fullMimeTypes:new Set}}
|
|
917
|
+
function Zt(a,b,c){if(b==a&&a!=c)return au;if(c==a&&a!=b)return $t;if(b>a){if(c<=a||c-a<b-a)return $t;if(c-a>b-a)return au}else{if(c>a)return au;if(a-c<a-b)return $t;if(a-c>a-b)return au}return cu}function bu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?$t:b<a?au:cu}function Lt(a){switch(a.type){case Nd:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
918
|
+
function yt(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 xt(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 zt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
919
|
+
function At(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}S("shaka.util.PeriodCombiner",vt);vt.prototype.setUseStreamOnce=vt.prototype.Tg;vt.prototype.setAllowMultiTypeVariants=vt.prototype.Mg;vt.prototype.combinePeriods=vt.prototype.Me;vt.prototype.getImageStreams=vt.prototype.Bh;vt.prototype.getTextStreams=vt.prototype.gf;vt.prototype.getVariants=vt.prototype.Uh;var $t=1,cu=0,au=-1,Yt=new Map;function du(a,b){var c=new DOMParser,d=eu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function fu(a,b){try{var c=rd(a);return du(c,b)}catch(d){return null}}
|
|
920
|
+
var eu=new Jc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function gu(){var a=this;this.i=this.g=null;this.A=[];this.l=null;this.S=1;this.B=[];this.j={ie:"",type:"",profiles:[],Cb:null,Ca:0,Aa:null,xd:0};this.o=new Map;this.s={};this.L={};this.m=new vt;this.F=0;this.N=new Ua(5);this.G=new Mc(function(){hu(a)});this.K=new eg;this.H=null;this.V=[];this.J=Infinity;this.C=!1;this.h=null}r=gu.prototype;
|
|
921
|
+
r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.l&&this.l.presentationTimeline.T()&&this.G.mc();this.h&&this.h.configure(this.g);this.m&&(this.m.Mg(this.g.dash.multiTypeVariantsAllowed&&ob()),this.m.Tg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.A=[a],c.i=b,E(e,iu(c),2);d=e.h;c.i&&ju(c,d);if(!c.i)throw new T(2,7,7001);return e.return(c.l)})};
|
|
922
922
|
r.stop=function(){for(var a=t(Object.values(this.s)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.i=null;this.A=[];this.l=null;this.s={};this.o.clear();this.j={ie:"",type:"",profiles:[],Cb:null,Ca:0,Aa:null,xd:0};this.m=null;null!=this.G&&(this.G.stop(),this.G=null);this.h&&this.h.destroy();return this.K.destroy()};
|
|
923
|
-
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ua(c,2),E(c,
|
|
923
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ua(c,2),E(c,iu(a),4);if(2!=c.g)return xa(c,0);b=ya(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.l&&this.l.presentationTimeline.T()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.l.presentationTimeline.Mb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,ju(this,0))}}};
|
|
924
924
|
r.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
925
|
-
function
|
|
926
|
-
function
|
|
927
|
-
p=a.g.dash.xlinkFailGracefully;q=
|
|
928
|
-
function
|
|
929
|
-
b.attributes.id||"";a.j.xd=gh(b,"publishTime",jh)||0;a.B=$g(b,"PatchLocation");u=Promise.resolve();if((v=dh(b,"ContentSteering"))&&a.i){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new
|
|
930
|
-
|
|
931
|
-
gh(b,"suggestedPresentationDelay",kh));Aa=a.g.dash.ignoreMaxSegmentDuration;Wa=null;Aa||(Wa=gh(b,"maxSegmentDuration",kh));ra=b.attributes.type||"static";a.j.type=ra;if(a.l)for(Za=a.l.presentationTimeline,ff=t(Object.values(a.s)),Dd=ff.next();!Dd.done;Dd=ff.next())be=Dd.value,be.segmentIndex&&be.segmentIndex.Ha(Za.jb());else od=a.g.defaultPresentationDelay||1.5*sa,Ec=null!=Qa?Qa:od,Za=new
|
|
932
|
-
(wa=a.g.availabilityWindowOverride);null==wa&&(wa=Infinity);Za.ue(wa);de=b.attributes.profiles||"";a.j.profiles=de.split(",");ee={qb:"static"!=ra,presentationTimeline:Za,ra:null,ha:null,pa:null,I:null,bandwidth:0,jf:!1,Ca:Q,Cb:null,profiles:de.split(",")};pd=
|
|
933
|
-
Za.vf(Wa||1);return E(ec,u,2);case 2:return a.C&&(sa=0,Bi=null!=Qa?Qa:a.g.defaultPresentationDelay,Za.Mf(Bi)),a.l?E(ec,
|
|
934
|
-
case 8:fe=ec.h;if(!a.i)return ec.return();Za.Og(fe);case 7:Za.ce();case 4:a.i.makeTextStreamsForClosedCaptions(a.l),F(ec)}})}function
|
|
935
|
-
function
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
P=$g(
|
|
939
|
-
Infinity));F(G)})}function
|
|
940
|
-
function
|
|
941
|
-
function
|
|
942
|
-
return c}function
|
|
943
|
-
function
|
|
944
|
-
q&&(a.
|
|
945
|
-
function
|
|
946
|
-
}d=c.filter(function(m){return!m.Vf});c=c.filter(function(m){return m.Vf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Vf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Ld:h.Ld},l=k.next())h.Ld=l.value,h.Ld.trickModeVideo=e.streams.find(function(m){return function(n){return Yd(m.Ld.codecs)==Yd(n.codecs)}}(h))}}}c=
|
|
947
|
-
d,Nd);d=
|
|
948
|
-
function
|
|
925
|
+
function iu(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=ku(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=ut(a.h,"Location",!0),e.length&&(d=e)),f=lg(d,a.g.retryParameters),g=Date.now(),E(m,lu(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.i)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,mu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.N.sample(1,l);return m.return(l)})}
|
|
926
|
+
function mu(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=mm;if(f!=g){qb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=fu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=td(h.outerHTML)}k=Tg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=nm;l!=m&&l(k);if("Patch"===d)return v.return(nu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(ou(a,k,c));
|
|
927
|
+
p=a.g.dash.xlinkFailGracefully;q=Cs(k,a.g.retryParameters,p,c,a.i.networkingEngine);fg(a.K,q);return E(v,q.promise,2)}u=v.h;return v.return(ou(a,u,c))})}
|
|
928
|
+
function ou(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H,K,G,M,L,N,P,R,Q,fa,sa,Ia,wa,Ja,Qa,Aa,Wa,ra,Za,ff,Dd,be,od,Ec,ce,de,ee,pd,zi,xg,Ai,Bi,yg,fe;return O(function(ec){switch(ec.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=$g(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=bh(l))p=Fd(d,[n])[0],m&&(a.h?tt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=ut(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.j.ie=
|
|
929
|
+
b.attributes.id||"";a.j.xd=gh(b,"publishTime",jh)||0;a.B=$g(b,"PatchLocation");u=Promise.resolve();if((v=dh(b,"ContentSteering"))&&a.i){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new pt(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=bh(v))(z=gh(v,"queryBeforeStart",qh,!1))?u=qt(a.h,A):qt(a.h,A);B=t(f.keys());for(y=B.next();!y.done;y=B.next())D=y.value,C=f.get(D),tt(a.h,"Location",D,C)}I=$g(b,"BaseURL");H=!1;if(a.h)for(K=t(I),G=K.next();!G.done;G=
|
|
930
|
+
K.next())M=G.value,L=M.attributes.serviceLocation,N=bh(M),L&&N&&(tt(a.h,"BaseURL",L,N),H=!0);H&&a.h||(P=I.map(bh),J=Fd(d,P));R=function(){return a.h&&H?ut(a.h,"BaseURL"):J?J:[]};a.j.Aa=R;Q=0;I&&I.length&&(Q=gh(I[0],"availabilityTimeOffset",ph)||0);a.j.Ca=Q;fa=a.g.dash.ignoreMinBufferTime;sa=0;fa||(sa=gh(b,"minBufferTime",kh)||0);a.F=gh(b,"minimumUpdatePeriod",kh,-1);Ia=gh(b,"availabilityStartTime",jh);wa=gh(b,"timeShiftBufferDepth",kh);Ja=a.g.dash.ignoreSuggestedPresentationDelay;Qa=null;Ja||(Qa=
|
|
931
|
+
gh(b,"suggestedPresentationDelay",kh));Aa=a.g.dash.ignoreMaxSegmentDuration;Wa=null;Aa||(Wa=gh(b,"maxSegmentDuration",kh));ra=b.attributes.type||"static";a.j.type=ra;if(a.l)for(Za=a.l.presentationTimeline,ff=t(Object.values(a.s)),Dd=ff.next();!Dd.done;Dd=ff.next())be=Dd.value,be.segmentIndex&&be.segmentIndex.Ha(Za.jb());else od=a.g.defaultPresentationDelay||1.5*sa,Ec=null!=Qa?Qa:od,Za=new rk(Ia,Ec,a.g.dash.autoCorrectDrift);Za.lc("static"==ra);(ce=Za.T())&&!isNaN(a.g.availabilityWindowOverride)&&
|
|
932
|
+
(wa=a.g.availabilityWindowOverride);null==wa&&(wa=Infinity);Za.ue(wa);de=b.attributes.profiles||"";a.j.profiles=de.split(",");ee={qb:"static"!=ra,presentationTimeline:Za,ra:null,ha:null,pa:null,I:null,bandwidth:0,jf:!1,Ca:Q,Cb:null,profiles:de.split(",")};pd=pu(a,ee,R,b);zi=pd.duration;xg=pd.periods;"static"!=ra&&pd.mg||Za.Ta(zi||Infinity);a.J&&!a.C&&(Ai=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.C=a.i.isLowLatencyMode());a.C?Za.Ng(a.J):a.J&&ab("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.");
|
|
933
|
+
Za.vf(Wa||1);return E(ec,u,2);case 2:return a.C&&(sa=0,Bi=null!=Qa?Qa:a.g.defaultPresentationDelay,Za.Mf(Bi)),a.l?E(ec,qu(a,pd.periods,!1),4):E(ec,a.m.Me(xg,ee.qb),6);case 6:a.l={presentationTimeline:Za,variants:a.m.j,textStreams:a.m.gf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:sa||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:ru(b),nextUrl:su(b)};if(!Za.Yg()){ec.u(7);break}yg=$g(b,"UTCTiming");return E(ec,tu(a,R,yg),8);
|
|
934
|
+
case 8:fe=ec.h;if(!a.i)return ec.return();Za.Og(fe);case 7:Za.ce();case 4:a.i.makeTextStreamsForClosedCaptions(a.l),F(ec)}})}function qu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Me(b,!0,c),2);a.l.variants=a.m.j;d=a.m.gf();0<d.length&&(a.l.textStreams=d);a.l.imageStreams=a.m.i;a.i.filter(a.l);F(e)})}
|
|
935
|
+
function nu(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H,K;return O(function(G){if(1==G.g){c=b.attributes.mpdId;d=gh(b,"originalPublishTime",jh);if(!c||c!==a.j.ie||d!==a.j.xd)throw a.B=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(Zg(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=sh(l.attributes.sel||""),n=m[m.length-1],p=bh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Kb){q=bh(l)||"";var M=kh(q);if(null!=M){a.j.Cb=M;for(var L=t(a.o.values()),N=L.next();!N.done;N=L.next())N.value.Cb=
|
|
936
|
+
M}}else if("type"===n.Kb){a.l.presentationTimeline.lc("static"==p);a.j.type=p;M=t(a.o.values());for(L=M.next();!L.done;L=M.next())L.value.qb="dynamic"==p;"static"==p&&(a.F=-1)}else"publishTime"===n.Kb?a.j.xd=jh(p)||0:null===n.Kb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)th(a.B,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(M=n.id,L=t(a.o.keys()),N=L.next();!N.done;N=L.next())if(N=N.value,N.startsWith(M)){var P=a.o.get(N);zs(P,
|
|
937
|
+
at,"SegmentTimeline").children=[];uu(a,N);a.o.delete(N)}}else if("SegmentTemplate"===n.name){L=sh(l.attributes.sel||"");M=L[L.length-1];if(M.Kb){L=Hu(a,L);N=bh(l)||"";P=t(L);for(var R=P.next();!R.done;R=P.next())R=a.o.get(R.value),uh(R.I.Ob,l.tagName,M.Kb,N);M=L}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){M=sh(l.attributes.sel||"");M=Hu(a,M);L=t(M);for(N=L.next();!N.done;N=L.next())N=a.o.get(N.value),N=zs(N,at,"SegmentTimeline"),
|
|
938
|
+
P=$g(N,"S"),th(P,l),N.children=P;z=M;B=t(z);for(w=B.next();!w.done;w=B.next())y=w.value,g.add(y)}D=t(g);for(w=D.next();!w.done;w=D.next())C=w.value,uu(a,C);I=t(f);for(J=I.next();!J.done;J=I.next())H=J.value,e.push.apply(e,x(pu(a,{qb:"dynamic"==a.j.type,presentationTimeline:a.l.presentationTimeline,ra:null,ha:null,pa:null,I:null,bandwidth:0,jf:!1,Ca:a.j.Ca,profiles:a.j.profiles,Cb:a.j.Cb},a.j.Aa,H).periods));return e.length?E(G,qu(a,e,!0),2):G.u(2)}"static"==a.j.type&&(K=a.j.Cb,a.l.presentationTimeline.Ta(K||
|
|
939
|
+
Infinity));F(G)})}function Hu(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.o.values()),e=a.next();!e.done;e=a.next())e=e.value,e.ra.id===c&&e.pa.id===d&&e.I.id&&b.push(c+","+e.I.id);return b}
|
|
940
|
+
function uu(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ha(a.l.presentationTimeline.jb());try{var e=$s(c,function(f,g,h,k){return Iu(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.L,c.I.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.u(0);f=d;return E(g,e.Wb(),3)}f.segmentIndex=g.h;F(g)})}}catch(f){if(b=c.I.contentType,b!=Nd&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
941
|
+
function ru(a){var b=dh(a,"ServiceDescription");if(!b)return null;a=dh(b,"Latency");b=dh(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
|
|
942
|
+
return c}function su(a){a=$g(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
|
|
943
|
+
function pu(a,b,c,d){var e=b.Cb;e||(e=gh(d,"mediaPresentationDuration",kh),a.j.Cb=e);var f=[],g=0;d=$g(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=gh(k,"start",kh,g),n=k.attributes.id,p=gh(k,"duration",kh),q=null;if(l){var u=gh(l,"start",kh);null!=u&&(q=u-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.H&&null!==n&&null!==m&&m<a.H)||a.V.includes(n)||h+1==d.length){null!==m&&(null===a.H||m>a.H)&&(a.H=m);g=Ju(a,b,c,{start:m,duration:q,node:k,sd:null==q||!l});f.push(g);b.ra.id&&
|
|
944
|
+
q&&(a.L[b.ra.id]=q);if(null==q){g=null;break}g=m+q}}a.V=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,mg:!1}:{periods:f,duration:g,mg:!0}}
|
|
945
|
+
function Ju(a,b,c,d){b.ra=Ku(a,d.node,null,c);b.ha=d;b.ra.Ca=b.Ca;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=$g(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Lu(a,d.start,d.duration,f.value,c);c=$g(d.node,"AdaptationSet").map(function(m){return Mu(a,b,m)}).filter(te);if(b.qb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ai);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);
|
|
946
|
+
}d=c.filter(function(m){return!m.Vf});c=c.filter(function(m){return m.Vf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Vf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Ld:h.Ld},l=k.next())h.Ld=l.value,h.Ld.trickModeVideo=e.streams.find(function(m){return function(n){return Yd(m.Ld.codecs)==Yd(n.codecs)}}(h))}}}c=Nu(a.g.disableAudio,d,"audio");e=Nu(a.g.disableVideo,d,"video");f=Nu(a.g.disableText,
|
|
947
|
+
d,Nd);d=Nu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.ra.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Nu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
948
|
+
function Mu(a,b,c){function d(G){switch(G){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.pa=Ku(a,c,b.ra,null);var f=!1,g=$g(c,"Role"),h=g.map(function(G){return G.attributes.value}).filter(te),k=void 0,l=b.pa.contentType==Nd;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
|
|
949
949
|
n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,q;n=$g(c,"EssentialProperty");g=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?g=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?q=d(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=
|
|
950
|
-
w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=$g(c,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(q=d(parseInt(v.attributes.value,10)));n=$g(c,"Accessibility");var z=new Map,
|
|
951
|
-
n.next();!v.done;v=n.next())if(w=v.value,v=w.attributes.schemeIdUri,w=w.attributes.value,"urn:scte:dash:cc:cea-608:2015"==v)if(v=1,null!=w){w=w.split(";");for(var
|
|
952
|
-
|
|
953
|
-
$g(c,"Label"))&&m.length&&(m=ah(m[0]))&&(
|
|
954
|
-
b.pa.contentType;l=b.pa.id||"__fake__"+a.S++;n=t(c);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(
|
|
955
|
-
function
|
|
956
|
-
16!=
|
|
957
|
-
return Promise.resolve(
|
|
958
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(
|
|
950
|
+
w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=$g(c,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(q=d(parseInt(v.attributes.value,10)));n=$g(c,"Accessibility");var z=new Map,B;n=t(n);for(v=
|
|
951
|
+
n.next();!v.done;v=n.next())if(w=v.value,v=w.attributes.schemeIdUri,w=w.attributes.value,"urn:scte:dash:cc:cea-608:2015"==v)if(v=1,null!=w){w=w.split(";");for(var y=t(w),D=y.next();!D.done;D=y.next()){var C=D.value,I=D=void 0;C.includes("=")?(C=C.split("="),D=C[0].startsWith("CC")?C[0]:"CC"+C[0],I=C[1]||"und"):(D="CC"+v,2==w.length?v+=2:v++,I=C);z.set(D,we(I))}}else z.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==v)if(v=1,null!=w)for(w=t(w.split(";")),D=w.next();!D.done;D=w.next())D=D.value,
|
|
952
|
+
C=y=void 0,D.includes("=")?(D=D.split("="),y="svc"+D[0],C=D[1].split(",")[0].split(":").pop()):(y="svc"+v,v++,C=D),z.set(y,we(C));else z.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?B="visually impaired":"2"==w&&(B="hard of hearing"));if(m)return null;m=$g(c,"ContentProtection");var J=ls(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),H=we(b.pa.language||"und"),K=c.attributes.label;(m=
|
|
953
|
+
$g(c,"Label"))&&m.length&&(m=ah(m[0]))&&(K=m);m=$g(c,"Representation");c=m.map(function(G){if(G=Ou(a,b,J,k,H,K,f,h,z,G,B,A))G.hdr=G.hdr||p,G.colorGamut=G.colorGamut||q,G.fastSwitching=u;return G}).filter(function(G){return!!G});if(0==c.length){g="image"==b.pa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new T(2,4,4003);}if(!b.pa.contentType||"application"==b.pa.contentType)for(b.pa.contentType=Pu(c[0].mimeType,c[0].codecs),l=t(c),v=l.next();!v.done;v=l.next())v.value.type=
|
|
954
|
+
b.pa.contentType;l=b.pa.id||"__fake__"+a.S++;n=t(c);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(J.drmInfos);for(y=w.next();!y.done;y=w.next())y=y.value,y.keyIds=y.keyIds&&v.keyIds?new Set([].concat(x(y.keyIds),x(v.keyIds))):y.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(G){return G.attributes.id}).filter(te);return{id:l,contentType:b.pa.contentType,language:H,Sj:f,streams:c,drmInfos:J.drmInfos,Vf:g,Ai:m}}
|
|
955
|
+
function Ou(a,b,c,d,e,f,g,h,k,l,m,n){b.I=Ku(a,l,b.pa,null);var p=b.I.id;a.J=Math.min(a.J,b.I.Ca);if(!Qu(b.I))return null;var q=b.ha.start;b.bandwidth=gh(l,"bandwidth",nh)||0;var u=b.I.contentType,v=u==Nd||"application"==u;u="image"==u;try{var w=void 0;if(c.Ie){var A=b.I.Aa,z=Fd(A(),[c.Ie.gi]),B=lg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Ie.iv,firstMediaSequenceNumber:0,fetchKey:function(){var K,G,M;return O(function(L){if(1==L.g)return E(L,lu(a,B,6),2);if(3!=L.g){K=L.h;if(!K.data||
|
|
956
|
+
16!=K.data.byteLength)throw new T(2,4,4049);G={name:"AES-CBC"};M=w;return E(L,window.crypto.subtle.importKey("raw",K.data,G,!0,["decrypt"]),3)}M.cryptoKey=L.h;w.fetchKey=void 0;F(L)})}}}b.I.aesKey=w;A=function(K,G,M,L){return Iu(a,K,G,M,L)};if(b.I.Jc)var y=Ps(b,A,w);else if(b.I.Gb)y=Vs(b,a.s,w);else if(b.I.Ob)y=$s(b,A,a.s,!!a.l,a.g.dash.initialSegmentLimit,a.L,w,n,!1);else{var D=b.ha.duration||0,C=b.I.Aa;y={Wb:function(){var K=Pk(q,D,C());K.wc(function(G){G.mimeType=b.I.mimeType;G.codecs=b.I.codecs});
|
|
957
|
+
return Promise.resolve(K)}}}}catch(K){if((v||u)&&4002==K.code)return null;throw K;}n=$g(l,"ContentProtection");n=ps(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;$g(l,"SupplementalProperty").some(function(K){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==K.attributes.schemeIdUri&&"JOC"==K.attributes.value})&&(A=!0);z=!1;v&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var I;if(u&&((l=$g(l,"EssentialProperty").find(function(K){return["http://dashif.org/thumbnail_tile",
|
|
958
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(K.attributes.schemeIdUri)}))&&(I=l.attributes.value),!I))return null;var J;l=b.I.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");v=b.I.id?b.ra.id+","+b.I.id:"";a.B.length&&p&&a.o.set(b.ra.id+","+p,Ru(b));var H=v&&a.s[v]?a.s[v]:{id:a.S++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){H.segmentIndex&&
|
|
959
959
|
(H.segmentIndex.release(),H.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:l,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.pa.language,label:f,type:b.pa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.I.Ec,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:A,
|
|
960
|
-
closedCaptions:k,hdr:
|
|
961
|
-
function
|
|
962
|
-
b[d]={start:e.start,duration:e.duration,node:null,sd:e.sd}):b[d]=a[d];return b}function
|
|
963
|
-
function
|
|
964
|
-
function
|
|
965
|
-
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=
|
|
966
|
-
ph)||0:0;z=c.Ca+
|
|
967
|
-
function
|
|
968
|
-
function
|
|
969
|
-
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
|
|
970
|
-
function
|
|
971
|
-
function
|
|
972
|
-
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":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,
|
|
960
|
+
closedCaptions:k,hdr:J,colorGamut:void 0,videoLayout:void 0,tilesLayout:I,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Rd(b.I.mimeType,b.I.codecs)])};H.createSegmentIndex=function(){var K;return O(function(G){if(1==G.g){if(H.segmentIndex)return G.u(0);K=H;return E(G,y.Wb(),3)}K.segmentIndex=G.h;F(G)})};v&&b.qb&&!a.s[v]&&(a.s[v]=H);return H}
|
|
961
|
+
function Ru(a){for(var b={},c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,["period","adaptationSet","representation"].includes(d)){var e=a[d];b[d]={Jc:null,Gb:null,Ob:e.Ob,Aa:e.Aa,width:e.width,height:e.height,contentType:e.contentType,mimeType:e.mimeType,language:e.language,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,emsgSchemeIdUris:e.emsgSchemeIdUris,id:e.id,Ec:e.Ec,audioSamplingRate:e.audioSamplingRate,Ca:e.Ca,Bc:e.Bc}}else"periodInfo"==d?(e=a[d],
|
|
962
|
+
b[d]={start:e.start,duration:e.duration,node:null,sd:e.sd}):b[d]=a[d];return b}function hu(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,ua(d,2),E(d,iu(a),4);case 4:b=d.h;xa(d,3);break;case 2:if(c=ya(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();ju(a,b);F(d)}})}
|
|
963
|
+
function ju(a,b){if(!(0>a.F)){var c=a.F;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.G.W(Math.max(c-b,Va(a.N)))}}
|
|
964
|
+
function Ku(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ec:null,audioSamplingRate:null,Ca:0,If:0};d=d||c.Aa;var e=b.attributes.id,f=$g(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=bh(m);l&&m&&(tt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(bh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=hh(b,
|
|
965
|
+
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=mt(m).join(",");n=gh(b,"frameRate",rh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,q=Su($g(b,"InbandEventStream"),c.emsgSchemeIdUris),u=$g(b,"AudioChannelConfiguration");u=Tu(u)||c.Ec;var v=gh(b,"audioSamplingRate",oh)||c.audioSamplingRate;k||(k=Pu(l,m));var w=dh(b,"SegmentBase"),A=dh(b,"SegmentTemplate"),z=w?gh(w,"availabilityTimeOffset",ph)||0:0,B=A?gh(A,"availabilityTimeOffset",ph)||0:0,y=f&&f.length?gh(f[0],"availabilityTimeOffset",
|
|
966
|
+
ph)||0:0;z=c.Ca+y+z+B;B=null;(y=dh(b,"SegmentSequenceProperties"))&&(y=dh(y,"SAP"))&&(B=gh(y,"cadence",mh));return{Aa:function(){return Fd(d(),f.length?a.h&&h?ut(a.h,e):g?g:[]:[])},Jc:w||c.Jc,Gb:dh(b,"SegmentList")||c.Gb,Ob:A||c.Ob,width:gh(b,"width",oh)||c.width,height:gh(b,"height",oh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:q,id:e,language:b.attributes.lang,Ec:u,audioSamplingRate:v,Ca:z,Bc:null,If:B||c.If}}
|
|
967
|
+
function Su(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
968
|
+
function Tu(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
969
|
+
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 Qu(a){var b=a.Jc?1:0;b+=a.Gb?1:0;b+=a.Ob?1:0;if(0==b)return a.contentType==Nd||"application"==a.contentType?!0:!1;1!=b&&(a.Jc&&(a.Gb=null),a.Ob=null);return!0}
|
|
970
|
+
function Uu(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[wd(c)],f=Fd(b(),e),g=lg(f,a.g.retryParameters),g.method=d,h=a.i.networkingEngine.request(4,g),fg(a.K,h),E(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=md(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
971
|
+
function tu(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ua(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.u(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.u(8);
|
|
972
|
+
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":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,Uu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return E(n,Uu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:xa(n,
|
|
973
973
|
3);break;case 5:ya(n);case 3:g=f.next();n.u(2);break;case 4:return ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
974
|
-
function
|
|
975
|
-
function
|
|
976
|
-
function
|
|
977
|
-
function
|
|
978
|
-
function
|
|
979
|
-
function
|
|
980
|
-
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=
|
|
981
|
-
g.name&&(g.attributes.push(new
|
|
982
|
-
var
|
|
983
|
-
function
|
|
984
|
-
this.K=new Map;this.ua=new Map;this.na=new Map;this.hb=this.C=!1;this.gb=new Ua(5);this.j=null;this.da=!0}r=
|
|
974
|
+
function Lu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=gh(d,"timescale",oh)||1;d=t($g(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=gh(k,"presentationTime",oh)||0,m=gh(k,"duration",oh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:vh(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
|
|
975
|
+
function Iu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=rg,g=e?0:1,h=rl(b,c,d,a.g.retryParameters),E(l,lu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Pu(a,b){b=Rd(a,b);return je(b)?Nd:a.split("/")[0]}function lu(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);fg(a.K,b);return b.promise}
|
|
976
|
+
function ku(a){var b=a.j.xd;if(!a.j.ie||!b||!a.B.length)return[];var c=Date.now()/1E3,d=a.B.filter(function(e){e=oh(e.attributes.ttl);return!e||b+e>c}).map(bh).filter(te);return d.length?Fd(a.A,d):[]}S("shaka.dash.DashParser",gu);si["application/dash+xml"]=function(){return new gu};si["video/vnd.mpeg.dash.mpd"]=function(){return new gu};function Vu(){}S("shaka.dependencies",Vu);Vu.has=function(a){return Wu.has(a)};Vu.add=function(a,b){if(!Xu[a])throw Error(a+" is not supported");a==Yu?qb("mux.js","mux.js is no longer used in Shaka Player."):Wu.set(a,function(){return b})};var Yu="muxjs",Xu={Tj:Yu,ISOBoxer:"ISOBoxer"};Vu.Allowed=Xu;var Wu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Zu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function $u(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}$u.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
977
|
+
function av(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function bv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=bv(a,b))?a.value:c||null}function cv(a,b){a=bv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function dv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.ub=c}function ev(a,b){this.name=a;this.value=b};function fv(a,b){return a.filter(function(c){return c.name==b})}function gv(a,b){return a.filter(function(c){return cv(c,"TYPE")==b})}function hv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function iv(a,b,c){c=void 0===c?0:c;return(a=hv(a,b))?Number(a.value):c}function jv(a,b,c){return b?kv(a,[b],c):[]}
|
|
978
|
+
function kv(a,b,c){if(!b.length)return[];b=Fd(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new T(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function lv(a){this.h=a||"";this.g=0}function mv(a){nv(a,/[ \t]+/gm)}function nv(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function ov(a){return a.g==a.h.length?null:(a=nv(a,/[^ \t\n]*/gm))?a[0]:null};function pv(){this.g=0}
|
|
979
|
+
function qv(a,b){b=md(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=rv(a,f),--a.g,sv.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=rv(a,g);if(tv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
980
|
+
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=rv(a,k),sv.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new dv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new dv("",d,f)));return new Zu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
981
|
+
g.name&&(g.attributes.push(new ev("URI",h)),d=!0)}}return new Zu(b,e)}function rv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new lv(d);var f;(f=nv(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=nv(d,g);)c.push(new ev(f[1],f[2]||f[3])),mv(d)}return new $u(a,b,c,e)}
|
|
982
|
+
var sv="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),tv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function uv(){}function vv(a){try{var b=wv(a);return Yf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Wf(c)}}
|
|
983
|
+
function wv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Ad(a):e=td(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",uv);uv.parse=vv;hg("data",vv);function xv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Nd,new Map);this.N.set("image",new Map);this.Wa=new Set;this.i=new Map;this.l=null;this.L="";this.Ka=new pv;this.J=-1;this.ba=Infinity;this.aa=this.pb=!1;this.A=new Mc(function(){yv(a)});this.oa=zv;this.o=null;this.Xa=0;this.m=Infinity;this.Ja=this.va=this.S=0;this.V=new eg;this.F=new Map;this.G=new Map;this.ca=new Map;this.fa=new Map;
|
|
984
|
+
this.K=new Map;this.ua=new Map;this.na=new Map;this.hb=this.C=!1;this.gb=new Ua(5);this.j=null;this.da=!0}r=xv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.C=b.isLowLatencyMode(),E(e,Av(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,E(e,Bv(c,d.data,a),3)):e.return(c.o)})};
|
|
985
985
|
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.V&&(a.push(this.V.destroy()),this.V=null);this.g=this.h=null;this.Wa.clear();this.o=null;this.i.clear();this.H.clear();this.G.clear();this.s.clear();this.ca.clear();this.fa.clear();this.K.clear();this.ua.clear();this.na.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
986
|
-
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!
|
|
987
|
-
h&&
|
|
988
|
-
function
|
|
989
|
-
b.
|
|
990
|
-
"SKIPPED-SEGMENTS")):0,H=
|
|
991
|
-
function
|
|
986
|
+
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!Cv(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Dv(a,g));return E(m,Promise.all(b),2)}Ev(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.nd});d.length&&!h&&(k=Fv,Gv(a,k.eh),l=d.map(function(n){return n.Bb}),a.l.Ta(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
987
|
+
h&&Hv(a);F(m)})};function Iv(a,b){return Cv(a)?a.N.get(b.type):b.fe}
|
|
988
|
+
function Dv(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H,K,G,M,L,N,P;return O(function(R){if(1==R.g){c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Pd&&(0<=b.lb&&h.add("_HLS_msn",String(b.lb)),0<=b.mb&&h.add("_HLS_part",String(b.mb))),b.Qd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return E(R,Av(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=qv(a.Ka,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
|
|
989
|
+
b.M().includes(m)||b.Hg.push(m);n=fv(l.g,"EXT-X-DEFINE");p=Jv(a,n,m);q=b.stream;u=Iv(a,b);return E(R,Kv(a,l,q.mimeType,b.M,p),3)}v=R.h;w=v.keyIds;A=v.drmInfos;z=function(Q,fa){return Q.size===fa.size&&[].concat(x(Q)).every(function(sa){return fa.has(sa)})};z(q.keyIds,w)||(q.keyIds=w,q.drmInfos=A,a.h.newDrmInfo(q));B=Lv(a,l,q,u,p,b.M,b.type);y=B.segments;if(D=B.bandwidth)q.bandwidth=D;q.segmentIndex.ud(y,a.l.jb());y.length&&(C=iv(l.g,"EXT-X-MEDIA-SEQUENCE",0),J=(I=hv(l.g,"EXT-X-SKIP"))?Number(Z(I,
|
|
990
|
+
"SKIPPED-SEGMENTS")):0,H=Mv(C,y),K=H.lb,G=H.mb,b.lb=K+J,b.mb=G,M=u.get(C),q.segmentIndex.Ha(M));L=q.segmentIndex.g[0]||null;b.hc=L.startTime;N=y[y.length-1];b.Bb=N.endTime;if(P=hv(l.g,"EXT-X-ENDLIST"))b.nd=!0;Nv(a,l);F(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
991
|
+
function Ov(a,b){for(var c=-1==a.J,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=Iv(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.J=Math.max(a.J,k));e.Pe=k;break}}}}if(!(0>a.J))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,Pv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.Pe,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Qv(a,
|
|
992
992
|
c,d)}
|
|
993
|
-
function
|
|
994
|
-
function
|
|
995
|
-
function
|
|
996
|
-
u=
|
|
997
|
-
|
|
993
|
+
function Rv(a,b){if(Infinity==a.ba){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.ba=Math.min(a.ba,d.h))}}b=a.ba;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!Pv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)$a("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.M(),"Expect AV sync issues!");else for(Qv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Rf(b)}}}
|
|
994
|
+
function Qv(a,b,c){b.hc+=c;b.Bb+=c;a=Iv(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}
|
|
995
|
+
function Bv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H,K,G,M,L,N,P,R,Q,fa,sa,Ia,wa,Ja,Qa,Aa,Wa;return O(function(ra){switch(ra.g){case 1:d=qv(a.Ka,b);e=fv(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new rk(null,0);a.l.lc(!0);k=function(){return[c]};if(1==d.type)return a.da=!1,w=fv(d.g,"EXT-X-DEFINE"),A=Jv(a,w,a.L),E(ra,Sv(a,d,k,A),7);Tv(a,e);l=fv(d.g,"EXT-X-MEDIA");m=fv(d.g,"EXT-X-STREAM-INF");n=fv(d.g,"EXT-X-IMAGE-STREAM-INF");p=fv(d.g,"EXT-X-I-FRAME-STREAM-INF");q=fv(d.g,"EXT-X-SESSION-KEY");
|
|
996
|
+
u=fv(d.g,"EXT-X-SESSION-DATA");v=fv(d.g,"EXT-X-CONTENT-STEERING");Uv(a,u);return E(ra,Vv(a,v),4);case 4:return Wv(a,m),Xv(a,l),E(ra,Yv(a,m,q,l,k,a.s),5);case 5:return f=ra.h,g=Zv(a,l),E(ra,$v(a,n,p),6);case 6:h=ra.h;ra.u(3);break;case 7:return z=ra.h,B=z.type,y=z.mimeType,D=z.codecs,C=z.language,I=z.height,J=z.width,H=z.channelCount,K=z.sampleRate,G=z.closedCaptions,M=z.$f,L=z.colorGamut,E(ra,aw(a,a.B++,A,d,k,D,B,C,!0,"Media Playlist",H,G,null,!1,K,!1,y),8);case 8:N=ra.h,a.i.set(c,N),"video"==B&&
|
|
997
|
+
bw(N.stream,J,I,null,M,null,L),f.push({id:0,language:we(C||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==B?N.stream:null,video:"video"==B?N.stream:null,bandwidth:N.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==d.type&&(Cv(a)&&(cw(a,d),P=a.m,a.A.W(P)),R=Array.from(a.i.values()),dw(a,R),Hv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
998
998
|
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.aa||!a.g.hls.disableCodecGuessing){ra.u(9);break}Q=[];fa=t(a.o.variants);for(sa=fa.next();!sa.done;sa=fa.next())Ia=sa.value,Ia.audio&&""===Ia.audio.codecs&&Q.push(Ia.audio.createSegmentIndex()),Ia.video&&""===Ia.video.codecs&&Q.push(Ia.video.createSegmentIndex());return E(ra,Promise.all(Q),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){wa=
|
|
999
999
|
[];Ja=f[0];Qa=t([Ja.video,Ja.audio]);for(Aa=Qa.next();!Aa.done;Aa=Qa.next())(Wa=Aa.value)&&!Wa.segmentIndex&&wa.push(Wa.createSegmentIndex());if(0<wa.length)return E(ra,Promise.all(wa),0)}ra.u(0)}})}
|
|
1000
|
-
function
|
|
1001
|
-
t(
|
|
1002
|
-
case "opus":L.push("opus"),
|
|
1003
|
-
closedCaptions:
|
|
1004
|
-
function
|
|
1005
|
-
c.h&&a.l.Pg(c.h);a.l.ce()}function
|
|
1006
|
-
function
|
|
1007
|
-
function
|
|
1008
|
-
function
|
|
1009
|
-
function
|
|
1010
|
-
function
|
|
1011
|
-
function
|
|
1012
|
-
function
|
|
1013
|
-
p=Z(g,"CHARACTERISTICS"),q=
|
|
1014
|
-
function
|
|
1015
|
-
function
|
|
1016
|
-
z(m,""):null;Wa.u(6);break}return E(Wa,
|
|
1017
|
-
wa=Z(
|
|
1018
|
-
function
|
|
1019
|
-
"URI")});k=e.audio.find(function(w){return w&&w.
|
|
1020
|
-
p=Z(c,"NAME"),q=
|
|
1021
|
-
function
|
|
1022
|
-
function
|
|
1023
|
-
function
|
|
1000
|
+
function Sv(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J;return O(function(H){switch(H.g){case 1:e=kt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return H.return(e);f=b.segments[0];g=jv(c(),f.h,d);h=g[0];k=new rc(h);l=k.Qa.split(".").pop();if(m=ew[l])return H.return(kt(m));n=rg;p=null;q=fw(a,b,f.g,c,d);a.ca.clear();if(!q){H.u(2);break}u=rl(q.M(),q.ac(),q.Yb(),a.g.retryParameters);return E(H,gw(a,u,n,{type:0}),3);case 3:v=H.h,p=v.data;case 2:w=0;A=null;if(z=hv(f.g,"EXT-X-BYTERANGE"))B=
|
|
1001
|
+
t(hw(null,z.value)),w=B.next().value,A=B.next().value;y=rl(g,w,A,a.g.retryParameters);return E(H,gw(a,y,n,{type:1}),4);case 4:D=H.h;(C=D.headers["content-type"])&&(C=C.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==C){var K=D.data;var G=Ab(K);G=(new sj).parse(G);var M=G.hd();G=G.hf();var L=[],N=!1,P=!1;switch(M.audio){case "aac":case "aac-loas":L.push("mp4a.40.2");N=!0;break;case "mp3":L.push("mp4a.40.34");N=!0;break;case "ac3":L.push("ac-3");N=!0;break;case "ec3":L.push("ec-3");N=!0;break;
|
|
1002
|
+
case "opus":L.push("opus"),N=!0}switch(M.video){case "avc":G.Ga?L.push(G.Ga):L.push("avc1.42E01E");P=!0;break;case "hvc":G.Ga?L.push(G.Ga):L.push("hvc1.1.6.L93.90");P=!0;break;case "av1":L.push("av01.0.01M.08"),P=!0}if(L.length){M=N&&!P;N=new Map;if(P){P=new Gb("video/mp2t");P.i(K);K=t(P.j());for(var R=K.next();!R.done;R=K.next())R=R.value,N.set(R,R);P.g()}G={type:M?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:G.height,width:G.width,channelCount:null,sampleRate:null,
|
|
1003
|
+
closedCaptions:N,$f:null,colorGamut:null}}else G=null;if(I=G)return H.return(I)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==C||"audio/mp4"==C||"video/iso.segment"==C)if(J=lt(p,D.data))return H.return(J);return H.return(e)}})}
|
|
1004
|
+
function Hv(a){if(Cv(a)){if(a.oa==iw){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Bb),c=Math.min(c,e.hc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ue(b)}}else a.l.Ta(jw(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1005
|
+
c.h&&a.l.Pg(c.h);a.l.ce()}function Tv(a,b){var c=(new rc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
1006
|
+
function Jv(a,b,c){c=(new rc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
|
|
1007
|
+
function Wv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=kw(a,d);if(f){var g=Ld(Nd,d);a.G.set(f,g);Kb(d,g)}e&&(f=Ld("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Ld("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
1008
|
+
function Uv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",jv([a.L],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1009
|
+
function Vv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new pt(a.h);a.j.configure(a.g);a.j.i=[a.L];a.j.setManifestType("HLS");a.j.h=g;c=qt(a.j,h);break}return E(k,c,0)})}
|
|
1010
|
+
function Zv(a,b){var c=gv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return lw(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=cv(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=mw(Nd,d)||nw(Nd),ow(f.stream)}}return b.filter(function(g){return g})}
|
|
1011
|
+
function ow(a){a.fullMimeTypes=new Set([Rd(a.mimeType,a.codecs)])}
|
|
1012
|
+
function $v(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ua(m,2);return E(m,pw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=ya(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=cv(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
|
|
1013
|
+
p=Z(g,"CHARACTERISTICS"),q=qw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;q.stream.width=Number(w)||void 0;q.stream.height=Number(A)||void 0;var z=Z(g,"BANDWIDTH");z&&(q.stream.bandwidth=Number(z));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1014
|
+
function rw(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=av(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)lw(a,d[g],c)}
|
|
1015
|
+
function Yv(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H,K,G,M,L,N,P,R,Q,fa,sa,Ia,wa,Ja,Qa,Aa;return O(function(Wa){switch(Wa.g){case 1:g=[];h=new Set;if(!(0<c.length)){Wa.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Wa.u(2);break}m=l.value;n=cv(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";q=null;if("NONE"==n){Wa.u(4);break}if(sw(n)){u=jv(e(),cv(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=lg(u,a.g.retryParameters),A=gw(a,w,6),a.K.set(v,A));Wa.u(4);break}if("identity"!=p){q=(z=tw[p])?
|
|
1016
|
+
z(m,""):null;Wa.u(6);break}return E(Wa,uw(a,m,"",e,null,f),9);case 9:q=Wa.h;case 6:if(q){if(q.keyIds)for(B=t(q.keyIds),y=B.next();!y.done;y=B.next())D=y.value,h.add(D);g.push(q)}case 4:l=k.next();Wa.u(3);break;case 2:C={};I=t(b);for(J=I.next();!J.done;J=I.next())H=J.value,K=av(H),C[K]?C[K].push(H):C[K]=[H];G=[];for(M in C)L=C[M],N=L[0],P=Z(N,"FRAME-RATE"),R=Number(Z(N,"AVERAGE-BANDWIDTH"))||Number(cv(N,"BANDWIDTH")),Q=Z(N,"RESOLUTION"),fa=t(Q?Q.split("x"):[null,null]),sa=fa.next().value,Ia=fa.next().value,
|
|
1017
|
+
wa=Z(N,"VIDEO-RANGE"),(Ja=Z(N,"REQ-VIDEO-LAYOUT"))&&Ja.includes(",")&&(Qa=Ja.split(",").filter(function(ra){return"CH-STEREO"==ra||"CH-MONO"==ra}),Ja=Qa[0]),Ja=Ja||"CH-MONO",Aa=vw(a,L,d,R),G.push.apply(G,x(ww(a,Aa.audio,Aa.video,R,sa,Ia,P,wa,Ja,g,h)));return Wa.return(G.filter(function(ra){return null!=ra}))}})}
|
|
1018
|
+
function vw(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=t(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Z(n,"AUDIO");var p=Z(n,"VIDEO"),q=m||p;q&&(g.includes(q)||g.push(q),(n=Z(n,"PATHWAY-ID"))&&f.set(q,n),m?h=!0:p&&(k=!0))}g.length&&c.length&&(l=c.filter(function(w){return g.includes(cv(w,"GROUP-ID"))}),rw(a,l,f));l=(f=g.sort().join(","))&&a.H.has(f)?a.H.get(f):[];h?e.audio.push.apply(e.audio,x(l)):k&&e.video.push.apply(e.video,x(l));m=!1;var u=b.map(function(w){return cv(w,
|
|
1019
|
+
"URI")});k=e.audio.find(function(w){return w&&w.M().find(function(A){return u.includes(A)})});h=kw(a,b[0]);p=Ld("video",h);(q=Ld("audio",h))&&!p?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&q&&p?(k="video",h=[[p,q].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var v=n=q=p=m=null;!l.length&&(c=c.find(function(w){var A=Z(w,"URI")||"",z=Z(w,"TYPE");w=cv(w,"GROUP-ID");return"SUBTITLES"!=z&&""==A&&g.includes(w)}))&&(m=Z(c,"LANGUAGE"),
|
|
1020
|
+
p=Z(c,"NAME"),q=xw(c),yw(c),n=Z(c,"CHARACTERISTICS"),v=zw(c));a=Aw(a,b,h,k,m,p,q,n,v);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
|
|
1021
|
+
function kw(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.aa=0<c.length;a.aa||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return mt(a)}function xw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1022
|
+
function zw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function yw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1023
|
+
function ww(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())bw(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var q=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=q?q.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;p=q?q.stream.drmInfos:null;q=q?q.M().sort().join(","):"";var u=f?f.M().sort().join(","):
|
|
1024
1024
|
"";q=q+" - "+u;h&&k&&!gi(n,p)||a.Wa.has(q)||(h={id:a.B++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Wa.add(q))}return e}
|
|
1025
|
-
function
|
|
1026
|
-
function
|
|
1027
|
-
m=n.next().value;n=n.next().value;(m=c.get(m))&&
|
|
1028
|
-
function
|
|
1025
|
+
function Xv(a,b){b=gv(b,"CLOSED-CAPTIONS");a.da=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=we(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=cv(d,"GROUP-ID");d=cv(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
|
|
1026
|
+
function lw(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=cv(k,"URI");k=cv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=cv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Nd);if(k==Nd)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
1027
|
+
m=n.next().value;n=n.next().value;(m=c.get(m))&&tt(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?xw(h):null;var p="audio"==k?yw(h):!1,q=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?zw(h):null;d=qw(a,l,d,b,k,c,m,f,n,null,q,u,h,p);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.i.set(e,d);return d}
|
|
1028
|
+
function pw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=cv(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=qw(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?E(p,h.stream.createSegmentIndex(),3):p.u(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
1029
1029
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1030
|
-
function
|
|
1031
|
-
function
|
|
1032
|
-
4);case 4:P=ra.h,!P.closedCaptions.size||l&&l.size==P.closedCaptions.size||(l=P.closedCaptions,
|
|
1033
|
-
fa.mimeType;w.bandwidth=w.bandwidth||fa.bandwidth;w.codecs=w.codecs||fa.codecs;w.closedCaptions=w.closedCaptions||fa.closedCaptions;
|
|
1034
|
-
Aa=Qa.filter(function(Za){return Za.stream.segmentIndex}),
|
|
1035
|
-
|
|
1036
|
-
function
|
|
1037
|
-
function
|
|
1038
|
-
function
|
|
1039
|
-
|
|
1040
|
-
type:g,Hg:[],
|
|
1041
|
-
function
|
|
1030
|
+
function Aw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var q=p.value;p=cv(q,"URI");q=Z(q,"PATHWAY-ID");a.j&&q&&tt(a.j,l,q,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.da=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}b=null}c=Kd(d,c);d=qw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
1031
|
+
function qw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(D){var C,I,J,H,K,G,M,L,N,P,R,Q,fa,sa,Ia,wa,Ja,Qa,Aa,Wa;return O(function(ra){switch(ra.g){case 1:return C=Pd,I=z.M(),E(ra,Av(a,z.M(),!0),2);case 2:J=ra.h;if(D.aborted)return ra.return();H=J.uri;H==J.originalUri||I.includes(H)||A.push(H);K=qv(a.Ka,J.data);G=fv(K.g,"EXT-X-DEFINE");M=Jv(a,G,H);L=void 0;N=!1;if(!(!a.aa&&a.g.hls.disableCodecGuessing||a.da&&e==C.ga&&!a.g.hls.disableClosedCaptionsDetection)){ra.u(3);break}a.da=!1;return E(ra,Sv(a,K,v,M),
|
|
1032
|
+
4);case 4:P=ra.h,!P.closedCaptions.size||l&&l.size==P.closedCaptions.size||(l=P.closedCaptions,N=!0),!a.aa&&a.g.hls.disableCodecGuessing&&(L=P.mimeType,d=P.codecs);case 3:return R=Cv(a),E(ra,aw(a,0,M,K,v,d,e,f,g,h,k,l,m,n,p,q,L),5);case 5:Q=ra.h;if(D.aborted)return ra.return();fa=Q.stream;Cv(a)&&!R&&cw(a,K);z.hc=Q.hc;z.Bb=Q.Bb;z.Qd=Q.Qd;z.Pd=Q.Pd;z.nd=Q.nd;z.fe=Q.fe;z.lb=Q.lb;z.mb=Q.mb;z.rf=!0;w.segmentIndex=fa.segmentIndex;w.encrypted=fa.encrypted;w.drmInfos=fa.drmInfos;w.keyIds=fa.keyIds;w.mimeType=
|
|
1033
|
+
fa.mimeType;w.bandwidth=w.bandwidth||fa.bandwidth;w.codecs=w.codecs||fa.codecs;w.closedCaptions=w.closedCaptions||fa.closedCaptions;ow(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&N&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==C.ga||e==C.U)for(sa=t(a.i.values()),Ia=sa.next();!Ia.done;Ia=sa.next())wa=Ia.value,wa.rf||wa.type!=e||(wa.stream.mimeType=fa.mimeType,ow(wa.stream));e==C.ma&&(Ja=fa.segmentIndex.get(0))&&Ja.ea&&(w.mimeType="application/mp4",ow(w));Bw(a)&&(a.pb?dw(a,[z]):(a.pb=!0,Qa=Array.from(a.i.values()),
|
|
1034
|
+
Aa=Qa.filter(function(Za){return Za.stream.segmentIndex}),dw(a,Aa),Hv(a),Wa=a.m,0<Wa&&a.A.W(Wa)));F(ra)}})}function v(){return a.j&&1<c.length?ut(a.j,b):A.concat(kv([a.L],c,a.s))}var w=Cw(a,d,e,f,g,h,k,l,m,n,p,q),A=[],z={stream:w,type:e,Hg:A,M:v,hc:0,Bb:0,fe:new Map,Qd:!1,Pd:!1,nd:!1,Pe:-1,lb:-1,mb:-1,rf:!1},B=null,y=new AbortController;w.createSegmentIndex=function(){if(B)return B;y=new AbortController;return B=new Promise(function(D){D(u(y.signal))})};w.closeSegmentIndex=function(){B&&!w.segmentIndex&&
|
|
1035
|
+
y.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);B=null};return z}function jw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Bb));return b}function Ev(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.wc(function(e){c.push(e)});a.l.vd(c)}
|
|
1036
|
+
function dw(a,b){if(!Cv(a))for(var c=jw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.vc(0,c);Ev(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Ov(a,b):(Rv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Ov(a,b))}function Pv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
|
|
1037
|
+
function Bw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1038
|
+
function aw(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w){var A,z,B,y,D,C,I,J,H,K,G,M,L,N,P,R,Q,fa,sa,Ia,wa;return O(function(Ja){switch(Ja.g){case 1:if(1!=d.type)throw new T(2,4,4017);var Qa=hv(d.g,"EXT-X-PLAYLIST-TYPE"),Aa=hv(d.g,"EXT-X-ENDLIST");Aa=Qa&&"VOD"==Qa.value||Aa;Qa=Qa&&"EVENT"==Qa.value&&!Aa;Qa=!Aa&&!Qa;Aa?Gv(a,zv):Qa?Gv(a,iw):Gv(a,Dw);Cv(a)&&Nv(a,d);if(w){Ja.u(2);break}return E(Ja,Ew(a,g,f,d,c,e),3);case 3:w=Ja.h;case 2:return E(Ja,Kv(a,d,w,e,c),4);case 4:A=Ja.h;z=A.drmInfos;B=A.keyIds;y=A.encrypted;
|
|
1039
|
+
D=A.ih;if(y&&!z.length&&!D)throw new T(2,4,4026);C=Cw(a,f,g,h,k,l,m,n,p,q,u,v);C.encrypted=y;C.drmInfos=z;C.keyIds=B;C.mimeType=w;ow(C);I=Cv(a)?a.N.get(g):new Map;J=Lv(a,d,C,I,c,e,g);H=J.segments;if(K=J.bandwidth)C.bandwidth=K;Cv(a)&&Nv(a,d);G=H[0].startTime;M=H[H.length-1];L=M.endTime;N=new Nk(H);C.segmentIndex=N;R=(P=hv(d.g,"EXT-X-SERVER-CONTROL"))?null!=bv(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=bv(P,"CAN-BLOCK-RELOAD"):!1;fa=iv(d.g,"EXT-X-MEDIA-SEQUENCE",0);sa=Mv(fa,H);Ia=sa.lb;wa=sa.mb;return Ja.return({stream:C,
|
|
1040
|
+
type:g,Hg:[],M:e,hc:G,Bb:L,Qd:R,Pd:Q,nd:!1,Pe:-1,lb:Ia,mb:wa,fe:I,rf:!1})}})}function Mv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{lb:a,mb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{lb:a,mb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{lb:a,mb:c}}
|
|
1041
|
+
function Cw(a,b,c,d,e,f,g,h,k,l,m,n){var p=mw(c,b)||nw(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Nd?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1042
1042
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Nd?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:we(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
1043
|
-
fullMimeTypes:new Set};
|
|
1044
|
-
function
|
|
1045
|
-
!0;G=Z(
|
|
1046
|
-
function
|
|
1047
|
-
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u,v;return O(function(w){if(1==w.g)return l=
|
|
1043
|
+
fullMimeTypes:new Set};ow(a);return a}
|
|
1044
|
+
function Kv(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H,K,G,M,L,N,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=fv(k.g,"EXT-X-KEY"),m=null,l.length)for(m=fw(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())q=p.value,f.set(q,m);v=u=!1;w=[];A=new Set;z=t(f);B=z.next();case 2:if(B.done){Q.u(4);break}y=B.value;D=t(y);C=D.next().value;I=D.next().value;J=C;H=I;K=cv(J,"METHOD");if("NONE"==K){Q.u(3);break}u=
|
|
1045
|
+
!0;G=Z(J,"KEYFORMAT")||"identity";M=null;if(sw(K)){v=!0;Q.u(3);break}if("identity"!=G){M=(L=tw[G])?L(J,c):null;Q.u(6);break}return E(Q,uw(a,J,c,d,H,e),8);case 8:M=Q.h;case 6:if(M){if(M.keyIds)for(N=t(M.keyIds),P=N.next();!P.done;P=N.next())R=P.value,A.add(R);w.push(M)}case 3:B=z.next();Q.u(2);break;case 4:return Q.return({drmInfos:w,keyIds:A,encrypted:u,ih:v})}})}
|
|
1046
|
+
function Fw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Bd(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=iv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.fa.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(cv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1047
|
+
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u,v;return O(function(w){if(1==w.g)return l=jv(d(),cv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=lg(l,a.g.retryParameters),p=gw(a,n,6),a.K.set(m,p)),E(w,a.K.get(m),2);if(3!=w.g){q=w.h;if(!q.data||q.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};v=k;return E(w,window.crypto.subtle.importKey("raw",q.data,u,!0,["decrypt"]),3)}v.cryptoKey=w.h;k.fetchKey=void 0;
|
|
1048
1048
|
F(w)})};a.fa.set(c,k)}return a.fa.get(c)}
|
|
1049
|
-
function
|
|
1050
|
-
|
|
1051
|
-
function
|
|
1052
|
-
function
|
|
1053
|
-
function
|
|
1054
|
-
if(!a.C)return null}var A=[];v=!1;var z=null,
|
|
1055
|
-
(L=Z(
|
|
1056
|
-
1].endTime;else return null;v&&(
|
|
1057
|
-
function
|
|
1058
|
-
function
|
|
1059
|
-
k=
|
|
1060
|
-
b*1E3));if(n=v.some(function(
|
|
1061
|
-
e());if(n)for(c=t(v),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.ba;if(n&&Infinity!=c&&!
|
|
1062
|
-
function
|
|
1063
|
-
function
|
|
1064
|
-
|
|
1065
|
-
function
|
|
1066
|
-
function
|
|
1067
|
-
function
|
|
1068
|
-
3);case 3:q=
|
|
1069
|
-
var
|
|
1070
|
-
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},
|
|
1071
|
-
|
|
1072
|
-
Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Sg(a,b,new Set,0);return Id("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},
|
|
1073
|
-
function
|
|
1074
|
-
function
|
|
1075
|
-
2)),[0,0]));h=
|
|
1076
|
-
case "audio":g=
|
|
1077
|
-
255]));e=
|
|
1078
|
-
a.byteLength);b.set(
|
|
1079
|
-
function
|
|
1080
|
-
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(
|
|
1081
|
-
a.encrypted&&(g=
|
|
1082
|
-
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=
|
|
1083
|
-
a.ia);else{c=
|
|
1084
|
-
a=
|
|
1085
|
-
function
|
|
1086
|
-
0,0,0,0,0,1,8]);f=
|
|
1087
|
-
function
|
|
1088
|
-
0;var p=Math.floor(m%(
|
|
1089
|
-
g,k);e.call(d,b,[f,
|
|
1090
|
-
function
|
|
1091
|
-
var
|
|
1092
|
-
0,0,0,0,0,0,0]),
|
|
1093
|
-
function
|
|
1094
|
-
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ua(c,2),E(c,
|
|
1095
|
-
function
|
|
1096
|
-
l);n(m);m=td(m.outerHTML)}var p=Tg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=
|
|
1097
|
-
"Duration",oh,Infinity);l||a.i.Ta(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};q=$g(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];q=t(q);for(u=q.next();!u.done;u=q.next())m=m.concat($g(u.value,"ProtectionHeader"));if(m.length){q=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var z=
|
|
1098
|
-
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Cd(z);break a}z=null}else z=null;
|
|
1099
|
-
gh(
|
|
1100
|
-
q:[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,v=t(0<n.length?n:[null]),z=v.next();!z.done;z=v.next())A=p,w=A.push,z=z.value,
|
|
1049
|
+
function Nv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=hv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=hv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=hv(b.g,"EXT-X-PART-INF"))a.S=Number(cv(e,"PART-TARGET"));b=hv(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.S?(a.m=a.hb?5*a.S<=c?Math.min(a.S,a.m):Math.min(c,a.m):Math.min(a.S,a.m),a.Ja=b?Number(cv(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1050
|
+
bv(b,"HOLD-BACK"):null,a.va=c?Number(c.value):0);a.Xa=Math.max(d,a.Xa)}function cw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Ja)b=a.Ja;else if(a.va)b=a.va;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Xa*c}a.l.Qg(0);a.l.Mf(b);a.l.lc(!1)}
|
|
1051
|
+
function fw(a,b,c,d,e){var f=hv(c,"EXT-X-MAP");if(!f)return null;var g=cv(f,"URI"),h=jv(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ca.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?sw(cv(m,"METHOD"))&&m.id<f.id&&(k=Fw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Gw(h,f,l,k);a.ca.set(g,b)}return a.ca.get(g)}
|
|
1052
|
+
function Gw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new xi(function(){return a},e,f,null,null,null,d)}
|
|
1053
|
+
function Hw(a,b,c,d,e,f,g,h,k){var l=d.g,m=hv(l,"EXTINF"),n=0,p=0,q=null;d.ub.length&&!a.C&&ab("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=hv(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=jh(v.value))}var w=Di;hv(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.ub.length)throw new T(2,4,4024,"EXTINF");
|
|
1054
|
+
if(!a.C)return null}var A=[];v=!1;var z=null,B=!1,y=!1;if(a.C&&d.ub.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,C={},I=0;I<d.ub.length;C={Vc:C.Vc,Id:C.Id},I++){var J=d.ub[I],H=0==I?c:A[A.length-1],K=0==I?e:H.endTime,G=Number(Z(J,"DURATION"))||a.S;if(G){var M=K+G,L=0,N=null;"EXT-X-PRELOAD-HINT"==J.name?(L=(L=Z(J,"BYTERANGE-START"))?Number(L):0,(H=Z(J,"BYTERANGE-LENGTH"))?N=L+Number(H)-1:L&&(N=Number.MAX_SAFE_INTEGER)):
|
|
1055
|
+
(L=Z(J,"BYTERANGE"),N=t(hw(H,L)),L=N.next().value,N=N.next().value);C.Id=Z(J,"URI");if(C.Id){H=Di;"YES"==Z(J,"GAP")&&(H=2,B=!0);C.Vc=null;var P=function(Q){return function(){null==Q.Vc&&(Q.Vc=jv(h(),Q.Id,f));return Q.Vc}}(C);n&&0<=L&&null!=N&&(z=P,v=!0);K=new Ci(K,M,P,L,N,b,0,0,Infinity,[],"",null,D,H,k);"EXT-X-PRELOAD-HINT"==J.name&&(K.tf(),y=!0);"YES"!=Z(J,"INDEPENDENT")&&0<I&&K.ee();A.push(K);D&&(D+=G)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(A.length)n=A[A.length-
|
|
1056
|
+
1].endTime;else return null;v&&(B||0!=A[0].Ba?(v=!1,z=null):A=[]);(m=hv(l,"EXT-X-BYTERANGE"))?(q=t(hw(c,m.value)),p=q.next().value,q=q.next().value):A.length&&(p=A[0].Ba,q=A[A.length-1].ja);c="";m=null;"image"==g.type&&(c="1x1",g=hv(l,"EXT-X-TILES"))&&(c=cv(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var R=null;b=new Ci(e,n,function(){if(z)return z();null==R&&(R=jv(h(),d.h,f));return R||[]},p,q,b,0,0,Infinity,A,c,m,u,w,k,0<A.length&&!!d.h);v&&(a.hb=!0,b.Ag(),y&&b.tf());return b}
|
|
1057
|
+
function hw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ja+1,d=c+b-1);return[c,d]}
|
|
1058
|
+
function Lv(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=iv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=iv(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=hv(b.g,"EXT-X-SKIP"),p=n?Number(Z(n,"SKIPPED-SEGMENTS")):0,q=m+p,u=0;Cv(a)&&d.has(q)&&(u=d.get(q));0===u&&a.oa==iw&&0<d.size&&!d.has(q)&&(u=a.l.jb());var v=[],w=null;n=[];for(var A=0;A<h.length;A++){var z=h[A],B=0==A?u:w.endTime;q=m+p+A;hv(z.g,"EXT-X-DISCONTINUITY")&&l++;var y=t(z.g);for(var D=y.next();!D.done;D=y.next())D=D.value,"EXT-X-KEY"==D.name&&(sw(cv(D,"METHOD"))?
|
|
1059
|
+
k=Fw(a,D,b,f,e):k=void 0);d.set(q,B);y=fw(a,b,z.g,f,e);!a.C&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());if(B=Hw(a,y,w,z,B,e,c,f,k))(w=iv(z.g,"EXT-X-BITRATE"))?n.push({bitrate:w,duration:B.endTime-B.startTime}):n.length&&(w=n.pop(),w.duration+=B.endTime-B.startTime,n.push(w)),w=B,B.j=l,Pv(a,g)&&null!=a.J&&q<a.J||v.push(B)}b=void 0;n.length&&(b=n.reduce(function(C,I){return C+I.duration},0),b=Math.round(n.reduce(function(C,I){return C+I.bitrate*I.duration},0)/
|
|
1060
|
+
b*1E3));if(n=v.some(function(C){return null!=C.h}))for(c={},d=0;d<v.length;c={Oc:c.Oc,Nc:c.Nc,Dd:c.Dd,Ib:c.Ib,Kc:c.Kc},d++)if(c.Ib=v[d],null==c.Ib.h)for(c.Nc=0,c.Oc=d,e=function(C){return function(){var I=v[C.Oc];if(I){if(null!=I.h)return I.h+C.Nc;C.Nc-=I.endTime-I.startTime;C.Oc+=1}return null}}(c),c.Kc=0,c.Dd=d,f=function(C){return function(){var I=v[C.Dd];if(I){I!=C.Ib&&(C.Kc+=I.endTime-I.startTime);if(null!=I.h)return I.h+C.Kc;--C.Dd}return null}}(c);null==c.Ib.h;)c.Ib.h=f(),null==c.Ib.h&&(c.Ib.h=
|
|
1061
|
+
e());if(n)for(c=t(v),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.ba;if(n&&Infinity!=c&&!Pv(a,g))for(a=t(v),d=a.next();!d.done;d=a.next())d.value.Rf(c);return{segments:v,bandwidth:b}}function mw(a,b){if(a==Nd){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
|
|
1062
|
+
function nw(a){return a==Nd?"text/vtt":Iw[a].mp4}
|
|
1063
|
+
function Ew(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z;return O(function(B){switch(B.g){case 1:g=rg;h=Math.trunc((d.segments.length-1)/2);k=jv(f(),d.segments[h].h,e);l=new rc(k[0]);m=l.Qa.split(".").pop();n=Iw[b];if((p=n[m])||(p=ew[m])||(p=mw(b,c)))return B.return(p);u=1;v=lg(k,a.g.retryParameters);ua(B,2);v.method="HEAD";return E(B,gw(a,v,g,{type:u}),4);case 4:w=B.h;q=w.headers["content-type"];xa(B,3);break;case 2:A=ya(B);if(!A||1002!=A.code&&1001!=A.code){B.u(3);break}v.method="GET";return E(B,
|
|
1064
|
+
gw(a,v,g,{type:u}),6);case 6:z=B.h,q=z.headers["content-type"];case 3:return q?B.return(q.split(";")[0]):B.return(nw(b))}})}function bw(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Av(a,b,c){return gw(a,lg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1065
|
+
function yv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ua(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();Cv(a)&&(d=(c-b)/1E3,a.gb.sample(1,d),e=a.m,f=Math.max(0,e-Va(a.gb)),a.A.W(f));xa(h,3);break;case 2:g=ya(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.W(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();F(h)}})}
|
|
1066
|
+
function Cv(a){return a.oa!=zv}function Gv(a,b){a.oa=b;a.l&&a.l.lc(!Cv(a));Cv(a)||a.A.stop()}function gw(a,b,c,d){if(!a.V)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);fg(a.V,b);return b.promise}function sw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1067
|
+
function uw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,B,y;return O(function(D){switch(D.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(jd())throw new T(2,4,4041);g=cv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return D.return(null);k=jv(d(),cv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Cd(Ad(k[0].split("data:text/plain;base64,").pop()));D.u(2);break}m=k.sort().join("");a.ua.has(m)||(n=lg(k,a.g.retryParameters),p=gw(a,n,6),a.ua.set(m,p));return E(D,a.ua.get(m),
|
|
1068
|
+
3);case 3:q=D.h,l=Cd(q.data);case 2:u="00000000000000000000000000000000";if(!e){D.u(4);break}if(a.na.has(e)){v=a.na.get(e);D.u(5);break}w=rl(e.M(),e.ac(),e.Yb(),a.g.retryParameters);A=rg;return E(D,gw(a,w,A,{type:0}),6);case 6:z=D.h,v=ot(z.data),a.na.set(e,v);case 5:v&&(u=v);case 4:return B=new Map,B.set(u,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),D.return(Jd(B,y))}})}S("shaka.hls.HlsParser",xv);
|
|
1069
|
+
var ew={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Iw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
1070
|
+
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},tw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(jd())throw new T(2,4,4041);a=cv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Id("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=
|
|
1071
|
+
cv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=cv(a,"URI");b=wv(b.split("?")[0]);b=Ab(b.data);c=Id("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=cv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=cv(a,"URI");a=wv(a.split("?")[0]);a=
|
|
1072
|
+
Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Sg(a,b,new Set,0);return Id("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},zv="VOD",Dw="EVENT",iw="LIVE",Fv={eh:zv,dj:Dw,lj:iw};si["application/x-mpegurl"]=function(){return new xv};si["application/vnd.apple.mpegurl"]=function(){return new xv};function Jw(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Kw(a){if(a=Lw(a))a:{a=t(ch(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=dh(b.value,"LA_URL")){a=ah(b);break a}a=""}else a="";return a}
|
|
1073
|
+
function Lw(a){a=Ad(ah(a));a=Jw(a).filter(function(b){return b.type===Mw})[0];if(!a)return null;a=nd(a.value,!0);return(a=Ug(a,"WRMHEADER"))?a:null}var Mw=1,Nw=(new Map).set("com.microsoft.playready",Kw).set("com.microsoft.playready.recommendation",Kw).set("com.microsoft.playready.software",Kw).set("com.microsoft.playready.hardware",Kw);function Ow(a){if(!Pw){Pw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Qw=Rw("ftyp",b,d,b,c);b=Rw("dref",Sw);Tw=Rw("dinf",b)}this.g=a}
|
|
1074
|
+
function Uw(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Rw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Vw+1));m=Math.floor(m%(Vw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Ww(h,4)),[0,0,0,0],x(Ww(n,4)),x(Ww(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Ww(k,2)),[0,0],x(Ww(l,
|
|
1075
|
+
2)),[0,0]));h=Rw("tkhd",h);k=Rw;n=g.duration*g.timescale;l=Math.floor(n/(Vw+1));n=Math.floor(n%(Vw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Ww(g.timescale,4)),x(Ww(l,4)),x(Ww(n,4)),x(Ww(m,2)),[0,0]));l=Rw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Xw;break;case "audio":m=Yw}n=Rw("hdlr",m);a:{switch(g.type){case "video":g=Rw("minf",Rw("vmhd",Zw),Tw,$w(g));break a;
|
|
1076
|
+
case "audio":g=Rw("minf",Rw("smhd",ax),Tw,$w(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Ed.apply(xd,x(b));f=a.g[0];c=Rw;d=f.duration*f.timescale;e=Math.floor(d/(Vw+1));d=Math.floor(d%(Vw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Ww(f.timescale,4)),x(Ww(e,4)),x(Ww(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
1077
|
+
255]));e=Rw("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Ww(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Rw("trex",k),h.call(g,k);a=Ed.apply(xd,x(d));a=Rw("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Ed.apply(xd,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Qw.byteLength+
|
|
1078
|
+
a.byteLength);b.set(Qw);b.set(a,Qw.byteLength);return b}
|
|
1079
|
+
function $w(a){var b=Rw,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.sa.byteLength)var e=Rw("avcC",a.sa);else{e=Rw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Va.length;n++){var p=bx(a.Va[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1080
|
+
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Ww(c,2)),x(Ww(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=cx(a);g=new Uint8Array([]);
|
|
1081
|
+
a.encrypted&&(g=dx(a),d="encv");c=Rw(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.sa.byteLength&&(c=Rw("hvcC",a.sa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Ww(d,2)),x(Ww(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=cx(a),g=new Uint8Array([]),a.encrypted&&(g=dx(a),e="encv"),c=Rw(e,d,
|
|
1082
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Rw(".mp3",ex(a));else if(a.codecs.includes("ac-3"))c=Rw("dac3",a.ia),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=dx(a),d="enca"),a=Rw(d,ex(a),c,e);else if(a.codecs.includes("ec-3"))c=Rw("dec3",a.ia),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=dx(a),d="enca"),a=Rw(d,ex(a),c,e);else if(a.codecs.includes("opus"))c=Rw("dOps",a.ia),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=dx(a),d="enca"),a=Rw(d,ex(a),c,e);else{if(0<a.ia.byteLength)c=Rw("esds",
|
|
1083
|
+
a.ia);else{c=Rw;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Kd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x(Ww(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=dx(a),d="enca");
|
|
1084
|
+
a=Rw(d,ex(a),c,e)}c=a}a=Rw("stsd",fx,c);return b("stbl",a,Rw("stts",gx),Rw("stsc",hx),Rw("stsz",ix),Rw("stco",jx))}function cx(a){if(!a.ya&&!a.za)return new Uint8Array([]);var b=a.za;a=new Uint8Array([].concat(x(Ww(a.ya,4)),x(Ww(b,4))));return Rw("pasp",a)}function ex(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Ww(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1085
|
+
function dx(a){var b=Rw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(Ww(d,4))));c=Rw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Rw("schm",d);e=Rw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=bx(h.value)}a=new Uint8Array([0,
|
|
1086
|
+
0,0,0,0,0,1,8]);f=Rw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1087
|
+
function kx(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Rw;var g=new Uint8Array([0,0,0,0].concat(x(Ww(c.data?c.data.ob:0,4))));g=Rw("mfhd",g);var h;var k=c.data?c.data.Sa:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ma<<4|m.Oa<<2|m.Na}k=Rw("sdtp",l);var n=k.length+92;l=Rw;h=new Uint8Array([0,0,0,58].concat(x(Ww(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Rw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1088
|
+
0;var p=Math.floor(m%(Vw+1));m=new Uint8Array([1,0,0,0].concat(x(Ww(Math.floor(m/(Vw+1)),4)),x(Ww(p,4))));m=Rw("tfdt",m);var q=n;n=c.data?c.data.Sa:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);q+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Ww(p,4)),x(Ww(q,4))),0);for(q=0;q<p;q++){var w=n[q];u=Ww(w.duration,4);var A=Ww(w.size,4),z=w.flags;w=Ww(w.Za,4);v.set([].concat(x(u),x(A),[z.ab<<2|z.Ma,z.Oa<<6|z.Na<<4|z.bb,z.La&61440,z.La&15],x(w)),12+16*q)}n=Rw("trun",v);k=l("traf",h,m,n,k);f=f("moof",
|
|
1089
|
+
g,k);e.call(d,b,[f,lx(c)])}return Ed.apply(xd,x(b))}function lx(a){a=(a.data?a.data.Sa:[]).map(function(b){return b.data});a=Ed.apply(xd,x(a));return Rw("mdat",a)}function Ww(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function bx(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
1090
|
+
function Rw(a){var b=Ka.apply(1,arguments),c=mx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],mx[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
1091
|
+
var Pw=!1,Vw=Math.pow(2,32)-1,mx={},Xw=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Yw=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),gx=new Uint8Array([0,0,0,0,0,0,0,0]),hx=new Uint8Array([0,0,0,0,0,0,0,0]),jx=new Uint8Array([0,0,0,0,0,0,0,0]),ix=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Zw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ax=new Uint8Array([0,
|
|
1092
|
+
0,0,0,0,0,0,0]),fx=new Uint8Array([0,0,0,0,0,0,0,1]),Qw=new Uint8Array([]),Sw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Tw=new Uint8Array([]);function nx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Ua(5);this.o=new Mc(function(){ox(a)});this.A=new eg;this.m=new Map}r=nx.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,px(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
|
|
1093
|
+
function ox(a){var b;O(function(c){switch(c.g){case 1:return ua(c,2),E(c,px(a),4);case 4:xa(c,3);break;case 2:b=ya(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();F(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
|
|
1094
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ua(c,2),E(c,px(a),4);if(2!=c.g)return xa(c,0);b=ya(c);if(!a.h||!b)return c.return();a.h.onError(b);F(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
|
|
1095
|
+
function px(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=lg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),fg(a.A,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=mm){qb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=fu(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
|
|
1096
|
+
l);n(m);m=td(m.outerHTML)}var p=Tg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=nm&&l(p);a.i||(a.i=new rk(null,0));if(l=gh(p,"IsLive",qh,!1))throw new T(2,4,4047);a.i.lc(!l);n=gh(p,"TimeScale",oh,1E7);m=gh(p,"DVRWindowLength",oh);l&&(0===m||isNaN(m))&&(m=Infinity);var q=gh(p,"CanSeek",qh,!1);0===m&&q&&(m=Infinity);q=null;m&&0<m&&(q=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(q=a.g.availabilityWindowOverride);null==q&&(q=Infinity);a.i.ue(q);m=gh(p,
|
|
1097
|
+
"Duration",oh,Infinity);l||a.i.Ta(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};q=$g(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];q=t(q);for(u=q.next();!u.done;u=q.next())m=m.concat($g(u.value,"ProtectionHeader"));if(m.length){q=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var z=Lw(v);if(z)a:{z=t(ch(z,"DATA"));for(var B=z.next();!B.done;B=z.next())if(B=dh(B.value,"KID")){z=Ad(ah(B));z=new Uint8Array([z[3],z[2],z[1],z[0],z[5],
|
|
1098
|
+
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Cd(z);break a}z=null}else z=null;B=Ad(ah(v));w=Bd(w.replace(/-/g,""));w=[{initData:Sg(B,w,new Set,0),initDataType:"cenc",keyId:z}];w=Id(A,"cenc",w);z&&w.keyIds.add(z);if(A=Nw.get(A))w.licenseServerUri=A(v);q.push(w)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=$g(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=$g(v,"QualityLevel");w=l.timescale;z=l.duration;B=$g(v,"c");for(var y=[],D=0,C=0;C<B.length;++C){var I=B[C],J=B[C+1],H=gh(I,"t",oh),K=
|
|
1099
|
+
gh(I,"d",oh);I=gh(I,"r",mh);if(!K)break;H=null!=H?H:D;I=I||0;if(0>I)if(J){J=gh(J,"t",oh);if(null==J)break;else if(H>=J)break;I=Math.ceil((J-H)/K)-1}else{if(Infinity==z)break;else if(H/w>=z)break;I=Math.ceil((z*w-H)/K)-1}for(J=0;J<=I;++J)D=H+K,y.push({start:H/w,end:D/w,Yf:H}),H=D}w=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=qx(a,v,z.value,w,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=Nd||a.g.disableText||m.push(z):n.push(z):q.push(z))}p=[];q=t(0<q.length?
|
|
1100
|
+
q:[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,v=t(0<n.length?n:[null]),z=v.next();!z.done;z=v.next())A=p,w=A.push,z=z.value,B=0,u&&u.bandwidth&&0<u.bandwidth&&(B+=u.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(B+=z.bandwidth),z={id:a.s++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!z&&z.primary,audio:u,video:z,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,z);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
|
|
1101
1101
|
l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null},a.i.ce());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);F(k)})}
|
|
1102
|
-
function
|
|
1102
|
+
function qx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return ab("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=gh(c,"Bitrate",nh),m=gh(c,"MaxWidth",nh),n=gh(c,"MaxHeight",nh),p=gh(c,"Channels",nh),q=gh(c,"SamplingRate",nh),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Ta(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1103
1103
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:we(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:q,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1104
|
-
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=
|
|
1105
|
-
e),null;c=
|
|
1106
|
-
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Va:A,ia:new Uint8Array([]),sa:new Uint8Array([]),ya:0,za:0,data:null,stream:w},A=
|
|
1107
|
-
A),w,b,d);w.segmentIndex=new
|
|
1108
|
-
function
|
|
1109
|
-
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function
|
|
1110
|
-
function
|
|
1111
|
-
si["application/vnd.ms-sstr+xml"]=function(){return new
|
|
1112
|
-
function
|
|
1113
|
-
|
|
1114
|
-
function
|
|
1115
|
-
|
|
1116
|
-
function
|
|
1104
|
+
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=rx[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return ab('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!sx.includes(e.toUpperCase()))return ab("Codec not supported:",
|
|
1105
|
+
e),null;c=tx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=ux(e,c);break;case "video":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=vx(c);break;case "text":if(w.type=Nd,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Rd(w.mimeType,w.codecs));
|
|
1106
|
+
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Va:A,ia:new Uint8Array([]),sa:new Uint8Array([]),ya:0,za:0,data:null,stream:w},A=Uw(new Ow([A])),a.m.set(w.id,A);A=wx(a,new xi(function(){return[]},0,null,null,void 0,
|
|
1107
|
+
A),w,b,d);w.segmentIndex=new Nk(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1108
|
+
function tx(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1109
|
+
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function ux(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function vx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1110
|
+
function wx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Uc:g.Uc},h=e.next())g.Uc=h.value,d.push(new Ci(g.Uc.start,g.Uc.end,function(k){return function(){return Fd(a.l,[f.replace("{start time}",String(k.Uc.Yf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",nx);var sx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),rx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1111
|
+
si["application/vnd.ms-sstr+xml"]=function(){return new nx};function xx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=rd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function yx(){}function zx(a,b,c,d,e){var f=new Ax;zg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Bx,h={gg:!1,Xg:!1};a=Cx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Vf(a,function(){h.gg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Xg=!0;g.abort()});k.W(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1112
|
+
function Cx(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:return h=Dx,k=Ex,p=n=0,q=Date.now(),ua(y,2),E(y,h(a,c),4);case 4:l=y.h;f(Fx(l.headers));if("HEAD"==c.method){y.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(D){function C(){var I,J,H;return O(function(K){switch(K.g){case 1:return ua(K,2),E(K,u.read(),4);case 4:I=K.h;xa(K,3);break;case 2:return ya(K),K.return();case 3:if(I.done){K.u(5);break}n+=
|
|
1113
|
+
I.value.byteLength;if(!g){K.u(5);break}return E(K,g(I.value),5);case 5:J=Date.now();if(100<J-q||I.done)H=I.done?0:w-n,e(J-q,n-p,H),p=n,q=J;I.done?D.close():(D.enqueue(I.value),C());F(K)}})}C()};new k({start:A});return E(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:xa(y,3);break;case 2:z=ya(y);if(d.gg)throw new T(1,1,7001,a,b);if(d.Xg)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return B=Fx(l.headers),y.return(xx(B,m,l.status,a,l.url,b))}})}
|
|
1114
|
+
function Fx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Gx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",yx);yx.isSupported=Gx;yx.parse=zx;var Dx=window.fetch,Bx=window.AbortController,Ex=window.ReadableStream,Ax=window.Headers;
|
|
1115
|
+
Gx()&&(hg("http",zx,2,!0),hg("https",zx,2,!0),hg("blob",zx,2,!0));function Hx(){}
|
|
1116
|
+
function Ix(a,b,c,d,e){var f=new Jx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=Kx(f);e(q);n=!0}};f.onload=function(q){var u=Kx(f),v=f.response;try{d(Date.now()-g,q.loaded-h,0);var w=xx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(q){m(new T(1,
|
|
1117
1117
|
1,1002,a,q,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(q){var u=Date.now();if(100<u-g||q.lengthComputable&&q.loaded==q.total)d(u-g,q.loaded-h,4==f.readyState?0:q.total-q.loaded),h=q.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Vf(k,function(){f.abort();return Promise.resolve()})}
|
|
1118
|
-
function
|
|
1119
|
-
function
|
|
1120
|
-
function
|
|
1121
|
-
function
|
|
1122
|
-
r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
1123
|
-
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,
|
|
1124
|
-
function
|
|
1125
|
-
function
|
|
1126
|
-
function
|
|
1127
|
-
|
|
1128
|
-
function
|
|
1129
|
-
function
|
|
1130
|
-
function
|
|
1131
|
-
|
|
1132
|
-
function
|
|
1133
|
-
function
|
|
1134
|
-
|
|
1135
|
-
function
|
|
1136
|
-
function
|
|
1137
|
-
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function
|
|
1138
|
-
|
|
1118
|
+
function Kx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Hx);Hx.parse=Ix;var Jx=window.XMLHttpRequest;hg("http",Ix,1,!0);hg("https",Ix,1,!0);hg("blob",Ix,1,!0);function Lx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Mx(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.ja}function Nx(a,b){return rl(a.g.M(),a.g.Ba,a.g.ja,b.streaming.retryParameters)};function Ox(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Px(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Ox.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function Qx(a){var b=this;this.o=a;this.j=new Map;this.i=new tg(function(){return Rx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Ox}Qx.prototype.destroy=function(){return this.i.destroy()};function Sx(a,b,c){a.m=b;a.l=c}function Rx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1119
|
+
function Tx(a,b,c,d,e,f){ug(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return E(u,Ux(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Ab(h),l=new Rg(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Vx(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1120
|
+
function Ux(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=rg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Kb(a.h,e);return g.return(f.data)})};function Wx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Uf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Wx.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ua(b,2);return E(b,a.g,4)}if(2!=b.g)return xa(b,0);ya(b);F(b)})};
|
|
1121
|
+
function Xx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();F(g)})}})}Wx.prototype.store=function(){return this.h};Wx.prototype.promise=function(){return this.g};function Yx(a){this.h=a;this.g=[]}Yx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Zx(a,b){return $x(a,b,"readwrite")}function $x(a,b,c){c=a.h.transaction([b],c);var d=new Wx(c,b);a.g.push(d);d.promise().then(function(){Kb(a.g,d)},function(){Kb(a.g,d)});return d};function ay(a,b,c){this.h=new Yx(a);this.i=b;this.g=c}r=ay.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return by(this.i)};r.removeSegments=function(a,b){return cy(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,dy(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.hg(e)}))})};r.addManifests=function(){return by(this.g)};
|
|
1122
|
+
r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function ey(a,b,c){a=Zx(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Zx(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return cy(this,this.g,a,b)};
|
|
1123
|
+
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,dy(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.bd(e)})))})};r.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=$x(a.h,a.g,"readonly"),c=new Map,E(d,Xx(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.bd(f),2);g=h.h;c.set(e,g);F(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};r.hg=function(a){return a};r.bd=function(a){return Promise.resolve(a)};
|
|
1124
|
+
function by(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Zx(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Jd:g.Jd},k=h.next())l=k.value,g.Jd=e.add(l),g.Jd.onsuccess=function(n){return function(){f.push(n.Jd.result)}}(g);return E(m,d.promise(),2)}return m.return(f)})};
|
|
1125
|
+
function cy(a,b,c,d){a=Zx(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Hd:e.Hd},f=c.next())e.Hd=f.value,b.delete(e.Hd).onsuccess=function(g){return function(){return d(g.Hd)}}(e);return a.promise()}
|
|
1126
|
+
function dy(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=$x(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Sc:h.Sc,Qc:h.Qc},l=k.next())h.Qc=l.value,h.Sc=e.get(h.Qc),h.Sc.onsuccess=function(n){return function(){void 0==n.Sc.result&&g.push(n.Qc);f[n.Qc]=n.Sc.result}}(h);return E(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function fy(a){this.g=new Yx(a)}fy.prototype.destroy=function(){return this.g.destroy()};fy.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=$x(a.g,"session-ids","readonly"),c=[],E(d,Xx(b,function(e,f){c.push(f)}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};fy.prototype.add=function(a){var b=Zx(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
1127
|
+
fy.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Zx(b.g,"session-ids"),E(d,Xx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function gy(){this.g=new Map}gy.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};gy.prototype.init=function(){var a=this;hy.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
1128
|
+
function iy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{kb:d,Da:f},Da:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function jy(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({kb:d,Da:f},e)})})}
|
|
1129
|
+
function ky(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function ly(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function my(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1130
|
+
function ny(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=hy,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function oy(a,b){hy.set(a,b)}S("shaka.offline.StorageMuxer",gy);gy.unregister=function(a){hy.delete(a)};gy.register=oy;gy.prototype.destroy=gy.prototype.destroy;var hy=new Map;function py(){ay.apply(this,arguments)}oa(py,ay);py.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=Zx(c.h,c.g);e=d.store();f=new Uf;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return E(g,Promise.all([d.promise(),f]),0)})};
|
|
1131
|
+
py.prototype.bd=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=qy(a.periods[c],e),b.push(f);return E(h,Ft(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1132
|
+
function qy(a,b){ry(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return sy(e,a.startTime,b)})}
|
|
1133
|
+
function sy(a,b,c){var d=a.initSegmentUri?ty(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1134
|
+
ty(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}py.prototype.hg=function(a){return{data:a.data}};
|
|
1135
|
+
function ty(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new T(2,9,9004,"Could not parse uri "+a);}
|
|
1136
|
+
function ry(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
1137
|
+
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function uy(){ay.apply(this,arguments)}oa(uy,ay);
|
|
1138
|
+
uy.prototype.bd=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(vy(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,Ft(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1139
1139
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1140
|
-
function
|
|
1141
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function
|
|
1142
|
-
r.init=function(){var a=this,b=new Uf,c=!1,d=new Mc(function(){c=!0;b.reject(new T(2,9,9017))});d.W(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new
|
|
1143
|
-
new
|
|
1140
|
+
function vy(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1141
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function wy(){ay.apply(this,arguments)}oa(wy,ay);r=wy.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return ey(this,a,b)};r.bd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function xy(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=xy.prototype;
|
|
1142
|
+
r.init=function(){var a=this,b=new Uf,c=!1,d=new Mc(function(){c=!0;b.reject(new T(2,9,9017))});d.W(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new py(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new uy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1143
|
+
new uy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new wy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new fy(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new T(2,
|
|
1144
1144
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),F(b)}})};
|
|
1145
1145
|
r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
|
|
1146
|
-
r.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,
|
|
1147
|
-
function
|
|
1148
|
-
function
|
|
1149
|
-
function
|
|
1146
|
+
r.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,yy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
|
|
1147
|
+
function yy(){var a=new Uf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}oy("idb",function(){return $c()||Sc()||!window.indexedDB?null:new xy});function zy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}zy.prototype.kb=function(){return this.i};zy.prototype.Da=function(){return this.h};zy.prototype.key=function(){return this.l};zy.prototype.toString=function(){return this.j};
|
|
1148
|
+
function Ay(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new zy(b,c,d,Number(a[4])):null};function By(a,b){this.h=a;this.g=b}
|
|
1149
|
+
function Cy(a,b){var c=new rk(null,0);c.Ta(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Dy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Nd}).map(function(l){return Ey(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ey(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
1150
1150
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null}}
|
|
1151
|
-
function
|
|
1152
|
-
b.next())for(e=e.value,g=
|
|
1153
|
-
function
|
|
1151
|
+
function Dy(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
1152
|
+
b.next())for(e=e.value,g=Ey(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ey(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
1153
|
+
function Ey(a,b,c){var d=b.segments.map(function(e){return Fy(a,e,b)});c.vd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Nk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1154
1154
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Rd(b.mimeType,b.codecs)])}}
|
|
1155
|
-
function
|
|
1156
|
-
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=
|
|
1155
|
+
function Fy(a,b,c){var d=new zy("segment",a.h,a.g,b.dataKey);a=new Ci(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Gy(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function Gy(a,b){var c=new zy("segment",a.h,a.g,b);return new xi(function(){return[c.toString()]},0,null)};function Hy(){this.g=null}r=Hy.prototype;r.configure=function(){};
|
|
1156
|
+
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=Ay(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new gy;va(m,2);return E(m,e.init(),4);case 4:return E(m,ky(e,d.kb(),d.Da()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new By(d.kb(),d.Da()),l=Cy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return za(m),E(m,e.destroy(),7);case 7:Ba(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
1157
1157
|
r.update=function(){};
|
|
1158
|
-
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
1159
|
-
r.onInitialVariantChosen=function(){};r.banLocation=function(){};si["application/x-offline-manifest"]=function(){return new
|
|
1160
|
-
function
|
|
1161
|
-
function
|
|
1162
|
-
h.g)return ua(h,2),E(h,Qh(d,g),4);if(2!=h.g)return e.push(g),xa(h,0);ya(h);F(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function
|
|
1163
|
-
function
|
|
1164
|
-
case 4:b.h=null,b.g=null,F(k)}})})}function
|
|
1165
|
-
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
1166
|
-
function
|
|
1167
|
-
p,b,c,e,f),v=u.hi,w=u.Uf,E(
|
|
1168
|
-
|
|
1169
|
-
function
|
|
1170
|
-
2)}if(!
|
|
1171
|
-
z=Object.values(l),E(
|
|
1172
|
-
function
|
|
1173
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();xa(A,0);break;case 2:return v=ya(A),E(A,
|
|
1174
|
-
function
|
|
1175
|
-
u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(ef(w));return E(P,c.offline.trackSelectionCallback(e),3);case 3:A=P.h;z=a.presentationTimeline.getDuration();
|
|
1176
|
-
L.next())
|
|
1177
|
-
function
|
|
1178
|
-
p&&n&&(p.initData=[]);return{hi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.jd(),streams:f,sessionIds:n?Vh(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Uf:m}}function
|
|
1179
|
-
function
|
|
1180
|
-
function
|
|
1181
|
-
function
|
|
1182
|
-
function
|
|
1183
|
-
function
|
|
1184
|
-
r.list=function(){return
|
|
1185
|
-
function
|
|
1186
|
-
c.configure(d.manifest),
|
|
1187
|
-
function
|
|
1188
|
-
function
|
|
1189
|
-
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;
|
|
1190
|
-
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function
|
|
1191
|
-
function
|
|
1192
|
-
function
|
|
1193
|
-
function
|
|
1194
|
-
function
|
|
1195
|
-
|
|
1196
|
-
var
|
|
1197
|
-
function
|
|
1198
|
-
function
|
|
1199
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
1200
|
-
function
|
|
1201
|
-
function
|
|
1202
|
-
(q+="; spatialRendering=true");l=mb(q);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,
|
|
1203
|
-
function
|
|
1204
|
-
function
|
|
1158
|
+
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new gy,ua(m,2,3),E(m,e.init(),5);case 5:return E(m,ky(e,d.kb(),d.Da()),6);case 6:return f=m.h,E(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return za(m),E(m,e.destroy(),10);case 10:Ba(m,0);break;case 2:ya(m),m.u(3)}})};
|
|
1159
|
+
r.onInitialVariantChosen=function(){};r.banLocation=function(){};si["application/x-offline-manifest"]=function(){return new Hy};function Iy(){}function Jy(a){var b=Ay(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Yf(a)):a=b&&"segment"==b.g?Ky(b.key(),b):Wf(new T(2,1,9004,a));return a}
|
|
1160
|
+
function Ky(a,b){var c=new gy;return Yf(void 0).wa(function(){return c.init()}).wa(function(){return ky(c,b.kb(),b.Da())}).wa(function(d){return d.getSegments([b.key()])}).wa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",Iy);Iy.plugin=Jy;hg("offline",Jy);function Ly(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,My(v.info,p)){v.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Ny(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1161
|
+
function Ny(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new wh({Db:b,onError:function(){},me:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ua(f,2),d.configure(a),E(f,Eh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:xa(f,3);break;case 2:return ya(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1162
|
+
h.g)return ua(h,2),E(h,Qh(d,g),4);if(2!=h.g)return e.push(g),xa(h,0);ya(h);F(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function My(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Lb(a.audioCapabilities,b.audioCapabilities,c)&&Lb(a.videoCapabilities,b.videoCapabilities,c)};function Oy(a,b,c){var d=b.presentationTimeline.getDuration();b=Py(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Qy(a,b){var c=Cy(new By(a.kb(),a.Da()),b),d=b.appMetadata||{};c=Py(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}}
|
|
1163
|
+
function Py(a){var b=[],c=nf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(cf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(df(c.value));return b};function Ry(){this.g={}}function Sy(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 Ty(a,b){a.g[b.id]=b.bandwidth||2048}function Uy(a,b){a=a.g[b];null==a&&(a=0);return a};function Vy(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Zb()):(this.h=lm(),this.g=new gg);this.i=[];this.j=[];var c=!a;this.l=new tg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return E(k,Promise.all(b.j.map(function(l){return Rx(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 E(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return E(k,b.g.destroy(),4);
|
|
1164
|
+
case 4:b.h=null,b.g=null,F(k)}})})}function Wy(){if(Nc())a:{var a=t(hy.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=Vy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cm(a,b));return pm(this.h,a)};r.getConfiguration=function(){var a=lm();pm(a,this.h,lm());return a};r.Zb=function(){return this.g};
|
|
1165
|
+
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Qx(this.g);this.j.push(f);b=Xy(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):E(h,Xm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=ri(a,c||null);return h.return(g())})},e,f);b=new Vf(b,function(){return Rx(f)});b.finally(function(){Kb(d.j,f)});return Yy(this,b)};
|
|
1166
|
+
function Xy(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:return Zy(),h=g=null,k=new gy,n=m=l=null,ua(y,2,3),E(y,d(),5);case 5:return g=y.h,E(y,$y(a,b,g,e),6);case 6:p=y.h;az(a);q=!p.presentationTimeline.T()&&!p.presentationTimeline.ec();if(!q)throw new T(2,9,9005,b);return E(y,a.uc(p,function(D){n=n||D},e),7);case 7:h=y.h;az(a);if(n)throw n;return E(y,bz(p,h,e),8);case 8:return E(y,k.init(),9);case 9:return az(a),E(y,iy(k),10);case 10:return l=y.h,az(a),u=cz(h,
|
|
1167
|
+
p,b,c,e,f),v=u.hi,w=u.Uf,E(y,l.Da.addManifests([v]),11);case 11:A=y.h;az(a);m=A[0];az(a);if(n)throw n;return E(y,dz(a,w,m,v,f,e,l.Da,p,h),12);case 12:return az(a),ez(p,v,h,e),E(y,l.Da.updateManifest(m,v),13);case 13:return az(a),z=new zy("manifest",l.path.kb,l.path.Da,m),y.return(Qy(z,v));case 3:return za(y),E(y,k.destroy(),14);case 14:if(!g){y.u(15);break}return E(y,g.stop(),15);case 15:if(!h){y.u(17);break}return E(y,h.destroy(),17);case 17:Ba(y,0);break;case 2:B=ya(y);if(null==m){y.u(19);break}return E(y,
|
|
1168
|
+
fz(m),19);case 19:throw n||B;}})}
|
|
1169
|
+
function dz(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,v,w,A,z;return O(function(B){switch(B.g){case 1:l={};m=0;n=function(y,D){var C,I,J,H,K,G,M;return O(function(L){if(1==L.g){C={};I=t(y);for(J=I.next();!J.done;C={Sb:C.Sb},J=I.next())C.Sb=J.value,H=Nx(C.Sb,f),K=C.Sb.i,G=C.Sb.h,M=function(N){return function(P){var R,Q,fa;return O(function(sa){if(1==sa.g)return E(sa,g.addSegments([{data:P}]),2);R=sa.h;az(a);Q=N.Sb.g;fa=Mx(Q);l[fa]=R[0];m+=P.byteLength;F(sa)})}}(C),Tx(e,C.Sb.groupId,H,K,G,M);return E(L,Vx(e),
|
|
1170
|
+
2)}if(!D)return L.u(0);az(a);ez(h,d,k,f);return E(L,g.updateManifest(c,d),0)})};p=!1;ua(B,2);if(!gz(h)||!p||hz(h)){B.u(4);break}return E(B,n(b.filter(function(y){return y.h}),!0),5);case 5:return az(a),b=b.filter(function(y){return!y.h}),q=l,u=m,l={},m=0,E(B,iz(g,c,d,q,u,function(){return az(a)}),6);case 6:az(a);case 4:if(p){B.u(7);break}return E(B,n(b,!1),8);case 8:return az(a),v=l,w=m,l={},m=0,E(B,iz(g,c,d,v,w,function(){return az(a)}),9);case 9:az(a);case 7:xa(B,0);break;case 2:return A=ya(B),
|
|
1171
|
+
z=Object.values(l),E(B,g.removeSegments(z,function(){}),10);case 10:throw A;}})}function fz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new gy,E(f,b.init(),2);case 2:return E(f,iy(b),3);case 3:return c=f.h,d=new zy("manifest",c.path.kb,c.path.Da,a),E(f,b.destroy(),4);case 4:return e=new Vy,E(f,e.remove(d.toString()),0)}})}
|
|
1172
|
+
function iz(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;ua(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
|
|
1173
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();xa(A,0);break;case 2:return v=ya(A),E(A,fz(b),5);case 5:if(g){A.u(6);break}w=Object.values(d);return E(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
|
|
1174
|
+
function bz(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,C,I,J,H,K,G,M,L,N;return O(function(P){switch(P.g){case 1:return d={width:Infinity,height:Infinity},Je(a,c.restrictions,d),E(P,Ne(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;He(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(cf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,e.push(df(q));
|
|
1175
|
+
u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(ef(w));return E(P,c.offline.trackSelectionCallback(e),3);case 3:A=P.h;z=a.presentationTimeline.getDuration();B=0;y=t(A);for(D=y.next();!D.done;D=y.next())C=D.value,I=C.bandwidth*z/8,B+=I;ua(P,4);return E(P,c.offline.downloadSizeCallback(B),6);case 6:J=P.h;if(!J)throw new T(2,9,9014);xa(P,5);break;case 4:H=ya(P);if(H instanceof T)throw H;throw new T(2,9,9015);case 5:K=new Set;G=new Set;M=new Set;L=t(A);for(D=L.next();!D.done;D=
|
|
1176
|
+
L.next())N=D.value,"variant"==N.type&&K.add(N.id),"text"==N.type&&G.add(N.id),"image"==N.type&&M.add(N.id);a.variants=a.variants.filter(function(R){return K.has(R.id)});a.textStreams=a.textStreams.filter(function(R){return G.has(R.id)});a.imageStreams=a.imageStreams.filter(function(R){return M.has(R.id)});jz(a);F(P)}})}
|
|
1177
|
+
function cz(a,b,c,d,e,f){var g=Oy(c,b,d),h=e.offline.progressCallback;Sx(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Mh(a,"cenc",q)});var k=gz(b)&&!hz(b),l=null;k&&(l=kz.get(a.g.keySystem));for(var m=new Ry,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Ty(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Sy(m,n.value);m=lz(f,m,b,e);f=m.streams;m=m.Uf;p=a.g;n=e.offline.usePersistentLicense;
|
|
1178
|
+
p&&n&&(p.initData=[]);return{hi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.jd(),streams:f,sessionIds:n?Vh(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Uf:m}}function gz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1179
|
+
function hz(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function ez(a,b,c,d){b.expiration=c.jd();c=Vh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(gz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}r.remove=function(a){return mz(this,nz(this,a))};
|
|
1180
|
+
function nz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Zy();c=Ay(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new gy;va(k,2);return E(k,e.init(),4);case 4:return E(k,ky(e,d.kb(),d.Da()),5);case 5:return f=k.h,E(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],E(k,Promise.all([oz(a,h,e),pz(f,d,h)]),2);case 2:return za(k),E(k,e.destroy(),8);case 8:Ba(k,0)}})}
|
|
1181
|
+
function qz(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Rd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Rd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function oz(a,b,c){return O(function(d){return E(d,rz(a.g,a.h.drm,c,b),0)})}
|
|
1182
|
+
function pz(a,b,c){function d(){}var e=sz(c);Qy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.zi=function(){return mz(this,tz(this))};
|
|
1183
|
+
function tz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return Zy(),b=a.g,c=a.h.drm,d=new gy,e=!1,va(n,2),E(n,d.init(),4);case 4:f=[],ly(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return E(n,k.getAll(),8);case 8:return l=n.h,E(n,Ly(c,b,l),9);case 9:return m=n.h,E(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return za(n),E(n,d.destroy(),11);case 11:Ba(n,3);break;case 3:return n.return(!e)}})}
|
|
1184
|
+
r.list=function(){return mz(this,uz())};function uz(){var a,b,c;return O(function(d){switch(d.g){case 1:return Zy(),a=[],b=new gy,va(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),jy(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Qy(new zy("manifest",e.kb,e.Da,l),k);a.push(k)});F(h)})})}),E(d,c,2);case 2:return za(d),E(d,b.destroy(),6);case 6:Ba(d,3);break;case 3:return d.return(a)}})}
|
|
1185
|
+
function $y(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
|
|
1186
|
+
c.configure(d.manifest),az(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,az(a),k=vz(h),E(l,Promise.all(vg(k,function(m){return m.createSegmentIndex()})),3);az(a);if(e)throw e;return l.return(h)})}r.uc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new wh({Db:d.g,onError:b,me:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Bh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Oh(e),3):f.return(e)})};
|
|
1187
|
+
function lz(a,b,c,d){var e=new Map,f=vz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=wz(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Uf:Array.from(e.values())}}
|
|
1188
|
+
function wz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1189
|
+
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;xz(d,c.presentationTimeline.jb(),function(l){var m=Mx(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Uy(b,d.id)*p;p=Px(a.g,p);f.set(m,new Lx(l,p,k,!1))}l.ea&&(n=Mx(l.ea),f.has(n)||(p=.5*Uy(b,d.id),p=Px(a.g,p),f.set(n,new Lx(l.ea,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
1190
|
+
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function xz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function az(a){if(a.l.g)throw new T(2,9,7001);}function Zy(){if(!Wy())throw new T(2,9,9E3);}
|
|
1191
|
+
function mz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),va(c,2),E(c,b,4);if(2!=c.g)return c.return(c.h);za(c);Kb(a.i,b);return Ba(c,0)})}function Yy(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Kb(a.i,c)})}function sz(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
1192
|
+
function rz(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=my(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:qz(d,!1),videoCapabilities:qz(d,!0)}});return E(h,Ly(b,a,f),2)}return 3!=h.g?(g=h.h,E(h,e.remove(g),3)):E(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1193
|
+
function vz(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}
|
|
1194
|
+
function jz(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());}S("shaka.offline.Storage",Vy);Vy.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new gy,va(b,2),E(b,ny(a),2)):5!=b.g?(za(b),E(b,a.destroy(),5)):Ba(b,0)})};
|
|
1195
|
+
Vy.prototype.list=Vy.prototype.list;Vy.prototype.removeEmeSessions=Vy.prototype.zi;Vy.prototype.remove=Vy.prototype.remove;Vy.prototype.store=Vy.prototype.store;Vy.prototype.getNetworkingEngine=Vy.prototype.Zb;Vy.prototype.getConfiguration=Vy.prototype.getConfiguration;Vy.prototype.configure=Vy.prototype.configure;Vy.prototype.destroy=Vy.prototype.destroy;Vy.support=Wy;
|
|
1196
|
+
var kz=(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");mp.offline=Wy;function yz(){}function zz(a,b){a={priority:b||0,callback:a};for(b=0;b<Az.length;b++)if(Az[b].priority<a.priority){Az.splice(b,0,a);return}Az.push(a)}S("shaka.polyfill",yz);yz.register=zz;yz.installAll=function(){for(var a=t(Az),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){ab("Error installing polyfill!",c)}}};var Az=[];function Bz(){this.g=new Cz}function Dz(){window.AbortController||(window.AbortController=Bz,window.AbortSignal=Cz)}Bz.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 U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(Bz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});yz.AbortController=Bz;Bz.install=Dz;
|
|
1197
|
+
function Cz(){dg.call(this);this.h=!1;this.g=void 0;this.onabort=null}oa(Cz,dg);da.Object.defineProperties(Cz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});zz(Dz);function Ez(){}function Fz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Gz(b.value)}function Gz(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)}})}yz.Aria=Ez;Ez.install=Fz;zz(Fz);function Hz(){}function Iz(){Jz()}yz.EncryptionScheme=Hz;Hz.install=Iz;zz(Iz,-2);function Kz(){}
|
|
1198
|
+
function Lz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
1199
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Mz);document.addEventListener("webkitfullscreenerror",Mz);document.addEventListener("mozfullscreenchange",Mz);document.addEventListener("mozfullscreenerror",Mz);document.addEventListener("MSFullscreenChange",Mz);document.addEventListener("MSFullscreenError",Mz)}}
|
|
1200
|
+
function Mz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}yz.Fullscreen=Kz;Kz.install=Lz;zz(Lz);function Nz(){}function Oz(){var a=!0;!$c()||$c()&&Tc("Android")||$c()&&Tc("Fuchsia")||(a=!1);if(ad()||dd()||cd()||Xc()||Uc()||Tc("PC=EOS")||ed())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Pz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Qz)}
|
|
1201
|
+
function Qz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Pc(e),!f)||d&&(g=d.contentType,h=Pc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Nc())return p.return(b);if(!c){p.u(3);break}return E(p,Rz(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var q=d.contentType;$c()&&d.spatialRendering&&
|
|
1202
|
+
(q+="; spatialRendering=true");l=mb(q);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,Sz(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
|
|
1203
|
+
function Rz(a){var b,c;return O(function(d){return 1==d.g?$c()?E(d,Tz(a),3):Uc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(mb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(mb(a.contentType))})}
|
|
1204
|
+
function Sz(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Uc()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
|
|
1205
1205
|
distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=c.keySystem;n=null;ua(p,2);if(ji.has(k+"#"+l+"#"+m)){n=ji.get(k+"#"+l+"#"+m)||null;p.u(4);break}return E(p,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:n=p.h,ji.set(k+"#"+l+"#"+m,n);case 4:xa(p,3);break;case 2:ya(p);case 3:return p.return(n)}})}
|
|
1206
|
-
function
|
|
1207
|
-
var
|
|
1208
|
-
function
|
|
1209
|
-
function
|
|
1210
|
-
function
|
|
1211
|
-
function
|
|
1212
|
-
function
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
function
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
function
|
|
1206
|
+
function Tz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(mb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Uz?(c=Uz[b],d.u(2)):E(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Uz[b]=c);return d.return(c)})}yz.MediaCapabilities=Nz;Nz.install=Oz;
|
|
1207
|
+
var Pz=null;Nz.originalMcap=Pz;var Uz={};Nz.memoizedCanDisplayTypeRequests_=Uz;zz(Oz,-1);function Vz(){}function Wz(){var a=fd();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(Xz(),Yz()):15>=a&&Xz():Tc("DT_STB_BCM")?(Xz(),Yz()):(Wc()||Vc()||Tc("Tizen 4"))&&Zz();(window.MediaSource||window.ManagedMediaSource)&&$z();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&aA()}
|
|
1208
|
+
function Xz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ka.apply(0,arguments));b.abort=function(){};return b}}function Yz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1209
|
+
function $z(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Xd(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Xd(c)&&b(c)}}}
|
|
1210
|
+
function Zz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=$d(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=$d(c)&&b(c)}}}
|
|
1211
|
+
function aA(){var a=MediaSource.isTypeSupported;Xc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}yz.MediaSource=Vz;Vz.install=Wz;zz(Wz);function bA(){}function cA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?dA():void 0!=window.orientation&&eA())}function dA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1212
|
+
function eA(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new fA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}yz.Orientation=bA;bA.install=cA;function fA(){dg.call(this);this.type="";this.angle=0}oa(fA,dg);
|
|
1213
|
+
fA.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
1214
|
+
fA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};zz(cA);function gA(){}var hA,iA,jA,kA,lA,mA;function nA(a,b){try{var c=new oA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function pA(a){var b=this.mediaKeys;b&&b!=a&&qA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?qA(a,this):Promise.resolve()}
|
|
1215
|
+
function rA(a){a=Ab(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=nd(a.subarray(4),!0);a=td(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Bb(a);this.dispatchEvent(b)}yz.PatchedMediaKeysApple=gA;
|
|
1216
|
+
gA.uninstall=function(){hA&&(hA=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",iA),HTMLMediaElement.prototype.setMediaKeys=jA,window.MediaKeys=kA,window.MediaKeySystemAccess=lA,navigator.requestMediaKeySystemAccess=mA,iA=mA=jA=lA=kA=null,window.shakaMediaKeysPolyfill="")};
|
|
1217
|
+
gA.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)hA=!0,iA=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),jA=HTMLMediaElement.prototype.setMediaKeys,kA=window.MediaKeys,lA=window.MediaKeySystemAccess,mA=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=pA;window.MediaKeys=sA;window.MediaKeySystemAccess=oA;navigator.requestMediaKeySystemAccess=
|
|
1218
|
+
nA;window.shakaMediaKeysPolyfill=tA}};
|
|
1219
|
+
function oA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1220
1220
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1221
|
-
|
|
1222
|
-
function
|
|
1223
|
-
r.generateRequest=function(a,b){var c=this;this.h=new Uf;try{var d=this.l.createSession("video/mp4",Ab(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.bc()?"license-request":"license-renewal").set("message",Bb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(
|
|
1224
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
1225
|
-
r.update=function(a){this.g=new Uf;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function
|
|
1226
|
-
function
|
|
1227
|
-
function
|
|
1228
|
-
|
|
1229
|
-
function
|
|
1230
|
-
function
|
|
1231
|
-
function
|
|
1221
|
+
oA.prototype.createMediaKeys=function(){var a=new sA(this.keySystem);return Promise.resolve(a)};oA.prototype.getConfiguration=function(){return this.g};function sA(a){this.h=new WebKitMediaKeys(a);this.g=new hb}sA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new uA(this.h,a)};sA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1222
|
+
function qA(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",rA);try{return yk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}sA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function uA(a){dg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hb;this.sessionId="";this.expiration=NaN;this.closed=new Uf;this.keyStatuses=new vA}oa(uA,dg);r=uA.prototype;
|
|
1223
|
+
r.generateRequest=function(a,b){var c=this;this.h=new Uf;try{var d=this.l.createSession("video/mp4",Ab(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.bc()?"license-request":"license-renewal").set("message",Bb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(wA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1224
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:wA(c,"output-not-allowed");break;default:wA(c,"internal-error")}});wA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1225
|
+
r.update=function(a){this.g=new Uf;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function wA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
|
|
1226
|
+
function vA(){this.size=0;this.g=void 0}r=vA.prototype;r.bc=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,ii.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=ii.value();return this.g&&yb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var tA="apple";function xA(){}function yA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Vc()||Tc("Tizen 4")||Tc("Tizen 5.0")||Yc())&&(MediaKeys.prototype.setServerCertificate=zA)}function zA(){return Promise.resolve(!1)}yz.PatchedMediaKeysCert=xA;xA.install=yA;zz(yA);function AA(){}function BA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=CA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=DA,window.MediaKeys=EA,window.MediaKeySystemAccess=FA,window.shakaMediaKeysPolyfill=GA)}function CA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1227
|
+
function DA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}yz.PatchedMediaKeysNop=AA;AA.install=BA;function EA(){throw new TypeError("Illegal constructor.");}EA.prototype.createSession=function(){};EA.prototype.setServerCertificate=function(){};EA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function FA(){this.keySystem="";throw new TypeError("Illegal constructor.");}FA.prototype.getConfiguration=function(){};
|
|
1228
|
+
FA.prototype.createMediaKeys=function(){};var GA="nop";zz(BA,-10);function HA(){}
|
|
1229
|
+
function IA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)JA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=KA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=LA;window.MediaKeys=MA;window.MediaKeySystemAccess=NA;window.shakaMediaKeysPolyfill=OA}}
|
|
1230
|
+
function PA(a){var b=JA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function KA(a,b){try{var c=new NA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function LA(a){var b=this.mediaKeys;b&&b!=a&&QA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&QA(a,this);return Promise.resolve()}yz.PatchedMediaKeysWebkit=HA;HA.install=IA;
|
|
1231
|
+
function NA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
1232
1232
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1233
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1234
|
-
function
|
|
1235
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=
|
|
1236
|
-
|
|
1237
|
-
function
|
|
1238
|
-
function
|
|
1239
|
-
function
|
|
1240
|
-
function
|
|
1241
|
-
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
1242
|
-
r.forEach=function(a){this.g&&a(this.g,ii.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=ii.value();return this.g&&
|
|
1243
|
-
function
|
|
1244
|
-
function
|
|
1245
|
-
function
|
|
1246
|
-
S("shaka.text.LrcTextParser",
|
|
1247
|
-
|
|
1248
|
-
{Ub:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=ch(e,"metadata")[0])?g.children:[];h=ch(e,"style");e=ch(e,"region");k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var u=q.value;q=new Ob;var v=u.attributes["xml:id"];if(v){q.id=v;var w=null;n&&(w=
|
|
1249
|
-
100*q.height/w)),q.widthUnits=A||null!=v?gc:0,q.heightUnits=A||null!=w?gc:0)}if(u=
|
|
1250
|
-
2,2001,"<p> can only be inside <div> in TTML");n=t($g(d,"div"));for(p=n.next();!p.done;p=n.next())if($g(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
1251
|
-
function
|
|
1252
|
-
[];if(!A)for(var z=t(q.children),
|
|
1253
|
-
if(!
|
|
1254
|
-
!q.attributes.style&&(g=
|
|
1255
|
-
function
|
|
1256
|
-
g))a.backgroundColor=h;if(h=
|
|
1257
|
-
"bold"==h&&(a.fontWeight=700);h=
|
|
1258
|
-
d.split(" "),d[0].match(
|
|
1233
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}NA.prototype.createMediaKeys=function(){var a=new MA(this.g);return Promise.resolve(a)};NA.prototype.getConfiguration=function(){return this.h};function MA(a){this.l=a;this.h=null;this.g=new hb;this.i=[];this.j=new Map}
|
|
1234
|
+
function QA(a,b){a.h=b;a.g.nb();var c=JA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=RA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.bc()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=RA(a,d.sessionId))SA(d,"usable"),
|
|
1235
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=RA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?SA(e,"output-restricted"):1==f?SA(e,"expired"):SA(e,"internal-error"))}}))}
|
|
1236
|
+
MA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new TA(b,this.l,a);this.i.push(a);return a};MA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};MA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1237
|
+
function RA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function TA(a,b,c){dg.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Uf;this.keyStatuses=new UA}oa(TA,dg);
|
|
1238
|
+
function VA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(td("LOAD_SESSION|"+c));else{var e=td("PERSISTENT|");d=Ed(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Uf;var f=PA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).W(.01)}return a.h}
|
|
1239
|
+
function WA(a,b,c){if(a.g)a.g.then(function(){return WA(a,b,c)}).catch(function(){return WA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=md(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Ad(e.keys[0].k);e=Ad(e.keys[0].kid)}else d=Ab(c),e=null;var f=PA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1240
|
+
function SA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r=TA.prototype;r.generateRequest=function(a,b){return VA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?VA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Uf;WA(this,b,a);return b};
|
|
1241
|
+
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=PA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function UA(){this.size=0;this.g=void 0}r=UA.prototype;r.bc=function(){return this.g};
|
|
1242
|
+
r.forEach=function(a){this.g&&a(this.g,ii.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=ii.value();return this.g&&yb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var JA="",OA="webkit";zz(IA);function XA(){}function YA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ZA,Object.defineProperty(a,"disablePictureInPicture",{get:$A,set:aB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=bB,document.addEventListener("webkitpresentationmodechanged",cB,!0))}}
|
|
1243
|
+
function cB(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
1244
|
+
function ZA(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function bB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1245
|
+
function $A(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function aB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}yz.PiPWebkit=XA;XA.install=YA;zz(YA);function dB(){}function eB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=fB))}function fB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}yz.RandomUUID=dB;dB.install=eB;zz(eB);function gB(){}function hB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:iB})}function iB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}yz.Symbol=gB;gB.install=hB;zz(hB);function jB(){}function kB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}yz.VideoPlayPromise=jB;jB.install=kB;zz(kB);function lB(){}function mB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Yc())&&(a.getVideoPlaybackQuality=nB)}}function nB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}yz.VideoPlaybackQuality=lB;lB.install=mB;zz(mB);function oB(){}function pB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=qB;else if(6==b)a=rB;else{try{var c=!!qB(1,2,"")}catch(d){c=!1}c&&(a=qB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function qB(a,b,c){return new window.TextTrackCue(a,b,c)}function rB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}yz.VTTCue=oB;oB.install=pB;zz(pB);function sB(){}sB.prototype.parseInit=function(){};sB.prototype.setSequenceMode=function(){};sB.prototype.setManifestType=function(){};sB.prototype.parseMedia=function(a,b){var c=null,d=[];a=md(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=tB.exec(e))){var f=uB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Nb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1246
|
+
S("shaka.text.LrcTextParser",sB);sB.prototype.parseMedia=sB.prototype.parseMedia;sB.prototype.setManifestType=sB.prototype.setManifestType;sB.prototype.setSequenceMode=sB.prototype.setSequenceMode;sB.prototype.parseInit=sB.prototype.parseInit;var tB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,uB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;le["application/x-subtitle-lrc"]=function(){return new sB};function vB(){}vB.prototype.parseInit=function(){};vB.prototype.setSequenceMode=function(){};vB.prototype.setManifestType=function(){};
|
|
1247
|
+
vB.prototype.parseMedia=function(a,b,c){var d=md(a);a=[];if(""==d)return a;var e=Ug(d,"tt");if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=ch(e,"body")[0];if(!d)return[];var f=ih(e,wB,"frameRate"),g=ih(e,wB,"subFrameRate"),h=ih(e,wB,"frameRateMultiplier"),k=ih(e,wB,"tickRate"),l=ih(e,wB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=ih(e,xB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new yB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
|
|
1248
|
+
{Ub:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=ch(e,"metadata")[0])?g.children:[];h=ch(e,"style");e=ch(e,"region");k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var u=q.value;q=new Ob;var v=u.attributes["xml:id"];if(v){q.id=v;var w=null;n&&(w=zB.exec(n)||AB.exec(n));v=w?Number(w[1]):null;w=w?Number(w[2]):null;var A,z=BB(u,h,"extent");if(z){var B=(A=zB.exec(z))||AB.exec(z);null!=B&&(q.width=Number(B[1]),q.height=Number(B[2]),A||(null!=v&&(q.width=100*q.width/v),null!=w&&(q.height=
|
|
1249
|
+
100*q.height/w)),q.widthUnits=A||null!=v?gc:0,q.heightUnits=A||null!=w?gc:0)}if(u=BB(u,h,"origin"))if(B=(A=zB.exec(u))||AB.exec(u),null!=B)q.viewportAnchorX=Number(B[1]),q.viewportAnchorY=Number(B[2]),A?z||(q.width=100-q.viewportAnchorX,q.widthUnits=gc,q.height=100-q.viewportAnchorY,q.heightUnits=gc):(null!=w&&(q.viewportAnchorY=100*q.viewportAnchorY/w),null!=v&&(q.viewportAnchorX=100*q.viewportAnchorX/v)),q.viewportAnchorUnits=A||null!=v?gc:0}else q=null;q&&k.push(q)}if($g(d,"p").length)throw new T(2,
|
|
1250
|
+
2,2001,"<p> can only be inside <div> in TTML");n=t($g(d,"div"));for(p=n.next();!p.done;p=n.next())if($g(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=CB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1251
|
+
function CB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(Yg(a)){if(!m)return null;var q={tagName:"span",children:[ah(a)],attributes:{},parent:null}}else q=a;for(var u=null,v=t(DB),w=v.next();!w.done&&!(u=EB(q,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=ih(q,DB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new rc(n),A=new rc(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(q.attributes["xml:space"]||(h?"default":"preserve"));A=q.children.every(Yg);h=
|
|
1252
|
+
[];if(!A)for(var z=t(q.children),B=z.next();!B.done;B=z.next())(B=CB(B.value,b,c,d,e,f,g,w,k,q,m,n))&&h.push(B);d=null!=l;n=ah(q);n=q.children.length&&n&&/\S/.test(n);B=q.attributes.begin||q.attributes.end||q.attributes.dur;if(!(B||n||"br"==q.tagName||0!=h.length||d&&!w))return null;z=FB(q,c);n=z.start;for(z=z.end;p&&p.tagName&&"tt"!=p.tagName;)z=GB(p,c,n,z),n=z.start,z=z.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;z=null==z?Infinity:z+b.periodStart;n=Math.max(n,b.segmentStart);z=Math.min(z,b.segmentEnd);
|
|
1253
|
+
if(!B&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==q.tagName)return e=new Nb(n,z,""),e.lineBreak=!0,e;b="";A&&(b=wd(ah(q)||""),w&&(b=b.replace(/\s+/g," ")));b=new Nb(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=EB(q,"region",f,"")[0];if(q.attributes.region&&k&&k.attributes["xml:id"]){var y=k.attributes["xml:id"];b.region=g.filter(function(D){return D.id==y})[0]}g=k;l&&d&&!q.attributes.region&&
|
|
1254
|
+
!q.attributes.style&&(g=EB(l,"region",f,"")[0]);HB(b,q,g,u,v,e,a,0==h.length);return b}
|
|
1255
|
+
function HB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==IB(b,c,f,"direction",g)&&(a.direction="rtl");h=IB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Rb);(h=IB(b,c,f,"textAlign",!0))?(a.positionAlign=JB[h],a.lineAlign=KB[h],a.textAlign=$b[h.toUpperCase()]):a.textAlign=Qb;if(h=IB(b,c,f,"displayAlign",!0))a.displayAlign=ac[h.toUpperCase()];if(h=IB(b,c,f,"color",g))a.color=h;if(h=IB(b,c,f,"backgroundColor",
|
|
1256
|
+
g))a.backgroundColor=h;if(h=IB(b,c,f,"border",g))a.border=h;if(h=IB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=IB(b,c,f,"fontWeight",g))&&
|
|
1257
|
+
"bold"==h&&(a.fontWeight=700);h=IB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=IB(b,c,f,"lineHeight",g))&&h.match(LB)&&(a.lineHeight=h);(h=IB(b,c,f,"fontSize",g))&&(h.match(LB)||h.match(MB))&&(a.fontSize=h);if(h=IB(b,c,f,"fontStyle",g))a.fontStyle=fc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=ah(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=IB(b,c,f,"textOutline",g))d=
|
|
1258
|
+
d.split(" "),d[0].match(LB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(LB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=IB(b,c,f,"letterSpacing",g))&&d.match(LB)&&(a.letterSpacing=d);(d=IB(b,c,f,"linePadding",g))&&d.match(LB)&&(a.linePadding=d);if(d=IB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=BB(c,f,"textDecoration"))&&NB(a,d);(d=OB(b,f,"textDecoration"))&&NB(a,d);if(d=IB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(IB(b,c,f,"ruby",g)){case "container":a.rubyTag=
|
|
1259
1259
|
"ruby";break;case "text":a.rubyTag="rt"}}
|
|
1260
|
-
function
|
|
1261
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Kb(a.textDecoration,"overline")}}function
|
|
1262
|
-
function
|
|
1263
|
-
function
|
|
1264
|
-
function
|
|
1265
|
-
function
|
|
1266
|
-
function
|
|
1267
|
-
var
|
|
1268
|
-
end:"end"},
|
|
1269
|
-
|
|
1270
|
-
le['application/mp4; codecs="stpp.ttml"']=function(){return new
|
|
1271
|
-
|
|
1272
|
-
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new
|
|
1273
|
-
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");
|
|
1260
|
+
function NB(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Kb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Kb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1261
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Kb(a.textDecoration,"overline")}}function IB(a,b,c,d,e){e=void 0===e?!0:e;return(a=OB(a,c,d))?a:e?BB(b,c,d):null}function BB(a,b,c){if(!a)return null;var d=ih(a,xB,c);return d?d:PB(a,b,c)}function OB(a,b,c){var d=ih(a,xB,c);return d?d:PB(a,b,c)}
|
|
1262
|
+
function PB(a,b,c){a=EB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=hh(a[e],"urn:ebu:tt:style",c);f||(f=ih(a[e],xB,c));f||(f=OB(a[e],b,c));f&&(d=f)}return d}function EB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?hh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1263
|
+
function GB(a,b,c,d){a=FB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function FB(a,b){var c=QB(a.attributes.begin,b),d=QB(a.attributes.end,b);a=QB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1264
|
+
function QB(a,b){var c=null;if(RB.test(a)){a=RB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(SB.test(a))c=TB(SB,a);else if(UB.test(a))c=TB(UB,a);else if(VB.test(a))a=VB.exec(a),c=Number(a[1])/b.frameRate;else if(WB.test(a))a=WB.exec(a),c=Number(a[1])/b.g;else if(XB.test(a))c=TB(XB,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1265
|
+
function TB(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}S("shaka.text.TtmlTextParser",vB);vB.prototype.parseMedia=vB.prototype.parseMedia;vB.prototype.setManifestType=vB.prototype.setManifestType;vB.prototype.setSequenceMode=vB.prototype.setSequenceMode;vB.prototype.parseInit=vB.prototype.parseInit;
|
|
1266
|
+
function yB(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
1267
|
+
var zB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,MB=/^(\d{1,2}(?:\.\d+)?|100)%$/,LB=/^(\d+px|\d+em|\d*\.?\d+c)$/,AB=/^(\d+)px (\d+)px$/,RB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,SB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,UB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,VB=/^(\d*(?:\.\d*)?)f$/,WB=/^(\d*(?:\.\d*)?)t$/,XB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),KB={left:Ub,center:"center",right:"end",start:Ub,
|
|
1268
|
+
end:"end"},JB={left:"line-left",center:"center",right:"line-right"},wB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],xB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],DB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];le["application/ttml+xml"]=function(){return new vB};function YB(){this.g=new vB}YB.prototype.parseInit=function(a){var b=!1;(new Eg).box("moov",Jg).box("trak",Jg).box("mdia",Jg).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};YB.prototype.setSequenceMode=function(){};YB.prototype.setManifestType=function(){};
|
|
1269
|
+
YB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Eg).box("mdat",Qg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",YB);YB.prototype.parseMedia=YB.prototype.parseMedia;YB.prototype.setManifestType=YB.prototype.setManifestType;YB.prototype.setSequenceMode=YB.prototype.setSequenceMode;YB.prototype.parseInit=YB.prototype.parseInit;le['application/mp4; codecs="stpp"']=function(){return new YB};
|
|
1270
|
+
le['application/mp4; codecs="stpp.ttml"']=function(){return new YB};le['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new YB};le['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new YB};le['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new YB};le['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new YB};le['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new YB};le['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new YB};function ZB(){this.h=!1;this.g="UNKNOWN"}ZB.prototype.parseInit=function(){};ZB.prototype.setSequenceMode=function(a){this.h=a};ZB.prototype.setManifestType=function(a){this.g=a};
|
|
1271
|
+
ZB.prototype.parseMedia=function(a,b){a=md(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=$B(new lv(a[1]));if(null==a)throw new T(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
|
|
1272
|
+
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new lv(e);var f=new Ob;ov(e);mv(e);for(var g=ov(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
|
|
1273
|
+
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");mv(e);g=ov(e)}b.push(f)}d=new Map;aC(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
|
|
1274
1274
|
l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Nb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var q=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=q;break;case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==q)m=!0,l.fontWeight=
|
|
1275
1275
|
700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=Xb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-combine-upright":m=!0;l.textCombineUpright=q;break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&d.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,
|
|
1276
|
-
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new
|
|
1277
|
-
function
|
|
1278
|
-
function
|
|
1279
|
-
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=
|
|
1280
|
-
m.next())
|
|
1281
|
-
function
|
|
1282
|
-
|
|
1283
|
-
if(!f)break;if(f
|
|
1284
|
-
function
|
|
1285
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pb);else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
1286
|
-
function
|
|
1287
|
-
le["text/vtt"]=function(){return new
|
|
1288
|
-
|
|
1289
|
-
p.value;var q=p.Hf||l,u=p.se?c+p.se:a;a=u+(q||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),z=null;"vttc"==Ig(A)?8<w&&(z=m.vb(w-8)):m.skip(w-8);q&&z&&(w=
|
|
1290
|
-
function
|
|
1291
|
-
function
|
|
1292
|
-
function
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Ce:e.Ce},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
1296
|
-
function
|
|
1276
|
+
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new lv(f[0]),k=$B(g),n=nv(g,/[ \t]+--\x3e[ \t]+/g),l=$B(g),null==k||null==n||null==l)ab("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Nb(k,l,"");mv(g);for(k=ov(g);k;)bC(m,k,b),mv(g),k=ov(g);cC(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
|
|
1277
|
+
function aC(a){for(var b=t(Object.entries(cc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Nb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(dc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Nb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1278
|
+
function cC(a,b,c){if(a.includes("<")){0===c.size&&aC(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(dC)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
|
|
1279
|
+
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=eC(a);try{var m=Ug("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
|
|
1280
|
+
m.next())fC(a.value,b,c);else b.payload=wd(a);else b.payload=wd(a)}else b.payload=wd(a)}function eC(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function gC(a,b){return a&&0<a.length?a:b}
|
|
1281
|
+
function fC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ob;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=gC(g.backgroundColor,d.backgroundColor),d.color=gC(g.color,d.color),d.fontFamily=gC(g.fontFamily,d.fontFamily),d.fontSize=
|
|
1282
|
+
gC(g.fontSize,d.fontSize),d.textShadow=gC(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Yb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
|
|
1283
|
+
if(!f)break;if(f=$B(new lv(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Yg(a)||1==e.length&&Yg(e[0]))for(c=ah(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Yb(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=wd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())fC(a.value,d,c)}
|
|
1284
|
+
function bC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Qb:a.textAlign=$b[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1285
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pb);else if(d=/^region:(.*)$/.exec(b)){if(b=hC(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=bc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Tb,a.line=Number(c[1]),c[2]&&(a.lineAlign=bc[c[2].toUpperCase()])}
|
|
1286
|
+
function hC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function $B(a){a=nv(a,dC);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.VttTextParser",ZB);ZB.prototype.parseMedia=ZB.prototype.parseMedia;ZB.prototype.setManifestType=ZB.prototype.setManifestType;ZB.prototype.setSequenceMode=ZB.prototype.setSequenceMode;ZB.prototype.parseInit=ZB.prototype.parseInit;var dC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1287
|
+
le["text/vtt"]=function(){return new ZB};le['text/vtt; codecs="vtt"']=function(){return new ZB};le['text/vtt; codecs="wvtt"']=function(){return new ZB};function iC(){this.g=null}iC.prototype.parseInit=function(a){var b=this,c=!1;(new Eg).box("moov",Jg).box("trak",Jg).box("mdia",Jg).P("mdhd",function(d){d=Vi(d.reader,d.version);b.g=d.timescale}).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};iC.prototype.setSequenceMode=function(){};iC.prototype.setManifestType=function(){};
|
|
1288
|
+
iC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Eg).box("moof",Jg).box("traf",Jg).P("tfdt",function(B){g=!0;c=Ui(B.reader,B.version).baseMediaDecodeTime}).P("tfhd",function(B){l=Ti(B.reader,B.flags).kg}).P("trun",function(B){h=!0;d=Wi(B.reader,B.version,B.flags).Jg}).box("mdat",Qg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Bg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1289
|
+
p.value;var q=p.Hf||l,u=p.se?c+p.se:a;a=u+(q||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),z=null;"vttc"==Ig(A)?8<w&&(z=m.vb(w-8)):m.skip(w-8);q&&z&&(w=jC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(te)};function jC(a,b,c){var d,e,f;(new Eg).box("payl",Qg(function(g){d=md(g)})).box("iden",Qg(function(g){e=md(g)})).box("sttg",Qg(function(g){f=md(g)})).parse(a);return d?kC(d,e,f,b,c):null}
|
|
1290
|
+
function kC(a,b,c,d,e){d=new Nb(d,e,"");cC(a,d,new Map);b&&(d.id=b);if(c)for(a=new lv(c),b=ov(a);b;)bC(d,b,[]),mv(a),b=ov(a);return d}S("shaka.text.Mp4VttParser",iC);iC.prototype.parseMedia=iC.prototype.parseMedia;iC.prototype.setManifestType=iC.prototype.setManifestType;iC.prototype.setSequenceMode=iC.prototype.setSequenceMode;iC.prototype.parseInit=iC.prototype.parseInit;le['application/mp4; codecs="wvtt"']=function(){return new iC};function lC(){}lC.prototype.parseInit=function(){};lC.prototype.setSequenceMode=function(){};lC.prototype.setManifestType=function(){};lC.prototype.parseMedia=function(a){var b=md(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new lv(c[0]),e=mC(d),f=nv(d,/,/g);d=mC(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Nb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1291
|
+
function mC(a){a=nv(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.SbvTextParser",lC);lC.prototype.parseMedia=lC.prototype.parseMedia;lC.prototype.setManifestType=lC.prototype.setManifestType;lC.prototype.setSequenceMode=lC.prototype.setSequenceMode;lC.prototype.parseInit=lC.prototype.parseInit;le["text/x-subviewer"]=function(){return new lC};function nC(){this.g=new ZB}nC.prototype.parseInit=function(){};nC.prototype.setSequenceMode=function(){};nC.prototype.setManifestType=function(){};nC.prototype.parseMedia=function(a,b,c){a=md(a);a=oC(a);a=Ab(td(a));return this.g.parseMedia(a,b,c)};
|
|
1292
|
+
function oC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",nC);nC.srt2webvtt=oC;nC.prototype.parseMedia=nC.prototype.parseMedia;
|
|
1293
|
+
nC.prototype.setManifestType=nC.prototype.setManifestType;nC.prototype.setSequenceMode=nC.prototype.setSequenceMode;nC.prototype.parseInit=nC.prototype.parseInit;le["text/srt"]=function(){return new nC};function pC(){}pC.prototype.parseInit=function(){};pC.prototype.setSequenceMode=function(){};pC.prototype.setManifestType=function(){};
|
|
1294
|
+
pC.prototype.parseMedia=function(a){var b="",c="";a=md(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=qC.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=rC.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(sC);else if("Style"==e){e=f.split(sC);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
1295
|
+
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Ce:e.Ce},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=rC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(sC);else if("Dialogue"==f){g=g.split(sC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=tC(f.Start);var k=tC(f.End);g=new Nb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Ce=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Ce}}(e)))&&uC(g,f);d.push(g)}return d};
|
|
1296
|
+
function uC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=vC(c))a.color=c;if(c=b.BackColour)if(c=vC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Vb;a.textAlign="start";break;case 2:a.displayAlign=Vb;a.textAlign=Qb;break;case 3:a.displayAlign=Vb;a.textAlign="end";
|
|
1297
1297
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Qb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Qb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1298
|
-
function
|
|
1299
|
-
var
|
|
1300
|
-
function
|
|
1301
|
-
function
|
|
1302
|
-
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function
|
|
1303
|
-
r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Si(e),g=f.length;g<e.length&&!
|
|
1304
|
-
k.Yd,g+l),size:k.X,duration:1024,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.Ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Va:[],ia:new Uint8Array([]),sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.h,baseMediaDecodeTime:a,Sa:h},stream:b};c=new
|
|
1305
|
-
S("shaka.transmuxer.AacTransmuxer",
|
|
1298
|
+
function vC(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function tC(a){a=wC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",pC);pC.prototype.parseMedia=pC.prototype.parseMedia;pC.prototype.setManifestType=pC.prototype.setManifestType;pC.prototype.setSequenceMode=pC.prototype.setSequenceMode;pC.prototype.parseInit=pC.prototype.parseInit;
|
|
1299
|
+
var qC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,rC=/^\s*([^:]+):\s*(.*)/,sC=/\s*,\s*/,wC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;le["text/x-ssa"]=function(){return new pC};function xC(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Yd:c,X:a}:null}function yC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,Ga:"mp4a.40."+e}}
|
|
1300
|
+
function zC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1301
|
+
function AC(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1302
|
+
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function BC(a){this.i=a;this.h=0;this.g=new Map}r=BC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(ge(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1303
|
+
r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Si(e),g=f.length;g<e.length&&!zC(e,g);g++);a=1E3*c.endTime;f=Ri(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=yC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=xC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Yd+k.X;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1304
|
+
k.Yd,g+l),size:k.X,duration:1024,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.Ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Va:[],ia:new Uint8Array([]),sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.h,baseMediaDecodeTime:a,Sa:h},stream:b};c=new Ow([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Uw(c),this.g.set(b.id,d));b=kx(c);this.h++;b=Ed(d,b);return Promise.resolve(b)};
|
|
1305
|
+
S("shaka.transmuxer.AacTransmuxer",BC);BC.prototype.transmux=BC.prototype.transmux;BC.prototype.getOriginalMimeType=BC.prototype.getOriginalMimeType;BC.prototype.convertCodecs=BC.prototype.convertCodecs;BC.prototype.isSupported=BC.prototype.isSupported;BC.prototype.destroy=BC.prototype.destroy;jc("audio/aac",function(){return new BC("audio/aac")},pc);function CC(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1306
1306
|
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ia:a,X:e}}
|
|
1307
|
-
function
|
|
1308
|
-
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Si(a),f=e.length;f<a.length&&!
|
|
1309
|
-
Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}});f+=l.X}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Va:[],ia:h,sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.h,baseMediaDecodeTime:c,Sa:k},stream:b};c=new
|
|
1310
|
-
|
|
1311
|
-
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Si(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ri(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=
|
|
1312
|
-
duration:1536,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}});f+=l.X}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Va:[],ia:h,sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.h,baseMediaDecodeTime:c,Sa:k},stream:b};c=new
|
|
1313
|
-
|
|
1314
|
-
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=
|
|
1307
|
+
function DC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function EC(a){this.i=a;this.h=0;this.g=new Map}r=EC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1308
|
+
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Si(a),f=e.length;f<a.length&&!DC(a,f);f++);var g=1E3*c.endTime;e=Ri(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=CC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ia;k.push({data:a.subarray(f,f+l.X),size:l.X,duration:1536,
|
|
1309
|
+
Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}});f+=l.X}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Va:[],ia:h,sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.h,baseMediaDecodeTime:c,Sa:k},stream:b};c=new Ow([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Uw(c),this.g.set(b.id,d));b=kx(c);this.h++;b=Ed(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",EC);EC.prototype.transmux=EC.prototype.transmux;
|
|
1310
|
+
EC.prototype.getOriginalMimeType=EC.prototype.getOriginalMimeType;EC.prototype.convertCodecs=EC.prototype.convertCodecs;EC.prototype.isSupported=EC.prototype.isSupported;EC.prototype.destroy=EC.prototype.destroy;jc("audio/ac3",function(){return new EC("audio/ac3")},pc);function FC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new bj(a.subarray(b+2));dj(c,2);dj(c,3);var d=ej(c,11)+1<<1,e=ej(c,2);if(3==e){e=ej(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ej(c,2);var g=ej(c,3),h=ej(c,1);c=ej(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ia:a,X:d}};function GC(a){this.i=a;this.h=0;this.g=new Map}r=GC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1311
|
+
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Si(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ri(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=FC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ia;k.push({data:a.subarray(f,f+l.X),size:l.X,
|
|
1312
|
+
duration:1536,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}});f+=l.X}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Va:[],ia:h,sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.h,baseMediaDecodeTime:c,Sa:k},stream:b};c=new Ow([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Uw(c),this.g.set(b.id,d));b=kx(c);this.h++;b=Ed(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",GC);GC.prototype.transmux=GC.prototype.transmux;
|
|
1313
|
+
GC.prototype.getOriginalMimeType=GC.prototype.getOriginalMimeType;GC.prototype.convertCodecs=GC.prototype.convertCodecs;GC.prototype.isSupported=GC.prototype.isSupported;GC.prototype.destroy=GC.prototype.destroy;jc("audio/ec3",function(){return new GC("audio/ec3")},pc);function HC(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new bj(b.data),d=ij(c);ij(c);ij(c);gj(c);if(IC.includes(d)&&(d=V(c),3===d&&dj(c,1),gj(c),gj(c),dj(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?qj(c,16):qj(c,64))}gj(c);d=V(c);if(0===d)V(c);else if(1===d)for(dj(c,1),gj(c),gj(c),d=V(c),e=0;e<d;e++)gj(c);gj(c);dj(c,1);var f=V(c),g=V(c),h=ej(c,1);0===h&&dj(c,1);dj(c,1);var k=0,l=0,m=0,n=0;W(c)&&
|
|
1314
|
+
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=ij(c),q=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=q[p-1],e=u[p-1]):255===p&&(d=ej(c,16),e=ej(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
|
|
1315
1315
|
225].concat(k,[1],b));return{height:c,width:f,sa:a,ya:d,za:e}}
|
|
1316
|
-
function
|
|
1317
|
-
{data:Ed.apply(xd,x(c)),rd:b}:null}var
|
|
1318
|
-
sa:b,ya:a.Fi,za:a.Ei}}function
|
|
1319
|
-
function
|
|
1320
|
-
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(
|
|
1321
|
-
1)}
|
|
1322
|
-
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var fa=!1;Q?V(a):fa=W(a);fa||(R=V(a)+1);if(
|
|
1323
|
-
function
|
|
1324
|
-
function
|
|
1325
|
-
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function
|
|
1326
|
-
function
|
|
1327
|
-
var
|
|
1328
|
-
r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Si(e).length;f<e.length&&!
|
|
1329
|
-
duration:d,Va:[],ia:new Uint8Array([]),sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.h,baseMediaDecodeTime:c,Sa:a},stream:b};g=new
|
|
1330
|
-
|
|
1331
|
-
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new
|
|
1332
|
-
|
|
1316
|
+
function JC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=rj(new bj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
|
|
1317
|
+
{data:Ed.apply(xd,x(c)),rd:b}:null}var IC=[100,110,122,244,44,83,86,118,128,138,139,134];function KC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=LC(b.fullData);a=MC(c.fullData);var f=NC(d.fullData);b=OC(b.fullData,c.fullData,d.fullData,{wf:e.wf,Tf:e.Tf,bf:a.bf,cf:a.cf,We:a.We,af:a.af,Xe:a.Xe,Ye:a.Ye,Ze:a.Ze,$e:a.$e,Qe:a.Qe,Re:a.Re,Se:a.Se,Te:a.Te,Ue:a.Ue,Ve:a.Ve,Ne:a.Ne,he:a.he,Le:a.Le,Ke:a.Ke,Je:a.Je,zf:f.zf});return{height:a.height,width:a.width,
|
|
1318
|
+
sa:b,ya:a.Fi,za:a.Ei}}function LC(a){var b=new bj(a,!0);ij(b);ij(b);ej(b,4);ej(b,2);ej(b,6);a=ej(b,3);b=W(b);return{wf:a+1,Tf:b}}
|
|
1319
|
+
function MC(a){a=new bj(a,!0);ij(a);ij(a);var b=0,c=0,d=0,e=0;ej(a,4);var f=ej(a,3);W(a);for(var g=ej(a,2),h=ej(a,1),k=ej(a,5),l=ij(a),m=ij(a),n=ij(a),p=ij(a),q=ij(a),u=ij(a),v=ij(a),w=ij(a),A=ij(a),z=ij(a),B=ij(a),y=[],D=[],C=0;C<f;C++)y.push(W(a)),D.push(W(a));if(0<f)for(C=f;8>C;C++)ej(a,2);for(C=0;C<f;C++)y[C]&&ej(a,88),D[C]&&ij(a);V(a);y=V(a);3==y&&ej(a,1);D=V(a);C=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var I=V(a),J=V(a),H=V(a);if(W(a))for(var K=0;K<=f;K++)V(a),V(a),V(a);else V(a),V(a),
|
|
1320
|
+
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(K=0;4>K;K++)for(var G=0;G<(3===K?2:6);G++)if(W(a)){var M=Math.min(64,1<<4+(K<<1));1<K&&hj(a);for(var L=0;L<M;L++)hj(a)}else V(a);W(a);W(a);W(a)&&(ij(a),V(a),V(a),W(a));K=V(a);for(M=G=0;M<K;M++)if(L=!1,0!==M&&(L=W(a)),L){M===K&&V(a);W(a);V(a);for(var N=L=0;N<=G;N++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&L++}G=L}else{N=V(a);L=V(a);G=N+L;for(P=0;P<N;P++)V(a),W(a);for(N=0;N<L;N++)V(a),W(a)}if(W(a))for(K=V(a),G=0;G<K;G++){for(M=0;M<H+4;M++)ej(a,1);ej(a,
|
|
1321
|
+
1)}K=H=1;G=0;W(a);W(a);if(W(a)){W(a)&&(M=ij(a),L=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(H=L[M-1],K=N[M-1]):255===M&&(H=ej(a,16),K=ej(a,16)));W(a)&&W(a);W(a)&&(ej(a,3),W(a),W(a)&&(ij(a),ij(a),ij(a)));W(a)&&(V(a),V(a));W(a);W(a);W(a);if(M=W(a))V(a),V(a),V(a),V(a);if(W(a)&&(ej(a,32),ej(a,32),W(a)&&V(a),W(a))){N=!1;M=W(a);L=W(a);if(M||L){if(N=W(a))ij(a),ej(a,5),W(a),ej(a,5);ej(a,4);ej(a,4);N&&ej(a,4);ej(a,5);ej(a,5);ej(a,5)}for(P=0;P<=
|
|
1322
|
+
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var fa=!1;Q?V(a):fa=W(a);fa||(R=V(a)+1);if(M){for(Q=0;Q<R;Q++)V(a),V(a),N&&(V(a),V(a));W(a)}if(L){for(Q=0;Q<R;Q++)V(a),V(a),N&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),G=V(a),V(a),V(a),V(a),V(a))}return{We:B,bf:g,cf:h,af:k,Xe:l,Ye:m,Ze:n,$e:p,Qe:q,Re:u,Se:v,Te:w,Ue:A,Ve:z,he:G,Ne:0,Le:y,Ke:I,Je:J,width:D-(b+c)*(1===y||2===y?2:1),height:C-(d+e)*(1===y?2:1),Fi:H,Ei:K}}
|
|
1323
|
+
function NC(a){var b=new bj(a,!0);ij(b);ij(b);V(b);V(b);W(b);W(b);ej(b,3);W(b);W(b);V(b);V(b);hj(b);W(b);W(b);W(b)&&V(b);hj(b);hj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{zf:c}}
|
|
1324
|
+
function OC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.bf&3)<<6|(d.cf?1:0)<<5|d.af&31;e[2]=d.Xe;e[3]=d.Ye;e[4]=d.Ze;e[5]=d.$e;e[6]=d.Qe;e[7]=d.Re;e[8]=d.Se;e[9]=d.Te;e[10]=d.Ue;e[11]=d.Ve;e[12]=d.We;e[13]=240|(d.he&3840)>>8;e[14]=d.he&255;e[15]=252|d.zf&3;e[16]=252|d.Le&3;e[17]=248|d.Ke&7;e[18]=248|d.Je&7;e[19]=0;e[20]=0;e[21]=(d.Ne&3)<<6|(d.wf&7)<<3|(d.Tf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1325
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function PC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*QC[14*(3===c?3-d:3===d?3:4)+e-1];f=RC[3*(3===c?0:2===c?1:2)+f];c=SC[c][d];var h=TC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,X:k,Di:8*c*h}}return null}
|
|
1326
|
+
function UC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function VC(a,b){if(b+1<a.length&&UC(a,b)){var c=PC(a,b),d=4;c&&c.X&&(d=c.X);b+=d;return b===a.length||b+1<a.length&&UC(a,b)}return!1}
|
|
1327
|
+
var QC=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],RC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],SC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],TC=[0,1,1,4];function WC(a){this.i=a;this.h=0;this.g=new Map}r=WC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1328
|
+
r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Si(e).length;f<e.length&&!VC(e,f);f++);var g;for(a=[];f<e.length;){var h=PC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.X<=e.length&&a.push({data:e.subarray(f,f+h.X),size:h.X,duration:1152,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}});f+=h.X}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=9E4*g.Di/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1329
|
+
duration:d,Va:[],ia:new Uint8Array([]),sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.h,baseMediaDecodeTime:c,Sa:a},stream:b};g=new Ow([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Uw(g),this.g.set(b.id,d));b=kx(g);this.h++;b=Ed(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",WC);WC.prototype.transmux=WC.prototype.transmux;WC.prototype.getOriginalMimeType=WC.prototype.getOriginalMimeType;WC.prototype.convertCodecs=WC.prototype.convertCodecs;WC.prototype.isSupported=WC.prototype.isSupported;
|
|
1330
|
+
WC.prototype.destroy=WC.prototype.destroy;jc("audio/mpeg",function(){return new WC("audio/mpeg")},pc);function XC(a){this.h=a;this.g=null}r=XC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=ge(a).split(","),c=Ld("audio",b);b=Ld("video",b);return!c||b||"mp3"!=Yd(c)?!1:mb(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};
|
|
1331
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new sj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.hd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Lb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=PC(a,b))?(b+d.X<=a.length&&(c=Ed(c,a.subarray(b,b+d.X))),b+=d.X):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",XC);XC.prototype.transmux=XC.prototype.transmux;
|
|
1332
|
+
XC.prototype.getOriginalMimeType=XC.prototype.getOriginalMimeType;XC.prototype.convertCodecs=XC.prototype.convertCodecs;XC.prototype.isSupported=XC.prototype.isSupported;XC.prototype.destroy=XC.prototype.destroy;jc("video/mp2t",function(){return new XC("video/mp2t")},oc);/*
|
|
1333
1333
|
@license
|
|
1334
1334
|
MSS Transmuxer
|
|
1335
1335
|
Copyright 2015 Dash Industry Forum
|
|
1336
1336
|
SPDX-License-Identifier: BSD-3-Clause
|
|
1337
1337
|
*/
|
|
1338
|
-
function
|
|
1339
|
-
function
|
|
1338
|
+
function YC(a){this.h=a;(this.g=Wu.get("ISOBoxer")())&&ZC(this)}
|
|
1339
|
+
function ZC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1340
1340
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1341
|
-
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]
|
|
1341
|
+
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==$C[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=YC.prototype;r.destroy=function(){};
|
|
1342
1342
|
r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
|
|
1343
|
-
r.transmux=function(a,b,c){if(!c)return Promise.resolve(Ab(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.
|
|
1343
|
+
r.transmux=function(a,b,c){if(!c)return Promise.resolve(Ab(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.M()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1344
1344
|
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var q=this.g.createFullBox("saiz",h);q.version=0;q.flags=0;q.sample_count=n.sample_count;q.default_sample_info_size=0;q.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)q.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else q.default_sample_info_size=
|
|
1345
|
-
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=
|
|
1346
|
-
|
|
1347
|
-
r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=ge(c).split(",");c=Ld("audio",d);d=Ld("video",d);if(c&&(c=Yd(c),!
|
|
1345
|
+
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=aD(u,"traf")+aD(h,"senc")+16);var w=Ab(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function aD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",YC);YC.prototype.transmux=YC.prototype.transmux;
|
|
1346
|
+
YC.prototype.getOriginalMimeType=YC.prototype.getOriginalMimeType;YC.prototype.convertCodecs=YC.prototype.convertCodecs;YC.prototype.isSupported=YC.prototype.isSupported;YC.prototype.destroy=YC.prototype.destroy;var $C=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);jc("mss/audio/mp4",function(){return new YC("mss/audio/mp4")},pc);jc("mss/video/mp4",function(){return new YC("mss/video/mp4")},pc);function bD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=bD.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1347
|
+
r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=ge(c).split(",");c=Ld("audio",d);d=Ld("video",d);if(c&&(c=Yd(c),!cD.includes(c))||d&&(c=Yd(d),!dD.includes(c)))return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};
|
|
1348
1348
|
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=ge(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Ue(c,"audio/mp4")}).map(Te).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
|
|
1349
|
-
r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!
|
|
1350
|
-
if(!v.length)throw new T(2,3,3023,c?c.
|
|
1351
|
-
b.width=
|
|
1352
|
-
P=!0;break;case 19:case 20:case 21:L=sa=P=!0;break;case 32:sa=!0;break;case 33:sa=!0;break;case 34:sa=!0;break;case 35:P=sa=!0;break;case 39:case 40:sa=!0;break;default:sa=!1}if(P&&sa){var Ia=fa.fullData.byteLength,wa=new Uint8Array(4);wa[0]=Ia>>24&255;wa[1]=Ia>>16&255;wa[2]=Ia>>8&255;wa[3]=Ia&255;
|
|
1353
|
-
1].dts||0):9E4*(c.endTime-c.startTime);
|
|
1354
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Wa=[],ra,Za=null,ff=t(k.Lb()),Dd=ff.next();!Dd.done;Dd=ff.next()){var be=Dd.value,od=be.data;if(od){var Ec=0;ra=
|
|
1355
|
-
Oa:0,Na:0,La:0,Ma:2,bb:0}});Ec+=de}else Ec++}}}if(!ra||null==Za){if(!k.Ac().length)throw new T(2,3,3018,c?c.
|
|
1356
|
-
duration:1024,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}}),xg+=1024/ra.sampleRate*9E4}var Ai=ra.sampleRate,Bi=Za/9E4*Ai;n={id:b.id,type:"audio",codecs:ra.Ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ai,duration:d,Va:[],ia:new Uint8Array([]),sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.g,baseMediaDecodeTime:Bi,Sa:Wa},stream:b};break;case "ac3":for(var yg=[],fe=0,ec=new Uint8Array([]),jj=null,
|
|
1357
|
-
(jj=Jm.pts);for(var pf=0;pf<Km.length;){var Gd=
|
|
1358
|
-
ya:0,za:0,data:{ob:this.g,baseMediaDecodeTime:
|
|
1359
|
-
qf++}}if(0==kj||0==Lm.byteLength||null==lj)throw new T(2,3,3018,c?c.
|
|
1360
|
-
ke);rf?(mj||(mj=rf),ke+rf.X<=Lg.length&&
|
|
1361
|
-
oj=null,Oc=k.F;if(!Oc)throw new T(2,3,3018,c?c.
|
|
1362
|
-
2,3,4];break;case 134:
|
|
1363
|
-
2,pj=0;255===sf[sd];)pj+=255,sd+=1;pj+=sf[sd];sd+=1;sd+=
|
|
1364
|
-
data:{ob:this.g,baseMediaDecodeTime:
|
|
1365
|
-
|
|
1349
|
+
r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!zj(f)){for(var g=Si(f),h=g.length;h<f.length;h++)if(VC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(zC(f,h))return this.h||(this.h=new BC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new sj;var k=this.j.parse(f),l=[],m=k.hd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],q=null,u=[],v=k.Ac();
|
|
1350
|
+
if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var B=JC(z);if(B){null==q&&(q=A.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(A.dts||0):1<v.length?(A.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:B.data,size:B.data.byteLength,duration:y,Za:Math.round((A.pts||0)-(A.dts||0)),flags:{ab:0,Oa:0,Na:0,La:0,Ma:B.rd?2:1,bb:B.rd?0:1}})}}var D=HC(u);if(!D||null==q)throw new T(2,3,3018,c?c.M()[0]:null);b.height=D.height;
|
|
1351
|
+
b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Va:[],ia:new Uint8Array([]),sa:D.sa,ya:D.ya,za:D.za,data:{ob:this.g,baseMediaDecodeTime:q,Sa:p},stream:b};break;case "hvc":var C=[],I=null,J=[],H=k.Ac();if(!H.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var K=0;K<H.length;K++){var G=H[K],M=G.nalus;J.push.apply(J,x(M));for(var L=!1,N=[],P=!1,R=t(M),Q=R.next();!Q.done;Q=R.next()){var fa=Q.value;switch(fa.type){case 1:case 0:var sa=
|
|
1352
|
+
P=!0;break;case 19:case 20:case 21:L=sa=P=!0;break;case 32:sa=!0;break;case 33:sa=!0;break;case 34:sa=!0;break;case 35:P=sa=!0;break;case 39:case 40:sa=!0;break;default:sa=!1}if(P&&sa){var Ia=fa.fullData.byteLength,wa=new Uint8Array(4);wa[0]=Ia>>24&255;wa[1]=Ia>>16&255;wa[2]=Ia>>8&255;wa[3]=Ia&255;N.push(wa);N.push(fa.fullData)}}var Ja=N.length?{data:Ed.apply(xd,x(N)),rd:L}:null;if(Ja){null==I&&null!=G.dts&&(I=G.dts);var Qa=void 0;Qa=K+1<H.length?(H[K+1].dts||0)-(G.dts||0):1<H.length?(G.dts||0)-(H[K-
|
|
1353
|
+
1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:Ja.data,size:Ja.data.byteLength,duration:Qa,Za:Math.round((G.pts||0)-(G.dts||0)),flags:{ab:0,Oa:0,Na:0,La:0,Ma:Ja.rd?2:1,bb:Ja.rd?0:1}})}}var Aa=KC(J);if(!Aa||null==I)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Aa.height;b.width=Aa.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Va:[],ia:new Uint8Array([]),sa:Aa.sa,ya:Aa.ya,za:Aa.za,data:{ob:this.g,baseMediaDecodeTime:I,Sa:C},stream:b}}n&&
|
|
1354
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Wa=[],ra,Za=null,ff=t(k.Lb()),Dd=ff.next();!Dd.done;Dd=ff.next()){var be=Dd.value,od=be.data;if(od){var Ec=0;ra=yC(od,Ec);if(!ra)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=ra.sampleRate;b.channelsCount=ra.channelCount;null==Za&&null!==be.pts&&(Za=be.pts);for(;Ec<od.length;){var ce=xC(od,Ec);if(ce){var de=ce.Yd+ce.X;Ec+de<=od.length&&Wa.push({data:od.subarray(Ec+ce.Yd,Ec+de),size:ce.X,duration:1024,Za:0,flags:{ab:0,
|
|
1355
|
+
Oa:0,Na:0,La:0,Ma:2,bb:0}});Ec+=de}else Ec++}}}if(!ra||null==Za){if(!k.Ac().length)throw new T(2,3,3018,c?c.M()[0]:null);Za=9E4*c.startTime;var ee=Ld("audio",b.codecs.split(","));if(!ee||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ra={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ga:ee};var pd=AC(ee,b.channelsCount);if(!pd)throw new T(2,3,3018,c?c.M()[0]:null);for(var zi=Za+9E4*(c.endTime-c.startTime),xg=Za;xg<zi;)Wa.push({data:pd,size:pd.byteLength,
|
|
1356
|
+
duration:1024,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}}),xg+=1024/ra.sampleRate*9E4}var Ai=ra.sampleRate,Bi=Za/9E4*Ai;n={id:b.id,type:"audio",codecs:ra.Ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ai,duration:d,Va:[],ia:new Uint8Array([]),sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.g,baseMediaDecodeTime:Bi,Sa:Wa},stream:b};break;case "ac3":for(var yg=[],fe=0,ec=new Uint8Array([]),jj=null,vu=t(k.Lb()),Im=vu.next();!Im.done;Im=vu.next()){var Jm=Im.value,Km=Jm.data;null==jj&&null!==Jm.pts&&
|
|
1357
|
+
(jj=Jm.pts);for(var pf=0;pf<Km.length;){var Gd=CC(Km,pf);Gd?(b.audioSamplingRate=Gd.sampleRate,b.channelsCount=Gd.channelCount,fe=Gd.sampleRate,ec=Gd.ia,yg.push({data:Km.subarray(pf,pf+Gd.X),size:Gd.X,duration:1536,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}}),pf+=Gd.X):pf++}}if(0==fe||0==ec.byteLength||null==jj)throw new T(2,3,3018,c?c.M()[0]:null);var tD=jj/9E4*fe;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:fe,duration:d,Va:[],ia:ec,sa:new Uint8Array([]),
|
|
1358
|
+
ya:0,za:0,data:{ob:this.g,baseMediaDecodeTime:tD,Sa:yg},stream:b};break;case "ec3":for(var wu=[],kj=0,Lm=new Uint8Array([]),lj=null,xu=t(k.Lb()),Mm=xu.next();!Mm.done;Mm=xu.next()){var Nm=Mm.value,Om=Nm.data;null==lj&&null!==Nm.pts&&(lj=Nm.pts);for(var qf=0;qf<Om.length;){var Hd=FC(Om,qf);Hd?(b.audioSamplingRate=Hd.sampleRate,b.channelsCount=Hd.channelCount,kj=Hd.sampleRate,Lm=Hd.ia,wu.push({data:Om.subarray(qf,qf+Hd.X),size:Hd.X,duration:1536,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}}),qf+=Hd.X):
|
|
1359
|
+
qf++}}if(0==kj||0==Lm.byteLength||null==lj)throw new T(2,3,3018,c?c.M()[0]:null);var uD=lj/9E4*kj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:kj,duration:d,Va:[],ia:Lm,sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.g,baseMediaDecodeTime:uD,Sa:wu},stream:b};break;case "mp3":for(var yu=[],mj,nj=null,zu=t(k.Lb()),Pm=zu.next();!Pm.done;Pm=zu.next()){var Qm=Pm.value,Lg=Qm.data;if(Lg){null==nj&&null!==Qm.pts&&(nj=Qm.pts);for(var ke=0;ke<Lg.length;){var rf=PC(Lg,
|
|
1360
|
+
ke);rf?(mj||(mj=rf),ke+rf.X<=Lg.length&&yu.push({data:Lg.subarray(ke,ke+rf.X),size:rf.X,duration:1152,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}}),ke+=rf.X):ke++}}}if(!mj||null==nj)throw new T(2,3,3018,c?c.M()[0]:null);var Au=mj.sampleRate,vD=nj/9E4*Au;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Au,duration:d,Va:[],ia:new Uint8Array([]),sa:new Uint8Array([]),ya:0,za:0,data:{ob:this.g,baseMediaDecodeTime:vD,Sa:yu},stream:b};break;case "opus":var Bu=[],
|
|
1361
|
+
oj=null,Oc=k.F;if(!Oc)throw new T(2,3,3018,c?c.M()[0]:null);var xb=[];switch(Oc.oh){case 1:case 2:xb=[0];break;case 0:xb=[255,1,1,0,1];break;case 128:xb=[255,2,0,0,1];break;case 3:xb=[1,2,1,0,2,1];break;case 4:xb=[1,2,2,0,1,2,3];break;case 5:xb=[1,3,2,0,4,1,2,3];break;case 6:xb=[1,4,2,0,4,1,2,3,5];break;case 7:xb=[1,4,2,0,4,1,2,3,5,6];break;case 8:xb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:xb=[1,1,2,0,1];break;case 131:xb=[1,1,3,0,1,2];break;case 132:xb=[1,1,4,0,1,2,3];break;case 133:xb=[1,1,5,0,1,
|
|
1362
|
+
2,3,4];break;case 134:xb=[1,1,6,0,1,2,3,4,5];break;case 135:xb=[1,1,7,0,1,2,3,4,5,6];break;case 136:xb=[1,1,8,0,1,2,3,4,5,6,7]}var Cu=new Uint8Array([0,Oc.channelCount,0,0,Oc.sampleRate>>>24&255,Oc.sampleRate>>>17&255,Oc.sampleRate>>>8&255,Oc.sampleRate>>>0&255,0,0].concat(x(xb)));for(var Du=Oc.sampleRate,Eu=t(k.Lb()),Rm=Eu.next();!Rm.done;Rm=Eu.next()){var Sm=Rm.value,sf=Sm.data;null==oj&&null!==Sm.pts&&(oj=Sm.pts);for(var Mg=0;Mg<sf.length;){for(var wD=0!==(sf[Mg+1]&16),xD=0!==(sf[Mg+1]&8),sd=Mg+
|
|
1363
|
+
2,pj=0;255===sf[sd];)pj+=255,sd+=1;pj+=sf[sd];sd+=1;sd+=wD?2:0;sd+=xD?2:0;var Fu=sf.slice(sd,sd+pj);Bu.push({data:Fu,size:Fu.byteLength,duration:960,Za:0,flags:{ab:0,Oa:0,Na:0,La:0,Ma:2,bb:0}});Mg=sd+pj}}if(0==Cu.byteLength||null==oj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Oc.sampleRate;b.channelsCount=Oc.channelCount;var yD=oj/9E4*Du;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Du,duration:d,Va:[],ia:Cu,sa:new Uint8Array([]),ya:0,za:0,
|
|
1364
|
+
data:{ob:this.g,baseMediaDecodeTime:yD,Sa:Bu},stream:b}}n&&(l.push(n),n=null)}}catch(Tm){return Tm&&3023==Tm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Tm)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Gu=new Ow(l);if(this.i.has(b.id))var Um=this.i.get(b.id);else Um=Uw(Gu),this.i.set(b.id,Um);var zD=kx(Gu);this.g++;var AD=Ed(Um,zD);return Promise.resolve(AD)};S("shaka.transmuxer.TsTransmuxer",bD);bD.prototype.transmux=bD.prototype.transmux;
|
|
1365
|
+
bD.prototype.getOriginalMimeType=bD.prototype.getOriginalMimeType;bD.prototype.convertCodecs=bD.prototype.convertCodecs;bD.prototype.isSupported=bD.prototype.isSupported;bD.prototype.destroy=bD.prototype.destroy;var cD=["aac","ac-3","ec-3","mp3","opus"],dD=["avc","hevc"];jc("video/mp2t",function(){return new bD("video/mp2t")},nc);/*
|
|
1366
1366
|
@license
|
|
1367
1367
|
EME Encryption Scheme Polyfill
|
|
1368
1368
|
Copyright 2019 Google LLC
|
|
1369
1369
|
SPDX-License-Identifier: Apache-2.0
|
|
1370
1370
|
*/
|
|
1371
|
-
function
|
|
1372
|
-
function
|
|
1373
|
-
function
|
|
1371
|
+
function eD(){}var fD;
|
|
1372
|
+
function gD(){fD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(fD=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=hD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1373
|
+
function hD(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),E(e,fD.call(c,a,b),2);d=e.h;if(iD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=fD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=jD;return e.return(jD.call(c,
|
|
1374
1374
|
a,b))})}
|
|
1375
|
-
function
|
|
1376
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,
|
|
1377
|
-
function
|
|
1378
|
-
function
|
|
1379
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
1380
|
-
function
|
|
1381
|
-
new
|
|
1382
|
-
function
|
|
1383
|
-
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",
|
|
1384
|
-
|
|
1385
|
-
function
|
|
1386
|
-
function
|
|
1375
|
+
function jD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=kD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=lD(h.videoCapabilities,d),l=lD(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1376
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,fD.call(c,a,e),2)}p=v.h;u=q=null;e[0]&&(e[0].videoCapabilities&&(q=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new mD(p,q,u))})}function lD(a,b){return a?a.filter(function(c){return nD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",eD);eD.install=gD;function oD(){}var pD;
|
|
1377
|
+
function qD(){pD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(pD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=rD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1378
|
+
function rD(a){var b=this,c,d,e;return O(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(f,pD.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&iD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=pD,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1379
|
+
navigator.mediaCapabilities.decodingInfo=sD;if(d){f.u(3);break}e=c;return E(f,BD(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(sD.call(b,a))}})}
|
|
1380
|
+
function sD(a){var b=this,c,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=kD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},nD(d,g)&&nD(c,g))?E(m,pD.call(b,a),2):m.return(h);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1381
|
+
new mD(k.keySystemAccess,c,d);m.u(3);break}if(!a.keySystemConfiguration){m.u(3);break}l=k;return E(m,BD(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1382
|
+
function BD(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
1383
|
+
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",oD);oD.install=qD;function mD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
|
|
1384
|
+
mD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};mD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
|
|
1385
|
+
function kD(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function iD(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
1386
|
+
function nD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(CD||DD)return!0;return!1}function ED(){}function Jz(){gD();qD()}S("EncryptionSchemePolyfills",ED);ED.install=Jz;var DD=navigator.userAgent.includes("CrKey"),CD=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=ED);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1387
1387
|
|
|
1388
1388
|
//# sourceMappingURL=shaka-player.compiled.map
|