shaka-player 4.10.21 → 4.10.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deps.js +1 -1
- package/dist/locales.js +38 -38
- package/dist/shaka-player.compiled.debug.js +28 -29
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +308 -308
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +39 -40
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +261 -261
- package/dist/shaka-player.ui.map +2 -2
- package/lib/dash/dash_parser.js +4 -2
- package/lib/dash/segment_template.js +1 -1
- package/lib/media/media_source_engine.js +19 -30
- package/lib/media/playhead.js +3 -1
- package/lib/player.js +6 -1
- package/lib/util/platform.js +3 -2
- package/lib/util/player_configuration.js +3 -1
- package/package.json +1 -1
- package/ui/remote_button.js +3 -2
- package/ui/save_video_frame_button.js +3 -0
|
@@ -17,12 +17,12 @@ function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterat
|
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ia=Object.setPrototypeOf;else{var ja;a:{var ka={a:!0},la={};try{la.__proto__=ka;ja=la.a;break a}catch(a){}ja=!1}ia=ja?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ma=ia;
|
|
18
18
|
function na(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(ma)ma(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.jk=b.prototype}function oa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function pa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}oa.prototype.s=function(a){this.h=a};
|
|
19
19
|
function qa(a,b){a.i={tg:b,Gg:!0};a.g=a.m||a.j}oa.prototype.return=function(a){this.i={return:a};this.g=this.j};function F(a,b,c){a.g=c;return{value:b}}oa.prototype.u=function(a){this.g=a};function H(a){a.g=0}function ra(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a,b){a.m=0;a.j=b||0}function ta(a,b,c){a.g=b;a.m=c||0}function ua(a,b){a.m=b||0;b=a.i.tg;a.i=null;return b}function xa(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
|
-
function ya(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Gg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function
|
|
20
|
+
function ya(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Gg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new oa;this.h=a}function Ba(a,b){pa(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
|
|
21
21
|
function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,qa(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,qa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Gg)throw b.tg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Ea(a){this.next=function(b){pa(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Da(a));return b};this.throw=function(b){pa(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.s):(qa(a.g,b),b=Da(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Ga(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
23
|
-
function O(a){return Ga(new Ea(new
|
|
23
|
+
function O(a){return Ga(new Ea(new za(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
24
|
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
25
|
-
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.
|
|
25
|
+
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.D),reject:g(this.l)}};b.prototype.D=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.C(g):this.m(g)}};
|
|
26
26
|
b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.I(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.A()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
|
|
27
27
|
function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.A=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
28
28
|
b.prototype.H=function(g){var h=this.j();g.Cd(h.resolve,h.reject)};b.prototype.I=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.Cd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Cd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
@@ -56,17 +56,17 @@ ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ia(
|
|
|
56
56
|
Copyright 2016 Google LLC
|
|
57
57
|
SPDX-License-Identifier: Apache-2.0
|
|
58
58
|
*/
|
|
59
|
-
function Oa(){}function Qa(){};function Ra(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ra.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 Ta(a){return a.h/(1-Math.pow(a.g,a.i))};function Ua(){this.h=new Ra(2);this.j=new Ra(5);this.g=0;this.i=128E3;this.l=16E3}Ua.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)};Ua.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)}};Ua.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ta(this.h),Ta(this.j))};function Wa(){}function Xa(){}function Ya(){}function $a(a){var b=Ha.apply(1,arguments);ab.has(a)||(ab.add(a),Ya.apply(Wa,x(b)))}function cb(){}function db(){}function eb(){}var ab=new Set;window.console&&(Ya=function(){return console.warn.apply(console,x(Ha.apply(0,arguments)))},Xa=function(){console.error.apply(console,x(Ha.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.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])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.g=new fb}q=gb.prototype;q.release=function(){this.Qa();this.g=null};q.
|
|
60
|
-
q.Qa=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.kb();this.g.g={}}};S("shaka.util.EventManager",gb);gb.prototype.removeAll=gb.prototype.Qa;gb.prototype.unlisten=gb.prototype.kb;gb.prototype.listenOnce=gb.prototype.
|
|
59
|
+
function Oa(){}function Qa(){};function Ra(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ra.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 Ta(a){return a.h/(1-Math.pow(a.g,a.i))};function Ua(){this.h=new Ra(2);this.j=new Ra(5);this.g=0;this.i=128E3;this.l=16E3}Ua.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)};Ua.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)}};Ua.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ta(this.h),Ta(this.j))};function Wa(){}function Xa(){}function Ya(){}function $a(a){var b=Ha.apply(1,arguments);ab.has(a)||(ab.add(a),Ya.apply(Wa,x(b)))}function cb(){}function db(){}function eb(){}var ab=new Set;window.console&&(Ya=function(){return console.warn.apply(console,x(Ha.apply(0,arguments)))},Xa=function(){console.error.apply(console,x(Ha.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.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])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.g=new fb}q=gb.prototype;q.release=function(){this.Qa();this.g=null};q.F=function(a,b,c,d){this.g&&(a=new hb(a,b,c,d),this.g.push(b,a))};q.ka=function(a,b,c,d){function e(g){f.kb(a,b,e);c(g)}var f=this;this.F(a,b,e,d)};q.kb=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.kb(),this.g.remove(b,e))}};
|
|
60
|
+
q.Qa=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.kb();this.g.g={}}};S("shaka.util.EventManager",gb);gb.prototype.removeAll=gb.prototype.Qa;gb.prototype.unlisten=gb.prototype.kb;gb.prototype.listenOnce=gb.prototype.ka;gb.prototype.listen=gb.prototype.F;gb.prototype.release=gb.prototype.release;function hb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ib(a,d);this.target.addEventListener(b,c,this.g)}
|
|
61
61
|
hb.prototype.kb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ib(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 jb(a)?b:b.capture||!1}
|
|
62
62
|
function jb(a){var b=kb;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}kb=b}return b||!1}var kb=void 0;function lb(a){if(mb.has(a))return mb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);mb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),mb.set(a,b),b):!1}function ob(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var mb=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){Ya([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){Xa([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 xb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(yb(a)==yb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=zb(a);b=zb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function yb(a){return a instanceof ArrayBuffer?a:a.buffer}function Ab(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
63
63
|
function zb(a,b,c){c=void 0===c?Infinity:c;return Bb(a,void 0===b?0:b,c,Uint8Array)}function Db(a,b,c){c=void 0===c?Infinity:c;return Bb(a,void 0===b?0:b,c,Uint16Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Bb(a,void 0===b?0:b,c,DataView)}function Bb(a,b,c,d){var e=yb(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)}
|
|
64
64
|
S("shaka.util.BufferUtils",wb);wb.toDataView=Eb;wb.toUint16=Db;wb.toUint8=zb;wb.toArrayBuffer=Ab;wb.equal=xb;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?0: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=zb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
65
65
|
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(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Kb;this.scroll=Lb}S("shaka.text.CueRegion",Jb);var Kb=1;Jb.units={PX:0,PERCENTAGE:Kb,LINES:2};var Lb="";Jb.scrollMode={NONE:Lb,UP:"up"};function Mb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Nb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Ob(a,b,c){c||(c=Mb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={Hg:void 0},d=a.next()){e.Hg=d.value;d=b.findIndex(function(f){return function(g){return c(f.Hg,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
|
|
66
|
-
function Pb(a,b,c){c||(c=Mb);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 Qb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Jb;this.position=null;this.positionAlign=Rb;this.size=0;this.textAlign=
|
|
66
|
+
function Pb(a,b,c){c||(c=Mb);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 Qb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Jb;this.position=null;this.positionAlign=Rb;this.size=0;this.textAlign=Sb;this.direction=Ub;this.writingMode=Vb;this.lineInterpretation=Wb;this.line=null;this.lineHeight="";this.lineAlign=Xb;this.displayAlign=Yb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Zb;this.fontStyle=$b;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
67
67
|
"";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={hc:32,rows:15}}function ac(a,b){a=new Qb(a,b,"");a.lineBreak=!0;return a}Qb.prototype.clone=function(){var a=new Qb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
68
68
|
function dc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Pb(a.nestedCues,b.nestedCues,dc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Pb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}S("shaka.text.Cue",Qb);Qb.equal=dc;Qb.prototype.clone=Qb.prototype.clone;var Rb="auto";
|
|
69
|
-
Qb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Rb};var
|
|
69
|
+
Qb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Rb};var Sb="center",ec={LEFT:"left",RIGHT:"right",CENTER:Sb,START:"start",END:"end"};Qb.textAlign=ec;var Yb="after",fc={BEFORE:"before",CENTER:"center",AFTER:Yb};Qb.displayAlign=fc;var Ub="ltr";Qb.direction={HORIZONTAL_LEFT_TO_RIGHT:Ub,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Vb="horizontal-tb";Qb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Vb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Wb=0;
|
|
70
70
|
Qb.lineInterpretation={LINE_NUMBER:Wb,PERCENTAGE:1};var Xb="start",gc={CENTER:"center",START:Xb,END:"end"};Qb.lineAlign=gc;var hc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Qb.defaultTextColor=hc;var ic={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Qb.defaultTextBackgroundColor=ic;var Zb=400;Qb.fontWeight={NORMAL:Zb,BOLD:700};
|
|
71
71
|
var $b="normal",jc={NORMAL:$b,ITALIC:"italic",OBLIQUE:"oblique"};Qb.fontStyle=jc;Qb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function kc(){}kc.prototype.destroy=function(){};function lc(a,b,c){mc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,he:b}}function nc(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([oc,pc,qc,rc]),e=d.next();!e.done;e=d.next())if(e=mc[c+"-"+e.value]){var f=e.he(),g=f.isSupported(a,b);f.destroy();if(g)return e.he}return null}S("shaka.transmuxer.TransmuxerEngine",kc);kc.findTransmuxer=nc;kc.unregisterTransmuxer=function(a,b){delete mc[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
72
72
|
kc.registerTransmuxer=lc;kc.prototype.destroy=kc.prototype.destroy;var mc={},rc=1,qc=2,pc=3,oc=4;kc.PluginPriority={FALLBACK:rc,PREFERRED_SECONDARY:qc,PREFERRED:pc,APPLICATION:oc};/*
|
|
@@ -117,9 +117,9 @@ function zd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)r
|
|
|
117
117
|
function Ad(a){if(window.TextEncoder&&!id()){var b=new TextEncoder;return Ab(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Ab(b)}function Bd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function yd(a){return Cd.value()(a)}
|
|
118
118
|
function Dd(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",td);td.resetFromCharCode=function(){Cd.g=void 0};
|
|
119
119
|
td.toUTF16=Bd;td.toUTF8=Ad;td.fromBytesAutoDetect=zd;td.fromUTF16=xd;td.fromUTF8=vd;var Cd=new Kc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={cc:65536};0<b.cc;b={cc:b.cc},b.cc/=2)if(a(b.cc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.cc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.cc));return e}}(b);return null});function Ed(){}function Fd(a){a=yd(zb(a));return btoa(a)}function Gd(a,b){b=void 0==b?!0:b;a=Fd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Hd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Id(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
120
|
-
function Jd(a){var b=zb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Kd(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(zb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Ed);Ed.concat=Kd;Ed.toHex=Jd;Ed.fromHex=Id;Ed.fromBase64=Hd;Ed.toBase64=Gd;Ed.toStandardBase64=Fd;function
|
|
120
|
+
function Jd(a){var b=zb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Kd(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(zb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Ed);Ed.concat=Kd;Ed.toHex=Jd;Ed.fromHex=Id;Ed.fromBase64=Hd;Ed.toBase64=Gd;Ed.toStandardBase64=Fd;function Ld(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new tc(a[0]);b=new tc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new tc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new tc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
121
121
|
function Nd(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
|
|
122
|
-
function
|
|
122
|
+
function Od(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Gd(Id(h),!1));var l=g;22!=l.length&&(l=Gd(Id(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:zb(Ad(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
123
123
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Rd(a,b){if(1==b.length)return b[0];a=Sd(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Sd(a,b){for(var c=t(Td[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ud?"":null}
|
|
124
124
|
function Vd(a,b){var c=[];a=t(Td[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 Ud="text",Wd={ha:"video",X:"audio",ua:Ud,Ce:"image",ij:"application"},Xd=1/15,Td={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Yd(){}function Zd(a,b){var c=a;b&&!$d.includes(a)&&(c+='; codecs="'+b+'"');return c}function ae(a,b){b&&(a+='; codecs="'+b+'"');return a}function be(a,b,c){var d=Zd(a,b);b=ae(a,b);nc(b)?(a=nc(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}
|
|
125
125
|
function ce(a,b,c){var d=[b];de.forEach(function(e,f){var g=a[f];"codecs"==f?$d.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function ee(a){return a.split(";")[0].split("/")[1]}
|
|
@@ -181,8 +181,8 @@ function qf(a){var b=a.language;return{id:mf(a),active:!1,type:"",bandwidth:0,la
|
|
|
181
181
|
originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function sf(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function tf(a){return a.filter(function(b){return sf(b)})}
|
|
182
182
|
function uf(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Ie(Be(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Be(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=vf(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(we,[]);return a.length?
|
|
183
183
|
vf(e,a[0]):e}function vf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Ye(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}S("shaka.util.StreamUtils",Le);Le.meetsRestrictions=Pe;
|
|
184
|
-
var cf={},nf=0,ff=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),gf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function wf(){var a=this;this.A=null;this.j=!1;this.i=new Ua;this.
|
|
185
|
-
b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=null}q=wf.prototype;q.stop=function(){this.A=null;this.j=!1;this.s=[];this.B=1;this.o=this.l=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.m=null};q.release=function(){this.
|
|
184
|
+
var cf={},nf=0,ff=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),gf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function wf(){var a=this;this.A=null;this.j=!1;this.i=new Ua;this.D=new gb;navigator.connection&&navigator.connection.addEventListener&&this.D.F(navigator.connection,"change",function(){if(a.j&&a.g.useNetworkInformation){a.i=new Ua;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.s=[];this.B=1;this.G=!1;this.h=this.o=this.g=this.l=null;this.C=new Rc(function(){if(a.j&&a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
185
|
+
b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=null}q=wf.prototype;q.stop=function(){this.A=null;this.j=!1;this.s=[];this.B=1;this.o=this.l=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.m=null};q.release=function(){this.D.release();this.C=null};q.init=function(a){this.A=a};
|
|
186
186
|
q.chooseVariant=function(){var a=Infinity,b=Infinity;if(this.g.restrictToScreenSize){var c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;a=window.screen.height*c;b=window.screen.width*c}this.h&&this.g.restrictToElementSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=Math.min(a,this.o.clientHeight*c),b=Math.min(b,this.o.clientWidth*c));c=this.s.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});c.length||(c=this.s);var d=c;c.length!=
|
|
187
187
|
this.s.length&&(d=this.s.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));c=Bf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=a||Infinity!=b){c=Cf(c);c=t(c);for(var e=c.next();!e.done;e=c.next())if(e=e.value,e.height>=a&&e.width>=b){a=e.height;b=e.width;break}c=Bf(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&&!c.length&&(c=Bf(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d<c.length;d++){e=c[d];
|
|
188
188
|
for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<c.length;k++)if(e.bandwidth!=c[k].bandwidth){h=c[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;a>=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width<e.video.width||b.video.height<e.video.height))&&(b=e)}this.l=Date.now();return b};q.enable=function(){this.j=!0};q.disable=function(){this.j=!1};
|
|
@@ -200,31 +200,31 @@ function Pf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCou
|
|
|
200
200
|
function Tf(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Uf(){this.g=Vf;this.i=(new Map).set(Vf,2).set(Wf,1);this.h=0}function Xf(a,b,c){a.i.set(Vf,c).set(Wf,b)}var Wf=0,Vf=1;function Yf(a,b){var c=Zf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
201
201
|
function $f(a){var b,c;return O(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return F(d,new Promise(function(e){(new Rc(e)).$(c/1E3)}),2)}a.h*=a.m;H(d)})}function Zf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function ag(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}ag.prototype.resolve=function(){};ag.prototype.reject=function(){};function bg(a,b){this.promise=a;this.i=b;this.g=!1}function cg(a){return new bg(Promise.reject(a),function(){return Promise.resolve()})}function dg(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new bg(a,function(){return Promise.resolve()})}function eg(a){return new bg(Promise.resolve(a),function(){return Promise.resolve()})}function fg(a){return new bg(a,function(){return a.catch(function(){})})}bg.prototype.abort=function(){this.g=!0;return this.i()};
|
|
202
202
|
function gg(a){return new bg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}bg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
203
|
-
bg.prototype.
|
|
204
|
-
function hg(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}S("shaka.util.AbortableOperation",bg);bg.prototype.chain=bg.prototype.
|
|
203
|
+
bg.prototype.za=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=hg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new ag,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new bg(f,function(){return d()})};
|
|
204
|
+
function hg(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}S("shaka.util.AbortableOperation",bg);bg.prototype.chain=bg.prototype.za;bg.prototype["finally"]=bg.prototype.finally;bg.all=gg;bg.prototype.abort=bg.prototype.abort;bg.notAbortable=fg;bg.completed=eg;bg.aborted=dg;bg.failed=cg;function U(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
205
205
|
function ig(a){var b=new U(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}U.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};U.prototype.stopImmediatePropagation=function(){this.g=!0};U.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",U);
|
|
206
206
|
var jg={kj:"abrstatuschanged",lj:"adaptation",mj:"audiotrackchanged",nj:"buffering",oj:"complete",pj:"downloadfailed",qj:"downloadheadersreceived",rj:"drmsessionupdate",tj:"emsg",Kj:"prft",Error:"error",uj:"expirationupdated",vj:"firstquartile",wj:"gapjumped",zj:"keystatuschanged",Bj:"loaded",Cj:"loading",Ej:"manifestparsed",Fj:"manifestupdated",Gj:"mediaqualitychanged",Metadata:"metadata",Hj:"midpoint",Ij:"nospatialvideoinfo",Jj:"onstatechange",Lj:"ratechange",Nj:"segmentappended",Oj:"sessiondata",
|
|
207
207
|
Pj:"spatialvideoinfo",Qj:"stalldetected",Rj:"started",Sj:"statechanged",Tj:"streaming",Uj:"textchanged",Vj:"texttrackvisibility",Wj:"thirdquartile",Xj:"timelineregionadded",Yj:"timelineregionenter",Zj:"timelineregionexit",$j:"trackschanged",bk:"unloading",dk:"variantchanged"};function kg(){this.ya=new fb;this.le=this}kg.prototype.addEventListener=function(a,b){this.ya&&this.ya.push(a,b)};kg.prototype.removeEventListener=function(a,b){this.ya&&this.ya.remove(a,b)};kg.prototype.dispatchEvent=function(a){if(!this.ya)return!0;var b=this.ya.get(a.type)||[],c=this.ya.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.le;a.currentTarget=this.le;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
208
|
-
kg.prototype.release=function(){this.ya=null};function lg(){this.g=[]}function mg(a,b){a.g.push(b.finally(function(){Nb(a.g,b)}))}lg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function ng(a,b,c,d,e,f){kg.call(this);this.i=!1;this.m=new lg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.
|
|
208
|
+
kg.prototype.release=function(){this.ya=null};function lg(){this.g=[]}function mg(a,b){a.g.push(b.finally(function(){Nb(a.g,b)}))}lg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function ng(a,b,c,d,e,f){kg.call(this);this.i=!1;this.m=new lg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.D=e||null;this.C=f||null;this.o=this.s=!1}na(ng,kg);q=ng.prototype;q.Pf=function(a){this.s=a};q.Qf=function(a){this.o=a};function og(a,b,c,d){c=c||pg;var e=qg[a];if(!e||c>=e.priority)qg[a]={priority:c,he:b,Fi:void 0===d?!1:d}}
|
|
209
209
|
function rg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.Ii=function(a){this.g.add(a)};q.dj=function(a){this.g.delete(a)};q.mg=function(){this.g.clear()};q.Ji=function(a){this.h.add(a)};q.ej=function(a){this.h.delete(a)};q.ng=function(){this.h.clear()};
|
|
210
210
|
function sg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();kg.prototype.release.call(this);return this.m.destroy()};
|
|
211
|
-
q.request=function(a,b,c){var d=this,e=new tg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new ug(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Je(b.retryParameters):Zf();b.uris=Je(b.uris);f=vg(this,a,b,c);var g=f.
|
|
212
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.
|
|
213
|
-
function vg(a,b,c,d){function e(h){f=f.
|
|
214
|
-
function wg(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.
|
|
215
|
-
var D=n(c.uris[f],c,b,function(C,E,G){r&&r.stop();u&&u.$(B/1E3);a.l&&b==yg&&(z++,c.packetNumber=z,a.l(C,E,zg(d),c),m=!0,h.g=G)},function(C){a.j&&a.j(C,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return D;var y=c.retryParameters.connectionTimeout;y&&(r=new Rc(function(){v=!0;D.abort()}),r.$(y/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Rc(function(){v=!0;D.abort()}));return D}).
|
|
211
|
+
q.request=function(a,b,c){var d=this,e=new tg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new ug(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Je(b.retryParameters):Zf();b.uris=Je(b.uris);f=vg(this,a,b,c);var g=f.za(function(){return wg(d,a,b,c,new Yf(b.retryParameters,!1),0,null,e)}),h=g.za(function(p){return xg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
212
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.za(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.ki||!d.l||u.fromCache||"HEAD"==b.method||a!=yg||d.l(u.timeMs,u.data.byteLength,zg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new ug(n.promise,function(){return n.abort()},e);mg(this.m,f);return f};
|
|
213
|
+
function vg(a,b,c,d){function e(h){f=f.za(function(){c.body&&(c.body=Ab(c.body));return h(b,c,d)})}var f=eg(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.za(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
214
|
+
function wg(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.D&&a.D(b,d,c.uris[f],c.uris[f-1]);var k=new tc(c.uris[f]),l=k.Bb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),uc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=qg[l])?l.he:null;if(!n)return cg(new T(2,1,1E3,k));var p=l.Fi,r=null,u=null,v=!1,w=!1,A;return fg($f(e)).za(function(){if(a.i)return dg();A=Date.now();var z=0;c.requestStartTime=Date.now();
|
|
215
|
+
var D=n(c.uris[f],c,b,function(C,E,G){r&&r.stop();u&&u.$(B/1E3);a.l&&b==yg&&(z++,c.packetNumber=z,a.l(C,E,zg(d),c),m=!0,h.g=G)},function(C){a.j&&a.j(C,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return D;var y=c.retryParameters.connectionTimeout;y&&(r=new Rc(function(){v=!0;D.abort()}),r.$(y/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Rc(function(){v=!0;D.abort()}));return D}).za(function(z){r&&r.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-A);var D={response:z,
|
|
216
216
|
ki:m};!w&&a.j&&a.j(z.headers,c,b);return D},function(z){r&&r.stop();u&&u.stop();if(a.A){var D=null,y=0;z instanceof T&&(D=z,1001==z.code&&(y=z.data[1]));a.A(c,D,y,v)}if(a.i)return dg();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 D=(new Map).set("error",z),D=new U("retry",D),a.dispatchEvent(D),f=(f+1)%c.uris.length,wg(a,b,c,d,e,f,z,h)}throw z;})}
|
|
217
|
-
function xg(a,b,c,d){var e=eg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Xg:void 0},f=a.next())g.Xg=f.value,e=e.
|
|
217
|
+
function xg(a,b,c,d){var e=eg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Xg:void 0},f=a.next())g.Xg=f.value,e=e.za(function(h){return function(){var k=c.response;k.data&&(k.data=Ab(k.data));return(0,h.Xg)(b,k,d)}}(g));return e.za(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 zg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.s)return!1}return!0}S("shaka.net.NetworkingEngine",ng);
|
|
218
218
|
ng.prototype.request=ng.prototype.request;ng.prototype.destroy=ng.prototype.destroy;ng.makeRequest=sg;ng.defaultRetryParameters=function(){return Zf()};ng.prototype.clearAllResponseFilters=ng.prototype.ng;ng.prototype.unregisterResponseFilter=ng.prototype.ej;ng.prototype.registerResponseFilter=ng.prototype.Ji;ng.prototype.clearAllRequestFilters=ng.prototype.mg;ng.prototype.unregisterRequestFilter=ng.prototype.dj;ng.prototype.registerRequestFilter=ng.prototype.Ii;ng.unregisterScheme=function(a){delete qg[a]};
|
|
219
219
|
ng.registerScheme=og;ng.prototype.setForceHTTPS=ng.prototype.Qf;ng.prototype.setForceHTTP=ng.prototype.Pf;function tg(){this.g=0}ng.NumBytesRemainingClass=tg;function ug(a,b,c){bg.call(this,a,b);this.h=c}na(ug,bg);ng.PendingRequest=ug;var yg=1;ng.RequestType={MANIFEST:0,SEGMENT:yg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};ng.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6};var pg=3;
|
|
220
|
-
ng.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:pg};var qg={};function Ag(a){this.g=!1;this.h=new ag;this.i=a}Ag.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Bg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Cg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Dg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Eg(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function
|
|
220
|
+
ng.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:pg};var qg={};function Ag(a){this.g=!1;this.h=new ag;this.i=a}Ag.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Bg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Cg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Dg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Eg(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Fg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Ig(a,b){this.h=Eb(a);this.i=b==Jg;this.g=0}q=Ig.prototype;q.qa=function(){return this.g<this.h.byteLength};q.wa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.U=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Kg();}};q.oa=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Kg();}};q.R=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Kg();}};
|
|
221
221
|
q.Ug=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Kg();}};q.Oc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Kg();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.rb=function(a){if(this.g+a>this.h.byteLength)throw Kg();var b=zb(this.h,this.g,a);this.g+=a;return b};
|
|
222
222
|
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Kg();this.g+=a};q.Qi=function(a){if(this.g<a)throw Kg();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Kg();this.g=a};q.rc=function(){for(var a=this.g;this.qa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=zb(this.h,a,this.g-a);this.g+=1;return vd(a)};function Kg(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Ig);Ig.prototype.readTerminatedString=Ig.prototype.rc;Ig.prototype.seek=Ig.prototype.seek;Ig.prototype.rewind=Ig.prototype.Qi;
|
|
223
|
-
Ig.prototype.skip=Ig.prototype.skip;Ig.prototype.readBytes=Ig.prototype.rb;Ig.prototype.readUint64=Ig.prototype.Oc;Ig.prototype.readInt32=Ig.prototype.Ug;Ig.prototype.readUint32=Ig.prototype.R;Ig.prototype.readUint16=Ig.prototype.oa;Ig.prototype.readUint8=Ig.prototype.U;Ig.prototype.getLength=Ig.prototype.getLength;Ig.prototype.getPosition=Ig.prototype.wa;Ig.prototype.hasMoreData=Ig.prototype.qa;var Jg=1;Ig.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Jg};function Lg(){this.i=[];this.h=[];this.g=!1}q=Lg.prototype;q.box=function(a,b){a=Mg(a);this.i[a]=Ng;this.h[a]=b;return this};q.
|
|
223
|
+
Ig.prototype.skip=Ig.prototype.skip;Ig.prototype.readBytes=Ig.prototype.rb;Ig.prototype.readUint64=Ig.prototype.Oc;Ig.prototype.readInt32=Ig.prototype.Ug;Ig.prototype.readUint32=Ig.prototype.R;Ig.prototype.readUint16=Ig.prototype.oa;Ig.prototype.readUint8=Ig.prototype.U;Ig.prototype.getLength=Ig.prototype.getLength;Ig.prototype.getPosition=Ig.prototype.wa;Ig.prototype.hasMoreData=Ig.prototype.qa;var Jg=1;Ig.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Jg};function Lg(){this.i=[];this.h=[];this.g=!1}q=Lg.prototype;q.box=function(a,b){a=Mg(a);this.i[a]=Ng;this.h[a]=b;return this};q.S=function(a,b){a=Mg(a);this.i[a]=Og;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ig(a,0);for(this.g=!1;a.qa()&&!this.g;)this.Lc(0,a,b,c)};
|
|
224
224
|
q.Lc=function(a,b,c,d){var e=b.wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.R(),g=b.R(),h=Pg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.wa()+8>b.getLength()){this.g=!0;return}f=b.Oc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Og){if(d&&b.wa()+4>b.getLength()){this.g=!0;return}n=b.R();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.wa(),b=0<d?b.rb(d):new Uint8Array(0),b=new Ig(b,0),l({name:h,parser:this,
|
|
225
225
|
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function Qg(a){for(var b=Rg(a);a.reader.qa()&&!a.parser.g;)a.parser.Lc(a.start+b,a.reader,a.partialOkay)}function Sg(a){for(var b=Rg(a),c=a.reader.R(),d=0;d<c&&(a.parser.Lc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Tg(a){var b=Rg(a);for(a.reader.skip(78);a.reader.qa()&&!a.parser.g;)a.parser.Lc(a.start+b,a.reader,a.partialOkay)}
|
|
226
|
-
function
|
|
227
|
-
function Rg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Lg);Lg.headerSize=Rg;Lg.typeToString=Pg;Lg.allData=Xg;Lg.audioSampleEntry=
|
|
226
|
+
function Ug(a){var b=Rg(a);a.reader.skip(8);var c=a.reader.oa();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.qa()&&!a.parser.g;)a.parser.Lc(a.start+b,a.reader,a.partialOkay)}function Xg(a){return function(b){a(b.reader.rb(b.reader.getLength()-b.reader.wa()))}}function Mg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Pg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
227
|
+
function Rg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Lg);Lg.headerSize=Rg;Lg.typeToString=Pg;Lg.allData=Xg;Lg.audioSampleEntry=Ug;Lg.visualSampleEntry=Tg;Lg.sampleDescription=Sg;Lg.children=Qg;Lg.prototype.parseNext=Lg.prototype.Lc;Lg.prototype.parse=Lg.prototype.parse;Lg.prototype.stop=Lg.prototype.stop;Lg.prototype.fullBox=Lg.prototype.S;Lg.prototype.box=Lg.prototype.box;var Ng=0,Og=1;function Yg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Lg).box("moov",Qg).box("moof",Qg).S("pssh",function(c){if(!(1<c.version)){var d=zb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Jd(c.reader.rb(16)));if(0<c.version){d=c.reader.R();for(var e=0;e<d;e++){var f=Jd(c.reader.rb(16));b.h.push(f)}}}}).parse(a)}
|
|
228
228
|
function Zg(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Eb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Id(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
229
229
|
@license
|
|
230
230
|
tXml
|
|
@@ -247,20 +247,20 @@ null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Tb=c.slice(1))}return b}
|
|
|
247
247
|
function Bh(a,b){var c=Ah(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Ch(a,"t",d.t)),null!==d.n&&(c=Ch(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Tb)&&a[c]?Dh(a[c],e,d,jh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
|
|
248
248
|
function Ch(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Dh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
249
249
|
function Eh(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=eh.has(b)?eh.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Eh(d),b.appendChild(c);return b}
|
|
250
|
-
function Fh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ke(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Fh(c),c.parent=b,b.children.push(c));return b}var dh=new Map,eh=new Map;function Gh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.fa=this.da=!1;this.I=0;this.g=null;this.B=new gb;this.i=new Map;this.A=new Map;this.l=new ag;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.Y=new Map;this.ea=new Map;this.M=new Rc(function(){return Hh(b)});this.O=!1;this.N=[];this.
|
|
250
|
+
function Fh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ke(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Fh(c),c.parent=b,b.children.push(c));return b}var dh=new Map,eh=new Map;function Gh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.fa=this.da=!1;this.I=0;this.g=null;this.B=new gb;this.i=new Map;this.A=new Map;this.l=new ag;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.Y=new Map;this.ea=new Map;this.M=new Rc(function(){return Hh(b)});this.O=!1;this.N=[];this.T=!1;this.K=new Rc(function(){Ih(b)});this.l.catch(function(){});this.j=new Ag(function(){return Jh(b)});this.aa=!1;this.D=this.G=null}q=Gh.prototype;q.destroy=function(){return this.j.destroy()};
|
|
251
251
|
function Jh(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.M.stop(),a.M=null,F(b,Kh(a),2);case 2:if(!a.m){b.u(3);break}ra(b,4);return F(b,a.m.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:ua(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.aa=!1,a.G=null,H(b)}})}q.configure=function(a){this.h=a;this.K&&this.K.Ra(this.h.updateExpirationTime)};
|
|
252
252
|
function Lh(a,b,c){a.fa=!0;a.A=new Map;a.O=c;return Mh(a,b)}function Nh(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.O=0<a.A.size;return Mh(a,b)}
|
|
253
253
|
function Oh(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 Ph(a,g,[])}
|
|
254
254
|
function Mh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y;return O(function(B){if(1==B.g){if(c=Qh(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(C){return C.video&&C.video.drmInfos.length||C.audio&&C.audio.drmInfos.length?!0:!1});g||(h=Eg(a.h.servers),Rh(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=Sh(n),r=t(p),u=r.next();!u.done;u=r.next())v=u.value,k.add(v);w=t(k);for(A=w.next();!A.done;A=
|
|
255
255
|
w.next())z=A.value,Th(z,Eg(a.h.servers),Eg(a.h.advanced||{}),a.h.keySystemsMapping);return F(B,We(b,a.O,a.aa,a.h.preferredKeySystems),2)}Bg(a.j);D=g||Object.keys(a.h.servers).length;if(!D)return a.da=!0,B.return(Promise.resolve());y=Ph(a,void 0,b);return B.return(g?y:y.catch(function(){}))})}
|
|
256
256
|
function Uh(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 F(c,a.G,3);case 3:return Bg(a.j),c.return();case 2:return ra(c,4),a.G=a.m.setMediaKeys(a.s),F(c,a.G,6);case 6:ta(c,5);break;case 4:b=ua(c),a.o(new T(2,6,6003,b.message));case 5:Bg(a.j),H(c)}})}function Vh(a,b){return O(function(c){if(1==c.g)return F(c,Uh(a),2);Wh(a,b.initDataType,zb(b.initData));H(c)})}
|
|
257
|
-
q.Sb=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.
|
|
258
|
-
b.A.size?F(c,Uh(b),2):c.u(2)}Yh(b).catch(function(){});b.
|
|
257
|
+
q.Sb=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.ka(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.ka(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Xh(b,e.value);b.T=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.F(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Kh(b)});b.D=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.D||"com.apple.fps"!==b.g.keySystem||
|
|
258
|
+
b.A.size?F(c,Uh(b),2):c.u(2)}Yh(b).catch(function(){});b.D||b.A.size||b.h.parseInbandPsshEnabled||b.B.F(b.m,"encrypted",function(d){return Vh(b,d)});H(c)})};
|
|
259
259
|
function Zh(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=sg([a.g.serverCertificateUri],a.h.retryParameters);ra(g,3);c=a.C.Mb.request(5,b);return F(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=zb(d.data);ta(g,4);break;case 3:throw e=ua(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();
|
|
260
260
|
ra(g,6);return F(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new T(2,6,6004,f.message);}})}function $h(a,b){var c,d,e;return O(function(f){if(1==f.g)return F(f,ai(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.lb=new ag,d.push(e.lb);d.push(c.remove());return F(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
|
|
261
261
|
function Yh(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){ai(a,k,h)});return F(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&bi(a))return g.return(a.l);a.l=new ag;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,Wh(a,f.initDataType,f.initData);ci(a)&&a.l.resolve();return g.return(a.l)})}
|
|
262
262
|
function Wh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(xb(c,e.value.initData))return}0<a.i.size&&ci(a)&&(a.l.resolve(),a.l=new ag,a.l.catch(function(){}));di(a,b,c,a.g.sessionType)}}function ei(a){a=a.i.keys();a=Cg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
263
|
-
q.ef=function(){var a=this,b=this.i.keys();b=Cg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.ad=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};q.Jd=function(){return
|
|
263
|
+
q.ef=function(){var a=this,b=this.i.keys();b=Cg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.ad=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};q.Jd=function(){return Fg(this.ea)};
|
|
264
264
|
function Ph(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z;return O(function(D){switch(D.g){case 1:d=new Map;if(c.length){e=fi(a,c,d);D.u(2);break}return F(D,gi(a,b),3);case 3:e=D.h;case 2:f=e;if(!f)throw new T(2,6,6001);Bg(a.j);ra(D,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(r=p.next();!r.done;r=p.next())u=r.value,a.H.add(u.contentType.toLowerCase());if(c.length){var y=
|
|
265
265
|
f.keySystem;var B=d.get(f.keySystem);var C=[],E=[],G=[],L=[],K=[],I=new Set,J=new Set;hi(B,C,E,L,G,K,I,J);var M=a.O?"persistent-license":"temporary";y={keySystem:y,encryptionScheme:C[0],licenseServerUri:E[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||M,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:L[0],serverCertificateUri:G[0],initData:K,keyIds:I};
|
|
266
266
|
0<J.size&&(y.keySystemUris=J);B=t(B);for(J=B.next();!J.done;J=B.next())J=J.value,J.distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=J.distinctiveIdentifierRequired),J.persistentStateRequired&&(y.persistentStateRequired=J.persistentStateRequired);B=y}else B=f.keySystem,J=b.get(f.keySystem),y=[],C=[],E=[],G=[],L=[],K=new Set,hi(J.drmInfos,y,C,G,E,L,K),B={keySystem:B,encryptionScheme:y[0],licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==J.distinctiveIdentifier,persistentStateRequired:"required"==
|
|
@@ -270,24 +270,24 @@ function fi(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Sh(e.value)
|
|
|
270
270
|
l.Tg}}(d)))return f.keySystemAccess;a=t([!0,!1]);for(d=a.next();!d.done;d=a.next())for(d=d.value,e=t(b),f=e.next();!f.done;f=e.next()){f=t(f.value.decodingInfos);for(var g=f.next();!g.done;g=f.next())if(g=g.value,g.supported&&g.keySystemAccess){var h=c.get(g.keySystemAccess.keySystem);h=t(h);for(var k=h.next();!k.done;k=h.next())if(!!k.value.licenseServerUri==d)return g.keySystemAccess}}return null}
|
|
271
271
|
function gi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new T(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){z.u(4);break}k=h.value;if(!b.has(k)){z.u(3);break}l=b.get(k);ra(z,6);return F(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
272
272
|
z.h,z.return(c);case 6:ua(z);case 7:Bg(a.j);case 3:h=g.next();z.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.u(11);break}p=n.value;r=t(b.keys());u=r.next();case 12:if(u.done){n=m.next();z.u(9);break}v=u.value;w=b.get(v);A=w.drmInfos.some(function(D){return!!D.licenseServerUri});if(A!=p){z.u(13);break}ra(z,15);return F(z,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=z.h,z.return(c);case 15:ua(z);case 16:Bg(a.j);case 13:u=r.next();z.u(12);break;case 11:return z.return(c)}})}
|
|
273
|
-
function Qh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:
|
|
274
|
-
function ai(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.
|
|
273
|
+
function Qh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Od(a)}function ii(a){ci(a)&&a.l.resolve()}function ji(a,b){(new Rc(function(){b.loaded=!0;ii(a)})).$(ki)}
|
|
274
|
+
function ai(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.F(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.T?a.N.push(n):Xh(a,n)});a.B.F(d,"keystatuseschange",function(n){return li(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,zf:Infinity,lb:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return F(m,
|
|
275
275
|
d.load(b),4);case 4:return g=m.h,Bg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),ji(a,f),ii(a),m.return(d);case 2:k=ua(m),Bg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(l,6,6005,k.message)),f.loaded=!0,ii(a);case 3:return m.return(Promise.resolve())}})}
|
|
276
|
-
function di(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.
|
|
276
|
+
function di(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.F(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.T?a.N.push(f):Xh(a,f)});a.B.F(e,"keystatuseschange",function(f){return li(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,zf:Infinity,lb: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&&Gd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
277
277
|
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))}})}
|
|
278
278
|
function Xh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Gd(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=sg([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]=
|
|
279
279
|
f.headers[h];if(Nc(a.g.keySystem)){var A=xd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=ah(A,"PlayReadyKeyMessage");var z=kh(A,"HttpHeader");z=t(z);for(var D=z.next();!D.done;D=z.next()){var y=D.value;D=kh(y,"name")[0];y=kh(y,"value")[0];g.headers[ih(D)]=ih(y)}A=kh(A,"Challenge")[0];g.body=Hd(ih(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();ra(w,2);m=a.C.Mb.request(2,g);return F(w,m.promise,4);case 4:l=w.h;ta(w,3);break;case 2:n=ua(w);if(a.j.g)return w.return();
|
|
280
280
|
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.lb&&d.lb.reject(p)):(d&&d.lb&&d.lb.reject(p),a.i.delete(c),ci(a)&&(a.l.resolve(),a.M.$(.1)));return w.return();case 3:if(a.j.g)return w.return();a.I+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Gd(l.data);ra(w,5);return F(w,c.update(l.data),7);case 7:ta(w,6);break;case 5:return r=ua(w),u=new T(2,6,6008,r.message),a.o(u),d&&d.lb&&d.lb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.lb&&d.lb.resolve(),
|
|
281
281
|
ji(a,d));H(w)}})}
|
|
282
282
|
function li(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(Nc(a.g.keySystem)&&16==g.byteLength&&(Wc()||id())){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=Jd(g).slice(0,32);a.Y.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.lb&&(a.i.delete(b),b.close().catch(function(){}));ci(a)&&
|
|
283
|
-
(a.l.resolve(),a.M.$(mi))}function Hh(a){var b=a.Y,c=a.ea;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.de(
|
|
283
|
+
(a.l.resolve(),a.M.$(mi))}function Hh(a){var b=a.Y,c=a.ea;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.de(Fg(c))}
|
|
284
284
|
function ni(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I;return O(function(J){if(1==J.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=
|
|
285
285
|
[{contentType:'video/mp4; codecs="avc1.42E01E"'},{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(M,N){var P,R,Q,W,Y,va,Fa,wa;return O(function(Pa){switch(Pa.g){case 1:return ra(Pa,2),F(Pa,N.createMediaKeys(),4);case 4:ta(Pa,3);break;case 2:return ua(Pa),Pa.return();case 3:R=
|
|
286
286
|
(P=N.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,ad()&&(R=!1),Q=N.getConfiguration().videoCapabilities,W=N.getConfiguration().audioCapabilities,Y={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(M)&&k.get(M)?Y=k.get(M):k.set(M,Y),(va=Q[0].encryptionScheme)&&!Y.encryptionSchemes.includes(va)&&Y.encryptionSchemes.push(va),(Fa=Q[0].robustness)&&!Y.videoRobustnessLevels.includes(Fa)&&Y.videoRobustnessLevels.push(Fa),(wa=W[0].robustness)&&
|
|
287
|
-
!Y.audioRobustnessLevels.includes(wa)&&Y.audioRobustnessLevels.push(wa),H(Pa)}})};m=function(M,N,P,R){var Q,W,Y,va,Fa,wa,Pa,Za,Va,
|
|
288
|
-
return F(bb,navigator.requestMediaKeySystemAccess(M,Va),4);case 4:return
|
|
287
|
+
!Y.audioRobustnessLevels.includes(wa)&&Y.audioRobustnessLevels.push(wa),H(Pa)}})};m=function(M,N,P,R){var Q,W,Y,va,Fa,wa,Pa,Za,Va,Aa;return O(function(bb){switch(bb.g){case 1:ra(bb,2);Q=Je(g);W=t(Q.videoCapabilities);for(Y=W.next();!Y.done;Y=W.next())va=Y.value,va.encryptionScheme=N,va.robustness=P;Fa=t(Q.audioCapabilities);for(wa=Fa.next();!wa.done;wa=Fa.next())Pa=wa.value,Pa.encryptionScheme=N,Pa.robustness=R;Za=Je(Q);Za.persistentState="required";Za.sessionTypes=["persistent-license"];Va=[Za,Q];
|
|
288
|
+
return F(bb,navigator.requestMediaKeySystemAccess(M,Va),4);case 4:return Aa=bb.h,F(bb,l(M,Aa),5);case 5:ta(bb,0);break;case 2:ua(bb),H(bb)}})};n=function(M,N,P,R){var Q,W,Y;return O(function(va){switch(va.g){case 1:return ra(va,2),Q={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:M,video:{encryptionScheme:N,robustness:P},audio:{encryptionScheme:N,
|
|
289
289
|
robustness:R}}},F(va,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return W=va.h,Y=W.keySystemAccess,F(va,l(M,Y),5);case 5:ta(va,0);break;case 2:ua(va),H(va)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(z=A.value,D=t(a),y=D.next();!y.done;y=D.next())B=y.value,"org.w3.clearkey"===B&&ld()||(v.push(m(B,z,"","")),v.push(n(B,z,"","")));C=t(a);for(E=C.next();!E.done;E=C.next())for(G=E.value,L=t(d[G]||[]),K=L.next();!K.done;K=
|
|
290
|
-
L.next())I=K.value,v.push(m(G,null,I,"")),v.push(m(G,null,"",I)),v.push(n(G,null,I,"")),v.push(n(G,null,"",I));return F(J,Promise.all(v),2)}return J.return(
|
|
290
|
+
L.next())I=K.value,v.push(m(G,null,I,"")),v.push(m(G,null,"",I)),v.push(n(G,null,I,"")),v.push(n(G,null,"",I));return F(J,Promise.all(v),2)}return J.return(Fg(k))})}function oi(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Rc(e)).$(pi)}),ra(c,2),F(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);ua(c);H(c)})}
|
|
291
291
|
function Kh(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return F(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 ra(g,2),a.fa||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?F(g,oi(e),5):F(g,e.remove(),5);if(2!=g.g)return ta(g,0);ua(g);H(g)})})),0)})}function Sh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
292
292
|
function Ih(a){a.i.forEach(function(b,c){var d=b.zf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.zf=e)})}function ci(a){a=a.i.values();return Dg(a,function(b){return b.loaded})}function bi(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Y.get(c.value))return!1;return!0}
|
|
293
293
|
function Rh(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)}
|
|
@@ -304,18 +304,18 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
304
304
|
function qi(a,b,c){this.h=a;this.i=b;this.g=c}function ri(a,b){return O(function(c){if(1==c.g)return F(c,Re(a.g,b,a.h.drm.preferredKeySystems),2);a.h.streaming.dontChooseCodecs||Me(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(sf))throw new T(2,4,4032);return c.return(si(a,b))})}
|
|
305
305
|
function si(a,b){var c=Qe(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,ti(a,d.keySystem,f.video),ti(a,d.keySystem,f.audio);ui(a,b)}return c}function ti(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Wh(a.g,e.initDataType,e.initData)}}}
|
|
306
306
|
function ui(a,b){a=a.g?a.g.Jd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?vi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
307
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var vi=["output-restricted","internal-error"];function wi(){}function xi(a,b){if(b){var c=yi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",wi);wi.unregisterParserByMime=function(a){delete yi[a]};wi.registerParserByMime=function(a,b){yi[a]=b};wi.registerParserByExtension=function(){qb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};wi.AccessibilityPurpose={ck:"visually impaired",xj:"hard of hearing"};var yi={};function zi(a,b){function c(){f=!0}function d(m){h.push(m);Qg(m)}var e=a=zb(a),f=!1,g,h=[],k=[];(new Lg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).
|
|
308
|
-
function(m){k.push({box:m,Oa:1701733238})}).
|
|
307
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var vi=["output-restricted","internal-error"];function wi(){}function xi(a,b){if(b){var c=yi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",wi);wi.unregisterParserByMime=function(a){delete yi[a]};wi.registerParserByMime=function(a,b){yi[a]=b};wi.registerParserByExtension=function(){qb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};wi.AccessibilityPurpose={ck:"visually impaired",xj:"hard of hearing"};var yi={};function zi(a,b){function c(){f=!0}function d(m){h.push(m);Qg(m)}var e=a=zb(a),f=!1,g,h=[],k=[];(new Lg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).S("stsd",function(m){g=m;h.push(m);Sg(m)}).S("encv",c).S("enca",c).S("dvav",function(m){k.push({box:m,Oa:1701733238})}).S("dva1",function(m){k.push({box:m,Oa:1701733238})}).S("dvh1",function(m){k.push({box:m,Oa:1701733238})}).S("dvhe",function(m){k.push({box:m,Oa:1701733238})}).S("dvc1",function(m){k.push({box:m,Oa:1701733238})}).S("dvi1",
|
|
308
|
+
function(m){k.push({box:m,Oa:1701733238})}).S("hev1",function(m){k.push({box:m,Oa:1701733238})}).S("hvc1",function(m){k.push({box:m,Oa:1701733238})}).S("avc1",function(m){k.push({box:m,Oa:1701733238})}).S("avc3",function(m){k.push({box:m,Oa:1701733238})}).S("ac-3",function(m){k.push({box:m,Oa:1701733217})}).S("ec-3",function(m){k.push({box:m,Oa:1701733217})}).S("ac-4",function(m){k.push({box:m,Oa:1701733217})}).S("mp4a",function(m){k.push({box:m,Oa:1701733217})}).parse(a);if(f)return a;if(0==k.length||
|
|
309
309
|
!g)throw eb(Jd(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,e=Ai(e,g,l.box,h,l.Oa);return Wc()&&md()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
310
310
|
function Ai(a,b,c,d,e){var f=Bi.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);Ci(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Yc()||Wc()?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,Ci(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Rg(b);
|
|
311
311
|
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ci(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 Bi=new Kc(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 Di(a,b,c,d,e,f,g){this.L=a;this.Ha=b;this.ta=c;this.Jc=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}Di.prototype.Yb=function(){return this.Ha};Di.prototype.Wb=function(){return this.ta};Di.prototype.dd=function(){return this.g};function Ei(a,b){return a===b?!0:a&&b?a.Yb()==b.Yb()&&a.Wb()==b.Wb()&&Pb(a.L().sort(),b.L().sort())&&xb(a.dd(),b.dd()):a==b}S("shaka.media.InitSegmentReference",Di);
|
|
312
312
|
Di.prototype.getEndByte=Di.prototype.Wb;Di.prototype.getStartByte=Di.prototype.Yb;
|
|
313
|
-
function Fi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Gi:r;this.startTime=a;this.j=this.endTime=b;this.
|
|
314
|
-
this.o&&this.g.length&&this.g[this.g.length-1].Kg();this.C=this.mimeType=this.codecs=null}q=Fi.prototype;q.L=function(){return this.
|
|
313
|
+
function Fi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Gi:r;this.startTime=a;this.j=this.endTime=b;this.D=c;this.Ha=d;this.ta=e;this.Z=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=0;this.o=void 0===v?!1:v;this.G=this.s=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Lg();
|
|
314
|
+
this.o&&this.g.length&&this.g[this.g.length-1].Kg();this.C=this.mimeType=this.codecs=null}q=Fi.prototype;q.L=function(){return this.D()};q.getStartTime=function(){return this.startTime};q.Oh=function(){return this.endTime};q.Yb=function(){return this.Ha};q.Wb=function(){return this.ta};q.fi=function(){return this.tilesLayout};q.ei=function(){return this.B};q.Zb=function(){return this.status};q.zi=function(){this.status=Hi};q.wf=function(){this.preload=!0};q.ti=function(){return this.preload};
|
|
315
315
|
q.Vd=function(){this.l=!1};q.pi=function(){return this.l};q.Lg=function(){this.s=!0};q.si=function(){return this.s};q.Kg=function(){this.G=!0};q.ri=function(){return this.G};q.Jg=function(){this.m=!0};q.li=function(){return this.m};q.hh=function(a){this.A=a};q.di=function(){return this.A};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=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.j+=a};
|
|
316
316
|
q.Vf=function(a){null==this.h?Xa("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.aj=function(a){this.C=a};q.dd=function(){return this.C};function Ii(a,b){a.Z=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ii(c.value,b)}S("shaka.media.SegmentReference",Fi);Fi.prototype.getSegmentData=Fi.prototype.dd;Fi.prototype.setSegmentData=Fi.prototype.aj;Fi.prototype.syncAgainst=Fi.prototype.Vf;Fi.prototype.offset=Fi.prototype.offset;
|
|
317
317
|
Fi.prototype.getThumbnailSprite=Fi.prototype.di;Fi.prototype.setThumbnailSprite=Fi.prototype.hh;Fi.prototype.hasByterangeOptimization=Fi.prototype.li;Fi.prototype.markAsByterangeOptimization=Fi.prototype.Jg;Fi.prototype.isLastPartial=Fi.prototype.ri;Fi.prototype.markAsLastPartial=Fi.prototype.Kg;Fi.prototype.isPartial=Fi.prototype.si;Fi.prototype.markAsPartial=Fi.prototype.Lg;Fi.prototype.isIndependent=Fi.prototype.pi;Fi.prototype.markAsNonIndependent=Fi.prototype.Vd;Fi.prototype.isPreload=Fi.prototype.ti;
|
|
318
|
-
Fi.prototype.markAsPreload=Fi.prototype.wf;Fi.prototype.markAsUnavailable=Fi.prototype.zi;Fi.prototype.getStatus=Fi.prototype.Zb;Fi.prototype.getTileDuration=Fi.prototype.ei;Fi.prototype.getTilesLayout=Fi.prototype.fi;Fi.prototype.getEndByte=Fi.prototype.Wb;Fi.prototype.getStartByte=Fi.prototype.Yb;Fi.prototype.getEndTime=Fi.prototype.Oh;Fi.prototype.getStartTime=Fi.prototype.getStartTime;Fi.prototype.getUris=Fi.prototype.L;var Gi=0,Hi=1;Fi.Status={jj:Gi,ak:Hi,Dj:2};function Ji(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ki(a){return!a||Ji(a)?null:a.length?a.end(a.length-1):null}function Li(a,b){return!a||!a.length||Ji(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function
|
|
318
|
+
Fi.prototype.markAsPreload=Fi.prototype.wf;Fi.prototype.markAsUnavailable=Fi.prototype.zi;Fi.prototype.getStatus=Fi.prototype.Zb;Fi.prototype.getTileDuration=Fi.prototype.ei;Fi.prototype.getTilesLayout=Fi.prototype.fi;Fi.prototype.getEndByte=Fi.prototype.Wb;Fi.prototype.getStartByte=Fi.prototype.Yb;Fi.prototype.getEndTime=Fi.prototype.Oh;Fi.prototype.getStartTime=Fi.prototype.getStartTime;Fi.prototype.getUris=Fi.prototype.L;var Gi=0,Hi=1;Fi.Status={jj:Gi,ak:Hi,Dj:2};function Ji(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ki(a){return!a||Ji(a)?null:a.length?a.end(a.length-1):null}function Li(a,b){return!a||!a.length||Ji(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Oi(a,b){if(!a||!a.length||Ji(a))return 0;var c=0;a=t(Pi(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}
|
|
319
319
|
function Qi(a,b,c){if(!a||!a.length||Ji(a))return null;a=Pi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Pi(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};/*
|
|
320
320
|
@license
|
|
321
321
|
Shaka Player
|
|
@@ -348,13 +348,13 @@ function ej(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
|
|
|
348
348
|
*/
|
|
349
349
|
function gj(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=zb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function hj(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 Ig(c,0)).R(),a.g=8*d,a.i-=d)}function ij(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;hj(a)}a.h<<=b;a.g-=b}
|
|
350
350
|
function jj(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&&hj(a);c=b-c;return 0<c?d<<c|jj(a,c):d}function kj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;hj(a);return b+kj(a)}function lj(a){ij(a,1+kj(a))}function V(a){var b=kj(a);return jj(a,b+1)-1}function mj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function nj(a){return 1===jj(a,1)}function oj(a){return jj(a,8)}
|
|
351
|
-
function pj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=mj(a),d=(c+d+256)%256),c=0===d?c:d}function qj(a){oj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",gj);function rj(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.
|
|
351
|
+
function pj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=mj(a),d=(c+d+256)%256),c=0===d?c:d}function qj(a){oj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",gj);function rj(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.D=this.o=this.s=null}q=rj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
352
352
|
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,sj(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,Od:-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<
|
|
353
353
|
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 r=f[n+1]+2;switch(f[n]){case 5:var u=yd(f.subarray(n+2,n+r));-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=
|
|
354
|
-
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.
|
|
354
|
+
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.D={channelCount:0===(u&15)?2:u&15,Eh:u,sampleRate:48E3}))}n+=r;p-=r}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.Od&&(g.Od=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");
|
|
355
355
|
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.I=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Od&&(this.C=f.Od);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.I: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);
|
|
356
356
|
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};
|
|
357
|
-
function tj(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=
|
|
357
|
+
function tj(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=Bj(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=Bj(d,
|
|
358
358
|
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.Ei=function(a){qb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Cf(a)};
|
|
359
359
|
q.Cf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var 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=Kd(b.data,p),b.fullData=Kd(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=Kd(b.data,k),b.fullData=Kd(b.fullData,k)));if(n>=e-f)return h;
|
|
360
360
|
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=Kd(b.data,a),b.fullData=Kd(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Kd.apply(Ed,x(c.value)),(c=tj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Wi(c.data),dts:c.dts,pts:c.pts});return a};
|
|
@@ -366,64 +366,64 @@ function Dj(a){var b={height:null,width:null,codec:null};a=a.Md();if(!a.length)r
|
|
|
366
366
|
m=0,n=0;nj(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.codec="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
367
367
|
function Cj(a){var b={height:null,width:null,codec:null};a=a.Md();if(!a.length)return b;a=a.find(function(y){return 33==y.type});if(!a)return b;var c=new gj(a.fullData,!0);oj(c);oj(c);jj(c,4);var d=jj(c,3);nj(c);var e=jj(c,2),f=jj(c,1),g=jj(c,5),h=jj(c,32);a=oj(c);for(var k=oj(c),l=oj(c),m=oj(c),n=oj(c),p=oj(c),r=oj(c),u=[],v=[],w=0;w<d;w++)u.push(nj(c)),v.push(nj(c));if(0<d)for(w=d;8>w;w++)jj(c,2);for(w=0;w<d;w++)u[w]&&jj(c,88),v[w]&&oj(c);V(c);d=V(c);3==d&&jj(c,1);u=V(c);v=V(c);var A=w=0,z=0,D=
|
|
368
368
|
0;nj(c)&&(w+=V(c),A+=V(c),z+=V(c),D+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(z+D)*(1===d?2:1));c=function(y){for(var B=0,C=0;32>C;C++)B|=(y>>C&1)<<31-C;return B>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+r;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());
|
|
369
|
-
a&&(e+="."+a.toString(16).toUpperCase());b.codec=e;return b}function
|
|
369
|
+
a&&(e+="."+a.toString(16).toUpperCase());b.codec=e;return b}function Bj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Fj(a){return 0>sj(a)?!1:!0}function sj(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",rj);rj.syncOffset=sj;rj.probe=Fj;rj.prototype.getVideoInfo=rj.prototype.jf;rj.prototype.getVideoResolution=rj.prototype.ii;rj.prototype.getVideoNalus=rj.prototype.Md;
|
|
370
370
|
rj.prototype.getCodecs=rj.prototype.$c;rj.prototype.getStartTime=rj.prototype.getStartTime;rj.prototype.getVideoData=rj.prototype.Hc;rj.prototype.getAudioData=rj.prototype.Vb;rj.prototype.getMetadata=rj.prototype.getMetadata;rj.prototype.parseNalus=rj.prototype.Cf;rj.prototype.parseAvcNalus=rj.prototype.Ei;rj.prototype.parse=rj.prototype.parse;rj.prototype.clearData=rj.prototype.clearData;rj.Timescale=9E4;var Ej=[100,110,122,244,44,83,86,118,128,138,139,134];function Gj(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&&Ya("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{Ya("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ya("Could not find LCEVC Library on this page"),
|
|
371
371
|
a=!1):(this.h.SupportObject.SupportStatus||Ya(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 Hj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
372
|
-
Gj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ij(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}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",Gj);Gj.prototype.release=Gj.prototype.release;function Jj(a,b,c,d){var e=this;this.
|
|
373
|
-
function Kj(a,b){if(window.ManagedMediaSource){a.
|
|
372
|
+
Gj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ij(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}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",Gj);Gj.prototype.release=Gj.prototype.release;function Jj(a,b,c,d){var e=this;this.j=a;this.aa=c;this.A=null;this.D=b;this.h={};this.G={};this.Ea={};this.g=null;this.ea=!1;this.T=d||null;this.l={};this.s=new gb;this.i={};this.H=null;this.M=new ag;this.va="";this.Fa=!1;this.m=Kj(this,this.M);this.C=!1;this.I=new Ag(function(){return Lj(e)});this.B=!1;this.Y="UNKNOWN";this.Da=this.Ca=!1;this.ra=new ag;this.o=!1;this.ya=!0;this.ma=this.N=this.na=this.O=this.K=this.da=null;this.fa=new ag}
|
|
373
|
+
function Kj(a,b){if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.F(c,"startstreaming",function(){a.ya=!0});a.s.F(c,"endstreaming",function(){a.ya=!1})}else c=new MediaSource;a.s.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.va);b.resolve()});a.s.ka(a.j,"playing",function(){a.Fa=!0});a.va=Mj(c);a.j.src=a.va;return c}
|
|
374
374
|
function Nj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g)return a.createSegmentIndex?F(r,a.createSegmentIndex(),2):r.u(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Wd;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.ua){if(m=Zd(h,k),!oe(m))return r.return(!1)}else if(b==c.ha?k=Ze(k):b==c.X&&(k=$e(k,h)),n=
|
|
375
375
|
ce(a,h,k),p=ae(h,k),!lb(n)&&!nc(p))return r.return(!1);return r.return(!0)})}q=Jj.prototype;q.destroy=function(){return this.I.destroy()};
|
|
376
|
-
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.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(xe)),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.
|
|
377
|
-
a.l={};a.
|
|
376
|
+
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.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(xe)),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.D&&b.push(a.D.destroy());for(k in a.i)b.push(a.i[k].destroy());return F(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.A=null;a.m=null;a.g=null;a.D=null;a.h={};a.i={};a.H=null;
|
|
377
|
+
a.l={};a.T=null;a.K=null;a.aa=null;H(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Wd,F(m,e.M,2);case 2:e.B=b,e.Y=c,e.Ca=d,e.Da=!e.B&&"HLS"==e.Y&&!e.Ca,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 F(m,Oj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.X]=[],e.l[f.ha]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
|
|
378
378
|
function Oj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:return e=Wd,f=Oa,g=Qa,F(w,Nj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Zd(c.mimeType,d);if(b==e.ua){Pj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!lb(h)||!a.B&&$d.includes(h))k=!0;l=ae(c.mimeType,d);if(!k){w.u(4);break}m=Sd(e.X,(d||"").split(","));n=Sd(e.ha,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return F(w,Oj(a,e.X,c,m),6);case 6:return F(w,
|
|
379
|
-
Oj(a,e.ha,c,n),7);case 7:return w.return();case 5:if(p=nc(l))r=p(),a.
|
|
379
|
+
Oj(a,e.ha,c,n),7);case 7:return w.return();case 5:if(p=nc(l))r=p(),a.i[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Bg(a.I);try{v=a.m.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.m.readyState+" expected 'open'",null);}a.B&&(v.mode=Qj);a.s.F(v,"error",function(){var A=a.l[b][0];A.p.reject(new T(2,3,3014,a.j.error?a.j.error.code:0,A.uri))});a.s.F(v,"updateend",function(){return Rj(a,b)});a.h[b]=v;a.G[b]=h;a.Ea[b]=!!c.drmInfos.length;
|
|
380
380
|
H(w)}})}q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
381
|
-
function Pj(a,b,c,d){a.g||(a.g=new le(a.
|
|
382
|
-
function Sj(a){return a.C?!1:a.m?"ended"==a.m.readyState:!0}function Tj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Ud?a=a.g.g:(a=Uj(a,b),a=!a||Ji(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==Ud?a.g.h:Ki(Uj(a,b))}function Wj(a,b,c){if(a.C)return 0;if(b==Ud)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Uj(a,b);return
|
|
383
|
-
q.wb=function(){var a={total:this.C?[]:Pi(this.
|
|
384
|
-
function Xj(a,b,c,d,e,f){var g=null,h=zb(c);if($d.includes(e))f=Wi(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.
|
|
385
|
-
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else if(!e.includes("/mp4")&&!e.includes("/webm")&&Fj(h)&&(a.K?a.K.clearData():a.K=new rj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length))a.
|
|
386
|
-
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,r,u,v,w,A,z,D,y,B,C,E;return O(function(G){switch(G.g){case 1:m=Wd;if(b!=m.ua){G.u(2);break}if(!a.B){G.u(3);break}return F(G,a.
|
|
387
|
-
case 6:if(!a.h[b])return G.return();p=a.h[b].timestampOffset;r=a.G[b];a.
|
|
388
|
-
D=b==m.ha||!(m.ha in a.h),a.B&&D&&a.
|
|
389
|
-
a.
|
|
381
|
+
function Pj(a,b,c,d){a.g||(a.g=new le(a.D),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ea;a=a.Y;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,pe[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)}
|
|
382
|
+
function Sj(a){return a.C?!1:a.m?"ended"==a.m.readyState:!0}function Tj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Ud?a=a.g.g:(a=Uj(a,b),a=!a||Ji(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==Ud?a.g.h:Ki(Uj(a,b))}function Wj(a,b,c){if(a.C)return 0;if(b==Ud)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Uj(a,b);return Oi(a,c)}
|
|
383
|
+
q.wb=function(){var a={total:this.C?[]:Pi(this.j.buffered),audio:this.C?[]:Pi(Uj(this,"audio")),video:this.C?[]:Pi(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}}
|
|
384
|
+
function Xj(a,b,c,d,e,f){var g=null,h=zb(c);if($d.includes(e))f=Wi(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.aa.onMetadata([{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.Z&&d.Z.timescale){var k=d.Z.timescale;if(!isNaN(k)){var l=0,m=!1;(new Lg).box("moof",Qg).box("traf",Qg).S("tfdt",function(n){l=Zi(n.reader,
|
|
385
|
+
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else if(!e.includes("/mp4")&&!e.includes("/webm")&&Fj(h)&&(a.K?a.K.clearData():a.K=new rj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length))a.aa.onMetadata(h,f,d?d.endTime:null);return g}
|
|
386
|
+
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,r,u,v,w,A,z,D,y,B,C,E;return O(function(G){switch(G.g){case 1:m=Wd;if(b!=m.ua){G.u(2);break}if(!a.B){G.u(3);break}return F(G,a.ra,4);case 4:n=G.h,a.g.s=n;case 3:return F(G,qe(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.L()[0]:null),5);case 5:return G.return();case 2:if(l||!a.o){G.u(6);break}return F(G,Yj(a,m.X,c,d,e,f,g,h,k,!0),7);case 7:return F(G,Yj(a,m.ha,c,d,e,f,g,h,k,!0),8);case 8:return G.return();
|
|
387
|
+
case 6:if(!a.h[b])return G.return();p=a.h[b].timestampOffset;r=a.G[b];a.i[b]&&(r=a.i[b].getOriginalMimeType());d&&(u=Xj(a,b,c,d,r,p),null!=u&&(null==a.O&&b==m.ha&&(a.O=u,a.na=d.startTime,null!=a.N&&(v=0,a.na==a.ma&&(v=a.O-a.N),a.fa.resolve(v))),null==a.N&&b==m.X&&(a.N=u,a.ma=d.startTime,null!=a.O&&(w=0,a.na==a.ma&&(w=a.O-a.N),a.fa.resolve(w))),A=d.startTime-u,z=Math.abs(p-A),(.001<=z||g||h)&&(!k||0<A||!p)&&(p=A,a.Da&&(Zj(a,b,function(){return ak(a,b)},null),Zj(a,b,function(){return bk(a,b,p)},null))),
|
|
388
|
+
D=b==m.ha||!(m.ha in a.h),a.B&&D&&a.ra.resolve(p)));f&&b==m.ha&&(a.g||Pj(a,"application/cea-608",a.B,!1),a.H||(y=r.split(";",1)[0],a.H=new Gb(y)),d?(B=a.H.i(c),B.length&&ve(a.g,B,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.i[b]){G.u(9);break}return F(G,a.i[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=G.h;case 9:c=ck(a,c,d?d.startTime:null,b,d?d.L()[0]:null);if(!d||!a.B||b==m.ua){G.u(11);break}if(!g&&!h){G.u(11);break}C=d.startTime;if("HLS"!=a.Y||a.o||b!=m.X||!a.h[m.ha]){G.u(13);break}return F(G,
|
|
389
|
+
a.fa,14);case 14:E=G.h,.1<Math.abs(E)&&(C-=E);case 13:Zj(a,b,function(){return ak(a,b)},null),Zj(a,b,function(){return bk(a,b,C)},null);case 11:return F(G,Zj(a,b,function(){var L=c;if("video"==b&&a.T){var K=a.T;K.g&&K.g.appendBuffer(L,"video",K.o,-p)}a.h[b].appendBuffer(L)},d?d.L()[0]:null),15);case 15:H(G)}})}function dk(a,b){var c=Vj(a,"video")||0;te(a.g,b,c)}function ek(a){a.g&&te(a.g,"",0)}
|
|
390
390
|
q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Wd,a==e.ua?F(f,d.g.remove(b,c),0):F(f,Zj(d,a,function(){return fk(d,a,b,c)},null),4)):d.o?F(f,Zj(d,e.X,function(){return fk(d,e.X,b,c)},null),0):f.u(0)})};function gk(a,b){var c;return O(function(d){return 1==d.g?(c=Wd,b==c.ua?a.g?F(d,a.g.remove(0,Infinity),0):d.return():F(d,Zj(a,b,function(){return fk(a,b,0,a.m.duration)},null),4)):a.o?F(d,Zj(a,c.X,function(){return fk(a,c.X,0,a.m.duration)},null),0):d.u(0)})}
|
|
391
|
-
q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Wd,a==c.ua?d.return():F(d,Zj(b,a,function(){b.
|
|
391
|
+
q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Wd,a==c.ua?d.return():F(d,Zj(b,a,function(){b.j.currentTime-=.001;Rj(b,a)},null),2)):b.o?F(d,Zj(b,c.X,function(){var e=c.X;b.j.currentTime-=.001;Rj(b,e)},null),0):d.u(0)})};
|
|
392
392
|
function hk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Wd;if(b==l.ua)return f||(a.g.s=c),se(a.g,d,e),p.return();m=[];return F(p,ik(a,b,g,h,k),2)}n=p.h;n||(m.push(Zj(a,b,function(){return ak(a,b)},null)),a.o&&m.push(Zj(a,l.X,function(){return ak(a,l.X)},null)));f||(m.push(Zj(a,b,function(){return bk(a,b,c)},null)),a.o&&m.push(Zj(a,l.X,function(){return bk(a,l.X,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,
|
|
393
393
|
b)},null));a.o&&m.push(Zj(a,l.X,function(){var r=l.X;a.h[r].appendWindowStart=0;a.h[r].appendWindowEnd=e;a.h[r].appendWindowStart=d;Rj(a,r)},null));return F(p,Promise.all(m),0)})}
|
|
394
|
-
function jk(a,b,c){var d;return O(function(e){if(1==e.g){d=Wd;if(b==d.ua)return e.return();b==d.ha&&(a.
|
|
395
|
-
q.Za=function(a){var b=this;return O(function(c){return F(c,kk(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new ag,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.
|
|
394
|
+
function jk(a,b,c){var d;return O(function(e){if(1==e.g){d=Wd;if(b==d.ua)return e.return();b==d.ha&&(a.ra=new ag);Zj(a,b,function(){return ak(a,b)},null);a.o&&Zj(a,d.X,function(){return ak(a,d.X)},null);return F(e,Zj(a,b,function(){return bk(a,b,c)},null),2)}return a.o?F(e,Zj(a,d.X,function(){return bk(a,d.X,c)},null),0):e.u(0)})}q.endOfStream=function(a){var b=this;return O(function(c){return F(c,kk(b,function(){Sj(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
|
|
395
|
+
q.Za=function(a){var b=this;return O(function(c){return F(c,kk(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new ag,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.da=a}),0)})};q.getDuration=function(){return this.m.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)}
|
|
396
396
|
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.l[b][0];c&&(c.p.resolve(),lk(a,b))}}function Zj(a,b,c,d){Bg(a.I);c={start:c,p:new ag,uri:d};a.l[b].push(c);1==a.l[b].length&&mk(a,b);return c.p}
|
|
397
|
-
function kk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.I);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new ag,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();ra(l,2);return F(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=ua(l),g;case 3:return ra(l,5,6),F(l,b(),6);case 6:xa(l);for(h in a.h)lk(a,h);ya(l,0);break;case 5:throw k=ua(l),new T(2,3,3015,k,a.
|
|
398
|
-
null);}})}function lk(a,b){a.l[b].shift();mk(a,b)}function mk(a,b){var c=a.l[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.
|
|
399
|
-
function nk(a,b,c,d){return Zj(a,b,function(){b!==Ud&&(ob()&&(a.
|
|
400
|
-
function ok(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L;return O(function(K){switch(K.g){case 1:c=Wd;a.C=!0;a.o=!1;d=a.
|
|
401
|
-
Promise.all(g),4);case 4:return a.
|
|
402
|
-
K.u(6);break;case 2:xa(K),a.C=!1,Bg(a.I),a.s.
|
|
403
|
-
function ik(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){if(1==y.g){f=Wd;if(b==f.ua)return y.return(!1);g=fe(je(a.G[b]));h=ie(a.G[b]);l=!1;m=Zd(c,d);n=a.A.forceTransmux;if(!lb(m)||!a.B&&$d.includes(m))n=!0;n&&(p=ae(c,d),r=nc(p))&&(k=r(),u=Sd(f.X,(d||"").split(",")),v=Sd(f.ha,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.X&&(w=u),m=k.convertCodecs(b,ae(c,w))):m=k.convertCodecs(b,p));A=fe(je(m));z=ie(m);if(g===A&&h===z)return a.
|
|
404
|
-
k:k&&(a.
|
|
405
|
-
function qk(a,b,c,d){if(b==Ud)var e=!1;else{e=fe(je(a.G[b]));var f=ie(a.G[b]),g=Zd(c,d),h=a.A.forceTransmux;if(!lb(g)||!a.B&&$d.includes(g))h=!0;c=ae(c,d);h&&(h=nc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=fe(je(g));g=ie(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.o:!1}var Mj=window.URL.createObjectURL,Qj="sequence";function rk(a,b,c){this.i=a;this.A=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.I=!1;this.H=0;this.
|
|
406
|
-
q.Of=function(a){this.A=a};q.Nh=function(){return this.A};q.Pg=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.ae(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.
|
|
407
|
-
q.rd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/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.h=Math.max(this.h,e.endTime-e.startTime));this.ae(b);this.g=Math.max(this.g,c);null!=this.i&&this.
|
|
397
|
+
function kk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.I);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new ag,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();ra(l,2);return F(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=ua(l),g;case 3:return ra(l,5,6),F(l,b(),6);case 6:xa(l);for(h in a.h)lk(a,h);ya(l,0);break;case 5:throw k=ua(l),new T(2,3,3015,k,a.j.error||"No error in the media element",
|
|
398
|
+
null);}})}function lk(a,b){a.l[b].shift();mk(a,b)}function mk(a,b){var c=a.l[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.j.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.Ea[d];c=a.aa.Sh();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Nc(c),f=$c()||Yc()||hd()||Wc()&&md()&&c;f&&"mp4"==ee(a.G[d])&&(b=zi(b,e));return b}
|
|
399
|
+
function nk(a,b,c,d){return Zj(a,b,function(){b!==Ud&&(ob()&&(a.i[b]&&(a.i[b].destroy(),delete a.i[b]),d&&(a.i[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Rj(a,b))},null)}
|
|
400
|
+
function ok(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L;return O(function(K){switch(K.g){case 1:c=Wd;a.C=!0;a.o=!1;d=a.j.currentTime;e=a.j.autoplay;f=a.j.paused;a.Fa&&(a.j.autoplay=!1);sa(K,2);a.s.Qa();g=[];for(h in a.i)g.push(a.i[h].destroy());for(k in a.l)for(l=a.l[k],m=l[0],a.l[k]=l.slice(0,1),m&&g.push(m.p.catch(xe)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(I){}}return F(K,
|
|
401
|
+
Promise.all(g),4);case 4:return a.i={},a.h={},w=a.m.duration,a.M=new ag,a.m=Kj(a,a.M),F(K,a.M,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.da)&&a.da&&(a.m.duration=a.da),A=new ag,z=a.m.sourceBuffers,D=b.size,y=0,B=function(){y++;y===D&&(A.resolve(),a.s.kb(z,"addsourcebuffer",B))},a.s.F(z,"addsourcebuffer",B),C=t(b.keys()),E=C.next();case 6:if(E.done)return a.j.currentTime=d,F(K,A,2);G=E.value;L=b.get(G);return F(K,Oj(a,G,L,L.codecs),9);case 9:a.o?(a.l[c.X]=[],a.l[c.ha]=[]):a.l[G]=[];E=C.next();
|
|
402
|
+
K.u(6);break;case 2:xa(K),a.C=!1,Bg(a.I),a.s.ka(a.j,"canplaythrough",function(){a.I.g||(a.j.autoplay=e,f||a.j.play())}),ya(K,0)}})}function pk(a,b){return kk(a,function(){return ok(a,b)})}
|
|
403
|
+
function ik(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){if(1==y.g){f=Wd;if(b==f.ua)return y.return(!1);g=fe(je(a.G[b]));h=ie(a.G[b]);l=!1;m=Zd(c,d);n=a.A.forceTransmux;if(!lb(m)||!a.B&&$d.includes(m))n=!0;n&&(p=ae(c,d),r=nc(p))&&(k=r(),u=Sd(f.X,(d||"").split(",")),v=Sd(f.ha,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.X&&(w=u),m=k.convertCodecs(b,ae(c,w))):m=k.convertCodecs(b,p));A=fe(je(m));z=ie(m);if(g===A&&h===z)return a.i[b]&&!k?(a.i[b].destroy(),delete a.i[b]):!a.i[b]&&k?a.i[b]=
|
|
404
|
+
k:k&&(a.i[b]&&a.i[b].transmux!=k.transmux?(a.i[b].destroy(),delete a.i[b],a.i[b]=k):k.destroy()),y.return(!1);D=!0;if(a.o||l&&k&&!a.i[b])D=!1;if(D&&"smooth"===a.A.codecSwitchingStrategy&&ob())return F(y,nk(a,b,m,k),3);k&&k.destroy();return F(y,pk(a,e),3)}return y.return(!0)})}
|
|
405
|
+
function qk(a,b,c,d){if(b==Ud)var e=!1;else{e=fe(je(a.G[b]));var f=ie(a.G[b]),g=Zd(c,d),h=a.A.forceTransmux;if(!lb(g)||!a.B&&$d.includes(g))h=!0;c=ae(c,d);h&&(h=nc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=fe(je(g));g=ie(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.o:!1}var Mj=window.URL.createObjectURL,Qj="sequence";function rk(a,b,c){this.i=a;this.A=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.I=!1;this.H=0;this.D=void 0===c?!0:c;this.G=0;this.s=!1;this.m=a}q=rk.prototype;q.getDuration=function(){return this.l};q.Uh=function(){return this.h};q.fh=function(a){this.i=a};q.Za=function(a){this.l=a};q.Zh=function(){return this.i};q.dh=function(a){this.B=a};q.uc=function(a){a&&!this.C&&(this.I=!0);this.C=a};q.oe=function(a){this.o=a};q.Ld=function(){return this.o};
|
|
406
|
+
q.Of=function(a){this.A=a};q.Nh=function(){return this.A};q.Pg=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.ae(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.D&&!this.s&&(this.i=c-this.g-this.h)}}};
|
|
407
|
+
q.rd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/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.h=Math.max(this.h,e.endTime-e.startTime));this.ae(b);this.g=Math.max(this.g,c);null!=this.i&&this.D&&!this.s&&(this.i=d-this.g-this.h)}};q.Og=function(a,b){this.ae(a);Infinity==b||this.V()||(this.g=Math.max(this.g,b))};q.Vh=function(){return this.g};q.Ud=function(){this.s=!0};
|
|
408
408
|
q.ui=function(){return this.s};q.eh=function(a){this.m=a};q.Rh=function(){return this.m};q.ae=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};q.xf=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.V=function(){return Infinity==this.l&&!this.C};q.nc=function(){return Infinity!=this.l&&!this.C};q.nb=function(){return Math.max(this.H,this.Xb()-this.o)};q.jh=function(a){this.H=a};
|
|
409
|
-
q.Xb=function(){return this.V()||this.nc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};q.cd=function(a){var b=Math.max(this.j,this.H);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Xb()-this.o+a,this.yb()))};q.Jb=function(){return this.cd(0)};q.yb=function(){return Math.max(0,this.Xb()-(this.V()||this.nc()?this.A:0))};q.ph=function(){return null==this.i||null!=this.g&&this.
|
|
409
|
+
q.Xb=function(){return this.V()||this.nc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};q.cd=function(a){var b=Math.max(this.j,this.H);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Xb()-this.o+a,this.yb()))};q.Jb=function(){return this.cd(0)};q.yb=function(){return Math.max(0,this.Xb()-(this.V()||this.nc()?this.A:0))};q.ph=function(){return null==this.i||null!=this.g&&this.D?!1:!0};
|
|
410
410
|
q.bh=function(a){this.G=a};q.Lh=function(){return this.G};S("shaka.media.PresentationTimeline",rk);rk.prototype.getAvailabilityTimeOffset=rk.prototype.Lh;rk.prototype.setAvailabilityTimeOffset=rk.prototype.bh;rk.prototype.usingPresentationStartTime=rk.prototype.ph;rk.prototype.getSeekRangeEnd=rk.prototype.yb;rk.prototype.getSeekRangeStart=rk.prototype.Jb;rk.prototype.getSafeSeekRangeStart=rk.prototype.cd;rk.prototype.getSegmentAvailabilityEnd=rk.prototype.Xb;rk.prototype.setUserSeekStart=rk.prototype.jh;
|
|
411
411
|
rk.prototype.getSegmentAvailabilityStart=rk.prototype.nb;rk.prototype.isInProgress=rk.prototype.nc;rk.prototype.isLive=rk.prototype.V;rk.prototype.offset=rk.prototype.offset;rk.prototype.notifyMaxSegmentDuration=rk.prototype.xf;rk.prototype.notifyMinSegmentStartTime=rk.prototype.ae;rk.prototype.getInitialProgramDateTime=rk.prototype.Rh;rk.prototype.setInitialProgramDateTime=rk.prototype.eh;rk.prototype.isStartTimeLocked=rk.prototype.ui;rk.prototype.lockStartTime=rk.prototype.Ud;
|
|
412
412
|
rk.prototype.getMaxSegmentEndTime=rk.prototype.Vh;rk.prototype.notifyPeriodDuration=rk.prototype.Og;rk.prototype.notifySegments=rk.prototype.rd;rk.prototype.notifyTimeRange=rk.prototype.Pg;rk.prototype.getDelay=rk.prototype.Nh;rk.prototype.setDelay=rk.prototype.Of;rk.prototype.getSegmentAvailabilityDuration=rk.prototype.Ld;rk.prototype.setSegmentAvailabilityDuration=rk.prototype.oe;rk.prototype.setStatic=rk.prototype.uc;rk.prototype.setClockOffset=rk.prototype.dh;
|
|
413
|
-
rk.prototype.getPresentationStartTime=rk.prototype.Zh;rk.prototype.setDuration=rk.prototype.Za;rk.prototype.setPresentationStartTime=rk.prototype.fh;rk.prototype.getMaxSegmentDuration=rk.prototype.Uh;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(Pi(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.m=c;this.l=new gb;this.j=!1;this.
|
|
414
|
-
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.
|
|
415
|
-
null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Yc()||$c())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.yb()||.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.
|
|
416
|
-
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.
|
|
417
|
-
function Bk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Rc(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Bk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Fk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ra(.1)};function Hk(a){this.h=a;this.j=!1;this.g=null;this.i=new gb}q=Hk.prototype;q.ready=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.
|
|
413
|
+
rk.prototype.getPresentationStartTime=rk.prototype.Zh;rk.prototype.setDuration=rk.prototype.Za;rk.prototype.setPresentationStartTime=rk.prototype.fh;rk.prototype.getMaxSegmentDuration=rk.prototype.Uh;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(Pi(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.m=c;this.l=new gb;this.j=!1;this.D=a.readyState;this.C=this.i=0;this.h=d;this.s=!1;this.l.F(a,"waiting",function(){return xk(f)});this.o=(new Rc(function(){xk(f)})).Ra(this.m.gapJumpTimerTime)}wk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.o&&(this.o.stop(),this.o=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};wk.prototype.Af=function(){this.s=!0;xk(this)};
|
|
414
|
+
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.D&&(a.D=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=Qi(c,b,a.m.gapDetectionThreshold),
|
|
415
|
+
null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Yc()||$c())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.yb()||.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.ka(a,b,d))}var zk=new Kc(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 gb;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()}
|
|
416
|
+
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.ka(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.F(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
417
|
+
function Bk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Rc(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Bk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Fk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ra(.1)};function Hk(a){this.h=a;this.j=!1;this.g=null;this.i=new gb}q=Hk.prototype;q.ready=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.ka(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()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.De=function(a){this.g=this.j?this.g:a};
|
|
418
418
|
q.xd=function(){return(this.j?this.h.currentTime:this.g)||0};q.gg=function(){return 0};q.fg=function(){return 0};q.Ng=function(){};
|
|
419
|
-
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.s=!1;var k=Dk(g.h);h=Kk(g,k);if(.001<Math.abs(h-k)){k=!1;if(!fd()||fd()&&nd())k=!0;else{var l=Date.now()/1E3;if(!g.s||g.s<l-
|
|
420
|
-
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Jb():g.g.yb():0>h&&(h=g.g.yb()+h);return Lk(g,Mk(g,h))});this.m=new Rc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Dk(g.h),k=g.g.Jb(),l=g.g.yb();3>l-k&&(k=l-3);h<k&&(h=Kk(g,h),g.i.currentTime=h)}})}q=Ik.prototype;q.ready=function(){this.m.Ra(.25)};
|
|
421
|
-
q.De=function(a){Ek(this.h,a)};q.xd=function(){var a=Dk(this.h);return 0<this.i.readyState&&!this.i.paused?Mk(this,a):a};q.gg=function(){return this.o?this.o.o:0};q.fg=function(){return this.j.C};q.Ng=function(){this.j.Af()};function Lk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
419
|
+
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.s=!1;var k=Dk(g.h);h=Kk(g,k);if(.001<Math.abs(h-k)){k=!1;if(!fd()||fd()&&nd())k=!0;else{var l=Date.now()/1E3,m=fd()&&Zc("Fuchsia")?3:1;if(!g.s||g.s<l-m)g.s=l,k=!0}if(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&&
|
|
420
|
+
!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Jb():g.g.yb():0>h&&(h=g.g.yb()+h);return Lk(g,Mk(g,h))});this.m=new Rc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Dk(g.h),k=g.g.Jb(),l=g.g.yb();3>l-k&&(k=l-3);h<k&&(h=Kk(g,h),g.i.currentTime=h)}})}q=Ik.prototype;q.ready=function(){this.m.Ra(.25)};
|
|
421
|
+
q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};q.De=function(a){Ek(this.h,a)};q.xd=function(){var a=Dk(this.h);return 0<this.i.readyState&&!this.i.paused?Mk(this,a):a};q.gg=function(){return this.o?this.o.o:0};q.fg=function(){return this.j.C};q.Ng=function(){this.j.Af()};function Lk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
422
422
|
function Kk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Jb(),f=a.g.yb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.cd(c),k=a.g.cd(d);c=a.g.cd(c+d);return b>=g?Lk(a,b):b>f?f:b<e?Li(a.i.buffered,k)?k:c:b>=h||Li(a.i.buffered,b)?b:c}function Mk(a,b){var c=a.g.Jb();if(b<c)return c;a=a.g.yb();return b>a?a:b}
|
|
423
423
|
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.P=a;this.l=null;this.h=0;this.m=!1}q=Nk.prototype;q.getNumReferences=function(){return this.P.length};q.getNumEvicted=function(){return this.h};q.release=function(){this.m||(this.P=[],this.l&&this.l.stop(),this.l=null)};q.Ai=function(){this.m=!0};q.Hb=function(a){for(var b=t(this.P),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
424
424
|
q.find=function(a){for(var b=this.P.length-1,c=b;0<=c;--c){var d=this.P[c],e=c<b?this.P[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.P.length&&a<this.P[0].startTime?this.h:null};q.get=function(a){if(0==this.P.length)return null;a-=this.h;return 0>a||a>=this.P.length?null:this.P[a]};q.offset=function(a){if(!this.m)for(var b=t(this.P),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
425
425
|
q.Xd=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.P=this.P.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.P.push.apply(this.P,x(a))}};q.qd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.P.length||d.endTime>c.P[0].startTime)});this.Xd(a);this.Ga(b)};q.Ga=function(a){if(!this.m){var b=this.P.length;this.P=this.P.filter(function(c){return c.endTime>a});this.h+=b-this.P.length}};
|
|
426
|
-
q.Dc=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],b=new Fi(a.startTime,b,a.
|
|
426
|
+
q.Dc=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],b=new Fi(a.startTime,b,a.D,a.Ha,a.ta,a.Z,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.P[this.P.length-1]=b)}};
|
|
427
427
|
q.te=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Rc(function(){var d=b();d?c.P.push.apply(c.P,x(d)):(c.l.stop(),c.l=null)}),this.l.Ra(a))};Nk.prototype[Symbol.iterator]=function(){return this.Ib(0)};
|
|
428
428
|
Nk.prototype.Ib=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;var e=this.get(d);c?d++:d--;var 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 Xa("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Ok(this,d,f,c)};function Pk(a,b,c){a=new Fi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Nk([a])}
|
|
429
429
|
S("shaka.media.SegmentIndex",Nk);Nk.forSingleSegment=Pk;Nk.prototype.getIteratorForTime=Nk.prototype.Ib;Nk.prototype.updateEvery=Nk.prototype.te;Nk.prototype.fit=Nk.prototype.Dc;Nk.prototype.evict=Nk.prototype.Ga;Nk.prototype.mergeAndEvict=Nk.prototype.qd;Nk.prototype.offset=Nk.prototype.offset;Nk.prototype.get=Nk.prototype.get;Nk.prototype.find=Nk.prototype.find;Nk.prototype.markImmutable=Nk.prototype.Ai;Nk.prototype.release=Nk.prototype.release;Nk.prototype.getNumEvicted=Nk.prototype.getNumEvicted;
|
|
@@ -432,7 +432,7 @@ Ok.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.leng
|
|
|
432
432
|
Ok.prototype.setReverse=Ok.prototype.Tc;function Qk(){Nk.call(this,[]);this.g=[]}na(Qk,Nk);q=Qk.prototype;q.clone=function(){var a=new Qk;a.g=this.g.slice();a.h=this.h;return a};q.release=function(){for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};q.Hb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.Hb(a)};
|
|
433
433
|
q.find=function(a){for(var b=this.h,c=t(this.g),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};q.get=function(a){for(var b=this.h,c=t(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Xd=function(){};
|
|
434
434
|
q.Ga=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.Ga(a);for(;1<this.g.length&&0==this.g[0].getNumReferences();)a=this.g.shift(),this.h+=a.getNumEvicted(),a.release()};q.qd=function(){};q.Dc=function(){};q.te=function(){};S("shaka.media.MetaSegmentIndex",Qk);Qk.prototype.updateEvery=Qk.prototype.te;Qk.prototype.fit=Qk.prototype.Dc;Qk.prototype.mergeAndEvict=Qk.prototype.qd;Qk.prototype.evict=Qk.prototype.Ga;Qk.prototype.merge=Qk.prototype.Xd;Qk.prototype.offset=Qk.prototype.offset;
|
|
435
|
-
Qk.prototype.get=Qk.prototype.get;Qk.prototype.find=Qk.prototype.find;Qk.prototype.forEachTopLevelReference=Qk.prototype.Hb;Qk.prototype.release=Qk.prototype.release;function Rk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Kd();this.h=new Rc(function(){b.g.Mg(.25*b.i)})}Rk.prototype.release=function(){this.set(this.kc());this.h&&(this.h.stop(),this.h=null);this.g=null};Rk.prototype.set=function(a){this.i=a;Sk(this)};Rk.prototype.kc=function(){return this.g.kc()};function Sk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Kd()!=b&&a.g.Rf(b);return}catch(c){}a.h.Ra(.25);0!=a.g.Kd()&&a.g.Rf(0)};function Tk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Rc(function(){Uk(b,!1)})).Ra(.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.fc=this.Ig=this.A=this.B=this.I=this.C=this.s=this.j=this.H=this.m=this.i=this.
|
|
435
|
+
Qk.prototype.get=Qk.prototype.get;Qk.prototype.find=Qk.prototype.find;Qk.prototype.forEachTopLevelReference=Qk.prototype.Hb;Qk.prototype.release=Qk.prototype.release;function Rk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Kd();this.h=new Rc(function(){b.g.Mg(.25*b.i)})}Rk.prototype.release=function(){this.set(this.kc());this.h&&(this.h.stop(),this.h=null);this.g=null};Rk.prototype.set=function(a){this.i=a;Sk(this)};Rk.prototype.kc=function(){return this.g.kc()};function Sk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Kd()!=b&&a.g.Rf(b);return}catch(c){}a.h.Ra(.25);0!=a.g.Kd()&&a.g.Rf(0)};function Tk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Rc(function(){Uk(b,!1)})).Ra(.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.fc=this.Ig=this.A=this.B=this.I=this.C=this.s=this.j=this.H=this.m=this.i=this.T=this.Y=this.M=this.N=this.O=this.l=this.o=NaN;this.K=0;this.D=this.G=NaN;this.g=new Vk;this.h=new Yk};function al(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function bl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}function cl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ib(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.ta&&(c=!1);2==b.Zb()&&(c=!1);c&&b.Z&&dl(a,b.Z);c&&!a.h.has(b)&&(c=new el(a.l),fl(c,b,a.i),a.h.set(b,c))}gl(a)}}
|
|
436
436
|
function dl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Ei(d,b)})){var c=new el(a.l);fl(c,b,a.i);a.j.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.h);hl(a,a.j);a.g=null}al.prototype.Ga=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&il(this,d);b&&gl(this)};al.prototype.Tc=function(a){this.o=a;this.g&&this.g.Tc(a)};
|
|
437
437
|
function gl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={mf:void 0},d=c.next())e.mf=d.value,b.some(function(f){return function(g){return Ei(g.Z,f.mf)}}(e))||il(a,e.mf)}function kl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&il(a,d)}gl(a)}function ll(a,b){b&&b!==a.i&&(jl(a),a.i=b)}function il(a,b){var c=a.h;b instanceof Di&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function el(a){this.g=a;this.ee=this.Uf=null}
|
|
438
438
|
function fl(a,b,c){var d=new Uint8Array(0);a.ee=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Kd(d,e):d=e,a.Uf?F(f,a.Uf(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}el.prototype.abort=function(){this.ee&&this.ee.abort()};function ml(a){kg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Rc(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))})).Ra(2)}na(ml,kg);ml.prototype.release=function(){this.g.clear();this.h.stop();kg.prototype.release.call(this)};function nl(a){kg.call(this);this.g=new Map;this.h=a}na(nl,kg);nl.prototype.release=function(){this.g.clear();kg.prototype.release.call(this)};function ol(a,b){var c=a.g.get(b);c||(c={td:[],Oe: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={Jc:b,position:c};d=d.td;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
@@ -442,60 +442,60 @@ function rl(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].
|
|
|
442
442
|
function sl(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
|
|
443
443
|
a.language);return b};function tl(a){var b=ie(a),c=b.split("/")[0];a=je(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,wd:null,colorGamut:null}}
|
|
444
444
|
function ul(a,b){function c(y){w=y.name;var B=y.reader;B.skip(24);var C=B.oa(),E=B.oa();B.skip(50);n=String(C);m=String(E);y.reader.qa()&&Qg(y)}function d(y){var B=bj(y.reader);p=B.channelCount;r=B.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");
|
|
445
|
-
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),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,v=null,w;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).
|
|
445
|
+
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),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,v=null,w;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).S("mdhd",function(y){l=$i(y.reader,y.version).language}).box("minf",Qg).box("stbl",Qg).S("stsd",Sg).box("mp4a",function(y){var B=bj(y.reader);p=B.channelCount;r=B.sampleRate;y.reader.qa()?Qg(y):e(y.name)}).box("esds",function(y){y=y.reader;for(var B=
|
|
446
446
|
"mp4a",C,E;y.qa();){C=y.U();for(var G=y.U();G&128;)G=y.U();if(3==C)y.oa(),G=y.U(),G&128&&y.oa(),G&64&&y.skip(y.U()),G&32&&y.oa();else if(4==C)E=y.U(),y.skip(12);else if(5==C)break}E&&(B+="."+ej(E),5==C&&y.qa()&&(C=y.U(),E=(C&248)>>3,31===E&&y.qa()&&(E=32+((C&7)<<3)+((y.U()&224)>>5)),B+="."+E));f.push(B);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",
|
|
447
447
|
c).box("av01",c).box("avcC",function(y){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}y=y.reader;y.skip(1);y=B+"."+ej(y.U())+ej(y.U())+ej(y.U());g.push(y);k=!0}).box("hvcC",function(y){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var C=y.reader;C.skip(1);y=C.U();var E=["","A","B","C"][y>>6],G=y&31,L=C.R(),K=(y&32)>>5?"H":"L";y=[C.U(),C.U(),C.U(),C.U(),C.U(),C.U()];C=C.U();for(var I=0,J=0;32>J;J++){I|=L&1;if(31==J)break;I<<=1;L>>=1}B=B+("."+E+G)+("."+
|
|
448
448
|
ej(I,!0));B+="."+K+C;E="";for(G=y.length;G--;)if((K=y[G])||E)E="."+K.toString(16).toUpperCase()+E;B+=E;g.push(B);k=!0}).box("dvcC",function(y){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=y.reader;C.skip(2);y=C.U();C=C.U();g.push(B+"."+fj(y>>1&127)+"."+fj(y<<5&32|C>>3&31));k=!0}).box("dvvC",function(y){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B=
|
|
449
|
-
"dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=y.reader;C.skip(2);y=C.U();C=C.U();g.push(B+"."+fj(y>>1&127)+"."+fj(y<<5&32|C>>3&31));k=!0}).
|
|
450
|
-
((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+fj(1)+"."+fj(1)+"."+fj(1)+".0");k=!0}).box("enca",
|
|
449
|
+
"dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=y.reader;C.skip(2);y=C.U();C=C.U();g.push(B+"."+fj(y>>1&127)+"."+fj(y<<5&32|C>>3&31));k=!0}).S("vpcC",function(y){var B=w||"",C=y.reader;y=C.U();var E=C.U();C=C.U()>>4&15;g.push(B+"."+fj(y)+"."+fj(E)+"."+fj(C));k=!0}).box("av1C",function(y){var B=w||"";switch(w){case "dav1":B="av01"}var C=y.reader;C.skip(1);y=C.U();C=C.U();var E=y>>>5,G=(C&64)>>6;g.push(B+"."+E+"."+fj(y&31)+(C>>>7?"H":"M")+"."+fj(2===E&&G?(C&32)>>5?12:10:G?10:8)+"."+
|
|
450
|
+
((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+fj(1)+"."+fj(1)+"."+fj(1)+".0");k=!0}).box("enca",Ug).box("encv",Tg).box("sinf",Qg).box("frma",function(y){y=cj(y.reader).codec;e(y)}).box("colr",function(y){g=g.map(function(E){if(E.startsWith("av01.")){var G=y.reader,L=G.wa(),K=G.rb(4);var I=String.fromCharCode(K[0]);I+=String.fromCharCode(K[1]);I+=String.fromCharCode(K[2]);I+=String.fromCharCode(K[3]);if("nclx"===I){K=G.oa();I=G.oa();var J=G.oa(),M=G.U()>>7,N=E.split(".");10==N.length&&(N[6]=fj(K),
|
|
451
451
|
N[7]=fj(I),N[8]=fj(J),N[9]=String(M),E=N.join("."))}G.seek(L)}return E});var B=dj(y.reader),C=B.colorGamut;u=B.wd;v=C}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,z=new Map;if(k){var D=new Gb("video/mp4");a&&D.init(a);D.i(b);a=t(D.j());for(b=a.next();!b.done;b=a.next())b=b.value,z.set(b,b);D.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:vl(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:z,wd:u,colorGamut:v}}
|
|
452
452
|
function vl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=he(d);b.has(e)||(c.push(d),b.add(e))}b=Vd("audio",c);d=Vd("video",c);a=Vd(Ud,c);d=wl(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
453
453
|
function wl(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?lb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
454
|
-
function xl(a){var b=null;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).
|
|
455
|
-
function yl(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):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=zb(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))})};function zl(a,b,c,d,e){a=sg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Al(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.G=new Map;this.B=1;this.s=this.j=null;this.K=0;this.H=!1;this.i=new Map;this.
|
|
454
|
+
function xl(a){var b=null;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).S("stsd",Sg).box("encv",Tg).box("enca",Ug).box("sinf",Qg).box("schi",Qg).S("tenc",function(c){c=c.reader;c.U();c.U();c.U();c.U();b=Jd(c.rb(16))}).parse(a,!0);return b}
|
|
455
|
+
function yl(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):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=zb(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))})};function zl(a,b,c,d,e){a=sg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Al(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.G=new Map;this.B=1;this.s=this.j=null;this.K=0;this.H=!1;this.i=new Map;this.D=!1;this.M=null;this.A=!1;this.m=new Ag(function(){return Bl(c)});this.N=Date.now()/1E3;this.o=new Map;this.I={projection:null,hfov:null};this.T=0;this.O=Infinity;this.C=null}q=Al.prototype;q.destroy=function(){return this.m.destroy()};
|
|
456
456
|
function Bl(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,Cl(e),b.push(Dl(e)),e.W&&(jl(e.W),e.W=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,jl(h);return F(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;H(k)})}
|
|
457
457
|
q.configure=function(a){this.h=a;this.M=new Yf({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.W&&(jl(b.W),b.W=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(Ud))&&
|
|
458
|
-
b.W&&(jl(b.W),b.W=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.W&&(jl(b.W),b.W=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.W?(kl(c.W,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(jl(c.W),c.W=null)):0<a.segmentPrefetchLimit&&(c.W=El(this,c.stream));a.disableAudioPrefetch||Fl(this)};function Gl(a,b,c){a.l.presentationTimeline.V()||(a.
|
|
459
|
-
q.start=function(a){var b=this;return O(function(c){if(1==c.g)return F(c,Hl(b,a||new Map),2);Bg(b.m);b.
|
|
460
|
-
function Ll(a){var b=a.i.get(Ud);b&&(Cl(b),Dl(b).catch(function(){}),a.C=a.i.get(Ud),a.i.delete(Ud));a.s=null}function Ml(a,b){for(var c=0>a.g.fb(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.
|
|
461
|
-
function Ol(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.
|
|
462
|
-
function Nl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ud?g&&(g.ac&&(b.trickModeVideo?(g.ac=b,b=b.trickModeVideo):g.ac=null),g.stream!=b||e)&&(a.o.has(b)?g.W=a.o.get(b):g.W&&ll(g.W,b),b.type==Ud&&(e=Zd(b.mimeType,b.codecs),Pj(a.g.ba,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ka?(e="("+g.type+":"+g.stream.id+")",a.G.has(e)||a.G.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.
|
|
458
|
+
b.W&&(jl(b.W),b.W=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.W&&(jl(b.W),b.W=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.W?(kl(c.W,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(jl(c.W),c.W=null)):0<a.segmentPrefetchLimit&&(c.W=El(this,c.stream));a.disableAudioPrefetch||Fl(this)};function Gl(a,b,c){a.l.presentationTimeline.V()||(a.T=b,a.O=c)}
|
|
459
|
+
q.start=function(a){var b=this;return O(function(c){if(1==c.g)return F(c,Hl(b,a||new Map),2);Bg(b.m);b.D=!0;H(c)})};function Il(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Wd,a.K++,d=a.K,ra(l,2),F(l,gk(a.g.ba,c.ua),4);case 4:ta(l,3);break;case 2:if(e=ua(l),a.g)a.g.onError(e);case 3:f=Zd(b.mimeType,b.codecs),Pj(a.g.ba,f,a.l.sequenceMode,b.external),g=a.g.ba.D,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.K==d&&(k=Jl(a,b),a.i.set(c.ua,k),Kl(a,k,0)),H(l)}})}
|
|
460
|
+
function Ll(a){var b=a.i.get(Ud);b&&(Cl(b),Dl(b).catch(function(){}),a.C=a.i.get(Ud),a.i.delete(Ud));a.s=null}function Ml(a,b){for(var c=0>a.g.fb(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ja&&e.ja.Tc(c),e.W&&e.W.Tc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Tc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.ac&&(Nl(a,b,!1,0,!1),c.ac=d);else if(b=c.ac)c.ac=null,Nl(a,b,!0,0,!1)}
|
|
461
|
+
function Ol(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.D&&(b.video&&Nl(a,b.video,c,d,e,f),b.audio&&Nl(a,b.audio,c,d,e,f))}function Pl(a,b){O(function(c){if(1==c.g)return a.C=null,a.s=b,a.D?b.segmentIndex?c.u(2):F(c,b.createSegmentIndex(),2):c.return();Nl(a,b,!0,0,!1);H(c)})}function Ql(a,b){for(var c=t(a.G.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.G.delete(d))}}
|
|
462
|
+
function Nl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ud?g&&(g.ac&&(b.trickModeVideo?(g.ac=b,b=b.trickModeVideo):g.ac=null),g.stream!=b||e)&&(a.o.has(b)?g.W=a.o.get(b):g.W&&ll(g.W,b),b.type==Ud&&(e=Zd(b.mimeType,b.codecs),Pj(a.g.ba,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ka?(e="("+g.type+":"+g.stream.id+")",a.G.has(e)||a.G.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.ja=null,g.hg=!!f,c?g.Wc?g.Ae=!0:g.Ka?(g.ec=!0,g.Fd=
|
|
463
463
|
d,g.Ae=!0):(Cl(g),Rl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ka||g.ub||Kl(a,g,0),Sl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Il(a,b)}
|
|
464
464
|
function Sl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.jb)return e.return();c=b.stream;d=b.jb;return c.segmentIndex?e.u(2):F(e,c.createSegmentIndex(),2)}if(b.jb!=d||b.stream!=c)return e.return();var f=a.g.bd();var g=Vj(a.g.ba,b.type),h=b.stream.segmentIndex.find(b.Na?b.Na.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ta?k.ta-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.Z)&&(h+=(k.ta?k.ta-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
|
|
465
465
|
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.jb.h.g>h?!0:!1):f=!1;f&&b.jb.abort();H(e)})}
|
|
466
|
-
q.Rc=function(){if(this.g)for(var a=this.g.bd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ba;e.C?e=!1:d==Ud?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Uj(e,d),e=Li(e,a));if(!e){c.W&&(c.W.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.
|
|
466
|
+
q.Rc=function(){if(this.g)for(var a=this.g.bd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ba;e.C?e=!1:d==Ud?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Uj(e,d),e=Li(e,a));if(!e){c.W&&(c.W.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.ja=null;(null!=Vj(this.g.ba,d)||c.Ka)&&Tl(this,c);c.jb&&(c.jb.abort(),c.jb=null);d===Ud&&(d=this.g.ba,d.H&&d.H.g());c.Rc=!0}}};
|
|
467
467
|
function Tl(a,b){b.Wc||b.ec||(b.Ka?(b.ec=!0,b.Fd=0):null==Tj(a.g.ba,b.type)?null==b.ub&&Kl(a,b,0):(Cl(b),Rl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
468
468
|
function Hl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Wd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.X,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ha,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ua,a.s),e.add(a.s));f=a.g.ba;return F(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Bg(a.m);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=Jl(a,l),b.has(l.id)&&(n=
|
|
469
|
-
b.get(l.id),bl(n,function(r,u,v){return Ul(r,u,v||null,a.h.retryParameters,a.g.Mb)}),m.W=n),a.i.set(k,m),Kl(a,m,0));H(p)})}function Jl(a,b){return{stream:b,type:b.type,
|
|
469
|
+
b.get(l.id),bl(n,function(r,u,v){return Ul(r,u,v||null,a.h.retryParameters,a.g.Mb)}),m.W=n),a.i.set(k,m),Kl(a,m,0));H(p)})}function Jl(a,b){return{stream:b,type:b.type,ja:null,W:El(a,b),Na:null,oc:null,Td:null,Sd:null,Rd:null,ac:null,endOfStream:!1,Ka:!1,ub:null,ec:!1,Fd:0,Ae:!1,Wc:!1,Rc:!0,Gf:!1,gd:!1,jb:null}}
|
|
470
470
|
function El(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ud&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ud&&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.W)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new al(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ul(d,e,f||null,a.h.retryParameters,a.g.Mb)},0>a.g.fb()):null}
|
|
471
471
|
function Fl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={mb:void 0},e=d.next())if(f.mb=e.value,f.mb.audio)if(a.o.has(f.mb.audio)){if(e=a.o.get(f.mb.audio),kl(e,b),!(0<b&&c.some(function(h){return function(k){return Ae(h.mb.audio.language,k)}}(f)))){var g=a.i.get(f.mb.audio.type);e!==(g&&g.W)&&jl(e);a.o.delete(f.mb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Ae(h.mb.audio.language,k)}}(f))||!(e=El(a,f.mb.audio))||
|
|
472
472
|
(f.mb.audio.segmentIndex||f.mb.audio.createSegmentIndex(),a.o.set(f.mb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.ba.Za(a):this.g.ba.Za(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
473
473
|
function Vl(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Bg(a.m);if(b.Ka||null==b.ub||b.Wc)return k.return();b.ub=null;if(!b.ec){k.u(2);break}return F(k,Rl(a,b,b.Ae,b.Fd),3);case 3:return k.return();case 2:Ql(a,b);if(b.stream.segmentIndex){k.u(4);break}c=b.stream;ra(k,5);return F(k,b.stream.createSegmentIndex(),7);case 7:ta(k,6);break;case 5:return d=ua(k),F(k,Wl(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ka||b.ub||
|
|
474
|
-
Kl(a,b,0),k.return();case 4:ra(k,9);e=Xl(a,b);null!=e&&(Kl(a,b,e),b.gd=!1);ta(k,10);break;case 9:return f=ua(k),F(k,Wl(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.
|
|
475
|
-
function Xl(a,b){if(Yl(b))return dk(a.g.ba,b.stream.originalId||""),null;b.type==Ud&&ek(a.g.ba);if(!a.g.ba.
|
|
476
|
-
!0,"video"==b.type&&(a=a.i.get(Ud))&&Yl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.
|
|
474
|
+
Kl(a,b,0),k.return();case 4:ra(k,9);e=Xl(a,b);null!=e&&(Kl(a,b,e),b.gd=!1);ta(k,10);break;case 9:return f=ua(k),F(k,Wl(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.D||!g.every(function(l){return l.endOfStream})){k.u(0);break}return F(k,a.g.ba.endOfStream(),13);case 13:Bg(a.m),h=a.g.ba.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Za(h),H(k)}})}
|
|
475
|
+
function Xl(a,b){if(Yl(b))return dk(a.g.ba,b.stream.originalId||""),null;b.type==Ud&&ek(a.g.ba);if(!a.g.ba.ya&&b.type!=Ud)return a.h.updateIntervalSeconds/2;var c=a.g.bd();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.Ga(c,!0),cl(e,c);d=b.Na?b.Na.endTime:c;var f=Wj(a.g.ba,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),h=a.l.presentationTimeline.getDuration()-d;e=Vj(a.g.ba,b.type);if(1E-6>h&&e)return b.endOfStream=
|
|
476
|
+
!0,"video"==b.type&&(a=a.i.get(Ud))&&Yl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.ja;e=Zl(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.hg&&(f=!0,b.hg=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,Yl(k)||k.ja&&!k.ja.current()||(g=Math.min(g,k.Na?k.Na.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.W&&b.ja&&!a.o.has(b.stream)&&(b.W.Ga(e.startTime),cl(b.W,
|
|
477
477
|
e.startTime));$l(a,b,c,e,f).catch(function(){});return null}
|
|
478
|
-
function Zl(a,b,c,d){if(b.
|
|
479
|
-
function $l(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B;return O(function(C){switch(C.g){case 1:f=Wd;g=b.stream;h=b.
|
|
480
|
-
v=!0;Bg(a.m);if(a.A)return J.return();ra(J,2);r=bm(r,E);G=!1;L=0;(new Lg).box("mdat",function(M){L=M.size+M.start;G=!0}).parse(r,!1,!0);if(!G){J.u(4);break}K=r.subarray(0,L);r=r.subarray(L);return F(J,cm(a,b,c,g,d,K,!0,e),5);case 5:b.W&&b.
|
|
481
|
-
if(v){C.u(10);break}u=!0;Bg(a.m);return a.A?C.return():b.ec?(b.Ka=!1,Kl(a,b,0),C.return()):F(C,cm(a,b,c,g,d,z,!1,e),10);case 10:b.W&&b.
|
|
478
|
+
function Zl(a,b,c,d){if(b.ja)return b.ja.current();if(b.Na||d)return c=b.Na?b.Na.endTime:d,a=0>a.g.fb(),b.stream.segmentIndex&&(b.ja=b.stream.segmentIndex.Ib(c,!1,a)),b.ja&&b.ja.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.fb();var f=null;d&&(b.stream.segmentIndex&&(b.ja=b.stream.segmentIndex.Ib(e,!1,a)),f=b.ja&&b.ja.next().value);f||(b.stream.segmentIndex&&(b.ja=b.stream.segmentIndex.Ib(c,!1,a)),f=b.ja&&b.ja.next().value);return f}
|
|
479
|
+
function $l(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B;return O(function(C){switch(C.g){case 1:f=Wd;g=b.stream;h=b.ja;b.Ka=!0;ra(C,2);if(2==d.Zb())throw new T(1,1,1011);return F(C,am(a,b,d,e),4);case 4:Bg(a.m);if(a.A)return C.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.l.isLowLatency)&&l&&k&&("HLS"!=a.l.type||d.m))return r=new Uint8Array(0),v=u=!1,A=function(E){var G,L,K,I;return O(function(J){switch(J.g){case 1:if(u)return J.return();
|
|
480
|
+
v=!0;Bg(a.m);if(a.A)return J.return();ra(J,2);r=bm(r,E);G=!1;L=0;(new Lg).box("mdat",function(M){L=M.size+M.start;G=!0}).parse(r,!1,!0);if(!G){J.u(4);break}K=r.subarray(0,L);r=r.subarray(L);return F(J,cm(a,b,c,g,d,K,!0,e),5);case 5:b.W&&b.ja&&cl(b.W,d.startTime,!0);case 4:ta(J,0);break;case 2:w=I=ua(J),H(J)}})},F(C,dm(a,b,d,A),9);n=dm(a,b,d);return F(C,n,7);case 7:p=C.h;Bg(a.m);if(a.A)return C.return();Bg(a.m);return b.ec?(b.Ka=!1,Kl(a,b,0),C.return()):F(C,cm(a,b,c,g,d,p,!1,e),6);case 9:z=C.h;if(w)throw w;
|
|
481
|
+
if(v){C.u(10);break}u=!0;Bg(a.m);return a.A?C.return():b.ec?(b.Ka=!1,Kl(a,b,0),C.return()):F(C,cm(a,b,c,g,d,z,!1,e),10);case 10:b.W&&b.ja&&cl(b.W,d.startTime,!0);case 6:Bg(a.m);if(a.A)return C.return();b.Na=d;h.next();b.Ka=!1;b.Gf=!1;D=a.g.ba.wb();y=D[b.type];db(JSON.stringify(y));b.ec||a.g.Af(d,b.stream);Kl(a,b,0);ta(C,0);break;case 2:B=ua(C);Bg(a.m,B);if(a.A)return C.return();b.Ka=!1;if(7001==B.code)b.Ka=!1,Cl(b),Kl(a,b,0),C.u(0);else if(b.type==f.ua&&a.h.ignoreTextStreamFailures)a.i.delete(f.ua),
|
|
482
482
|
C.u(0);else{if(3017==B.code)return F(C,em(a,b,B),0);b.gd=!0;1==B.category&&b.W&&il(b.W,d);B.severity=2;return F(C,Wl(a,b,B),0)}}})}function bm(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
483
483
|
function em(a,b,c){var d,e,f,g,h,k;return O(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Gf}))return l.u(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.B);if(20<h)a.B-=.2;else if(4<h)a.B-=.04;else return b.gd=!0,a.A=!0,a.g.onError(c),l.return();b.Gf=!0;k=a.g.bd();return F(l,fm(a,b,k),2)}Kl(a,b,4);H(l)})}
|
|
484
|
-
function am(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:e=Wd;f=null==b.Na&&null==b.oc;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.
|
|
485
|
-
break}return F(y,Dl(u).catch(function(){}),5);case 5:u.oc=null,Tl(a,u);case 3:return F(y,gm(a,b,p,h,k,c,m,n),2);case 2:return Ei(c.Z,b.oc)||(b.oc=c.Z,c.l&&c.Z&&(v=dm(a,b,c.Z),w=function(){var B,C,E,G,L,K,I;return O(function(J){switch(J.g){case 1:return ra(J,2),F(J,v,4);case 4:return B=J.h,Bg(a.m),C=null,E=new Map,G={projection:null,hfov:null},L=new Lg,L.box("moov",Qg).box("trak",Qg).box("mdia",Qg).
|
|
486
|
-
switch(M.rc()){case "soun":E.set(e.X,C);break;case "vide":E.set(e.ha,C)}C=null}).box("minf",Qg).box("stbl",Qg).
|
|
484
|
+
function am(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:e=Wd;f=null==b.Na&&null==b.oc;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.T)-.1);k=Math.min(c.appendWindowEnd,a.O)+.01;l=c.codecs||b.stream.codecs;m=he(l);n=ie(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.Td&&h==b.Sd&&k==b.Rd&&m==b.tf&&n==b.uf){y.u(2);break}r=b.tf&&b.uf&&qk(a.g.ba,b.type,n,l);if(!r){y.u(3);break}u=null;b.type===e.ha?u=a.i.get(e.X):b.type===e.X&&(u=a.i.get(e.ha));if(!u){y.u(3);
|
|
485
|
+
break}return F(y,Dl(u).catch(function(){}),5);case 5:u.oc=null,Tl(a,u);case 3:return F(y,gm(a,b,p,h,k,c,m,n),2);case 2:return Ei(c.Z,b.oc)||(b.oc=c.Z,c.l&&c.Z&&(v=dm(a,b,c.Z),w=function(){var B,C,E,G,L,K,I;return O(function(J){switch(J.g){case 1:return ra(J,2),F(J,v,4);case 4:return B=J.h,Bg(a.m),C=null,E=new Map,G={projection:null,hfov:null},L=new Lg,L.box("moov",Qg).box("trak",Qg).box("mdia",Qg).S("mdhd",function(M){C=$i(M.reader,M.version).timescale}).box("hdlr",function(M){M=M.reader;M.skip(8);
|
|
486
|
+
switch(M.rc()){case "soun":E.set(e.X,C);break;case "vide":E.set(e.ha,C)}C=null}).box("minf",Qg).box("stbl",Qg).S("stsd",Sg).box("encv",Tg).box("avc1",Tg).box("avc3",Tg).box("hev1",Tg).box("hvc1",Tg).box("dvav",Tg).box("dva1",Tg).box("dvh1",Tg).box("dvhe",Tg).box("dvc1",Tg).box("dvi1",Tg).box("vexu",Qg).box("proj",Qg).S("prji",function(M){M=M.reader.rc();G.projection=M}).box("hfov",function(M){M=M.reader.R()/1E3;G.hfov=M}).parse(B),hm(a,G),E.has(b.type)?c.Z.timescale=E.get(b.type):null!=C&&(c.Z.timescale=
|
|
487
487
|
C),K=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,F(J,a.g.kg(b.type,B),5);case 5:return F(J,Yj(a.g.ba,b.type,B,null,b.stream,K,b.Rc,d),6);case 6:ta(J,0);break;case 2:throw I=ua(J),b.oc=null,I;}})},A=c.startTime,f&&(z=Vj(a.g.ba,b.type),null!=z&&(A=z)),a.g.Ci(A,c.Z),g.push(w()))),a.l.sequenceMode&&(D=b.Na?b.Na.i:null,c.i!=D&&g.push(jk(a.g.ba,b.type,c.startTime))),F(y,Promise.all(g),0)}})}
|
|
488
488
|
function gm(a,b,c,d,e,f,g,h){var k,l,m,n;return O(function(p){if(1==p.g)return k=Wd,l=new Map,a.j.audio&&l.set(k.X,a.j.audio),a.j.video&&l.set(k.ha,a.j.video),ra(p,2),b.Sd=d,b.Rd=e,g&&(b.tf=g),h&&(b.uf=h),b.Td=c,m=a.l.sequenceMode||"HLS"==a.l.type,F(p,hk(a.g.ba,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return ta(p,0);n=ua(p);b.Sd=null;b.Rd=null;b.tf=null;b.uf=null;b.Td=null;throw n;})}
|
|
489
|
-
function cm(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.H;p="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;r=null;e.Z&&(r=e.Z.timescale);u=p&&r&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(m||n||u)l=new Lg;m&&l.
|
|
489
|
+
function cm(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.H;p="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;r=null;e.Z&&(r=e.Z.timescale);u=p&&r&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(m||n||u)l=new Lg;m&&l.S("emsg",function(A){var z=d.emsgSchemeIdUris;
|
|
490
490
|
if(0===A.version){var D=A.reader.rc();var y=A.reader.rc();var B=A.reader.R();var C=A.reader.R();var E=A.reader.R();var G=A.reader.R();var L=e.startTime+C/B}else B=A.reader.R(),L=A.reader.Oc()/B+e.timestampOffset,C=L-e.startTime,E=A.reader.R(),G=A.reader.R(),D=A.reader.rc(),y=A.reader.rc();A=A.reader.rb(A.reader.getLength()-A.reader.wa());if(z&&z.includes(D)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==D)a.g.Di();else if(z=L+E/B,B=(new Map).set("detail",{startTime:L,endTime:z,schemeIdUri:D,
|
|
491
|
-
value:y,timescale:B,presentationTimeDelta:C,eventDuration:E,id:G,messageData:A}),B=new U("emsg",B),B.cancelable=!0,a.g.onEvent(B),!B.defaultPrevented&&("https://aomedia.org/emsg/ID3"==D||"https://developer.apple.com/streaming/emsg-id3"==D)&&(D=Wi(A),D.length))a.g.onMetadata([{cueTime:L,data:A,frames:D,dts:L,pts:L}],0,z)});n&&l.
|
|
492
|
-
32)+z);A=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+A)).getTime();z=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-z/e.Z.timescale*1E3)});z=new U("prft",z);a.g.onEvent(z);a.H=!0}});u&&l.box("moof",Qg).box("traf",Qg).
|
|
491
|
+
value:y,timescale:B,presentationTimeDelta:C,eventDuration:E,id:G,messageData:A}),B=new U("emsg",B),B.cancelable=!0,a.g.onEvent(B),!B.defaultPrevented&&("https://aomedia.org/emsg/ID3"==D||"https://developer.apple.com/streaming/emsg-id3"==D)&&(D=Wi(A),D.length))a.g.onMetadata([{cueTime:L,data:A,frames:D,dts:L,pts:L}],0,z)});n&&l.S("prft",function(A){if(!a.H&&e.Z.timescale){var z=A.reader,D=A.version;z.R();A=z.R();var y=z.R();A=1E3*A+y/Math.pow(2,32)*1E3;0===D?z=z.R():(D=z.R(),z=z.R(),z=D*Math.pow(2,
|
|
492
|
+
32)+z);A=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+A)).getTime();z=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-z/e.Z.timescale*1E3)});z=new U("prft",z);a.g.onEvent(z);a.H=!0}});u&&l.box("moof",Qg).box("traf",Qg).S("tfdt",function(A){var z,D,y,B,C,E;return O(function(G){z=Zi(A.reader,A.version);D=z.baseMediaDecodeTime;if(!D)return G.return();y=-D/r;B=Number(b.Td)||0;if(!(B<y))return G.u(0);C=b.Sd;E=b.Rd;return F(G,gm(a,b,y,C,E,e),0)})});(m||n||u)&&l.parse(f,!1,
|
|
493
493
|
g);return F(w,fm(a,b,c),2);case 2:return Bg(a.m),v=b.Rc,b.Rc=!1,F(w,a.g.kg(b.type,f),3);case 3:return F(w,Yj(a.g.ba,b.type,f,e,d,k,v,h,g),4);case 4:Bg(a.m),H(w)}})}
|
|
494
494
|
function fm(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof Qk&&d.Ga(a.l.presentationTimeline.Jb());e=Math.max(a.h.bufferBehind*a.B,a.l.presentationTimeline.h);f=Tj(a.g.ba,b.type);if(null==f)return a.C==b&&(a.C=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():F(k,a.g.ba.remove(b.type,f,f+h),2)}if(4!=k.g)return Bg(a.m),a.C?F(k,fm(a,a.C,c),4):k.u(0);Bg(a.m);H(k)})}
|
|
495
495
|
function Yl(a){return a&&a.type==Ud&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
496
|
-
function dm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.dd())return l.return(e);f=null;if(b.W){var m=b.W,n=m.h;c instanceof Di&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Uf=d),f=m.ee):f=null}f||(f=Ul(c,b.stream,d||null,a.h.retryParameters,a.g.Mb));g=0;b.
|
|
496
|
+
function dm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.dd())return l.return(e);f=null;if(b.W){var m=b.W,n=m.h;c instanceof Di&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Uf=d),f=m.ee):f=null}f||(f=Ul(c,b.stream,d||null,a.h.retryParameters,a.g.Mb));g=0;b.ja&&(g=b.ja.h);b.jb=f;return F(l,f.promise,2);case 2:h=l.h;b.jb=null;k=h.data;if(!c.aesKey){l.u(3);break}return F(l,yl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
497
497
|
function Ul(a,b,c,d,e){var f=a instanceof Fi?a:void 0,g=f?1:0;a=zl(a.L(),a.Ha,a.ta,d,c);a.contentType=b.type;return e.request(yg,a,{type:g,stream:b,segment:f})}
|
|
498
|
-
function Rl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.ec=!1,b.Ae=!1,b.Fd=0,b.Wc=!0,b.Na=null,b.
|
|
498
|
+
function Rl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.ec=!1,b.Ae=!1,b.Fd=0,b.Wc=!0,b.Na=null,b.ja=null,b.W&&!a.o.has(b.stream)&&jl(b.W),d?(e=a.g.bd(),f=a.g.ba.getDuration(),F(g,a.g.ba.remove(b.type,e+d,f),3)):F(g,gk(a.g.ba,b.type),4);if(3!=g.g)return Bg(a.m),c?F(g,a.g.ba.flush(b.type),3):g.u(3);Bg(a.m);b.Wc=!1;b.endOfStream=!1;b.Ka||b.ub||Kl(a,b,0);H(g)})}
|
|
499
499
|
function Kl(a,b,c){var d=b.type;if(d!=Ud||a.i.has(d))b.ub=(new Qc(function(){var e;return O(function(f){if(1==f.g)return ra(f,2),F(f,Vl(a,b),4);if(2!=f.g)return ta(f,0);e=ua(f);if(a.g)a.g.onError(e);H(f)})})).$(c)}function Cl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function Dl(a){return O(function(b){return a.jb?F(b,a.jb.abort(),0):b.u(0)})}
|
|
500
500
|
function Wl(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,$f(a.M),2);Bg(a.m);if(1===c.category&&1003!=c.code){if(b.ac)return Ml(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
|
|
501
501
|
function im(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.N<c)return h.return(!1);a.N=b;d=Wd;if(e=a.i.get(d.X))e.oc=null,Tl(a,e),Dl(e).catch(function(){});if(f=a.i.get(d.ha))f.oc=null,Tl(a,f),Dl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.X,a.j.audio);a.j.video&&g.set(d.ha,a.j.video);return F(h,pk(a.g.ba,g),2)}return h.return(!0)})}
|
|
@@ -509,8 +509,8 @@ om.conaxFairPlayRequest=function(a,b){sm(a,b)};om.ezdrmFairPlayRequest=function(
|
|
|
509
509
|
om.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(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 qm(a,d,b)};om.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split(";").pop();return qm(a,c,b)};om.verimatrixInitDataTransform=function(a,b,c){return rm(a,b,c)};om.initDataTransform=qm;
|
|
510
510
|
om.defaultGetContentId=pm;om.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"'}]},ra(b,2),F(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);ua(b);return b.return(!1)})};function tm(){}
|
|
511
511
|
function um(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Zf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){rd()&&"skd"==n&&(n=p.serverCertificate,p=pm(m),m=qm(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Yc(),minHdcpVersion:"",ignoreDuplicateInitData:!bd()};
|
|
512
|
-
(Yc()||id())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1
|
|
513
|
-
dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
512
|
+
(Yc()||id())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!ob()||bd()||ad()||Zc("Tizen 4")||Zc("Tizen 5")||Zc("Tizen 6")||dd()||cd()&&53===ed()||cd()&&68===ed()||id()||jd()||!(!fd()||fd()&&nd()||fd()&&Zc("Fuchsia"))||md()&&Wc()||(c="smooth",d=!0);d={retryParameters:Zf(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,
|
|
513
|
+
continueLoadingWhenPaused:!0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
514
514
|
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:vm,manifestPreprocessorTXml:wm,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"',
|
|
515
515
|
useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:ad()||bd()||dd()||id()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:vm,manifestPreprocessorTXml:wm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Zf(),failureCallback:function(m){return mm([m])},
|
|
516
516
|
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,
|
|
@@ -523,18 +523,18 @@ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth
|
|
|
523
523
|
drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(xm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
524
524
|
function ym(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 km(a,b,c||um(),d,"")}
|
|
525
525
|
function xm(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=Ie(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Be(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-
|
|
526
|
-
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!=Ud&&"image"!=c.type||b.push(c);return b}function vm(a){return mm([a],a)}function wm(a){return mm([a],a)}S("shaka.util.PlayerConfiguration",tm);tm.mergeConfigObjects=ym;tm.createDefault=um;function zm(a,b,c,d){kg.call(this);this.M=a;this.
|
|
526
|
+
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!=Ud&&"image"!=c.type||b.push(c);return b}function vm(a){return mm([a],a)}function wm(a){return mm([a],a)}S("shaka.util.PlayerConfiguration",tm);tm.mergeConfigObjects=ym;tm.createDefault=um;function zm(a,b,c,d){kg.call(this);this.M=a;this.T=b;this.Da=d.networkingEngine;this.A=c;this.o=null;this.va=0;this.ab=d.Ac;this.C=d.xi;this.bb=d.yi;this.g=d.config;this.j=this.D=this.h=null;this.fa=!1;this.G=d.Hi;this.na=!1;this.l=null;this.da=!1;this.i=this.B=null;this.aa=!1;this.K=new Map;this.ra=!1;this.Ea=d.Gi;this.Y=new $k;this.ea=new ag;this.m=new ag;this.N=null;this.s=!1;this.Fa=d.Ah;this.ma=null;this.Ca=d.zh;this.O=!1;this.I=[];this.H=[]}na(zm,kg);
|
|
527
527
|
function Am(a,b,c){(a=b?a.H:a.I)?a.push(c):c()}function Bm(a){if(a.H)for(var b=t(a.H),c=b.next();!c.done;c=b.next())c=c.value,c();a.H=null}function Cm(a,b){a.N=b;a.O=!0;if(a.I){b=t(a.I);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.I=null}q=zm.prototype;q.getStartTime=function(){return this.A};q.Fc=function(){return this.M};q.ff=function(){return this.h};function Dm(a){a.aa=!0;return a.i}function Em(a){a.na=!0;return a.G}q.getStats=function(){return this.Y};
|
|
528
528
|
function Fm(a){a.da=!0;return a.l}function Gm(a){a.ra=!0;return a.K}
|
|
529
529
|
q.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return ra(c,3),F(c,Hm(a),5);case 5:return Im(a),F(c,Jm(a),6);case 6:Im(a);a.o||(a.o=new Kf(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));
|
|
530
|
-
if(a.
|
|
530
|
+
if(a.Ca){var d=a.g.abrFactory;a.B=d;a.i=d();a.i.configure(a.g.abr)}if(a.Fa){d=a.h.presentationTimeline.V();var e=tf(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())a.ma=e,e.video&&Km(a,e.video,d),e.audio&&Km(a,e.audio,d)}return F(c,void 0,7);case 7:Im(a);a.m.resolve();ta(c,0);break;case 3:b=ua(c),a.m.reject(b),H(c)}})})()};q.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):kg.prototype.dispatchEvent.call(this,a)};
|
|
531
531
|
q.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 Im(a){if(a.s)throw new T(2,7,7003);}function Lm(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
|
|
532
|
-
function Hm(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:Lm(a,"manifest-parser");a.j||(a.
|
|
532
|
+
function Hm(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:Lm(a,"manifest-parser");a.j||(a.D=xi(a.M,a.T),a.j=a.D(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Lm(a,"manifest");if(a.h){f.u(2);break}return F(f,a.j.start(a.M,a.bb),3);case 3:a.h=f.h;case 2:return a.ea.resolve(),c=new U("manifestparsed",void 0),F(f,Promise.resolve(),4);case 4:a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);Mm(a.h);d=Date.now()/1E3;e=d-b;a.Y.H=e;H(f)}})}
|
|
533
533
|
function Jm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Lm(a,"drm-engine");a.va=Date.now()/1E3;a.l=a.ab();a.C.g=a.l;a.l.configure(a.g.drm);var h=a.C;b=Qe(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return F(g,Promise.resolve(),3);case 3:Im(a),a.dispatchEvent(c);case 2:return d=tf(a.h.variants),F(g,Nh(a.l,d,a.h.offlineSessionIds),4);case 4:return Im(a),F(g,ri(a.C,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return F(g,
|
|
534
534
|
Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}q.configure=function(a,b){a=lm(a,b);ym(this.g,a)};q.getConfiguration=function(){return Je(this.g)};
|
|
535
|
-
function Km(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 Ul(l,m,n||null,a.g.streaming.retryParameters,a.
|
|
535
|
+
function Km(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 Ul(l,m,n||null,a.g.streaming.retryParameters,a.Da)},!1),a.K.set(b.id,e),F(k,b.createSegmentIndex(),2);f=a.A||0;(h=(g=b.segmentIndex.Ib(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.Z&&dl(e,h.Z):cl(e,h.startTime));H(k)})}q.hj=function(){return this.m};
|
|
536
536
|
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.fa){e.u(2);break}return F(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return F(e,a.i.stop(),4);case 4:a.G&&!a.na&&a.G.release();if(!a.l||a.da){e.u(6);break}return F(e,a.l.destroy(),6);case 6:if(0<a.K.size&&!a.ra)for(b=t(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,jl(d);H(e)}})};
|
|
537
|
-
function Mm(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",zm);zm.prototype.destroy=zm.prototype.destroy;zm.prototype.waitForFinish=zm.prototype.hj;function Nm(a,b){kg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{yc:null,xc:Om,mc:function(d,e){return Pm(c,"enter",d,e)}},{yc:Qm,xc:Om,mc:function(d,e){return Pm(c,"enter",d,e)}},{yc:Rm,xc:Om,mc:function(d,e){return Pm(c,"enter",d,e)}},{yc:Om,xc:Qm,mc:function(d,e){return Pm(c,"exit",d,e)}},{yc:Om,xc:Rm,mc:function(d,e){return Pm(c,"exit",d,e)}},{yc:Qm,xc:Rm,mc:function(d,e){return Pm(c,"skip",d,e)}},{yc:Rm,xc:Qm,mc:function(d,e){return Pm(c,"skip",d,e)}}];this.h=new gb;this.h.
|
|
537
|
+
function Mm(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",zm);zm.prototype.destroy=zm.prototype.destroy;zm.prototype.waitForFinish=zm.prototype.hj;function Nm(a,b){kg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{yc:null,xc:Om,mc:function(d,e){return Pm(c,"enter",d,e)}},{yc:Qm,xc:Om,mc:function(d,e){return Pm(c,"enter",d,e)}},{yc:Rm,xc:Om,mc:function(d,e){return Pm(c,"enter",d,e)}},{yc:Om,xc:Qm,mc:function(d,e){return Pm(c,"exit",d,e)}},{yc:Om,xc:Rm,mc:function(d,e){return Pm(c,"exit",d,e)}},{yc:Qm,xc:Rm,mc:function(d,e){return Pm(c,"skip",d,e)}},{yc:Rm,xc:Qm,mc:function(d,e){return Pm(c,"skip",d,e)}}];this.h=new gb;this.h.F(this.i,
|
|
538
538
|
"regionremove",function(d){c.g.delete(d.region)})}na(Nm,kg);Nm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;kg.prototype.release.call(this)};Nm.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?Qm:a>d.endTime?Rm:Om;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.yc==e&&h.xc==f&&h.mc(d,b)}}};
|
|
539
539
|
function Pm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Qm=1,Om=2,Rm=3;function Sm(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new tc(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Tm[d])return m.return(e);f=0;g=sg([a],c);ra(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=ua(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return F(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
540
540
|
e.toLowerCase().split(";").shift():"")}})}
|
|
@@ -549,7 +549,7 @@ function nn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--
|
|
|
549
549
|
q.append=function(a){var b=ln(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={Ic:void 0},d=b.next())e.Ic=d.value,!a.some(function(f){return function(g){return g.startTime==f.Ic.startTime&&g.endTime==f.Ic.endTime&&g.text==f.Ic.payload?!0:!1}}(e))&&e.Ic.payload&&(d=nn(e.Ic))&&c.push(d);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):
|
|
550
550
|
c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(pn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
551
551
|
function pn(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",on);on.prototype.setTextVisibility=on.prototype.setTextVisibility;on.prototype.isTextVisible=on.prototype.isTextVisible;on.prototype.destroy=on.prototype.destroy;on.prototype.append=on.prototype.append;on.prototype.remove=on.prototype.remove;on.prototype.configure=on.prototype.configure;function qn(){}q=qn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",qn);qn.prototype.setTextVisibility=qn.prototype.setTextVisibility;qn.prototype.isTextVisible=qn.prototype.isTextVisible;qn.prototype.destroy=qn.prototype.destroy;qn.prototype.append=qn.prototype.append;qn.prototype.remove=qn.prototype.remove;qn.prototype.configure=qn.prototype.configure;function rn(){}function sn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",rn);rn.removeAllChildren=sn;function tn(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 Rc(function(){d.A.paused||
|
|
552
|
-
un(d)})).Ra(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new gb;this.j.
|
|
552
|
+
un(d)})).Ra(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new gb;this.j.F(document,"fullscreenchange",function(){un(d,!0)});this.j.F(this.A,"seeking",function(){un(d,!0)});this.j.F(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(){un(d,!0)}),this.o.observe(this.g));this.B=new Map}q=tn.prototype;q.configure=function(a){this.C&&this.C.Ra(a.captionsUpdatePeriod)};
|
|
553
553
|
q.append=function(a){var b=[].concat(x(this.h));a=t(mn(a));for(var c=a.next(),d={};!c.done;d={Me:void 0},c=a.next())d.Me=c.value,b.some(function(e){return function(f){return dc(f,e.Me)}}(d))||this.h.push(d.Me);un(this)};q.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()};
|
|
554
554
|
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});un(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function vn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
555
555
|
function wn(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.sh:null;l&&(g.push(l.Ne),l.tc&&g.push(l.tc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?vn(a,n)||(f=!0):(xn(a,k,e),l=a.i.get(k),n=l.sh,f=!0));0<k.nestedCues.length&&n&&wn(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,r){return p.startTime!=
|
|
@@ -567,7 +567,7 @@ a=zn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolu
|
|
|
567
567
|
c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Vb?f.width=c.size+"%":f.height=c.size+"%")}
|
|
568
568
|
function An(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 Bn(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",tn);tn.prototype.setTextVisibility=tn.prototype.setTextVisibility;
|
|
569
569
|
tn.prototype.isTextVisible=tn.prototype.isTextVisible;tn.prototype.remove=tn.prototype.remove;tn.prototype.destroy=tn.prototype.destroy;tn.prototype.append=tn.prototype.append;tn.prototype.configure=tn.prototype.configure;function Cn(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=ln(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");
|
|
570
|
-
break;case "right":g.push("align:right");break;case
|
|
570
|
+
break;case "right":g.push("align:right");break;case Sb: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 Dn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}Dn.prototype.configure=function(a){this.g=a};function En(a){a.i=!1;a.l=!0;a.j=!1}
|
|
571
571
|
function Fn(a,b,c){try{if(!a.g.enabled)return b;var d=Gn(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=Hn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=In;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=Jn;break a}e=void 0}d.ot=e;d.su=
|
|
572
572
|
!0;var f=Kn(d);return Ln(b,f)}catch(g){return $a("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Gn(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}}
|
|
573
573
|
function Mn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Gn(a));c.pr=a.h.fb();var e=c.ot===Nn||c.ot===In;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=On(a,c);if(d)d=Pn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=Kn(a);f&&(b.uris=b.uris.map(function(g){return Ln(g,f)}))}}}function On(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}
|
|
@@ -577,29 +577,29 @@ function Kn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round
|
|
|
577
577
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Pn(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=Kn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
578
578
|
function Ln(a,b){if(!b||a.includes("offline:"))return a;a=new tc(a);a.g.set("CMCD",b);return a.toString()}var Jn="m",Hn="a",Nn="v",In="av",Rn="i",Tn="c",Sn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Mj:"s",OTHER:"o"});function Xn(a){this.h=a;this.g=null}q=Xn.prototype;q.configure=function(a){this.h=a};q.Ag=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Yn)?1E3*this.g.get(Yn):null};q.yg=function(){return this.h.enabled&&this.g&&this.g.has(Zn)?1E3*this.g.get(Zn):null};q.$h=function(){return this.h.enabled&&this.g&&this.g.has($n)?this.g.get($n):null};q.ai=function(){return this.h.enabled&&this.g&&this.g.has(ao)?this.g.get(ao):null};
|
|
579
579
|
q.getBandwidthEstimate=function(a){var b=this.yg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function bo(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Xn);Xn.prototype.getBandwidthEstimate=Xn.prototype.getBandwidthEstimate;Xn.prototype.getRoundTripTime=Xn.prototype.ai;Xn.prototype.getResponseDelay=Xn.prototype.$h;Xn.prototype.getEstimatedThroughput=Xn.prototype.yg;
|
|
580
|
-
Xn.prototype.getMaxBitrate=Xn.prototype.Ag;var Zn="etp",Yn="mb",$n="rd",ao="rtt";function co(){this.g=null;this.h=[]}function eo(a,b){return O(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}co.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){kg.call(this);var c=this;this.l=fo;this.ce=this.h=null;this.ma=!1;this.pe=new gb;this.hd=new gb;this.m=new gb;this.Fa=new gb;this.bb=new gb;this.
|
|
581
|
-
this.$d=new qi(this.g,this.fa,null);this.je=[];this.s=null;this.
|
|
582
|
-
b(this);this.N=ho(this);this.ea=new Xn(this.g.cmsd);this.H=io(this);this.H.Pf(this.g.streaming.forceHTTP);this.H.Qf(this.g.streaming.forceHTTPS);this.Gb=this.aa=this.A=null;this.Be=!1;this.dg=new Rc(function(){return O(function(d){if(1==d.g)return c.aa?F(d,c.Sb(c.Gb,!0),3):d.u(0);if(4!=d.g)return F(d,c.load(c.aa),4);c.Be?c.Gb.pause():c.Gb.play();c.aa=null;c.Be=!1;H(d)})});jo&&(this.A=jo(),this.A.configure(this.g.ads),this.bb.
|
|
583
|
-
f.g){c.dg.stop();if(c.aa)return f.u(0);c.Gb=c.h;c.Be=c.h.ended;e=d.saveLivePosition||!1;return F(f,c.rg(!0,e),3)}c.aa=f.h;H(f)})}),this.bb.
|
|
580
|
+
Xn.prototype.getMaxBitrate=Xn.prototype.Ag;var Zn="etp",Yn="mb",$n="rd",ao="rtt";function co(){this.g=null;this.h=[]}function eo(a,b){return O(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}co.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){kg.call(this);var c=this;this.l=fo;this.ce=this.h=null;this.ma=!1;this.pe=new gb;this.hd=new gb;this.m=new gb;this.Fa=new gb;this.bb=new gb;this.D=this.C=this.B=this.H=null;this.se=0;this.Y=new co;this.na=this.ag=this.da=this.i=this.ab=this.G=this.j=this.Ub=this.K=this.eg=this.ea=this.N=this.ed=this.M=this.ge=this.I=this.Fb=null;this.Ea=!1;this.va=this.o=null;this.cg=1E9;this.pd=[];this.T=NaN;this.g=go(this);this.O=null;this.ye=-1;this.Ca=null;this.fa={width:Infinity,height:Infinity};
|
|
581
|
+
this.$d=new qi(this.g,this.fa,null);this.je=[];this.s=null;this.Da=new Kf(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.Db=this.g.preferredTextLanguage;this.od=this.g.preferredTextRole;this.nd=this.g.preferForcedSubs;this.ld=[];b&&
|
|
582
|
+
b(this);this.N=ho(this);this.ea=new Xn(this.g.cmsd);this.H=io(this);this.H.Pf(this.g.streaming.forceHTTP);this.H.Qf(this.g.streaming.forceHTTPS);this.Gb=this.aa=this.A=null;this.Be=!1;this.dg=new Rc(function(){return O(function(d){if(1==d.g)return c.aa?F(d,c.Sb(c.Gb,!0),3):d.u(0);if(4!=d.g)return F(d,c.load(c.aa),4);c.Be?c.Gb.pause():c.Gb.play();c.aa=null;c.Be=!1;H(d)})});jo&&(this.A=jo(),this.A.configure(this.g.ads),this.bb.F(this.A,"ad-content-pause-requested",function(d){var e;return O(function(f){if(1==
|
|
583
|
+
f.g){c.dg.stop();if(c.aa)return f.u(0);c.Gb=c.h;c.Be=c.h.ended;e=d.saveLivePosition||!1;return F(f,c.rg(!0,e),3)}c.aa=f.h;H(f)})}),this.bb.F(this.A,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.aa){var e=c.aa;e.A&&d&&(e.A+=d)}c.dg.$(.1)}),this.bb.F(this.A,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Gb?d.u(0):F(d,c.Sb(c.Gb,!0),0)})}));this.pe.F(window,"online",function(){ko(c);c.If()});this.ie=new Rc(function(){for(var d=Date.now()/1E3,e=!1,f=!0,g=t(c.i.variants),
|
|
584
584
|
h=g.next();!h.done;h=g.next())h=h.value,0<h.disabledUntilTime&&h.disabledUntilTime<=d&&(h.disabledUntilTime=0,e=!0),0<h.disabledUntilTime&&(f=!1);f&&c.ie.stop();e&&lo(c,!1,void 0,!1,!1)});this.ra=null;a&&(qb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Sb(a,!0))}na(X,kg);function mo(a){null!=a.K&&(Hj(a.K),a.K.release(),a.K=null)}
|
|
585
|
-
function no(a,b){b.lcevc.enabled?(mo(a),null==a.K&&(a.K=new Gj(a.h,a.eg,b.lcevc),a.
|
|
585
|
+
function no(a,b){b.lcevc.enabled?(mo(a),null==a.K&&(a.K=new Gj(a.h,a.eg,b.lcevc),a.C&&(a.C.T=a.K))):mo(a)}function oo(a,b){return new U(a,b)}q=X.prototype;
|
|
586
586
|
q.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.l==po)return c.return();mo(a);b=a.detach();a.l=po;return F(c,b,2);case 2:return F(c,a.Pe(),3);case 3:a.pe&&(a.pe.release(),a.pe=null);a.hd&&(a.hd.release(),a.hd=null);a.m&&(a.m.release(),a.m=null);a.Fa&&(a.Fa.release(),a.Fa=null);a.bb&&(a.bb.release(),a.bb=null);a.va=null;a.g=null;a.s=null;a.ce=null;a.N=null;a.ea=null;if(!a.H){c.u(4);break}return F(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.o&&(a.o.release(),a.o=null),
|
|
587
587
|
kg.prototype.release.call(a),H(c)}})};function qo(a,b){a.dispatchEvent(oo("onstatechange",(new Map).set("state",b)))}
|
|
588
|
-
q.Sb=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==po)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return F(g,c.detach(),2);case 2:return F(g,ro(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(qo(c,"attach"),e=function(){var h=so(c,!1);h&&to(c,h)},c.hd.
|
|
588
|
+
q.Sb=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==po)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return F(g,c.detach(),2);case 2:return F(g,ro(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(qo(c,"attach"),e=function(){var h=so(c,!1);h&&to(c,h)},c.hd.F(a,"error",e),c.h=a);if(!b||!Sc()||c.C){g.u(6);break}return F(g,uo(c),6);case 6:xa(g);c.Y.release();ya(g,0);break;case 5:return f=ua(g),F(g,c.detach(),10);case 10:throw f;
|
|
589
589
|
}})};q.Bh=function(a){this.eg=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==po)throw new T(2,7,7E3);return F(c,b.dc(!1,a),2)}if(3!=c.g)return F(c,ro(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.hd.Qa(),b.h=null),qo(b,"detach"),b.A&&!a&&b.A.release()}finally{b.Y.release()}H(c)})};function ro(a,b){var c;return O(function(d){return 1==d.g?(c=++a.se,F(d,eo(a.Y,b),2)):c!=a.se?(a.Y.release(),d.return(!0)):d.return(!1)})}
|
|
590
590
|
q.dc=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,p;return O(function(r){switch(r.g){case 1:return c.l!=po&&(c.l=fo),F(r,ro(c,"unload"),2);case 2:if(r.h)return r.return();sa(r,3);c.Ea=!1;qo(c,"unload");a&&!Sc()&&(a=!1);mo(c);d=c.ld.map(function(u){return u()});c.ld=[];return F(r,Promise.all(d),5);case 5:c.dispatchEvent(oo("unloading"));c.ed&&(c.ed.release(),c.ed=null);c.h&&(c.m.Qa(),c.Fa.Qa());c.ie.stop();c.Fb&&(c.Fb.release(),c.Fb=null);c.ge&&(c.ge.stop(),c.ge=null);
|
|
591
|
-
if(!c.
|
|
591
|
+
if(!c.G){r.u(6);break}return F(r,c.G.stop(),7);case 7:c.G=null,c.ab=null;case 6:if(!c.o){r.u(8);break}return F(r,c.o.stop(),8);case 8:if(!c.j){r.u(10);break}return F(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.D&&(c.D.release(),c.D=null);if(!rd("webkit")||!c.B){r.u(12);break}return F(r,c.B.destroy(),13);case 13:c.B=null;case 12:if(!c.C){r.u(14);break}return F(r,c.C.destroy(),15);case 15:c.C=null;case 14:if(c.A&&!b)c.A.onAssetUnload();c.aa&&!b&&(c.aa.destroy(),c.aa=
|
|
592
592
|
null);b||c.dg.stop();c.N&&En(c.N);c.ea&&(c.ea.g=null);c.h&&sn(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.B){r.u(16);break}return F(r,c.B.destroy(),17);case 17:c.B=null;case 16:c.ra&&c.da!=c.ra.Fc()&&(c.ra.s||c.ra.destroy(),c.ra=null);c.da=null;c.ag=null;c.M=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=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=
|
|
593
|
-
m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(cf={},Pc.clear());c.i=null;c.s=new $k;c.bg=null;c.
|
|
593
|
+
m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(cf={},Pc.clear());c.i=null;c.s=new $k;c.bg=null;c.Ca=null;c.O=null;c.ye=-1;c.pd=[];c.T=NaN;vo(c);case 3:xa(r);c.Y.release();ya(r,4);break;case 4:if(a&&Sc()&&!c.C&&c.h)return F(r,uo(c),0);r.u(0)}})};q.gj=function(a){this.na=a};
|
|
594
594
|
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==po)throw new T(2,7,7E3);e=null;f="";a instanceof zm?(e=a,f=e.Fc()||""):f=a||"";return F(A,eo(d.Y,"load"),2);case 2:d.Y.release();if(!d.h)throw new T(2,7,7002);if(!d.da){A.u(3);break}d.da=f;return F(A,d.dc(!1),3);case 3:g=++d.se;h=function(){return O(function(z){if(1==z.g)return d.se==g?z.u(0):e?F(z,e.destroy(),3):z.u(3);throw new T(2,7,7E3);})};k=function(z,D){return O(function(y){switch(y.g){case 1:return sa(y,
|
|
595
|
-
2),F(y,eo(d.Y,D),4);case 4:return F(y,h(),5);case 5:return F(y,z(),6);case 6:return F(y,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:xa(y),d.Y.release(),ya(y,0)}})};ra(A,5,6);null==b&&e&&(b=e.getStartTime());d.na=b;d.Ea=!1;d.dispatchEvent(oo("loading"));if(e){c=e.
|
|
596
|
-
A.h)?(Cm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new $k;case 11:return m=!e,n=Date.now()/1E3,d.s=e?e.getStats():new $k,d.da=f,d.ag=c||null,m?F(A,k(function(){return O(function(z){return F(z,yo(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):F(A,k(function(){return O(function(z){if(1==z.g)return F(z,Promise.race([e.ea,e.m]),2);d.ab=e.
|
|
597
|
-
uo(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return F(A,k(function(){return O(function(z){return F(z,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.$d=e.C;d.
|
|
595
|
+
2),F(y,eo(d.Y,D),4);case 4:return F(y,h(),5);case 5:return F(y,z(),6);case 6:return F(y,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:xa(y),d.Y.release(),ya(y,0)}})};ra(A,5,6);null==b&&e&&(b=e.getStartTime());d.na=b;d.Ea=!1;d.dispatchEvent(oo("loading"));if(e){c=e.T;A.u(8);break}if(c){A.u(8);break}return F(A,k(function(){return O(function(z){if(1==z.g)return F(z,wo(d,f),2);c=z.h;H(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Cm(e,d);d.s=e.getStats();A.u(11);break}return F(A,xo(d,f,b,c,!0),12);case 12:(e=
|
|
596
|
+
A.h)?(Cm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new $k;case 11:return m=!e,n=Date.now()/1E3,d.s=e?e.getStats():new $k,d.da=f,d.ag=c||null,m?F(A,k(function(){return O(function(z){return F(z,yo(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):F(A,k(function(){return O(function(z){if(1==z.g)return F(z,Promise.race([e.ea,e.m]),2);d.ab=e.D;var D=e;D.fa=!0;d.G=D.j;d.i=e.ff();H(z)})},"waitForFinish"),15);case 15:if(d.C){A.u(16);break}return F(A,k(function(){return O(function(z){return F(z,
|
|
597
|
+
uo(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return F(A,k(function(){return O(function(z){return F(z,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.$d=e.C;d.G&&d.G.setMediaElement&&d.h&&d.G.setMediaElement(d.h);d.ed=Em(e);d.Ub=e.Ea;if(p=e.o)d.Da=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(zo(d),d.configure("manifest.disableVideo",!0));d.B=Fm(e);return F(A,k(function(){return O(function(z){return F(z,d.B.Sb(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.B)||d.va&&
|
|
598
598
|
d.va==r||(d.o=Dm(e),d.va=e.B,"function"!=typeof d.o.setMediaElement&&(qb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=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."),
|
|
599
599
|
d.o.trySuggestStreams=function(){})),u=Gm(e),v=e.ma,F(A,k(function(){return O(function(z){return F(z,Ao(d,n,v,u),0)})},"loadInner_"),20);case 20:Bm(e);A.u(14);break;case 21:return F(A,k(function(){return O(function(z){return F(z,Bo(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(oo("loaded"));case 6:xa(A);if(!e){A.u(23);break}return F(A,e.destroy(),23);case 23:d.ra=null;ya(A,0);break;case 5:w=ua(A);if(!w||7E3==w.code){A.u(25);break}return F(A,d.dc(!1),25);case 25:throw w;}})};
|
|
600
600
|
function zo(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})}q.cj=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?F(e,Co(c),2):3!=e.g?(d=e.h,F(e,c.dc(a,b),3)):e.return(d)})};
|
|
601
601
|
q.rg=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?F(e,Co(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})};
|
|
602
|
-
function Co(a,b){b=void 0===b?!1:b;var c,d;return O(function(e){if(1==e.g){c=null;if(!(a.i&&a.
|
|
602
|
+
function Co(a,b){b=void 0===b?!1:b;var c,d;return O(function(e){if(1==e.g){c=null;if(!(a.i&&a.G&&a.ab&&a.da))return e.u(2);d=a.h.currentTime;a.V()&&!b&&(d=null);return F(e,Do(a,a.da,d,a.ag,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.je.push(c);a.G&&a.G.setMediaElement&&a.G.setMediaElement(null);var f=c,g=a.G,h=a.ab;f.h=a.i;f.j=g;f.D=h;f=c;g=a.va;f.i=a.o;f.B=g;c.o=a.Da;c.start();a.i=null;a.G=null;a.ab=null;a.o=null;a.va=null}return e.return(c)})}
|
|
603
603
|
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return F(f,xo(d,a,b,c),2);(e=f.h)?e.start():to(d,new T(2,7,7005));return f.return(e)})};q.Pe=function(){var a=this,b,c,d,e;return O(function(f){b=[];c=t(a.je);for(d=c.next();!d.done;d=c.next())e=d.value,e.s||b.push(e.destroy());a.je=[];return F(f,Promise.all(b),0)})};
|
|
604
604
|
function xo(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 d?l.u(2):F(l,wo(a,b),3);2!=l.g&&(d=l.h);if(f=Eo(a,d))return l.return(null);g=!1;h=!0;e&&(a.o&&a.va==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=Do(a,b,c,d||null,!e,g,h);e||(k=k.then(function(m){a.je.push(m);return m}));return l.return(k)})}
|
|
605
605
|
function Do(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,v,w,A,z,D,y,B;return O(function(C){if(1==C.g)return h=null,k=Je(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.O&&h.s?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(E,G){l()?h.configure(E,G):a.configure(E,G)},Infinity!=a.fa.width||Infinity!=a.fa.height?C.u(2):F(C,sd(),3);2!=C.g&&(p=C.h,a.fa.width=p.width,a.fa.height=p.height);r=new qi(k,a.fa,null);u={networkingEngine:a.H,
|
|
@@ -608,27 +608,27 @@ new U("regionadd",new Map([["region",E]])),G.dispatchEvent(E))},onEvent:function
|
|
|
608
608
|
(new Map).set("isLive",a.V());h.dispatchEvent(oo("manifestupdated",E));Am(h,!1,function(){if(a.A)a.A.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(E,G,L,K){var I=E;if("com.apple.hls.interstitial"==E&&(I="com.apple.quicktime.HLS",E={startTime:G,endTime:L,values:K},a.A))a.A.onInterstitialMetadata(a,a.h,E);K=t(K);E=K.next();for(var J={};!E.done;J={Rg:void 0},E=K.next())J.Rg=E.value,Am(h,!1,function(M){return function(){Go(a,G,L,I,M.Rg)}}(J))},
|
|
609
609
|
disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)}};v=new ml(function(){return a.Pb()});v.addEventListener("regionadd",function(E){var G=E.region;Ho(a,"timelineregionadded",G,h);Am(h,!1,function(){if(a.A)a.A.onDashTimedMetadata(G)})});w=null;k.streaming.observeQualityChanges&&(w=new nl(function(){return a.wb()}),w.addEventListener("qualitychange",function(E){Io(a,E.quality,E.position)}),w.addEventListener("audiotrackchange",function(E){Io(a,E.quality,E.position,!0)}));
|
|
610
610
|
A=!0;z={Mb:a.H,onError:function(E){return h.onError(E)},de:function(E){Am(h,!0,function(){a:{var G=E,L=oo("keystatuschanged");a.dispatchEvent(L);var K=Object.keys(G);1==K.length&&""==K[0]&&(K=["00"],G={"00":G[""]});L=1==K.length&&"00"==K[0];var I=!1;if(K.length){K=t(a.i.variants);for(var J=K.next();!J.done;J=K.next()){J=J.value;var M=[];J.audio&&M.push(J.audio);J.video&&M.push(J.video);M=t(M);for(var N=M.next();!N.done;N=M.next()){var P=N.value;N=J.allowedByKeySystem;if(P.keyIds.size){J.allowedByKeySystem=
|
|
611
|
-
!0;P=t(P.keyIds);for(var R=P.next();!R.done;R=P.next())if(R=R.value,(R=G[L?"00":R])||a.B.
|
|
611
|
+
!0;P=t(P.keyIds);for(var R=P.next();!R.done;R=P.next())if(R=R.value,(R=G[L?"00":R])||a.B.D)J.allowedByKeySystem=J.allowedByKeySystem&&!!R&&!vi.includes(R)}N!=J.allowedByKeySystem&&(I=!0)}}}if(I&&(Jo(a),!Ko(a)))break a;(G=a.j.j)&&!G.allowedByKeySystem&&lo(a)}})},onExpirationUpdated:function(E,G){var L=oo("expirationupdated");h.dispatchEvent(L);if((L=h.j)&&L.onExpirationUpdated)L.onExpirationUpdated(E,G)},onEvent:function(E){h.dispatchEvent(E);"drmsessionupdate"==E.type&&A&&(A=!1,E=Date.now()/1E3-h.va,
|
|
612
612
|
(a.s||h.getStats()).j=E,a.K&&Hj(a.K))}};D=io(a,l);rg(a.H,D);y=function(){return a.Ac(z)};B={config:k,yi:u,Hi:v,Gi:w,Ac:y,xi:r,networkingEngine:D,Ah:e,zh:g};h=new zm(b,d,c,B);return C.return(h)})}function wo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,F(e,Sm(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&gd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
613
613
|
function Eo(a,b){if(!Sc())return!0;if(b){if(""==(a.h||Uc()).canPlayType(b))return!1;if(!(Sc()&&b in yi))return!0;if(ke(b))return gd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls}return!1}
|
|
614
|
-
function uo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return qo(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.bg=b,d=Lo(a.h,c,{Sh:function(){return a.keySystem()},onMetadata:function(h,k,l){Mo(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.
|
|
615
|
-
function Ao(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L;return O(function(K){switch(K.g){case 1:qo(a,"load"),e=a.h,a.I=new Rk({Kd:function(){return e.playbackRate},kc:function(){return e.defaultPlaybackRate},Rf:function(I){e.playbackRate=I},Mg:function(I){e.currentTime+=I}}),f=function(){return No(a)},g=function(){return Oo(a)},a.m.
|
|
616
|
-
Po(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.o.init(function(I,J,M){a.i&&a.j&&I!=a.j.j&&Qo(a,I,!0,void 0===J?!1:J,void 0===M?0:M)}),a.o.setMediaElement(e),a.o.setCmsdManager(a.ea),a.j=Ro(a),a.j.configure(a.g.streaming),a.l=So,e.textTracks&&a.m.
|
|
617
|
-
n.next();!p.done;p=n.next())(r=p.value)&&!r.segmentIndex&&m.push(r.createSegmentIndex());if(!(0<m.length)){K.u(4);break}return F(K,Promise.all(m),4);case 4:if(!k||0!=k.disabledUntilTime){K.u(2);break}if(a.
|
|
618
|
-
Po(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Gl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(I){a.
|
|
619
|
-
y=a.Gc().find(function(I){return I.active}),y||((B=uf(a.i.textStreams,a.Db,a.od,a.nd)[0]||null)&&Zk(a.s.h,B,!0),h&&(B?(Yo(a,h.audio,B)&&(a.ma=!0),a.ma&&a.
|
|
620
|
-
a.g.streaming.vodDynamicPlaybackRate)E=function(){return ap(a)},a.m.
|
|
621
|
-
if(a.A)a.A.onManifestUpdated(C);a.Ea=!0;a.m.
|
|
614
|
+
function uo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return qo(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.bg=b,d=Lo(a.h,c,{Sh:function(){return a.keySystem()},onMetadata:function(h,k,l){Mo(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ea=f,F(g,d.M,2);a.C=d;H(g)})}
|
|
615
|
+
function Ao(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L;return O(function(K){switch(K.g){case 1:qo(a,"load"),e=a.h,a.I=new Rk({Kd:function(){return e.playbackRate},kc:function(){return e.defaultPlaybackRate},Rf:function(I){e.playbackRate=I},Mg:function(I){e.currentTime+=I}}),f=function(){return No(a)},g=function(){return Oo(a)},a.m.F(e,"playing",f),a.m.F(e,"pause",f),a.m.F(e,"ended",f),a.m.F(e,"ratechange",g),no(a,a.g),a.Db=a.g.preferredTextLanguage,a.od=a.g.preferredTextRole,a.nd=a.g.preferForcedSubs,
|
|
616
|
+
Po(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.o.init(function(I,J,M){a.i&&a.j&&I!=a.j.j&&Qo(a,I,!0,void 0===J?!1:J,void 0===M?0:M)}),a.o.setMediaElement(e),a.o.setCmsdManager(a.ea),a.j=Ro(a),a.j.configure(a.g.streaming),a.l=So,e.textTracks&&a.m.F(e.textTracks,"addtrack",function(I){if(I.track)switch(I=I.track,I.kind){case "chapters":To(a,I)}}),a.dispatchEvent(oo("streaming")),h=c;case 2:(l=a.j.j)||h||(h=Ko(a)?a.o.chooseVariant():null);m=[];k=l||h;n=t([k.video,k.audio]);for(p=
|
|
617
|
+
n.next();!p.done;p=n.next())(r=p.value)&&!r.segmentIndex&&m.push(r.createSegmentIndex());if(!(0<m.length)){K.u(4);break}return F(K,Promise.all(m),4);case 4:if(!k||0!=k.disabledUntilTime){K.u(2);break}if(a.G&&a.G.onInitialVariantChosen)a.G.onInitialVariantChosen(k);a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&Ya("Low-latency 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.");
|
|
618
|
+
Po(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Gl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(I){a.D=Uo(a,I);a.Fb=Vo(a,I);Wo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.na);if(l){K.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){K.u(8);break}v=a.i.presentationTimeline;w=a.na||a.h.currentTime;A=v.Jb();z=v.yb();w<A?w=A:w>z&&(w=z);return F(K,Xo(h,w),9);case 9:D=K.h,u(D);case 8:Qo(a,h,!0,!1,0);case 7:return a.D.ready(),
|
|
619
|
+
y=a.Gc().find(function(I){return I.active}),y||((B=uf(a.i.textStreams,a.Db,a.od,a.nd)[0]||null)&&Zk(a.s.h,B,!0),h&&(B?(Yo(a,h.audio,B)&&(a.ma=!0),a.ma&&a.C.D.setTextVisibility(!0),Zo(a)):a.ma=!1),B&&(a.g.streaming.alwaysStreamText||a.qf())&&Pl(a.j,B)),F(K,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),$o(a));Jo(a);Ko(a);a.i.variants.some(function(I){return I.primary});if((C=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||
|
|
620
|
+
a.g.streaming.vodDynamicPlaybackRate)E=function(){return ap(a)},a.m.F(e,"timeupdate",E);C||(G=function(){return bp(a)},a.m.F(e,"timeupdate",G),bp(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(L=function(){var I;return O(function(J){if(1==J.g){I=a.h.duration-a.h.currentTime;if(isNaN(I)||!(I<=a.g.streaming.preloadNextUrlWindow))return J.u(0);a.m.kb(e,"timeupdate",L);return F(J,a.preload(a.i.nextUrl),4)}a.ra=J.h;H(J)})},a.m.F(e,"timeupdate",L)),a.m.F(e,"ended",function(){a.load(a.ra||a.i.nextUrl)})));
|
|
621
|
+
if(a.A)a.A.onManifestUpdated(C);a.Ea=!0;a.m.ka(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(K)}})}
|
|
622
622
|
function yo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Wd,d=Date.now()/1E3,e=!0,a.B=a.Ac({Mb:a.H,onError:function(k){to(a,k)},de:function(){},onExpirationUpdated:function(){var k=oo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
623
623
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?ie(b):"",codecs:b?je(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ha,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(Zd(g.mimeType,
|
|
624
624
|
g.codecs)),b.startsWith("audio/")?(g.type=c.X,f.audio=g):f.video=g,a.B.aa=!0,F(h,Nh(a.B,[f],[]),2)):F(h,a.B.Sb(a.h),0)})}
|
|
625
|
-
function Bo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g)return qo(a,"src-equals"),d=a.h,a.
|
|
626
|
-
"ratechange",h),"none"!=d.preload&&a.m.
|
|
627
|
-
a.m.
|
|
628
|
-
a.m,function(){var w;return O(function(A){if(1==A.g)return ep(a),w=fp(a),w.find(function(z){return"disabled"!=z.mode})?(0<w.length&&(a.ma=!0),A.u(2)):F(A,new Promise(function(z){a.m.
|
|
629
|
-
l.resolve()),a.m.
|
|
625
|
+
function Bo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g)return qo(a,"src-equals"),d=a.h,a.D=new Hk(d),e=!1,a.ld.push(function(){e=!0}),null!=a.na&&a.D.De(a.na),a.I=new Rk({Kd:function(){return d.playbackRate},kc:function(){return d.defaultPlaybackRate},Rf:function(w){d.playbackRate=w},Mg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,Wo(a,d,f),g=function(){return No(a)},h=function(){return Oo(a)},a.m.F(d,"playing",g),a.m.F(d,"pause",g),a.m.F(d,"ended",g),a.m.F(d,
|
|
626
|
+
"ratechange",h),"none"!=d.preload&&a.m.ka(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.F(d.audioTracks,"addtrack",function(){return Jo(a)}),a.m.F(d.audioTracks,"removetrack",function(){return Jo(a)}),a.m.F(d.audioTracks,"change",function(){return Jo(a)})),d.textTracks&&(a.m.F(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":cp(a,w);break;case "chapters":To(a,w);break;default:Jo(a)}}),a.m.F(d.textTracks,"removetrack",function(){return Jo(a)}),
|
|
627
|
+
a.m.F(d.textTracks,"change",function(){return Jo(a)})),k=Fn(a.N,a.da,c),!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd)),d.src=k,a.C&&window.ManagedMediaSource&&(d.disableRemotePlayback=!1),($c()||cd())&&d.load(),"none"!=d.preload&&!d.autoplay&&ke(c)&&ld()&&d.load(),a.l=dp,a.dispatchEvent(oo("streaming")),l=new ag,yk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.D.ready();
|
|
628
|
+
l.resolve()}),yk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(A){if(1==A.g)return ep(a),w=fp(a),w.find(function(z){return"disabled"!=z.mode})?(0<w.length&&(a.ma=!0),A.u(2)):F(A,new Promise(function(z){a.m.ka(d.textTracks,"change",z);(new Rc(z)).$(1)}),2);if(e)return A.return();gp(a);H(A)})}),d.error?l.reject(so(a)):"none"==d.preload&&(Ya('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.'),
|
|
629
|
+
l.resolve()),a.m.ka(d,"error",function(){l.reject(so(a))}),m=new Promise(function(w,A){(new Rc(A)).$(a.g.streaming.loadTimeout)}),F(v,Promise.race([l,m]),2);if((n=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return ap(a)},a.m.F(d,"timeupdate",p);n||(r=function(){return bp(a)},a.m.F(d,"timeupdate",r),bp(a));a.A&&(a.A.onManifestUpdated(n),n&&(u=a.Pb().end,a.m.F(d,"progress",function(){var w=a.Pb().end;
|
|
630
630
|
u!=w&&(a.A.onManifestUpdated(a.V()),u=w)})));a.Ea=!0;H(v)})}function ep(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Zg(b,a.g.preferredVariantRole)}function gp(a){var b=a.g.preferredTextLanguage;""!=b&&a.Lf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
631
|
-
function cp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.
|
|
631
|
+
function cp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.F(b,"cuechange",function(){if(b.activeCues){for(var d=[],e=t(b.activeCues),f=e.next(),g={};!f.done;g={Ta:void 0},f=e.next()){g.Ta=f.value;Go(a,g.Ta.startTime,g.Ta.endTime,g.Ta.type,g.Ta.value);if(a.A)a.A.onCueMetadataChange(g.Ta.value);"com.apple.quicktime.HLS"==g.Ta.type&&null!=g.Ta.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.Ta.startTime&&k.endTime==h.Ta.endTime}}(g)),f||(f={startTime:g.Ta.startTime,endTime:g.Ta.endTime,
|
|
632
632
|
values:[]},d.push(f)),f.values.push(g.Ta.value))}d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.A&&(e.values.push({key:"CUE",description:"",data:"ONCE",mimeType:null,pictureType:null}),a.A.onInterstitialMetadata(a,a.h,e))}});var c=(new Rc(function(){var d=hp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).vc().$(.5);a.ld.push(function(){c.stop()})}}
|
|
633
633
|
function Mo(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof 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())Go(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Go(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(oo("metadata",b))}
|
|
634
634
|
function To(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Rc(function(){b.mode="hidden"})).vc().$(.5);a.ld.push(function(){c.stop()})}}q.Li=function(){for(var a=this.Y;a.g;)a.release()};q.Ac=function(a){return new Gh(a)};
|
|
@@ -636,14 +636,14 @@ function io(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}funct
|
|
|
636
636
|
bo(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],bo(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(oo("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)Mn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
637
637
|
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Mn(h,f,{ot:Jn,su:!h.i})}}catch(N){$a("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case yg: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.V()?"l":"v"};n.ot=Qn(k);var p=n.ot===Nn||n.ot===Hn||n.ot===In||n.ot===Sn,r=k.stream;if(r){var u=h.h.fb();if(p&&(n.bl=Un(h,r.type),n.ot!==Sn)){var v=Vn(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);
|
|
638
638
|
if(r.segmentIndex&&m){var w=r.segmentIndex.Ib(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Pb(m.L(),A.L())){var z=A.L()[0],D=f.uris[0],y=new URL(z),B=new URL(D);if(y.origin!==B.origin)var C=z;else{for(var E=y.pathname.split("/").slice(1),G=B.pathname.split("/").slice(1,-1);E[0]===G[0];)E.shift(),G.shift();for(;G.length;)G.shift(),E.unshift("..");C=E.join("/")}n.nor=C}if((A.Ha||A.ta)&&(m.Ha!=A.Ha||m.ta!=A.ta)){var L=A.Ha+"-";A.ta&&(L+=A.ta);n.nrr=L}}}var K=h.h.fb()||1,I=Vn(h,r.type)||
|
|
639
|
-
500,J=r.bandwidth;var M=J?J*(m.endTime-m.startTime)/1E3/(I/K/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==Sn&&(n.tb=Wn(h,n.ot)/1E3);Mn(h,f,n)}}catch(N){$a("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:Mn(h,f,{ot:"k"});break;case 4:Mn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.
|
|
639
|
+
500,J=r.bandwidth;var M=J?J*(m.endTime-m.startTime)/1E3/(I/K/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==Sn&&(n.tb=Wn(h,n.ot)/1E3);Mn(h,f,n)}}catch(N){$a("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:Mn(h,f,{ot:"k"});break;case 4:Mn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.G)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.s;g&&(g.fc=isNaN(g.fc)?f:g.fc+f,0===e&&(g.Ig=f))}})}
|
|
640
640
|
function Uo(a,b){return new Ik(a.h,a.i,a.g.streaming,b,function(){a.Fb&&Uk(a.Fb,!0);a.j&&a.j.Rc();a.M&&ip(a)},function(c){return a.dispatchEvent(c)})}
|
|
641
641
|
function Vo(a,b){b=new Nm(a.ed,a.V()||0<b);b.addEventListener("enter",function(d){Ho(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ho(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ho(a,"timelineregionenter",e),Ho(a,"timelineregionexit",e))});var c=new Tk(a.h);c.g.add(b);a.Ub&&c.g.add(a.Ub);return c}
|
|
642
|
-
function Wo(a,b,c){a.M=new Uf;a.M.g=Wf;Xf(a.M,c,Math.min(.5,c/2));vo(a);a.ge=(new Rc(function(){ip(a)})).Ra(.25);a.m.
|
|
643
|
-
function ip(a){switch(a.l){case dp:if(a.h.ended)var b=!0;else{var c=Ki(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case So:a:if(a.h.ended||Sj(a.
|
|
642
|
+
function Wo(a,b,c){a.M=new Uf;a.M.g=Wf;Xf(a.M,c,Math.min(.5,c/2));vo(a);a.ge=(new Rc(function(){ip(a)})).Ra(.25);a.m.F(b,"waiting",function(){return ip(a)});a.m.F(b,"stalled",function(){return ip(a)});a.m.F(b,"canplaythrough",function(){return ip(a)});a.m.F(b,"progress",function(){return ip(a)})}
|
|
643
|
+
function ip(a){switch(a.l){case dp:if(a.h.ended)var b=!0;else{var c=Ki(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case So:a:if(a.h.ended||Sj(a.C))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.Xb();var d=Ki(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Oi(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Vf:Wf;c.g=d;(b=b!=d)&&d===Vf&&(c.h=Date.now());b&&vo(a)}function Lo(a,b,c,d){return new Jj(a,b,c,d)}
|
|
644
644
|
function ho(a){return new Dn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},wb:function(){return a.wb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},fb:function(){return a.fb()},xb:function(){return a.xb()},lc:function(){return a.lc()},V:function(){return a.V()}},a.g.cmcd)}
|
|
645
|
-
function Ro(a){return new Al(a.i,{bd:function(){return a.
|
|
646
|
-
(new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(oo("segmentappended",d))},Ci:function(b,c){(c=c.Jc)&&a.Ub&&pl(a.Ub,c,b)},kg:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.
|
|
645
|
+
function Ro(a){return new Al(a.i,{bd:function(){return a.D?a.D.xd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},fb:function(){return a.fb()},ba:a.C,Mb:a.H,onError:function(b){return to(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Di:function(){a.G&&a.G.update&&a.G.update()},Af:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Ud){if(a.D){a.D.Ng();var f=Tj(a.C,e);!a.V()&&a.h.paused&&null!=f&&0<f&&a.D.xd()<f&&a.D.De(f)}ip(a)}d=
|
|
646
|
+
(new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(oo("segmentappended",d))},Ci:function(b,c){(c=c.Jc)&&a.Ub&&pl(a.Ub,c,b)},kg:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.D&&["audio","video"].includes(b)){b=new Yg(zb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;Wh(d,"cenc",c);d=
|
|
647
647
|
d.l}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){Mo(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
|
|
648
648
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=lm(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);
|
|
649
649
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(qb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&gd(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){qb("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled=
|
|
@@ -656,14 +656,14 @@ a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if
|
|
|
656
656
|
(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==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=
|
|
657
657
|
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&&(a.drm.retryParameters.baseDelay=100));c=ym(this.g,a,
|
|
658
658
|
go(this));jp(this);return c};
|
|
659
|
-
function jp(a){a.$d=new qi(a.g,a.fa,a.B);if(a.
|
|
660
|
-
a.bg!=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.
|
|
659
|
+
function jp(a){a.$d=new qi(a.g,a.fa,a.B);if(a.G){var b=Je(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.G.configure(b)}a.B&&a.B.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=po&&si(a.$d,a.i)&&Jo(a)}catch(f){to(a,f)}a.o&&Ko(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||lo(a)}a.H&&(a.H.Pf(a.g.streaming.forceHTTP),a.H.Qf(a.g.streaming.forceHTTPS));if(a.C)if(a.C.configure(a.g.mediaSource),a.C.ea=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
660
|
+
a.bg!=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.C,e=d.D;d.D=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.bg=b;a.j&&(b=a.j,(c=b.i.get(Ud))&&Nl(b,c.stream,!0,0,!0))}else b=a.C.D,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(),$o(a));a.M&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
661
661
|
Xf(a.M,b,Math.min(.5,b/2)));a.i&&Po(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.ea&&a.ea.configure(a.g.cmsd)}q.getConfiguration=function(){var a=go(this);ym(a,this.g,go(this));return a};q.Bg=function(){var a=go(this);ym(a,this.g,go(this));return nm(this.g,go(this))};
|
|
662
662
|
q.wg=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.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Pi=function(){for(var a in this.g)delete this.g[a];ym(this.g,go(this),go(this));jp(this)};q.zg=function(){return this.l};q.gf=function(){return this.i?this.i.type:null};q.Wh=function(){return this.h};
|
|
663
663
|
q.xb=function(){return this.H};q.Fc=function(){return this.da};q.vg=function(){return this.A?this.A:null};q.V=function(){return this.i?this.i.presentationTimeline.V():this.h&&this.h.src?Infinity==this.h.duration:!1};q.nc=function(){return this.i?this.i.presentationTimeline.nc():!1};q.mi=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};
|
|
664
664
|
q.Pb=function(){if(this.i){if(!this.Ea&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Jb(),end:a.yb()}}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}};q.ji=function(){this.V()&&(this.h.currentTime=this.Pb().end)};q.ni=function(){return this.Ea};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.B?this.B.g:null};
|
|
665
665
|
q.ad=function(){return this.B?this.B.ad():Infinity};q.ef=function(){return this.B?this.B.ef():[]};q.Jd=function(){return this.B?this.B.Jd():{}};q.nf=function(){return this.M?this.M.g==Wf:!1};q.fb=function(){return this.h?this.I?this.I.i:1:0};
|
|
666
|
-
q.vd=function(a,b){var c=this;b=void 0===b?!0:b;0==a?Ya("A trick play rate of 0 is unsupported!"):(this.Fa.Qa(),this.h.paused&&this.h.play(),this.I.set(a),this.l==So&&(this.o.playbackRateChanged(a),Ml(this.j,b&&1<Math.abs(a))),this.V()&&this.Fa.
|
|
666
|
+
q.vd=function(a,b){var c=this;b=void 0===b?!0:b;0==a?Ya("A trick play rate of 0 is unsupported!"):(this.Fa.Qa(),this.h.paused&&this.h.play(),this.I.set(a),this.l==So&&(this.o.playbackRateChanged(a),Ml(this.j,b&&1<Math.abs(a))),this.V()&&this.Fa.F(this.h,"timeupdate",function(){var d=c.h.currentTime,e=c.Pb(),f=c.g.streaming.safeSeekOffset;0<a?Math.floor(d)>=Math.floor(e.end)&&c.Uc():Math.floor(d)<=Math.floor(e.start+f)&&c.Uc()}))};
|
|
667
667
|
q.Uc=function(){var a=this.I.kc();this.l==dp&&this.I.set(a);this.l==So&&(this.I.set(a),this.o.playbackRateChanged(a),Ml(this.j,!1));this.Fa.Qa()};
|
|
668
668
|
q.lc=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,sf(e)){var f=jf(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 rf(g)}):[]};
|
|
669
669
|
q.Gc=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=kf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?fp(this).map(function(f){return of(f)}):[]};q.Qh=function(){var a=this.pd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return lf(b)})};
|
|
@@ -672,30 +672,30 @@ function kp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{hc:parseInt(a[1],10),rows:par
|
|
|
672
672
|
q.Dg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y;return O(function(B){if(1==B.g){if(c.l!=So&&c.l!=dp)return B.return(null);d=c.pd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(C){return C.id==a}))?e.segmentIndex?B.u(2):F(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=kp(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.hc;n=l/h.rows;p=h.hc*h.rows;r=g.j-g.startTime;
|
|
673
673
|
u=g.B||r/p;v=g.startTime;A=w=0;1<p&&(z=Math.floor((b-g.startTime)/u),v=g.startTime+z*u,w=z%h.hc*m,A=Math.floor(z/h.hc)*n);D=!1;if(y=g.A)D=!0,n=y.height,w=y.positionX,A=y.positionY,m=y.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.L(),width:m,sprite:D})})};
|
|
674
674
|
q.$g=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),Pl(this.j,b),lp(this),this.Db=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=fp(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,mf(c)==a.id?c.mode=this.ma?"showing":"hidden":c.mode="disabled";lp(this)}};
|
|
675
|
-
q.Mf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&sf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Ya("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Qo(this,d,!1,b,c);this.
|
|
675
|
+
q.Mf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&sf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Ya("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Qo(this,d,!1,b,c);this.Da=new Jf(d,
|
|
676
676
|
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);Ko(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,mf(c)==a.id){mp(this,c);break}};q.Kh=function(){return np(this.lc())};q.ci=function(){return np(this.Gc())};q.Jh=function(){return Array.from(op(this.lc()))};q.bi=function(){return Array.from(op(this.Gc()))};
|
|
677
|
-
q.Zg=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.
|
|
678
|
-
sf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=jf(c),this.Mf(a,!0,d)):lo(this))}else this.h&&this.h.audioTracks&&(d=uf(this.lc(),a,b||"",!1)[0])&&this.Mf(d)};q.Lf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.
|
|
679
|
-
q.Vi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.
|
|
680
|
-
q.qf=function(){var a=this.ma;return this.
|
|
677
|
+
q.Zg=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.D){this.Da=new Kf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);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;e=this.Da.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=f.value,
|
|
678
|
+
sf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=jf(c),this.Mf(a,!0,d)):lo(this))}else this.h&&this.h.audioTracks&&(d=uf(this.lc(),a,b||"",!1)[0])&&this.Mf(d)};q.Lf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.Db=a,this.od=b||"",this.nd=c,(a=uf(this.i.textStreams,this.Db,this.od,this.nd)[0]||null)&&a!=this.j.s&&(Zk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.qf()))Pl(this.j,a),lp(this)}else(a=uf(this.Gc(),a,b||"",c)[0])&&this.$g(a)};
|
|
679
|
+
q.Vi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.D){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.Da=new Kf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),lo(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&&mp(this,b)}};
|
|
680
|
+
q.qf=function(){var a=this.ma;return this.C&&this.l==So?this.C.D.isTextVisible():this.h&&this.h.src&&this.h.textTracks?fp(this).some(function(b){return"showing"==b.mode}):a};q.xg=function(){return this.h&&this.h.src&&this.h.textTracks?pp(this).map(function(a){return of(a)}):[]};
|
|
681
681
|
q.Mh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Be(a),c=pp(this).filter(function(h){return Be(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};
|
|
682
682
|
function fp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function hp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function pp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
683
|
-
q.gh=function(a){a=!!a;if(this.ma!=a){this.ma=a;if(this.l==So)this.
|
|
684
|
-
q.Yh=function(){if(this.
|
|
685
|
-
q.Ld=function(){return this.V()?this.i?this.i.presentationTimeline.Ld():null:null};q.wb=function(){if(this.l==So)return this.
|
|
683
|
+
q.gh=function(a){a=!!a;if(this.ma!=a){this.ma=a;if(this.l==So)this.C.D.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=uf(this.i.textStreams,this.Db,this.od,this.nd),0<a.length&&(Pl(this.j,a[0]),lp(this))):Ll(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=fp(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")}Zo(this)}};
|
|
684
|
+
q.Yh=function(){if(this.D)var a=this.D.xd();else{if(null==this.na)return new Date;a=this.na}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.Cg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
685
|
+
q.Ld=function(){return this.V()?this.i?this.i.presentationTimeline.Ld():null:null};q.wb=function(){if(this.l==So)return this.C.wb();var a={total:[],audio:[],video:[],text:[]};this.l==dp&&(a.total=Pi(this.h.buffered));return a};
|
|
686
686
|
q.getStats=function(){if(this.l!=So&&this.l!=dp)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,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],
|
|
687
|
-
stateHistory:[]};No(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.V()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.
|
|
688
|
-
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||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.Cg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&(this.s.G=this.i.periodCount,this.s.
|
|
689
|
-
b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.N;e=f.O;var g=f.M,h=f.Y,k=f.
|
|
687
|
+
stateHistory:[]};No(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.V()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.D&&(this.s.T=this.D.fg(),this.s.Y=this.D.gg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.O=Number(c.droppedVideoFrames);b.N=d;this.s.M=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.l==So){c=this.j.j;b=this.j.s;if(c){d=this.I?this.I.i:1;
|
|
688
|
+
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||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.Cg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&(this.s.G=this.i.periodCount,this.s.D=this.i.gapCount,this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.h));c=this.o.getBandwidthEstimate();this.s.A=c}this.l==dp&&(c=this.s,c.fc=isNaN(c.fc)?NaN:c.fc+NaN,c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=
|
|
689
|
+
b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.N;e=f.O;var g=f.M,h=f.Y,k=f.T,l=f.A,m=f.i,n=f.m,p=f.H,r=f.j,u=Wk(f.g,"playing"),v=Wk(f.g,"paused"),w=Wk(f.g,"buffering"),A=f.s,z=f.C,D=f.I,y=f.Ig,B=f.fc,C=f.K,E=f.G,G=f.D,L=Xk(f.g),K=[];f=t(f.h.g);for(var I=f.next();!I.done;I=f.next())I=I.value,K.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,
|
|
690
690
|
estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:z,maxSegmentDuration:D,manifestSizeBytes:y,bytesDownloaded:B,nonFatalErrorCount:C,manifestPeriodCount:E,manifestGapCount:G,stateHistory:L,switchHistory:K}};
|
|
691
691
|
q.wh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:if(h.l!=So&&h.l!=dp)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ya("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){y.u(2);break}return F(y,qp(h,a),3);case 3:d=y.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=dp){y.u(4);break}g&&(c="forced");return F(y,rp(h,a,b,c,d,f||"",k),5);case 5:l=Be(b);m=h.Gc();if(n=m.find(function(B){return Be(B.language)==
|
|
692
692
|
l&&B.label==(f||"")&&B.kind==c}))return Jo(h),y.return(n);throw new T(1,2,2012);case 4:p=Wd;r=h.h.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new T(1,4,4033);if(!k.length){y.u(6);break}return F(y,sp(h,a,h.H,h.g.streaming.retryParameters),7);case 7:u=y.h,v=tp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Mj(w),d="text/vtt";case 6:A={id:h.cg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pk(0,r,[a]),mimeType:d||"",
|
|
693
693
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.ua,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([Zd(d||"",e||"")])};z=Zd(A.mimeType,A.codecs);D=oe(z);if(!D)throw new T(2,2,2014,d);h.i.textStreams.push(A);Jo(h);return y.return(kf(A))}})};
|
|
694
694
|
q.xh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:if(c.l!=So&&c.l!=dp)throw new T(1,7,7004);if(b){y.u(2);break}return F(y,qp(c,a),3);case 3:b=y.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Wd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return F(y,sp(c,a,c.H,c.g.streaming.retryParameters),4);case 4:f=y.h;g=pe[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
695
|
-
vttOffset:0};l=zb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);r=p.next();for(u={};!r.done;u={xe:void 0,Bc:void 0},r=p.next())u.Bc=r.value,u.xe=null,v=function(B){return function(){null==B.xe&&(B.xe=
|
|
695
|
+
vttOffset:0};l=zb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);r=p.next();for(u={};!r.done;u={xe:void 0,Bc:void 0},r=p.next())u.Bc=r.value,u.xe=null,v=function(B){return function(){null==B.xe&&(B.xe=Ld([a],[B.Bc.payload]));return B.xe||[]}}(u),w=new Fi(u.Bc.startTime,u.Bc.endTime,v,0,null,null,0,0,Infinity),u.Bc.payload.includes("#xywh")&&(A=u.Bc.payload.split("#xywh=")[1].split(","),4===A.length&&w.hh({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
696
696
|
n.push(w);z=b;if(!n.length){y.u(5);break}return F(y,Sm(n[0].L()[0],c.H,c.g.manifest.retryParameters),6);case 6:z=y.h;case 5:return D={id:c.cg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Nk(n),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Ce,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
|
|
697
697
|
closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Zd(z||"","")])},c.l==dp?c.pd.push(D):c.i.imageStreams.push(D),Jo(c),y.return(lf(D))}})};
|
|
698
|
-
q.vh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=So&&d.l!=dp)throw new T(1,7,7004);if(c){k.u(2);break}return F(k,qp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),F(k,rp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.xg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return F(k,new Promise(function(l,m){d.m.
|
|
698
|
+
q.vh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=So&&d.l!=dp)throw new T(1,7,7004);if(c){k.u(2);break}return F(k,qp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),F(k,rp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.xg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return F(k,new Promise(function(l,m){d.m.ka(f,"load",l);d.m.ka(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return Jo(d),k.return(h);case 5:throw new T(1,
|
|
699
699
|
2,2012);}})};function qp(a,b){var c;return O(function(d){switch(d.g){case 1:return ra(d,2),F(d,Sm(b,a.H,a.g.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:ua(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
700
700
|
function rp(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?F(n,sp(a,b,a.H,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=tp(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,r=b;try{if(p.g.enabled){var u=Gn(p);u.ot=Tn;u.su=!0;var v=Kn(u);var w=Ln(r,v)}else w=r}catch(A){$a("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=r}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
701
701
|
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function sp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=yg;f=sg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Mn(k,f,{ot:Tn,su:!0})}catch(l){$a("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return F(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
@@ -705,14 +705,14 @@ function go(a){var b=um();b.streaming.failureCallback=function(c){if(a.V()){var
|
|
|
705
705
|
function Fo(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.cg++,originalId:g,groupId:null,
|
|
706
706
|
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:Ud,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([Zd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
707
707
|
function Xo(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(r){if(1==r.g)return k?F(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.Ib(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},F(h,e(c,b),2);if(3!=h.g)return f=h.h,F(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)})}
|
|
708
|
-
function vo(a){var b=a.nf();if(a.s&&a.M&&a.
|
|
708
|
+
function vo(a){var b=a.nf();if(a.s&&a.M&&a.D){var c=a.I;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);No(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.ye<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.O&&(a.O=Math.min(a.O+ ++a.ye*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(oo("buffering",
|
|
709
709
|
b))}function Oo(a){var b=a.h.playbackRate;0!=b&&(a.I&&a.I.set(b),b=oo("ratechange"),a.dispatchEvent(b))}
|
|
710
710
|
function No(a){if(a.s&&a.M){var b=a.s.g,c="playing";a.M.g==Wf?c="buffering":a.h.ended?c="ended":a.h.paused&&(c="paused");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(oo("statechanged",c)))}}
|
|
711
711
|
function ap(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.wg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.vd(d,!1):1==e&&b!==a.I.kc()&&a.Uc()}if(c&&(c=a.Pb(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(a.g.streaming.liveSync&&
|
|
712
712
|
a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?k=Math.max(0,a.i.serviceDescription.targetLatency-
|
|
713
|
-
d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.O||"number"!==typeof g||(a.O=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.
|
|
714
|
-
a.
|
|
715
|
-
function bp(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.
|
|
713
|
+
d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.O||"number"!==typeof g||(a.O=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ca&&null!==a.O&&"number"===typeof g&&a.ye<n&&Date.now()-a.Ca>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,a.O=Math.max(a.O-(g-f)/2,f+d),
|
|
714
|
+
a.Ca=Date.now());e&&null!==a.O&&(h=a.O+d,k=a.O-d);g=c.end-a.h.currentTime;d=0;a.l==dp&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.M.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.vd(m,!1):h&&l&&g-d>h?(b!=l&&a.vd(l,!1),a.Ca=null):k&&m&&g-d<k?(b!=m&&a.vd(m,!1),a.Ca=null):b!==a.I.kc()&&(a.Uc(),a.Ca=Date.now())}}
|
|
715
|
+
function bp(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.T)?(a.T=c,b=!0):(c=Math.max(a.T,c),a.T!=c&&(a.T=c,b=!0)));if(b){var d;0==a.T?d=oo("started"):25==a.T?d=oo("firstquartile"):50==a.T?d=oo("midpoint"):75==a.T?d=oo("thirdquartile"):100==a.T&&(d=oo("complete"));d&&a.dispatchEvent(d)}}}function Ko(a){try{ui(a.$d,a.i)}catch(c){return to(a,c),!1}var b=tf(a.i.variants);b=a.Da.create(b);a.o.setVariants(Array.from(b.values()));return!0}
|
|
716
716
|
function lo(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;(f=Ko(a)?a.o.chooseVariant():null)&&Qo(a,f,e,b,c,d)}
|
|
717
717
|
function Qo(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Ol(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}));Ol(a.j,b,d,e,f,c);d=null;g&&(d=jf(g));b=jf(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Ij(a.K,b,a.gf()),c=oo("adaptation",c),up(a,c)):vp(a,d,b)}}
|
|
718
718
|
function mp(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=rf(c),b=rf(b),vp(a,c,b))}function Yo(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Be(a.g.preferredTextLanguage);c=Be(c.language);if(2==a.g.autoShowText)return Ae(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Be(b.language);return Ae(c,d)&&!Ae(a,c)}Ya("Invalid autoShowText setting!");return!1}
|
|
@@ -736,7 +736,7 @@ X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Bh;X.
|
|
|
736
736
|
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 F(k,ni(),3);case 3:b=k.h;case 2:var l={};if(Sc())for(var m in yi)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]=Sc()?!!yi[n]:Tc(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($d));
|
|
737
737
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=oe(n)?!0:Sc()?lb(n)||(nc(n)?!0:!1):Tc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return F(k,sd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=wp;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
738
738
|
X.isBrowserSupported=function(){window.Promise||Ya("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Sc()?!0:Tc("application/x-mpegurl")};X.setAdManagerFactory=function(a){jo=a};
|
|
739
|
-
X.registerSupportPlugin=function(a,b){wp[a]=b};X.prototype.destroy=X.prototype.destroy;var po=0,fo=1,So=2,dp=3;X.LoadMode={DESTROYED:po,NOT_LOADED:fo,MEDIA_SOURCE:So,SRC_EQUALS:dp};X.version="v4.10.
|
|
739
|
+
X.registerSupportPlugin=function(a,b){wp[a]=b};X.prototype.destroy=X.prototype.destroy;var po=0,fo=1,So=2,dp=3;X.LoadMode={DESTROYED:po,NOT_LOADED:fo,MEDIA_SOURCE:So,SRC_EQUALS:dp};X.version="v4.10.22";var xp=["4","10"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(xp[0]),Number(xp[1])));var wp={},jo=null;function yp(){this.g=[];this.i=this.l=this.j=this.h=0}function zp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Ap(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 gb;this.m.F(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.F(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Ap.prototype;q.needsSkipUI=function(){return!1};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
740
740
|
q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
741
741
|
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
742
742
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
@@ -746,18 +746,18 @@ Ap.prototype.getDescription=Ap.prototype.getDescription;Ap.prototype.getTitle=Ap
|
|
|
746
746
|
Ap.prototype.play=Ap.prototype.play;Ap.prototype.pause=Ap.prototype.pause;Ap.prototype.skip=Ap.prototype.skip;Ap.prototype.canSkipNow=Ap.prototype.canSkipNow;Ap.prototype.getTimeUntilSkippable=Ap.prototype.getTimeUntilSkippable;Ap.prototype.isSkippable=Ap.prototype.isSkippable;Ap.prototype.isPaused=Ap.prototype.isPaused;Ap.prototype.getRemainingTime=Ap.prototype.getRemainingTime;Ap.prototype.getMinSuggestedDuration=Ap.prototype.getMinSuggestedDuration;Ap.prototype.getDuration=Ap.prototype.getDuration;
|
|
747
747
|
Ap.prototype.needsSkipUI=Ap.prototype.needsSkipUI;function Bp(){}S("shaka.ads.Utils",Bp);Bp.ADS_LOADED="ads-loaded";Bp.AD_STARTED="ad-started";Bp.AD_FIRST_QUARTILE="ad-first-quartile";Bp.AD_MIDPOINT="ad-midpoint";Bp.AD_THIRD_QUARTILE="ad-third-quartile";Bp.AD_COMPLETE="ad-complete";Bp.AD_STOPPED="ad-stopped";Bp.AD_SKIPPED="ad-skipped";Bp.AD_VOLUME_CHANGED="ad-volume-changed";Bp.AD_MUTED="ad-muted";Bp.AD_PAUSED="ad-paused";Bp.AD_RESUMED="ad-resumed";Bp.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Bp.CUEPOINTS_CHANGED="ad-cue-points-changed";
|
|
748
748
|
Bp.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Bp.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Bp.AD_CLICKED="ad-clicked";Bp.AD_PROGRESS="ad-progress";Bp.AD_BUFFERING="ad-buffering";Bp.AD_IMPRESSION="ad-impression";Bp.AD_DURATION_CHANGED="ad-duration-changed";Bp.AD_CLOSED="ad-closed";Bp.AD_LOADED="ad-loaded";Bp.ALL_ADS_COMPLETED="all-ads-completed";Bp.AD_LINEAR_CHANGED="ad-linear-changed";Bp.AD_METADATA="ad-metadata";Bp.AD_RECOVERABLE_ERROR="ad-recoverable-error";Bp.AD_ERROR="ad-error";
|
|
749
|
-
Bp.AD_BREAK_READY="ad-break-ready";Bp.AD_INTERACTION="ad-interaction";Bp.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Bp.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Bp.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Cp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.
|
|
750
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Dp(f,g)});this.h.
|
|
749
|
+
Bp.AD_BREAK_READY="ad-break-ready";Bp.AD_INTERACTION="ad-interaction";Bp.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Bp.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Bp.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Cp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.22");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.F(this.m,
|
|
750
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Dp(f,g)});this.h.F(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Ep(f,g)});this.h.F(this.i,"ended",function(){f.m.contentComplete()});this.h.ka(this.i,"play",function(){f.D=!0})}Cp.prototype.configure=function(a){this.o=a};Cp.prototype.stop=function(){this.g&&this.g.stop();this.s&&sn(this.s)};
|
|
751
751
|
Cp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function Ep(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new U("ad-error",b));Fp(a,null);a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
752
|
-
function Dp(a,b){a.l(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.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.
|
|
753
|
-
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.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Gp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.
|
|
754
|
-
a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.
|
|
752
|
+
function Dp(a,b){a.l(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.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.F(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.F(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.l(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
753
|
+
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.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Gp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.F(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
754
|
+
a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.F(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.D||a.o.skipPlayDetection?a.g.start():a.h.ka(a.i,"play",function(){a.D=!0;a.g.start()})}catch(f){Fp(a,null)}}
|
|
755
755
|
function Hp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
756
|
-
function Gp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new U(d,c))}a.h.
|
|
757
|
-
function(c){b(c,"ad-third-quartile")});a.h.
|
|
758
|
-
a.h.
|
|
759
|
-
a.h.
|
|
760
|
-
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.
|
|
756
|
+
function Gp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new U(d,c))}a.h.F(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Ep(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Ip(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.STARTED,function(c){Ip(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.F(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.F(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
757
|
+
function(c){b(c,"ad-third-quartile")});a.h.F(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.F(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Fp(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Fp(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.F(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.F(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
758
|
+
a.h.F(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.F(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.F(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.F(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.F(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.F(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
759
|
+
a.h.F(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.F(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.F(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.F(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.F(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.F(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.F(a.g,
|
|
760
|
+
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.F(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.F(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.F(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
761
761
|
function Ip(a,b){var c=b.getAd();c?(a.j=new Ap(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new U("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new U("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.o.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))):Ya("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
762
762
|
function Fp(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new U("ad-content-resume-requested"));a.l(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function Jp(a,b,c,d,e){this.g=a;this.h=b;this.j=c;this.l=d;this.i=e}q=Jp.prototype;q.needsSkipUI=function(){return!0};q.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h};
|
|
763
763
|
q.getTimeUntilSkippable=function(){return this.h?0:Math.max(this.getRemainingTime(),0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.j()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
@@ -765,17 +765,17 @@ q.getSequenceLength=function(){return this.l};q.getPositionInSequence=function()
|
|
|
765
765
|
q.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Jp);Jp.prototype.release=Jp.prototype.release;Jp.prototype.getPodIndex=Jp.prototype.getPodIndex;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;
|
|
766
766
|
Jp.prototype.getVastMediaHeight=Jp.prototype.getVastMediaHeight;Jp.prototype.getVastMediaBitrate=Jp.prototype.getVastMediaBitrate;Jp.prototype.getDescription=Jp.prototype.getDescription;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;
|
|
767
767
|
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;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;
|
|
768
|
-
Jp.prototype.getMinSuggestedDuration=Jp.prototype.getMinSuggestedDuration;Jp.prototype.getDuration=Jp.prototype.getDuration;Jp.prototype.needsSkipUI=Jp.prototype.needsSkipUI;function Kp(a,b,c,d){var e=this;this.
|
|
768
|
+
Jp.prototype.getMinSuggestedDuration=Jp.prototype.getMinSuggestedDuration;Jp.prototype.getDuration=Jp.prototype.getDuration;Jp.prototype.needsSkipUI=Jp.prototype.needsSkipUI;function Kp(a,b,c,d){var e=this;this.D=a;this.B=b;this.i=c;this.C=null;this.m=!0;this.s=this.i;this.g=d;this.G=new Set;this.A=new Set;this.o=new Map;this.h=new X;Lp(this);this.I=new gb;this.j=new gb;this.H=!1;this.l=null;this.I.F(this.i,"timeupdate",function(){if(!e.H){var f=null==e.l||0==e.l;e.l=e.i.currentTime;(f=Mp(e,f))&&Np(e,f,1,1,Date.now())}});this.K=(new Rc(function(){var f,g,h,k,l,m,n,p,r,u;return O(function(v){switch(v.g){case 1:if(!e.A.size||e.H||null==e.l){v.u(0);break}f=!1;g=Array.from(e.A);
|
|
769
769
|
h=e.B.Pb();k=t(g);l=k.next();case 3:if(l.done){v.u(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.l;0<p&&10>=p&&(e.o.has(m)||e.o.set(m,e.h.preload(m.uri)));v.u(4);break}if(!e.o.has(m)){v.u(7);break}return F(v,e.o.get(m),8);case 8:(r=v.h)&&r.destroy(),e.o.delete(m);case 7:u=JSON.stringify(m),e.G.has(u)&&e.G.delete(u),e.A.delete(m),f=!0;case 4:l=k.next();v.u(3);break;case 5:f&&Op(e),H(v)}})})).Ra(1)}
|
|
770
|
-
Kp.prototype.configure=function(a){this.
|
|
771
|
-
Kp.prototype.stop=function(){this.j&&this.j.Qa();this.G.clear();this.A.clear();this.h.Pe();this.o.clear();this.h.detach();this.H=!1;this.l=null};Kp.prototype.release=function(){this.stop();this.I&&this.I.release();this.j&&this.j.release();this.
|
|
770
|
+
Kp.prototype.configure=function(a){this.D&&this.m==a.supportsMultipleMediaElements&&((this.m=!a.supportsMultipleMediaElements)?(this.s=this.i,this.C&&(this.C.parentElement&&this.D.removeChild(this.C),this.C=null)):(this.C||(a=document.createElement(this.i.tagName),a.autoplay=!0,a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.backgroundColor="rgb(0, 0, 0)",a.setAttribute("playsinline",""),this.C=a),this.s=this.C))};
|
|
771
|
+
Kp.prototype.stop=function(){this.j&&this.j.Qa();this.G.clear();this.A.clear();this.h.Pe();this.o.clear();this.h.detach();this.H=!1;this.l=null};Kp.prototype.release=function(){this.stop();this.I&&this.I.release();this.j&&this.j.release();this.D&&sn(this.D);this.K&&(this.K.stop(),this.K=null);this.h.destroy()};
|
|
772
772
|
function Pp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.B.zg()==dp&&a.m)return Ya("Unsupported interstitial when using single media element",b),m.return();Lp(a);c=!1;return F(m,Qp(a,b),2)}d=m.h;if(d.length)for(e=t(d),f=e.next();!f.done;f=e.next())(g=f.value,h=JSON.stringify(g),a.G.has(h))||(c=!0,a.G.add(h),a.A.add(g),k=!1,b.Ab&&null==a.l?k=!0:0!=g.startTime||g.He?null!=a.l&&(l=b.startTime-a.l,0<l&&10>=l&&(k=!0)):k=!0,k&&(a.o.has(g)||a.o.set(g,a.h.preload(g.uri))));else Ya("Unsupported interstitial",
|
|
773
773
|
b);c&&Op(a);H(m)})}function Mp(a,b,c){c=void 0===c?0:c;var d=0,e=null;if(a.A.size&&null!=a.l){var f=a.i.ended,g=Array.from(a.A).sort(function(l,m){return m.startTime-l.startTime});g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;b?k=h.Ab:f?k=h.qc:h.Ab||h.qc||(k=a.l-Math.round(1E3*h.startTime)/1E3,k=0<k&&(1>=k||!h.He));if(k){if(d==c){e=h;break}d++}}}return e}
|
|
774
|
-
function Np(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,v,w,A,z,D;O(function(y){switch(y.g){case 1:g=Date.now();!a.s.parentElement&&a.
|
|
775
|
-
C.g)return"detach"!=B.state?C.u(0):od()?F(C,new Promise(function(E){return(new Rc(E)).$(.1)}),3):C.u(3);h.resolve();a.j.kb(a.B,"onstatechange",k);H(C)})};a.j.
|
|
774
|
+
function Np(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,v,w,A,z,D;O(function(y){switch(y.g){case 1:g=Date.now();!a.s.parentElement&&a.D&&a.D.appendChild(a.s);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.Ab?B.Ab==b.Ab:b.qc?B.qc==b.qc:.001>Math.abs(B.startTime-b.startTime)}).length);if(b.once||b.Ab)f++,a.A.delete(b),Op(a);a.H=!0;if(!a.m||1!=d){y.u(2);break}a.g(new U("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new ag;k=function(B){return O(function(C){if(1==
|
|
775
|
+
C.g)return"detach"!=B.state?C.u(0):od()?F(C,new Promise(function(E){return(new Rc(E)).$(.1)}),3):C.u(3);h.resolve();a.j.kb(a.B,"onstatechange",k);H(C)})};a.j.F(a.B,"onstatechange",k);return F(y,h,2);case 2:return a.m||(a.i.pause(),null!=b.Pc&&0!=b.Pc&&(a.i.currentTime+=b.Pc)),l=!1,m=null,n=function(){if(!a.m&&null==b.Pc)if(b.re&&b.endTime&&Infinity!=b.endTime)a.i.currentTime!=b.endTime&&(a.i.currentTime=b.endTime);else{var B=Date.now();a.i.currentTime+=(B-e)/1E3;e=B}},p=function(){var B,C;return O(function(E){if(1==
|
|
776
776
|
E.g)return n(),m&&m.stop(),(B=Mp(a,b.Ab,d-f))?(a.g(new U("ad-stopped")),a.j.Qa(),Np(a,B,c,++d,e,f),E.u(0)):a.m?F(E,a.h.detach(),4):F(E,a.h.dc(),4);a.m&&(C=b.Pc,null==C&&(C=b.re&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.l||0):(Date.now()-e)/1E3),a.g(new U("ad-content-resume-requested",(new Map).set("offset",C))));a.g(new U("ad-stopped"));a.j.Qa();a.H=!1;a.m||(n(),a.i.ended||a.i.play());H(E)})},r=function(B){return O(function(C){if(l)return C.return();l=!0;a.g(new U("ad-error",(new Map).set("originalEvent",
|
|
777
|
-
B)));return F(C,p(),0)})},u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return F(B,p(),2)}a.g(new U("ad-complete"));H(B)})},v=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new U("ad-skipped"));return F(B,p(),0)})},w=new Jp(a.s,b.isSkippable,v,c,d),a.m||(w.setMuted(a.i.muted),w.setVolume(a.i.volume)),a.g(new U("ad-started",(new Map).set("ad",w))),w.canSkipNow()&&a.g(new U("ad-skip-state-changed")),a.j.
|
|
778
|
-
a.g(new U("ad-first-quartile"))}),a.j.
|
|
777
|
+
B)));return F(C,p(),0)})},u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return F(B,p(),2)}a.g(new U("ad-complete"));H(B)})},v=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new U("ad-skipped"));return F(B,p(),0)})},w=new Jp(a.s,b.isSkippable,v,c,d),a.m||(w.setMuted(a.i.muted),w.setVolume(a.i.volume)),a.g(new U("ad-started",(new Map).set("ad",w))),w.canSkipNow()&&a.g(new U("ad-skip-state-changed")),a.j.ka(a.h,"error",r),a.j.ka(a.h,"firstquartile",function(){n();
|
|
778
|
+
a.g(new U("ad-first-quartile"))}),a.j.ka(a.h,"midpoint",function(){n();a.g(new U("ad-midpoint"))}),a.j.ka(a.h,"thirdquartile",function(){n();a.g(new U("ad-third-quartile"))}),a.j.ka(a.h,"complete",u),a.j.F(a.s,"play",function(){a.g(new U("ad-resumed"))}),a.j.F(a.s,"pause",function(){a.g(new U("ad-paused"))}),a.j.F(a.s,"volumechange",function(){a.s.muted?a.g(new U("ad-muted")):a.g(new U("ad-volume-changed"))}),ra(y,4),b.Ef&&(m=(new Rc(function(){w.skip()})).$(b.Ef)),Lp(a),F(y,a.h.Sb(a.s),6);case 6:return a.o.has(b)?
|
|
779
779
|
F(y,a.o.get(b),10):F(y,a.h.load(b.uri),8);case 10:return A=y.h,a.o.delete(b),A?F(y,a.h.load(A),8):F(y,a.h.load(b.uri),8);case 8:z=(Date.now()-g)/1E3;a.g(new U("ads-loaded",(new Map).set("loadTime",z)));a.m&&a.i.play();ta(y,0);break;case 4:D=ua(y),r(D),H(y)}})}
|
|
780
780
|
function Qp(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R;return O(function(Q){switch(Q.g){case 1:c=[];if(!b)return Q.return(c);d=b.values.find(function(W){return"X-ASSET-URI"==W.key});e=b.values.find(function(W){return"X-ASSET-LIST"==W.key});if(!d&&!e)return Q.return(c);f=b.values.find(function(W){return"X-RESTRICT"==W.key});h=g=!0;f&&f.data&&(k=f.data,g=!k.includes("SKIP"),h=!k.includes("JUMP"));l=null;if(m=b.values.find(function(W){return"X-RESUME-OFFSET"==W.key}))n=m.data,
|
|
781
781
|
l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(r=b.values.find(function(W){return"X-PLAYOUT-LIMIT"==W.key}))u=r.data,p=parseFloat(u),isNaN(p)&&(p=null);A=w=v=!1;if(z=b.values.find(function(W){return"CUE"==W.key}))D=z.data,v=D.includes("ONCE"),w=D.includes("PRE"),A=D.includes("POST");y=!1;(B=b.values.find(function(W){return"X-TIMELINE-OCCUPIES"==W.key}))?(C=B.data,y=C.includes("RANGE")):!m&&a.B.V()&&(y=!w&&!A);if(d){E=d.data;if(!E)return Q.return(c);c.push({startTime:b.startTime,endTime:b.endTime,uri:E,
|
|
@@ -787,21 +787,21 @@ q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){retur
|
|
|
787
787
|
Vp.prototype.getPodIndex=Vp.prototype.getPodIndex;Vp.prototype.getTimeOffset=Vp.prototype.getTimeOffset;Vp.prototype.getMediaUrl=Vp.prototype.getMediaUrl;Vp.prototype.getAdvertiserName=Vp.prototype.getAdvertiserName;Vp.prototype.getCreativeAdId=Vp.prototype.getCreativeAdId;Vp.prototype.getAdId=Vp.prototype.getAdId;Vp.prototype.getVastMediaWidth=Vp.prototype.getVastMediaWidth;Vp.prototype.getVastMediaHeight=Vp.prototype.getVastMediaHeight;Vp.prototype.getVastMediaBitrate=Vp.prototype.getVastMediaBitrate;
|
|
788
788
|
Vp.prototype.getDescription=Vp.prototype.getDescription;Vp.prototype.getTitle=Vp.prototype.getTitle;Vp.prototype.getPositionInSequence=Vp.prototype.getPositionInSequence;Vp.prototype.getSequenceLength=Vp.prototype.getSequenceLength;Vp.prototype.setMuted=Vp.prototype.setMuted;Vp.prototype.resize=Vp.prototype.resize;Vp.prototype.isLinear=Vp.prototype.isLinear;Vp.prototype.isMuted=Vp.prototype.isMuted;Vp.prototype.setVolume=Vp.prototype.setVolume;Vp.prototype.getVolume=Vp.prototype.getVolume;
|
|
789
789
|
Vp.prototype.play=Vp.prototype.play;Vp.prototype.pause=Vp.prototype.pause;Vp.prototype.skip=Vp.prototype.skip;Vp.prototype.canSkipNow=Vp.prototype.canSkipNow;Vp.prototype.getTimeUntilSkippable=Vp.prototype.getTimeUntilSkippable;Vp.prototype.isSkippable=Vp.prototype.isSkippable;Vp.prototype.isPaused=Vp.prototype.isPaused;Vp.prototype.getRemainingTime=Vp.prototype.getRemainingTime;Vp.prototype.getMinSuggestedDuration=Vp.prototype.getMinSuggestedDuration;Vp.prototype.getDuration=Vp.prototype.getDuration;
|
|
790
|
-
Vp.prototype.needsSkipUI=Vp.prototype.needsSkipUI;var Wp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Xp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.
|
|
790
|
+
Vp.prototype.needsSkipUI=Vp.prototype.needsSkipUI;var Wp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Xp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.T=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.M=this.C=this.g=null;this.D=new Map;this.m=[];this.s=[];this.G="";this.O=!0;this.H="";this.o=new gb}Xp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.kb(b.target,b.type,b.listener);Yp(this);this.m=[];this.s=[];this.G="";this.O=!0;this.H="";this.A=null;this.j=[];this.N=[];this.D.clear()};
|
|
791
791
|
Xp.prototype.release=function(){this.stop();this.o&&this.o.release()};Xp.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(Zp(this,this.G,this.O),this.O=!1)};Xp.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};
|
|
792
|
-
function $p(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=sg([b],Zf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Ad(e)),f=a.K.request(7,d),ra(u,2),F(u,f.promise,4);if(2!=u.g){g=u.h;h=vd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new tc(b),m=new tc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.
|
|
792
|
+
function $p(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=sg([b],Zf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Ad(e)),f=a.K.request(7,d),ra(u,2),F(u,f.promise,4);if(2!=u.g){g=u.h;h=vd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new tc(b),m=new tc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.T,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),r=new tc(k.manifestUrl),a.l.resolve(l.resolve(r).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
793
793
|
return ta(u,0)}ua(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;H(u)})}
|
|
794
794
|
function Zp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;O(function(z){if(1==z.g)return d=sg([b],Zf()),e=a.K.request(7,d),ra(z,2),F(z,e.promise,4);if(2!=z.g){f=z.h;g=[];h=vd(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),r=p.next();!r.done;r=p.next())for(u=r.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,aq(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
|
|
795
795
|
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Yp(a),a.j=[];c&&(a.I||0<g.length)&&bq(a);return ta(z,0)}ua(z);H(z)})}
|
|
796
|
-
function aq(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=cq(b);if(d=a.
|
|
797
|
-
function cq(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function bq(a){dq(a);a.I||(eq(a),a.o.
|
|
796
|
+
function aq(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=cq(b);if(d=a.D.get(c))return m.return();e=sg([b.staticResource],Zf());f=a.K.request(7,e);ra(m,2);a.D.set(c,[]);return F(m,f.promise,4)}if(2!=m.g)return g=m.h,h=vd(g.data),k=JSON.parse(h),l=k.apps,a.D.set(c,l),ta(m,0);ua(m);a.D.delete(c);H(m)})}
|
|
797
|
+
function cq(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function bq(a){dq(a);a.I||(eq(a),a.o.F(a.h,"seeked",function(){eq(a)}),a.o.F(a.h,"ended",function(){Yp(a)}));a.o.F(a.h,"timeupdate",function(){dq(a)})}
|
|
798
798
|
function eq(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)}}
|
|
799
799
|
function dq(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"),fq(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),fq(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),fq(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
800
800
|
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&fq(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Yp(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}Yp(a);a.M=e;a.g=new Vp(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&fq(a,"breakStart");gq(a);break}}}if(!a.g)for(d=
|
|
801
|
-
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.
|
|
801
|
+
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.D.get(cq(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Yp(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||
|
|
802
802
|
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.M=e;a.g=new Vp(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&fq(a,"breakStart");gq(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
803
803
|
function Yp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?fq(a,"skip"):fq(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.kb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&fq(a,"breakEnd");a.g=null;a.C=null;a.M=null}}
|
|
804
|
-
function gq(a){var b=!1;a.h.paused?b=!0:(fq(a,"impression"),fq(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&fq(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||fq(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(fq(a,"impression"),fq(a,"start"),b=!1):fq(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){fq(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.
|
|
804
|
+
function gq(a){var b=!1;a.h.paused?b=!0:(fq(a,"impression"),fq(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&fq(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||fq(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(fq(a,"impression"),fq(a,"start"),b=!1):fq(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){fq(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.F(d.target,
|
|
805
805
|
d.type,d.listener)}
|
|
806
806
|
function fq(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.M.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=sg([d],Zf()),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;
|
|
807
807
|
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");
|
|
@@ -812,18 +812,18 @@ q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){retur
|
|
|
812
812
|
hq.prototype.getPodIndex=hq.prototype.getPodIndex;hq.prototype.getTimeOffset=hq.prototype.getTimeOffset;hq.prototype.getMediaUrl=hq.prototype.getMediaUrl;hq.prototype.getAdvertiserName=hq.prototype.getAdvertiserName;hq.prototype.getCreativeAdId=hq.prototype.getCreativeAdId;hq.prototype.getAdId=hq.prototype.getAdId;hq.prototype.getVastMediaWidth=hq.prototype.getVastMediaWidth;hq.prototype.getVastMediaHeight=hq.prototype.getVastMediaHeight;hq.prototype.getVastMediaBitrate=hq.prototype.getVastMediaBitrate;
|
|
813
813
|
hq.prototype.getDescription=hq.prototype.getDescription;hq.prototype.getTitle=hq.prototype.getTitle;hq.prototype.getPositionInSequence=hq.prototype.getPositionInSequence;hq.prototype.getSequenceLength=hq.prototype.getSequenceLength;hq.prototype.setMuted=hq.prototype.setMuted;hq.prototype.resize=hq.prototype.resize;hq.prototype.isLinear=hq.prototype.isLinear;hq.prototype.isMuted=hq.prototype.isMuted;hq.prototype.setVolume=hq.prototype.setVolume;hq.prototype.getVolume=hq.prototype.getVolume;
|
|
814
814
|
hq.prototype.play=hq.prototype.play;hq.prototype.pause=hq.prototype.pause;hq.prototype.skip=hq.prototype.skip;hq.prototype.canSkipNow=hq.prototype.canSkipNow;hq.prototype.getTimeUntilSkippable=hq.prototype.getTimeUntilSkippable;hq.prototype.isSkippable=hq.prototype.isSkippable;hq.prototype.isPaused=hq.prototype.isPaused;hq.prototype.getRemainingTime=hq.prototype.getRemainingTime;hq.prototype.getMinSuggestedDuration=hq.prototype.getMinSuggestedDuration;hq.prototype.getDuration=hq.prototype.getDuration;
|
|
815
|
-
hq.prototype.needsSkipUI=hq.prototype.needsSkipUI;function iq(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.
|
|
816
|
-
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.
|
|
817
|
-
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.
|
|
818
|
-
this.h.
|
|
815
|
+
hq.prototype.needsSkipUI=hq.prototype.needsSkipUI;function iq(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.D=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new gb;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.F(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){jq(e,f)});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
816
|
+
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.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new hq(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.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
817
|
+
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.F(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.F(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
|
|
818
|
+
this.h.F(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.F(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.F(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=
|
|
819
819
|
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=iq.prototype;q.configure=function(){};q.stop=function(){this.B="";this.o=null;this.C=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.C};
|
|
820
|
-
function jq(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.
|
|
820
|
+
function jq(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.D)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.F(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 kq(){kg.call(this);this.g=this.h=this.i=this.j=null;this.m=new yp;this.o=navigator.language;this.l=null}na(kq,kg);q=kq.prototype;q.setLocale=function(a){this.o=a};q.configure=function(a){this.l=a;this.j&&this.j.configure(this.l);this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};q.initInterstitial=function(a,b,c){var d=this;this.j&&this.j.release();this.j=new Kp(a,b,c,function(e){return lq(d,e)});this.j.configure(this.l)};
|
|
821
821
|
q.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 Cp(a,b,this.o,c,function(e){return lq(d,e)});this.i.configure(this.l)};q.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);kg.prototype.release.call(this)};
|
|
822
822
|
q.onAssetUnload=function(){this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new yp};q.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
|
|
823
|
-
q.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)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Xp(a,b,c,function(e){return lq(d,e)})};q.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 ag,$p(d,a,b),d.H=c||"",d.
|
|
823
|
+
q.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)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Xp(a,b,c,function(e){return lq(d,e)})};q.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 ag,$p(d,a,b),d.H=c||"",d.T=Date.now()/1E3,a=d.l);return a};
|
|
824
824
|
q.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)))};q.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 iq(a,b,this.o,function(d){return lq(c,d)});this.g.configure(this.l)};
|
|
825
|
-
q.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)&&Ya('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.10.
|
|
826
|
-
(c.G=!0),c.j=new ag,c.g.requestStream(a),c.B=b||"",c.
|
|
825
|
+
q.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)&&Ya('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.10.22";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
826
|
+
(c.G=!0),c.j=new ag,c.g.requestStream(a),c.B=b||"",c.D=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Ya('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.10.22";this.g.g.replaceAdTagParameters(a)};
|
|
827
827
|
q.getServerSideCuePoints=function(){qb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:zp(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
828
828
|
q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};q.onInterstitialMetadata=function(a,b,c){this.j||this.initInterstitial(null,a,b);this.j&&Pp(this.j,c)};
|
|
829
829
|
function lq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",kq);kq.prototype.onInterstitialMetadata=kq.prototype.onInterstitialMetadata;kq.prototype.onCueMetadataChange=kq.prototype.onCueMetadataChange;kq.prototype.onHlsTimedMetadata=kq.prototype.onHlsTimedMetadata;kq.prototype.onDashTimedMetadata=kq.prototype.onDashTimedMetadata;
|
|
@@ -837,20 +837,20 @@ function nq(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("
|
|
|
837
837
|
function oq(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
838
838
|
var pq="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),qq="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),rq=["loop","playbackRate"],sq=["pause","play"],tq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
839
839
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1},uq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},vq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},wq=[["getConfiguration","configure"]],xq=[["isTextTrackVisible","setTextTrackVisibility"]],yq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
840
|
-
zq=["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 Rc(b);this.M=c;this.s=!1;this.A=d;this.
|
|
841
|
-
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)}q=Aq.prototype;q.destroy=function(){Cq.delete(this);Dq(this);Eq&&Fq(this);this.l&&(this.l.stop(),this.l=null);this.
|
|
840
|
+
zq=["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 Rc(b);this.M=c;this.s=!1;this.A=d;this.D=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Bq(h)};this.C=function(k,l){k=nq(l);switch(k.type){case "event":var m=k.targetName,n=ig(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.M(),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,
|
|
841
|
+
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)}q=Aq.prototype;q.destroy=function(){Cq.delete(this);Dq(this);Eq&&Fq(this);this.l&&(this.l.stop(),this.l=null);this.D=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};q.gb=function(){return this.h};q.Ff=function(){return this.I};
|
|
842
842
|
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.vc();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 ag;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.vc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Hq&&this.l.$(Iq);(a=Eq)&&
|
|
843
843
|
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new ag,this.s=!0,Gq(this,a)):Eq=null}else window.__onGCastApiAvailable!==Jq&&(Kq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Jq)};q.Nf=function(a){this.o=a;this.h&&Lq(this,{type:"appData",appData:this.o})};
|
|
844
844
|
q.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 ag;chrome.cast.requestSession(function(c){return Gq(a,c)},function(c){return Mq(a,c)});return F(b,a.j,0)})};function Nq(a){a.h&&chrome.cast.requestSession(function(b){return Gq(a,b)},function(b){return Mq(a,b)})}q.Ec=function(){if(this.h){Dq(this);if(Eq){Fq(this);try{Eq.stop(function(){},function(){})}catch(a){}Eq=null}Bq(this)}};
|
|
845
845
|
q.get=function(a,b){var c=this;if("video"==a){if(sq.includes(b))return function(){return c.Wg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))}}else if("player"==a){if(vq[b]&&!this.get("player","isLive")())return function(){};if(yq.includes(b))return function(){return c.Wg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(zq.includes(b))return function(){return c.Mi.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(tq[b]||uq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
846
846
|
q.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))}
|
|
847
847
|
q.Wg=function(a,b){Lq(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.Mi=function(a,b){var c=Ha.apply(2,arguments),d=new ag,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)}
|
|
848
|
-
function Bq(a){var b=Eq?"connected"==Eq.status:!1;if(a.h&&!b){a.
|
|
848
|
+
function Bq(a){var b=Eq?"connected"==Eq.status:!1;if(a.h&&!b){a.D();for(var c in a.g)a.g[c]={};Dq(a)}a.h=b;a.I=b?Eq.receiver.friendlyName:"";a.l.vc()}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=mq(b);var c=Eq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},cb)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.Ec(),b;}}var Iq=.02,Hq=!1,Eq=null,Kq=null,Cq=new Set;
|
|
849
849
|
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;kg.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)}na(Oq,kg);q=Oq.prototype;
|
|
850
850
|
q.destroy=function(a){a&&this.g.Ec();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;kg.prototype.release.call(this);return Promise.all(a)};q.hi=function(){return this.l};q.Xh=function(){return this.s};q.Ch=function(){return this.g.m&&Hq};q.gb=function(){return this.g.gb()};q.Ff=function(){return this.g.Ff()};
|
|
851
851
|
q.cast=function(){var a=this;return O(function(b){return 1==b.g?F(b,a.g.cast(),2):a.h?F(b,a.h.dc(),0):b.return()})};q.Nf=function(a){this.g.Nf(a)};q.bj=function(){Nq(this.g)};q.Ec=function(){this.g.Ec()};
|
|
852
852
|
q.Dh=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.Ec();return F(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();H(d)})};
|
|
853
|
-
function Uq(a){a.g.init();a.m=new gb;for(var b=t(pq),c=b.next();!c.done;c=b.next())a.m.
|
|
853
|
+
function Uq(a){a.g.init();a.m=new gb;for(var b=t(pq),c=b.next();!c.done;c=b.next())a.m.F(a.i,c.value,function(f){a.g.gb()||(f=ig(f),a.j.dispatchEvent(f))});for(var d in jg)a.m.F(a.h,jg[d],function(f){a.g.gb()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={md:b.md},b.md=e,Object.defineProperty(a.l,b.md,{configurable:!1,enumerable:!0,get:function(f){return function(){return Vq(a,f.md)}}(b),set:function(f){return function(g){var h=f.md;a.g.gb()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Wq(a,
|
|
854
854
|
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Xq(a,f)}})});Yq(a);a.j=new kg;a.j.le=a.l;a.o=new kg;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)})}
|
|
855
855
|
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)}}
|
|
856
856
|
function Tq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Fc(),startTime:null};a.i.pause();for(var c=t(rq),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(wq);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(xq);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)}
|
|
@@ -861,20 +861,20 @@ function Vq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addE
|
|
|
861
861
|
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.xb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.vg()};
|
|
862
862
|
if("setVideoContainer"==b)return function(c){return a.h.kh(c)};if(a.g.gb()){if("getManifest"==b||"drmInfo"==b)return function(){Ya(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ya(b+"() does not work while casting!");return Promise.resolve()}}return a.g.gb()&&0==Object.keys(a.g.g.video).length&&(tq[b]||uq[b])||!a.g.gb()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
863
863
|
function Rq(a,b,c){a.g.gb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",Oq);Oq.prototype.changeReceiverId=Oq.prototype.Dh;Oq.prototype.forceDisconnect=Oq.prototype.Ec;Oq.prototype.suggestDisconnect=Oq.prototype.bj;Oq.prototype.setAppData=Oq.prototype.Nf;Oq.prototype.cast=Oq.prototype.cast;Oq.prototype.receiverName=Oq.prototype.Ff;Oq.prototype.isCasting=Oq.prototype.gb;Oq.prototype.canCast=Oq.prototype.Ch;Oq.prototype.getPlayer=Oq.prototype.Xh;
|
|
864
|
-
Oq.prototype.getVideo=Oq.prototype.hi;Oq.prototype.destroy=Oq.prototype.destroy;function Zq(a,b,c,d){kg.call(this);var e=this;this.g=a;this.h=b;this.j=new gb;this.H={video:a,player:b};this.
|
|
864
|
+
Oq.prototype.getVideo=Oq.prototype.hi;Oq.prototype.destroy=Oq.prototype.destroy;function Zq(a,b,c,d){kg.call(this);var e=this;this.g=a;this.h=b;this.j=new gb;this.H={video:a,player:b};this.D=c||function(){};this.I=d||function(f){return f};this.i=null;this.G=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.C=new Rc(function(){$q(e)});ar(this)}na(Zq,kg);q=Zq.prototype;q.isConnected=function(){return this.G};q.oi=function(){return this.o};q.Yi=function(a){this.i=a};q.Fh=function(){this.i=null};
|
|
865
865
|
q.Zi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Xi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Wi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
866
|
-
q.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.C&&(a.C.stop(),a.C=null),a.g=null,a.H=null,a.
|
|
866
|
+
q.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.C&&(a.C.stop(),a.C=null),a.g=null,a.H=null,a.D=null,a.G=!1,a.o=!0,a.l=null,a.s=null,kg.prototype.release.call(a),F(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
|
|
867
867
|
function ar(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return br(a)};b.onSenderDisconnected=function(){return br(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&cr(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);cr(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 dr(a,
|
|
868
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return er(a,e)};b.start();b=t(pq);for(var c=b.next();!c.done;c=b.next())a.j.
|
|
869
|
-
a.j.
|
|
870
|
-
function kr(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.
|
|
868
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return er(a,e)};b.start();b=t(pq);for(var c=b.next();!c.done;c=b.next())a.j.F(a.g,c.value,function(e){return fr(a,"video",e)});for(var d in jg)a.j.F(a.h,jg[d],function(e){return fr(a,"player",e)});a.j.F(a.g,"loadeddata",function(){a.B=!0});a.j.F(a.h,"loading",function(){a.o=!1;gr(a)});a.j.F(a.g,"playing",function(){a.o=!1;gr(a)});a.j.F(a.g,"pause",function(){gr(a)});a.j.F(a.h,"unloading",function(){a.o=!0;gr(a)});
|
|
869
|
+
a.j.F(a.g,"ended",function(){(new Rc(function(){a.g&&a.g.ended&&(a.o=!0,gr(a))})).$(hr)})}function br(a){a.m=0;a.A=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;gr(a)}function gr(a){var b;O(function(c){if(1==c.g)return F(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);ir(a)||jr(a);H(c)})}
|
|
870
|
+
function kr(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(r,5),F(r,a.h.load(b.manifest,b.startTime),7)):F(r,Promise.resolve(),3);case 7:ta(r,3);break;case 5:return g=ua(r),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.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);
|
|
871
871
|
a.g.autoplay=f;b.manifest&&(a.g.play(),jr(a));H(r)}})}function fr(a,b,c){a.h&&($q(a),cr(a,{type:"event",targetName:b,event:c},a.l))}
|
|
872
872
|
function $q(a){a.C.$(lr);for(var b={video:{},player:{}},c=t(qq),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in vq)0==a.m%vq[e]&&(b.player[e]=a.h[e]());for(var f in tq)0==a.m%tq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;cr(a,{type:"update",update:b},a.l);for(var g in uq)0==a.m%uq[g]&&(b={player:{}},b.player[g]=a.h[g](),cr(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
873
873
|
1);ir(a)}function ir(a){return a.A&&(a.g.duration||a.h.V())?(mr(a),a.A=!1,!0):!1}function mr(a,b){var c={contentId:a.h.Fc(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);jr(a,void 0===b?0:b,c)}
|
|
874
|
-
function er(a,b){var c=nq(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;kr(a,c.initState,c.appData);$q(a);break;case "appData":a.
|
|
874
|
+
function er(a,b){var c=nq(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;kr(a,c.initState,c.appData);$q(a);break;case "appData":a.D(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;
|
|
875
875
|
"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 nr(a,g,f,null)},function(h){return nr(a,g,f,h)})}}
|
|
876
876
|
function dr(a,b){var c=nq(b.data);switch(c.type){case "PLAY":a.g.play();jr(a);break;case "PAUSE":a.g.pause();jr(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(),jr(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),jr(a));break;case "STOP":a.h.dc().then(function(){a.h&&jr(a)});break;case "GET_STATUS":mr(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));
|
|
877
|
-
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||jr(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.
|
|
877
|
+
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||jr(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.D(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&mr(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");cr(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:cr(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
878
878
|
function nr(a,b,c,d){a.h&&cr(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function cr(a,b,c,d){a.G&&(a=mq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function jr(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?or:a.h.nf()?pr:a.g.paused?qr:rr,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);cr(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
879
879
|
S("shaka.cast.CastReceiver",Zq);Zq.prototype.destroy=Zq.prototype.destroy;Zq.prototype.setContentArtist=Zq.prototype.Wi;Zq.prototype.setContentImage=Zq.prototype.Xi;Zq.prototype.setContentTitle=Zq.prototype.Zi;Zq.prototype.clearContentMetadata=Zq.prototype.Fh;Zq.prototype.setContentMetadata=Zq.prototype.Yi;Zq.prototype.isIdle=Zq.prototype.oi;Zq.prototype.isConnected=Zq.prototype.isConnected;var lr=.5,hr=5,or="IDLE",rr="PLAYING",pr="BUFFERING",qr="PAUSED";function sr(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=tr(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
880
880
|
r||-1===u)p=ur(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,A=v.i,z=v.j,D=v.h;if(w!=h||A!=k||z!=l||D!=m)n.payload&&a.nestedCues.push(n),n=tr(d,e,w,A,z,D),h=w,k=A,l=z,m=D;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=ur(d,e),a.nestedCues.push(n));n=tr(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
@@ -882,12 +882,12 @@ function tr(a,b,c,d,e,f){a=new Qb(a,b,"");c&&a.textDecoration.push("underline");
|
|
|
882
882
|
function Br(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=Cr.has(c)?Cr.get(c):String.fromCharCode(c);break;case 1:d=Dr.get(c);break;case 2:a.i[a.g].pop();d=Er.get(c);break;case 3:a.i[a.g].pop(),d=Fr.get(c)}d&&a.i[a.g].push(new vr(d,a.m,a.j,a.o,a.l))}}function Gr(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Ar(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
883
883
|
var Cr=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"]]),Dr=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"]]),Er=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
|
|
884
884
|
[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"]]),Fr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
|
|
885
|
-
[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"]]),zr=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 Hr(a,b){this.h=0;this.o=new wr(a,b);this.i=new wr(a,b);this.g=this.j=new wr(a,b);this.l=0;this.m=null}function Ir(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=yr(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=3;d.h=b;return e}function Jr(a){a.h=1;a.g=a.j;a.g.h=0}function Kr(a){$a("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var Lr="black green blue cyan red yellow magenta black".split(" "),Mr="white green blue cyan red yellow magenta white_italics".split(" ");function Nr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.M=this.H=0;this.
|
|
886
|
-
function Sr(a,b,c){var d=new Qb(a.j,b,"");d.textAlign=0===a.
|
|
885
|
+
[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"]]),zr=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 Hr(a,b){this.h=0;this.o=new wr(a,b);this.i=new wr(a,b);this.g=this.j=new wr(a,b);this.l=0;this.m=null}function Ir(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=yr(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=3;d.h=b;return e}function Jr(a){a.h=1;a.g=a.j;a.g.h=0}function Kr(a){$a("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var Lr="black green blue cyan red yellow magenta black".split(" "),Mr="white green blue cyan red yellow magenta white_italics".split(" ");function Nr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.M=this.H=0;this.D=2;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";Or(this)}function Or(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Pr())}function Pr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Qr(a,b){Rr(a)&&(a.i[a.h][a.g]=new vr(b,a.C,a.A,a.s,a.B),a.g++)}function Rr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}Nr.prototype.isVisible=function(){return this.l};
|
|
886
|
+
function Sr(a,b,c){var d=new Qb(a.j,b,"");d.textAlign=0===a.D?"left":1===a.D?"right":Sb;var e=d.region;a.I&&(e.id+="svc"+a.I);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.M;e.viewportAnchorUnits=a.K?Kb:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
|
|
887
887
|
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=sr(d,"svc"+c,a.i,a.j,b))a.j=b;return c};function Tr(){this.i=[];this.h=null;this.g=0}function Ur(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 Vr(a.h)),a.h=null,a.g=0))}function Vr(a){this.g=0;this.h=a}Vr.prototype.qa=function(){return this.g<this.h.length};Vr.prototype.wa=function(){return this.g};function Wr(a){if(!a.qa())throw new T(2,2,3E3);return a.h[a.g++]}Vr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function Xr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
888
888
|
function Yr(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=Wr(b).value;b=null;c=t(Zr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Sr(e,d,a.i)),Or(e);return b}if(137===c)for(b=Wr(b).value,b=t(Zr(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=Wr(b).value;b=null;c=t(Zr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Sr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Wr(b).value;
|
|
889
889
|
b=null;c=t(Zr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Sr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Wr(b).value,$r(a,b,d);if(143===c)return d=$r(a,255,d),as(a),d;if(144===c)b.skip(1),d=Wr(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Wr(b).value,c=Wr(b).value,b.skip(1),a.g&&(b=bs((c&48)>>4,(c&12)>>2,c&3),a.g.B=bs((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Wr(b).value,b=Wr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
890
|
-
b.skip(1),d=Wr(b).value,b.skip(1),a.g&&(a.g.
|
|
890
|
+
b.skip(1),d=Wr(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Nr(c,a.i);f.j=d;a.h[c]=f}d=Wr(b).value;f=Wr(b).value;var g=Wr(b).value,h=Wr(b).value,k=Wr(b).value;b=Wr(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.M=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}
|
|
891
891
|
function Zr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function $r(a,b,c){var d=null;b=t(Zr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Sr(f,c,a.i));a.h[e]=null}return d}function as(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function bs(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return cs[a<<2|b<<1|c]}
|
|
892
892
|
var ds=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"]]),cs="black blue green cyan red magenta yellow white".split(" ");function es(){this.h=[];this.g=[];this.i=new Tr;this.l=0;this.m=new Map([["CC1",new Hr(0,0)],["CC2",new Hr(0,1)],["CC3",new Hr(1,0)],["CC4",new Hr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;fs(this)}es.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;fs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())as(b.value)};
|
|
893
893
|
function fs(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=0,c.g=c.j,c.m=null,xr(c.i),xr(c.j),xr(c.o);a.B=!0}
|
|
@@ -901,10 +901,10 @@ function hs(a,b){var c=[];try{for(;b.qa();){var d=Wr(b).value,e=(d&224)>>5,f=d&3
|
|
|
901
901
|
v;r=0;for(u=1;16>u;u++,r++)k.i[r]=k.i[u];for(u=0;1>u;u++,r++)k.i[r]=Pr()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=Sr(v,u,k.i));v.i[v.h]=Pr();v.g=0;break;case 12:v.isVisible()&&(e=Sr(v,u,k.i)),Or(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=Yr(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&
|
|
902
902
|
(127===k?Qr(e.g,"\u266a"):Qr(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&Qr(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(ds.has(k)){var A=ds.get(k);Qr(e.g,A)}else Qr(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?Qr(e.g,"_"):Qr(e.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(z){if(z instanceof T&&3E3===z.code)$a("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw z;}return c}
|
|
903
903
|
function is(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}es.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",es);Ib=function(){return new es};function js(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 ks(){this.j=new Map;this.i=this.h=0;this.g=ls}
|
|
904
|
-
ks.prototype.init=function(a){function b(f){f=f.name;f in ms&&(c.g=ms[f])}var c=this,d=[],e=[];(new Lg).box("moov",Qg).box("mvex",Qg).
|
|
905
|
-
function(f){f=$i(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).
|
|
904
|
+
ks.prototype.init=function(a){function b(f){f=f.name;f in ms&&(c.g=ms[f])}var c=this,d=[],e=[];(new Lg).box("moov",Qg).box("mvex",Qg).S("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.R();g=g.R();c.h=f;c.i=g}).box("trak",Qg).S("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.R();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.oa();g.oa();g.oa();g.oa();d.push(h)}).box("mdia",Qg).S("mdhd",
|
|
905
|
+
function(f){f=$i(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).S("stsd",Sg).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Tg).box("sinf",Qg).box("frma",function(f){f=cj(f.reader).codec;f in ms&&(c.g=ms[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==ls&&Ya("Unable to determine bitstream format for CEA parsing!");
|
|
906
906
|
d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
907
|
-
ks.prototype.parse=function(a){var b=this;if(this.g==ls)return[];var c=[],d=0,e=[];(new Lg).box("moof",function(f){d=f.start;e=[];Qg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Zc:b.h,Gd:b.i,Qg:[],timescale:9E4});Qg(f)}).
|
|
907
|
+
ks.prototype.parse=function(a){var b=this;if(this.g==ls)return[];var c=[],d=0,e=[];(new Lg).box("moof",function(f){d=f.start;e=[];Qg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Zc:b.h,Gd:b.i,Qg:[],timescale:9E4});Qg(f)}).S("trun",function(f){var g=e[e.length-1];f=aj(f.reader,f.version,f.flags);g.Qg.push(f)}).S("tfhd",function(f){var g=e[e.length-1];f=Yi(f.reader,f.flags);g.Zc=f.Zc||b.h;g.Gd=f.Gd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).S("tfdt",function(f){var g=e[e.length-
|
|
908
908
|
1];f=Zi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.wa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Ya("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);ns(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Zc,l.Gd,g,l.Qg,c)}}).parse(a,!1);return c};
|
|
909
909
|
function ns(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Yg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Hh);b.qa();){g=b.R();var p=b.U(),r=null;r=!1;h=1;switch(a.g){case os:r=p&31;r=6==r;break;case ps:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case qs:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].me||0),p=(c+p)/d,h=t(js(b.rb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
|
|
910
910
|
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Jf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",ks);var ls=0,os=1,ps=2,qs=3,ms={avc1:os,avc3:os,dvav:os,dva1:os,hev1:ps,hvc1:ps,dvh1:ps,dvhe:ps,vvc1:qs,vvi1:qs,dvc1:qs,dvi1:qs};Hb["video/mp4"]=function(){return new ks};function rs(){this.g=null}rs.prototype.init=function(){};rs.prototype.parse=function(a){this.g?this.g.clearData():this.g=new rj;var b=[];a=zb(a);if(!Fj(a))return b;a=this.g.parse(a);var c=a.$c(),d=a.Md();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(js(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
@@ -924,40 +924,40 @@ break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=
|
|
|
924
924
|
function Es(a,b){var c=Fs(a,b,"timescale"),d=1;c&&(d=vh(c)||1);c=Fs(a,b,"duration");(c=vh(c||""))&&(c/=d);var e=Fs(a,b,"startNumber"),f=Number(Fs(a,b,"presentationTimeOffset"))||0,g=wh(e||"");if(null==e||null==g)g=1;e=null;if(b=Gs(a,b,"SegmentTimeline")){b=hh(b,"S");e=d;a=a.ga.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],r=oh(n,"t",wh),u=oh(n,"d",wh),v=oh(n,"r",uh);n=oh(n,"k",uh)||0;null!=r&&(r-=f);if(u){r=null!=r?r:l;v=v||0;if(0>v)if(p){p=oh(p,"t",wh);if(null==
|
|
925
925
|
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,$f:r,zb:n,Ui:k.length+h}),r=l}}e=k}return{timescale:d,La:c,ud:g,Ob:f/d||0,Zf:f,timeline:e}}function Hs(a,b){return[b(a.J),b(a.ia),b(a.la)].filter(ye)}function Fs(a,b,c){b=Hs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
926
926
|
function Gs(a,b,c){b=Hs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=lh(d.value,c));d=b.next());return a}
|
|
927
|
-
function Is(a,b,c,d,e,f){for(var g=ph(a,"http://www.w3.org/1999/xlink","href"),h=ph(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=ch("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return cg(new T(2,4,4028));if("onLoad"!=h)return cg(new T(2,4,4027));var p=
|
|
927
|
+
function Is(a,b,c,d,e,f){for(var g=ph(a,"http://www.w3.org/1999/xlink","href"),h=ph(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=ch("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return cg(new T(2,4,4028));if("onLoad"!=h)return cg(new T(2,4,4027));var p=Ld([d],[g]);return e.request(0,sg(p,b)).za(function(r){r=$g(r.data,a.tagName);if(!r)return cg(new T(2,4,4001,g));for(a.children=
|
|
928
928
|
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return Js(a,b,c,p[0],e,f+1)})}
|
|
929
|
-
function Js(a,b,c,d,e,f){f=void 0===f?0:f;if(ph(a,"http://www.w3.org/1999/xlink","href")){var g=Is(a,b,c,d,e,f);c&&(g=g.
|
|
930
|
-
;function Ks(a,b,c,d,e,f,g){var h,k=(new Lg).
|
|
929
|
+
function Js(a,b,c,d,e,f){f=void 0===f?0:f;if(ph(a,"http://www.w3.org/1999/xlink","href")){var g=Is(a,b,c,d,e,f);c&&(g=g.za(void 0,function(){return Js(a,b,c,d,e,f)}));return g}g=[];for(var h=t(gh(a)),k=h.next(),l={};!k.done;l={Vc:void 0},k=h.next())l.Vc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==ph(l.Vc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Vc}}(l)):"SegmentTimeline"!=l.Vc.tagName&&g.push(Js(l.Vc,b,c,d,e,f));return gg(g).za(function(){return a})}
|
|
930
|
+
;function Ks(a,b,c,d,e,f,g){var h,k=(new Lg).S("sidx",function(l){h=Ls(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
931
931
|
function Ls(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.Oc(),m=g.reader.Oc();g.reader.skip(2);var n=g.reader.oa();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.R(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.R();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Fi(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 Ms(a){this.h=Eb(a);this.g=new Ig(this.h,0)}Ms.prototype.qa=function(){return this.g.qa()};
|
|
932
932
|
function Ns(a){var b=Os(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=Os(a);a:{d=t(Ps);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();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.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new Qs(c,
|
|
933
933
|
d)}function Os(a){var b=a.g.wa(),c=a.g.U();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return zb(a.h,b,c)}var Ps=[[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 Qs(a,b){this.id=a;this.g=b}
|
|
934
934
|
function Rs(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 Ss(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ms(a.g);for(var n=null,p=null;a.qa();){var r=Ns(a);if(187==r.id){var u=Ts(r);u&&(r=c*u.fj,u=b+u.Ki,null!=n&&m.push(new Fi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Fi(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
935
|
-
function Ts(a){var b=new Ms(a.g);a=Ns(b);if(179!=a.id)throw new T(2,3,3013);a=Rs(a);b=Ns(b);if(183!=b.id)throw new T(2,3,3012);b=new Ms(b.g);for(var c=0;b.qa();){var d=Ns(b);if(241==d.id){c=Rs(d);break}}return{fj:a,Ki:c}};function Us(a,b,c){b=Gs(a,b,"Initialization");if(!b)return null;var d=a.J.Ma(),e=b.attributes.sourceURL;e&&(d=
|
|
936
|
-
function Ws(a,b,c){var d=Number(Fs(a,Xs,"presentationTimeOffset"))||0,e=Fs(a,Xs,"timescale"),f=1;e&&(f=vh(e)||1);var g=d/f||0,h=Us(a,Xs,c);Ys(a,h);var k=Ke(a);return{jc:function(){var l=Gs(k,Xs,"RepresentationIndex");var m=k.J.Ma();l&&(l=Dd(l.attributes.sourceURL))&&(m=
|
|
935
|
+
function Ts(a){var b=new Ms(a.g);a=Ns(b);if(179!=a.id)throw new T(2,3,3013);a=Rs(a);b=Ns(b);if(183!=b.id)throw new T(2,3,3012);b=new Ms(b.g);for(var c=0;b.qa();){var d=Ns(b);if(241==d.id){c=Rs(d);break}}return{fj:a,Ki:c}};function Us(a,b,c){b=Gs(a,b,"Initialization");if(!b)return null;var d=a.J.Ma(),e=b.attributes.sourceURL;e&&(d=Ld(d,[Dd(e)]));e=0;var f=null;if(b=oh(b,"range",th))e=b.start,f=b.end;c=new Di(function(){return d},e,f,Vs(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
|
|
936
|
+
function Ws(a,b,c){var d=Number(Fs(a,Xs,"presentationTimeOffset"))||0,e=Fs(a,Xs,"timescale"),f=1;e&&(f=vh(e)||1);var g=d/f||0,h=Us(a,Xs,c);Ys(a,h);var k=Ke(a);return{jc:function(){var l=Gs(k,Xs,"RepresentationIndex");var m=k.J.Ma();l&&(l=Dd(l.attributes.sourceURL))&&(m=Ld(m,[l]));l=Zs(k);return $s(k,b,h,m,l.start,l.end,g)}}}
|
|
937
937
|
function $s(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G;return O(function(L){if(1==L.g)return h=a.presentationTimeline,k=!a.vb||!a.ga.pf,l=a.ga.start,m=a.ga.duration,n=a.J.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.L(),c.Ha,c.ta,!0):null],p=null,F(L,Promise.all(u),2);v=L.h;w=v[0];A=v[1]||null;z=null;D=l-g;y=l;B=m?l+m:Infinity;if("mp4"==n)var K=Ks(w,e,d,c,D,y,B);else{K=w;var I=new Ms(A);if(440786851!=Ns(I).id)throw new T(2,3,3008);var J=Ns(I);if(408125543!=J.id)throw new T(2,
|
|
938
938
|
3,3009);I=J.g.byteOffset;J=new Ms(J.g);for(var M=null;J.qa();){var N=Ns(J);if(357149030==N.id){M=N;break}}if(!M)throw new T(2,3,3010);M=new Ms(M.g);N=1E6;for(J=null;M.qa();){var P=Ns(M);if(2807729==P.id)N=Rs(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new T(2,3,3003);}if(null==J)throw new T(2,3,3011);M=N/1E9;J*=M;K=Ns(new Ms(K));if(475249515!=K.id)throw new T(2,3,3007);K=Ss(K,I,M,J,d,c,D,y,B)}z=K;C=t(z);for(E=C.next();!E.done;E=
|
|
939
939
|
C.next())G=E.value,G.codecs=a.J.codecs,G.mimeType=a.J.mimeType;h.rd(z);r=new Nk(z);k&&r.Dc(y,B,!0);return L.return(r)})}function Xs(a){return a.Sc}function Zs(a){var b=Gs(a,Xs,"RepresentationIndex");a=Fs(a,Xs,"indexRange");a=th(a||"");b&&(a=oh(b,"range",th,a));return a}function Ys(a,b){at(a,b);if(!Zs(a))throw new T(2,4,4002);}function at(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Ud&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
940
940
|
function Vs(a){var b=a.J;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.be,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ia.label||null,roles:a.roles||null,language:a.ia.language||null}};function bt(a,b,c){var d=Us(a,ct,c),e=dt(a);if(!e.La&&!e.timeline&&1<e.Kc.length)throw new T(2,4,4002);if(!e.La&&!a.ga.duration&&!e.timeline&&1==e.Kc.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.la.id&&a.J.id&&(g=b[a.la.id+","+a.J.id])&&(f=g.segmentIndex);var h=et(a.ga.start,a.ga.duration,a.J.Ma,e,d,c,a.J.mimeType,a.J.codecs);b=!f;f?f.qd(h,a.presentationTimeline.nb()):f=new Nk(h);a.presentationTimeline.rd(h);a.vb&&a.ga.pf||f.Dc(a.ga.start,
|
|
941
941
|
a.ga.duration?a.ga.start+a.ga.duration:Infinity,b);g&&(g.segmentIndex=f);return{jc:function(){f&&0!=f.getNumReferences()||f.Xd(h);return Promise.resolve(f)}}}function ct(a){return a.Qb}function dt(a){var b=ft(a);a=Es(a,ct);var c=a.ud;0==c&&(c=1);var d=0;a.La?d=a.La*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{La:a.La,startTime:d,ud:c,Ob:a.Ob,timeline:a.timeline,Kc:b}}
|
|
942
|
-
function et(a,b,c,d,e,f,g,h){var k=d.Kc.length;d.timeline&&d.timeline.length!=d.Kc.length&&(k=Math.min(d.timeline.length,d.Kc.length));for(var l=a-d.Ob,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={ue:void 0,ne:void 0},u++){r.ne=d.Kc[u];var v=p;p=void 0;p=null!=d.La?v+d.La:d.timeline?d.timeline[u].end:v+b;r.ue=null;r=new Fi(a+v,a+p,function(w){return function(){null==w.ue&&(w.ue=
|
|
943
|
-
function ft(a){return[a.J.Qb,a.ia.Qb,a.la.Qb].filter(ye).map(function(b){return hh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.kf&&(a.kf=!0);var c=Dd(b.attributes.media);b=oh(b,"mediaRange",th,{start:0,end:null});return{Bi:c,start:b.start,end:b.end}})};function gt(a,b,c,d,e,f,g,h,k){k||a.J.Pd||(a.J.Pd=Fs(a,ht,"initialization"));var l=a.J.Pd?it(a,g):null,m=jt(a);kt(m);var n=Ke(a);if(m.jd)return at(a,l),{jc:function(){var w=Ds(m.jd,n.J.id,null,null,n.bandwidth||null,null);w=
|
|
942
|
+
function et(a,b,c,d,e,f,g,h){var k=d.Kc.length;d.timeline&&d.timeline.length!=d.Kc.length&&(k=Math.min(d.timeline.length,d.Kc.length));for(var l=a-d.Ob,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={ue:void 0,ne:void 0},u++){r.ne=d.Kc[u];var v=p;p=void 0;p=null!=d.La?v+d.La:d.timeline?d.timeline[u].end:v+b;r.ue=null;r=new Fi(a+v,a+p,function(w){return function(){null==w.ue&&(w.ue=Ld(c(),[w.ne.Bi]));return w.ue}}(r),r.ne.start,r.ne.end,e,l,a,m,[],"",null,null,Gi,f);r.codecs=h;r.mimeType=g;n.push(r)}return n}
|
|
943
|
+
function ft(a){return[a.J.Qb,a.ia.Qb,a.la.Qb].filter(ye).map(function(b){return hh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.kf&&(a.kf=!0);var c=Dd(b.attributes.media);b=oh(b,"mediaRange",th,{start:0,end:null});return{Bi:c,start:b.start,end:b.end}})};function gt(a,b,c,d,e,f,g,h,k){k||a.J.Pd||(a.J.Pd=Fs(a,ht,"initialization"));var l=a.J.Pd?it(a,g):null,m=jt(a);kt(m);var n=Ke(a);if(m.jd)return at(a,l),{jc:function(){var w=Ds(m.jd,n.J.id,null,null,n.bandwidth||null,null);w=Ld(n.J.Ma(),[w]);return $s(n,b,l,w,0,null,m.Ob)}};if(m.La)return d||"image"===a.ia.contentType||(c=a.ga.start,d=a.la.id,k=a.ga.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.xf(m.La),a.presentationTimeline.Og(c,d)),{jc:function(){return lt(n,m,e,l,f,g,h)}};
|
|
944
944
|
var p=null;d=d=null;a.la.id&&a.J.id&&(d=a.la.id+","+a.J.id,d=c[d])&&(p=d.segmentIndex);var r=a.ga.start,u=a.ga.duration?r+a.ga.duration:Infinity,v=!(a.vb&&a.ga.pf);p?(c=p,mt(c,m,r,u,v,l),c.Ga(a.presentationTimeline.nb())):p=new nt(m,a.J.id,a.bandwidth,a.J.Ma,r,u,l,v,g,a.J.Kf);m.timeline&&"image"!==a.ia.contentType&&a.presentationTimeline.Pg(m.timeline,r);d&&a.vb&&(d.segmentIndex=p);return{jc:function(){p instanceof nt&&0==p.getNumReferences()&&mt(p,m,r,u,v,l);return Promise.resolve(p)}}}
|
|
945
945
|
function ht(a){return a.bc}function jt(a){var b=Es(a,ht),c=Fs(a,ht,"media"),d=Fs(a,ht,"index");return{La:b.La,timescale:b.timescale,ud:b.ud,Ob:b.Ob,Zf:b.Zf,timeline:b.timeline,$b:c&&Dd(c),jd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function kt(a){var b=a.jd?1:0;b+=a.timeline?1:0;b+=a.La?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.jd&&(a.timeline=null),a.La=null);if(!a.jd&&!a.$b)throw new T(2,4,4002);}
|
|
946
|
-
function lt(a,b,c,d,e,f,g){function h(I){var J=(I-v)*u,M=J+b.Ob,N=J+n;J=N+u;var P=Math.min(J,l());N=new Fi(N,P,function(){var R=M*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(M)*BigInt(w));R=Ds(A,D,I,null,z,R);return
|
|
946
|
+
function lt(a,b,c,d,e,f,g){function h(I){var J=(I-v)*u,M=J+b.Ob,N=J+n;J=N+u;var P=Math.min(J,l());N=new Fi(N,P,function(){var R=M*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(M)*BigInt(w));R=Ds(A,D,I,null,z,R);return Ld(y(),[R])},0,null,d,B,n,l(),[],"",null,null,Gi,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.j=J;return N}function k(){var I=[Math.max(m.nb(),n),Math.min(m.Xb(),l())].map(function(J){return J-n});I=[Math.ceil(I[0]/u),Math.ceil(I[1]/u)-1];a.J.Sa&&I[1]++;return I.map(function(J){return J+
|
|
947
947
|
v})}function l(){var I=null!=p&&e[p]||r;return I?n+I:Infinity}var m=a.presentationTimeline,n=a.ga.start,p=a.la.id,r=a.ga.duration,u=b.La,v=b.ud,w=b.timescale,A=b.$b,z=a.bandwidth||null,D=a.J.id,y=a.J.Ma,B=n-b.Ob,C=k();c=a.vb?Math.max(C[0],C[1]-c+1):C[0];g=g||C[1];C=[];for(var E=c;E<=g;++E){var G=h(E);C.push(G)}var L=new Nk(C);C=m.Xb()<l();E=m.V();if(C||E){var K=Math.max(c,g+1);c=u;a.J.Sa&&(c=.1);L.te(c,function(){var I=m.nb();L.Ga(I);var J=t(k());J.next();J=J.next().value;for(var M=[];K<=J;){var N=
|
|
948
|
-
h(K);M.push(N);K++}return I>l()&&!M.length?null:M})}return Promise.resolve(L)}function it(a,b){var c=a.J.Pd;c||(c=Fs(a,ht,"initialization"));if(!c)return null;c=Dd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.Ma;b=new Di(function(){var g=Ds(c,d,null,null,e,null);return
|
|
949
|
-
function nt(a,b,c,d,e,f,g,h,k,l){Nk.call(this,[]);this.g=a;this.C=b;this.A=c;this.B=d;this.i=e;this.j=f;this.o=g;this.s=k;this.
|
|
948
|
+
h(K);M.push(N);K++}return I>l()&&!M.length?null:M})}return Promise.resolve(L)}function it(a,b){var c=a.J.Pd;c||(c=Fs(a,ht,"initialization"));if(!c)return null;c=Dd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.Ma;b=new Di(function(){var g=Ds(c,d,null,null,e,null);return Ld(f(),[g])},0,null,Vs(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}
|
|
949
|
+
function nt(a,b,c,d,e,f,g,h,k,l){Nk.call(this,[]);this.g=a;this.C=b;this.A=c;this.B=d;this.i=e;this.j=f;this.o=g;this.s=k;this.D=l;h&&ot(this)}na(nt,Nk);q=nt.prototype;q.getNumReferences=function(){return this.g?this.g.timeline.length:0};q.release=function(){Nk.prototype.release.call(this);this.g=null};
|
|
950
950
|
q.Ga=function(a){if(this.g){for(var b=0,c=this.g.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.g.timeline=c.slice(b),this.P.length>=b&&(this.P=this.P.slice(b)),this.h+=b,0===this.getNumReferences()&&this.release())}};
|
|
951
|
-
function mt(a,b,c,d,e,f){pt(a,f);if(a.g){c=a.g.timeline;a.g.$b!==b.$b&&(a.g.$b=b.$b);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.
|
|
951
|
+
function mt(a,b,c,d,e,f){pt(a,f);if(a.g){c=a.g.timeline;a.g.$b!==b.$b&&(a.g.$b=b.$b);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();0<b.length&&a.g.timeline.push.apply(a.g.timeline,x(b));a.j!==d&&(a.j=d)}else a.g=b,a.i=c,a.j=d;e&&ot(a)}function pt(a,b){if(a.o!==b){a.o=b;a=t(a.P);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ii(c,b)}}
|
|
952
952
|
function ot(a){if(!a.m){for(var b=a.g.timeline;b.length;)if(b[b.length-1].start>=a.j)b.pop();else break;a.Ga(a.i)}}q.find=function(a){if(this.g&&this.g.timeline&&this.g.timeline.length&&a<this.g.timeline[0].start+this.i)return this.h;if(!this.g)return null;var b=this.g.timeline;if(a<this.i||a>=this.j)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.j?e.end+this.i:this.j;if(a>=f&&a<e)return d+this.h}return null};
|
|
953
953
|
q.get=function(a){var b=this;a-=this.h;if(0>a||a>=this.getNumReferences()||!this.g)return null;var c=this.P[a];if(!c){var d=this.g.timeline[a],e=d.Ui,f=this.g.Zf+d.$f;c=this.i-this.g.Ob;var g=this.i+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.j&&(h=this.j);for(var k=this.g.codecs,l=this.g.mimeType,m=[],n=(d.end-d.start)/d.zb,p={},r=0;r<d.zb;p={ve:void 0,mh:void 0},r++){var u=d.start+n*r,v=u+n;p.mh=r+1;p.ve=null;p=new Fi(this.i+u,this.i+v,function(w){return function(){if(!b.g)return[];
|
|
954
|
-
null==w.ve&&(w.ve=qt(b.g.$b,b.C,e,b.A,f,w.mh,b.B));return w.ve}}(p),0,null,this.o,c,this.i,this.j,[],"",null,null,Gi,this.s);p.codecs=k;p.mimeType=l;0==this.
|
|
955
|
-
function qt(a,b,c,d,e,f,g){a=Ds(a,b,c,f,d||null,e);return
|
|
956
|
-
function st(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=
|
|
957
|
-
function tt(a,b){if(!a.m.length)return b;b=new tc(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)));Ic(e)&&xc(b,e);return b.toString()}function ut(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Rc(function(){st(a,d)});if(c=b.TTL)a.C=c;a.g.$(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.
|
|
954
|
+
null==w.ve&&(w.ve=qt(b.g.$b,b.C,e,b.A,f,w.mh,b.B));return w.ve}}(p),0,null,this.o,c,this.i,this.j,[],"",null,null,Gi,this.s);p.codecs=k;p.mimeType=l;0==this.D?0<r&&p.Vd():0!=r%this.D&&p.Vd();m.push(p)}c=new Fi(this.i+d.start,h,function(){return 0<d.zb||!b.g?[]:qt(b.g.$b,b.C,e,b.A,f,null,b.B)},0,null,this.o,c,this.i,this.j,m,"",null,null,Gi,this.s,0<d.zb);c.codecs=k;c.mimeType=l;c.j=g;this.P[a]=c}return c};
|
|
955
|
+
function qt(a,b,c,d,e,f,g){a=Ds(a,b,c,f,d||null,e);return Ld(g(),[a]).map(function(h){return h.toString()})};function rt(a){this.o=null;this.A=a;this.G=new lg;this.i=[];this.h=null;this.m=[];this.B=null;this.D=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}rt.prototype.configure=function(a){this.o=a};rt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.D=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};rt.prototype.setManifestType=function(a){this.s=a};
|
|
956
|
+
function st(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Ld(a.i,[tt(a,b)]),d=sg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),mg(a.G,e),ra(l,2),F(l,e.promise,4);if(2!=l.g)return f=l.h,g=vd(f.data),h=JSON.parse(g),1==h.VERSION&&ut(a,h,f.uri),ta(l,0);if((k=ua(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Rc(function(){st(a,b)});a.g.$(a.C);H(l)})}
|
|
957
|
+
function tt(a,b){if(!a.m.length)return b;b=new tc(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)));Ic(e)&&xc(b,e);return b.toString()}function ut(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Rc(function(){st(a,d)});if(c=b.TTL)a.C=c;a.g.$(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.D=b["PATHWAY-CLONES"]||[]}
|
|
958
958
|
function vt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}rt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
959
|
-
function wt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Mc:void 0},f=e.next())if(g.Mc=f.value,f=b.get(g.Mc))d.push({Df:g.Mc,location:f});else if(f=a.
|
|
960
|
-
h=a.j.get(f),e>h&&a.j.delete(f);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 tc(k.location)).Eb))return!1;return!0});d.length&&(a.B=d[0].Df);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:
|
|
959
|
+
function wt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Mc:void 0},f=e.next())if(g.Mc=f.value,f=b.get(g.Mc))d.push({Df:g.Mc,location:f});else if(f=a.D.find(function(k){return function(l){return l.yj==k.Mc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].th?(h=new tc(h),vc(h,f["URI-REPLACEMENT"].th),d.push({Df:g.Mc,location:h.toString()})):d.push({Df:g.Mc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
960
|
+
h=a.j.get(f),e>h&&a.j.delete(f);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 tc(k.location)).Eb))return!1;return!0});d.length&&(a.B=d[0].Df);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Ld(a.i,d)};function xt(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=xt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};q.gi=function(){return this.l};q.hf=function(){return this.j.slice()};q.Ph=function(){return this.i};
|
|
961
961
|
q.qg=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Ud)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
|
|
962
962
|
d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
|
|
963
963
|
function yt(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[zt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[At(n),n]})),l=new Map(h.textStreams.map(function(n){return[Bt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ct(n),n]}));if(b){var m=Dt(Ud);l.set(Bt(m),m);m=Dt("image");h.set(Ct(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{jg:c,rh:d,nh:e,Fg:f}}
|
|
@@ -992,24 +992,24 @@ function au(a,b,c){if(b==a&&a!=c)return cu;if(c==a&&a!=b)return bu;if(b>a){if(c<
|
|
|
992
992
|
function At(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,$t(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function zt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,$t(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Bt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
993
993
|
function Ct(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function $t(a){if(!fu.has(a)){var b=fe(a);fu.set(a,b)}return fu.get(a)}S("shaka.util.PeriodCombiner",xt);xt.prototype.setUseStreamOnce=xt.prototype.ih;xt.prototype.setAllowMultiTypeVariants=xt.prototype.ah;xt.prototype.combinePeriods=xt.prototype.Je;xt.prototype.deleteStream=xt.prototype.qg;xt.prototype.getImageStreams=xt.prototype.Ph;xt.prototype.getTextStreams=xt.prototype.hf;xt.prototype.getVariants=xt.prototype.gi;
|
|
994
994
|
var bu=1,eu=0,cu=-1,fu=new Map;function gu(a,b){var c=new DOMParser,d=hu.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 iu(a,b){try{var c=zd(a);return gu(c,b)}catch(d){return null}}
|
|
995
|
-
var hu=new Kc(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 ju(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.na=1;this.
|
|
996
|
-
new gb;this.I=null;this.
|
|
995
|
+
var hu=new Kc(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 ju(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.na=1;this.D=[];this.l={Zd:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,sd:0};this.s=new Map;this.o={};this.B={};this.fa={};this.m=new xt;this.K=0;this.ma=new Ra(5);this.M=new Rc(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.kb(a.I,"timeupdate"),a.I.paused)){a.G.ka(a.I,"timeupdate",function(){return ku(a)});return}ku(a)});this.T=new lg;this.O=null;this.C=[];this.da=Infinity;this.H=!1;this.h=null;this.N=0;this.ea=!1;this.G=
|
|
996
|
+
new gb;this.I=null;this.Y=!1;this.aa=[]}q=ju.prototype;q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.V()&&this.M.vc();this.h&&this.h.configure(this.g);this.m&&(this.m.ah(this.g.dash.multiTypeVariantsAllowed&&ob()),this.m.ih(this.g.dash.useStreamOnceInPeriodFlattening))};
|
|
997
997
|
q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.H=b.isLowLatencyMode(),c.A=[a],c.j=b,F(e,lu(c),2);d=e.h;c.j&&mu(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
998
|
-
q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Zd:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,sd:0};this.m=null;null!=this.M&&(this.M.stop(),this.M=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.
|
|
998
|
+
q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Zd:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,sd:0};this.m=null;null!=this.M&&(this.M.stop(),this.M=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.T.destroy()};
|
|
999
999
|
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ra(c,2),F(c,lu(a),4);if(2!=c.g)return ta(c,0);b=ua(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.V()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Xb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,mu(this,0))}}};
|
|
1000
1000
|
q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.I=a};
|
|
1001
1001
|
function lu(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return b=4,c="MPD",d=nu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=wt(a.h,"Location",!0),f.length&&(e=f)),g=sg(e,a.g.retryParameters),h=Date.now(),F(n,ou(a,g,0,{type:b}),2);if(3!=n.g){k=n.h;if(!a.j)return n.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);return F(n,pu(a,k.data,k.uri,c),3)}l=Date.now();m=(l-h)/1E3;a.ma.sample(1,m);return n.return(m)})}
|
|
1002
1002
|
function pu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=vm;if(f!=g){qb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=iu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ad(h.outerHTML)}k=$g(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=wm;l!=m&&l(k);if("Patch"===d)return v.return(qu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(ru(a,k,c));
|
|
1003
|
-
p=a.g.dash.xlinkFailGracefully;r=Js(k,a.g.retryParameters,p,c,a.j.networkingEngine);mg(a.
|
|
1004
|
-
function ru(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za,Va,
|
|
1005
|
-
"";a.l.sd=oh(b,"publishTime",rh)||0;a.
|
|
1006
|
-
J=I.attributes.serviceLocation,M=jh(I),J&&M&&(vt(a.h,"BaseURL",J,M),G=!0);a.
|
|
1007
|
-
sh));Pa=a.g.dash.ignoreMaxSegmentDuration;Za=null;Pa||(Za=oh(b,"maxSegmentDuration",sh));Va=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.
|
|
1008
|
-
|
|
1009
|
-
a.H&&
|
|
1010
|
-
gapCount:a.N,isLowLatency:a.
|
|
1011
|
-
function qu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J;return O(function(M){if(1==M.g){c=b.attributes.mpdId;d=oh(b,"originalPublishTime",rh);if(!c||c!==a.l.Zd||d!==a.l.sd)throw a.
|
|
1012
|
-
N}}else if("type"===n.Tb){a.i.presentationTimeline.uc("static"==p);a.l.type=p;N=t(a.s.values());for(P=N.next();!P.done;P=N.next())P.value.vb="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Tb?a.l.sd=rh(p)||0:null===n.Tb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Bh(a.
|
|
1003
|
+
p=a.g.dash.xlinkFailGracefully;r=Js(k,a.g.retryParameters,p,c,a.j.networkingEngine);mg(a.T,r);return F(v,r.promise,2)}u=v.h;return v.return(ru(a,u,c))})}
|
|
1004
|
+
function ru(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za,Va,Aa,bb,bc,Sa,nb,Tb,Vc,ud,me,Md,pf,ne,Mi,Gg,Ni,Hg;return O(function(cc){switch(cc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=hh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=jh(l))p=Ld(d,[n])[0],m&&(a.h?vt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=wt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Zd=b.attributes.id||
|
|
1005
|
+
"";a.l.sd=oh(b,"publishTime",rh)||0;a.D=hh(b,"PatchLocation");u=Promise.resolve();if((v=lh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new rt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=jh(v))(z=oh(v,"queryBeforeStart",yh,!1))?u=st(a.h,A):st(a.h,A);D=t(f.keys());for(y=D.next();!y.done;y=D.next())B=y.value,C=f.get(B),vt(a.h,"Location",B,C)}E=hh(b,"BaseURL");G=!1;if(a.h)for(L=t(E),K=L.next();!K.done;K=L.next())I=K.value,
|
|
1006
|
+
J=I.attributes.serviceLocation,M=jh(I),J&&M&&(vt(a.h,"BaseURL",J,M),G=!0);a.aa=null;G&&a.h||(N=E.map(jh),a.aa=Ld(d,N));P=function(){return a.h&&G?wt(a.h,"BaseURL"):a.aa?a.aa:[]};a.l.Ma=P;R=0;E&&E.length&&(R=oh(E[0],"availabilityTimeOffset",xh)||0);a.l.Sa=R;Q=a.g.dash.ignoreMinBufferTime;W=0;Q||(W=oh(b,"minBufferTime",sh)||0);a.K=oh(b,"minimumUpdatePeriod",sh,-1);Y=oh(b,"availabilityStartTime",rh);va=oh(b,"timeShiftBufferDepth",sh);Fa=a.g.dash.ignoreSuggestedPresentationDelay;wa=null;Fa||(wa=oh(b,
|
|
1007
|
+
"suggestedPresentationDelay",sh));Pa=a.g.dash.ignoreMaxSegmentDuration;Za=null;Pa||(Za=oh(b,"maxSegmentDuration",sh));Va=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.Y=a.i.presentationTimeline.V()&&"static"==Va);a.l.type=Va;su(a);if(a.i)for(Aa=a.i.presentationTimeline,bb=t(Object.values(a.o)),bc=bb.next();!bc.done;bc=bb.next())Sa=bc.value,Sa.segmentIndex&&Sa.segmentIndex.Ga(Aa.nb());else nb=a.g.defaultPresentationDelay||1.5*W,Tb=null!=wa?wa:nb,Aa=new rk(Y,Tb,a.g.dash.autoCorrectDrift);
|
|
1008
|
+
Aa.uc("static"==Va);(Vc=Aa.V())&&!isNaN(a.g.availabilityWindowOverride)&&(va=a.g.availabilityWindowOverride);null==va&&(va=Infinity);Aa.oe(va);ud=b.attributes.profiles||"";a.l.profiles=ud.split(",");me={vb:"static"!=Va,presentationTimeline:Aa,la:null,ga:null,ia:null,J:null,bandwidth:0,kf:!1,Sa:R,Lb:null,profiles:ud.split(","),roles:null};a.N=0;Md=tu(a,me,P,b,!1);pf=Md.duration;ne=Md.periods;("static"!=Va||a.Y)&&Md.sg||Aa.Za(pf||Infinity);a.ea&&!a.H&&(Mi=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),
|
|
1009
|
+
a.H=a.j.isLowLatencyMode());a.H&&Aa.bh(a.da);Aa.xf(Za||1);return F(cc,u,2);case 2:a.H&&(W=0,Gg=null!=wa?wa:a.g.defaultPresentationDelay,Aa.Of(Gg));if(!a.i)return F(cc,a.m.Je(ne,me.vb),6);a.i.periodCount=ne.length;a.i.gapCount=a.N;return F(cc,uu(a,ne,!1),4);case 6:a.i={presentationTimeline:Aa,variants:a.m.l,textStreams:a.m.hf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:W||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:vu(b),
|
|
1010
|
+
nextUrl:wu(b),periodCount:ne.length,gapCount:a.N,isLowLatency:a.ea};if(!Aa.ph()){cc.u(7);break}Ni=hh(b,"UTCTiming");return F(cc,xu(a,P,Ni),8);case 8:Hg=cc.h;if(!a.j)return cc.return();Aa.dh(Hg);case 7:Aa.Ud();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(cc)}})}function uu(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,a.m.Je(b,!0,c),2);a.i.variants=a.m.l;d=a.m.hf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
|
|
1011
|
+
function qu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J;return O(function(M){if(1==M.g){c=b.attributes.mpdId;d=oh(b,"originalPublishTime",rh);if(!c||c!==a.l.Zd||d!==a.l.sd)throw a.D=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(gh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Ah(l.attributes.sel||""),n=m[m.length-1],p=jh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Tb){r=jh(l)||"";var N=sh(r);if(null!=N){a.l.Lb=N;for(var P=t(a.s.values()),R=P.next();!R.done;R=P.next())R.value.Lb=
|
|
1012
|
+
N}}else if("type"===n.Tb){a.i.presentationTimeline.uc("static"==p);a.l.type=p;N=t(a.s.values());for(P=N.next();!P.done;P=N.next())P.value.vb="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Tb?a.l.sd=rh(p)||0:null===n.Tb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Bh(a.D,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&yu(a,n.id);else if("SegmentTemplate"===n.name){P=Ah(l.attributes.sel||"");N=P[P.length-1];if(N.Tb){P=zu(a,P);R=jh(l)||
|
|
1013
1013
|
"";for(var Q=t(P),W=Q.next();!W.done;W=Q.next())W=a.s.get(W.value),Dh(W.J.bc,l.tagName,N.Tb,R);N=P}else N=[];u=N;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){N=Ah(l.attributes.sel||"");N=zu(a,N);P=t(N);for(R=P.next();!R.done;R=P.next())R=a.s.get(R.value),R=Gs(R,ht,"SegmentTimeline"),Q=hh(R,"S"),Bh(Q,l),R.children=Q;z=N;D=t(z);for(y=D.next();!y.done;y=D.next())B=y.value,g.add(B)}C=t(g);for(E=C.next();!E.done;E=C.next())G=E.value,Au(a,
|
|
1014
1014
|
G);L=t(f);for(K=L.next();!K.done;K=L.next())I=K.value,e.push.apply(e,x(tu(a,{vb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,la:null,ga:null,ia:null,J:null,bandwidth:0,kf:!1,Sa:a.l.Sa,profiles:a.l.profiles,Lb:a.l.Lb,roles:null},a.l.Ma,I,!0).periods));if(!e.length)return M.u(2);a.i.periodCount+=e.length;a.i.gapCount=a.N;return F(M,uu(a,e,!0),2)}"static"==a.l.type&&(J=a.l.Lb,a.i.presentationTimeline.Za(J||Infinity));H(M)})}
|
|
1015
1015
|
function yu(a,b){a.i.periodCount--;for(var c=t(a.s.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.s.get(d);Gs(e,ht,"SegmentTimeline").children=[];Au(a,d);a.s.delete(d)}a.C=a.C.filter(function(f){return f!==b})}
|
|
@@ -1017,8 +1017,8 @@ function zu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.n
|
|
|
1017
1017
|
","+a.J.id);return b}function Au(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ga(a.i.presentationTimeline.nb());try{var e=gt(c,function(f,g,h,k){return Bu(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.fa,c.J.aesKey,null,!0);d.createSegmentIndex=function(){return O(function(f){if(1==f.g)return d.segmentIndex?f.u(0):F(f,e.jc(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.J.contentType,b!=Ud&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
1018
1018
|
function vu(a){var b=lh(a,"ServiceDescription");if(!b)return null;a=lh(b,"Latency");b=lh(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)));
|
|
1019
1019
|
return c}function wu(a){a=hh(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}
|
|
1020
|
-
function tu(a,b,c,d,e){var f=b.Lb;f||(f=oh(d,"mediaPresentationDuration",sh),a.l.Lb=f);var g=0;a.i&&a.i.presentationTimeline&&a.
|
|
1021
|
-
d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=Cu(a,b,c,{start:p,duration:v,node:m,pf:null==v||!n});h.push(k);b.la.id&&v&&(a.fa[b.la.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(A){return A.id});return null!=f?{periods:h,duration:f+g,sg:!1}:{periods:h,duration:k,sg:!0}}
|
|
1020
|
+
function tu(a,b,c,d,e){var f=b.Lb;f||(f=oh(d,"mediaPresentationDuration",sh),a.l.Lb=f);var g=0;a.i&&a.i.presentationTimeline&&a.Y&&(g=a.i.presentationTimeline.Jb());var h=[],k=g;d=hh(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=oh(m,"start",sh,k),r=m.attributes.id,u=oh(m,"duration",sh);p=0==l&&0==p&&a.Y?g:p;var v=null;if(n){var w=oh(n,"start",sh);null!=w&&(v=w-p+g)}else null!=f&&(v=f-p+g);w=Xd;v&&u&&Math.abs(v-u)>w&&v>u&&a.N++;null==v&&(v=u);if(!(null!==a.O&&null!==r&&null!==p&&p<
|
|
1021
|
+
a.O)||a.C.includes(r)||l+1==d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=Cu(a,b,c,{start:p,duration:v,node:m,pf:null==v||!n});h.push(k);b.la.id&&v&&(a.fa[b.la.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(A){return A.id});return null!=f?{periods:h,duration:f+g,sg:!1}:{periods:h,duration:k,sg:!0}}
|
|
1022
1022
|
function su(a){var b=Object.keys(a.B).filter(function(f){return!a.C.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.B[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.qg(a.o[e],c),delete a.o[e];delete a.B[c]}}
|
|
1023
1023
|
function Cu(a,b,c,d){b.la=Du(a,d.node,null,c);b.ga=d;b.la.Sa=b.Sa;b.la.id||(b.la.id="__shaka_period_"+d.start);var e=hh(d.node,"EventStream");c=b.presentationTimeline.nb();e=t(e);for(var f=e.next();!f.done;f=e.next())Eu(a,d.start,d.duration,f.value,c);c=hh(d.node,"AdaptationSet").map(function(m,n){return Fu(a,b,n,m)}).filter(ye);if(b.vb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Oi);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,
|
|
1024
1024
|
4,4018);}d=c.filter(function(m){return!m.Yf});c=c.filter(function(m){return m.Yf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Yf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next(),l={};!k.done;l={Sf:void 0},k=h.next())l.Sf=k.value,l.Sf.trickModeVideo=e.streams.find(function(m){return function(n){return fe(m.Sf.codecs)==fe(n.codecs)}}(l))}}c=Gu(a.g.disableAudio,d,"audio");e=Gu(a.g.disableVideo,d,"video");f=Gu(a.g.disableText,
|
|
@@ -1030,37 +1030,37 @@ var z=new Map,D;n=t(n);for(v=n.next();!v.done;v=n.next())if(w=v.value,v=w.attrib
|
|
|
1030
1030
|
C=y=void 0;B.includes("=")?(B=B.split("="),y="svc"+B[0],C=B[1].split(",")[0].split(":").pop()):(y="svc"+v,v++,C=B);z.set(y,Be(C))}}else z.set("svc1","und");else if(v=1,null!=w)for(w=w.split(";"),y=t(w),B=y.next();!B.done;B=y.next()){C=B.value;var E=B=void 0;C.includes("=")?(C=C.split("="),B=C[0].startsWith("CC")?C[0]:"CC"+C[0],E=C[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,E=C);z.set(B,Be(E))}else z.set("CC1","und");if(m)return null;m=hh(d,"ContentProtection");var G=ss(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),
|
|
1031
1031
|
L=Be(b.ia.language||"und"),K=b.ia.label;m=hh(d,"Representation");d=m.map(function(I){if(I=Hu(a,b,G,k,L,K,g,h,z,I,D,A))I.hdr=I.hdr||p,I.colorGamut=I.colorGamut||r,I.fastSwitching=u;return I}).filter(function(I){return!!I});if(0==d.length){c="image"==b.ia.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new T(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=Iu(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=b.ia.contentType;
|
|
1032
1032
|
l=b.ia.id||"__fake__"+a.na++;n=t(d);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(G.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(I){return I.attributes.id}).filter(ye);return{id:l,contentType:b.ia.contentType,language:L,gk:g,streams:d,drmInfos:G.drmInfos,Yf:c,Oi:m}}
|
|
1033
|
-
function Hu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=Du(a,l,b.ia,null);var p=b.J.id;a.
|
|
1033
|
+
function Hu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=Du(a,l,b.ia,null);var p=b.J.id;a.da=Math.min(a.da,b.J.Sa);a.ea=0<a.da;if(!Ju(b.J))return null;var r=b.ga.start;b.bandwidth=oh(l,"bandwidth",vh)||0;b.roles=h;var u=b.J.contentType,v=u==Ud||"application"==u;u="image"==u;try{var w=void 0;if(c.Ee){var A=b.J.Ma,z=Ld(A(),[c.Ee.vi]),D=sg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Ee.iv,firstMediaSequenceNumber:0,fetchKey:function(){var J,M,N;return O(function(P){if(1==P.g)return F(P,ou(a,D,6),
|
|
1034
1034
|
2);if(3!=P.g){J=P.h;if(!J.data||16!=J.data.byteLength)throw new T(2,4,4049);M={name:"AES-CBC"};N=w;return F(P,window.crypto.subtle.importKey("raw",J.data,M,!0,["decrypt"]),3)}N.cryptoKey=P.h;w.fetchKey=void 0;H(P)})}}}b.J.aesKey=w;A=function(J,M,N,P){return Bu(a,J,M,N,P)};if(b.J.Sc)var y=Ws(b,A,w);else if(b.J.Qb)y=bt(b,a.o,w);else if(b.J.bc)y=gt(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.fa,w,n,!1);else{var B=b.ga.duration||0,C=b.J.Ma,E=b.J.mimeType,G=b.J.codecs;y={jc:function(){var J=Pk(r,B,C());
|
|
1035
1035
|
J.Hb(function(M){M.mimeType=E;M.codecs=G});return Promise.resolve(J)}}}}catch(J){if((v||u)&&4002==J.code)return null;throw J;}n=hh(l,"ContentProtection");n=ws(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;hh(l,"SupplementalProperty").some(function(J){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==J.attributes.schemeIdUri&&"JOC"==J.attributes.value})&&(A=!0);z=!1;v&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var L;if(u&&((l=hh(l,"EssentialProperty").find(function(J){return["http://dashif.org/thumbnail_tile",
|
|
1036
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(J.attributes.schemeIdUri)}))&&(L=l.attributes.value),!L))return null;var K;v=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(v.includes("hvc1.2.4.L153.B0")||v.includes("hev1.2.4.L153.B0"))&&(K="PQ");l=b.J.id?b.la.id+","+b.J.id:"";a.
|
|
1036
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(J.attributes.schemeIdUri)}))&&(L=l.attributes.value),!L))return null;var K;v=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(v.includes("hvc1.2.4.L153.B0")||v.includes("hev1.2.4.L153.B0"))&&(K="PQ");l=b.J.id?b.la.id+","+b.J.id:"";a.D.length&&p&&a.s.set(b.la.id+","+p,Ku(b));var I=l&&a.o[l]?a.o[l]:{id:a.na++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){I.segmentIndex&&
|
|
1037
1037
|
(I.segmentIndex.release(),I.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:v,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ia.language,label:f,type:b.ia.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.J.be,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:A,
|
|
1038
1038
|
closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:L,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Zd(b.J.mimeType,b.J.codecs)])};I.createSegmentIndex=function(){var J;return O(function(M){if(1==M.g){if(I.segmentIndex)return M.u(0);J=I;return F(M,y.jc(),3)}J.segmentIndex=M.h;H(M)})};l&&b.vb&&!a.o[l]&&(b=b.la.id||"",a.B[b]||(a.B[b]=[]),a.o[l]=I,a.B[b].push(l));return I}
|
|
1039
1039
|
function Ku(a){function b(c){if(!c)return null;c=Ke(c);c.Sc=null;c.Qb=null;c.bc=Fh(c.bc);return c}a=Ke(a);a.la=b(a.la);a.ia=b(a.ia);a.J=b(a.J);a.ga&&(a.ga=Ke(a.ga),a.ga.node=null);return a}
|
|
1040
1040
|
function ku(a){var b,c;return O(function(d){switch(d.g){case 1:return b=0,ra(d,2),F(d,lu(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=ua(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();mu(a,b);H(d)}})}function mu(a,b){if(!(0>a.K)){var c=a.K;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.M.$(Math.max(c-b,Ta(a.ma)))}}
|
|
1041
1041
|
function Du(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,be:null,audioSamplingRate:null,Sa:0,Kf:0};d=d||c.Ma;var e=b.attributes.id,f=hh(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=jh(m);l&&m&&(vt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(jh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=ph(b,
|
|
1042
1042
|
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=vl(m).join(",");n=oh(b,"frameRate",zh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=Lu(hh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=hh(b,"AudioChannelConfiguration");u=Mu(u)||c.be;var v=oh(b,"audioSamplingRate",wh)||c.audioSamplingRate;k||(k=Iu(l,m));var w=lh(b,"SegmentBase"),A=lh(b,"SegmentTemplate"),z=w?oh(w,"availabilityTimeOffset",xh)||0:0,D=A?oh(A,"availabilityTimeOffset",xh)||0:0,y=f&&f.length?oh(f[0],"availabilityTimeOffset",
|
|
1043
|
-
xh)||0:0;z=c.Sa+y+z+D;D=null;(y=lh(b,"SegmentSequenceProperties"))&&(y=lh(y,"SAP"))&&(D=oh(y,"cadence",uh));y=b.attributes.label;var B=hh(b,"Label");B&&B.length&&(B=B[0],ih(B)&&(y=ih(B)));return{Ma:function(){return
|
|
1043
|
+
xh)||0:0;z=c.Sa+y+z+D;D=null;(y=lh(b,"SegmentSequenceProperties"))&&(y=lh(y,"SAP"))&&(D=oh(y,"cadence",uh));y=b.attributes.label;var B=hh(b,"Label");B&&B.length&&(B=B[0],ih(B)&&(y=ih(B)));return{Ma:function(){return Ld(d(),f.length?a.h&&h?wt(a.h,e):g?g:[]:[])},Sc:w||c.Sc,Qb:lh(b,"SegmentList")||c.Qb,bc:A||c.bc,width:oh(b,"width",wh)||c.width,height:oh(b,"height",wh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,be:u,audioSamplingRate:v,
|
|
1044
1044
|
Sa:z,Pd:null,Kf:D||c.Kf,label:y||null}}function Lu(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}
|
|
1045
1045
|
function Mu(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=
|
|
1046
1046
|
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 Ju(a){var b=a.Sc?1:0;b+=a.Qb?1:0;b+=a.bc?1:0;if(0==b)return a.contentType==Ud||"application"==a.contentType?!0:!1;1!=b&&(a.Sc&&(a.Qb=null),a.bc=null);return!0}
|
|
1047
|
-
function Nu(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=
|
|
1047
|
+
function Nu(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=Ld(b(),e),g=sg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),mg(a.T,h),F(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=vd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
1048
1048
|
function xu(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;ra(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);
|
|
1049
1049
|
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":Ya("NTP UTCTiming scheme is not supported");break;default:Ya("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return F(n,Nu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return F(n,Nu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
|
|
1050
1050
|
3);break;case 5:ua(n);case 3:g=f.next();n.u(2);break;case 4:return Ya("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
1051
1051
|
function Eu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=oh(d,"timescale",wh)||1,k=oh(d,"presentationTimeOffset",wh)||0;d=t(hh(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=oh(l,"presentationTime",wh)||0,n=oh(l,"duration",wh)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Eh(l),eventNode:Fh(l)},a.j.onTimelineRegionAdded(l))}}
|
|
1052
|
-
function Bu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=yg,g=e?0:1,h=zl(b,c,d,a.g.retryParameters),F(l,ou(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Iu(a,b){b=Zd(a,b);return oe(b)?Ud:a.split("/")[0]}function ou(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);mg(a.
|
|
1053
|
-
function nu(a){var b=a.l.sd;if(!a.l.Zd||!b||!a.
|
|
1054
|
-
function fv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function gv(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=gv(a,b))?a.value:c||null}function hv(a,b){a=gv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function iv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.zb=c}function jv(a,b){this.name=a;this.value=b};function kv(a,b){return a.filter(function(c){return c.name==b})}function lv(a,b){return a.filter(function(c){return hv(c,"TYPE")==b})}function mv(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 nv(a,b,c){c=void 0===c?0:c;return(a=mv(a,b))?Number(a.value):c}function ov(a,b,c){return b?pv(a,[b],c):[]}function pv(a,b,c){if(!b.length)return[];b=
|
|
1052
|
+
function Bu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=yg,g=e?0:1,h=zl(b,c,d,a.g.retryParameters),F(l,ou(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Iu(a,b){b=Zd(a,b);return oe(b)?Ud:a.split("/")[0]}function ou(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);mg(a.T,b);return b.promise}
|
|
1053
|
+
function nu(a){var b=a.l.sd;if(!a.l.Zd||!b||!a.D.length)return[];var c=Date.now()/1E3,d=a.D.filter(function(e){e=wh(e.attributes.ttl);return!e||b+e>c}).map(jh).filter(ye);return d.length?Ld(a.A,d):[]}S("shaka.dash.DashParser",ju);yi["application/dash+xml"]=function(){return new ju};yi["video/vnd.mpeg.dash.mpd"]=function(){return new ju};function $u(){}S("shaka.dependencies",$u);$u.has=function(a){return av.has(a)};$u.add=function(a,b){if(!bv[a])throw Error(a+" is not supported");a==cv?qb("mux.js","mux.js is no longer used in Shaka Player."):av.set(a,function(){return b})};var cv="muxjs",bv={hk:cv,ISOBoxer:"ISOBoxer"};$u.Allowed=bv;var av=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function dv(a,b,c){this.type=a;this.g=b;this.segments=c||null}function ev(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}ev.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};
|
|
1054
|
+
function fv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function gv(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=gv(a,b))?a.value:c||null}function hv(a,b){a=gv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function iv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.zb=c}function jv(a,b){this.name=a;this.value=b};function kv(a,b){return a.filter(function(c){return c.name==b})}function lv(a,b){return a.filter(function(c){return hv(c,"TYPE")==b})}function mv(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 nv(a,b,c){c=void 0===c?0:c;return(a=mv(a,b))?Number(a.value):c}function ov(a,b,c){return b?pv(a,[b],c):[]}function pv(a,b,c){if(!b.length)return[];b=Ld(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(qv(d.value,c));return a}
|
|
1055
1055
|
function qv(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new T(2,4,4039,e);}}return a};function rv(){this.g=0}
|
|
1056
1056
|
function sv(a,b){b=vd(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=tv(a,f),--a.g,uv.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=tv(a,g);if(vv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
1057
1057
|
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=tv(a,k),uv.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 iv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new iv("",d,f)));return new dv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
1058
1058
|
g.name&&(g.attributes.push(new jv("URI",h)),d=!0)}}return new dv(b,e)}function tv(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 Rp(d);var f;(f=Tp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Tp(d,g);)c.push(new jv(f[1],f[2]||f[3])),Sp(d)}return new ev(a,b,c,e)}
|
|
1059
1059
|
var uv="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 EXT-X-DATERANGE".split(" "),vv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function wv(){}function xv(a){try{var b=yv(a);return eg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return cg(c)}}
|
|
1060
|
-
function yv(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=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",wv);wv.parse=xv;og("data",xv);function zv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.G=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Ud,new Map);this.N.set("image",new Map);this.bb=new Set;this.i=new Map;this.l=null;this.M="";this.Fa=new rv;this.H=-1;this.fa=Infinity;this.ea=this.Gb=this.Ub=!1;this.A=new Rc(function(){if(a.aa&&!a.g.continueLoadingWhenPaused&&(a.Y.kb(a.aa,"timeupdate"),a.aa.paused)){a.Y.
|
|
1061
|
-
Bv;this.m=null;this.ab=0;this.o=Infinity;this.
|
|
1060
|
+
function yv(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=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",wv);wv.parse=xv;og("data",xv);function zv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.G=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Ud,new Map);this.N.set("image",new Map);this.bb=new Set;this.i=new Map;this.l=null;this.M="";this.Fa=new rv;this.H=-1;this.fa=Infinity;this.ea=this.Gb=this.Ub=!1;this.A=new Rc(function(){if(a.aa&&!a.g.continueLoadingWhenPaused&&(a.Y.kb(a.aa,"timeupdate"),a.aa.paused)){a.Y.ka(a.aa,"timeupdate",function(){return Av(a)});return}Av(a)});this.va=
|
|
1061
|
+
Bv;this.m=null;this.ab=0;this.o=Infinity;this.Ca=this.Da=this.T=0;this.da=new lg;this.C=new Map;this.D=new Map;this.ra=new Map;this.ma=new Map;this.K=new Map;this.na=new Map;this.ya=new Map;this.Fb=this.I=!1;this.Db=new Ra(5);this.j=null;this.O=!0;this.Ea=new Set;this.Y=new gb;this.aa=null}q=zv.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};
|
|
1062
1062
|
q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.I=b.isLowLatencyMode(),F(e,Cv(c,[a]),2)):3!=e.g?(d=e.h,c.M=d.uri,F(e,Dv(c,d.data,a),3)):e.return(c.m)})};
|
|
1063
|
-
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.da&&(a.push(this.da.destroy()),this.da=null);this.g=this.h=null;this.bb.clear();this.m=null;this.i.clear();this.G.clear();this.
|
|
1063
|
+
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.da&&(a.push(this.da.destroy()),this.da=null);this.g=this.h=null;this.bb.clear();this.m=null;this.i.clear();this.G.clear();this.D.clear();this.s.clear();this.ra.clear();this.ma.clear();this.K.clear();this.na.clear();this.ya.clear();this.Ea.clear();this.j&&this.j.destroy();this.Y&&(this.Y.release(),this.Y=null);return Promise.all(a)};
|
|
1064
1064
|
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g){if(!Ev(a))return r.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Fv(a,g));return F(r,Promise.all(b),2)}Gv(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.fd});d.length&&!h&&(k=Hv,Iv(a,k.uh),l=d.map(function(u){return u.Kb}),a.l.Za(Math.min.apply(Math,x(l))),
|
|
1065
1065
|
a.h.updateDuration());h&&Jv(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.segmentIndex&&!p.stream.segmentIndex.P[0]&&a.h.disableStream(p.stream);H(r)})};function Kv(a,b){return Ev(a)?a.N.get(b.type):b.Wd}
|
|
1066
1066
|
function Fv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va;return O(function(Fa){switch(Fa.g){case 1:c=[];d=t(b.L());for(e=d.next();!e.done;e=d.next())f=e.value,g=new tc(f),h=g.g,b.Dd&&(0<=b.pb&&h.add("_HLS_msn",String(b.pb)),0<=b.qb&&h.add("_HLS_part",String(b.qb))),b.Ed&&h.add("_HLS_skip","YES"),Ic(h)&&xc(g,h),c.push(g.toString());ra(Fa,2);return F(Fa,Cv(a,c,!0),4);case 4:k=Fa.h;ta(Fa,3);break;case 2:throw l=ua(Fa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Fa.return();
|
|
@@ -1083,17 +1083,17 @@ 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
|
|
|
1083
1083
|
function Jv(a){if(Ev(a)){if(a.va==jw){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.Kb),c=Math.min(c,e.pc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.A);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.oe(b)}}else a.l.Za(kw(a));if(!a.l.s)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))&&
|
|
1084
1084
|
c.h&&a.l.eh(c.h);a.l.Ud()}function Wv(a,b){var c=(new tc(a.M)).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)}}
|
|
1085
1085
|
function Lv(a,b,c){c=(new tc(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}
|
|
1086
|
-
function Zv(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=lw(a,d);if(f){var g=Sd(Ud,d);a.
|
|
1086
|
+
function Zv(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=lw(a,d);if(f){var g=Sd(Ud,d);a.D.set(f,g);Nb(d,g)}e&&(f=Sd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.D.set(e,f));c&&(e=Sd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.D.set(c,e))}}
|
|
1087
1087
|
function Xv(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",ov([a.M],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)}}
|
|
1088
1088
|
function Yv(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 rt(a.h);a.j.configure(a.g);a.j.i=[a.M];a.j.setManifestType("HLS");a.j.h=g;c=st(a.j,h);break}return F(k,c,0)})}
|
|
1089
|
-
function bw(a,b){var c=lv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return mw(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=hv(d.value,"GROUP-ID");if(d=a.
|
|
1089
|
+
function bw(a,b){var c=lv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return mw(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=hv(d.value,"GROUP-ID");if(d=a.D.get(e))if(e=a.G.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=nw(Ud,d)||ow(Ud),pw(f.stream)}}return b.filter(function(g){return g})}
|
|
1090
1090
|
function pw(a){var b=new Set([Zd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Hb(function(c){c.mimeType&&b.add(Zd(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1091
1091
|
function cw(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);ra(m,2);return F(m,qw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=ua(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=hv(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"),
|
|
1092
1092
|
p=Z(g,"CHARACTERISTICS"),r=rw(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;r.stream.width=Number(w)||void 0;r.stream.height=Number(A)||void 0;var z=Z(g,"BANDWIDTH");z&&(r.stream.bandwidth=Number(z));a.i.set(h,r);l=r}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(D){if(a.g.hls.ignoreImageStreamFailures)return null;throw D;}})),F(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1093
1093
|
function sw(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=fv(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)mw(a,d[g],c)}
|
|
1094
1094
|
function aw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za;return O(function(Va){switch(Va.g){case 1:g=[];h=new Set;if(!(0<c.length)){Va.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Va.u(2);break}m=l.value;n=hv(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){Va.u(4);break}if(tw(n)){u=ov(e(),hv(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=sg(u,a.g.retryParameters),A=iw(a,w,6),a.K.set(v,A));Va.u(4);break}if("identity"!=p){r=(z=uw[p])?
|
|
1095
1095
|
z(m,""):null;Va.u(6);break}return F(Va,vw(a,m,"",e,null,f),9);case 9:r=Va.h;case 6:if(r){if(r.keyIds)for(D=t(r.keyIds),y=D.next();!y.done;y=D.next())B=y.value,h.add(B);g.push(r)}case 4:l=k.next();Va.u(3);break;case 2:C={};E=t(b);for(G=E.next();!G.done;G=E.next())L=G.value,K=fv(L,!a.j),C[K]?C[K].push(L):C[K]=[L];I=[];for(J in C)M=C[J],N=M[0],P=Z(N,"FRAME-RATE"),R=Number(Z(N,"AVERAGE-BANDWIDTH"))||Number(hv(N,"BANDWIDTH")),Q=Z(N,"RESOLUTION"),W=t(Q?Q.split("x"):[null,null]),Y=W.next().value,va=W.next().value,
|
|
1096
|
-
Fa=Z(N,"VIDEO-RANGE"),(wa=Z(N,"REQ-VIDEO-LAYOUT"))&&wa.includes(",")&&(Pa=wa.split(",").filter(function(
|
|
1096
|
+
Fa=Z(N,"VIDEO-RANGE"),(wa=Z(N,"REQ-VIDEO-LAYOUT"))&&wa.includes(",")&&(Pa=wa.split(",").filter(function(Aa){return"CH-STEREO"==Aa||"CH-MONO"==Aa}),wa=Pa[0]),wa=wa||"CH-MONO",Za=ww(a,M,d),I.push.apply(I,x(xw(a,Za.audio,Za.video,R,Y,va,P,Fa,wa,g,h)));return Va.return(I.filter(function(Aa){return null!=Aa}))}})}
|
|
1097
1097
|
function ww(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Z(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(hv(v,"GROUP-ID"))}),sw(a,k,e));k=(e=f.sort().join(","))&&a.G.has(e)?a.G.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var r=b.map(function(v){return hv(v,
|
|
1098
1098
|
"URI")});h=d.audio.find(function(v){return v&&v.L().find(function(w){return r.includes(w)})});g=lw(a,b[0]);n=Sd("video",g);(p=Sd("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(v){var w=Z(v,"URI")||"",A=Z(v,"TYPE");v=hv(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
|
|
1099
1099
|
n=Z(c,"NAME"),p=yw(c),zw(c),m=Z(c,"CHARACTERISTICS"),u=Aw(c));a=Bw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
@@ -1102,23 +1102,23 @@ function Aw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function zw(a){r
|
|
|
1102
1102
|
function xw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Cw(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 r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;
|
|
1103
1103
|
r=r?r.L().sort().join(","):"";var u=f?f.L().sort().join(","):"";r=r+" - "+u;h&&k&&!Lc(n,p)||a.bb.has(r)||(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.bb.add(r))}return e}
|
|
1104
1104
|
function $v(a,b){b=lv(b,"CLOSED-CAPTIONS");a.O=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=Be(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=hv(d,"GROUP-ID");d=hv(d,"INSTREAM-ID").replace("SERVICE","svc");a.C.get(e)||a.C.set(e,new Map);a.C.get(e).set(d,c)}}
|
|
1105
|
-
function mw(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=hv(k,"URI");k=hv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=hv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Ud);if(k==Ud)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.
|
|
1105
|
+
function mw(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=hv(k,"URI");k=hv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=hv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Ud);if(k==Ud)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.D.has(l)){b=a.D.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);
|
|
1106
1106
|
m=n.next().value;n=n.next().value;(m=c.get(m))&&vt(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?yw(h):null;var p="audio"==k?zw(h):!1,r=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?Aw(h):null;d=rw(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.G.has(g)?a.G.get(g).push(d):a.G.set(g,[d]);a.i.set(e,d);return d}
|
|
1107
1107
|
function qw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=hv(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=rw(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?F(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])*
|
|
1108
1108
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1109
1109
|
function Bw(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 r=p.value;p=hv(r,"URI");r=Z(r,"PATHWAY-ID");a.j&&r&&vt(a.j,l,r,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(a.g.disableText){a.O=!1;b=null;break a}if(b){if("NONE"!=b){b=a.C.get(b);break a}a.O=!1}else if(!b&&a.C.size)for(b=t(a.C.keys()).next();!b.done;){b=a.C.get(b.value);break a}}b=null}c=Rd(d,c);d=rw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,
|
|
1110
1110
|
d);return d}
|
|
1111
|
-
function rw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za,Va,
|
|
1111
|
+
function rw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za,Va,Aa,bb,bc;return O(function(Sa){switch(Sa.g){case 1:return C=Wd,E=z.L(),ra(Sa,2),F(Sa,Cv(a,z.L(),!0),4);case 4:G=Sa.h;ta(Sa,3);break;case 2:L=ua(Sa);w.closeSegmentIndex();if(K=a.h.disableStream(w))return Sa.return();throw L;case 3:if(B.aborted)return Sa.return();I=G.uri;I==G.originalUri||E.includes(I)||A.push(I);J=sv(a.Fa,G.data);if(1!=J.type)throw new T(2,4,4017);M=kv(J.g,"EXT-X-DEFINE");N=Lv(a,
|
|
1112
1112
|
M,I);P=!1;(!a.ea&&a.g.hls.disableCodecGuessing||a.O&&e==C.ha&&!a.g.hls.disableClosedCaptionsDetection)&&0<J.segments.length&&(a.O=!1,P=!0);R=!a.ea&&a.g.hls.disableCodecGuessing;Q=Ev(a);return F(Sa,Vv(a,0,N,J,v,d,e,f,g,h,k,l,m,n,p,r,void 0,P,R),5);case 5:W=Sa.h;if(B.aborted)return Sa.return();Y=W.stream;Ev(a)&&!Q&&dw(a,J);z.pc=W.pc;z.Kb=W.Kb;z.Ed=W.Ed;z.Dd=W.Dd;z.fd=W.fd;z.Wd=W.Wd;z.pb=W.pb;z.qb=W.qb;z.vf=!0;w.segmentIndex=Y.segmentIndex;w.encrypted=Y.encrypted;w.drmInfos=Y.drmInfos;w.keyIds=Y.keyIds;
|
|
1113
1113
|
w.mimeType=Y.mimeType;w.bandwidth=w.bandwidth||Y.bandwidth;w.codecs=w.codecs||Y.codecs;w.closedCaptions=w.closedCaptions||Y.closedCaptions;w.width=w.width||Y.width;w.height=w.height||Y.height;w.hdr=w.hdr||Y.hdr;w.colorGamut=w.colorGamut||Y.colorGamut;"und"==w.language&&"und"!=Y.language&&(w.language=Y.language);w.language=w.language||Y.language;w.channelsCount=w.channelsCount||Y.channelsCount;w.audioSamplingRate=w.audioSamplingRate||Y.audioSamplingRate;pw(w);w.drmInfos.length&&a.h.newDrmInfo(w);va=
|
|
1114
|
-
!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)va=!0;a.m&&va&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==C.ha||e==C.X)for(Fa=t(a.i.values()),wa=Fa.next();!wa.done;wa=Fa.next())Pa=wa.value,Pa.vf||Pa.type!=e||(Pa.stream.mimeType=Y.mimeType,pw(Pa.stream));e==C.ua&&(Za=Y.segmentIndex.get(0))&&Za.Z&&(w.mimeType="application/mp4",pw(w));Va=sl(w);w.segmentIndex.Hb(function(nb){nb.Z&&(nb.Z.Jc=Va)});Dw(a)&&(a.Gb?ew(a,[z]):(a.Gb=!0,
|
|
1114
|
+
!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)va=!0;a.m&&va&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==C.ha||e==C.X)for(Fa=t(a.i.values()),wa=Fa.next();!wa.done;wa=Fa.next())Pa=wa.value,Pa.vf||Pa.type!=e||(Pa.stream.mimeType=Y.mimeType,pw(Pa.stream));e==C.ua&&(Za=Y.segmentIndex.get(0))&&Za.Z&&(w.mimeType="application/mp4",pw(w));Va=sl(w);w.segmentIndex.Hb(function(nb){nb.Z&&(nb.Z.Jc=Va)});Dw(a)&&(a.Gb?ew(a,[z]):(a.Gb=!0,Aa=Array.from(a.i.values()),bb=Aa.filter(function(nb){return nb.stream.segmentIndex}),
|
|
1115
1115
|
ew(a,bb),Jv(a),bc=a.o,0<bc&&a.A.$(bc)));Qv(a,J.g,w.type,N,v);H(Sa)}})}function v(){return a.j&&1<c.length?wt(a.j,b):A.concat(pv([a.M],c,a.s))}var w=Ew(a,d,e,f,g,h,k,l,m,n,p,r),A=[],z={stream:w,type:e,Vg:A,L:v,pc:0,Kb:0,Wd:new Map,Ed:!1,Dd:!1,fd:!1,Qe:-1,pb:-1,qb:-1,vf:!1},D=null,y=new AbortController;w.createSegmentIndex=function(){if(D)return D;y=new AbortController;return D=new Promise(function(B){B(u(y.signal))})};w.closeSegmentIndex=function(){D&&!w.segmentIndex&&y.abort();w.segmentIndex&&(w.segmentIndex.release(),
|
|
1116
1116
|
w.segmentIndex=null);D=null};return z}function kw(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.Kb));return b}function Gv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Hb(function(e){c.push(e)});a.l.rd(c)}
|
|
1117
1117
|
function ew(a,b){if(!Ev(a))for(var c=kw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Dc(0,c);Gv(a,b.map(function(f){return f.stream}));c=Ev(a)&&!a.Ub;a.g.hls.ignoreManifestProgramDateTime||c?Rv(a,b,c):(Uv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Rv(a,b))}function Sv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
|
|
1118
1118
|
function Dw(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.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}
|
|
1119
|
-
function Vv(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z){A=void 0===A?!0:A;z=void 0===z?!0:z;var D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za,Va,
|
|
1119
|
+
function Vv(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z){A=void 0===A?!0:A;z=void 0===z?!0:z;var D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za,Va,Aa,bb,bc;return O(function(Sa){switch(Sa.g){case 1:var nb=mv(d.g,"EXT-X-PLAYLIST-TYPE"),Tb=mv(d.g,"EXT-X-ENDLIST");Tb=nb&&"VOD"==nb.value||Tb;nb=nb&&"EVENT"==nb.value&&!Tb;nb=!Tb&&!nb;Tb?Iv(a,Bv):nb?Iv(a,jw):Iv(a,Fw);Ev(a)&&Pv(a,d);D=Ev(a)?a.N.get(g):new Map;y=Nv(a,d,D,c,e,g);B=y.segments;C=y.bandwidth;K=L=G=E=null;if(!(0<B.length&&A)){Sa.u(2);break}return F(Sa,
|
|
1120
1120
|
fw(a,B),3);case 3:I=Sa.h,g=I.type,h=I.language,m=I.channelCount,u=I.sampleRate,a.g.disableText||(n=I.closedCaptions),G=I.height,E=I.width,L=I.wd,K=I.colorGamut,z&&(w=I.mimeType,f=I.codecs);case 2:if(w){Sa.u(4);break}return F(Sa,Gw(a,g,f,B),5);case 5:w=Sa.h;case 4:return F(Sa,Mv(a,d,w,e,c),6);case 6:J=Sa.h;M=J.drmInfos;N=J.keyIds;P=J.encrypted;R=J.yh;if(P&&!M.length&&!R)throw new T(2,4,4026);Q=Ew(a,f,g,h,k,l,m,n,p,r,u,v);Q.encrypted=P;Q.drmInfos=M;Q.keyIds=N;Q.mimeType=w;C&&(Q.bandwidth=C);pw(Q);"video"==
|
|
1121
|
-
g&&(E||G||L||K)&&Cw(Q,E,G,null,L,null,K);Ev(a)&&Pv(a,d);W=B[0].startTime;Y=B[B.length-1];va=Y.endTime;Fa=new Nk(B);Q.segmentIndex=Fa;Pa=(wa=mv(d.g,"EXT-X-SERVER-CONTROL"))?null!=gv(wa,"CAN-SKIP-UNTIL"):!1;Za=wa?null!=gv(wa,"CAN-BLOCK-RELOAD"):!1;Va=nv(d.g,"EXT-X-MEDIA-SEQUENCE",0);
|
|
1121
|
+
g&&(E||G||L||K)&&Cw(Q,E,G,null,L,null,K);Ev(a)&&Pv(a,d);W=B[0].startTime;Y=B[B.length-1];va=Y.endTime;Fa=new Nk(B);Q.segmentIndex=Fa;Pa=(wa=mv(d.g,"EXT-X-SERVER-CONTROL"))?null!=gv(wa,"CAN-SKIP-UNTIL"):!1;Za=wa?null!=gv(wa,"CAN-BLOCK-RELOAD"):!1;Va=nv(d.g,"EXT-X-MEDIA-SEQUENCE",0);Aa=Ov(Va,B);bb=Aa.pb;bc=Aa.qb;return Sa.return({stream:Q,type:g,Vg:[],L:e,pc:W,Kb:va,Ed:Pa,Dd:Za,fd:!1,Qe:-1,pb:bb,qb:bc,Wd:D,vf:!1})}})}
|
|
1122
1122
|
function Ov(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{pb:a,qb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{pb:a,qb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{pb:a,qb:c}}
|
|
1123
1123
|
function Ew(a,b,c,d,e,f,g,h,k,l,m,n){var p=nw(c,b)||ow(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Ud?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1124
1124
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Ud?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Be(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
@@ -1128,12 +1128,12 @@ function Mv(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P
|
|
|
1128
1128
|
function Iw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ya("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=Id(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=nv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ma.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(hv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1129
1129
|
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u;return O(function(v){if(1==v.g)return l=ov(d(),hv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=sg(l,a.g.retryParameters),p=iw(a,n,6),a.K.set(m,p)),F(v,a.K.get(m),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return F(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;H(v)})};
|
|
1130
1130
|
a.ma.set(c,k)}return a.ma.get(c)}
|
|
1131
|
-
function Pv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=mv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=mv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=mv(b.g,"EXT-X-PART-INF"))a.
|
|
1132
|
-
gv(b,"HOLD-BACK"):null,a.
|
|
1131
|
+
function Pv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=mv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=mv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=mv(b.g,"EXT-X-PART-INF"))a.T=Number(hv(e,"PART-TARGET"));b=mv(b.g,"EXT-X-SERVER-CONTROL");a.I&&a.T?(a.o=a.Fb?5*a.T<=c?Math.min(a.T,a.o):Math.min(c,a.o):Math.min(a.T,a.o),a.Ca=b?Number(hv(b,"PART-HOLD-BACK")):0):(a.o=Math.min(c,a.o),c=b?
|
|
1132
|
+
gv(b,"HOLD-BACK"):null,a.Da=c?Number(c.value):0);a.ab=Math.max(d,a.ab)}function dw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Ca)b=a.Ca;else if(a.Da)b=a.Da;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ab*c}a.l.fh(0);a.l.Of(b);a.l.uc(!1)}
|
|
1133
1133
|
function Hw(a,b,c,d,e){var f=mv(c,"EXT-X-MAP");if(!f)return null;var g=hv(f,"URI"),h=ov(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ra.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?tw(hv(m,"METHOD"))&&m.id<f.id&&(k=Iw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Jw(h,f,l,k);a.ra.set(g,b)}return a.ra.get(g)}
|
|
1134
1134
|
function Jw(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 Di(function(){return a},e,f,null,null,null,d)}
|
|
1135
1135
|
function Kw(a,b,c,d,e,f,g,h,k){function l(W){W=(new tc(W)).Pa.split(".").pop();var Y=Lw[g][W];Y||(Y=hw[W]);return Y}var m=d.g,n=mv(m,"EXTINF"),p=0,r=0,u=null;d.zb.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=mv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=rh(w.value),a.Ub=!0)}var A=Gi;mv(m,"EXT-X-GAP")&&(a.m.gapCount++,A=2);if(!n){if(0==d.zb.length)throw new T(2,4,4024,"EXTINF");if(!a.I)return null}var z=[];w=!1;var D=null,y=!1,B=!1;if(a.I&&d.zb.length){p=
|
|
1136
|
-
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=v,E={},G=0;G<d.zb.length;E={we:void 0,fe:void 0},G++){var L=d.zb[G],K=0==G?c:z[z.length-1],I=0==G?e:K.endTime,J=Number(Z(L,"DURATION"))||a.
|
|
1136
|
+
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=v,E={},G=0;G<d.zb.length;E={we:void 0,fe:void 0},G++){var L=d.zb[G],K=0==G?c:z[z.length-1],I=0==G?e:K.endTime,J=Number(Z(L,"DURATION"))||a.T;if(J){var M=I+J,N=0,P=null;"EXT-X-PRELOAD-HINT"==L.name?(N=(N=Z(L,"BYTERANGE-START"))?Number(N):0,(K=Z(L,"BYTERANGE-LENGTH"))?P=N+Number(K)-1:N&&(P=Number.MAX_SAFE_INTEGER)):(N=Z(L,"BYTERANGE"),P=t(Mw(K,N)),N=P.next().value,P=P.next().value);E.fe=Z(L,"URI");if(E.fe){K=Gi;"YES"==
|
|
1137
1137
|
Z(L,"GAP")&&(a.m.gapCount++,K=2,y=!0);E.we=null;var R=function(W){return function(){null==W.we&&(W.we=ov(h(),W.fe,f));return W.we}}(E);p&&0<=N&&null!=P&&(D=R,w=!0);I=new Fi(I,M,R,N,P,b,0,0,Infinity,[],"",null,C,K,k);"EXT-X-PRELOAD-HINT"==L.name&&(I.wf(),B=!0);"YES"!=Z(L,"INDEPENDENT")&&0<G&&I.Vd();if(E=l(E.fe))I.mimeType=E,Nw.has(E)&&(I.Z=null);z.push(I);C&&(C+=J)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(z.length)p=z[z.length-1].endTime;else return null;w&&(y||0!=
|
|
1138
1138
|
z[0].Ha?(w=!1,D=null):z=[]);(n=mv(m,"EXT-X-BYTERANGE"))?(u=t(Mw(c,n.value)),r=u.next().value,u=u.next().value):z.length&&(r=z[0].Ha,u=z[z.length-1].ta);c="";n=null;"image"==g&&(c="1x1",m=mv(m,"EXT-X-TILES"))&&(c=hv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Fi(e,p,function(){if(D)return D();null==Q&&(Q=ov(h(),d.h,f));return Q||[]},r,u,b,0,0,Infinity,z,c,n,v,A,k,0<z.length&&!!d.h);if(e=l(d.h))b.mimeType=e,Nw.has(e)&&(b.Z=null);w&&(a.Fb=!0,b.Jg(),B&&b.wf());return b}
|
|
1139
1139
|
function Mw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ta+1,d=c+b-1);return[c,d]}
|
|
@@ -1150,7 +1150,7 @@ iw(a,u,e,{type:r}),6);case 6:A=z.h,p=A.headers["content-type"];case 3:return p?z
|
|
|
1150
1150
|
function Av(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ra(h,2);b=Date.now();return F(h,a.update(),4);case 4:c=Date.now();Ev(a)&&(d=(c-b)/1E3,a.Db.sample(1,d),e=a.o,f=Math.max(0,e-Ta(a.Db)),a.A.$(f));ta(h,3);break;case 2:g=ua(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.$(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
|
|
1151
1151
|
function Ev(a){return a.va!=Bv}function Iv(a,b){a.va=b;a.l&&a.l.uc(!Ev(a));Ev(a)||a.A.stop()}function iw(a,b,c,d){if(!a.da)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);mg(a.da,b);return b.promise}function tw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1152
1152
|
function vw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,D,y;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(rd())throw new T(2,4,4041);g=hv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=ov(d(),hv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Jd(Hd(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.na.has(m)||(n=sg(k,a.g.retryParameters),p=iw(a,n,6),a.na.set(m,p));return F(B,a.na.get(m),
|
|
1153
|
-
3);case 3:r=B.h,l=Jd(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.ya.has(e)){v=a.ya.get(e);B.u(5);break}w=zl(e.L(),e.Yb(),e.Wb(),a.g.retryParameters);A=yg;return F(B,iw(a,w,A,{type:0}),6);case 6:z=B.h,v=xl(z.data),a.ya.set(e,v);case 5:v&&(u=v);case 4:return D=new Map,D.set(u,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),B.return(
|
|
1153
|
+
3);case 3:r=B.h,l=Jd(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.ya.has(e)){v=a.ya.get(e);B.u(5);break}w=zl(e.L(),e.Yb(),e.Wb(),a.g.retryParameters);A=yg;return F(B,iw(a,w,A,{type:0}),6);case 6:z=B.h,v=xl(z.data),a.ya.set(e,v);case 5:v&&(u=v);case 4:return D=new Map,D.set(u,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),B.return(Od(D,y))}})}S("shaka.hls.HlsParser",zv);
|
|
1154
1154
|
var hw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Lw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
1155
1155
|
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"}},Nw=new Set(["video/mp2t"].concat(x($d))),uw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(rd())throw new T(2,4,4041);b=hv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Nd("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
1156
1156
|
keyId:null}],hv(a,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=hv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=hv(a,"URI");b=yv(b.split("?")[0]);b=zb(b.data);c=Nd("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=hv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
@@ -1166,7 +1166,7 @@ function ex(a){var b=Ww,c=new Uint8Array([]);switch(a.type){case "video":if(a.co
|
|
|
1166
1166
|
a.encrypted&&(g=ix(a),d="encv");c=Ww(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.xa.byteLength&&(c=Ww("hvcC",a.xa)),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(ax(d,2)),x(ax(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=hx(a),g=new Uint8Array([]),a.encrypted&&(g=ix(a),e="encv"),c=Ww(e,d,
|
|
1167
1167
|
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Ww(".mp3",jx(a));else if(a.codecs.includes("ac-3"))c=Ww("dac3",a.pa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=ix(a),d="enca"),a=Ww(d,jx(a),c,e);else if(a.codecs.includes("ec-3"))c=Ww("dec3",a.pa),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=ix(a),d="enca"),a=Ww(d,jx(a),c,e);else if(a.codecs.includes("opus"))c=Ww("dOps",a.pa),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=ix(a),d="enca"),a=Ww(d,jx(a),c,e);else{if(0<a.pa.byteLength)c=Ww("esds",
|
|
1168
1168
|
a.pa);else{c=Ww;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Rd("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(ax(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=ix(a),d="enca");
|
|
1169
|
-
a=Ww(d,jx(a),c,e)}c=a}a=Ww("stsd",kx,c);return b("stbl",a,Ww("stts",lx),Ww("stsc",mx),Ww("stsz",nx),Ww("stco",ox))}function hx(a){if(!a.
|
|
1169
|
+
a=Ww(d,jx(a),c,e)}c=a}a=Ww("stsd",kx,c);return b("stbl",a,Ww("stts",lx),Ww("stsc",mx),Ww("stsz",nx),Ww("stco",ox))}function hx(a){if(!a.Aa&&!a.Ba)return new Uint8Array([]);var b=a.Ba;a=new Uint8Array([].concat(x(ax(a.Aa,4)),x(ax(b,4))));return Ww("pasp",a)}function jx(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(ax(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1170
1170
|
function ix(a){var b=Ww;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(ax(d,4))));c=Ww("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Ww("schm",d);e=Ww;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=gx(h.value)}a=new Uint8Array([0,
|
|
1171
1171
|
0,0,0,0,0,1,8]);f=Ww("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1172
1172
|
function px(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=Ww;var g=new Uint8Array([0,0,0,0].concat(x(ax(c.data?c.data.sb:0,4))));g=Ww("mfhd",g);var h;var k=c.data?c.data.Ya:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Va<<4|m.Xa<<2|m.Wa}k=Ww("sdtp",l);var n=k.length+92;l=Ww;h=new Uint8Array([0,0,0,58].concat(x(ax(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Ww("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
@@ -1188,11 +1188,11 @@ function vx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"t
|
|
|
1188
1188
|
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:Be(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1189
1189
|
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=wx[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 Ya('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!xx.includes(e.toUpperCase()))return Ya("Codec not supported:",
|
|
1190
1190
|
e),null;c=yx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Ya("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=zx(e,c);break;case "video":if(!c)return Ya("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=Ax(c);break;case "text":if(w.type=Ud,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Zd(w.mimeType,w.codecs));
|
|
1191
|
-
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,$a:A,pa:new Uint8Array([]),xa:new Uint8Array([]),
|
|
1191
|
+
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,$a:A,pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:w},A=Zw(new Tw([A])),a.m.set(w.id,A);A=Bx(a,new Di(function(){return[]},0,null,sl(w),w.mssPrivateData.timescale,
|
|
1192
1192
|
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}
|
|
1193
1193
|
function yx(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;
|
|
1194
1194
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function zx(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 Ax(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1195
|
-
function Bx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={qe:void 0},g=e.next())h.qe=g.value,d.push(new Fi(h.qe.start,h.qe.end,function(k){return function(){return
|
|
1195
|
+
function Bx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={qe:void 0},g=e.next())h.qe=g.value,d.push(new Fi(h.qe.start,h.qe.end,function(k){return function(){return Ld(a.l,[f.replace("{start time}",String(k.qe.$f))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",sx);var xx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),wx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1196
1196
|
yi["application/vnd.ms-sstr+xml"]=function(){return new sx};function Cx(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=zd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Dx(){}function Ex(a,b,c,d,e){var f=new Fx;Eg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Gx,h={lg:!1,oh:!1};a=Hx(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 bg(a,function(){h.lg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Rc(function(){h.oh=!0;g.abort()});k.$(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1197
1197
|
function Hx(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:return h=Ix,k=Jx,p=n=0,r=Date.now(),ra(y,2),F(y,h(a,c),4);case 4:l=y.h;f(Kx(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(B){function C(){var E,G,L;return O(function(K){switch(K.g){case 1:return ra(K,2),F(K,u.read(),4);case 4:E=K.h;ta(K,3);break;case 2:return ua(K),K.return();case 3:if(E.done){K.u(5);break}n+=
|
|
1198
1198
|
E.value.byteLength;if(!g){K.u(5);break}return F(K,g(E.value),5);case 5:G=Date.now();if(100<G-r||E.done)L=E.done?0:w-n,e(G-r,n-p,L),p=n,r=G;E.done?B.close():(B.enqueue(E.value),C());H(K)}})}C()};new k({start:A});return F(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:ta(y,3);break;case 2:z=ua(y);if(d.lg)throw new T(1,1,7001,a,b);if(d.oh)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return D=Kx(l.headers),y.return(Cx(D,m,l.status,a,l.url,b))}})}
|
|
@@ -1242,7 +1242,7 @@ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){
|
|
|
1242
1242
|
q.update=function(){};
|
|
1243
1243
|
q.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 ly,ra(m,2,3),F(m,e.init(),5);case 5:return F(m,py(e,d.ob(),d.Ia()),6);case 6:return f=m.h,F(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 F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),F(m,e.destroy(),10);case 10:ya(m,0);break;case 2:ua(m),m.u(3)}})};
|
|
1244
1244
|
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};yi["application/x-offline-manifest"]=function(){return new My};function Ny(){}function Oy(a){var b=Fy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=eg(a)):a=b&&"segment"==b.g?Py(b.key(),b):cg(new T(2,1,9004,a));return a}
|
|
1245
|
-
function Py(a,b){var c=new ly;return eg(void 0).
|
|
1245
|
+
function Py(a,b){var c=new ly;return eg(void 0).za(function(){return c.init()}).za(function(){return py(c,b.ob(),b.Ia())}).za(function(d){return d.getSegments([b.key()])}).za(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",Ny);Ny.plugin=Oy;og("offline",Oy);function Qy(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 r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Ry(v.info,p)){v.sessionIds.push(p.sessionId);r=!0;break}r||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=Sy(a,b,g);return F(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)}})}
|
|
1246
1246
|
function Sy(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Gh({Mb:b,onError:function(){},de:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),F(f,Oh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return ua(f),F(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],F(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1247
1247
|
h.g)return ra(h,2),F(h,$h(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);ua(h);H(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function Ry(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Ob(a.audioCapabilities,b.audioCapabilities,c)&&Ob(a.videoCapabilities,b.videoCapabilities,c)};function Ty(a,b,c){var d=b.presentationTimeline.getDuration();b=Uy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Vy(a,b){var c=Hy(new Gy(a.ob(),a.Ia()),b),d=b.appMetadata||{};c=Uy(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}}
|
|
1248
1248
|
function Uy(a){var b=[],c=tf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(jf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(kf(c.value));return b};function Wy(){this.g={}}function Xy(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 Yy(a,b){a.g[b.id]=b.bandwidth||2048}function Zy(a,b){a=a.g[b];null==a&&(a=0);return a};function $y(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.xb()):(this.h=um(),this.g=new ng);this.i=[];this.j=[];var c=!a;this.l=new Ag(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return F(k,Promise.all(b.j.map(function(l){return Wx(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 F(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return F(k,b.g.destroy(),4);
|
|
@@ -1308,8 +1308,8 @@ sA;window.shakaMediaKeysPolyfill=yA}};
|
|
|
1308
1308
|
function tA(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,
|
|
1309
1309
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.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;}
|
|
1310
1310
|
tA.prototype.createMediaKeys=function(){var a=new xA(this.keySystem);return Promise.resolve(a)};tA.prototype.getConfiguration=function(){return this.g};function xA(a){this.h=new WebKitMediaKeys(a);this.g=new gb}xA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new zA(this.h,a)};xA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1311
|
-
function vA(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.
|
|
1312
|
-
q.generateRequest=function(a,b){var c=this;this.h=new ag;try{var d=this.l.createSession("video/mp4",zb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.
|
|
1311
|
+
function vA(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.F(b,"webkitneedkey",wA);try{return yk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}xA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function zA(a){kg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new gb;this.sessionId="";this.expiration=NaN;this.closed=new ag;this.keyStatuses=new AA}na(zA,kg);q=zA.prototype;
|
|
1312
|
+
q.generateRequest=function(a,b){var c=this;this.h=new ag;try{var d=this.l.createSession("video/mp4",zb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.F(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Zb()?"license-request":"license-renewal").set("message",Ab(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.F(d,"webkitkeyadded",function(){c.g&&(BA(c,"usable"),c.g.resolve(),c.g=null)});this.j.F(d,"webkitkeyerror",
|
|
1313
1313
|
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:BA(c,"output-not-allowed");break;default:BA(c,"internal-error")}});BA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1314
1314
|
q.update=function(a){this.g=new ag;try{this.i.update(zb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function BA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
|
|
1315
1315
|
function AA(){this.size=0;this.g=void 0}q=AA.prototype;q.Zb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Oc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Oc.value();return this.g&&xb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var yA="apple";function CA(){}function DA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ad()||Zc("Tizen 4")||Zc("Tizen 5.0")||dd())&&(MediaKeys.prototype.setServerCertificate=EA)}function EA(){return Promise.resolve(!1)}Dz.PatchedMediaKeysCert=CA;CA.install=DA;Ez(DA);function FA(){}function GA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=HA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=IA,window.MediaKeys=JA,window.MediaKeySystemAccess=KA,window.shakaMediaKeysPolyfill=LA)}function HA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
@@ -1320,8 +1320,8 @@ function UA(a){var b=OA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}functi
|
|
|
1320
1320
|
function SA(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),
|
|
1321
1321
|
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"]):
|
|
1322
1322
|
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;}SA.prototype.createMediaKeys=function(){var a=new RA(this.g);return Promise.resolve(a)};SA.prototype.getConfiguration=function(){return this.h};function RA(a){this.l=a;this.h=null;this.g=new gb;this.i=[];this.j=new Map}
|
|
1323
|
-
function VA(a,b){a.h=b;a.g.Qa();var c=OA;b&&(a.g.
|
|
1324
|
-
a.g.
|
|
1323
|
+
function VA(a,b){a.h=b;a.g.Qa();var c=OA;b&&(a.g.F(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ab(d.initData);a.h.dispatchEvent(e)}),a.g.F(b,c+"keymessage",function(d){var e=WA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Zb()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.F(b,c+"keyadded",function(d){(d=WA(a,d.sessionId))&&d.ready()}),
|
|
1324
|
+
a.g.F(b,c+"keyerror",function(d){var e=WA(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?XA(e,"output-restricted"):1==f?XA(e,"expired"):XA(e,"internal-error"))}}))}
|
|
1325
1325
|
RA.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 YA(b,this.l,a);this.i.push(a);return a};RA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};RA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1326
1326
|
function WA(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 YA(a,b,c){kg.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 ag;this.keyStatuses=new ZA}na(YA,kg);q=YA.prototype;q.ready=function(){XA(this,"usable");this.g&&this.g.resolve();this.g=null};
|
|
1327
1327
|
function $A(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=zb(Ad("LOAD_SESSION|"+c));else{var e=Ad("PERSISTENT|");d=Kd(e,b)}else d=zb(b)}catch(g){return Promise.reject(g)}a.h=new ag;var f=UA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Rc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).$(.01)}return a.h}
|
|
@@ -1342,7 +1342,7 @@ if(!D&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.va
|
|
|
1342
1342
|
!r.attributes.style&&(g=IB(l,"region",f,"")[0]);LB(b,r,g,u,v,e,a,0==h.length);return b}
|
|
1343
1343
|
function FB(a,b,c){var d=new Jb,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=MB.exec(c)||NB.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=OB(a,b,"extent");if(g){var h=(f=MB.exec(g))||NB.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Kb:0,d.heightUnits=f||null!=e?Kb:0)}if(a=OB(a,b,"origin"))if(h=(f=MB.exec(a))||NB.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
|
|
1344
1344
|
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Kb,d.height=100-d.viewportAnchorY,d.heightUnits=Kb):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Kb:0;return d}function PB(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
|
|
1345
|
-
function LB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==QB(b,c,f,"direction",g)&&(a.direction="rtl");h=QB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Ub);(h=QB(b,c,f,"textAlign",!0))?(a.positionAlign=RB[h],a.lineAlign=SB[h],a.textAlign=ec[h.toUpperCase()]):a.textAlign=
|
|
1345
|
+
function LB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==QB(b,c,f,"direction",g)&&(a.direction="rtl");h=QB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Ub);(h=QB(b,c,f,"textAlign",!0))?(a.positionAlign=RB[h],a.lineAlign=SB[h],a.textAlign=ec[h.toUpperCase()]):a.textAlign=Sb;if(h=QB(b,c,f,"displayAlign",!0))a.displayAlign=fc[h.toUpperCase()];if(h=QB(b,c,f,"color",g))a.color=PB(h);if(h=QB(b,c,f,"backgroundColor",
|
|
1346
1346
|
g))a.backgroundColor=PB(h);if(h=QB(b,c,f,"border",g))a.border=h;if(h=QB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
|
|
1347
1347
|
k}).join(",")}(h=QB(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=QB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=QB(b,c,f,"lineHeight",g))&&h.match(TB)&&(a.lineHeight=h);(h=QB(b,c,f,"fontSize",g))&&(h.match(TB)||h.match(UB))&&(a.fontSize=h);if(h=QB(b,c,f,"fontStyle",g))a.fontStyle=jc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=ih(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
|
|
1348
1348
|
e);if(d=QB(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(TB)?a.textStrokeColor=a.color:(a.textStrokeColor=PB(d[0]),d.shift()),d[0]&&d[0].match(TB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=QB(b,c,f,"letterSpacing",g))&&d.match(TB)&&(a.letterSpacing=d);(d=QB(b,c,f,"linePadding",g))&&d.match(TB)&&(a.linePadding=d);if(d=QB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=OB(c,f,"textDecoration"))&&VB(a,d);(d=WB(b,f,"textDecoration"))&&VB(a,d);if(d=QB(b,c,f,"textCombine",g))a.textCombineUpright=
|
|
@@ -1355,7 +1355,7 @@ function YB(a,b){var c=null;if(ZB.test(a)){a=ZB.exec(a);c=Number(a[1]);var d=Num
|
|
|
1355
1355
|
function aC(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)}function EB(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{hc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",AB);AB.prototype.parseMedia=AB.prototype.parseMedia;AB.prototype.setManifestType=AB.prototype.setManifestType;AB.prototype.setSequenceMode=AB.prototype.setSequenceMode;AB.prototype.parseInit=AB.prototype.parseInit;
|
|
1356
1356
|
function DB(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]))}
|
|
1357
1357
|
var MB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,UB=/^(\d{1,4}(?:\.\d+)?|100)%$/,TB=/^(\d+px|\d+em|\d*\.?\d+c)$/,NB=/^(\d+)px (\d+)px$/,ZB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,$B=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,bC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,cC=/^(\d*(?:\.\d*)?)f$/,dC=/^(\d*(?:\.\d*)?)t$/,eC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),SB={left:Xb,center:"center",right:"end",start:Xb,
|
|
1358
|
-
end:"end"},RB={left:"line-left",center:"center",right:"line-right"},BB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],CB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],HB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];pe["application/ttml+xml"]=function(){return new AB};function fC(){this.g=new AB}fC.prototype.parseInit=function(a){var b=!1;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).
|
|
1358
|
+
end:"end"},RB={left:"line-left",center:"center",right:"line-right"},BB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],CB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],HB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];pe["application/ttml+xml"]=function(){return new AB};function fC(){this.g=new AB}fC.prototype.parseInit=function(a){var b=!1;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).S("stsd",Sg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};fC.prototype.setSequenceMode=function(){};fC.prototype.setManifestType=function(){};
|
|
1359
1359
|
fC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Lg).box("mdat",Xg(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",fC);fC.prototype.parseMedia=fC.prototype.parseMedia;fC.prototype.setManifestType=fC.prototype.setManifestType;fC.prototype.setSequenceMode=fC.prototype.setSequenceMode;fC.prototype.parseInit=fC.prototype.parseInit;pe['application/mp4; codecs="stpp"']=function(){return new fC};
|
|
1360
1360
|
pe['application/mp4; codecs="stpp.ttml"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new fC};pe['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new fC};function gC(){this.h=!1;this.g="UNKNOWN"}gC.prototype.parseInit=function(){};gC.prototype.setSequenceMode=function(a){this.h=a};gC.prototype.setManifestType=function(a){this.g=a};
|
|
1361
1361
|
gC.prototype.parseMedia=function(a,b){a=vd(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=hC(new Rp(a[1]));if(null==a)throw new T(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=
|
|
@@ -1371,11 +1371,11 @@ m.next())nC(a.value,b,c);else b.payload=Dd(a);else b.payload=Dd(a)}else b.payloa
|
|
|
1371
1371
|
function nC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Jb;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)&&(h=d,g=c.get(g))&&(h.backgroundColor=oC(g.backgroundColor,h.backgroundColor),h.color=oC(g.color,h.color),h.fontFamily=oC(g.fontFamily,h.fontFamily),h.fontSize=
|
|
1372
1372
|
oC(g.fontSize,h.fontSize),h.textShadow=oC(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=ac(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;
|
|
1373
1373
|
if(!f)break;if(f=hC(new Rp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(fh(a)||1==e.length&&fh(e[0]))for(c=ih(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ac(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())nC(a.value,d,c)}
|
|
1374
|
-
function jC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=
|
|
1374
|
+
function jC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Sb:a.textAlign=ec[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"==
|
|
1375
1375
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Rb);else if(d=/^region:(.*)$/.exec(b)){if(b=pC(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=gc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=gc[c[2].toUpperCase()])}
|
|
1376
1376
|
function pC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function hC(a){a=Tp(a,lC);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",gC);gC.prototype.parseMedia=gC.prototype.parseMedia;gC.prototype.setManifestType=gC.prototype.setManifestType;gC.prototype.setSequenceMode=gC.prototype.setSequenceMode;gC.prototype.parseInit=gC.prototype.parseInit;var lC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1377
|
-
pe["text/vtt"]=function(){return new gC};pe['text/vtt; codecs="vtt"']=function(){return new gC};pe['text/vtt; codecs="wvtt"']=function(){return new gC};function qC(){this.g=null}qC.prototype.parseInit=function(a){var b=this,c=!1;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).
|
|
1378
|
-
qC.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 Lg).box("moof",Qg).box("traf",Qg).
|
|
1377
|
+
pe["text/vtt"]=function(){return new gC};pe['text/vtt; codecs="vtt"']=function(){return new gC};pe['text/vtt; codecs="wvtt"']=function(){return new gC};function qC(){this.g=null}qC.prototype.parseInit=function(a){var b=this,c=!1;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).S("mdhd",function(d){d=$i(d.reader,d.version);b.g=d.timescale}).box("minf",Qg).box("stbl",Qg).S("stsd",Sg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};qC.prototype.setSequenceMode=function(){};qC.prototype.setManifestType=function(){};
|
|
1378
|
+
qC.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 Lg).box("moof",Qg).box("traf",Qg).S("tfdt",function(D){g=!0;c=Zi(D.reader,D.version).baseMediaDecodeTime}).S("tfhd",function(D){l=Yi(D.reader,D.flags).Zc}).S("trun",function(D){h=!0;d=aj(D.reader,D.version,D.flags).Yg}).box("mdat",Xg(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Ig(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1379
1379
|
p.value;var r=p.Jf||l,u=p.me?c+p.me:a;a=u+(r||0);var v=0;do{var w=m.R();v+=w;var A=m.R(),z=null;"vttc"==Pg(A)?8<w&&(z=m.rb(w-8)):m.skip(w-8);r&&z&&(w=rC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(ye)};function rC(a,b,c){var d,e,f;(new Lg).box("payl",Xg(function(g){d=vd(g)})).box("iden",Xg(function(g){e=vd(g)})).box("sttg",Xg(function(g){f=vd(g)})).parse(a);return d?sC(d,e,f,b,c):null}
|
|
1380
1380
|
function sC(a,b,c,d,e){d=new Qb(d,e,"");kC(a,d,new Map);b&&(d.id=b);if(c)for(a=new Rp(c),b=Up(a);b;)jC(d,b,[]),Sp(a),b=Up(a);return d}S("shaka.text.Mp4VttParser",qC);qC.prototype.parseMedia=qC.prototype.parseMedia;qC.prototype.setManifestType=qC.prototype.setManifestType;qC.prototype.setSequenceMode=qC.prototype.setSequenceMode;qC.prototype.parseInit=qC.prototype.parseInit;pe['application/mp4; codecs="wvtt"']=function(){return new qC};function tC(){}tC.prototype.parseInit=function(){};tC.prototype.setSequenceMode=function(){};tC.prototype.setManifestType=function(){};tC.prototype.parseMedia=function(a){var b=vd(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 Rp(c[0]),e=uC(d),f=Tp(d,/,/g);d=uC(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 Qb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1381
1381
|
function uC(a){a=Tp(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",tC);tC.prototype.parseMedia=tC.prototype.parseMedia;tC.prototype.setManifestType=tC.prototype.setManifestType;tC.prototype.setSequenceMode=tC.prototype.setSequenceMode;tC.prototype.parseInit=tC.prototype.parseInit;pe["text/x-subviewer"]=function(){return new tC};function vC(){this.g=new gC}vC.prototype.parseInit=function(){};vC.prototype.setSequenceMode=function(){};vC.prototype.setManifestType=function(){};vC.prototype.parseMedia=function(a,b,c){a=vd(a);a=wC(a);a=zb(Ad(a));return this.g.parseMedia(a,b,c)};
|
|
@@ -1384,29 +1384,29 @@ vC.prototype.setManifestType=vC.prototype.setManifestType;vC.prototype.setSequen
|
|
|
1384
1384
|
xC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=vd(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=yC.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=zC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(AC);else if("Style"==a){a=f.split(AC);f={};for(var g=0;g<e.length&&
|
|
1385
1385
|
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={lh:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=zC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(AC);else if("Dialogue"==f){g=g.split(AC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=BC(f.Start);var k=BC(f.End);g=new Qb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.lh=f.Style;(a=d.find(function(l){return function(m){return m.Name==
|
|
1386
1386
|
l.lh}}(a)))&&CC(g,a);e.push(g)}return e};
|
|
1387
|
-
function CC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=DC(c))a.color=c;if(c=b.BackColour)if(c=DC(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=Yb;a.textAlign="start";break;case 2:a.displayAlign=Yb;a.textAlign=
|
|
1388
|
-
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=
|
|
1387
|
+
function CC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=DC(c))a.color=c;if(c=b.BackColour)if(c=DC(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=Yb;a.textAlign="start";break;case 2:a.displayAlign=Yb;a.textAlign=Sb;break;case 3:a.displayAlign=Yb;a.textAlign="end";
|
|
1388
|
+
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Sb;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=Sb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1389
1389
|
function DC(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 BC(a){a=EC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",xC);xC.prototype.parseMedia=xC.prototype.parseMedia;xC.prototype.setManifestType=xC.prototype.setManifestType;xC.prototype.setSequenceMode=xC.prototype.setSequenceMode;xC.prototype.parseInit=xC.prototype.parseInit;
|
|
1390
1390
|
var yC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,zC=/^\s*([^:]+):\s*(.*)/,AC=/\s*,\s*/,EC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;pe["text/x-ssa"]=function(){return new xC};function FC(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)?{Nd:c,ca:a}:null}function GC(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,codec:"mp4a.40."+e}}
|
|
1391
1391
|
function HC(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}
|
|
1392
1392
|
function IC(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,
|
|
1393
1393
|
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 JC(a){this.i=a;this.h=0;this.g=new Map}q=JC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(je(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1394
1394
|
q.transmux=function(a,b,c,d){for(var e=zb(a),f=Xi(e),g=f.length;g<e.length&&!HC(e,g);g++);a=1E3*c.endTime;f=Wi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=GC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=FC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));var l=k.Nd+k.ca;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1395
|
-
k.Nd,g+l),size:k.ca,duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),
|
|
1395
|
+
k.Nd,g+l),size:k.ca,duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:h},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};
|
|
1396
1396
|
S("shaka.transmuxer.AacTransmuxer",JC);JC.prototype.transmux=JC.prototype.transmux;JC.prototype.getOriginalMimeType=JC.prototype.getOriginalMimeType;JC.prototype.convertCodecs=JC.prototype.convertCodecs;JC.prototype.isSupported=JC.prototype.isSupported;JC.prototype.destroy=JC.prototype.destroy;lc("audio/aac",function(){return new JC("audio/aac")},rc);function KC(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,
|
|
1397
1397
|
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,pa:a,ca:e}}
|
|
1398
1398
|
function LC(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 MC(a){this.i=a;this.h=0;this.g=new Map}q=MC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1399
1399
|
q.transmux=function(a,b,c,d){a=zb(a);for(var e=Xi(a),f=e.length;f<a.length&&!LC(a,f);f++);var g=1E3*c.endTime;e=Wi(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=KC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),size:l.ca,duration:1536,
|
|
1400
|
-
eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.ca}a=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,$a:[],pa:h,xa:new Uint8Array([]),
|
|
1400
|
+
eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.ca}a=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,$a:[],pa:h,xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",MC);MC.prototype.transmux=MC.prototype.transmux;
|
|
1401
1401
|
MC.prototype.getOriginalMimeType=MC.prototype.getOriginalMimeType;MC.prototype.convertCodecs=MC.prototype.convertCodecs;MC.prototype.isSupported=MC.prototype.isSupported;MC.prototype.destroy=MC.prototype.destroy;lc("audio/ac3",function(){return new MC("audio/ac3")},rc);function NC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new gj(a.subarray(b+2));ij(c,2);ij(c,3);var d=jj(c,11)+1<<1,e=jj(c,2);if(3==e){e=jj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=jj(c,2);var g=jj(c,3),h=jj(c,1);c=jj(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,pa:a,ca:d}};function OC(a){this.i=a;this.h=0;this.g=new Map}q=OC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1402
1402
|
q.transmux=function(a,b,c,d){a=zb(a);for(var e=Xi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Wi(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=NC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),
|
|
1403
|
-
size:l.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.ca}a=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,$a:[],pa:h,xa:new Uint8Array([]),
|
|
1403
|
+
size:l.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.ca}a=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,$a:[],pa:h,xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",OC);OC.prototype.transmux=OC.prototype.transmux;
|
|
1404
1404
|
OC.prototype.getOriginalMimeType=OC.prototype.getOriginalMimeType;OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;lc("audio/ec3",function(){return new OC("audio/ec3")},rc);function PC(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 gj(b.data),d=oj(c);oj(c);oj(c);lj(c);if(QC.includes(d)&&(d=V(c),3===d&&ij(c,1),lj(c),lj(c),ij(c,1),nj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)nj(c)&&(6>e?pj(c,16):pj(c,64))}lj(c);d=V(c);if(0===d)V(c);else if(1===d)for(ij(c,1),lj(c),lj(c),d=V(c),e=0;e<d;e++)lj(c);lj(c);ij(c,1);var f=V(c),g=V(c),h=jj(c,1);0===h&&ij(c,1);ij(c,1);var k=0,l=0,m=0,n=0;
|
|
1405
1405
|
nj(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(nj(c)&&nj(c)){var p=oj(c),r=[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=r[p-1],e=u[p-1]):255===p&&(d=jj(c,16),e=jj(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],
|
|
1406
|
-
k[5],255,225].concat(k,[1],b));return{height:c,width:f,xa:a,
|
|
1406
|
+
k[5],255,225].concat(k,[1],b));return{height:c,width:f,xa:a,Aa:d,Ba:e}}
|
|
1407
1407
|
function RC(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=qj(new gj(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?
|
|
1408
1408
|
{data:Kd.apply(Ed,x(c)),kd:b}:null}var QC=[100,110,122,244,44,83,86,118,128,138,139,134];function SC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=TC(b.fullData);a=UC(c.fullData);var f=VC(d.fullData);b=WC(b.fullData,c.fullData,d.fullData,{yf:e.yf,Wf:e.Wf,cf:a.cf,df:a.df,Xe:a.Xe,bf:a.bf,Ye:a.Ye,Ze:a.Ze,$e:a.$e,af:a.af,Re:a.Re,Se:a.Se,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,Ke:a.Ke,Yd:a.Yd,Ie:a.Ie,Ge:a.Ge,Fe:a.Fe,Bf:f.Bf});return{height:a.height,width:a.width,
|
|
1409
|
-
xa:b,
|
|
1409
|
+
xa:b,Aa:a.Ti,Ba:a.Si}}function TC(a){var b=new gj(a,!0);oj(b);oj(b);jj(b,4);jj(b,2);jj(b,6);a=jj(b,3);b=nj(b);return{yf:a+1,Wf:b}}
|
|
1410
1410
|
function UC(a){a=new gj(a,!0);oj(a);oj(a);var b=0,c=0,d=0,e=0;jj(a,4);var f=jj(a,3);nj(a);for(var g=jj(a,2),h=jj(a,1),k=jj(a,5),l=oj(a),m=oj(a),n=oj(a),p=oj(a),r=oj(a),u=oj(a),v=oj(a),w=oj(a),A=oj(a),z=oj(a),D=oj(a),y=[],B=[],C=0;C<f;C++)y.push(nj(a)),B.push(nj(a));if(0<f)for(C=f;8>C;C++)jj(a,2);for(C=0;C<f;C++)y[C]&&jj(a,88),B[C]&&oj(a);V(a);y=V(a);3==y&&jj(a,1);B=V(a);C=V(a);nj(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var E=V(a),G=V(a),L=V(a);if(nj(a))for(var K=0;K<=f;K++)V(a),V(a),V(a);else V(a),
|
|
1411
1411
|
V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(nj(a)&&nj(a))for(K=0;4>K;K++)for(var I=0;I<(3===K?2:6);I++)if(nj(a)){var J=Math.min(64,1<<4+(K<<1));1<K&&mj(a);for(var M=0;M<J;M++)mj(a)}else V(a);nj(a);nj(a);nj(a)&&(oj(a),V(a),V(a),nj(a));K=V(a);for(J=I=0;J<K;J++)if(M=!1,0!==J&&(M=nj(a)),M){J===K&&V(a);nj(a);V(a);for(var N=M=0;N<=I;N++){var P=nj(a),R=!1;P||(R=nj(a));(P||R)&&M++}I=M}else{N=V(a);M=V(a);I=N+M;for(P=0;P<N;P++)V(a),nj(a);for(N=0;N<M;N++)V(a),nj(a)}if(nj(a))for(K=V(a),I=0;I<K;I++){for(J=0;J<
|
|
1412
1412
|
L+4;J++)jj(a,1);jj(a,1)}K=L=1;I=0;nj(a);nj(a);if(nj(a)){nj(a)&&(J=oj(a),M=[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<J&&16>=J?(L=M[J-1],K=N[J-1]):255===J&&(L=jj(a,16),K=jj(a,16)));nj(a)&&nj(a);nj(a)&&(jj(a,3),nj(a),nj(a)&&(oj(a),oj(a),oj(a)));nj(a)&&(V(a),V(a));nj(a);nj(a);nj(a);if(J=nj(a))V(a),V(a),V(a),V(a);if(nj(a)&&(jj(a,32),jj(a,32),nj(a)&&V(a),nj(a))){N=!1;J=nj(a);M=nj(a);if(J||M){if(N=nj(a))oj(a),jj(a,5),nj(a),jj(a,5);jj(a,4);jj(a,4);N&&
|
|
@@ -1417,7 +1417,7 @@ function WC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(
|
|
|
1417
1417
|
function bD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function cD(a,b){if(b+1<a.length&&bD(a,b)){var c=XC(a,b),d=4;c&&c.ca&&(d=c.ca);b+=d;return b===a.length||b+1<a.length&&bD(a,b)}return!1}
|
|
1418
1418
|
var YC=[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],ZC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],$C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],aD=[0,1,1,4];function dD(a){this.i=a;this.h=0;this.g=new Map}q=dD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1419
1419
|
q.transmux=function(a,b,c,d){for(var e=zb(a),f=Xi(e).length;f<e.length&&!cD(e,f);f++);var g;for(a=[];f<e.length;){var h=XC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));g||(g=h);f+h.ca<=e.length&&a.push({data:e.subarray(f,f+h.ca),size:h.ca,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=h.ca}if(!g)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));e=9E4*g.Ri/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1420
|
-
duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),
|
|
1420
|
+
duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.h,baseMediaDecodeTime:e,Ya:a},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",dD);dD.prototype.transmux=dD.prototype.transmux;dD.prototype.getOriginalMimeType=dD.prototype.getOriginalMimeType;dD.prototype.convertCodecs=dD.prototype.convertCodecs;dD.prototype.isSupported=dD.prototype.isSupported;
|
|
1421
1421
|
dD.prototype.destroy=dD.prototype.destroy;lc("audio/mpeg",function(){return new dD("audio/mpeg")},rc);function eD(a){this.h=a;this.g=null}q=eD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=je(a).split(","),c=Sd("audio",b);b=Sd("video",b);return!c||b||"mp3"!=fe(c)?!1:lb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
|
|
1422
1422
|
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new rj;a=zb(a);a=this.g.parse(a);if("mp3"!=a.$c().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));c=new Uint8Array([]);e=t(a.Vb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=XC(a,b))?(b+d.ca<=a.length&&(c=Kd(c,a.subarray(b,b+d.ca))),b+=d.ca):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",eD);eD.prototype.transmux=eD.prototype.transmux;
|
|
1423
1423
|
eD.prototype.getOriginalMimeType=eD.prototype.getOriginalMimeType;eD.prototype.convertCodecs=eD.prototype.convertCodecs;eD.prototype.isSupported=eD.prototype.isSupported;eD.prototype.destroy=eD.prototype.destroy;lc("video/mp2t",function(){return new eD("video/mp2t")},qc);/*
|
|
@@ -1439,20 +1439,20 @@ q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])retur
|
|
|
1439
1439
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=je(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return $e(c,"audio/mp4")}).map(Ze).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1440
1440
|
q.transmux=function(a,b,c,d,e){var f=zb(a);if("audio"==e&&!Fj(f)){for(var g=Xi(f),h=g.length;h<f.length;h++)if(cD(f,h))return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));for(h=g.length;h<f.length;h++)if(HC(f,h))return this.h||(this.h=new JC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.L()[0]:null))}this.j?this.j.clearData():this.j=new rj;var k=this.j.parse(f),l=[],m=k.$c();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.Hc();
|
|
1441
1441
|
if(!v.length)throw new T(2,3,3023,c?c.L()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var D=RC(z);if(D){null==r&&(r=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:D.data,size:D.data.byteLength,duration:y,eb:Math.round((A.pts||0)-(A.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:D.kd?2:1,ib:D.kd?0:1}})}}var B=PC(u);if(!B||null==r)throw new T(2,3,3018,c?c.L()[0]:null);b.height=B.height;
|
|
1442
|
-
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),xa:B.xa,
|
|
1442
|
+
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),xa:B.xa,Aa:B.Aa,Ba:B.Ba,data:{sb:this.g,baseMediaDecodeTime:r,Ya:p},stream:b};break;case "hvc":var C=[],E=null,G=[],L=k.Hc();if(!L.length)throw new T(2,3,3023,c?c.L()[0]:null);for(var K=0;K<L.length;K++){var I=L[K],J=I.nalus;G.push.apply(G,x(J));for(var M=!1,N=[],P=!1,R=t(J),Q=R.next();!Q.done;Q=R.next()){var W=Q.value;switch(W.type){case 1:case 0:var Y=
|
|
1443
1443
|
P=!0;break;case 19:case 20:case 21:M=Y=P=!0;break;case 32:Y=!0;break;case 33:Y=!0;break;case 34:Y=!0;break;case 35:P=Y=!0;break;case 39:case 40:Y=!0;break;default:Y=!1}if(P&&Y){var va=W.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=va>>24&255;Fa[1]=va>>16&255;Fa[2]=va>>8&255;Fa[3]=va&255;N.push(Fa);N.push(W.fullData)}}var wa=N.length?{data:Kd.apply(Ed,x(N)),kd:M}:null;if(wa){null==E&&null!=I.dts&&(E=I.dts);var Pa=void 0;Pa=K+1<L.length?(L[K+1].dts||0)-(I.dts||0):1<L.length?(I.dts||0)-(L[K-1].dts||
|
|
1444
|
-
0):9E4*(c.endTime-c.startTime);C.push({data:wa.data,size:wa.data.byteLength,duration:Pa,eb:Math.round((I.pts||0)-(I.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:wa.kd?2:1,ib:wa.kd?0:1}})}}var Za=SC(G);if(!Za||null==E)throw new T(2,3,3018,c?c.L()[0]:null);b.height=Za.height;b.width=Za.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),xa:Za.xa,
|
|
1445
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Va=[],
|
|
1446
|
-
Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Vc+=me}else Vc++}}}if(!
|
|
1447
|
-
duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),
|
|
1448
|
-
Ym.pts&&(
|
|
1449
|
-
|
|
1450
|
-
yf++}}if(0==
|
|
1451
|
-
re);zf?(
|
|
1452
|
-
[],
|
|
1453
|
-
0,1,2,3,4];break;case 134:Cb=[1,1,6,0,1,2,3,4,5];break;case 135:Cb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Cb=[1,1,8,0,1,2,3,4,5,6,7]}var Vu=new Uint8Array([0,Xc.channelCount,0,0,Xc.sampleRate>>>24&255,Xc.sampleRate>>>17&255,Xc.sampleRate>>>8&255,Xc.sampleRate>>>0&255,0,0].concat(x(Cb)));for(var Wu=Xc.sampleRate,Xu=t(k.Vb()),fn=Xu.next();!fn.done;fn=Xu.next()){var gn=fn.value,Af=gn.data;null==
|
|
1454
|
-
wd=
|
|
1455
|
-
|
|
1444
|
+
0):9E4*(c.endTime-c.startTime);C.push({data:wa.data,size:wa.data.byteLength,duration:Pa,eb:Math.round((I.pts||0)-(I.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:wa.kd?2:1,ib:wa.kd?0:1}})}}var Za=SC(G);if(!Za||null==E)throw new T(2,3,3018,c?c.L()[0]:null);b.height=Za.height;b.width=Za.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),xa:Za.xa,Aa:Za.Aa,Ba:Za.Ba,data:{sb:this.g,baseMediaDecodeTime:E,Ya:C},stream:b}}n&&
|
|
1445
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Va=[],Aa,bb=null,bc=t(k.Vb()),Sa=bc.next();!Sa.done;Sa=bc.next()){var nb=Sa.value,Tb=nb.data;if(Tb){var Vc=0;Aa=GC(Tb,Vc);if(!Aa)throw new T(2,3,3018,c?c.L()[0]:null);b.audioSamplingRate=Aa.sampleRate;b.channelsCount=Aa.channelCount;null==bb&&null!==nb.pts&&(bb=nb.pts);for(;Vc<Tb.length;){var ud=FC(Tb,Vc);if(ud){var me=ud.Nd+ud.ca;Vc+me<=Tb.length&&Va.push({data:Tb.subarray(Vc+ud.Nd,Vc+me),size:ud.ca,duration:1024,eb:0,flags:{hb:0,
|
|
1446
|
+
Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Vc+=me}else Vc++}}}if(!Aa||null==bb){if(!k.Hc().length)throw new T(2,3,3018,c?c.L()[0]:null);bb=9E4*c.startTime;var Md=Sd("audio",b.codecs.split(","));if(!Md||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.L()[0]:null);Aa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Md};var pf=IC(Md,b.channelsCount);if(!pf)throw new T(2,3,3018,c?c.L()[0]:null);for(var ne=bb+9E4*(c.endTime-c.startTime),Mi=bb;Mi<ne;)Va.push({data:pf,size:pf.byteLength,
|
|
1447
|
+
duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Mi+=1024/Aa.sampleRate*9E4}var Gg=Aa.sampleRate,Ni=bb/9E4*Gg;n={id:b.id,type:"audio",codecs:Aa.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Gg,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.g,baseMediaDecodeTime:Ni,Ya:Va},stream:b};break;case "ac3":for(var Hg=[],cc=0,Wm=new Uint8Array([]),uj=null,Ou=t(k.Vb()),Xm=Ou.next();!Xm.done;Xm=Ou.next()){var Ym=Xm.value,Zm=Ym.data;null==uj&&null!==
|
|
1448
|
+
Ym.pts&&(uj=Ym.pts);for(var xf=0;xf<Zm.length;){var Pd=KC(Zm,xf);Pd?(b.audioSamplingRate=Pd.sampleRate,b.channelsCount=Pd.channelCount,cc=Pd.sampleRate,Wm=Pd.pa,Hg.push({data:Zm.subarray(xf,xf+Pd.ca),size:Pd.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),xf+=Pd.ca):xf++}}if(0==cc||0==Wm.byteLength||null==uj)throw new T(2,3,3018,c?c.L()[0]:null);var BD=uj/9E4*cc;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:cc,duration:d,$a:[],pa:Wm,xa:new Uint8Array([]),
|
|
1449
|
+
Aa:0,Ba:0,data:{sb:this.g,baseMediaDecodeTime:BD,Ya:Hg},stream:b};break;case "ec3":for(var Pu=[],vj=0,$m=new Uint8Array([]),wj=null,Qu=t(k.Vb()),an=Qu.next();!an.done;an=Qu.next()){var bn=an.value,cn=bn.data;null==wj&&null!==bn.pts&&(wj=bn.pts);for(var yf=0;yf<cn.length;){var Qd=NC(cn,yf);Qd?(b.audioSamplingRate=Qd.sampleRate,b.channelsCount=Qd.channelCount,vj=Qd.sampleRate,$m=Qd.pa,Pu.push({data:cn.subarray(yf,yf+Qd.ca),size:Qd.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),yf+=Qd.ca):
|
|
1450
|
+
yf++}}if(0==vj||0==$m.byteLength||null==wj)throw new T(2,3,3018,c?c.L()[0]:null);var CD=wj/9E4*vj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:vj,duration:d,$a:[],pa:$m,xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.g,baseMediaDecodeTime:CD,Ya:Pu},stream:b};break;case "mp3":for(var Ru=[],xj,yj=null,Su=t(k.Vb()),dn=Su.next();!dn.done;dn=Su.next()){var en=dn.value,Vg=en.data;if(Vg){null==yj&&null!==en.pts&&(yj=en.pts);for(var re=0;re<Vg.length;){var zf=XC(Vg,
|
|
1451
|
+
re);zf?(xj||(xj=zf),re+zf.ca<=Vg.length&&Ru.push({data:Vg.subarray(re,re+zf.ca),size:zf.ca,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),re+=zf.ca):re++}}}if(!xj||null==yj)throw new T(2,3,3018,c?c.L()[0]:null);var Tu=xj.sampleRate,DD=yj/9E4*Tu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Tu,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.g,baseMediaDecodeTime:DD,Ya:Ru},stream:b};break;case "opus":var Uu=
|
|
1452
|
+
[],zj=null,Xc=k.D;if(!Xc)throw new T(2,3,3018,c?c.L()[0]:null);var Cb=[];switch(Xc.Eh){case 1:case 2:Cb=[0];break;case 0:Cb=[255,1,1,0,1];break;case 128:Cb=[255,2,0,0,1];break;case 3:Cb=[1,2,1,0,2,1];break;case 4:Cb=[1,2,2,0,1,2,3];break;case 5:Cb=[1,3,2,0,4,1,2,3];break;case 6:Cb=[1,4,2,0,4,1,2,3,5];break;case 7:Cb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Cb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Cb=[1,1,2,0,1];break;case 131:Cb=[1,1,3,0,1,2];break;case 132:Cb=[1,1,4,0,1,2,3];break;case 133:Cb=[1,1,5,
|
|
1453
|
+
0,1,2,3,4];break;case 134:Cb=[1,1,6,0,1,2,3,4,5];break;case 135:Cb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Cb=[1,1,8,0,1,2,3,4,5,6,7]}var Vu=new Uint8Array([0,Xc.channelCount,0,0,Xc.sampleRate>>>24&255,Xc.sampleRate>>>17&255,Xc.sampleRate>>>8&255,Xc.sampleRate>>>0&255,0,0].concat(x(Cb)));for(var Wu=Xc.sampleRate,Xu=t(k.Vb()),fn=Xu.next();!fn.done;fn=Xu.next()){var gn=fn.value,Af=gn.data;null==zj&&null!==gn.pts&&(zj=gn.pts);for(var Wg=0;Wg<Af.length;){for(var ED=0!==(Af[Wg+1]&16),FD=0!==(Af[Wg+1]&8),
|
|
1454
|
+
wd=Wg+2,Aj=0;255===Af[wd];)Aj+=255,wd+=1;Aj+=Af[wd];wd+=1;wd+=ED?2:0;wd+=FD?2:0;var Yu=Af.slice(wd,wd+Aj);Uu.push({data:Yu,size:Yu.byteLength,duration:960,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Wg=wd+Aj}}if(0==Vu.byteLength||null==zj)throw new T(2,3,3018,c?c.L()[0]:null);b.audioSamplingRate=Xc.sampleRate;b.channelsCount=Xc.channelCount;var GD=zj/9E4*Wu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Wu,duration:d,$a:[],pa:Vu,xa:new Uint8Array([]),Aa:0,
|
|
1455
|
+
Ba:0,data:{sb:this.g,baseMediaDecodeTime:GD,Ya:Uu},stream:b}}n&&(l.push(n),n=null)}}catch(hn){return hn&&3023==hn.code?Promise.resolve(new Uint8Array([])):Promise.reject(hn)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));var Zu=new Tw(l),jn=b.id+"_"+c.i;if(this.i.has(jn))var kn=this.i.get(jn);else kn=Zw(Zu),this.i.set(jn,kn);var HD=px(Zu);this.g++;var ID=Kd(kn,HD);return Promise.resolve(ID)};S("shaka.transmuxer.TsTransmuxer",jD);jD.prototype.transmux=jD.prototype.transmux;
|
|
1456
1456
|
jD.prototype.getOriginalMimeType=jD.prototype.getOriginalMimeType;jD.prototype.convertCodecs=jD.prototype.convertCodecs;jD.prototype.isSupported=jD.prototype.isSupported;jD.prototype.destroy=jD.prototype.destroy;var kD=["aac","ac-3","ec-3","mp3","opus"],lD=["avc","hevc"];lc("video/mp2t",function(){return new jD("video/mp2t")},pc);/*
|
|
1457
1457
|
@license
|
|
1458
1458
|
EME Encryption Scheme Polyfill
|