shaka-player 4.9.30 → 4.9.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/CONTRIBUTORS +1 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +1 -1
- package/dist/locales.js +32 -32
- package/dist/shaka-player.compiled.d.ts +1 -0
- package/dist/shaka-player.compiled.debug.d.ts +1 -0
- package/dist/shaka-player.compiled.debug.externs.js +3 -0
- package/dist/shaka-player.compiled.debug.js +228 -227
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +3 -0
- package/dist/shaka-player.compiled.js +584 -583
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +1 -0
- package/dist/shaka-player.ui.debug.d.ts +1 -0
- package/dist/shaka-player.ui.debug.externs.js +3 -0
- package/dist/shaka-player.ui.debug.js +247 -245
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +3 -0
- package/dist/shaka-player.ui.js +807 -805
- package/dist/shaka-player.ui.map +3 -3
- package/lib/dash/segment_template.js +19 -2
- package/lib/media/adaptation_set_criteria.js +8 -1
- package/lib/media/content_workarounds.js +2 -1
- package/lib/media/drm_engine.js +8 -115
- package/lib/media/media_source_engine.js +38 -33
- package/lib/media/segment_index.js +20 -0
- package/lib/media/segment_prefetch.js +7 -0
- package/lib/media/streaming_engine.js +7 -2
- package/lib/mss/mss_parser.js +6 -0
- package/lib/player.js +5 -1
- package/lib/polyfill/media_capabilities.js +2 -1
- package/lib/polyfill/mediasource.js +12 -0
- package/lib/util/mp4_generator.js +1 -1
- package/lib/util/platform.js +4 -4
- package/package.json +1 -1
- package/ui/controls.js +2 -2
- package/ui/less/containers.less +8 -0
- package/ui/remote_button.js +42 -17
- package/ui/statistics_button.js +0 -2
|
@@ -15,10 +15,10 @@ ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
15
15
|
ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(aa(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ka=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ka;
|
|
18
|
-
function ra(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(qa)qa(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.
|
|
19
|
-
function va(a,b){a.i={
|
|
20
|
-
function Ca(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.
|
|
21
|
-
function Fa(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,va(a.g,g),Ga(a)}a.g.l=null;d.call(a.g,f);return Ga(a)}function Ga(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,va(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.
|
|
18
|
+
function ra(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(qa)qa(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.Uj=b.prototype}function sa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function ta(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}sa.prototype.s=function(a){this.h=a};
|
|
19
|
+
function va(a,b){a.i={gg:b,rg:!0};a.g=a.m||a.j}sa.prototype.return=function(a){this.i={return:a};this.g=this.j};function E(a,b,c){a.g=c;return{value:b}}sa.prototype.u=function(a){this.g=a};function G(a){a.g=0}function wa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function xa(a,b){a.m=0;a.j=b||0}function ya(a,b,c){a.g=b;a.m=c||0}function za(a,b){a.m=b||0;b=a.i.gg;a.i=null;return b}function Ba(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function Ca(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.rg?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 Da(a){this.g=new sa;this.h=a}function Ea(a,b){ta(a.g);var c=a.g.l;if(c)return Fa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ga(a)}
|
|
21
|
+
function Fa(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,va(a.g,g),Ga(a)}a.g.l=null;d.call(a.g,f);return Ga(a)}function Ga(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,va(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.rg)throw b.gg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Ha(a){this.next=function(b){ta(a.g);a.g.l?b=Fa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ga(a));return b};this.throw=function(b){ta(a.g);a.g.l?b=Fa(a,a.g.l["throw"],b,a.g.s):(va(a.g,b),b=Ga(a));return b};this.return=function(b){return Ea(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(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
23
|
function O(a){return Ia(new Ha(new Da(a)))}function Ja(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
24
|
ha("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=fa.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=
|
|
@@ -39,7 +39,7 @@ function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,
|
|
|
39
39
|
ha("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
40
40
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
|
|
41
41
|
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ha("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});
|
|
42
|
-
function Na(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{
|
|
42
|
+
function Na(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{pg:e,v:f}}return{pg:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Na(this,b,c).pg}});
|
|
43
43
|
ha("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ha("Array.prototype.values",function(a){return a?a:function(){return Ma(this,function(b,c){return c})}});
|
|
44
44
|
ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ha("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
|
|
45
45
|
function Oa(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Oa(this,b,"includes").indexOf(b,c||0)}});
|
|
@@ -62,11 +62,11 @@ ib.prototype.Ib=function(){this.target.removeEventListener(this.type,this.listen
|
|
|
62
62
|
function lb(a){var b=mb;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}mb=b}return b||!1}var mb=void 0;function nb(a){if(ob.has(a))return ob.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);ob.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),ob.set(a,b),b):!1}function pb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var ob=new Map;function qb(a,b){this.g=a;this.h=b}qb.prototype.toString=function(){return"v"+this.g+"."+this.h};function rb(a,b){var c=new qb(5,0),d=sb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function tb(a,b,c,d){$a([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function ub(a,b,c,d){Za([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var sb=null;function vb(){}vb.prototype.extract=function(){};vb.prototype.decode=function(){return[]};vb.prototype.clear=function(){};vb.prototype.getStreams=function(){return[]};function wb(){}wb.prototype.init=function(){};wb.prototype.parse=function(){return[]};function xb(){}function yb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Ab(a)==Ab(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Bb(a);b=Bb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Ab(a){return a instanceof ArrayBuffer?a:a.buffer}function Cb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
63
63
|
function Bb(a,b,c){c=void 0===c?Infinity:c;return Db(a,void 0===b?0:b,c,Uint8Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Db(a,void 0===b?0:b,c,Uint16Array)}function Fb(a,b,c){c=void 0===c?Infinity:c;return Db(a,void 0===b?0:b,c,DataView)}function Db(a,b,c,d){var e=Ab(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",xb);xb.toDataView=Fb;xb.toUint16=Eb;xb.toUint8=Bb;xb.toArrayBuffer=Cb;xb.equal=yb;function Gb(){}Gb.prototype.init=function(){};Gb.prototype.i=function(){};Gb.prototype.g=function(){};Gb.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Gb);function Hb(a){this.l=new wb;if(a=Ib[a.toLowerCase()])this.l=a();this.h=new vb;if(a=Jb)this.h=a()}Hb.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Hb.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=Bb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
65
|
-
Hb.prototype.g=function(){this.h.clear()};Hb.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Hb);Hb.findDecoder=function(){return Jb};Hb.unregisterDecoder=function(){Jb=null};Hb.registerDecoder=function(a){Jb=a};Hb.findParser=function(a){return Ib[a]};Hb.unregisterParser=function(a){delete Ib[a]};Hb.registerParser=function(a,b){Ib[a]=b};var Ib={},Jb=null;function Kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Lb;this.scroll=Mb}S("shaka.text.CueRegion",Kb);var Lb=1;Kb.units={PX:0,PERCENTAGE:Lb,LINES:2};var Mb="";Kb.scrollMode={NONE:Mb,UP:"up"};function Nb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Ob(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Pb(a,b,c){c||(c=Nb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={
|
|
66
|
-
function Qb(a,b,c){c||(c=Nb);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 Rb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kb;this.position=null;this.positionAlign=Sb;this.size=0;this.textAlign=Tb;this.direction=Ub;this.writingMode=
|
|
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={
|
|
65
|
+
Hb.prototype.g=function(){this.h.clear()};Hb.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Hb);Hb.findDecoder=function(){return Jb};Hb.unregisterDecoder=function(){Jb=null};Hb.registerDecoder=function(a){Jb=a};Hb.findParser=function(a){return Ib[a]};Hb.unregisterParser=function(a){delete Ib[a]};Hb.registerParser=function(a,b){Ib[a]=b};var Ib={},Jb=null;function Kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Lb;this.scroll=Mb}S("shaka.text.CueRegion",Kb);var Lb=1;Kb.units={PX:0,PERCENTAGE:Lb,LINES:2};var Mb="";Kb.scrollMode={NONE:Mb,UP:"up"};function Nb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Ob(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Pb(a,b,c){c||(c=Nb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={sg:void 0},d=a.next()){e.sg=d.value;d=b.findIndex(function(f){return function(g){return c(f.sg,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
|
|
66
|
+
function Qb(a,b,c){c||(c=Nb);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 Rb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kb;this.position=null;this.positionAlign=Sb;this.size=0;this.textAlign=Tb;this.direction=Ub;this.writingMode=Wb;this.lineInterpretation=Xb;this.line=null;this.lineHeight="";this.lineAlign=Yb;this.displayAlign=Zb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=$b;this.fontStyle=ac;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
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={Ub:32,rows:15}}function bc(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}Rb.prototype.clone=function(){var a=new Rb(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 cc(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(!Qb(a.nestedCues,b.nestedCues,cc))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(!Qb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}S("shaka.text.Cue",Rb);Rb.equal=cc;Rb.prototype.clone=Rb.prototype.clone;var Sb="auto";
|
|
69
|
-
Rb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Sb};var Tb="center",dc={LEFT:"left",RIGHT:"right",CENTER:Tb,START:"start",END:"end"};Rb.textAlign=dc;var Zb="after",ec={BEFORE:"before",CENTER:"center",AFTER:Zb};Rb.displayAlign=ec;var Ub="ltr";Rb.direction={HORIZONTAL_LEFT_TO_RIGHT:Ub,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var
|
|
69
|
+
Rb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Sb};var Tb="center",dc={LEFT:"left",RIGHT:"right",CENTER:Tb,START:"start",END:"end"};Rb.textAlign=dc;var Zb="after",ec={BEFORE:"before",CENTER:"center",AFTER:Zb};Rb.displayAlign=ec;var Ub="ltr";Rb.direction={HORIZONTAL_LEFT_TO_RIGHT:Ub,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Wb="horizontal-tb";Rb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Wb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Xb=0;
|
|
70
70
|
Rb.lineInterpretation={LINE_NUMBER:Xb,PERCENTAGE:1};var Yb="start",fc={CENTER:"center",START:Yb,END:"end"};Rb.lineAlign=fc;var gc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Rb.defaultTextColor=gc;var hc={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Rb.defaultTextBackgroundColor=hc;var $b=400;Rb.fontWeight={NORMAL:$b,BOLD:700};
|
|
71
71
|
var ac="normal",ic={NORMAL:ac,ITALIC:"italic",OBLIQUE:"oblique"};Rb.fontStyle=ic;Rb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function jc(){}jc.prototype.destroy=function(){};function kc(a,b,c){lc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,be:b}}function mc(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([nc,oc,pc,qc]),e=d.next();!e.done;e=d.next())if(e=lc[c+"-"+e.value]){var f=e.be(),g=f.isSupported(a,b);f.destroy();if(g)return e.be}return null}S("shaka.transmuxer.TransmuxerEngine",jc);jc.findTransmuxer=mc;jc.unregisterTransmuxer=function(a,b){delete lc[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
72
72
|
jc.registerTransmuxer=kc;jc.prototype.destroy=jc.prototype.destroy;var lc={},qc=1,pc=2,oc=3,nc=4;jc.PluginPriority={FALLBACK:qc,PREFERRED_SECONDARY:pc,PREFERRED:oc,APPLICATION:nc};/*
|
|
@@ -79,14 +79,14 @@ var rc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
79
79
|
Copyright 2006 The Closure Library Authors
|
|
80
80
|
SPDX-License-Identifier: Apache-2.0
|
|
81
81
|
*/
|
|
82
|
-
function sc(a){var b;a instanceof sc?(tc(this,a.xb),this.nc=a.nc,uc(this,a.zb),vc(this,a.
|
|
83
|
-
r.toString=function(){var a=[],b=this.xb;b&&a.push(zc(b,Ac,!0),":");if(b=this.zb){a.push("//");var c=this.nc;c&&a.push(zc(c,Ac,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.
|
|
84
|
-
r.resolve=function(a){var b=this.clone();"data"===b.xb&&(b=new sc);var c=!!a.xb;c?tc(b,a.xb):c=!!a.nc;c?b.nc=a.nc:c=!!a.zb;c?uc(b,a.zb):c=null!=a.
|
|
85
|
-
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?wc(b,a.g.clone()):c=!!a.Vb;c&&(b.Vb=a.Vb);return b};r.clone=function(){return new sc(this)};function tc(a,b,c){a.xb=c?xc(b,!0):b;a.xb&&(a.xb=a.xb.replace(/:$/,""))}function uc(a,b,c){a.zb=c?xc(b,!0):b}function vc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.
|
|
82
|
+
function sc(a){var b;a instanceof sc?(tc(this,a.xb),this.nc=a.nc,uc(this,a.zb),vc(this,a.Gc),this.Na=a.Na,wc(this,a.g.clone()),this.Vb=a.Vb):a&&(b=String(a).match(rc))?(tc(this,b[1]||"",!0),this.nc=xc(b[2]||""),uc(this,b[3]||"",!0),vc(this,b[4]),this.Na=xc(b[5]||"",!0),wc(this,b[6]||"",!0),this.Vb=xc(b[7]||"")):this.g=new yc(null)}r=sc.prototype;r.xb="";r.nc="";r.zb="";r.Gc=null;r.Na="";r.Vb="";
|
|
83
|
+
r.toString=function(){var a=[],b=this.xb;b&&a.push(zc(b,Ac,!0),":");if(b=this.zb){a.push("//");var c=this.nc;c&&a.push(zc(c,Ac,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Gc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.zb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zc(b,"/"==b.charAt(0)?Bc:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Vb)&&a.push("#",zc(b,Dc));return a.join("")};
|
|
84
|
+
r.resolve=function(a){var b=this.clone();"data"===b.xb&&(b=new sc);var c=!!a.xb;c?tc(b,a.xb):c=!!a.nc;c?b.nc=a.nc:c=!!a.zb;c?uc(b,a.zb):c=null!=a.Gc;var d=a.Na;if(c)vc(b,a.Gc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.zb&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
85
|
+
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?wc(b,a.g.clone()):c=!!a.Vb;c&&(b.Vb=a.Vb);return b};r.clone=function(){return new sc(this)};function tc(a,b,c){a.xb=c?xc(b,!0):b;a.xb&&(a.xb=a.xb.replace(/:$/,""))}function uc(a,b,c){a.zb=c?xc(b,!0):b}function vc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Gc=b}else a.Gc=null}
|
|
86
86
|
function wc(a,b,c){b instanceof yc?a.g=b:(c||(b=zc(b,Ec)),a.g=new yc(b))}function xc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function zc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ac=/[#\/\?@]/g,Cc=/[#\?:]/g,Bc=/[#\?]/g,Ec=/[#\?@]/g,Dc=/#/g;function yc(a){this.g=a||null}
|
|
87
|
-
function Gc(a){if(!a.Ha&&(a.Ha={},a.
|
|
87
|
+
function Gc(a){if(!a.Ha&&(a.Ha={},a.Qc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=yc.prototype;r.Ha=null;r.Qc=null;function Hc(a){Gc(a);return a.Qc}r.add=function(a,b){Gc(this);this.g=null;var c=this.Ha.hasOwnProperty(a)?this.Ha[a]:null;c||(this.Ha[a]=c=[]);c.push(b);this.Qc++;return this};
|
|
88
88
|
r.set=function(a,b){Gc(this);this.g=null;this.Ha.hasOwnProperty(a)?this.Ha[a]=[b]:this.add(a,b);return this};r.get=function(a){Gc(this);return this.Ha[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ha)return"";var a=[],b;for(b in this.Ha)for(var c=encodeURIComponent(b),d=this.Ha[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
89
|
-
r.clone=function(){var a=new yc;a.g=this.g;if(this.Ha){var b={},c;for(c in this.Ha)b[c]=this.Ha[c].concat();a.Ha=b;a.
|
|
89
|
+
r.clone=function(){var a=new yc;a.g=this.g;if(this.Ha){var b={},c;for(c in this.Ha)b[c]=this.Ha[c].concat();a.Ha=b;a.Qc=this.Qc}return a};function T(a,b,c){var d=Ja.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Ic)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}T.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",T);var Ic=!0;T.Severity={RECOVERABLE:1,CRITICAL:2};T.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
90
90
|
T.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
91
91
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
|
|
92
92
|
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
|
|
@@ -101,7 +101,7 @@ f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired
|
|
|
101
101
|
function Mc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Nc=new Jc(function(){return Cb(new Uint8Array([0]))}),Oc=new Map;function Qc(a){this.h=a;this.g=null}Qc.prototype.Y=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Qc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Sc(a){this.h=a;this.g=null}Sc.prototype.lc=function(){this.stop();this.h();return this};Sc.prototype.Y=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.h()})).Y(a);return this};Sc.prototype.Va=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.g.Y(a);b.h()})).Y(a);return this};Sc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Sc);Sc.prototype.stop=Sc.prototype.stop;Sc.prototype.tickEvery=Sc.prototype.Va;
|
|
102
102
|
Sc.prototype.tickAfter=Sc.prototype.Y;Sc.prototype.tickNow=Sc.prototype.lc;function Tc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Uc(a){return""!=Vc().canPlayType(a)}function Wc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Xc(){return Yc("Xbox One")}function Zc(){return Yc("Tizen")}function $c(){return Yc("Tizen 3")}function ad(){return Yc("Tizen 2")}function bd(){return Yc("Web0S")}function cd(){return bd()&&38===dd()}function ed(){return Yc("CrKey")}
|
|
103
103
|
function dd(){if(!Yc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function fd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Zc()&&!Yc("PC=EOS")&&!Yc("PC=APL")&&!Yc("VirginMedia")&&!gd()&&!hd()&&!Yc("AFT")&&!Yc("WPE")&&!Yc("DT_STB_BCM")&&!Yc("Sky_STB")}function id(){return Yc("PlayStation 5")}function hd(){return Yc("PlayStation 4")}function jd(){return Yc("Hisense")||Yc("VIDAA")}
|
|
104
|
-
function gd(){return Yc("SOPOpenBrowser")}function kd(){if(!fd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function ld(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("
|
|
104
|
+
function gd(){return Yc("SOPOpenBrowser")}function kd(){if(!fd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function ld(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function md(){return Yc("Android")}
|
|
105
105
|
function Yc(a){return(navigator.userAgent||"").includes(a)}function Vc(){if(nd)return nd;od||(od=new Sc(function(){nd=null}));(nd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(nd=document.createElement("video"));od.Y(1);return nd}function pd(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
|
|
106
106
|
function ud(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u;return O(function(v){switch(v.g){case 1:a={width:Infinity,height:Infinity};if(ed()){n=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;wa(v,15);if(!(p=n)){v.u(17);break}return E(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(Zc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
107
107
|
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(w){$a("Tizen: Error detecting screen size, default screen size 1920x1080.")}v.u(3);break}if(Xc()){a.width=1920;a.height=1080;try{c=void 0;c="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows;d=new c.Media.Protection.ProtectionCapabilities;
|
|
@@ -115,19 +115,19 @@ function yd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004)
|
|
|
115
115
|
function Ad(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Bb(a);if(239==c[0]&&187==c[1]&&191==c[2])return xd(c);if(254==c[0]&&255==c[1])return yd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return yd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return yd(a,!1);if(0==c[1]&&0==c[3])return yd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return xd(a);throw new T(2,2,2003);}
|
|
116
116
|
function Bd(a){if(window.TextEncoder&&!hd()){var b=new TextEncoder;return Cb(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 Cb(b)}function Cd(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 zd(a){return Dd.value()(a)}
|
|
117
117
|
function Ed(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",wd);wd.resetFromCharCode=function(){Dd.g=void 0};
|
|
118
|
-
wd.toUTF16=Cd;wd.toUTF8=Bd;wd.fromBytesAutoDetect=Ad;wd.fromUTF16=yd;wd.fromUTF8=xd;var Dd=new Jc(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={
|
|
118
|
+
wd.toUTF16=Cd;wd.toUTF8=Bd;wd.fromBytesAutoDetect=Ad;wd.fromUTF16=yd;wd.fromUTF8=xd;var Dd=new Jc(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={Rb:65536};0<b.Rb;b={Rb:b.Rb},b.Rb/=2)if(a(b.Rb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Rb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Rb));return e}}(b);return null});function Fd(){}function Gd(a){a=zd(Bb(a));return btoa(a)}function Hd(a,b){b=void 0==b?!0:b;a=Gd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Id(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 Jd(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}
|
|
119
119
|
function Kd(a){var b=Bb(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 Nd(){for(var a=Ja.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(Bb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Fd);Fd.concat=Nd;Fd.toHex=Kd;Fd.fromHex=Jd;Fd.fromBase64=Id;Fd.toBase64=Hd;Fd.toStandardBase64=Gd;function Od(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new sc(a[0]);b=new sc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new sc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new sc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
120
120
|
function Pd(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
|
|
121
121
|
function Qd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Hd(Jd(h),!1));var l=g;22!=l.length&&(l=Hd(Jd(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:Bb(Bd(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
122
122
|
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}
|
|
123
|
-
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={
|
|
123
|
+
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={ga:"video",W:"audio",qa:Ud,pe:"image",Ui:"application"},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 Xd(){}function Yd(a,b){var c=a;b&&!Zd.includes(a)&&(c+='; codecs="'+b+'"');return c}function $d(a,b){b&&(a+='; codecs="'+b+'"');return a}function ae(a,b,c){var d=Yd(a,b);b=$d(a,b);mc(b)?(a=mc(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}
|
|
124
124
|
function be(a,b,c){var d=[b];ce.forEach(function(e,f){var g=a[f];"codecs"==f?Zd.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function de(a){return a.split(";")[0].split("/")[1]}
|
|
125
125
|
function ee(a){var b=fe(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
126
126
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function ge(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=fe(c.value),b.push(c[0]);return b.sort().join(",")}
|
|
127
127
|
function ie(a){return a.split(";")[0]}function je(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function ke(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function fe(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",Xd);Xd.getFullTypeWithAllCodecs=$d;Xd.getFullType=Yd;
|
|
128
128
|
var ce=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Zd=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function me(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function ne(a){return oe[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Jb:!1}me.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
129
|
-
function pe(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return E(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Bb(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Bb(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(q){return q.startTime>=a.l&&q.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);
|
|
130
|
-
me.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return E(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));
|
|
129
|
+
function pe(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return E(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Bb(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Bb(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(q){return q.startTime>=a.l&&q.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);G(p)})}
|
|
130
|
+
me.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return E(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));G(d)})};function qe(a,b,c){a.l=b;a.m=c}function re(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
131
131
|
function se(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())se(a,d.value,c)}
|
|
132
132
|
function te(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);se(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
133
133
|
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}S("shaka.text.TextEngine",me);me.prototype.destroy=me.prototype.destroy;me.findParser=function(a){return oe[a]};me.unregisterParser=function(a){delete oe[a]};me.registerParser=function(a,b){oe[a]=b};var oe={};function ue(a,b){return a.concat(b)}function ve(){}function we(a){return null!=a};function xe(){}function ye(a,b){a=ze(a);b=ze(b);return a.split("-")[0]==b.split("-")[0]}function Ae(a,b){a=ze(a);b=ze(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Be(a,b){a=ze(a);b=ze(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
|
|
@@ -145,19 +145,19 @@ function Ke(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Le(e,b,c);if(d.len
|
|
|
145
145
|
e.next())g=g.value,g.audio&&c.add(g.audio),g.video&&b.add(g.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=ee(m.codecs),p=ee(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);
|
|
146
146
|
e.set(k,l)}c=Array.from(b).sort(function(u,v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=pb();var q=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=ee(m.codecs),p=ee(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),q.push(g.id)):g.width==m.width&&g.height==m.height&&(n=ee(m.codecs),p=ee(g.codecs),n!=p||g.bandwidth&&
|
|
147
147
|
m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),q.push(g.id)))}else l.push(g),q.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!q.includes(u.id)?!1:!0})}
|
|
148
|
-
function Le(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={
|
|
148
|
+
function Le(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={Zg:void 0},d=b.next())if(e.Zg=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Zg)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={Xf:void 0},b=c.next())if(d.Xf=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Xf)}}(d)),b.length){a=b;break}return a}function Me(a,b,c){a.variants=a.variants.filter(function(d){return Ne(d,b,c)})}
|
|
149
149
|
function Ne(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
|
|
150
150
|
!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function Oe(a,b,c){var d=!1;a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Ne(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Pe(a,b,c){c=void 0===c?[]:c;return O(function(d){if(1==d.g)return E(d,Qe(a,b,0<b.offlineSessionIds.length,c),2);Re(b);return E(d,Se(b),0)})}
|
|
151
|
-
function Qe(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return Xc()&&Te(b.variants),E(g,Ue(b.variants,c,!1,d),2);e=null;a&&(f=a.g)&&(e=f.keySystem);b.variants=b.variants.filter(function(h){var k=Ve(h,e);if(!k){var l=[];h.audio&&l.push(We(h.audio));h.video&&l.push(We(h.video))}return k});
|
|
151
|
+
function Qe(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return Xc()&&Te(b.variants),E(g,Ue(b.variants,c,!1,d),2);e=null;a&&(f=a.g)&&(e=f.keySystem);b.variants=b.variants.filter(function(h){var k=Ve(h,e);if(!k){var l=[];h.audio&&l.push(We(h.audio));h.video&&l.push(We(h.video))}return k});G(g)})}
|
|
152
152
|
function Te(a){var b={dvav:"avc3",dva1:"avc1",dvhe:"hev1",dvh1:"hvc1"},c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(Object.keys(b));for(var e=d.next();!e.done;e=d.next())if(e=e.value,a.codecs.includes(e)){a.codecs=a.codecs.replace(e,b[e]);break}}}
|
|
153
153
|
function Ve(a,b){var c=Xc(),d=Yc("Firefox")&&md(),e=a.video,f=e&&e.width||0,g=e&&e.height||0;if(c&&e&&(1920<f||1080<g)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return!1;if(e){c=Xe(e.codecs);if(e.codecs.includes(",")){f=e.codecs.split(",");c=Rd("video",f);c=Xe(c);f=Rd("audio",f);f=Ye(f,e.mimeType);g=ae(e.mimeType,f,"audio");if(!nb(g))return!1;c=[c,f].join()}f=ae(e.mimeType,c,"video");if(!nb(f))return!1;e.codecs=c}e=a.audio;if(d&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus"))return!1;
|
|
154
154
|
if(e){d=Ye(e.codecs,e.mimeType);c=ae(e.mimeType,d,"audio");if(!nb(c))return!1;e.codecs=d}return a.decodingInfos.some(function(h){return!h.supported||b&&(h=h.keySystemAccess)&&h.keySystem!=b?!1:!0})}function Ze(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=Ze(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
155
155
|
function $e(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Ie(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,rd:void 0},g=f.next())k=g.value,h.rd=Ze(k),h.cache=af,h.cache[h.rd]?d=c(d,h.cache[h.rd]):e.push(bf(k).then(function(m){return function(n){var p=
|
|
156
|
-
null;n=t(n||[]);for(var q=n.next();!q.done;q=n.next())p=c(p,q.value);p&&(m.cache[m.rd]=p,d=c(d,p))}}(h)));return E(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);
|
|
156
|
+
null;n=t(n||[]);for(var q=n.next();!q.done;q=n.next())p=c(p,q.value);p&&(m.cache[m.rd]=p,d=c(d,p))}}(h)));return E(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);G(l)})}
|
|
157
157
|
function bf(a){var b=[""];a.video&&(b=je(a.video.contentType).split(","));var c=[""];a.audio&&(c=je(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={rc:void 0},g=f.next())g=g.value,h.rc=He(a),a.video&&(h.rc.video.contentType=Yd(ie(h.rc.video.contentType),e)),a.audio&&(h.rc.audio.contentType=Yd(ie(h.rc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.rc).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
158
158
|
return null})}
|
|
159
|
-
function Ue(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D;return O(function(
|
|
160
|
-
return E(
|
|
159
|
+
function Ue(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D;return O(function(J){switch(J.g){case 1:if(e=a.some(function(H){return H.decodingInfos.length}))return J.return();f=t(d);g=f.next();h={};case 2:if(g.done){J.u(4);break}h.Bg=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){J.u(7);break}n=m.value;p=cf(n,b,c).filter(function(H){return function(K){K=K[0];return(K.keySystemConfiguration&&K.keySystemConfiguration.keySystem)===H.Bg}}(h));q=t(p);u=q.next();case 8:if(u.done){J.u(10);break}v=u.value;
|
|
160
|
+
return E(J,$e(n,v),9);case 9:u=q.next();J.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();J.u(5);break;case 7:if(k)return J.return();h={Bg:void 0};g=f.next();J.u(2);break;case 4:w=t(a),A=w.next();case 12:if(A.done){J.u(0);break}y=A.value;C=cf(y,b,c).filter(function(H){H=H[0];H=H.keySystemConfiguration&&H.keySystemConfiguration.keySystem;return!H||!d.includes(H)});z=t(C);B=z.next();case 15:if(B.done){A=w.next();J.u(12);break}D=B.value;return E(J,$e(y,D),16);case 16:B=z.next(),J.u(15)}})}
|
|
161
161
|
function cf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=je(k);if(l.includes(",")&&!d){var m=l.split(","),n=ie(k);l=Rd("video",m);m=Rd("audio",m);m=Ye(m,n);n=ae(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Xe(l);k={contentType:ae(ie(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
|
|
162
162
|
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=ie(l),l=Ye(je(l),k),k=ae(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
|
|
163
163
|
k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=n.next();!m.done;m=
|
|
@@ -165,7 +165,7 @@ n.next()){m=Object.assign({},m.value);var p=c.get(k),q={keySystem:k,initDataType
|
|
|
165
165
|
u.sessionType&&(q.sessionTypes=[u.sessionType]);d&&(q.audio?(u.encryptionScheme&&(q.audio.encryptionScheme=q.audio.encryptionScheme||u.encryptionScheme),q.audio.robustness=q.audio.robustness||u.audioRobustness):(q.audio={robustness:u.audioRobustness},u.encryptionScheme&&(q.audio.encryptionScheme=u.encryptionScheme)),""==q.audio.robustness&&delete q.audio.robustness);e&&(q.video?(u.encryptionScheme&&(q.video.encryptionScheme=q.video.encryptionScheme||u.encryptionScheme),q.video.robustness=q.video.robustness||
|
|
166
166
|
u.videoRobustness):(q.video={robustness:u.videoRobustness},u.encryptionScheme&&(q.video.encryptionScheme=u.encryptionScheme)),""==q.video.robustness&&delete q.video.robustness)}m.keySystemConfiguration=q;l.push(m)}a.push(l)}return a}function Ye(a,b){return"flac"==a.toLowerCase()?kd()?"fLaC":"flac":"opus"===a.toLowerCase()?kd()?"mp4"==de(b)?"Opus":"opus":"opus":a}
|
|
167
167
|
function Xe(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Re(a){a.textStreams=a.textStreams.filter(function(b){b=Yd(b.mimeType,b.codecs);return ne(b)})}
|
|
168
|
-
function Se(a){var b,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.u(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(df.has(f)){l.u(5);break}g=ef.get(f);if(!g){df.set(f,!1);l.u(5);break}return E(l,ff(g),7);case 7:h=l.h,df.set(f,h);case 5:(k=df.get(f))&&b.push(e);d=c.next();l.u(2);break;case 4:a.imageStreams=b,
|
|
168
|
+
function Se(a){var b,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.u(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(df.has(f)){l.u(5);break}g=ef.get(f);if(!g){df.set(f,!1);l.u(5);break}return E(l,ff(g),7);case 7:h=l.h,df.set(f,h);case 5:(k=df.get(f))&&b.push(e);d=c.next();l.u(2);break;case 4:a.imageStreams=b,G(l)}})}
|
|
169
169
|
function ff(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
|
|
170
170
|
function gf(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
171
171
|
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,
|
|
@@ -187,7 +187,7 @@ r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.r
|
|
|
187
187
|
0;d<a.length;d++){e=a[d];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<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.l=Date.now();return c};r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};
|
|
188
188
|
r.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.l&&this.j&&Cf(this))};r.trySuggestStreams=function(){null!=this.l&&this.j&&Cf(this)};r.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.m?this.m.getBandwidthEstimate(a):a};r.setVariants=function(a){this.s=a};
|
|
189
189
|
r.playbackRateChanged=function(a){this.B=a};r.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.Y(Df)}),this.h.observe(this.o))};r.setCmsdManager=function(a){this.m=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
190
|
-
function Cf(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Af(a,b,c,d,e){if(a.m){var f=a.m.
|
|
190
|
+
function Cf(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Af(a,b,c,d,e){if(a.m){var f=a.m.mg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ne(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
191
191
|
function Bf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",zf);zf.prototype.configure=zf.prototype.configure;zf.prototype.setCmsdManager=zf.prototype.setCmsdManager;zf.prototype.setMediaElement=zf.prototype.setMediaElement;zf.prototype.playbackRateChanged=zf.prototype.playbackRateChanged;zf.prototype.setVariants=zf.prototype.setVariants;
|
|
192
192
|
zf.prototype.getBandwidthEstimate=zf.prototype.getBandwidthEstimate;zf.prototype.trySuggestStreams=zf.prototype.trySuggestStreams;zf.prototype.segmentDownloaded=zf.prototype.segmentDownloaded;zf.prototype.disable=zf.prototype.disable;zf.prototype.enable=zf.prototype.enable;zf.prototype.chooseVariant=zf.prototype.chooseVariant;zf.prototype.init=zf.prototype.init;zf.prototype.release=zf.prototype.release;zf.prototype.stop=zf.prototype.stop;var Df=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ef(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Ef.prototype.add=function(a,b,c){return Ff(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
193
193
|
function Ff(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||c&&!Gf(e,f)||!Hf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Gf(a,b))&&Hf(a.roles,b.roles)));return d?!1:!0}Ef.prototype.values=function(){return this.g.values()};
|
|
@@ -195,34 +195,35 @@ function Gf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(fu
|
|
|
195
195
|
function Jf(a,b,c,d,e,f,g,h,k,l){this.s=a;this.A=b;this.h=c;this.i=d;this.B=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.o=void 0===l?!1:l}
|
|
196
196
|
Jf.prototype.create=function(a){var b=[];b=Kf(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Lf(b,this.A);a.length&&(b=a);this.l&&(a=Mf(b,this.l),a.length&&(b=a));this.i&&(a=Nf(b,this.i),a.length&&(b=a));this.h&&(a=Of(b,this.h),a.length&&(b=a));this.g&&(a=Pf(b,this.g),a.length&&(b=a));this.j&&(a=Qf(b,this.j),a.length&&(b=a));a=Rf(b,this.B);a.length&&(b=a);return new Ef(b[0],b,!("smooth"==this.m&&pb()),this.o)};
|
|
197
197
|
function Kf(a,b){b=ze(b);var c=Ge(b,a.map(function(d){return Fe(d)}));return c?a.filter(function(d){return c==Fe(d)}):[]}function Lf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Pf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Qf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
198
|
-
function Of(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Nf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?
|
|
199
|
-
function
|
|
198
|
+
function Of(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Nf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?a.some(function(c){return c.video&&c.video.hdr&&"HLG"==c.video.hdr?!0:!1})?"HLG":"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Mf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}
|
|
199
|
+
function Rf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Sf(){this.g=Tf;this.i=(new Map).set(Tf,2).set(Uf,1);this.h=0}function Vf(a,b,c){a.i.set(Tf,c).set(Uf,b)}var Uf=0,Tf=1;function Wf(a,b){var c=Xf();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}
|
|
200
|
+
function Yf(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 E(d,new Promise(function(e){(new Sc(e)).Y(c/1E3)}),2)}a.h*=a.m;G(d)})}function Xf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Zf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Zf.prototype.resolve=function(){};Zf.prototype.reject=function(){};function $f(a,b){this.promise=a;this.i=b;this.g=!1}function ag(a){return new $f(Promise.reject(a),function(){return Promise.resolve()})}function bg(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new $f(a,function(){return Promise.resolve()})}function cg(a){return new $f(Promise.resolve(a),function(){return Promise.resolve()})}function dg(a){return new $f(a,function(){return a.catch(function(){})})}$f.prototype.abort=function(){this.g=!0;return this.i()};
|
|
200
201
|
function eg(a){return new $f(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}$f.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
201
202
|
$f.prototype.xa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=fg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Zf,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new $f(f,function(){return d()})};
|
|
202
203
|
function fg(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",$f);$f.prototype.chain=$f.prototype.xa;$f.prototype["finally"]=$f.prototype.finally;$f.all=eg;$f.prototype.abort=$f.prototype.abort;$f.notAbortable=dg;$f.completed=cg;$f.aborted=bg;$f.failed=ag;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}
|
|
203
204
|
function gg(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);
|
|
204
|
-
var hg={
|
|
205
|
-
|
|
206
|
-
ig.prototype.release=function(){this.
|
|
207
|
-
function pg(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)}r.
|
|
205
|
+
var hg={Wi:"abrstatuschanged",Xi:"adaptation",Yi:"buffering",Zi:"complete",$i:"downloadfailed",aj:"downloadheadersreceived",bj:"drmsessionupdate",dj:"emsg",uj:"prft",Error:"error",ej:"expirationupdated",fj:"firstquartile",gj:"gapjumped",jj:"keystatuschanged",lj:"loaded",mj:"loading",oj:"manifestparsed",pj:"manifestupdated",qj:"mediaqualitychanged",Metadata:"metadata",rj:"midpoint",sj:"nospatialvideoinfo",tj:"onstatechange",vj:"ratechange",xj:"segmentappended",yj:"sessiondata",zj:"spatialvideoinfo",
|
|
206
|
+
Aj:"stalldetected",Bj:"started",Cj:"statechanged",Dj:"streaming",Ej:"textchanged",Fj:"texttrackvisibility",Gj:"thirdquartile",Hj:"timelineregionadded",Ij:"timelineregionenter",Jj:"timelineregionexit",Kj:"trackschanged",Mj:"unloading",Oj:"variantchanged"};function ig(){this.ta=new gb;this.Wd=this}ig.prototype.addEventListener=function(a,b){this.ta&&this.ta.push(a,b)};ig.prototype.removeEventListener=function(a,b){this.ta&&this.ta.remove(a,b)};ig.prototype.dispatchEvent=function(a){if(!this.ta)return!0;var b=this.ta.get(a.type)||[],c=this.ta.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.Wd;a.currentTarget=this.Wd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
207
|
+
ig.prototype.release=function(){this.ta=null};function jg(){this.g=[]}function kg(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}jg.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 lg(a,b,c,d,e,f){ig.call(this);this.i=!1;this.m=new jg;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.F=e||null;this.C=f||null;this.o=this.s=!1}ra(lg,ig);r=lg.prototype;r.Ef=function(a){this.s=a};r.Ff=function(a){this.o=a};function mg(a,b,c,d){c=c||ng;var e=og[a];if(!e||c>=e.priority)og[a]={priority:c,be:b,pi:void 0===d?!1:d}}
|
|
208
|
+
function pg(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)}r.ti=function(a){this.g.add(a)};r.Pi=function(a){this.g.delete(a)};r.ph=function(){this.g.clear()};r.ui=function(a){this.h.add(a)};r.Qi=function(a){this.h.delete(a)};r.qh=function(){this.h.clear()};
|
|
208
209
|
function qg(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}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();ig.prototype.release.call(this);return this.m.destroy()};
|
|
209
210
|
r.request=function(a,b,c){var d=this,e=new rg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new sg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?He(b.retryParameters):Xf();b.uris=He(b.uris);f=tg(this,a,b,c);var g=f.xa(function(){return ug(d,a,b,c,new Wf(b.retryParameters,!1),0,null,e)}),h=g.xa(function(p){return vg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
210
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.xa(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.
|
|
211
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.xa(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.Xh||!d.l||u.fromCache||"HEAD"==b.method||a!=wg||d.l(u.timeMs,u.data.byteLength,xg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new sg(n.promise,function(){return n.abort()},e);kg(this.m,f);return f};
|
|
211
212
|
function tg(a,b,c,d){function e(h){f=f.xa(function(){c.body&&(c.body=Cb(c.body));return h(b,c,d)})}var f=cg(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.xa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
212
|
-
function ug(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new sc(c.uris[f]),l=k.xb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=og[l])?l.be:null;if(!n)return ag(new T(2,1,1E3,k));var p=l.
|
|
213
|
-
var C=n(c.uris[f],c,b,function(D,
|
|
214
|
-
|
|
215
|
-
function vg(a,b,c,d){var e=cg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={
|
|
216
|
-
lg.prototype.request=lg.prototype.request;lg.prototype.destroy=lg.prototype.destroy;lg.makeRequest=qg;lg.defaultRetryParameters=function(){return Xf()};lg.prototype.clearAllResponseFilters=lg.prototype.
|
|
217
|
-
lg.registerScheme=mg;lg.prototype.setForceHTTPS=lg.prototype.
|
|
218
|
-
lg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ng};var og={};function
|
|
219
|
-
r.
|
|
220
|
-
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};r.
|
|
221
|
-
Gg.prototype.skip=Gg.prototype.skip;Gg.prototype.readBytes=Gg.prototype.mb;Gg.prototype.readUint64=Gg.prototype.
|
|
222
|
-
r.
|
|
223
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ra(),b.getLength()-b.ra()))}};function Qg(a){for(var b=Rg(a);a.reader.
|
|
224
|
-
function Ug(a){var b=Rg(a);a.reader.skip(8);var c=a.reader.
|
|
225
|
-
function Rg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Jg);Jg.headerSize=Rg;Jg.typeToString=Pg;Jg.allData=Vg;Jg.audioSampleEntry=Ug;Jg.visualSampleEntry=Tg;Jg.sampleDescription=Sg;Jg.children=Qg;Jg.prototype.parseNext=Jg.prototype.
|
|
213
|
+
function ug(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new sc(c.uris[f]),l=k.xb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=og[l])?l.be:null;if(!n)return ag(new T(2,1,1E3,k));var p=l.pi,q=null,u=null,v=!1,w=!1,A;return dg(Yf(e)).xa(function(){if(a.i)return bg();A=Date.now();var y=0;c.requestStartTime=Date.now();
|
|
214
|
+
var C=n(c.uris[f],c,b,function(D,J,H){q&&q.stop();u&&u.Y(B/1E3);a.l&&b==wg&&(y++,c.packetNumber=y,a.l(D,J,xg(d),c),m=!0,h.g=H)},function(D){a.j&&a.j(D,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return C;var z=c.retryParameters.connectionTimeout;z&&(q=new Sc(function(){v=!0;C.abort()}),q.Y(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Sc(function(){v=!0;C.abort()}));return C}).xa(function(y){q&&q.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var C={response:y,
|
|
215
|
+
Xh:m};!w&&a.j&&a.j(y.headers,c,b);return C},function(y){q&&q.stop();u&&u.stop();if(a.A){var C=null,z=0;y instanceof T&&(C=y,1001==y.code&&(z=y.data[1]));a.A(c,C,z,v)}if(a.i)return bg();v&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return C=(new Map).set("error",y),C=new U("retry",C),a.dispatchEvent(C),f=(f+1)%c.uris.length,ug(a,b,c,d,e,f,y,h)}throw y;})}
|
|
216
|
+
function vg(a,b,c,d){var e=cg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Gg:void 0},f=a.next())g.Gg=f.value,e=e.xa(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return(0,h.Gg)(b,k,d)}}(g));return e.xa(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 xg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Ec)return!1}return!0}S("shaka.net.NetworkingEngine",lg);
|
|
217
|
+
lg.prototype.request=lg.prototype.request;lg.prototype.destroy=lg.prototype.destroy;lg.makeRequest=qg;lg.defaultRetryParameters=function(){return Xf()};lg.prototype.clearAllResponseFilters=lg.prototype.qh;lg.prototype.unregisterResponseFilter=lg.prototype.Qi;lg.prototype.registerResponseFilter=lg.prototype.ui;lg.prototype.clearAllRequestFilters=lg.prototype.ph;lg.prototype.unregisterRequestFilter=lg.prototype.Pi;lg.prototype.registerRequestFilter=lg.prototype.ti;lg.unregisterScheme=function(a){delete og[a]};
|
|
218
|
+
lg.registerScheme=mg;lg.prototype.setForceHTTPS=lg.prototype.Ff;lg.prototype.setForceHTTP=lg.prototype.Ef;function rg(){this.g=0}lg.NumBytesRemainingClass=rg;function sg(a,b,c){$f.call(this,a,b);this.h=c}ra(sg,$f);lg.PendingRequest=sg;var wg=1;lg.RequestType={MANIFEST:0,SEGMENT:wg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};lg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var ng=3;
|
|
219
|
+
lg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ng};var og={};function yg(a){this.g=!1;this.h=new Zf;this.i=a}yg.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 Gg(a,b){this.h=Fb(a);this.i=b==Hg;this.g=0}r=Gg.prototype;r.na=function(){return this.g<this.h.byteLength};r.ra=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.S=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ig();}};r.ja=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ig();}};r.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};
|
|
220
|
+
r.Dg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};r.Hc=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 Ig();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.mb=function(a){if(this.g+a>this.h.byteLength)throw Ig();var b=Bb(this.h,this.g,a);this.g+=a;return b};
|
|
221
|
+
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};r.Bi=function(a){if(this.g<a)throw Ig();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Ig();this.g=a};r.hc=function(){for(var a=this.g;this.na()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Bb(this.h,a,this.g-a);this.g+=1;return xd(a)};function Ig(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Gg);Gg.prototype.readTerminatedString=Gg.prototype.hc;Gg.prototype.seek=Gg.prototype.seek;Gg.prototype.rewind=Gg.prototype.Bi;
|
|
222
|
+
Gg.prototype.skip=Gg.prototype.skip;Gg.prototype.readBytes=Gg.prototype.mb;Gg.prototype.readUint64=Gg.prototype.Hc;Gg.prototype.readInt32=Gg.prototype.Dg;Gg.prototype.readUint32=Gg.prototype.O;Gg.prototype.readUint16=Gg.prototype.ja;Gg.prototype.readUint8=Gg.prototype.S;Gg.prototype.getLength=Gg.prototype.getLength;Gg.prototype.getPosition=Gg.prototype.ra;Gg.prototype.hasMoreData=Gg.prototype.na;var Hg=1;Gg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hg};function Jg(){this.i=[];this.h=[];this.g=!1}r=Jg.prototype;r.box=function(a,b){a=Kg(a);this.i[a]=Lg;this.h[a]=b;return this};r.R=function(a,b){a=Kg(a);this.i[a]=Mg;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Gg(a,0);for(this.g=!1;a.na()&&!this.g;)this.Dc(0,a,b,c)};
|
|
223
|
+
r.Dc=function(a,b,c,d){var e=b.ra();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=Pg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.ra()+8>b.getLength()){this.g=!0;return}f=b.Hc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Mg){if(d&&b.ra()+4>b.getLength()){this.g=!0;return}n=b.O();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.ra(),b=0<d?b.mb(d):new Uint8Array(0),b=new Gg(b,0),l({name:h,parser:this,
|
|
224
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ra(),b.getLength()-b.ra()))}};function Qg(a){for(var b=Rg(a);a.reader.na()&&!a.parser.g;)a.parser.Dc(a.start+b,a.reader,a.partialOkay)}function Sg(a){for(var b=Rg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Dc(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.na()&&!a.parser.g;)a.parser.Dc(a.start+b,a.reader,a.partialOkay)}
|
|
225
|
+
function Ug(a){var b=Rg(a);a.reader.skip(8);var c=a.reader.ja();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.na()&&!a.parser.g;)a.parser.Dc(a.start+b,a.reader,a.partialOkay)}function Vg(a){return function(b){a(b.reader.mb(b.reader.getLength()-b.reader.ra()))}}function Kg(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)}
|
|
226
|
+
function Rg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Jg);Jg.headerSize=Rg;Jg.typeToString=Pg;Jg.allData=Vg;Jg.audioSampleEntry=Ug;Jg.visualSampleEntry=Tg;Jg.sampleDescription=Sg;Jg.children=Qg;Jg.prototype.parseNext=Jg.prototype.Dc;Jg.prototype.parse=Jg.prototype.parse;Jg.prototype.stop=Jg.prototype.stop;Jg.prototype.fullBox=Jg.prototype.R;Jg.prototype.box=Jg.prototype.box;var Lg=0,Mg=1;function Wg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Jg).box("moov",Qg).box("moof",Qg).R("pssh",function(c){if(!(1<c.version)){var d=Bb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Kd(c.reader.mb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=Kd(c.reader.mb(16));b.h.push(f)}}}}).parse(a)}
|
|
226
227
|
function Xg(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=Fb(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=Jd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
227
228
|
@license
|
|
228
229
|
tXml
|
|
@@ -245,52 +246,52 @@ null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Jb=c.slice(1))}return b}
|
|
|
245
246
|
function zh(a,b){var c=yh(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=Ah(a,"t",d.t)),null!==d.n&&(c=Ah(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Jb)&&a[c]?Bh(a[c],e,d,hh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
|
|
246
247
|
function Ah(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 Bh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
247
248
|
function Ch(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=ch.has(b)?ch.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=Ch(d),b.appendChild(c);return b}
|
|
248
|
-
function Dh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ie(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=Dh(c),c.parent=b,b.children.push(c));return b}var bh=new Map,ch=new Map;function Eh(a){var b=this;this.C=a;this.
|
|
249
|
-
function Hh(a){return O(function(b){switch(b.g){case 1:return a.
|
|
250
|
-
function Jh(a,b,c){a.
|
|
249
|
+
function Dh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ie(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=Dh(c),c.parent=b,b.children.push(c));return b}var bh=new Map,ch=new Map;function Eh(a){var b=this;this.C=a;this.l=this.A=null;this.fa=this.aa=!1;this.H=0;this.g=null;this.o=new hb;this.i=new Map;this.B=new Map;this.m=new Zf;this.h=null;this.s=function(c){2==c.severity&&b.m.reject(c);a.onError(c)};this.U=new Map;this.ba=new Map;this.K=new Sc(function(){return Fh(b)});this.N=!1;this.L=[];this.P=!1;this.J=new Sc(function(){Gh(b)});this.m.catch(function(){});this.j=new yg(function(){return Hh(b)});this.$=!1;this.F=this.G=null}r=Eh.prototype;r.destroy=function(){return this.j.destroy()};
|
|
250
|
+
function Hh(a){return O(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.m.reject(),a.J.stop(),a.J=null,a.K.stop(),a.K=null,E(b,Ih(a),2);case 2:if(!a.l){b.u(3);break}wa(b,4);return E(b,a.l.setMediaKeys(null),6);case 6:ya(b,5);break;case 4:za(b);case 5:a.l=null;case 3:a.g=null,a.A=null,a.B=new Map,a.h=null,a.s=function(){},a.C=null,a.$=!1,a.G=null,G(b)}})}r.configure=function(a){this.h=a;this.J&&this.J.Va(this.h.updateExpirationTime)};
|
|
251
|
+
function Jh(a,b,c){a.fa=!0;a.B=new Map;a.N=c;return Kh(a,b)}function Lh(a,b,c){a.B=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.B.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.B.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.N=0<a.B.size;return Kh(a,b)}
|
|
251
252
|
function Mh(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 Nh(a,g,[])}
|
|
252
253
|
function Kh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c=Oh(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(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});g||(h=Eg(a.h.servers),Ph(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=Qh(n),q=t(p),u=q.next();!u.done;u=q.next())v=u.value,k.add(v);w=t(k);for(A=w.next();!A.done;A=
|
|
253
|
-
w.next())y=A.value,Rh(y,Eg(a.h.servers),Eg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,Ue(b,a.
|
|
254
|
-
function Sh(a){var b;return O(function(c){switch(c.g){case 1:if(a.
|
|
255
|
-
r.qc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.
|
|
256
|
-
b.
|
|
257
|
-
function Xh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.
|
|
258
|
-
wa(g,6);return E(g,a.
|
|
259
|
-
function Wh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.
|
|
260
|
-
function Uh(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(yb(c,e.value.initData))return;var f=!1;a.
|
|
261
|
-
r.Pe=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)};r.
|
|
262
|
-
function Nh(a,b,c){var d,e,f,g,h,k,l
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
function di(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Qh(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);a=t(a.h.preferredKeySystems);e=a.next();for(d={};!e.done;d={
|
|
268
|
-
l.
|
|
254
|
+
w.next())y=A.value,Rh(y,Eg(a.h.servers),Eg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,Ue(b,a.N,a.$,a.h.preferredKeySystems),2)}Bg(a.j);C=g||Object.keys(a.h.servers).length;if(!C)return a.aa=!0,B.return(Promise.resolve());z=Nh(a,void 0,b);return B.return(g?z:z.catch(function(){}))})}
|
|
255
|
+
function Sh(a){var b;return O(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.G){c.u(2);break}return E(c,a.G,3);case 3:return Bg(a.j),c.return();case 2:return wa(c,4),a.G=a.l.setMediaKeys(a.A),E(c,a.G,6);case 6:ya(c,5);break;case 4:b=za(c),a.s(new T(2,6,6003,b.message));case 5:Bg(a.j),G(c)}})}function Th(a,b){return O(function(c){if(1==c.g)return E(c,Sh(a),2);Uh(a,b.initDataType,Bb(b.initData));G(c)})}
|
|
256
|
+
r.qc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.A)return b.o.za(a,"encrypted",function(){b.s(new T(2,6,6010))}),c.return();b.l=a;b.o.za(b.l,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())Vh(b,e.value);b.P=!0;b.L=[]});b.l.remote?(b.o.D(b.l.remote,"connect",function(){return Ih(b)}),b.o.D(b.l.remote,"connecting",function(){return Ih(b)}),b.o.D(b.l.remote,"disconnect",function(){return Ih(b)})):"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.D(b.l,"webkitcurrentplaybacktargetiswirelesschanged",
|
|
257
|
+
function(){return Ih(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||b.B.size?E(c,Sh(b),2):c.u(2)}Wh(b).catch(function(){});b.F||b.B.size||b.h.parseInbandPsshEnabled||b.o.D(b.l,"encrypted",function(d){return Th(b,d)});G(c)})};
|
|
258
|
+
function Xh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.A||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=qg([a.g.serverCertificateUri],a.h.retryParameters);wa(g,3);c=a.C.Eb.request(5,b);return E(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Bb(d.data);ya(g,4);break;case 3:throw e=za(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();
|
|
259
|
+
wa(g,6);return E(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:ya(g,0);break;case 6:throw f=za(g),new T(2,6,6004,f.message);}})}function Yh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Zh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.fb=new Zf,d.push(e.fb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);G(f)})}
|
|
260
|
+
function Wh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.B.size)return g.u(2);a.B.forEach(function(h,k){Zh(a,k,h)});return E(g,a.m,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&$h(a))return g.return(a.m);a.m=new Zf;a.m.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Uh(a,f.initDataType,f.initData);ai(a)&&a.m.resolve();return g.return(a.m)})}
|
|
261
|
+
function Uh(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(yb(c,e.value.initData))return;var f=!1;a.B.forEach(function(g){!f&&yb(c,g.initData)&&(f=!0)});if(f)return}0<a.i.size&&ai(a)&&(a.m.resolve(),a.m=new Zf,a.m.catch(function(){}));bi(a,b,c,a.g.sessionType)}}function ci(a){a=a.i.keys();a=Cg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
262
|
+
r.Pe=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)};r.Wc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Bd=function(){return Fg(this.ba)};
|
|
263
|
+
function Nh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=new Map;if(c.length){e=di(a,c,d);m.u(2);break}return E(m,ei(a,b),3);case 3:e=m.h;case 2:f=e;if(!f)throw new T(2,6,6001);Bg(a.j);wa(m,4);f.getConfiguration();if(c.length){var n=f.keySystem;var p=d.get(f.keySystem);var q=[],u=[],v=[],w=[],A=[],y=new Set;fi(p,q,u,w,v,A,y);var C=a.N?"persistent-license":"temporary";n={keySystem:n,encryptionScheme:q[0],licenseServerUri:u[0],distinctiveIdentifierRequired:p[0].distinctiveIdentifierRequired,
|
|
264
|
+
persistentStateRequired:p[0].persistentStateRequired,sessionType:p[0].sessionType||C,audioRobustness:p[0].audioRobustness||"",videoRobustness:p[0].videoRobustness||"",serverCertificate:w[0],serverCertificateUri:v[0],initData:A,keyIds:y};p=t(p);for(q=p.next();!q.done;q=p.next())q=q.value,q.distinctiveIdentifierRequired&&(n.distinctiveIdentifierRequired=q.distinctiveIdentifierRequired),q.persistentStateRequired&&(n.persistentStateRequired=q.persistentStateRequired);p=n}else p=f.keySystem,n=b.get(f.keySystem),
|
|
265
|
+
q=[],u=[],v=[],w=[],A=[],y=new Set,fi(n.drmInfos,q,u,w,v,A,y),p={keySystem:p,encryptionScheme:q[0],licenseServerUri:u[0],distinctiveIdentifierRequired:"required"==n.distinctiveIdentifier,persistentStateRequired:"required"==n.persistentState,sessionType:n.sessionTypes[0]||"temporary",audioRobustness:(n.audioCapabilities?n.audioCapabilities[0].robustness:"")||"",videoRobustness:(n.videoCapabilities?n.videoCapabilities[0].robustness:"")||"",serverCertificate:w[0],serverCertificateUri:v[0],initData:A,
|
|
266
|
+
keyIds:y};a.g=p;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return E(m,f.createMediaKeys(),6);case 6:g=m.h;Bg(a.j);a.A=g;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.A)){m.u(7);break}wa(m,8);return E(m,a.A.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:h=m.h;if("usable"!=h)throw new T(2,6,6018);Bg(a.j);ya(m,7,4);break;case 8:k=za(m,4);if(k instanceof T)throw k;throw new T(2,6,6019,k.message);case 7:return a.aa=!0,E(m,Xh(a),11);case 11:Bg(a.j);ya(m,0);
|
|
267
|
+
break;case 4:l=za(m);Bg(a.j,l);a.g=null;if(l instanceof T)throw l;throw new T(2,6,6002,l.message);}})}
|
|
268
|
+
function di(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Qh(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);a=t(a.h.preferredKeySystems);e=a.next();for(d={};!e.done;d={Cg:void 0},e=a.next())for(d.Cg=e.value,e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
269
|
+
l.Cg}}(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}
|
|
269
270
|
function ei(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A;return O(function(y){switch(y.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){y.u(4);break}k=h.value;if(!b.has(k)){y.u(3);break}l=b.get(k);wa(y,6);return E(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
270
271
|
y.h,y.return(c);case 6:za(y);case 7:Bg(a.j);case 3:h=g.next();y.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.u(11);break}p=n.value;q=t(b.keys());u=q.next();case 12:if(u.done){n=m.next();y.u(9);break}v=u.value;w=b.get(v);A=w.drmInfos.some(function(C){return!!C.licenseServerUri});if(A!=p){y.u(13);break}wa(y,15);return E(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:za(y);case 16:Bg(a.j);case 13:u=q.next();y.u(12);break;case 11:return y.return(c)}})}
|
|
271
|
-
function Oh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Qd(a)}function gi(a){ai(a)&&a.
|
|
272
|
-
function Zh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.
|
|
273
|
-
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.
|
|
274
|
-
function bi(a,b,c,d){try{var e=a.
|
|
275
|
-
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.
|
|
272
|
+
function Oh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Qd(a)}function gi(a){ai(a)&&a.m.resolve()}function hi(a,b){(new Sc(function(){b.loaded=!0;gi(a)})).Y(ii)}
|
|
273
|
+
function Zh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.A.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.o.D(d,"message",function(n){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.L.push(n):Vh(a,n)});a.o.D(d,"keystatuseschange",function(n){return ji(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,kf:Infinity,fb:null,type:"persistent-license"};a.i.set(d,f);wa(m,2);return E(m,
|
|
274
|
+
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.s(new T(h,6,6013)),f.loaded=!0),hi(a,f),gi(a),m.return(d);case 2:k=za(m),Bg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.s(new T(l,6,6005,k.message)),f.loaded=!0,gi(a);case 3:return m.return(Promise.resolve())}})}
|
|
275
|
+
function bi(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.s(new T(2,6,6005,f.message));return}a.o.D(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.L.push(f):Vh(a,f)});a.o.D(e,"keystatuseschange",function(f){return ji(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,kf:Infinity,fb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.s(b);return}a.h.logLicenseExchange&&Hd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
276
|
+
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.s(new T(2,6,6006,f.message,f,h))}})}
|
|
276
277
|
function Vh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Hd(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=qg([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]=
|
|
277
278
|
f.headers[h];if(Mc(a.g.keySystem)){var A=yd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Zg(A,"PlayReadyKeyMessage");var y=ih(A,"HttpHeader");y=t(y);for(var C=y.next();!C.done;C=y.next()){var z=C.value;C=ih(z,"name")[0];z=ih(z,"value")[0];g.headers[gh(C)]=gh(z)}A=ih(A,"Challenge")[0];g.body=Id(gh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();wa(w,2);m=a.C.Eb.request(2,g);return E(w,m.promise,4);case 4:l=w.h;ya(w,3);break;case 2:n=za(w);if(a.j.g)return w.return();
|
|
278
|
-
p=new T(2,6,6007,n);1==a.i.size?(a.
|
|
279
|
-
hi(a,d));
|
|
280
|
-
function ji(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(Mc(a.g.keySystem)&&16==g.byteLength&&(Wc()||hd())){h=Fb(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=Kd(g).slice(0,32);a
|
|
281
|
-
(a.
|
|
282
|
-
function li(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
279
|
+
p=new T(2,6,6007,n);1==a.i.size?(a.s(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.reject(p),a.i.delete(c),ai(a)&&(a.m.resolve(),a.K.Y(.1)));return w.return();case 3:if(a.j.g)return w.return();a.H+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Hd(l.data);wa(w,5);return E(w,c.update(l.data),7);case 7:ya(w,6);break;case 5:return q=za(w),u=new T(2,6,6008,q.message),a.s(u),d&&d.fb&&d.fb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.fb&&d.fb.resolve(),
|
|
280
|
+
hi(a,d));G(w)}})}
|
|
281
|
+
function ji(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(Mc(a.g.keySystem)&&16==g.byteLength&&(Wc()||hd())){h=Fb(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=Kd(g).slice(0,32);a.U.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.fb&&(a.i.delete(b),b.close().catch(function(){}));ai(a)&&
|
|
282
|
+
(a.m.resolve(),a.K.Y(ki))}function Fh(a){var b=a.U,c=a.ba;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.s(new T(2,6,6014));a.C.Xd(Fg(c))}
|
|
283
|
+
function li(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F;return O(function(M){if(1==M.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=
|
|
283
284
|
[{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(N,L){var P,R,Q,ca,ea,la,Qa,ua;return O(function(Aa){switch(Aa.g){case 1:return wa(Aa,2),E(Aa,L.createMediaKeys(),4);case 4:ya(Aa,3);break;case 2:return za(Aa),Aa.return();case 3:R=
|
|
284
285
|
(P=L.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,$c()&&(R=!1),Q=L.getConfiguration().videoCapabilities,ca=L.getConfiguration().audioCapabilities,ea={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(N)&&k.get(N)?ea=k.get(N):k.set(N,ea),(la=Q[0].encryptionScheme)&&!ea.encryptionSchemes.includes(la)&&ea.encryptionSchemes.push(la),(Qa=Q[0].robustness)&&!ea.videoRobustnessLevels.includes(Qa)&&ea.videoRobustnessLevels.push(Qa),(ua=
|
|
285
|
-
ca[0].robustness)&&!ea.audioRobustnessLevels.includes(ua)&&ea.audioRobustnessLevels.push(ua),
|
|
286
|
-
Ra=[La,Q];return E(bb,navigator.requestMediaKeySystemAccess(N,Ra),4);case 4:return ma=bb.h,E(bb,l(N,ma),5);case 5:ya(bb,0);break;case 2:za(bb),
|
|
287
|
-
robustness:R}}},E(la,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return ca=la.h,ea=ca.keySystemAccess,E(la,l(N,ea),5);case 5:ya(la,0);break;case 2:za(la),
|
|
288
|
-
|
|
289
|
-
function Ih(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return E(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return wa(g,2),a.
|
|
290
|
-
function Gh(a){a.i.forEach(function(b,c){var d=b.kf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.kf=e)})}function ai(a){a=a.i.values();return Dg(a,function(b){return b.loaded})}function $h(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a
|
|
286
|
+
ca[0].robustness)&&!ea.audioRobustnessLevels.includes(ua)&&ea.audioRobustnessLevels.push(ua),G(Aa)}})};m=function(N,L,P,R){var Q,ca,ea,la,Qa,ua,Aa,La,Ra,ma;return O(function(bb){switch(bb.g){case 1:wa(bb,2);Q=He(g);ca=t(Q.videoCapabilities);for(ea=ca.next();!ea.done;ea=ca.next())la=ea.value,la.encryptionScheme=L,la.robustness=P;Qa=t(Q.audioCapabilities);for(ua=Qa.next();!ua.done;ua=Qa.next())Aa=ua.value,Aa.encryptionScheme=L,Aa.robustness=R;La=He(Q);La.persistentState="required";La.sessionTypes=["persistent-license"];
|
|
287
|
+
Ra=[La,Q];return E(bb,navigator.requestMediaKeySystemAccess(N,Ra),4);case 4:return ma=bb.h,E(bb,l(N,ma),5);case 5:ya(bb,0);break;case 2:za(bb),G(bb)}})};n=function(N,L,P,R){var Q,ca,ea;return O(function(la){switch(la.g){case 1:return wa(la,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:N,video:{encryptionScheme:L,robustness:P},audio:{encryptionScheme:L,
|
|
288
|
+
robustness:R}}},E(la,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return ca=la.h,ea=ca.keySystemAccess,E(la,l(N,ea),5);case 5:ya(la,0);break;case 2:za(la),G(la)}})};p=t(a);for(q=p.next();!q.done;q=p.next())u=q.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(y=A.value,C=t(a),z=C.next();!z.done;z=C.next())B=z.value,"org.w3.clearkey"===B&&kd()||(v.push(m(B,y,"","")),v.push(n(B,y,"","")));D=t(a);for(J=D.next();!J.done;J=D.next())for(H=J.value,K=t(d[H]||[]),I=K.next();!I.done;I=
|
|
289
|
+
K.next())F=I.value,v.push(m(H,null,F,"")),v.push(m(H,null,"",F)),v.push(n(H,null,F,"")),v.push(n(H,null,"",F));return E(M,Promise.all(v),2)}return M.return(Fg(k))})}function mi(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Sc(e)).Y(ni)}),wa(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ya(c,0);za(c);G(c)})}
|
|
290
|
+
function Ih(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return E(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return wa(g,2),a.fa||a.B.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,mi(e),5):E(g,e.remove(),5);if(2!=g.g)return ya(g,0);za(g);G(g)})})),0)})}function Qh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
291
|
+
function Gh(a){a.i.forEach(function(b,c){var d=b.kf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.kf=e)})}function ai(a){a=a.i.values();return Dg(a,function(b){return b.loaded})}function $h(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.U.get(c.value))return!1;return!0}
|
|
291
292
|
function Ph(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)}
|
|
292
|
-
function fi(a,b,c,d,e,f,g){var h=[];a=t(a);for(var k=a.next(),l={};!k.done;l={
|
|
293
|
-
(d.some(function(p){return function(q){return yb(q,p.
|
|
293
|
+
function fi(a,b,c,d,e,f,g){var h=[];a=t(a);for(var k=a.next(),l={};!k.done;l={wa:void 0},k=a.next()){l.wa=k.value;b.includes(l.wa.encryptionScheme)||b.push(l.wa.encryptionScheme);"org.w3.clearkey"==l.wa.keySystem&&l.wa.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(l.wa.licenseServerUri)||h.push(l.wa.licenseServerUri):c.includes(l.wa.licenseServerUri)||c.push(l.wa.licenseServerUri);e.includes(l.wa.serverCertificateUri)||e.push(l.wa.serverCertificateUri);l.wa.serverCertificate&&
|
|
294
|
+
(d.some(function(p){return function(q){return yb(q,p.wa.serverCertificate)}}(l))||d.push(l.wa.serverCertificate));if(l.wa.initData){k=t(l.wa.initData);for(var m=k.next(),n={};!m.done;n={Ve:void 0},m=k.next())n.Ve=m.value,f.some(function(p){return function(q){var u=p.Ve;return q.keyId&&q.keyId==u.keyId?!0:q.initDataType==u.initDataType&&yb(q.initData,u.initData)}}(n))||f.push(n.Ve)}if(l.wa.keyIds)for(l=t(l.wa.keyIds),k=l.next();!k.done;k=l.next())g.add(k.value)}if(1==h.length)c.push(h[0]);else if(0<
|
|
294
295
|
h.length){b=[];h=t(h);for(d=h.next();!d.done;d=h.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));h=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(h))}}
|
|
295
296
|
function Rh(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
296
297
|
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var ni=1,ii=5,ki=.5;/*
|
|
@@ -300,20 +301,20 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
300
301
|
SPDX-License-Identifier: Apache-2.0
|
|
301
302
|
*/
|
|
302
303
|
function oi(a,b,c){this.h=a;this.i=b;this.g=c}function pi(a,b){return O(function(c){if(1==c.g)return E(c,Pe(a.g,b,a.h.drm.preferredKeySystems),2);Ke(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(rf))throw new T(2,4,4032);return c.return(qi(a,b))})}
|
|
303
|
-
function qi(a,b){var c=Oe(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.
|
|
304
|
+
function qi(a,b){var c=Oe(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.A)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,ri(a,d.keySystem,f.video),ri(a,d.keySystem,f.audio);si(a,b)}return c}function ri(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,Uh(a.g,e.initDataType,e.initData)}}}
|
|
304
305
|
function si(a,b){a=a.g?a.g.Bd():{};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?ti.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
305
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var ti=["output-restricted","internal-error"];function ui(){}function vi(a,b){if(b){var c=wi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",ui);ui.unregisterParserByMime=function(a){delete wi[a]};ui.registerParserByMime=function(a,b){wi[a]=b};ui.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ui.AccessibilityPurpose={
|
|
306
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var ti=["output-restricted","internal-error"];function ui(){}function vi(a,b){if(b){var c=wi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",ui);ui.unregisterParserByMime=function(a){delete wi[a]};ui.registerParserByMime=function(a,b){wi[a]=b};ui.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ui.AccessibilityPurpose={Nj:"visually impaired",hj:"hard of hearing"};var wi={};function xi(a,b){function c(){f=!0}function d(m){h.push(m);Qg(m)}var e=a=Bb(a),f=!1,g,h=[],k=[];(new Jg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).R("stsd",function(m){g=m;h.push(m);Sg(m)}).R("encv",c).R("enca",c).R("dvav",function(m){k.push({box:m,cb:1701733238})}).R("dva1",function(m){k.push({box:m,cb:1701733238})}).R("dvh1",function(m){k.push({box:m,cb:1701733238})}).R("dvhe",function(m){k.push({box:m,cb:1701733238})}).R("hev1",function(m){k.push({box:m,cb:1701733238})}).R("hvc1",
|
|
306
307
|
function(m){k.push({box:m,cb:1701733238})}).R("avc1",function(m){k.push({box:m,cb:1701733238})}).R("avc3",function(m){k.push({box:m,cb:1701733238})}).R("ac-3",function(m){k.push({box:m,cb:1701733217})}).R("ec-3",function(m){k.push({box:m,cb:1701733217})}).R("ac-4",function(m){k.push({box:m,cb:1701733217})}).R("mp4a",function(m){k.push({box:m,cb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Kd(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,
|
|
307
|
-
e=yi(e,g,l.box,h,l.cb);return Wc()&&ld()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
308
|
+
e=yi(e,g,l.box,h,l.cb);return Wc()&&ld()&&!Xc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
308
309
|
function yi(a,b,c,d,e){var f=zi.value(),g=a.subarray(c.start,c.start+c.size),h=Fb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Fb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ai(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Xc()||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,Ai(e,d.start,d.size+k.byteLength);k=Fb(e,b.start);b=Rg(b);
|
|
309
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ai(a,b,c){a=Fb(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 zi=new Jc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Bi(a,b,c,d,e,f,g){this.M=a;this.Da=b;this.pa=c;this.gf=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}Bi.prototype
|
|
310
|
-
Bi.prototype.getEndByte=Bi.prototype.Yb;Bi.prototype.getStartByte=Bi.prototype
|
|
311
|
-
function Gi(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v){l=void 0===l?[]:l;q=void 0===q?Hi:q;this.startTime=a;this.j=this.endTime=b;this.C=c;this.Da=d;this.pa=e;this.
|
|
312
|
-
a.next())b.value.
|
|
313
|
-
r.Od=function(){this.l=!1};r
|
|
314
|
-
r.
|
|
315
|
-
Gi.prototype.getThumbnailSprite=Gi.prototype.
|
|
316
|
-
Gi.prototype.markAsPreload=Gi.prototype.ff;Gi.prototype.markAsUnavailable=Gi.prototype.
|
|
310
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ai(a,b,c){a=Fb(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 zi=new Jc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Bi(a,b,c,d,e,f,g){this.M=a;this.Da=b;this.pa=c;this.gf=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}Bi.prototype.ac=function(){return this.Da};Bi.prototype.Yb=function(){return this.pa};Bi.prototype.$b=function(){return this.g};function Ci(a,b){return a===b?!0:a&&b?a.ac()==b.ac()&&a.Yb()==b.Yb()&&Qb(a.M().sort(),b.M().sort())&&yb(a.$b(),b.$b()):a==b}S("shaka.media.InitSegmentReference",Bi);
|
|
311
|
+
Bi.prototype.getEndByte=Bi.prototype.Yb;Bi.prototype.getStartByte=Bi.prototype.ac;
|
|
312
|
+
function Gi(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v){l=void 0===l?[]:l;q=void 0===q?Hi:q;this.startTime=a;this.j=this.endTime=b;this.C=c;this.Da=d;this.pa=e;this.ea=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===p?null:p;this.status=q;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.s=null;this.i=0;this.o=void 0===v?!1:v;this.Ld=this.Ec=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
313
|
+
a.next())b.value.wg();this.o&&this.g.length&&this.g[this.g.length-1].vg();this.B=this.mimeType=this.codecs=null}r=Gi.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.zh=function(){return this.endTime};r.ac=function(){return this.Da};r.Yb=function(){return this.pa};r.Sh=function(){return this.tilesLayout};r.Rh=function(){return this.A};r.bc=function(){return this.status};r.ji=function(){this.status=Ii};r.ff=function(){this.preload=!0};r.di=function(){return this.preload};
|
|
314
|
+
r.Od=function(){this.l=!1};r.ai=function(){return this.l};r.wg=function(){this.Ec=!0};r.ci=function(){return this.Ec};r.vg=function(){this.Ld=!0};r.bi=function(){return this.Ld};r.ug=function(){this.m=!0};r.Yh=function(){return this.m};r.Qg=function(a){this.s=a};r.Qh=function(){return this.s};r.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};
|
|
315
|
+
r.Kf=function(a){null==this.h?Za("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.Mi=function(a){this.B=a};r.$b=function(){return this.B};function Ji(a,b){a.ea=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ji(c.value,b)}S("shaka.media.SegmentReference",Gi);Gi.prototype.getSegmentData=Gi.prototype.$b;Gi.prototype.setSegmentData=Gi.prototype.Mi;Gi.prototype.syncAgainst=Gi.prototype.Kf;Gi.prototype.offset=Gi.prototype.offset;
|
|
316
|
+
Gi.prototype.getThumbnailSprite=Gi.prototype.Qh;Gi.prototype.setThumbnailSprite=Gi.prototype.Qg;Gi.prototype.hasByterangeOptimization=Gi.prototype.Yh;Gi.prototype.markAsByterangeOptimization=Gi.prototype.ug;Gi.prototype.isLastPartial=Gi.prototype.bi;Gi.prototype.markAsLastPartial=Gi.prototype.vg;Gi.prototype.isPartial=Gi.prototype.ci;Gi.prototype.markAsPartial=Gi.prototype.wg;Gi.prototype.isIndependent=Gi.prototype.ai;Gi.prototype.markAsNonIndependent=Gi.prototype.Od;Gi.prototype.isPreload=Gi.prototype.di;
|
|
317
|
+
Gi.prototype.markAsPreload=Gi.prototype.ff;Gi.prototype.markAsUnavailable=Gi.prototype.ji;Gi.prototype.getStatus=Gi.prototype.bc;Gi.prototype.getTileDuration=Gi.prototype.Rh;Gi.prototype.getTilesLayout=Gi.prototype.Sh;Gi.prototype.getEndByte=Gi.prototype.Yb;Gi.prototype.getStartByte=Gi.prototype.ac;Gi.prototype.getEndTime=Gi.prototype.zh;Gi.prototype.getStartTime=Gi.prototype.getStartTime;Gi.prototype.getUris=Gi.prototype.M;var Hi=0,Ii=1;Gi.Status={Vi:Hi,Lj:Ii,nj:2};function Ki(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Li(a){return!a||Ki(a)?null:a.length?a.end(a.length-1):null}function Mi(a,b){return!a||!a.length||Ki(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ni(a,b){if(!a||!a.length||Ki(a))return 0;var c=0;a=t(Oi(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}
|
|
317
318
|
function Pi(a,b,c){if(!a||!a.length||Ki(a))return null;a=Oi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Oi(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};/*
|
|
318
319
|
@license
|
|
319
320
|
Shaka Player
|
|
@@ -325,9 +326,9 @@ function Ui(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
325
326
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=xd(Bb(a.data,1,d));a=xd(Bb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=xd(Bb(a.data,1,d));a=xd(Bb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=xd(Bb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
326
327
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Cb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=xd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=xd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Cb(a.data),b):null}
|
|
327
328
|
function Vi(a){for(var b=0,c=[];Ri(a,b);){var d=Ti(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Ti(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ui(e))&&c.push(f);b+=e.size+10}Si(a,b)&&(b+=10)}return c}function Wi(a,b){for(var c=b=void 0===b?0:b,d=0;Ri(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ti(a,b+6),Si(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Qi);Qi.getID3Data=Wi;
|
|
328
|
-
Qi.getID3Frames=Vi;function Xi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.
|
|
329
|
-
function $i(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={
|
|
330
|
-
function cj(a){var b=null,c=null,d=a.mb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.
|
|
329
|
+
Qi.getID3Frames=Vi;function Xi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Hc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Rc:c,wd:d,Pj:e}}function Yi(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Zi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ja();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
330
|
+
function $i(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={yf:null,sampleSize:null,ee:null};c&256&&(h.yf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.ee=0==b?a.O():a.Dg());e.push(h)}return{Tj:d,Hg:e,th:f}}function aj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ja();a.skip(2);a.skip(2);a.skip(2);a=a.ja()+a.ja()/65536;return{channelCount:b,sampleRate:a}}function bj(a){a=a.O();return{codec:Pg(a)}}
|
|
331
|
+
function cj(a){var b=null,c=null,d=a.mb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.ja()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ja();a.ja();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,nd:c}}
|
|
331
332
|
function dj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function ej(a){return(10>a?"0":"")+a};/*
|
|
332
333
|
|
|
333
334
|
Copyright Brightcove, Inc.
|
|
@@ -345,144 +346,144 @@ function dj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
|
|
|
345
346
|
limitations under the License.
|
|
346
347
|
*/
|
|
347
348
|
function fj(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=Bb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function gj(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 Gg(c,0)).O(),a.g=8*d,a.i-=d)}function hj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;gj(a)}a.h<<=b;a.g-=b}
|
|
348
|
-
function ij(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&&gj(a);c=b-c;return 0<c?d<<c|ij(a,c):d}function jj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;gj(a);return b+jj(a)}function kj(a){hj(a,1+jj(a))}function V(a){var b=jj(a);return ij(a,b+1)-1}function lj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===ij(a,1)}function
|
|
349
|
-
function
|
|
349
|
+
function ij(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&&gj(a);c=b-c;return 0<c?d<<c|ij(a,c):d}function jj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;gj(a);return b+jj(a)}function kj(a){hj(a,1+jj(a))}function V(a){var b=jj(a);return ij(a,b+1)-1}function lj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===ij(a,1)}function mj(a){return ij(a,8)}
|
|
350
|
+
function nj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=lj(a),d=(c+d+256)%256),c=0===d?c:d}function vj(a){mj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",fj);function wj(){this.G=null;this.H=!1;this.m=this.J=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}r=wj.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
350
351
|
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,xj(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,Gd:-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<
|
|
351
352
|
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var q=f[n+1]+2;switch(f[n]){case 5:var u=zd(f.subarray(n+2,n+q));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
|
|
352
|
-
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,
|
|
353
|
+
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,oh:u,sampleRate:48E3}))}n+=q;p-=q}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Gd&&(g.Gd=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");
|
|
353
354
|
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.J=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Gd&&(this.C=f.Gd);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.J:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
354
355
|
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};
|
|
355
356
|
function yj(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=zj(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=zj(d,
|
|
356
|
-
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.
|
|
357
|
+
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.oi=function(a){rb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.nf(a)};
|
|
357
358
|
r.nf=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=Nd(b.data,p),b.fullData=Nd(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=Nd(b.data,k),b.fullData=Nd(b.fullData,k)));if(n>=e-f)return h;
|
|
358
359
|
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=Nd(b.data,a),b.fullData=Nd(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Nd.apply(Fd,x(c.value)),(c=yj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Vi(c.data),dts:c.dts,pts:c.pts});return a};
|
|
359
|
-
r.
|
|
360
|
+
r.Lb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Nd.apply(Fd,x(c.value)),e=yj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Nd(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
360
361
|
r.zc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Nd.apply(Fd,x(d.value)),f=yj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Nd(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.nf(e,
|
|
361
|
-
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.
|
|
362
|
-
r.Ed=function(){for(var a=[],b=t(this.zc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.
|
|
363
|
-
function Bj(a){var b={height:null,width:null,codec:null};a=a.Ed();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new fj(a.data);var c=
|
|
362
|
+
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Lb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.zc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.Vc=function(){return{audio:this.A,video:this.m}};
|
|
363
|
+
r.Ed=function(){for(var a=[],b=t(this.zc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.Vh=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Te();return{height:a.height,width:a.width}};r.Te=function(){return"hvc"==this.m?Aj(this):Bj(this)};
|
|
364
|
+
function Bj(a){var b={height:null,width:null,codec:null};a=a.Ed();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new fj(a.data);var c=mj(a),d=mj(a),e=mj(a);kj(a);if(Cj.includes(c)){var f=V(a);3===f&&hj(a,1);kj(a);kj(a);hj(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?nj(a,16):nj(a,64))}}kj(a);f=V(a);if(0===f)V(a);else if(1===f)for(hj(a,1),kj(a),kj(a),f=V(a),g=0;g<f;g++)kj(a);kj(a);hj(a,1);f=V(a);g=V(a);var h=ij(a,1);0===h&&hj(a,1);hj(a,1);var k=0,l=0,m=
|
|
364
365
|
0,n=0;W(a)&&(k=V(a),l=V(a),m=V(a),n=V(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.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}
|
|
365
|
-
function Aj(a){var b={height:null,width:null,codec:null};a=a.Ed();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new fj(a.fullData,!0);
|
|
366
|
+
function Aj(a){var b={height:null,width:null,codec:null};a=a.Ed();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new fj(a.fullData,!0);mj(c);mj(c);ij(c,4);var d=ij(c,3);W(c);var e=ij(c,2),f=ij(c,1),g=ij(c,5),h=ij(c,32);a=mj(c);for(var k=mj(c),l=mj(c),m=mj(c),n=mj(c),p=mj(c),q=mj(c),u=[],v=[],w=0;w<d;w++)u.push(W(c)),v.push(W(c));if(0<d)for(w=d;8>w;w++)ij(c,2);for(w=0;w<d;w++)u[w]&&ij(c,88),v[w]&&mj(c);V(c);d=V(c);3==d&&ij(c,1);u=V(c);v=V(c);var A=w=0,y=0,C=0;W(c)&&
|
|
366
367
|
(w+=V(c),A+=V(c),y+=V(c),C+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(y+C)*(1===d?2:1));c=function(z){for(var B=0,D=0;32>D;D++)B|=(z>>D&1)<<31-D;return B>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+q;p&&(e+="."+p.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
367
|
-
a.toString(16).toUpperCase());b.codec=e;return b}function zj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Dj(a){return 0>xj(a)?!1:!0}function xj(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",wj);wj.syncOffset=xj;wj.probe=Dj;wj.prototype.getVideoInfo=wj.prototype.Te;wj.prototype.getVideoResolution=wj.prototype.
|
|
368
|
-
wj.prototype.getCodecs=wj.prototype.
|
|
368
|
+
a.toString(16).toUpperCase());b.codec=e;return b}function zj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Dj(a){return 0>xj(a)?!1:!0}function xj(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",wj);wj.syncOffset=xj;wj.probe=Dj;wj.prototype.getVideoInfo=wj.prototype.Te;wj.prototype.getVideoResolution=wj.prototype.Vh;wj.prototype.getVideoNalus=wj.prototype.Ed;
|
|
369
|
+
wj.prototype.getCodecs=wj.prototype.Vc;wj.prototype.getStartTime=wj.prototype.getStartTime;wj.prototype.getVideoData=wj.prototype.zc;wj.prototype.getAudioData=wj.prototype.Lb;wj.prototype.getMetadata=wj.prototype.getMetadata;wj.prototype.parseNalus=wj.prototype.nf;wj.prototype.parseAvcNalus=wj.prototype.oi;wj.prototype.parse=wj.prototype.parse;wj.prototype.clearData=wj.prototype.clearData;wj.Timescale=9E4;var Cj=[100,110,122,244,44,83,86,118,128,138,139,134];function Ej(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&&$a("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,rb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{$a("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?($a("Could not find LCEVC Library on this page"),
|
|
369
370
|
a=!1):(this.h.SupportObject.SupportStatus||$a(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 Fj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
370
|
-
Ej.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Gj(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",Ej);Ej.prototype.release=Ej.prototype.release;function Hj(a,b,c,d){var e=this;this.j=a;this.aa=c;this.A=null;this.
|
|
371
|
-
function Ij(a,b){if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.
|
|
372
|
-
function Lj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(q){if(1==q.g)return a.createSegmentIndex?E(q,a.createSegmentIndex(),2):q.u(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=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.qa){if(m=Yd(h,k),!ne(m))return q.return(!1)}else if(b==c.
|
|
373
|
-
be(a,h,k),p=$d(h,k),!nb(n)&&!mc(p))return q.return(!1);return q.return(!0)})}r=Hj.prototype;r.destroy=function(){return this.
|
|
374
|
-
function Jj(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(ve)),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.
|
|
375
|
-
a.l={};a.U=null;a.
|
|
376
|
-
function Mj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v;return O(function(w){switch(w.g){case 1:return e=Wd,f=Ta,g=Ua,E(w,Lj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Yd(c.mimeType,d);if(b==e.qa){Nj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!nb(h)||!a.B&&Zd.includes(h))k=!0;l=$d(c.mimeType,d);if(!k){w.u(4);break}m=Sd(e.W,(d||"").split(","));n=Sd(e.
|
|
377
|
-
Mj(a,e.
|
|
378
|
-
|
|
379
|
-
function Nj(a,b,c,d){a.g||(a.g=new me(a.
|
|
380
|
-
function Qj(a){return a.
|
|
381
|
-
r.ub=function(){var a={total:this.
|
|
382
|
-
function Vj(a,b,c,d,e
|
|
383
|
-
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(
|
|
384
|
-
function Wj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
385
|
-
case 6:if(!a.h[b])return
|
|
386
|
-
|
|
387
|
-
a.
|
|
371
|
+
Ej.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Gj(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",Ej);Ej.prototype.release=Ej.prototype.release;function Hj(a,b,c,d){var e=this;this.j=a;this.aa=c;this.A=null;this.C=b;this.h={};this.F={};this.Fa={};this.g=null;this.oa=!1;this.U=d||null;this.l={};this.s=new hb;this.i={};this.G=null;this.L=new Zf;this.va="";this.Ka=!1;this.m=Ij(this,this.L);this.N=!1;this.H=new yg(function(){return Jj(e)});this.B=!1;this.$="UNKNOWN";this.Ba=this.Ea=!1;this.ua=new Zf;this.o=!1;this.ma=!0;this.ta=null;this.P={};this.fa=this.J=this.la=this.K=null;this.ba=new Zf}
|
|
372
|
+
function Ij(a,b){a.ma=!0;if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.ma=!0});a.s.D(c,"endstreaming",function(){a.ma=!1})}else c=new MediaSource;a.s.za(c,"sourceopen",function(){URL.revokeObjectURL(a.va);b.resolve()});a.s.za(a.j,"playing",function(){a.Ka=!0});a.va=Kj(c);a.j.src=a.va;return c}
|
|
373
|
+
function Lj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(q){if(1==q.g)return a.createSegmentIndex?E(q,a.createSegmentIndex(),2):q.u(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=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.qa){if(m=Yd(h,k),!ne(m))return q.return(!1)}else if(b==c.ga?k=Xe(k):b==c.W&&(k=Ye(k,h)),n=
|
|
374
|
+
be(a,h,k),p=$d(h,k),!nb(n)&&!mc(p))return q.return(!1);return q.return(!0)})}r=Hj.prototype;r.destroy=function(){return this.H.destroy()};
|
|
375
|
+
function Jj(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(ve)),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.C&&b.push(a.C.destroy());for(k in a.i)b.push(a.i[k].destroy());return E(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.C=null;a.h={};a.i={};a.G=null;
|
|
376
|
+
a.l={};a.U=null;a.P={};a.aa=null;G(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Wd,E(m,e.L,2);case 2:e.B=b,e.$=c,e.Ea=d,e.Ba=!e.B&&"HLS"==e.$&&!e.Ea,e.P={},e.K=null,e.la=null,e.J=null,e.fa=null,e.ba=new Zf,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return E(m,Mj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.W]=[],e.l[f.ga]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
|
|
377
|
+
function Mj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v;return O(function(w){switch(w.g){case 1:return e=Wd,f=Ta,g=Ua,E(w,Lj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Yd(c.mimeType,d);if(b==e.qa){Nj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!nb(h)||!a.B&&Zd.includes(h))k=!0;l=$d(c.mimeType,d);if(!k){w.u(4);break}m=Sd(e.W,(d||"").split(","));n=Sd(e.ga,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return E(w,Mj(a,e.W,c,m),6);case 6:return E(w,
|
|
378
|
+
Mj(a,e.ga,c,n),7);case 7:return w.return();case 5:if(p=mc(l))q=p(),a.i[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Bg(a.H);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=Oj);a.s.D(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.D(v,"updateend",function(){return Pj(a,b)});a.h[b]=v;a.F[b]=h;a.Fa[b]=!!c.drmInfos.length;
|
|
379
|
+
G(w)}})}r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
380
|
+
function Nj(a,b,c,d){a.g||(a.g=new me(a.C),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.oa;a=a.$;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,oe[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):rb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):rb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
381
|
+
function Qj(a){return a.N?!1:a.m?"ended"==a.m.readyState:!0}function Rj(a,b){Object.keys(a.h).length?b==Ud?a=a.g.g:(a=Sj(a,b),a=!a||Ki(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function Tj(a,b){return Object.keys(a.h).length?b==Ud?a.g.h:Li(Sj(a,b)):null}function Uj(a,b,c){if(b==Ud)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Sj(a,b);return Ni(a,c)}
|
|
382
|
+
r.ub=function(){var a={total:this.N?[]:Oi(this.j.buffered),audio:Oi(Sj(this,"audio")),video:Oi(Sj(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 Sj(a,b){if(a.N)return null;try{return a.h[b].buffered}catch(c){return null}}
|
|
383
|
+
function Vj(a,b,c,d,e){var f=null,g=[],h=Bb(c);if(Zd.includes(e))b=Vi(h),b.length&&d&&((c=b.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&c.data&&(f=Math.round(c.data)/1E3),a.aa.Yd([{cueTime:d.startTime,data:h,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ea&&d.ea.timescale){var k=d.ea.timescale;if(!isNaN(k)){var l=0,m=!1;(new Jg).box("moof",Qg).box("traf",Qg).R("tfdt",function(n){l=Yi(n.reader,
|
|
384
|
+
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(f=l)}}else e.includes("/mp4")||e.includes("/webm")||!Dj(h)||(a.P[b]?a.P[b].clearData():a.P[b]=new wj,a=a.P[b].parse(h),d=a.getStartTime(b),null!=d&&(f=d),g=a.getMetadata());return{timestamp:f,metadata:g}}
|
|
385
|
+
function Wj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K;return O(function(I){switch(I.g){case 1:m=Wd;if(b!=m.qa){I.u(2);break}if(!a.B){I.u(3);break}return E(I,a.ua,4);case 4:n=I.h,a.g.s=n;case 3:return E(I,pe(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return I.return();case 2:if(l||!a.o){I.u(6);break}return E(I,Wj(a,m.W,c,d,e,f,g,h,k,!0),7);case 7:return E(I,Wj(a,m.ga,c,d,e,f,g,h,k,!0),8);
|
|
386
|
+
case 8:return I.return();case 6:if(!a.h[b])return I.return();p=a.h[b].timestampOffset;q=a.F[b];a.i[b]&&(q=a.i[b].getOriginalMimeType());d&&(u=Vj(a,b,c,d,q),v=u.timestamp,w=u.metadata,null!=v&&(null==a.K&&b==m.ga&&(a.K=v,a.la=d.startTime,null!=a.J&&(A=0,a.la==a.fa&&(A=a.K-a.J),a.ba.resolve(A))),null==a.J&&b==m.W&&(a.J=v,a.fa=d.startTime,null!=a.K&&(y=0,a.la==a.fa&&(y=a.K-a.J),a.ba.resolve(y))),C=d.startTime-v,z=Math.abs(p-C),(.001<=z||g||h)&&(!k||0<C||!p)&&(p=C,a.Ba&&(Xj(a,b,function(){return Yj(a,
|
|
387
|
+
b)},null),Xj(a,b,function(){return Zj(a,b,p)},null))),B=b==m.ga||!(m.ga in a.h),a.B&&B&&a.ua.resolve(p)),w.length&&a.aa.Yd(w,p,d?d.endTime:null));f&&b==m.ga&&(a.g||Nj(a,"application/cea-608",a.B,!1),a.G||(D=q.split(";",1)[0],a.G=new Hb(D)),d?(J=a.G.i(c),J.length&&te(a.g,J,d.startTime,d.endTime,p)):a.G.init(c,h));if(!a.i[b]){I.u(9);break}return E(I,a.i[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=I.h;case 9:c=ak(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.qa){I.u(11);break}if(!g&&
|
|
388
|
+
!h){I.u(11);break}H=d.startTime;if("HLS"!=a.$||a.o||b!=m.W||!a.h[m.ga]){I.u(13);break}return E(I,a.ba,14);case 14:K=I.h,.1<Math.abs(K)&&(H-=K);case 13:Xj(a,b,function(){return Yj(a,b)},null),Xj(a,b,function(){return Zj(a,b,H)},null);case 11:return E(I,Xj(a,b,function(){var F=c;if("video"==b&&a.U){var M=a.U;M.g&&M.g.appendBuffer(F,"video",M.o,-p)}a.h[b].appendBuffer(F)},d?d.M()[0]:null),15);case 15:G(I)}})}function bk(a,b){var c=Tj(a,"video")||0;re(a.g,b,c)}function ck(a){a.g&&re(a.g,"",0)}
|
|
388
389
|
r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Wd,a==e.qa?E(f,d.g.remove(b,c),0):E(f,Xj(d,a,function(){return dk(d,a,b,c)},null),4)):d.o?E(f,Xj(d,e.W,function(){return dk(d,e.W,b,c)},null),0):f.u(0)})};function ek(a,b){var c;return O(function(d){return 1==d.g?(c=Wd,b==c.qa?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,Xj(a,b,function(){return dk(a,b,0,a.m.duration)},null),4)):a.o?E(d,Xj(a,c.W,function(){return dk(a,c.W,0,a.m.duration)},null),0):d.u(0)})}
|
|
389
390
|
r.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Wd,a==c.qa?d.return():E(d,Xj(b,a,function(){b.j.currentTime-=.001;Pj(b,a)},null),2)):b.o?E(d,Xj(b,c.W,function(){var e=c.W;b.j.currentTime-=.001;Pj(b,e)},null),0):d.u(0)})};
|
|
390
391
|
function fk(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.qa)return f||(a.g.s=c),qe(a.g,d,e),p.return();m=[];return E(p,gk(a,b,g,h,k),2)}n=p.h;n||(m.push(Xj(a,b,function(){return Yj(a,b)},null)),a.o&&m.push(Xj(a,l.W,function(){return Yj(a,l.W)},null)));f||(m.push(Xj(a,b,function(){return Zj(a,b,c)},null)),a.o&&m.push(Xj(a,l.W,function(){return Zj(a,l.W,c)},null)));m.push(Xj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Pj(a,
|
|
391
392
|
b)},null));a.o&&m.push(Xj(a,l.W,function(){var q=l.W;a.h[q].appendWindowStart=0;a.h[q].appendWindowEnd=e;a.h[q].appendWindowStart=d;Pj(a,q)},null));return E(p,Promise.all(m),0)})}
|
|
392
|
-
function hk(a,b,c){var d;return O(function(e){if(1==e.g){d=Wd;if(b==d.qa)return e.return();b==d.
|
|
393
|
-
r.Ua=function(a){var b=this;return O(function(c){return E(c,ik(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new Zf,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.
|
|
394
|
-
function Zj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Pj(a,b)}function Pj(a,b){if(!a.
|
|
395
|
-
function ik(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.
|
|
396
|
-
null);}})}function jk(a,b){a.l[b].shift();kk(a,b)}function kk(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)),jk(a,b)}}function ak(a,b,c,d,e){var f=null==c,g=a.Fa[d];c=a.aa.
|
|
397
|
-
function lk(a,b,c,d){return Xj(a,b,function(){b!==Ud&&(pb()&&(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.
|
|
398
|
-
function mk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
399
|
-
Promise.all(g),4);case 4:return a.i={},a.h={},w=a.m.duration,a.L=new Zf,a.m=Ij(a,a.L),E(
|
|
400
|
-
|
|
401
|
-
function gk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){if(1==z.g){f=Wd;if(b==f.qa)return z.return(!1);g=ee(je(a.
|
|
393
|
+
function hk(a,b,c){var d;return O(function(e){if(1==e.g){d=Wd;if(b==d.qa)return e.return();b==d.ga&&(a.ua=new Zf);Xj(a,b,function(){return Yj(a,b)},null);a.o&&Xj(a,d.W,function(){return Yj(a,d.W)},null);return E(e,Xj(a,b,function(){return Zj(a,b,c)},null),2)}return a.o?E(e,Xj(a,d.W,function(){return Zj(a,d.W,c)},null),0):e.u(0)})}r.endOfStream=function(a){var b=this;return O(function(c){return E(c,ik(b,function(){Qj(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
|
|
394
|
+
r.Ua=function(a){var b=this;return O(function(c){return E(c,ik(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new Zf,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.ta=a}),0)})};r.getDuration=function(){return this.m.duration};function dk(a,b,c,d){d<=c?Pj(a,b):a.h[b].remove(c,d)}function Yj(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;Pj(a,b)}
|
|
395
|
+
function Zj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Pj(a,b)}function Pj(a,b){if(!a.N){var c=a.l[b][0];c&&(c.p.resolve(),jk(a,b))}}function Xj(a,b,c,d){Bg(a.H);c={start:c,p:new Zf,uri:d};a.l[b].push(c);1==a.l[b].length&&kk(a,b);return c.p}
|
|
396
|
+
function ik(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.H);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new Zf,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();wa(l,2);return E(l,Promise.all(c),4);case 4:ya(l,3);break;case 2:throw g=za(l),g;case 3:return wa(l,5,6),E(l,b(),6);case 6:Ba(l);for(h in a.h)jk(a,h);Ca(l,0);break;case 5:throw k=za(l),new T(2,3,3015,k,a.j.error||"No error in the media element",
|
|
397
|
+
null);}})}function jk(a,b){a.l[b].shift();kk(a,b)}function kk(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)),jk(a,b)}}function ak(a,b,c,d,e){var f=null==c,g=a.Fa[d];c=a.aa.Dh();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Mc(c),f=Zc()||Xc()||gd()||Wc()&&ld()&&c;f&&"mp4"==de(a.F[d])&&(b=xi(b,e));return b}
|
|
398
|
+
function lk(a,b,c,d){return Xj(a,b,function(){b!==Ud&&(pb()&&(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.F[b]=c),Pj(a,b))},null)}
|
|
399
|
+
function mk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K;return O(function(I){switch(I.g){case 1:c=Wd;a.N=!0;a.o=!1;d=a.j.currentTime;e=a.j.autoplay;f=a.j.paused;a.Ka&&(a.j.autoplay=!1);xa(I,2);a.s.nb();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(ve)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())q=p.value,q.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(F){}}return E(I,
|
|
400
|
+
Promise.all(g),4);case 4:return a.i={},a.h={},w=a.m.duration,a.L=new Zf,a.m=Ij(a,a.L),E(I,a.L,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.ta)&&a.ta&&(a.m.duration=a.ta),A=new Zf,y=a.m.sourceBuffers,C=b.size,z=0,B=function(){z++;z===C&&(A.resolve(),a.s.Ib(y,"addsourcebuffer",B))},a.s.D(y,"addsourcebuffer",B),D=t(b.keys()),J=D.next();case 6:if(J.done)return a.j.currentTime=d,E(I,A,2);H=J.value;K=b.get(H);return E(I,Mj(a,H,K,K.codecs),9);case 9:a.o?(a.l[c.W]=[],a.l[c.ga]=[]):a.l[H]=[];J=D.next();
|
|
401
|
+
I.u(6);break;case 2:Ba(I),a.N=!1,Bg(a.H),a.s.za(a.j,"canplaythrough",function(){a.H.g||(a.j.autoplay=e,f||a.j.play())}),Ca(I,0)}})}function nk(a,b){return ik(a,function(){return mk(a,b)})}
|
|
402
|
+
function gk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){if(1==z.g){f=Wd;if(b==f.qa)return z.return(!1);g=ee(je(a.F[b]));h=ie(a.F[b]);l=!1;m=Yd(c,d);n=a.A.forceTransmux;if(!nb(m)||!a.B&&Zd.includes(m))n=!0;n&&(p=$d(c,d),q=mc(p))&&(k=q(),u=Sd(f.W,(d||"").split(",")),v=Sd(f.ga,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.W&&(w=u),m=k.convertCodecs(b,$d(c,w))):m=k.convertCodecs(b,p));A=ee(je(m));y=ie(m);if(g===A&&h===y)return a.i[b]&&!k?(a.i[b].destroy(),delete a.i[b]):!a.i[b]&&k?a.i[b]=
|
|
402
403
|
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()),z.return(!1);C=!0;if(a.o||l&&k&&!a.i[b])C=!1;if(C&&"smooth"===a.A.codecSwitchingStrategy&&pb())return E(z,lk(a,b,m,k),3);k&&k.destroy();return E(z,nk(a,e),3)}return z.return(!0)})}
|
|
403
|
-
function ok(a,b,c,d){if(b==Ud)var e=!1;else{e=ee(je(a.
|
|
404
|
-
r.
|
|
405
|
-
r.
|
|
406
|
-
r.Ud=function(a){null==this.j?this.j=a:this.J||(this.j=Math.min(this.j,a))};r.hf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};r.V=function(){return Infinity==this.l&&!this.C};r.
|
|
407
|
-
r.
|
|
408
|
-
r.
|
|
409
|
-
pk.prototype.isInProgress=pk.prototype.
|
|
410
|
-
pk.prototype.getDelay=pk.prototype.
|
|
404
|
+
function ok(a,b,c,d){if(b==Ud)var e=!1;else{e=ee(je(a.F[b]));var f=ie(a.F[b]),g=Yd(c,d),h=a.A.forceTransmux;if(!nb(g)||!a.B&&Zd.includes(g))h=!0;c=$d(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ee(je(g));g=ie(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var Kj=window.URL.createObjectURL,Oj="sequence";function pk(a,b,c){this.i=a;this.s=b;this.m=this.l=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.C=!0;this.J=!1;this.G=0;this.F=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}r=pk.prototype;r.getDuration=function(){return this.l};r.Gh=function(){return this.g};r.Og=function(a){this.i=a};r.Ua=function(a){this.l=a};r.Lh=function(){return this.i};r.Mg=function(a){this.A=a};r.kc=function(a){a&&!this.C&&(this.J=!0);this.C=a};r.ge=function(a){this.m=a};r.Dd=function(){return this.m};
|
|
405
|
+
r.Df=function(a){this.s=a};r.yh=function(){return this.s};r.zg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Ud(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.F&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
406
|
+
r.hd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Ud(b);this.h=Math.max(this.h,c);null!=this.i&&this.F&&!this.o&&(this.i=d-this.h-this.g)}};r.Md=function(){this.o=!0};r.ei=function(){return this.o};r.Ng=function(a){this.B=a};r.Ch=function(){return this.B};
|
|
407
|
+
r.Ud=function(a){null==this.j?this.j=a:this.J||(this.j=Math.min(this.j,a))};r.hf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};r.V=function(){return Infinity==this.l&&!this.C};r.ec=function(){return Infinity!=this.l&&!this.C};r.ib=function(){return Math.max(this.G,this.Mb()-this.m)};r.Sg=function(a){this.G=a};
|
|
408
|
+
r.Mb=function(){return this.V()||this.ec()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.l):this.h?Math.min(this.h,this.l):this.l};r.Yc=function(a){var b=Math.max(this.j,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Mb()-this.m+a,this.vb()))};r.Bb=function(){return this.Yc(0)};r.vb=function(){return Math.max(0,this.Mb()-(this.V()||this.ec()?this.s:0))};r.Yg=function(){return null==this.i||null!=this.h&&this.F?!1:!0};
|
|
409
|
+
r.Lg=function(a){this.H=a};S("shaka.media.PresentationTimeline",pk);pk.prototype.setAvailabilityTimeOffset=pk.prototype.Lg;pk.prototype.usingPresentationStartTime=pk.prototype.Yg;pk.prototype.getSeekRangeEnd=pk.prototype.vb;pk.prototype.getSeekRangeStart=pk.prototype.Bb;pk.prototype.getSafeSeekRangeStart=pk.prototype.Yc;pk.prototype.getSegmentAvailabilityEnd=pk.prototype.Mb;pk.prototype.setUserSeekStart=pk.prototype.Sg;pk.prototype.getSegmentAvailabilityStart=pk.prototype.ib;
|
|
410
|
+
pk.prototype.isInProgress=pk.prototype.ec;pk.prototype.isLive=pk.prototype.V;pk.prototype.offset=pk.prototype.offset;pk.prototype.notifyMaxSegmentDuration=pk.prototype.hf;pk.prototype.notifyMinSegmentStartTime=pk.prototype.Ud;pk.prototype.getInitialProgramDateTime=pk.prototype.Ch;pk.prototype.setInitialProgramDateTime=pk.prototype.Ng;pk.prototype.isStartTimeLocked=pk.prototype.ei;pk.prototype.lockStartTime=pk.prototype.Md;pk.prototype.notifySegments=pk.prototype.hd;pk.prototype.notifyTimeRange=pk.prototype.zg;
|
|
411
|
+
pk.prototype.getDelay=pk.prototype.yh;pk.prototype.setDelay=pk.prototype.Df;pk.prototype.getSegmentAvailabilityDuration=pk.prototype.Dd;pk.prototype.setSegmentAvailabilityDuration=pk.prototype.ge;pk.prototype.setStatic=pk.prototype.kc;pk.prototype.setClockOffset=pk.prototype.Mg;pk.prototype.getPresentationStartTime=pk.prototype.Lh;pk.prototype.setDuration=pk.prototype.Ua;pk.prototype.setPresentationStartTime=pk.prototype.Og;pk.prototype.getMaxSegmentDuration=pk.prototype.Gh;
|
|
411
412
|
pk.prototype.getDuration=pk.prototype.getDuration;function qk(a,b,c){this.j=c;this.l=a;this.s=rk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}qk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function sk(a,b){a.i=b}function tk(a){this.g=a}function rk(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(Oi(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 uk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.m=c;this.l=new hb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.s=!1;this.l.D(a,"waiting",function(){return vk(f)});this.o=(new Sc(function(){vk(f)})).Va(this.m.gapJumpTimerTime)}uk.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};uk.prototype.lf=function(){this.s=!0;vk(this)};
|
|
412
413
|
function vk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=rk(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=Pi(c,b,a.m.gapDetectionThreshold),
|
|
413
414
|
null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Xc()||Zc())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.vb()||.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 wk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=xk.value().get(b),c.za(a,b,d))}var xk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function yk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new hb;this.i=new zk(a);wk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ak(e,e.j())})}yk.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 Bk(a){return a.o?a.g.currentTime:a.j()}
|
|
414
415
|
function Ck(a,b){0<a.g.readyState?Dk(a.i,b):wk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ak(a,a.j())})}function Ak(a,b){.001>Math.abs(a.g.currentTime-b)?Ek(a):(a.h.za(a.g,"seeking",function(){Ek(a)}),Dk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Ek(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
415
416
|
function zk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Sc(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--)})}zk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Dk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Va(.1)};function Fk(a){this.h=a;this.j=!1;this.g=null;this.i=new hb}r=Fk.prototype;r.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.za(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;wk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};r.qe=function(a){this.g=this.j?this.g:a};
|
|
416
|
-
r.od=function(){return(this.j?this.h.currentTime:this.g)||0};r.
|
|
417
|
+
r.od=function(){return(this.j?this.h.currentTime:this.g)||0};r.Vf=function(){return 0};r.Uf=function(){return 0};r.yg=function(){};
|
|
417
418
|
function Gk(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=Hk(a,c,f);this.j=new uk(a,b.presentationTimeline,c,this.o,f);this.h=new yk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Bk(g.h);h=Ik(g,k);if(.001<Math.abs(h-k)){k=!1;if(!ed()||ed()&&md())k=!0;else{var l=Date.now()/1E3,m=ed()&&Yc("Fuchsia")?3:1;if(!g.s||g.s<l-m)g.s=l,k=!0}if(k){Ck(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&
|
|
418
419
|
!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Bb():g.g.vb():0>h&&(h=g.g.vb()+h);return Jk(g,Kk(g,h))});this.m=new Sc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Bk(g.h),k=g.g.Bb(),l=g.g.vb();3>l-k&&(k=l-3);h<k&&(h=Ik(g,h),g.i.currentTime=h)}})}r=Gk.prototype;r.ready=function(){this.m.Va(.25)};
|
|
419
|
-
r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.qe=function(a){Ck(this.h,a)};r.od=function(){var a=Bk(this.h);return 0<this.i.readyState&&!this.i.paused?Kk(this,a):a};r.
|
|
420
|
-
function Ik(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.vb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.
|
|
421
|
-
function Hk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new qk(new tk(a),b.stallThreshold,c);sk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Lk(a){this.g=a;this.m=null;this.i=0;this.o=!1}r=Lk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.i};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.
|
|
420
|
+
r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.qe=function(a){Ck(this.h,a)};r.od=function(){var a=Bk(this.h);return 0<this.i.readyState&&!this.i.paused?Kk(this,a):a};r.Vf=function(){return this.o?this.o.o:0};r.Uf=function(){return this.j.C};r.yg=function(){this.j.lf()};function Jk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
421
|
+
function Ik(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.vb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Yc(c),k=a.g.Yc(d);c=a.g.Yc(c+d);return b>=g?Jk(a,b):b>f?f:b<e?Mi(a.i.buffered,k)?k:c:b>=h||Mi(a.i.buffered,b)?b:c}function Kk(a,b){var c=a.g.Bb();if(b<c)return c;a=a.g.vb();return b>a?a:b}
|
|
422
|
+
function Hk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new qk(new tk(a),b.stallThreshold,c);sk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Lk(a){this.g=a;this.m=null;this.i=0;this.o=!1}r=Lk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.i};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.ki=function(){this.o=!0};r.Kb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
422
423
|
r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};r.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
423
|
-
r.Qd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};r.
|
|
424
|
-
r.vc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Gi(a.startTime,b,a.C,a.Da,a.pa,a.
|
|
424
|
+
r.Qd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};r.gd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Qd(a);this.Ca(b)};r.Ca=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
|
|
425
|
+
r.vc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Gi(a.startTime,b,a.C,a.Da,a.pa,a.ea,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
|
|
425
426
|
r.ie=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Sc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Va(a))};Lk.prototype[Symbol.iterator]=function(){return this.Ab(0)};
|
|
426
427
|
Lk.prototype.Ab=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;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 Za("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Mk(this,d,f,c)};function Nk(a,b,c){a=new Gi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Lk([a])}
|
|
427
|
-
S("shaka.media.SegmentIndex",Lk);Lk.forSingleSegment=Nk;Lk.prototype.getIteratorForTime=Lk.prototype.Ab;Lk.prototype.updateEvery=Lk.prototype.ie;Lk.prototype.fit=Lk.prototype.vc;Lk.prototype.evict=Lk.prototype.Ca;Lk.prototype.mergeAndEvict=Lk.prototype.
|
|
428
|
-
Lk.prototype.getNumReferences=Lk.prototype.getNumReferences;function Mk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Mk.prototype.
|
|
429
|
-
|
|
430
|
-
Mk.prototype.setReverse=Mk.prototype.
|
|
431
|
-
r.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};r.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.Qd=function(){};
|
|
432
|
-
r.Ca=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ca(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};r.
|
|
433
|
-
Ok.prototype.get=Ok.prototype.get;Ok.prototype.find=Ok.prototype.find;Ok.prototype.forEachTopLevelReference=Ok.prototype.
|
|
434
|
-
function al(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ab(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.pa&&(c=!1);2==b.
|
|
435
|
-
function fl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&gl(a,c)}function hl(a){fl(a,a.h);fl(a,a.j);a.g=null}Zk.prototype.Ca=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&&gl(this,d);b&&el(this)};Zk.prototype.
|
|
436
|
-
function el(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={We:void 0},d=c.next())e.We=d.value,b.some(function(f){return function(g){return
|
|
437
|
-
function dl(a,b,c){var d=new Uint8Array(0);a.Zd=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Nd(d,e):d=e,a.
|
|
438
|
-
ll.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.kd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.gf;break a}}d=null}if(e=d)e=c.
|
|
439
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.
|
|
440
|
-
function rl(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,sl(e),b.push(tl(e)),e.T&&(hl(e.T),e.T=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,hl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;
|
|
428
|
+
S("shaka.media.SegmentIndex",Lk);Lk.forSingleSegment=Nk;Lk.prototype.getIteratorForTime=Lk.prototype.Ab;Lk.prototype.updateEvery=Lk.prototype.ie;Lk.prototype.fit=Lk.prototype.vc;Lk.prototype.evict=Lk.prototype.Ca;Lk.prototype.mergeAndEvict=Lk.prototype.gd;Lk.prototype.offset=Lk.prototype.offset;Lk.prototype.get=Lk.prototype.get;Lk.prototype.find=Lk.prototype.find;Lk.prototype.markImmutable=Lk.prototype.ki;Lk.prototype.release=Lk.prototype.release;Lk.prototype.getNumEvicted=Lk.prototype.getNumEvicted;
|
|
429
|
+
Lk.prototype.getNumReferences=Lk.prototype.getNumReferences;function Mk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}r=Mk.prototype;r.Lc=function(a){this.reverse=a};r.sh=function(){return this.h};r.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
430
|
+
r.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};r.vf=function(){var a=this.current();if(a.Ec&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
|
|
431
|
+
S("shaka.media.SegmentIterator",Mk);Mk.prototype.resetToLastIndependent=Mk.prototype.vf;Mk.prototype.next=Mk.prototype.next;Mk.prototype.current=Mk.prototype.current;Mk.prototype.currentPosition=Mk.prototype.sh;Mk.prototype.setReverse=Mk.prototype.Lc;function Ok(){Lk.call(this,[]);this.h=[]}ra(Ok,Lk);r=Ok.prototype;r.clone=function(){var a=new Ok;a.h=this.h.slice();a.i=this.i;return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};
|
|
432
|
+
r.Kb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Kb(a)};r.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};r.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.Qd=function(){};
|
|
433
|
+
r.Ca=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ca(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};r.gd=function(){};r.vc=function(){};r.ie=function(){};S("shaka.media.MetaSegmentIndex",Ok);Ok.prototype.updateEvery=Ok.prototype.ie;Ok.prototype.fit=Ok.prototype.vc;Ok.prototype.mergeAndEvict=Ok.prototype.gd;Ok.prototype.evict=Ok.prototype.Ca;Ok.prototype.merge=Ok.prototype.Qd;Ok.prototype.offset=Ok.prototype.offset;
|
|
434
|
+
Ok.prototype.get=Ok.prototype.get;Ok.prototype.find=Ok.prototype.find;Ok.prototype.forEachTopLevelReference=Ok.prototype.Kb;Ok.prototype.release=Ok.prototype.release;function Pk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Cd();this.h=new Sc(function(){b.g.xg(.25*b.i)})}Pk.prototype.release=function(){this.set(this.Xb());this.h&&(this.h.stop(),this.h=null);this.g=null};Pk.prototype.set=function(a){this.i=a;Qk(this)};Pk.prototype.Xb=function(){return this.g.Xb()};function Qk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Cd()!=b&&a.g.Gf(b);return}catch(c){}a.h.Va(.25);0!=a.g.Cd()&&a.g.Gf(0)};function Rk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Sc(function(){Sk(b,!1)})).Va(.25)}Rk.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 Sk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Tk(){this.g=null;this.h=[]}function Uk(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 Vk(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 Wk(){this.i=this.h=null;this.g=[]}function Xk(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 Yk(){this.Tb=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.J=this.K=this.l=this.o=NaN;this.g=new Tk;this.h=new Wk};function Zk(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 $k(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
435
|
+
function al(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ab(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.pa&&(c=!1);2==b.bc()&&(c=!1);b.$b()&&(c=!1);c&&b.ea&&bl(a,b.ea);c&&!a.h.has(b)&&(c=new cl(a.l),dl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.Ec&&b.Ld)break}el(a)}}
|
|
436
|
+
function bl(a,b){if(a.i.segmentIndex&&!b.$b()&&!Array.from(a.j.keys()).some(function(d){return Ci(d,b)})){var c=new cl(a.l);dl(c,b,a.i);a.j.set(b,c)}}function fl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&gl(a,c)}function hl(a){fl(a,a.h);fl(a,a.j);a.g=null}Zk.prototype.Ca=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&&gl(this,d);b&&el(this)};Zk.prototype.Lc=function(a){this.o=a;this.g&&this.g.Lc(a)};
|
|
437
|
+
function el(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={We:void 0},d=c.next())e.We=d.value,b.some(function(f){return function(g){return Ci(g.ea,f.We)}}(e))||gl(a,e.We)}function il(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&gl(a,d)}el(a)}function jl(a,b){b&&b!==a.i&&(hl(a),a.i=b)}function gl(a,b){var c=a.h;b instanceof Bi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function cl(a){this.g=a;this.Zd=this.Jf=null}
|
|
438
|
+
function dl(a,b,c){var d=new Uint8Array(0);a.Zd=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Nd(d,e):d=e,a.Jf?E(f,a.Jf(d),3):f.u(0);d=new Uint8Array(0);G(f)})})}cl.prototype.abort=function(){this.Zd&&this.Zd.abort()};function kl(a){ig.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Sc(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))})).Va(2)}ra(kl,ig);kl.prototype.release=function(){this.g.clear();this.h.stop();ig.prototype.release.call(this)};function ll(a){ig.call(this);this.g=new Map;this.h=a}ra(ll,ig);ll.prototype.release=function(){this.g.clear();ig.prototype.release.call(this)};function ml(a,b){var c=a.g.get(b);c||(c={kd:[],bg:null,contentType:b},a.g.set(b,c));return c}function nl(a,b,c){var d=ml(a,b.contentType);ol(a,d);a={gf:b,position:c};d=d.kd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
439
|
+
ll.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.kd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.gf;break a}}d=null}if(e=d)e=c.bg,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
440
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.bg=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ol(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.kd;b.kd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.kd=[]};function pl(a,b,c,d,e){a=qg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ql(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.F=!1;this.L=null;this.A=!1;this.m=new yg(function(){return rl(c)});this.N=Date.now()/1E3;this.o=new Map;this.J={projection:null,hfov:null};this.U=0;this.P=Infinity;this.C=null}r=ql.prototype;r.destroy=function(){return this.m.destroy()};
|
|
441
|
+
function rl(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,sl(e),b.push(tl(e)),e.T&&(hl(e.T),e.T=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,hl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;G(k)})}
|
|
441
442
|
r.configure=function(a){this.h=a;this.L=new Wf({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.T&&(hl(b.T),b.T=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,hl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Ud))&&
|
|
442
443
|
b.T&&(hl(b.T),b.T=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.T&&(hl(b.T),b.T=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.T?(il(c.T,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(hl(c.T),c.T=null)):0<a.segmentPrefetchLimit&&(c.T=ul(this,c.stream));a.disableAudioPrefetch||vl(this)};function wl(a,b,c){a.l.presentationTimeline.V()||(a.U=b,a.P=c)}
|
|
443
|
-
r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,xl(b,a||new Map),2);Bg(b.m);b.F=!0;
|
|
444
|
-
function Bl(a){var b=a.i.get(Ud);b&&(sl(b),tl(b).catch(function(){}),a.C=a.i.get(Ud),a.i.delete(Ud));a.s=null}function Cl(a,b){for(var c=0>a.g.Za(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.
|
|
445
|
-
function El(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.F&&(b.video&&Dl(a,b.video,c,d,e,f),b.audio&&Dl(a,b.audio,c,d,e,f))}function Fl(a,b){O(function(c){if(1==c.g)return a.C=null,a.s=b,a.F?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();Dl(a,b,!0,0,!1);
|
|
446
|
-
function Dl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ud?g&&(g.
|
|
444
|
+
r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,xl(b,a||new Map),2);Bg(b.m);b.F=!0;G(c)})};function yl(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,wa(l,2),E(l,ek(a.g.X,c.qa),4);case 4:ya(l,3);break;case 2:if(e=za(l),a.g)a.g.onError(e);case 3:f=Yd(b.mimeType,b.codecs),Nj(a.g.X,f,a.l.sequenceMode,b.external),g=a.g.X.C,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.K==d&&(k=zl(a,b),a.i.set(c.qa,k),Al(a,k,0)),G(l)}})}
|
|
445
|
+
function Bl(a){var b=a.i.get(Ud);b&&(sl(b),tl(b).catch(function(){}),a.C=a.i.get(Ud),a.i.delete(Ud));a.s=null}function Cl(a,b){for(var c=0>a.g.Za(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ca&&e.ca.Lc(c),e.T&&e.T.Lc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Lc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Ob&&(Dl(a,b,!1,0,!1),c.Ob=d);else if(b=c.Ob)c.Ob=null,Dl(a,b,!0,0,!1)}
|
|
446
|
+
function El(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.F&&(b.video&&Dl(a,b.video,c,d,e,f),b.audio&&Dl(a,b.audio,c,d,e,f))}function Fl(a,b){O(function(c){if(1==c.g)return a.C=null,a.s=b,a.F?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();Dl(a,b,!0,0,!1);G(c)})}function Gl(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))}}
|
|
447
|
+
function Dl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ud?g&&(g.Ob&&(b.trickModeVideo?(g.Ob=b,b=b.trickModeVideo):g.Ob=null),g.stream!=b||e)&&(a.o.has(b)?g.T=a.o.get(b):g.T&&jl(g.T,b),b.type==Ud&&(e=Yd(b.mimeType,b.codecs),Nj(a.g.X,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ia?(e="("+g.type+":"+g.stream.id+")",a.G.has(e)||a.G.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.ca=null,g.Wf=!!f,c?g.Oc?g.oe=!0:g.Ia?(g.Sb=!0,g.vd=d,
|
|
447
448
|
g.oe=!0):(sl(g),Hl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ia||g.pb||Al(a,g,0),Il(a,g).catch(function(h){if(a.g)a.g.onError(h)})):yl(a,b)}
|
|
448
|
-
function Il(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.
|
|
449
|
-
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.eb.h.g>h?!0:!1):f=!1;f&&b.eb.abort();
|
|
450
|
-
r.
|
|
451
|
-
function Jl(a,b){b.
|
|
452
|
-
function xl(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.W,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.
|
|
453
|
-
b.get(l.id),$k(n,function(q,u,v){return Kl(q,u,v||null,a.h.retryParameters,a.g.Eb)}),m.T=n),a.i.set(k,m),Al(a,m,0));
|
|
449
|
+
function Il(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Xc();var g=Tj(a.g.X,b.type),h=b.stream.segmentIndex.find(b.Ma?b.Ma.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.pa?k.pa-k.Da:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ea)&&(h+=(k.pa?k.pa-k.Da:null)||0),k=a.g.getBandwidthEstimate(),
|
|
450
|
+
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.eb.h.g>h?!0:!1):f=!1;f&&b.eb.abort();G(e)})}
|
|
451
|
+
r.Jc=function(){if(this.g)for(var a=this.g.Xc(),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.X;d==Ud?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Sj(e,d),e=Mi(e,a));if(!e){c.T&&(c.T.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.ca=null;(null!=Tj(this.g.X,d)||c.Ia)&&Jl(this,c);c.eb&&(c.eb.abort(),c.eb=null);d===Ud&&(d=this.g.X,d.G&&d.G.g());c.Jc=!0}}};
|
|
452
|
+
function Jl(a,b){b.Oc||b.Sb||(b.Ia?(b.Sb=!0,b.vd=0):null==Rj(a.g.X,b.type)?null==b.pb&&Al(a,b,0):(sl(b),Hl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
453
|
+
function xl(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.W,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ga,a.j.video),e.add(a.j.video));a.s&&(d.set(c.qa,a.s),e.add(a.s));f=a.g.X;return E(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=zl(a,l),b.has(l.id)&&(n=
|
|
454
|
+
b.get(l.id),$k(n,function(q,u,v){return Kl(q,u,v||null,a.h.retryParameters,a.g.Eb)}),m.T=n),a.i.set(k,m),Al(a,m,0));G(p)})}function zl(a,b){return{stream:b,type:b.type,ca:null,T:ul(a,b),Ma:null,Bc:null,df:null,bf:null,af:null,Ob:null,endOfStream:!1,Ia:!1,pb:null,Sb:!1,vd:0,oe:!1,Oc:!1,Jc:!0,tf:!1,ad:!1,eb:null}}
|
|
454
455
|
function ul(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.T)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new Zk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Kl(d,e,f||null,a.h.retryParameters,a.g.Eb)},0>a.g.Za()):null}
|
|
455
456
|
function vl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={gb:void 0},e=d.next())if(f.gb=e.value,f.gb.audio)if(a.o.has(f.gb.audio)){if(e=a.o.get(f.gb.audio),il(e,b),!(0<b&&c.some(function(h){return function(k){return ye(h.gb.audio.language,k)}}(f)))){var g=a.i.get(f.gb.audio.type);e!==(g&&g.T)&&hl(e);a.o.delete(f.gb.audio)}}else 0>=b||!c.some(function(h){return function(k){return ye(h.gb.audio.language,k)}}(f))||!(e=ul(a,f.gb.audio))||
|
|
456
457
|
(f.gb.audio.segmentIndex||f.gb.audio.createSegmentIndex(),a.o.set(f.gb.audio,e))}r.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.X.Ua(a):this.g.X.Ua(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
457
|
-
function Ll(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Bg(a.m);if(b.Ia||null==b.pb||b.
|
|
458
|
-
za(h),E(h,Nl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.X.endOfStream(),10);case 10:Bg(a.m),g=a.g.X.getDuration(),0!=g&&g<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Ua(g),
|
|
459
|
-
function Ml(a,b){if(Ol(b))return bk(a.g.X,b.stream.originalId||""),null;b.type==Ud&&ck(a.g.X);if(!a.g.X.
|
|
460
|
-
!0,"video"==b.type&&(a=a.i.get(Ud))&&Ol(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.
|
|
458
|
+
function Ll(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Bg(a.m);if(b.Ia||null==b.pb||b.Oc)return h.return();b.pb=null;if(!b.Sb){h.u(2);break}return E(h,Hl(a,b,b.oe,b.vd),3);case 3:return h.return();case 2:Gl(a,b);if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return E(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ia||b.pb||Al(a,b,0),h.return();case 4:wa(h,6);d=Ml(a,b);null!=d&&(Al(a,b,d),b.ad=!1);ya(h,7);break;case 6:return e=
|
|
459
|
+
za(h),E(h,Nl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.X.endOfStream(),10);case 10:Bg(a.m),g=a.g.X.getDuration(),0!=g&&g<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Ua(g),G(h)}})}
|
|
460
|
+
function Ml(a,b){if(Ol(b))return bk(a.g.X,b.stream.originalId||""),null;b.type==Ud&&ck(a.g.X);if(!a.g.X.ma&&b.type!=Ud)return a.h.updateIntervalSeconds/2;var c=a.g.Xc();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.Ca(c,!0),al(e,c);d=b.Ma?b.Ma.endTime:c;var f=Uj(a.g.X,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=Tj(a.g.X,b.type);if(1E-6>h&&e)return b.endOfStream=
|
|
461
|
+
!0,"video"==b.type&&(a=a.i.get(Ud))&&Ol(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.ca;e=Pl(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.Wf&&(f=!0,b.Wf=!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,Ol(k)||k.ca&&!k.ca.current()||(g=Math.min(g,k.Ma?k.Ma.endTime:c));if(d>=g+a.l.presentationTimeline.g)return a.h.updateIntervalSeconds;b.T&&b.ca&&!a.o.has(b.stream)&&(b.T.Ca(e.startTime),al(b.T,
|
|
461
462
|
e.startTime));Ql(a,b,c,e,f).catch(function(){});return null}
|
|
462
|
-
function Pl(a,b,c,d){if(b.
|
|
463
|
-
function Ql(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:f=Wd;g=b.stream;h=b.
|
|
464
|
-
if(a.A)return
|
|
465
|
-
break}q=!0;Bg(a.m);return a.A?B.return():b.
|
|
466
|
-
z.code)return E(B,Vl(a,b,z),0);b
|
|
463
|
+
function Pl(a,b,c,d){if(b.ca)return b.ca.current();if(b.Ma||d)return c=b.Ma?b.Ma.endTime:d,a=0>a.g.Za(),b.stream.segmentIndex&&(b.ca=b.stream.segmentIndex.Ab(c,!1,a)),b.ca&&b.ca.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Za();var f=null;d&&(b.stream.segmentIndex&&(b.ca=b.stream.segmentIndex.Ab(e,!1,a)),f=b.ca&&b.ca.next().value);f||(b.stream.segmentIndex&&(b.ca=b.stream.segmentIndex.Ab(c,!1,a)),f=b.ca&&b.ca.next().value);return f}
|
|
464
|
+
function Ql(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:f=Wd;g=b.stream;h=b.ca;b.Ia=!0;wa(B,2);if(2==d.bc())throw new T(1,1,1011);return E(B,Rl(a,b,d,e),4);case 4:Bg(a.m);if(a.A)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if(a.h.lowLatencyMode&&l&&k&&("HLS"!=a.l.type||d.m))return p=new Uint8Array(0),u=q=!1,w=function(D){var J,H,K,I;return O(function(F){switch(F.g){case 1:if(q)return F.return();u=!0;Bg(a.m);
|
|
465
|
+
if(a.A)return F.return();wa(F,2);p=Sl(p,D);J=!1;H=0;(new Jg).box("mdat",function(M){H=M.size+M.start;J=!0}).parse(p,!1,!0);if(!J){F.u(4);break}K=p.subarray(0,H);p=p.subarray(H);return E(F,Tl(a,b,c,g,d,K,!0,e),5);case 5:b.T&&b.ca&&al(b.T,d.startTime,!0);case 4:ya(F,0);break;case 2:v=I=za(F),G(F)}})},E(B,Ul(a,b,d,w),9);m=Ul(a,b,d);return E(B,m,7);case 7:n=B.h;Bg(a.m);if(a.A)return B.return();Bg(a.m);return b.Sb?(b.Ia=!1,Al(a,b,0),B.return()):E(B,Tl(a,b,c,g,d,n,!1,e),6);case 9:A=B.h;if(v)throw v;if(u){B.u(10);
|
|
466
|
+
break}q=!0;Bg(a.m);return a.A?B.return():b.Sb?(b.Ia=!1,Al(a,b,0),B.return()):E(B,Tl(a,b,c,g,d,A,!1,e),10);case 10:b.T&&b.ca&&al(b.T,d.startTime,!0);case 6:Bg(a.m);if(a.A)return B.return();b.Ma=d;h.next();b.Ia=!1;b.tf=!1;y=a.g.X.ub();C=y[b.type];eb(JSON.stringify(C));b.Sb||a.g.lf(d,b.stream);Al(a,b,0);ya(B,0);break;case 2:z=za(B);Bg(a.m,z);if(a.A)return B.return();b.Ia=!1;if(7001==z.code)b.Ia=!1,sl(b),Al(a,b,0),B.u(0);else if(b.type==f.qa&&a.h.ignoreTextStreamFailures)a.i.delete(f.qa),B.u(0);else{if(3017==
|
|
467
|
+
z.code)return E(B,Vl(a,b,z),0);b.ad=!0;1==z.category&&b.T&&gl(b.T,d);z.severity=2;return E(B,Nl(a,b,z),0)}}})}function Wl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Bb(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))})}
|
|
467
468
|
function Sl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
468
|
-
function Vl(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.tf}))return l.u(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.xd(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
|
|
469
|
-
function Rl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:e=Wd;f=null==b.Ma
|
|
470
|
-
break}return E(B,tl(u).catch(function(){}),5);case 5:u.
|
|
471
|
-
b.
|
|
472
|
-
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("vexu",Qg).box("proj",Qg).R("prji",function(L){L=L.reader.hc();
|
|
473
|
-
0);break;case 2:throw M=za(N),b.
|
|
469
|
+
function Vl(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.tf}))return l.u(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.xd(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.ad=!0,a.A=!0,a.g.onError(c),l.return();b.tf=!0;k=a.g.Xc();return E(l,Xl(a,b,k),2)}Al(a,b,4);G(l)})}
|
|
470
|
+
function Rl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:e=Wd;f=null==b.Ma;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.U)-.1);k=Math.min(c.appendWindowEnd,a.P)+.01;l=c.codecs||b.stream.codecs;m=ge(l);n=ie(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.df&&h==b.bf&&k==b.af&&m==b.cf&&n==b.tg){B.u(2);break}q=b.cf&&b.tg&&ok(a.g.X,b.type,n,l);if(!q){B.u(3);break}u=null;b.type===e.ga?u=a.i.get(e.W):b.type===e.W&&(u=a.i.get(e.ga));if(!u){B.u(3);
|
|
471
|
+
break}return E(B,tl(u).catch(function(){}),5);case 5:u.Bc=null,Jl(a,u);case 3:return v=function(){var D,J,H;return O(function(K){if(1==K.g)return D=new Map,a.j.audio&&D.set(e.W,a.j.audio),a.j.video&&D.set(e.ga,a.j.video),wa(K,2),b.bf=h,b.af=k,b.cf=m,b.tg=n,b.df=p,J=a.l.sequenceMode||"HLS"==a.l.type,E(K,fk(a.g.X,b.type,p,h,k,J,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,D),4);if(2!=K.g)return ya(K,0);H=za(K);b.bf=null;b.af=null;b.cf=null;b.df=null;throw H;})},E(B,v(),2);case 2:return Ci(c.ea,
|
|
472
|
+
b.Bc)||(b.Bc=c.ea,c.l&&c.ea&&(w=Ul(a,b,c.ea),A=function(){var D,J,H,K,I,F,M;return O(function(N){switch(N.g){case 1:return wa(N,2),E(N,w,4);case 4:return D=N.h,Bg(a.m),J=null,H=new Map,K={projection:null,hfov:null},I=new Jg,I.box("moov",Qg).box("trak",Qg).box("mdia",Qg).R("mdhd",function(L){J=Zi(L.reader,L.version).timescale}).box("hdlr",function(L){L=L.reader;L.skip(8);switch(L.hc()){case "soun":H.set(e.W,J);break;case "vide":H.set(e.ga,J)}J=null}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("encv",
|
|
473
|
+
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("vexu",Qg).box("proj",Qg).R("prji",function(L){L=L.reader.hc();K.projection=L}).box("hfov",function(L){L=L.reader.O()/1E3;K.hfov=L}).parse(D),Yl(a,K),H.has(b.type)?c.ea.timescale=H.get(b.type):null!=J&&(c.ea.timescale=J),F=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(N,a.g.Zf(b.type,D),5);case 5:return E(N,Wj(a.g.X,b.type,D,null,b.stream,F,b.Jc,d),6);case 6:ya(N,
|
|
474
|
+
0);break;case 2:throw M=za(N),b.Bc=null,M;}})},y=c.startTime,f&&(C=Tj(a.g.X,b.type),null!=C&&(y=C)),a.g.mi(y,c.ea),g.push(A()))),a.l.sequenceMode&&(z=b.Ma?b.Ma.i:null,c.i!=z&&g.push(hk(a.g.X,b.type,c.startTime))),E(B,Promise.all(g),0)}})}
|
|
474
475
|
function Tl(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;return O(function(q){switch(q.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;if(m||n)l=new Jg;m&&l.R("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.hc();var A=u.reader.hc();var y=u.reader.O();var C=u.reader.O();var z=u.reader.O();var B=u.reader.O();var D=e.startTime+C/y}else y=
|
|
475
|
-
u.reader.O(),D=u.reader.
|
|
476
|
-
w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=Vi(u),w.length&&a.g.Yd([{cueTime:D,data:u,frames:w,dts:D,pts:D}],0,v)))});n&&l.R("prft",function(u){if(!a.H&&e.
|
|
477
|
-
v);a.g.onEvent(v);a.H=!0}});(m||n)&&l.parse(f);return E(q,Xl(a,b,c),2);case 2:return Bg(a.m),p=b.
|
|
478
|
-
function Xl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof Ok&&d.Ca(a.l.presentationTimeline.Bb());e=Math.max(a.h.bufferBehind*a.B,a.l.presentationTimeline.g);f=Rj(a.g.X,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():E(k,a.g.X.remove(b.type,f,f+h),2)}if(4!=k.g)return Bg(a.m),a.C?E(k,Xl(a,a.C,c),4):k.u(0);Bg(a.m);
|
|
476
|
+
u.reader.O(),D=u.reader.Hc()/y+e.timestampOffset,C=D-e.startTime,z=u.reader.O(),B=u.reader.O(),w=u.reader.hc(),A=u.reader.hc();u=u.reader.mb(u.reader.getLength()-u.reader.ra());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.ni():(v=D+z/y,y=(new Map).set("detail",{startTime:D,endTime:v,schemeIdUri:w,value:A,timescale:y,presentationTimeDelta:C,eventDuration:z,id:B,messageData:u}),y=new U("emsg",y),y.cancelable=!0,a.g.onEvent(y),y.defaultPrevented||"https://aomedia.org/emsg/ID3"!=
|
|
477
|
+
w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=Vi(u),w.length&&a.g.Yd([{cueTime:D,data:u,frames:w,dts:D,pts:D}],0,v)))});n&&l.R("prft",function(u){if(!a.H&&e.ea.timescale){var v=u.reader,w=u.version;v.O();u=v.O();var A=v.O();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.O():(w=v.O(),v=v.O(),v=w*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.ea.timescale*1E3)});v=new U("prft",
|
|
478
|
+
v);a.g.onEvent(v);a.H=!0}});(m||n)&&l.parse(f);return E(q,Xl(a,b,c),2);case 2:return Bg(a.m),p=b.Jc,b.Jc=!1,E(q,a.g.Zf(b.type,f),3);case 3:return E(q,Wj(a.g.X,b.type,f,e,d,k,p,h,g),4);case 4:Bg(a.m),G(q)}})}
|
|
479
|
+
function Xl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof Ok&&d.Ca(a.l.presentationTimeline.Bb());e=Math.max(a.h.bufferBehind*a.B,a.l.presentationTimeline.g);f=Rj(a.g.X,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():E(k,a.g.X.remove(b.type,f,f+h),2)}if(4!=k.g)return Bg(a.m),a.C?E(k,Xl(a,a.C,c),4):k.u(0);Bg(a.m);G(k)})}
|
|
479
480
|
function Ol(a){return a&&a.type==Ud&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
480
|
-
function Ul(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c
|
|
481
|
+
function Ul(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.$b())return l.return(e);f=null;if(b.T){var m=b.T,n=m.h;c instanceof Bi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Jf=d),f=m.Zd):f=null}f||(f=Kl(c,b.stream,d||null,a.h.retryParameters,a.g.Eb));g=0;b.ca&&(g=b.ca.h);b.eb=f;return E(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Wl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
481
482
|
function Kl(a,b,c,d,e){var f=a instanceof Gi?a:void 0,g=f?1:0;a=pl(a.M(),a.Da,a.pa,d,c);a.contentType=b.type;return e.request(wg,a,{type:g,stream:b,segment:f})}
|
|
482
|
-
function Hl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.
|
|
483
|
-
function Al(a,b,c){var d=b.type;if(d!=Ud||a.i.has(d))b.pb=(new Qc(function(){var e;return O(function(f){if(1==f.g)return wa(f,2),E(f,Ll(a,b),4);if(2!=f.g)return ya(f,0);e=za(f);if(a.g)a.g.onError(e);
|
|
484
|
-
function Nl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Yf(a.L),2);Bg(a.m);if(1===c.category&&1003!=c.code){if(b.
|
|
485
|
-
function Zl(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.W))e.
|
|
483
|
+
function Hl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Sb=!1,b.oe=!1,b.vd=0,b.Oc=!0,b.Ma=null,b.ca=null,b.T&&!a.o.has(b.stream)&&hl(b.T),d?(e=a.g.Xc(),f=a.g.X.getDuration(),E(g,a.g.X.remove(b.type,e+d,f),3)):E(g,ek(a.g.X,b.type),4);if(3!=g.g)return Bg(a.m),c?E(g,a.g.X.flush(b.type),3):g.u(3);Bg(a.m);b.Oc=!1;b.endOfStream=!1;b.Ia||b.pb||Al(a,b,0);G(g)})}
|
|
484
|
+
function Al(a,b,c){var d=b.type;if(d!=Ud||a.i.has(d))b.pb=(new Qc(function(){var e;return O(function(f){if(1==f.g)return wa(f,2),E(f,Ll(a,b),4);if(2!=f.g)return ya(f,0);e=za(f);if(a.g)a.g.onError(e);G(f)})})).Y(c)}function sl(a){null!=a.pb&&(a.pb.stop(),a.pb=null)}function tl(a){return O(function(b){return a.eb?E(b,a.eb.abort(),0):b.u(0)})}
|
|
485
|
+
function Nl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Yf(a.L),2);Bg(a.m);if(1===c.category&&1003!=c.code){if(b.Ob)return Cl(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.xd(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);G(e)})}
|
|
486
|
+
function Zl(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.W))e.Bc=null,Jl(a,e),tl(e).catch(function(){}),e.ca&&e.ca.vf();if(f=a.i.get(d.ga))f.Bc=null,Jl(a,f),tl(f).catch(function(){}),f.ca&&f.ca.vf();g=new Map;a.j.audio&&g.set(d.W,a.j.audio);a.j.video&&g.set(d.ga,a.j.video);return E(h,nk(a.g.X,g),2)}return h.return(!0)})}
|
|
486
487
|
function Yl(a,b){if(a.J.projection!=b.projection||a.J.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.J=b}};function $l(){}
|
|
487
488
|
function am(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=He(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=He(n)),m=am(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Za("Invalid config, wrong type for "+m),
|
|
488
489
|
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&$a("Unexpected number of arguments for "+m),a[l]=b[l]):(Za("Invalid config, unrecognized key "+m),k=!1)}return k}function bm(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function cm(a,b){return a&&b}
|
|
@@ -507,213 +508,213 @@ minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,max
|
|
|
507
508
|
logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(nm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
508
509
|
function om(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 am(a,b,c||km(),d,"")}
|
|
509
510
|
function nm(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=Ge(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return ze(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-
|
|
510
|
-
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 lm(a){return cm([a],a)}function mm(a){return cm([a],a)}S("shaka.util.PlayerConfiguration",jm);jm.mergeConfigObjects=om;jm.createDefault=km;function pm(a,b,c,d,e){ig.call(this);this.K=a;this.P=b;this.Ba=e.networkingEngine;this.U=d;this.o=null;this.rb=c;this.
|
|
511
|
-
function qm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function rm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function sm(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=pm.prototype;r.getStartTime=function(){return this.U};r.xc=function(){return this.K};r.Qe=function(){return this.h};function tm(a){a.aa=!0;return a.i}function um(a){a.
|
|
512
|
-
function wm(a){a.ba=!0;return a.l}function xm(a){a.
|
|
513
|
-
r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return wa(c,3),E(c,ym(a),5);case 5:return zm(a),a.
|
|
514
|
-
if(a.Ea){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ka){d=a.h.presentationTimeline.V();var e=wf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.
|
|
511
|
+
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 lm(a){return cm([a],a)}function mm(a){return cm([a],a)}S("shaka.util.PlayerConfiguration",jm);jm.mergeConfigObjects=om;jm.createDefault=km;function pm(a,b,c,d,e){ig.call(this);this.K=a;this.P=b;this.Ba=e.networkingEngine;this.U=d;this.o=null;this.rb=c;this.va=0;this.hb=e.sc;this.B=e.hi;this.qb=e.ii;this.g=e.config;this.j=this.C=this.h=null;this.la=!1;this.F=e.si;this.oa=!1;this.l=null;this.ba=!1;this.i=this.A=null;this.aa=!1;this.J=new Map;this.ua=!1;this.Fa=e.ri;this.$=new Yk;this.fa=new Zf;this.m=new Zf;this.L=null;this.s=!1;this.Ka=e.kh;this.ma=null;this.Ea=e.jh;this.N=!1;this.H=[];this.G=[]}ra(pm,ig);
|
|
512
|
+
function qm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function rm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function sm(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=pm.prototype;r.getStartTime=function(){return this.U};r.xc=function(){return this.K};r.Qe=function(){return this.h};function tm(a){a.aa=!0;return a.i}function um(a){a.la=!0;return a.j}function vm(a){a.oa=!0;return a.F}r.getStats=function(){return this.$};
|
|
513
|
+
function wm(a){a.ba=!0;return a.l}function xm(a){a.ua=!0;return a.J}
|
|
514
|
+
r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return wa(c,3),E(c,ym(a),5);case 5:return zm(a),a.fa.resolve(),E(c,Am(a),6);case 6:zm(a);a.o||(a.o=new Jf(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));
|
|
515
|
+
if(a.Ea){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ka){d=a.h.presentationTimeline.V();var e=wf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ma=e,e.video&&Bm(a,e.video,d),e.audio&&Bm(a,e.audio,d)}return E(c,void 0,7);case 7:zm(a);a.m.resolve();ya(c,0);break;case 3:b=za(c),a.m.reject(b),G(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):ig.prototype.dispatchEvent.call(this,a)};
|
|
515
516
|
r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function zm(a){if(a.s)throw new T(2,7,7003);}function Cm(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
|
|
516
|
-
function ym(a){var b,c,d,e;return O(function(f){if(1==f.g)return Cm(a,"manifest-parser"),a.j||(a.C=vi(a.K,a.P),a.j=a.C(),a.j.configure(a.g.manifest)),b=Date.now()/1E3,Cm(a,"manifest"),a.h?f.u(2):E(f,a.j.start(a.K,a.qb),3);2!=f.g&&(a.h=f.h);c=new U("manifestparsed",void 0);a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);Dm(a.h);d=Date.now()/1E3;e=d-b;a.$.F=e;
|
|
517
|
-
function Am(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Cm(a,"drm-engine");a.
|
|
518
|
-
Promise.resolve(),7);case 7:a.dispatchEvent(f),
|
|
519
|
-
function Bm(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 Zk(d,b,function(l,m,n){return Kl(l,m,n||null,a.g.streaming.retryParameters,a.Ba)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.U||0;(h=(g=b.segmentIndex.Ab(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.
|
|
520
|
-
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.
|
|
521
|
-
function Dm(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",pm);pm.prototype.destroy=pm.prototype.destroy;pm.prototype.waitForFinish=pm.prototype.
|
|
522
|
-
"regionremove",function(d){c.g.delete(d.region)})}ra(Em,ig);Em.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ig.prototype.release.call(this)};Em.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?Hm:a>d.endTime?Im:Fm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.pc==e&&h.oc==f&&h.
|
|
517
|
+
function ym(a){var b,c,d,e;return O(function(f){if(1==f.g)return Cm(a,"manifest-parser"),a.j||(a.C=vi(a.K,a.P),a.j=a.C(),a.j.configure(a.g.manifest)),b=Date.now()/1E3,Cm(a,"manifest"),a.h?f.u(2):E(f,a.j.start(a.K,a.qb),3);2!=f.g&&(a.h=f.h);c=new U("manifestparsed",void 0);a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);Dm(a.h);d=Date.now()/1E3;e=d-b;a.$.F=e;G(f)})}
|
|
518
|
+
function Am(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Cm(a,"drm-engine");a.va=Date.now()/1E3;a.l=a.hb();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Oe(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return E(g,Promise.resolve(),3);case 3:zm(a),a.dispatchEvent(c);case 2:return d=wf(a.h.variants),E(g,Lh(a.l,d,a.h.offlineSessionIds),4);case 4:return zm(a),E(g,pi(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return E(g,
|
|
519
|
+
Promise.resolve(),7);case 7:a.dispatchEvent(f),G(g)}})}r.configure=function(a,b){a=bm(a,b);om(this.g,a)};r.getConfiguration=function(){return He(this.g)};
|
|
520
|
+
function Bm(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 Zk(d,b,function(l,m,n){return Kl(l,m,n||null,a.g.streaming.retryParameters,a.Ba)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.U||0;(h=(g=b.segmentIndex.Ab(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ea&&bl(e,h.ea):al(e,h.startTime));G(k)})}r.Ti=function(){return this.m};
|
|
521
|
+
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.la){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return E(e,a.i.stop(),4);case 4:a.F&&!a.oa&&a.F.release();if(!a.l||a.ba){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.ua)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,hl(d);G(e)}})};
|
|
522
|
+
function Dm(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",pm);pm.prototype.destroy=pm.prototype.destroy;pm.prototype.waitForFinish=pm.prototype.Ti;function Em(a,b){ig.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{pc:null,oc:Fm,dc:function(d,e){return Gm(c,"enter",d,e)}},{pc:Hm,oc:Fm,dc:function(d,e){return Gm(c,"enter",d,e)}},{pc:Im,oc:Fm,dc:function(d,e){return Gm(c,"enter",d,e)}},{pc:Fm,oc:Hm,dc:function(d,e){return Gm(c,"exit",d,e)}},{pc:Fm,oc:Im,dc:function(d,e){return Gm(c,"exit",d,e)}},{pc:Hm,oc:Im,dc:function(d,e){return Gm(c,"skip",d,e)}},{pc:Im,oc:Hm,dc:function(d,e){return Gm(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
|
|
523
|
+
"regionremove",function(d){c.g.delete(d.region)})}ra(Em,ig);Em.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ig.prototype.release.call(this)};Em.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?Hm:a>d.endTime?Im:Fm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.pc==e&&h.oc==f&&h.dc(d,b)}}};
|
|
523
524
|
function Gm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hm=1,Fm=2,Im=3;function Jm(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new sc(a)).Na.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Km[d])return m.return(e);f=0;g=qg([a],c);wa(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ya(m,3);break;case 2:k=za(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
524
525
|
e.toLowerCase().split(";").shift():"")}})}
|
|
525
526
|
var Km={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa",
|
|
526
|
-
jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function Lm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Lm(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=
|
|
527
|
+
jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function Lm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Lm(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Mm(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Mm(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);
|
|
527
528
|
h=k.next().value;k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
528
|
-
function
|
|
529
|
-
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function
|
|
530
|
-
function
|
|
529
|
+
function Mm(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
530
|
+
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Nm(a,b){var c=[];a=t(Om(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(Nm(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Lm(d,b);c.push(e)}return c}
|
|
531
|
+
function Om(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={xe:void 0},c=a.next())d.xe=c.value,b.some(function(e){return function(f){return cc(e.xe,f)}}(d))||b.push(d.xe);return b}
|
|
531
532
|
function dn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
|
|
532
533
|
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function en(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=en.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;fn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
533
|
-
r.append=function(a){var b=
|
|
534
|
+
r.append=function(a){var b=Nm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={Ac:void 0},d=b.next())e.Ac=d.value,!a.some(function(f){return function(g){return g.startTime==f.Ac.startTime&&g.endTime==f.Ac.endTime&&g.text==f.Ac.payload?!0:!1}}(e))&&e.Ac.payload&&(d=dn(e.Ac))&&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):
|
|
534
535
|
c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};r.destroy=function(){this.g&&(fn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
535
536
|
function fn(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",en);en.prototype.setTextVisibility=en.prototype.setTextVisibility;en.prototype.isTextVisible=en.prototype.isTextVisible;en.prototype.destroy=en.prototype.destroy;en.prototype.append=en.prototype.append;en.prototype.remove=en.prototype.remove;en.prototype.configure=en.prototype.configure;function gn(){}r=gn.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",gn);gn.prototype.setTextVisibility=gn.prototype.setTextVisibility;gn.prototype.isTextVisible=gn.prototype.isTextVisible;gn.prototype.destroy=gn.prototype.destroy;gn.prototype.append=gn.prototype.append;gn.prototype.remove=gn.prototype.remove;gn.prototype.configure=gn.prototype.configure;function hn(){}function jn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",hn);hn.removeAllChildren=jn;function kn(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||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Sc(function(){d.A.paused||
|
|
536
537
|
ln(d)})).Va(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new hb;this.j.D(document,"fullscreenchange",function(){ln(d,!0)});this.j.D(this.A,"seeking",function(){ln(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){ln(d,!0)}),this.o.observe(this.g));this.B=new Map}r=kn.prototype;r.configure=function(a){this.C&&this.C.Va(a.captionsUpdatePeriod)};
|
|
537
|
-
r.append=function(a){var b=[].concat(x(this.h));a=t(
|
|
538
|
+
r.append=function(a){var b=[].concat(x(this.h));a=t(Om(a));for(var c=a.next(),d={};!c.done;d={ye:void 0},c=a.next())d.ye=c.value,b.some(function(e){return function(f){return cc(f,e.ye)}}(d))||this.h.push(d.ye);ln(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
538
539
|
r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});ln(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function mn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
539
|
-
function nn(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
|
|
540
|
+
function nn(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.ah:null;l&&(g.push(l.ze),l.jc&&g.push(l.jc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?mn(a,n)||(f=!0):(on(a,k,e),l=a.i.get(k),n=l.ah,f=!0));0<k.nestedCues.length&&n&&nn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
|
|
540
541
|
q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.jc?(d.jc.contains(c)&&d.jc.removeChild(c),c.appendChild(d.jc),d.jc.appendChild(d.ze)):c.appendChild(d.ze)}}function ln(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())jn(d.value);jn(a.g);a.i.clear();a.B.clear()}a.m&&nn(a,a.h,a.g,c,[])}}
|
|
541
542
|
function on(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&pn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Lb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Lb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Lb?"%":"px",l=g.widthUnits==
|
|
542
543
|
Lb?"%":"px",m=g.viewportAnchorUnits==Lb?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.l===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
|
|
543
544
|
g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*p/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
|
|
544
|
-
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{ze:f
|
|
545
|
+
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{ze:f,ah:e,jc:c})}
|
|
545
546
|
function qn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sb?c:"left"===a||"start"===a&&b===Ub||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ub?"line-right":"center"}
|
|
546
547
|
function pn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=rn(c.linePadding,c,a.s);f.paddingRight=rn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
547
548
|
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=sn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-
|
|
548
549
|
1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;
|
|
549
|
-
f.fontSize=rn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Xb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==
|
|
550
|
-
a=qn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==
|
|
551
|
-
c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==
|
|
550
|
+
f.fontSize=rn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Xb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Wb?(f.width="100%",c.lineAlign==Yb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Yb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Yb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;
|
|
551
|
+
a=qn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Wb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Wb?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Wb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=
|
|
552
|
+
c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Wb?f.width=c.size+"%":f.height=c.size+"%")}
|
|
552
553
|
function rn(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 sn(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",kn);kn.prototype.setTextVisibility=kn.prototype.setTextVisibility;
|
|
553
|
-
kn.prototype.isTextVisible=kn.prototype.isTextVisible;kn.prototype.remove=kn.prototype.remove;kn.prototype.destroy=kn.prototype.destroy;kn.prototype.append=kn.prototype.append;kn.prototype.configure=kn.prototype.configure;function tn(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=
|
|
554
|
+
kn.prototype.isTextVisible=kn.prototype.isTextVisible;kn.prototype.remove=kn.prototype.remove;kn.prototype.destroy=kn.prototype.destroy;kn.prototype.append=kn.prototype.append;kn.prototype.configure=kn.prototype.configure;function tn(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=Nm(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");
|
|
554
555
|
break;case "right":g.push("align:right");break;case Tb: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 un(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}un.prototype.configure=function(a){this.g=a};function vn(a){a.i=!1;a.l=!0;a.j=!1}
|
|
555
556
|
function wn(a,b,c){try{if(!a.g.enabled)return b;var d=xn(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=yn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=zn;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=An;break a}e=void 0}d.ot=e;d.su=
|
|
556
557
|
!0;var f=Bn(d);return Cn(b,f)}catch(g){return ab("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function xn(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}}
|
|
557
558
|
function Dn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,xn(a));c.pr=a.h.Za();var e=c.ot===En||c.ot===zn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Fn(a,c);if(d)d=Gn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=Bn(a);f&&(b.uris=b.uris.map(function(g){return Cn(g,f)}))}}}function Fn(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}
|
|
558
559
|
function Hn(a){if(0===a.type)return In;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?zn:En;if("audio"==b)return yn;if("text"==b)return"application/mp4"===a.mimeType?Jn:Kn}}function Ln(a,b){b=a.h.ub()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
559
|
-
function Mn(a,b){b=a.h.ub()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Nn(a,b){var c=a.h.
|
|
560
|
+
function Mn(a,b){b=a.h.ub()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Nn(a,b){var c=a.h.cc();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case En:return a.videoBandwidth||NaN;case yn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
560
561
|
function Bn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
561
562
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Gn(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=Bn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
562
|
-
function Cn(a,b){if(!b||a.includes("offline:"))return a;a=new sc(a);a.g.set("CMCD",b);return a.toString()}var An="m",yn="a",En="v",zn="av",In="i",Kn="c",Jn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",
|
|
563
|
-
r.getBandwidthEstimate=function(a){var b=this.
|
|
564
|
-
On.prototype.getMaxBitrate=On.prototype.
|
|
565
|
-
this.
|
|
566
|
-
this.G=Zn(this);this.G.
|
|
567
|
-
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return g.return();c.
|
|
568
|
-
this.qc(a,!0))}ra(X,ig);function co(a){null!=a.K&&(Fj(a.K),a.K.release(),a.K=null)}function eo(a,b){b.lcevc.enabled?(co(a),null==a.K&&(a.K=new Ej(a.h,a.
|
|
569
|
-
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==go)return g.return();co(a);b=a.detach();a.l=go;return E(g,b,2);case 2:c=[];d=t(a.
|
|
570
|
-
null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),ig.prototype.release.call(a),
|
|
571
|
-
r.qc=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==go)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,io(c,"attach"),4);case 4:if(g.h)return g.return();wa(g,5,6);d||(ho(c,"attach"),e=function(){var h=jo(c,!1);h&&ko(c,h)},c.
|
|
572
|
-
}})};r.
|
|
573
|
-
r.mc=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(q){switch(q.g){case 1:return c.l!=go&&(c.l=Wn),E(q,io(c,"unload"),2);case 2:if(q.h)return q.return();xa(q,3);c.Ka=!1;ho(c,"unload");a&&!Tc()&&(a=!1);co(c);d=c.
|
|
574
|
-
if(!c.J){q.u(6);break}return E(q,c.J.stop(),7);case 7:c.J=null,c.Fa=null;case 6:if(!c.o){q.u(8);break}return E(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return E(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.F&&(c.F.release(),c.F=null);if(!pd("webkit")||!c.A){q.u(12);break}return E(q,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.C){q.u(14);break}return E(q,c.C.destroy(),15);case 15:c.C=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.
|
|
575
|
-
null);b||c.
|
|
576
|
-
m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(af={},Oc.clear());c.i=null;c.s=new Yk;c.
|
|
563
|
+
function Cn(a,b){if(!b||a.includes("offline:"))return a;a=new sc(a);a.g.set("CMCD",b);return a.toString()}var An="m",yn="a",En="v",zn="av",In="i",Kn="c",Jn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",wj:"s",OTHER:"o"});function On(a){this.h=a;this.g=null}r=On.prototype;r.configure=function(a){this.h=a};r.mg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Pn)?1E3*this.g.get(Pn):null};r.lg=function(){return this.h.enabled&&this.g&&this.g.has(Qn)?1E3*this.g.get(Qn):null};r.Mh=function(){return this.h.enabled&&this.g&&this.g.has(Rn)?this.g.get(Rn):null};r.Nh=function(){return this.h.enabled&&this.g&&this.g.has(Sn)?this.g.get(Sn):null};
|
|
564
|
+
r.getBandwidthEstimate=function(a){var b=this.lg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Tn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",On);On.prototype.getBandwidthEstimate=On.prototype.getBandwidthEstimate;On.prototype.getRoundTripTime=On.prototype.Nh;On.prototype.getResponseDelay=On.prototype.Mh;On.prototype.getEstimatedThroughput=On.prototype.lg;
|
|
565
|
+
On.prototype.getMaxBitrate=On.prototype.mg;var Qn="etp",Pn="mb",Rn="rd",Sn="rtt";function Un(){this.g=null;this.h=[]}function Vn(a,b){return O(function(c){if(1==c.g)return a.g?E(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;G(c)})}Un.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ig.call(this);var c=this;this.l=Wn;this.Kd=this.h=null;this.fa=!1;this.ae=new hb;this.Tc=new hb;this.m=new hb;this.Ba=new hb;this.Sc=new hb;this.F=this.C=this.A=this.G=null;this.ce=0;this.U=new Un;this.la=this.qf=this.$=this.i=this.Fa=this.J=this.j=this.qb=this.K=this.bh=this.aa=this.N=this.rb=this.L=this.Nd=this.H=this.hb=null;this.Ka=!1;this.ua=this.o=null;this.Pf=1E9;this.ed=[];this.P=NaN;this.g=Xn(this);this.ba={width:Infinity,height:Infinity};this.Id=new oi(this.g,this.ba,null);
|
|
566
|
+
this.xf=[];this.s=null;this.va=new Jf(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.Ea=this.g.preferredTextLanguage;this.bd=this.g.preferredTextRole;this.Zc=this.g.preferForcedSubs;this.Uc=[];b&&b(this);this.N=Yn(this);this.aa=new On(this.g.cmsd);
|
|
567
|
+
this.G=Zn(this);this.G.Ef(this.g.streaming.forceHTTP);this.G.Ff(this.g.streaming.forceHTTPS);this.Tf=this.ma=this.B=null;this.Sf=new Sc(function(){return O(function(d){if(1==d.g)return c.ma?E(d,c.qc(c.Tf,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.ma),4);c.Tf.play();c.ma=null;G(d)})});$n&&(this.B=$n(),this.B.configure(this.g.ads),this.Sc.D(this.B,"ad-started",function(d){var e,f;return O(function(g){if(1==g.g){if(c.g.ads.supportsMultipleMediaElements)return g.return();e=d.originalEvent;if(!e)return g.return();
|
|
568
|
+
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return g.return();c.Sf.stop();if(c.ma)return g.u(0);c.Tf=c.h;return E(g,c.eg(!0),3)}c.ma=g.h;G(g)})}),this.Sc.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Sf.Y(.1)}));this.ae.D(window,"online",function(){ao(c);c.wf()});this.Td=new Sc(function(){return bo(c)});this.oa=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
|
|
569
|
+
this.qc(a,!0))}ra(X,ig);function co(a){null!=a.K&&(Fj(a.K),a.K.release(),a.K=null)}function eo(a,b){b.lcevc.enabled?(co(a),null==a.K&&(a.K=new Ej(a.h,a.bh,b.lcevc),a.C&&(a.C.U=a.K))):co(a)}function fo(a,b){return new U(a,b)}r=X.prototype;
|
|
570
|
+
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==go)return g.return();co(a);b=a.detach();a.l=go;return E(g,b,2);case 2:c=[];d=t(a.xf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.xf=[];return E(g,Promise.all(c),3);case 3:a.ae&&(a.ae.release(),a.ae=null);a.Tc&&(a.Tc.release(),a.Tc=null);a.m&&(a.m.release(),a.m=null);a.Ba&&(a.Ba.release(),a.Ba=null);a.Sc&&(a.Sc.release(),a.Sc=null);a.ua=null;a.g=null;a.s=null;a.Kd=null;a.N=null;a.aa=
|
|
571
|
+
null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),ig.prototype.release.call(a),G(g)}})};function ho(a,b){a.dispatchEvent(fo("onstatechange",(new Map).set("state",b)))}
|
|
572
|
+
r.qc=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==go)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,io(c,"attach"),4);case 4:if(g.h)return g.return();wa(g,5,6);d||(ho(c,"attach"),e=function(){var h=jo(c,!1);h&&ko(c,h)},c.Tc.D(a,"error",e),c.h=a);if(!b||!Tc()||c.C){g.u(6);break}return E(g,lo(c),6);case 6:Ba(g);c.U.release();Ca(g,0);break;case 5:return f=za(g),E(g,c.detach(),10);case 10:throw f;
|
|
573
|
+
}})};r.lh=function(a){this.bh=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==go)throw new T(2,7,7E3);return E(c,b.mc(!1,a),2)}if(3!=c.g)return E(c,io(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Tc.nb(),b.h=null),ho(b,"detach"),b.B&&!a&&b.B.release()}finally{b.U.release()}G(c)})};function io(a,b){var c;return O(function(d){return 1==d.g?(c=++a.ce,E(d,Vn(a.U,b),2)):c!=a.ce?(a.U.release(),d.return(!0)):d.return(!1)})}
|
|
574
|
+
r.mc=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(q){switch(q.g){case 1:return c.l!=go&&(c.l=Wn),E(q,io(c,"unload"),2);case 2:if(q.h)return q.return();xa(q,3);c.Ka=!1;ho(c,"unload");a&&!Tc()&&(a=!1);co(c);d=c.Uc.map(function(u){return u()});c.Uc=[];return E(q,Promise.all(d),5);case 5:c.dispatchEvent(fo("unloading"));c.rb&&(c.rb.release(),c.rb=null);c.h&&(c.m.nb(),c.Ba.nb());c.Td.stop();c.hb&&(c.hb.release(),c.hb=null);c.Nd&&(c.Nd.stop(),c.Nd=null);
|
|
575
|
+
if(!c.J){q.u(6);break}return E(q,c.J.stop(),7);case 7:c.J=null,c.Fa=null;case 6:if(!c.o){q.u(8);break}return E(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return E(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.F&&(c.F.release(),c.F=null);if(!pd("webkit")||!c.A){q.u(12);break}return E(q,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.C){q.u(14);break}return E(q,c.C.destroy(),15);case 15:c.C=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.ma&&!b&&(c.ma.destroy(),c.ma=
|
|
576
|
+
null);b||c.Sf.stop();c.N&&vn(c.N);c.aa&&(c.aa.g=null);c.h&&jn(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.A){q.u(16);break}return E(q,c.A.destroy(),17);case 17:c.A=null;case 16:c.oa&&c.$!=c.oa.xc()&&(c.oa.s||c.oa.destroy(),c.oa=null);c.$=null;c.qf=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=
|
|
577
|
+
m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(af={},Oc.clear());c.i=null;c.s=new Yk;c.Lf=null;c.ed=[];c.P=NaN;mo(c);case 3:Ba(q);c.U.release();Ca(q,4);break;case 4:if(a&&Tc()&&!c.C)return E(q,lo(c),0);q.u(0)}})};r.Si=function(a){this.la=a};
|
|
577
578
|
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==go)throw new T(2,7,7E3);e=null;f="";a instanceof pm?(e=a,f=e.xc()||""):f=a||"";return E(A,Vn(d.U,"load"),2);case 2:d.U.release();if(!d.h)throw new T(2,7,7002);if(!d.$){A.u(3);break}d.$=f;return E(A,d.mc(!1),3);case 3:g=++d.ce;h=function(){return O(function(y){if(1==y.g)return d.ce==g?y.u(0):e?E(y,e.destroy(),3):y.u(3);throw new T(2,7,7E3);})};k=function(y,C){return O(function(z){switch(z.g){case 1:return xa(z,
|
|
578
|
-
2),E(z,Vn(d.U,C),4);case 4:return E(z,h(),5);case 5:return E(z,y(),6);case 6:return E(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ba(z),d.U.release(),Ca(z,0)}})};wa(A,5,6);null==b&&e&&(b=e.getStartTime());d.
|
|
579
|
-
A.h)?(sm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Yk;case 11:return m=!e,n=e?e.rb:Date.now()/1E3,d.s=e?e.getStats():new Yk,d.$=f,d.qf=c||null,m?E(A,k(function(){return O(function(y){return E(y,po(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):E(A,k(function(){return O(function(y){return E(y,Promise.race([e.
|
|
580
|
-
16);case 16:return E(A,k(function(){return O(function(y){return E(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Id=e.B;d.rb=vm(e);d.qb=e.Fa;if(p=e.o)d.
|
|
581
|
-
"Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=xm(e),v=e.
|
|
579
|
+
2),E(z,Vn(d.U,C),4);case 4:return E(z,h(),5);case 5:return E(z,y(),6);case 6:return E(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ba(z),d.U.release(),Ca(z,0)}})};wa(A,5,6);null==b&&e&&(b=e.getStartTime());d.la=b;d.Ka=!1;d.dispatchEvent(fo("loading"));if(e){c=e.P;A.u(8);break}if(c){A.u(8);break}return E(A,k(function(){return O(function(y){if(1==y.g)return E(y,no(d,f),2);c=y.h;G(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){sm(e,d);d.s=e.getStats();A.u(11);break}return E(A,oo(d,f,b,c,!0),12);case 12:(e=
|
|
580
|
+
A.h)?(sm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Yk;case 11:return m=!e,n=e?e.rb:Date.now()/1E3,d.s=e?e.getStats():new Yk,d.$=f,d.qf=c||null,m?E(A,k(function(){return O(function(y){return E(y,po(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):E(A,k(function(){return O(function(y){return E(y,Promise.race([e.fa,e.m]),0)})},"waitForFinish"),15);case 15:d.Fa=e.C;d.J=um(e);d.i=e.Qe();if(d.C){A.u(16);break}return E(A,k(function(){return O(function(y){return E(y,lo(d),0)})},"initializeMediaSourceEngineInner_"),
|
|
581
|
+
16);case 16:return E(A,k(function(){return O(function(y){return E(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Id=e.B;d.rb=vm(e);d.qb=e.Fa;if(p=e.o)d.va=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(qo(d),d.configure("manifest.disableVideo",!0));d.A=wm(e);return E(A,k(function(){return O(function(y){return E(y,d.A.qc(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(q=e.A)||d.ua&&d.ua==q||(d.o=tm(e),d.ua=e.A,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement",
|
|
582
|
+
"Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=xm(e),v=e.ma,E(A,k(function(){return O(function(y){return E(y,
|
|
582
583
|
ro(d,n,v,u),0)})},"loadInner_"),20);case 20:rm(e);A.u(14);break;case 21:return E(A,k(function(){return O(function(y){return E(y,so(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(fo("loaded"));case 6:Ba(A);if(!e){A.u(23);break}return E(A,e.destroy(),23);case 23:d.oa=null;Ca(A,0);break;case 5:w=za(A);if(!w||7E3==w.code){A.u(25);break}return E(A,d.mc(!1),25);case 25:throw w;}})};
|
|
583
|
-
function qo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}r.
|
|
584
|
-
r.
|
|
585
|
-
function to(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Fa&&a.$))return e.u(2);c=a.h.currentTime;a.V()&&(c=null);d=Date.now()/1E3;return E(e,uo(a,a.$,c,a.qf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Fa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.
|
|
586
|
-
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,oo(d,a,b,c),2);(e=f.h)?e.start():ko(d,new T(2,7,7005));return f.return(e)})};function oo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):E(l,no(a,b),3);2!=l.g&&(d=l.h);if(g=vo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.
|
|
587
|
-
function uo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,p,q,u,v,w,A,y,C,z,B,D;return O(function(
|
|
588
|
-
filter:function(
|
|
589
|
-
new U("regionadd",new Map([["region",
|
|
590
|
-
(new Map).set("isLive",a.V());k.dispatchEvent(fo("manifestupdated",
|
|
591
|
-
|
|
592
|
-
var
|
|
593
|
-
!ti.includes(Q)}P!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(yo(a),!zo(a)))break a;(
|
|
594
|
-
|
|
584
|
+
function qo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}r.Oi=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?E(e,to(c),2):3!=e.g?(d=e.h,E(e,c.mc(a,b),3)):e.return(d)})};
|
|
585
|
+
r.eg=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,to(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
|
|
586
|
+
function to(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Fa&&a.$))return e.u(2);c=a.h.currentTime;a.V()&&(c=null);d=Date.now()/1E3;return E(e,uo(a,a.$,c,a.qf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Fa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.ua;f.i=a.o;f.A=g;b.o=a.va;b.start();a.i=null;a.J=null;a.Fa=null;a.o=null;a.ua=null}return e.return(b)})}
|
|
587
|
+
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,oo(d,a,b,c),2);(e=f.h)?e.start():ko(d,new T(2,7,7005));return f.return(e)})};function oo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):E(l,no(a,b),3);2!=l.g&&(d=l.h);if(g=vo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.ua==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(uo(a,b,c,d||null,f,!e,h,k))})}
|
|
588
|
+
function uo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,p,q,u,v,w,A,y,C,z,B,D;return O(function(J){if(1==J.g)return k=null,l=He(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.N&&k.s?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(H,K){m()?k.configure(H,K):a.configure(H,K)},Infinity!=a.ba.width||Infinity!=a.ba.height?J.u(2):E(J,ud(),3);2!=J.g&&(q=J.h,a.ba.width=q.width,a.ba.height=q.height);u=new oi(l,a.ba,null);v={networkingEngine:a.G,
|
|
589
|
+
filter:function(H){var K,I;return O(function(F){if(1==F.g)return E(F,pi(u,H),2);if(4!=F.g){K=F.h;if(!K)return F.u(0);I=fo("trackschanged");return E(F,Promise.resolve(),4)}k.dispatchEvent(I);G(F)})},makeTextStreamsForClosedCaptions:function(H){return wo(a,H)},onTimelineRegionAdded:function(H){var K=k.F;a:{var I=t(K.g);for(var F=I.next();!F.done;F=I.next())if(F=F.value,F.schemeIdUri==H.schemeIdUri&&F.id==H.id&&F.startTime==H.startTime&&F.endTime==H.endTime){I=F;break a}I=null}null==I&&(K.g.add(H),H=
|
|
590
|
+
new U("regionadd",new Map([["region",H]])),K.dispatchEvent(H))},onEvent:function(H){return k.dispatchEvent(H)},onError:function(H){return k.onError(H)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){p("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.N&&a.j.updateDuration()},newDrmInfo:function(H){var K=k.l,I=K?K.g:null;I&&K.A&&ri(u,I.keySystem,H)},onManifestUpdated:function(){var H=
|
|
591
|
+
(new Map).set("isLive",a.V());k.dispatchEvent(fo("manifestupdated",H));qm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new kl(function(){return a.Pb()});w.addEventListener("regionadd",function(H){var K=H.region;xo(a,"timelineregionadded",K,k);qm(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(K)})});A=null;l.streaming.observeQualityChanges&&(A=new ll(function(){return a.ub()}),A.addEventListener("qualitychange",function(H){var K=
|
|
592
|
+
H.quality;H=H.position;K=(new Map).set("mediaQuality",{bandwidth:K.bandwidth,audioSamplingRate:K.audioSamplingRate,codecs:K.codecs,contentType:K.contentType,frameRate:K.frameRate,height:K.height,mimeType:K.mimeType,channelsCount:K.channelsCount,pixelAspectRatio:K.pixelAspectRatio,width:K.width}).set("position",H);a.dispatchEvent(fo("mediaqualitychanged",K))}));y=!0;C={Eb:a.G,onError:function(H){return k.onError(H)},Xd:function(H){qm(k,!0,function(){a:{var K=H,I=fo("keystatuschanged");a.dispatchEvent(I);
|
|
593
|
+
var F=Object.keys(K);1==F.length&&""==F[0]&&(F=["00"],K={"00":K[""]});I=1==F.length&&"00"==F[0];var M=!1;if(F.length){F=t(a.i.variants);for(var N=F.next();!N.done;N=F.next()){N=N.value;var L=[];N.audio&&L.push(N.audio);N.video&&L.push(N.video);L=t(L);for(var P=L.next();!P.done;P=L.next()){var R=P.value;P=N.allowedByKeySystem;if(R.keyIds.size){N.allowedByKeySystem=!0;R=t(R.keyIds);for(var Q=R.next();!Q.done;Q=R.next())if(Q=Q.value,(Q=K[I?"00":Q])||a.A.F)N.allowedByKeySystem=N.allowedByKeySystem&&!!Q&&
|
|
594
|
+
!ti.includes(Q)}P!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(yo(a),!zo(a)))break a;(K=a.j.j)&&!K.allowedByKeySystem&&Ao(a)}})},onExpirationUpdated:function(H,K){var I=fo("expirationupdated");k.dispatchEvent(I);if((I=k.j)&&I.onExpirationUpdated)I.onExpirationUpdated(H,K)},onEvent:function(H){k.dispatchEvent(H);"drmsessionupdate"==H.type&&y&&(y=!1,H=Date.now()/1E3-k.va,(a.s||k.getStats()).j=H,a.K&&Fj(a.K))}};z=Zn(a,m);pg(a.G,z);B=function(){return a.sc(C)};D={config:l,ii:v,si:w,ri:A,sc:B,hi:u,networkingEngine:z,
|
|
595
|
+
kh:f,jh:h};k=new pm(b,d,e,c,D);a.xf.push(k);return J.return(k)})}function no(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Jm(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&fd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
595
596
|
function vo(a,b){if(!Tc())return!0;if(b){if(""==(a.h||Vc()).canPlayType(b))return!1;if(!(Tc()&&b in wi))return!0;if(ke(b)){if(a.g.streaming.preferNativeHls)return!0;if(fd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(fd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
596
|
-
function lo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return ho(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.
|
|
597
|
-
function ro(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
598
|
-
Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(
|
|
599
|
-
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){
|
|
600
|
-
break}v=a.i.presentationTimeline;w=a.
|
|
601
|
-
zo(a);a.i.variants.some(function(
|
|
602
|
-
a.m.Ib(e,"timeupdate",
|
|
597
|
+
function lo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return ho(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Lf=b,d=Bo(a.h,c,{Dh:function(){return a.keySystem()},Yd:function(h,k,l){Co(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.oa=f,E(g,d.L,2);a.C=d;G(g)})}
|
|
598
|
+
function ro(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K;return O(function(I){switch(I.g){case 1:ho(a,"load");e=a.h;a.H=new Pk({Cd:function(){return e.playbackRate},Xb:function(){return e.defaultPlaybackRate},Gf:function(F){e.playbackRate=F},xg:function(F){e.currentTime+=F}});f=function(){return Do(a)};g=function(){return Eo(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);eo(a,a.g);a.Ea=a.g.preferredTextLanguage;a.bd=a.g.preferredTextRole;a.Zc=a.g.preferForcedSubs;
|
|
599
|
+
Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(F,M,N){a.i&&a.j&&F!=a.j.j&&Go(a,F,!0,void 0===M?!1:M,void 0===N?0:N)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=Ho(a);a.j.configure(a.g.streaming);a.l=Io;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":Jo(a,F)}});a.dispatchEvent(fo("streaming"));h=c;(k=a.j.j)||h||(h=Ko(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(q=
|
|
600
|
+
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){I.u(2);break}return E(I,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);wl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(F){a.F=Lo(a,F);a.hb=Mo(a,F);No(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.la);if(k){I.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){I.u(5);
|
|
601
|
+
break}v=a.i.presentationTimeline;w=a.la||a.h.currentTime;A=v.Bb();y=v.vb();w<A?w=A:w>y&&(w=y);return E(I,Oo(h,w),6);case 6:C=I.h,u(C);case 5:Go(a,h,!0,!1,0);case 4:return a.F.ready(),z=a.yc().find(function(F){return F.active}),z||((B=xf(a.i.textStreams,a.Ea,a.bd,a.Zc)[0]||null)&&Xk(a.s.h,B,!0),h&&(B?(Po(a,h.audio,B)&&(a.fa=!0),a.fa&&a.C.C.setTextVisibility(!0),Qo(a)):a.fa=!1),B&&(a.g.streaming.alwaysStreamText||a.Ze())&&Fl(a.j,B)),E(I,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Ro(a));yo(a);
|
|
602
|
+
zo(a);a.i.variants.some(function(F){return F.primary});if((D=a.V())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)J=function(){return So(a)},a.m.D(e,"timeupdate",J);D||(H=function(){return To(a)},a.m.D(e,"timeupdate",H),To(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(K=function(){var F;return O(function(M){if(1==M.g){F=a.h.duration-a.h.currentTime;if(isNaN(F)||!(F<=a.g.streaming.preloadNextUrlWindow))return M.u(0);
|
|
603
|
+
a.m.Ib(e,"timeupdate",K);return E(M,a.preload(a.i.nextUrl),4)}a.oa=M.h;G(M)})},a.m.D(e,"timeupdate",K)),a.m.D(e,"ended",function(){a.load(a.oa||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(D);a.Ka=!0;a.m.za(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});G(I)}})}
|
|
603
604
|
function po(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.A=a.sc({Eb:a.G,onError:function(k){ko(a,k)},Xd:function(){},onExpirationUpdated:function(){var k=fo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
604
|
-
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.
|
|
605
|
-
g.codecs)),b.startsWith("audio/")?(g.type=c.W,f.audio=g):f.video=g,a.A
|
|
606
|
-
function so(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g)return ho(a,"src-equals"),d=a.h,a.F=new Fk(d),e=!1,a.
|
|
605
|
+
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.ga,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Yd(g.mimeType,
|
|
606
|
+
g.codecs)),b.startsWith("audio/")?(g.type=c.W,f.audio=g):f.video=g,a.A.$=!0,E(h,Lh(a.A,[f],[]),2)):E(h,a.A.qc(a.h),0)})}
|
|
607
|
+
function so(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g)return ho(a,"src-equals"),d=a.h,a.F=new Fk(d),e=!1,a.Uc.push(function(){e=!0}),null!=a.la&&a.F.qe(a.la),a.H=new Pk({Cd:function(){return d.playbackRate},Xb:function(){return d.defaultPlaybackRate},Gf:function(w){d.playbackRate=w},xg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,No(a,d,f),g=function(){return Do(a)},h=function(){return Eo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
607
608
|
"ratechange",h),"none"!=d.preload&&a.m.za(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return yo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return yo(a)}),a.m.D(d.audioTracks,"change",function(){return yo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Uo(a,w);break;case "chapters":Jo(a,w);break;default:yo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return yo(a)}),
|
|
608
609
|
a.m.D(d.textTracks,"change",function(){return yo(a)})),k=wn(a.N,a.$,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),(Zc()||bd())&&d.load(),"none"!=d.preload&&!d.autoplay&&ke(c)&&kd()&&d.load(),a.l=Vo,a.dispatchEvent(fo("streaming")),l=new Zf,wk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.F.ready();
|
|
609
|
-
l.resolve()}),wk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(A){if(1==A.g)return Wo(a),w=Xo(a),w.find(function(y){return"disabled"!=y.mode})?(0<w.length&&(a.
|
|
610
|
-
l.resolve()),a.m.za(d,"error",function(){l.reject(jo(a))}),m=new Promise(function(w,A){(new Sc(A)).Y(a.g.streaming.loadTimeout)}),E(v,Promise.race([l,m]),2);if((n=a.V())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return So(a)},a.m.D(d,"timeupdate",p);n||(q=function(){return To(a)},a.m.D(d,"timeupdate",q),To(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.
|
|
611
|
-
u=w)})));a.Ka=!0;
|
|
612
|
-
function Uo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Zo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Sc(function(){var d=$o(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).lc().Y(.5);a.
|
|
610
|
+
l.resolve()}),wk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(A){if(1==A.g)return Wo(a),w=Xo(a),w.find(function(y){return"disabled"!=y.mode})?(0<w.length&&(a.fa=!0),A.u(2)):E(A,new Promise(function(y){a.m.za(d.textTracks,"change",y);(new Sc(y)).Y(1)}),2);if(e)return A.return();Yo(a);G(A)})}),d.error?l.reject(jo(a)):"none"==d.preload&&($a('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.'),
|
|
611
|
+
l.resolve()),a.m.za(d,"error",function(){l.reject(jo(a))}),m=new Promise(function(w,A){(new Sc(A)).Y(a.g.streaming.loadTimeout)}),E(v,Promise.race([l,m]),2);if((n=a.V())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return So(a)},a.m.D(d,"timeupdate",p);n||(q=function(){return To(a)},a.m.D(d,"timeupdate",q),To(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.Pb().end,a.m.D(d,"progress",function(){var w=a.Pb().end;u!=w&&(a.B.onManifestUpdated(a.V()),
|
|
612
|
+
u=w)})));a.Ka=!0;G(v)})}function Wo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Ig(b,a.g.preferredVariantRole)}function Yo(a){var b=a.g.preferredTextLanguage;""!=b&&a.Af(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
613
|
+
function Uo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Zo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Sc(function(){var d=$o(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).lc().Y(.5);a.Uc.push(function(){c.stop()})}}
|
|
613
614
|
function Co(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())Zo(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function Zo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(fo("metadata",b))}
|
|
614
|
-
function Jo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Sc(function(){b.mode="hidden"})).lc().Y(.5);a.
|
|
615
|
+
function Jo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Sc(function(){b.mode="hidden"})).lc().Y(.5);a.Uc.push(function(){c.stop()})}}r.wi=function(){for(var a=this.U;a.g;)a.release()};r.sc=function(a){return new Eh(a)};
|
|
615
616
|
function Zn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?qm(b(),!0,e):e()}b||(b=function(){return null});return new lg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(fo("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
616
617
|
Tn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,q=l.split(";");for(l=1;l<q.length;l++){var u=q[l].split("=");p.set(u[0],Tn(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(fo("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)Dn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
617
618
|
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Dn(h,f,{ot:An,su:!h.i})}}catch(L){ab("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",L)}break;case wg: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=Hn(k);var p=n.ot===En||n.ot===yn||n.ot===zn||n.ot===Jn,q=k.stream;if(q){var u=h.h.Za();if(p&&(n.bl=Ln(h,q.type),n.ot!==Jn)){var v=Mn(h,q.type);n.dl=u?v/Math.abs(u):v}q.bandwidth&&(n.br=q.bandwidth/1E3);
|
|
618
|
-
if(q.segmentIndex&&m){var w=q.segmentIndex.Ab(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Qb(m.M(),A.M())){var y=A.M()[0],C=f.uris[0],z=new URL(y),B=new URL(C);if(z.origin!==B.origin)var D=y;else{for(var
|
|
619
|
-
500,M=q.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(
|
|
620
|
-
function Lo(a,b){return new Gk(a.h,a.i,a.g.streaming,b,function(){a.hb&&Sk(a.hb,!0);a.j&&a.j.
|
|
619
|
+
if(q.segmentIndex&&m){var w=q.segmentIndex.Ab(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Qb(m.M(),A.M())){var y=A.M()[0],C=f.uris[0],z=new URL(y),B=new URL(C);if(z.origin!==B.origin)var D=y;else{for(var J=z.pathname.split("/").slice(1),H=B.pathname.split("/").slice(1,-1);J[0]===H[0];)J.shift(),H.shift();for(;H.length;)H.shift(),J.unshift("..");D=J.join("/")}n.nor=D}if((A.Da||A.pa)&&(m.Da!=A.Da||m.pa!=A.pa)){var K=A.Da+"-";A.pa&&(K+=A.pa);n.nrr=K}}}var I=h.h.Za()||1,F=Mn(h,q.type)||
|
|
620
|
+
500,M=q.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(F/I/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}p&&n.ot!==Jn&&(n.tb=Nn(h,n.ot)/1E3);Dn(h,f,n)}}catch(L){ab("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",L)}break;case 2:case 5:case 6:Dn(h,f,{ot:"k"});break;case 4:Dn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Tb=isNaN(f.Tb)?e:f.Tb+e)})}
|
|
621
|
+
function Lo(a,b){return new Gk(a.h,a.i,a.g.streaming,b,function(){a.hb&&Sk(a.hb,!0);a.j&&a.j.Jc();a.L&&ap(a)},function(c){return a.dispatchEvent(c)})}
|
|
621
622
|
function Mo(a,b){b=new Em(a.rb,a.V()||0<b);b.addEventListener("enter",function(d){xo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){xo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(xo(a,"timelineregionenter",e),xo(a,"timelineregionexit",e))});var c=new Rk(a.h);c.g.add(b);a.qb&&c.g.add(a.qb);return c}
|
|
622
623
|
function No(a,b,c){a.L=new Sf;a.L.g=Uf;Vf(a.L,c,Math.min(.5,c/2));mo(a);a.Nd=(new Sc(function(){ap(a)})).Va(.25);a.m.D(b,"waiting",function(){return ap(a)});a.m.D(b,"stalled",function(){return ap(a)});a.m.D(b,"canplaythrough",function(){return ap(a)});a.m.D(b,"progress",function(){return ap(a)})}
|
|
623
|
-
function ap(a){switch(a.l){case Vo:if(a.h.ended)var b=!0;else{var c=Li(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Io:a:if(a.h.ended||Qj(a.C))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.
|
|
624
|
-
function Yn(a){return new un({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ub:function(){return a.ub()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Za:function(){return a.Za()},Zb:function(){return a.Zb()},
|
|
625
|
-
function Ho(a){return new ql(a.i,{
|
|
626
|
-
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(fo("segmentappended",d));a.o&&c.fastSwitching&&b.
|
|
627
|
-
e),e+=f.length;Uh(d,"cenc",c);d=d.
|
|
624
|
+
function ap(a){switch(a.l){case Vo:if(a.h.ended)var b=!0;else{var c=Li(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Io:a:if(a.h.ended||Qj(a.C))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.Mb();var d=Li(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ni(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Tf:Uf;c.g=d;(b=b!=d)&&d===Tf&&(c.h=Date.now());b&&mo(a)}function Bo(a,b,c,d){return new Hj(a,b,c,d)}
|
|
625
|
+
function Yn(a){return new un({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ub:function(){return a.ub()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Za:function(){return a.Za()},Zb:function(){return a.Zb()},cc:function(){return a.cc()},V:function(){return a.V()}},a.g.cmcd)}
|
|
626
|
+
function Ho(a){return new ql(a.i,{Xc:function(){return a.F?a.F.od():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Za:function(){return a.Za()},X:a.C,Eb:a.G,onError:function(b){return ko(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ni:function(){a.J&&a.J.update&&a.J.update()},lf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(f!=Ud){if(a.F){a.F.yg();var h=Rj(a.C,f);!a.V()&&a.h.paused&&null!=h&&0<h&&a.F.od()<h&&a.F.qe(h)}ap(a)}d=(new Map).set("start",
|
|
627
|
+
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(fo("segmentappended",d));a.o&&c.fastSwitching&&b.Ec&&b.Ld&&a.o.trySuggestStreams()},mi:function(b,c){(c=c.gf)&&a.qb&&nl(a.qb,c,b)},Zf:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Wg(Bb(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,
|
|
628
|
+
e),e+=f.length;Uh(d,"cenc",c);d=d.m}}else d=Promise.resolve();return d},Yd:function(b,c,d){Co(a,b,c,d)},xd:function(b,c){return a.xd(b,c)}})}
|
|
628
629
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=bm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(rb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(rb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
629
630
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&rb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){rb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
|
|
630
631
|
a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==
|
|
631
632
|
a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&
|
|
632
633
|
(a.drm.retryParameters.baseDelay=100));var d=om(this.g,a,Xn(this));bp(this);return d};
|
|
633
|
-
function bp(a){a.Id=new oi(a.g,a.ba,a.A);if(a.J){var b=He(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.A&&a.A.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=go&&qi(a.Id,a.i)&&yo(a)}catch(f){ko(a,f)}a.o&&zo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Ao(a)}a.G&&(a.G.
|
|
634
|
-
a.
|
|
635
|
-
Vf(a.L,b,Math.min(.5,b/2)));a.i&&Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.aa&&a.aa.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Xn(this);om(a,this.g,Xn(this));return a};r.
|
|
636
|
-
r.
|
|
637
|
-
r.Zb=function(){return this.G};r.xc=function(){return this.$};r.
|
|
638
|
-
r.
|
|
634
|
+
function bp(a){a.Id=new oi(a.g,a.ba,a.A);if(a.J){var b=He(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.A&&a.A.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=go&&qi(a.Id,a.i)&&yo(a)}catch(f){ko(a,f)}a.o&&zo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Ao(a)}a.G&&(a.G.Ef(a.g.streaming.forceHTTP),a.G.Ff(a.g.streaming.forceHTTPS));if(a.C)if(a.C.configure(a.g.mediaSource),a.C.oa=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
635
|
+
a.Lf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.C,e=d.C;d.C=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Lf=b;a.j&&(b=a.j,(c=b.i.get(Ud))&&Dl(b,c.stream,!0,0,!0))}else b=a.C.C,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(),Ro(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
636
|
+
Vf(a.L,b,Math.min(.5,b/2)));a.i&&Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.aa&&a.aa.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Xn(this);om(a,this.g,Xn(this));return a};r.Ih=function(){var a=Xn(this);om(a,this.g,Xn(this));return dm(this.g,Xn(this))};
|
|
637
|
+
r.jg=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};r.Ai=function(){for(var a in this.g)delete this.g[a];om(this.g,Xn(this),Xn(this));bp(this)};r.Eh=function(){return this.l};r.Re=function(){return this.i?this.i.type:null};r.Hh=function(){return this.h};
|
|
638
|
+
r.Zb=function(){return this.G};r.xc=function(){return this.$};r.ig=function(){return this.B?this.B:null};r.V=function(){return this.i?this.i.presentationTimeline.V():this.h&&this.h.src?Infinity==this.h.duration:!1};r.ec=function(){return this.i?this.i.presentationTimeline.ec():!1};r.Zh=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};
|
|
639
|
+
r.Pb=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Bb(),end:a.vb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Wh=function(){this.V()&&(this.h.currentTime=this.Pb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.Wc=function(){return this.A?this.A.Wc():Infinity};
|
|
639
640
|
r.Pe=function(){return this.A?this.A.Pe():[]};r.Bd=function(){return this.A?this.A.Bd():{}};r.Xe=function(){return this.L?this.L.g==Uf:!1};r.Za=function(){return this.h?this.H?this.H.i:1:0};
|
|
640
|
-
r.md=function(a){var b=this;0==a?$a("A trick play rate of 0 is unsupported!"):(this.Ba.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Io&&(this.o.playbackRateChanged(a),Cl(this.j,1<Math.abs(a))),this.V()&&this.Ba.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.
|
|
641
|
-
r.
|
|
642
|
-
r.
|
|
643
|
-
r.yc=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=hf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Xo(this).map(function(f){return of(f)}):[]};r.
|
|
644
|
-
r.
|
|
645
|
-
function cp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{
|
|
646
|
-
r.
|
|
647
|
-
u=g.A||q/p;v=g.startTime;A=w=0;1<p&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.
|
|
648
|
-
r.
|
|
649
|
-
r.
|
|
650
|
-
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);zo(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){ep(this,c);break}};r.
|
|
651
|
-
r.
|
|
652
|
-
b))c=f;c!=b&&(c?(a=gf(c),this.
|
|
653
|
-
r.
|
|
654
|
-
r.Ze=function(){var a=this.
|
|
655
|
-
r.
|
|
641
|
+
r.md=function(a){var b=this;0==a?$a("A trick play rate of 0 is unsupported!"):(this.Ba.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Io&&(this.o.playbackRateChanged(a),Cl(this.j,1<Math.abs(a))),this.V()&&this.Ba.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Pb(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Mc():Math.floor(c)<=Math.floor(d.start+e)&&b.Mc()}))};
|
|
642
|
+
r.Mc=function(){var a=this.H.Xb();this.l==Vo&&this.H.set(a);this.l==Io&&(this.H.set(a),this.o.playbackRateChanged(a),Cl(this.j,!1));this.Ba.nb()};
|
|
643
|
+
r.cc=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,rf(e)){var f=gf(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 qf(g)}):[]};
|
|
644
|
+
r.yc=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=hf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Xo(this).map(function(f){return of(f)}):[]};r.Bh=function(){var a=this.ed;this.i&&(a=this.i.imageStreams);return a.map(function(b){return lf(b)})};
|
|
645
|
+
r.uh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Io&&b.l!=Vo)return g.return(null);c=b.ed;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):E(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Kb(function(h){var k=cp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Ub;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.og(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
646
|
+
function cp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Ub:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
647
|
+
r.og=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c.l!=Io&&c.l!=Vo)return B.return(null);d=c.ed;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?B.u(2):E(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=cp(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.Ub;n=l/h.rows;p=h.Ub*h.rows;q=g.j-g.startTime;
|
|
648
|
+
u=g.A||q/p;v=g.startTime;A=w=0;1<p&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.Ub*m,A=Math.floor(y/h.Ub)*n);C=!1;if(z=g.s)C=!0,n=z.height,w=z.positionX,A=z.positionY,m=z.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.M(),width:m,sprite:C})})};
|
|
649
|
+
r.Jg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Xk(this.s.h,b,!1),Fl(this.j,b),dp(this),this.Ea=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Xo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,mf(c)==a.id?c.mode=this.fa?"showing":"hidden":c.mode="disabled";dp(this)}};
|
|
650
|
+
r.Bf=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&&rf(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)&&$a("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Go(this,d,!1,b,c);this.va=new If(d,
|
|
651
|
+
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);zo(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){ep(this,c);break}};r.wh=function(){return fp(this.cc())};r.Ph=function(){return fp(this.yc())};r.vh=function(){return Array.from(gp(this.cc()))};r.Oh=function(){return Array.from(gp(this.yc()))};
|
|
652
|
+
r.Ig=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.F){this.va=new Jf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.va.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
653
|
+
b))c=f;c!=b&&(c?(a=gf(c),this.Bf(a,!0,d)):Ao(this))}else this.h&&this.h.audioTracks&&(d=xf(this.cc(),a,b||"",!1)[0])&&this.Bf(d)};r.Af=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Ea=a,this.bd=b||"",this.Zc=c,(a=xf(this.i.textStreams,this.Ea,this.bd,this.Zc)[0]||null)&&a!=this.j.s&&(Xk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.Ze()))Fl(this.j,a),dp(this)}else(a=xf(this.yc(),a,b||"",c)[0])&&this.Jg(a)};
|
|
654
|
+
r.Gi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.F){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.va=new Jf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Ao(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&&ep(this,b)}};
|
|
655
|
+
r.Ze=function(){var a=this.fa;return this.C&&this.l==Io?this.C.C.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Xo(this).some(function(b){return"showing"==b.mode}):a};r.kg=function(){return this.h&&this.h.src&&this.h.textTracks?hp(this).map(function(a){return of(a)}):[]};
|
|
656
|
+
r.xh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=ze(a),c=hp(this).filter(function(h){return ze(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};
|
|
656
657
|
function Xo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function $o(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function hp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
657
|
-
r.
|
|
658
|
-
r.
|
|
658
|
+
r.Pg=function(a){a=!!a;if(this.fa!=a){this.fa=a;if(this.l==Io)this.C.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=xf(this.i.textStreams,this.Ea,this.bd,this.Zc),0<a.length&&(Fl(this.j,a[0]),dp(this))):Bl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Xo(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")}Qo(this)}};
|
|
659
|
+
r.Kh=function(){if(this.F)var a=this.F.od();else{if(null==this.la)return new Date;a=this.la}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.ng=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
659
660
|
r.Dd=function(){return this.V()?this.i?this.i.presentationTimeline.Dd():null:null};r.ub=function(){if(this.l==Io)return this.C.ub();var a={total:[],audio:[],video:[],text:[]};this.l==Vo&&(a.total=Oi(this.h.buffered));return a};
|
|
660
661
|
r.getStats=function(){if(this.l!=Io&&this.l!=Vo)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};Do(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&
|
|
661
|
-
!this.V()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.L=this.F.
|
|
662
|
-
this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.
|
|
663
|
-
w=Uk(f.g,"buffering"),A=f.s,y=f.C,C=f.G,z=f.
|
|
662
|
+
!this.V()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.L=this.F.Uf(),this.s.N=this.F.Vf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.H?c.H:NaN):c=NaN;this.s.s=c;if(this.l==Io){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=
|
|
663
|
+
this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.ng().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==Vo&&(c=this.s,c.Tb=isNaN(c.Tb)?NaN:c.Tb+NaN,c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.J;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,p=f.F,q=f.j,u=Uk(f.g,"playing"),v=Uk(f.g,"paused"),
|
|
664
|
+
w=Uk(f.g,"buffering"),A=f.s,y=f.C,C=f.G,z=f.Tb,B=Vk(f.g),D=[];f=t(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,D.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:y,
|
|
664
665
|
maxSegmentDuration:C,bytesDownloaded:z,stateHistory:B,switchHistory:D}};
|
|
665
|
-
r.
|
|
666
|
-
l&&B.label==(f||"")&&B.kind==c}))return yo(h),z.return(n);throw new T(1,2,2012);case 4:p=Wd;q=h.h.duration;h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new T(1,4,4033);if(!k.length){z.u(6);break}return E(z,kp(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=z.h,v=lp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Kj(w),d="text/vtt";case 6:A={id:h.
|
|
666
|
+
r.gh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:if(h.l!=Io&&h.l!=Vo)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&$a("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.u(2);break}return E(z,ip(h,a),3);case 3:d=z.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=Vo){z.u(4);break}g&&(c="forced");return E(z,jp(h,a,b,c,d,f||"",k),5);case 5:l=ze(b);m=h.yc();if(n=m.find(function(B){return ze(B.language)==
|
|
667
|
+
l&&B.label==(f||"")&&B.kind==c}))return yo(h),z.return(n);throw new T(1,2,2012);case 4:p=Wd;q=h.h.duration;h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new T(1,4,4033);if(!k.length){z.u(6);break}return E(z,kp(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=z.h,v=lp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Kj(w),d="text/vtt";case 6:A={id:h.Pf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Nk(0,q,[a]),mimeType:d||"",
|
|
667
668
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.qa,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([Yd(d||"",e||"")])};y=Yd(A.mimeType,A.codecs);C=ne(y);if(!C)throw new T(2,2,2014,d);h.i.textStreams.push(A);yo(h);return z.return(hf(A))}})};
|
|
668
|
-
r.
|
|
669
|
-
vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);q=p.next();for(u={};!q.done;u={me:void 0,tc:void 0},q=p.next())u.tc=q.value,u.me=null,v=function(B){return function(){null==B.me&&(B.me=Od([a],[B.tc.payload]));return B.me||[]}}(u),w=new Gi(u.tc.startTime,u.tc.endTime,v,0,null,null,0,0,Infinity),u.tc.payload.includes("#xywh")&&(A=u.tc.payload.split("#xywh=")[1].split(","),4===A.length&&w.
|
|
670
|
-
n.push(w);y=b;if(!n.length){z.u(5);break}return E(z,Jm(n[0].M()[0],c.G,c.g.manifest.retryParameters),6);case 6:y=z.h;case 5:return C={id:c.
|
|
671
|
-
closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Yd(y||"","")])},c.l==Vo?c.
|
|
672
|
-
r.
|
|
669
|
+
r.hh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:if(c.l!=Io&&c.l!=Vo)throw new T(1,7,7004);if(b){z.u(2);break}return E(z,ip(c,a),3);case 3:b=z.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 E(z,kp(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=z.h;g=oe[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
670
|
+
vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);q=p.next();for(u={};!q.done;u={me:void 0,tc:void 0},q=p.next())u.tc=q.value,u.me=null,v=function(B){return function(){null==B.me&&(B.me=Od([a],[B.tc.payload]));return B.me||[]}}(u),w=new Gi(u.tc.startTime,u.tc.endTime,v,0,null,null,0,0,Infinity),u.tc.payload.includes("#xywh")&&(A=u.tc.payload.split("#xywh=")[1].split(","),4===A.length&&w.Qg({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
671
|
+
n.push(w);y=b;if(!n.length){z.u(5);break}return E(z,Jm(n[0].M()[0],c.G,c.g.manifest.retryParameters),6);case 6:y=z.h;case 5:return C={id:c.Pf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Lk(n),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.pe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
|
|
672
|
+
closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Yd(y||"","")])},c.l==Vo?c.ed.push(C):c.i.imageStreams.push(C),yo(c),z.return(lf(C))}})};
|
|
673
|
+
r.fh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Io&&d.l!=Vo)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,ip(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),E(k,jp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.kg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return E(k,new Promise(function(l,m){d.m.za(f,"load",l);d.m.za(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return yo(d),k.return(h);case 5:throw new T(1,
|
|
673
674
|
2,2012);}})};function ip(a,b){var c;return O(function(d){switch(d.g){case 1:return wa(d,2),E(d,Jm(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;ya(d,3);break;case 2:za(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
674
675
|
function jp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?E(n,kp(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=lp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Kj(l),e="text/vtt");m=document.createElement("track");var p=a.N,q=b;try{if(p.g.enabled){var u=xn(p);u.ot=Kn;u.su=!0;var v=Bn(u);var w=Cn(q,v)}else w=q}catch(A){ab("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=q}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
675
676
|
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function kp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=wg;f=qg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Dn(k,f,{ot:Kn,su:!0})}catch(l){ab("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return E(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
676
|
-
function lp(a,b,c,d){var e=oe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Bb(b),b=c.parseMedia(b,a,null),tn(b,d);throw new T(2,2,2014,c);}r.
|
|
677
|
-
r.Qe=function(){$a("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.
|
|
678
|
-
function Xn(a){var b=km();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.
|
|
679
|
-
function wo(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 Ok,l=e.closedCaptions.get(g);h={id:a.
|
|
677
|
+
function lp(a,b,c,d){var e=oe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Bb(b),b=c.parseMedia(b,a,null),tn(b,d);throw new T(2,2,2014,c);}r.Li=function(a,b){this.ba.width=a;this.ba.height=b};r.wf=function(a){if(this.l==Io){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.ad||d.Ia||d.pb||(d.ad=!1,Al(b,d,a));b=!0}}else b=!1;return b};
|
|
678
|
+
r.Qe=function(){$a("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.Fh=function(){return this.Fa};
|
|
679
|
+
function Xn(a){var b=km();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.wf(d))}};b.textDisplayFactory=function(){if(a.Kd){var c=a.getConfiguration();return new kn(a.h,a.Kd,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new en(a.h,"Shaka Player TextTrack"):new gn};return b}r.Tg=function(a){this.Kd=a};
|
|
680
|
+
function wo(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 Ok,l=e.closedCaptions.get(g);h={id:a.Pf++,originalId:g,groupId:null,
|
|
680
681
|
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([Yd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
681
682
|
function Oo(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(q){if(1==q.g)return k?E(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.Ab(l))?m.next().value:null;if(!n)return q.return(null);p=n.startTime;return q.return(p)})},E(h,e(c,b),2);if(3!=h.g)return f=h.h,E(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
682
683
|
function mo(a){var b=a.Xe();if(a.s&&a.L&&a.F){var c=a.H;c.j=b;Qk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Do(a)}b=(new Map).set("buffering",b);a.dispatchEvent(fo("buffering",b))}function Eo(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=fo("ratechange"),a.dispatchEvent(b))}
|
|
683
684
|
function Do(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Uf?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(fo("statechanged",c)))}}
|
|
684
|
-
function So(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.
|
|
685
|
+
function So(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.jg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.md(d):1==e&&b!==a.H.Xb()&&a.Mc()}if(c&&(e=a.Pb(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
|
|
685
686
|
f=a.i.serviceDescription.targetLatency+a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.maxLatency&&(f=a.i.serviceDescription.maxLatency),g=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var h=a.g.streaming.liveSyncMinLatency;var k=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.g.streaming.liveSyncMinLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency-
|
|
686
687
|
a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==Vo){var l=a.h.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.g.streaming.liveSyncPanicMode;l=1E3*a.g.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.md(k):f&&g&&c-
|
|
687
|
-
d>f?b!=g&&a.md(g):h&&k&&c-d<h?b!=k&&a.md(k):b!==a.H.Xb()&&a.
|
|
688
|
-
function zo(a){try{si(a.Id,a.i)}catch(c){return ko(a,c),!1}var b=wf(a.i.variants);b=a.
|
|
688
|
+
d>f?b!=g&&a.md(g):h&&k&&c-d<h?b!=k&&a.md(k):b!==a.H.Xb()&&a.Mc()}}function To(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.P)?(a.P=c,b=!0):(c=Math.max(a.P,c),a.P!=c&&(a.P=c,b=!0)));if(b){var d;0==a.P?d=fo("started"):25==a.P?d=fo("firstquartile"):50==a.P?d=fo("midpoint"):75==a.P?d=fo("thirdquartile"):100==a.P&&(d=fo("complete"));d&&a.dispatchEvent(d)}}}
|
|
689
|
+
function zo(a){try{si(a.Id,a.i)}catch(c){return ko(a,c),!1}var b=wf(a.i.variants);b=a.va.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Ko(a,b){b=void 0===b?!1:b;return zo(a)?a.o.chooseVariant(b):null}
|
|
689
690
|
function bo(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,fb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Td.stop();d&&Ao(a,!1,void 0,!1,!1)}
|
|
690
691
|
function Ao(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=Ko(a);f&&Go(a,f,e,b,c,d)}
|
|
691
692
|
function Go(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&El(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}));El(a.j,b,d,e,f,c);d=null;g&&(d=gf(g));b=gf(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Gj(a.K,b,a.Re()),c=fo("adaptation",c),mp(a,c)):np(a,d,b)}}
|
|
692
693
|
function ep(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=qf(c),b=qf(b),np(a,c,b))}function Po(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=ze(a.g.preferredTextLanguage);c=ze(c.language);if(2==a.g.autoShowText)return ye(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=ze(b.language);return ye(c,d)&&!ye(a,c)}$a("Invalid autoShowText setting!");return!1}
|
|
693
694
|
function yo(a){var b=fo("trackschanged");mp(a,b)}function np(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Gj(a.K,c,a.Re());c=fo("variantchanged",b);mp(a,c)}function dp(a){var b=fo("textchanged");mp(a,b)}function Qo(a){var b=fo("texttrackvisibility");mp(a,b)}function Ro(a){a.g.abr.enabled||ao(a);var b=(new Map).set("newStatus",a.g.abr.enabled);mp(a,fo("abrstatuschanged",b))}
|
|
694
695
|
function ao(a,b){b=void 0===b?!0:b;if(a.l==Io){a.Td.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&zo(a)}}
|
|
695
|
-
r.xd=function(a,b){if(!this.g.abr.enabled||this.l===go||!navigator.onLine||0==b)return!1;if(this.i.variants.some(function(h){return(h=h[a.type])&&h.id!==a.id?"audio"==a.type?a.language===h.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.Td.Va(1);b=this.ub().video.reduce(function(h,k){return h+
|
|
696
|
-
k.start},0);Ao(this,!1,b,!0,!1);return!0}return!1};function ko(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==go)return f.return();c=!0;if(!(a.Ka&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}wa(f,3);return E(f,Zl(a.j),5);case 5:d=f.h;c=!d;ya(f,2);break;case 3:za(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&ao(a,!1);e=fo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);
|
|
696
|
+
r.xd=function(a,b){if(!this.g.abr.enabled||this.l===go||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){return(h=h[a.type])&&h.id!==a.id?"audio"==a.type?a.language===h.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.Td.Va(1);b=this.ub().video.reduce(function(h,k){return h+
|
|
697
|
+
k.end-k.start},0);Ao(this,!1,b,!0,!1);return!0}return!1};function ko(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==go)return f.return();c=!0;if(!(a.Ka&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}wa(f,3);return E(f,Zl(a.j),5);case 5:d=f.h;c=!d;ya(f,2);break;case 3:za(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&ao(a,!1);e=fo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);G(f)}})}
|
|
697
698
|
function xo(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(fo(b,a))}function jo(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}
|
|
698
|
-
function Fo(a,b,c){0<b&&(a.V()||a.
|
|
699
|
+
function Fo(a,b,c){0<b&&(a.V()||a.Sg(b));b=a.getDuration();c<b&&(a.V()||a.Ua(c))}function mp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=go&&a.dispatchEvent(b);G(c)})}function gp(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(ze(c.language)):b.add("und");return b}
|
|
699
700
|
function fp(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=ze(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
700
|
-
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.
|
|
701
|
-
X.prototype.getBufferedInfo=X.prototype.ub;X.prototype.getSegmentAvailabilityDuration=X.prototype.Dd;X.prototype.getPresentationStartTimeAsDate=X.prototype.
|
|
702
|
-
X.prototype.selectAudioLanguage=X.prototype.
|
|
703
|
-
X.prototype.getVariantTracks=X.prototype.
|
|
704
|
-
X.prototype.isAudioOnly=X.prototype.
|
|
705
|
-
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.
|
|
701
|
+
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Tg;X.prototype.getManifestParserFactory=X.prototype.Fh;X.prototype.getManifest=X.prototype.Qe;X.prototype.retryStreaming=X.prototype.wf;X.prototype.setMaxHardwareResolution=X.prototype.Li;X.prototype.addChaptersTrack=X.prototype.fh;X.prototype.addThumbnailsTrack=X.prototype.hh;X.prototype.addTextTrackAsync=X.prototype.gh;X.prototype.getStats=X.prototype.getStats;
|
|
702
|
+
X.prototype.getBufferedInfo=X.prototype.ub;X.prototype.getSegmentAvailabilityDuration=X.prototype.Dd;X.prototype.getPresentationStartTimeAsDate=X.prototype.ng;X.prototype.getPlayheadTimeAsDate=X.prototype.Kh;X.prototype.setTextTrackVisibility=X.prototype.Pg;X.prototype.getChapters=X.prototype.xh;X.prototype.getChaptersTracks=X.prototype.kg;X.prototype.isTextTrackVisible=X.prototype.Ze;X.prototype.selectVariantsByLabel=X.prototype.Gi;X.prototype.selectTextLanguage=X.prototype.Af;
|
|
703
|
+
X.prototype.selectAudioLanguage=X.prototype.Ig;X.prototype.getTextLanguages=X.prototype.Oh;X.prototype.getAudioLanguages=X.prototype.vh;X.prototype.getTextLanguagesAndRoles=X.prototype.Ph;X.prototype.getAudioLanguagesAndRoles=X.prototype.wh;X.prototype.selectVariantTrack=X.prototype.Bf;X.prototype.selectTextTrack=X.prototype.Jg;X.prototype.getThumbnails=X.prototype.og;X.prototype.getAllThumbnails=X.prototype.uh;X.prototype.getImageTracks=X.prototype.Bh;X.prototype.getTextTracks=X.prototype.yc;
|
|
704
|
+
X.prototype.getVariantTracks=X.prototype.cc;X.prototype.cancelTrickPlay=X.prototype.Mc;X.prototype.trickPlay=X.prototype.md;X.prototype.getPlaybackRate=X.prototype.Za;X.prototype.isBuffering=X.prototype.Xe;X.prototype.getKeyStatuses=X.prototype.Bd;X.prototype.getActiveSessionsMetadata=X.prototype.Pe;X.prototype.getExpiration=X.prototype.Wc;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Wh;X.prototype.seekRange=X.prototype.Pb;
|
|
705
|
+
X.prototype.isAudioOnly=X.prototype.Zh;X.prototype.isInProgress=X.prototype.ec;X.prototype.isLive=X.prototype.V;X.prototype.getAdManager=X.prototype.ig;X.prototype.getAssetUri=X.prototype.xc;X.prototype.getNetworkingEngine=X.prototype.Zb;X.prototype.getMediaElement=X.prototype.Hh;X.prototype.getManifestType=X.prototype.Re;X.prototype.getLoadMode=X.prototype.Eh;X.prototype.resetConfiguration=X.prototype.Ai;X.prototype.getBufferFullness=X.prototype.jg;X.prototype.getNonDefaultConfiguration=X.prototype.Ih;
|
|
706
|
+
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.wi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.eg;X.prototype.unloadAndSavePreload=X.prototype.Oi;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Si;X.prototype.unload=X.prototype.mc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.lh;X.prototype.attach=X.prototype.qc;
|
|
706
707
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return E(k,li(),3);case 3:b=k.h;case 2:var l={};if(Tc())for(var m in wi)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]=Tc()?!!wi[n]:Uc(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(Zd));
|
|
707
708
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=ne(n)?!0:Tc()?nb(n)||(mc(n)?!0:!1):Uc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,ud(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=op;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
708
709
|
X.isBrowserSupported=function(){window.Promise||$a("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Yc("Trident/"))return!1;var a=kd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Tc()?!0:Uc("application/x-mpegurl")};X.setAdManagerFactory=function(a){$n=a};
|
|
709
|
-
X.registerSupportPlugin=function(a,b){op[a]=b};X.prototype.destroy=X.prototype.destroy;var go=0,Wn=1,Io=2,Vo=3;X.LoadMode={DESTROYED:go,NOT_LOADED:Wn,MEDIA_SOURCE:Io,SRC_EQUALS:Vo};X.version="v4.9.
|
|
710
|
+
X.registerSupportPlugin=function(a,b){op[a]=b};X.prototype.destroy=X.prototype.destroy;var go=0,Wn=1,Io=2,Vo=3;X.LoadMode={DESTROYED:go,NOT_LOADED:Wn,MEDIA_SOURCE:Io,SRC_EQUALS:Vo};X.version="v4.9.31";var pp=["4","9"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(pp[0]),Number(pp[1])));var op={},$n=null;function qp(){this.h=[];this.j=this.i=this.g=0};function rp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new hb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=rp.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
710
711
|
r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
711
712
|
r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
712
713
|
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
713
714
|
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",rp);rp.prototype.release=rp.prototype.release;
|
|
714
715
|
rp.prototype.getPodIndex=rp.prototype.getPodIndex;rp.prototype.getTimeOffset=rp.prototype.getTimeOffset;rp.prototype.getMediaUrl=rp.prototype.getMediaUrl;rp.prototype.getAdvertiserName=rp.prototype.getAdvertiserName;rp.prototype.getCreativeAdId=rp.prototype.getCreativeAdId;rp.prototype.getAdId=rp.prototype.getAdId;rp.prototype.getVastMediaWidth=rp.prototype.getVastMediaWidth;rp.prototype.getVastMediaHeight=rp.prototype.getVastMediaHeight;rp.prototype.getVastMediaBitrate=rp.prototype.getVastMediaBitrate;
|
|
715
716
|
rp.prototype.getDescription=rp.prototype.getDescription;rp.prototype.getTitle=rp.prototype.getTitle;rp.prototype.getPositionInSequence=rp.prototype.getPositionInSequence;rp.prototype.getSequenceLength=rp.prototype.getSequenceLength;rp.prototype.setMuted=rp.prototype.setMuted;rp.prototype.resize=rp.prototype.resize;rp.prototype.isLinear=rp.prototype.isLinear;rp.prototype.isMuted=rp.prototype.isMuted;rp.prototype.setVolume=rp.prototype.setVolume;rp.prototype.getVolume=rp.prototype.getVolume;
|
|
716
|
-
rp.prototype.play=rp.prototype.play;rp.prototype.pause=rp.prototype.pause;rp.prototype.skip=rp.prototype.skip;rp.prototype.canSkipNow=rp.prototype.canSkipNow;rp.prototype.getTimeUntilSkippable=rp.prototype.getTimeUntilSkippable;rp.prototype.isSkippable=rp.prototype.isSkippable;rp.prototype.isPaused=rp.prototype.isPaused;rp.prototype.getRemainingTime=rp.prototype.getRemainingTime;rp.prototype.getMinSuggestedDuration=rp.prototype.getMinSuggestedDuration;rp.prototype.getDuration=rp.prototype.getDuration;function sp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.
|
|
717
|
+
rp.prototype.play=rp.prototype.play;rp.prototype.pause=rp.prototype.pause;rp.prototype.skip=rp.prototype.skip;rp.prototype.canSkipNow=rp.prototype.canSkipNow;rp.prototype.getTimeUntilSkippable=rp.prototype.getTimeUntilSkippable;rp.prototype.isSkippable=rp.prototype.isSkippable;rp.prototype.isPaused=rp.prototype.isPaused;rp.prototype.getRemainingTime=rp.prototype.getRemainingTime;rp.prototype.getMinSuggestedDuration=rp.prototype.getMinSuggestedDuration;rp.prototype.getDuration=rp.prototype.getDuration;function sp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.31");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
717
718
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){tp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){up(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.za(this.i,"play",function(){f.F=!0})}sp.prototype.configure=function(a){this.s=a};sp.prototype.stop=function(){this.g&&this.g.stop();this.o&&jn(this.o)};
|
|
718
719
|
sp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function up(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));vp(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
719
720
|
function tp(a,b){a.m(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -735,10 +736,10 @@ Dp.prototype.getPositionInSequence=Dp.prototype.getPositionInSequence;Dp.prototy
|
|
|
735
736
|
Dp.prototype.canSkipNow=Dp.prototype.canSkipNow;Dp.prototype.getTimeUntilSkippable=Dp.prototype.getTimeUntilSkippable;Dp.prototype.isSkippable=Dp.prototype.isSkippable;Dp.prototype.isPaused=Dp.prototype.isPaused;Dp.prototype.getRemainingTime=Dp.prototype.getRemainingTime;Dp.prototype.getMinSuggestedDuration=Dp.prototype.getMinSuggestedDuration;Dp.prototype.getDuration=Dp.prototype.getDuration;var Ep=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Fp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.U=NaN;this.i=d;this.J=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.P=!0;this.H="";this.o=new hb}Fp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Ib(b.target,b.type,b.listener);Gp(this);this.m=[];this.s=[];this.G="";this.P=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
736
737
|
Fp.prototype.release=function(){this.stop();this.o&&this.o.release()};Fp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(Hp(this,this.G,this.P),this.P=!1)};Fp.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};
|
|
737
738
|
function Ip(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=qg([b],Xf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Bd(e)),f=a.K.request(7,d),wa(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=xd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new sc(b),m=new sc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.U,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),q=new sc(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
738
|
-
return ya(u,0)}za(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;
|
|
739
|
+
return ya(u,0)}za(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;G(u)})}
|
|
739
740
|
function Hp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A;O(function(y){if(1==y.g)return d=qg([b],Xf()),e=a.K.request(7,d),wa(y,2),E(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=xd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),q=p.next();!q.done;q=p.next())for(u=q.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,Jp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
|
|
740
|
-
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Gp(a),a.j=[];c&&(a.J||0<g.length)&&Kp(a);return ya(y,0)}za(y);
|
|
741
|
-
function Jp(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=Lp(b);if(d=a.F.get(c))return m.return();e=qg([b.staticResource],Xf());f=a.K.request(7,e);wa(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=xd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ya(m,0);za(m);a.F.delete(c);
|
|
741
|
+
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Gp(a),a.j=[];c&&(a.J||0<g.length)&&Kp(a);return ya(y,0)}za(y);G(y)})}
|
|
742
|
+
function Jp(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=Lp(b);if(d=a.F.get(c))return m.return();e=qg([b.staticResource],Xf());f=a.K.request(7,e);wa(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=xd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ya(m,0);za(m);a.F.delete(c);G(m)})}
|
|
742
743
|
function Lp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Kp(a){Mp(a);a.J||(Np(a),a.o.D(a.h,"seeked",function(){Np(a)}),a.o.D(a.h,"ended",function(){Gp(a)}));a.o.D(a.h,"timeupdate",function(){Mp(a)})}
|
|
743
744
|
function Np(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)}}
|
|
744
745
|
function Mp(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"),Op(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),Op(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),Op(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
@@ -765,8 +766,8 @@ function Sp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
765
766
|
r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);ig.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new qp};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
|
|
766
767
|
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Fp(a,b,c,function(e){return Tp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Zf,Ip(d,a,b),d.H=c||"",d.U=Date.now()/1E3,a=d.l);return a};
|
|
767
768
|
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Rp(a,b,this.m,function(d){return Tp(c,d)});this.g.configure(this.l)};
|
|
768
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.
|
|
769
|
-
(c.G=!0),c.j=new Zf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.
|
|
769
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.31";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
770
|
+
(c.G=!0),c.j=new Zf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.31";this.g.g.replaceAdTagParameters(a)};
|
|
770
771
|
r.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
771
772
|
r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
772
773
|
function Tp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
|
|
@@ -782,35 +783,35 @@ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySy
|
|
|
782
783
|
gq=["attach","attachCanvas","detach","load","unload"];function hq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Sc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.J="";this.o=null;this.B=function(){return iq(h)};this.C=function(k,l){k=Vp(l);switch(k.type){case "event":var m=k.targetName,n=gg(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
|
|
783
784
|
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;jq.add(this)}r=hq.prototype;r.destroy=function(){jq.delete(this);kq(this);lq&&mq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.$a=function(){return this.h};r.rf=function(){return this.J};
|
|
784
785
|
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.lc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(jq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Zf;d.s=!0;nq(d,e)}},function(b){for(var c=t(jq),d=c.next();!d.done;d=c.next())d=d.value,oq="available"==b,d.l.lc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});oq&&this.l.Y(pq);(a=lq)&&
|
|
785
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Zf,this.s=!0,nq(this,a)):lq=null}else window.__onGCastApiAvailable!==qq&&(rq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=qq)};r.
|
|
786
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Zf,this.s=!0,nq(this,a)):lq=null}else window.__onGCastApiAvailable!==qq&&(rq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=qq)};r.Cf=function(a){this.o=a;this.h&&sq(this,{type:"appData",appData:this.o})};
|
|
786
787
|
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!oq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Zf;chrome.cast.requestSession(function(c){return nq(a,c)},function(c){return tq(a,c)});return E(b,a.j,0)})};function uq(a){a.h&&chrome.cast.requestSession(function(b){return nq(a,b)},function(b){return tq(a,b)})}r.wc=function(){if(this.h){kq(this);if(lq){mq(this);try{lq.stop(function(){},function(){})}catch(a){}lq=null}iq(this)}};
|
|
787
|
-
r.get=function(a,b){var c=this;if("video"==a){if($p.includes(b))return function(){return c.
|
|
788
|
+
r.get=function(a,b){var c=this;if("video"==a){if($p.includes(b))return function(){return c.Fg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))}}else if("player"==a){if(cq[b]&&!this.get("player","isLive")())return function(){};if(fq.includes(b))return function(){return c.Fg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(gq.includes(b))return function(){return c.xi.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(aq[b]||bq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
788
789
|
r.set=function(a,b,c){this.g[a][b]=c;sq(this,{type:"set",targetName:a,property:b,value:c})};function nq(a,b){var c=a.N();lq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);iq(a);sq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function tq(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))}
|
|
789
|
-
r.
|
|
790
|
+
r.Fg=function(a,b){sq(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};r.xi=function(a,b){var c=Ja.apply(2,arguments),d=new Zf,e=this.H.toString();this.H++;this.i[e]=d;try{sq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function mq(a){var b=lq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
790
791
|
function iq(a){var b=lq?"connected"==lq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};kq(a)}a.h=b;a.J=b?lq.receiver.friendlyName:"";a.l.lc()}function kq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function sq(a,b){b=Up(b);var c=lq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.wc(),b;}}var pq=.02,oq=!1,lq=null,rq=null,jq=new Set;
|
|
791
792
|
function qq(a){rq?window.__onGCastApiAvailable=rq:delete window.__onGCastApiAvailable;rq=null;if(a)for(var b=t(jq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function vq(a,b,c,d){d=void 0===d?!1:d;ig.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 hq(c,function(){return wq(e)},function(){return xq(e)},function(f,g){return yq(e,f,g)},function(){return zq(e)},function(){return Aq(e)},d);Bq(this)}ra(vq,ig);r=vq.prototype;
|
|
792
|
-
r.destroy=function(a){a&&this.g.wc();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;ig.prototype.release.call(this);return Promise.all(a)};r.
|
|
793
|
-
r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.mc(),0):b.return()})};r.
|
|
794
|
-
r.
|
|
795
|
-
function Bq(a){a.g.init();a.m=new hb;for(var b=t(Xp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.$a()||(f=gg(f),a.j.dispatchEvent(f))});for(var d in hg)a.m.D(a.h,hg[d],function(f){a.g.$a()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={
|
|
793
|
+
r.destroy=function(a){a&&this.g.wc();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;ig.prototype.release.call(this);return Promise.all(a)};r.Uh=function(){return this.l};r.Jh=function(){return this.s};r.mh=function(){return this.g.m&&oq};r.$a=function(){return this.g.$a()};r.rf=function(){return this.g.rf()};
|
|
794
|
+
r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.mc(),0):b.return()})};r.Cf=function(a){this.g.Cf(a)};r.Ni=function(){uq(this.g)};r.wc=function(){this.g.wc()};
|
|
795
|
+
r.nh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.wc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new hq(a,function(){return wq(c)},function(){return xq(c)},function(e,f){return yq(c,e,f)},function(){return zq(c)},function(){return Aq(c)},b);c.g.init();G(d)})};
|
|
796
|
+
function Bq(a){a.g.init();a.m=new hb;for(var b=t(Xp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.$a()||(f=gg(f),a.j.dispatchEvent(f))});for(var d in hg)a.m.D(a.h,hg[d],function(f){a.g.$a()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={fd:b.fd},b.fd=e,Object.defineProperty(a.l,b.fd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Cq(a,f.fd)}}(b),set:function(f){return function(g){var h=f.fd;a.g.$a()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Dq(a,
|
|
796
797
|
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Eq(a,f)}})});Fq(a);a.j=new ig;a.j.Wd=a.l;a.o=new ig;a.o.Wd=a.s}function Fq(a){var b=new Map;Dq(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)})}
|
|
797
798
|
function Dq(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)}}
|
|
798
799
|
function Aq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.xc(),startTime:null};a.i.pause();for(var c=t(Zp),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(dq);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(eq);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 wq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
|
|
799
800
|
function xq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
800
801
|
function zq(a){for(var b=t(dq),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(Zp);for(d=c.next();!d.done;d=c.next())d=
|
|
801
|
-
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Zp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(eq);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.
|
|
802
|
+
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Zp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(eq);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.Pg(h);g&&a.h.Af(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new U("error",l);a.h.dispatchEvent(l)})}
|
|
802
803
|
function Cq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.$a()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.$a()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
803
|
-
function Eq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Zb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.
|
|
804
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
805
|
-
function yq(a,b,c){a.g.$a()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",vq);vq.prototype.changeReceiverId=vq.prototype.
|
|
806
|
-
vq.prototype.getVideo=vq.prototype.
|
|
807
|
-
r.
|
|
808
|
-
r.destroy=function(){var a=this,b,c;return O(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,ig.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();
|
|
804
|
+
function Eq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Zb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.ig()};
|
|
805
|
+
if("setVideoContainer"==b)return function(c){return a.h.Tg(c)};if(a.g.$a()){if("getManifest"==b||"drmInfo"==b)return function(){$a(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){$a(b+"() does not work while casting!");return Promise.resolve()}}return a.g.$a()&&0==Object.keys(a.g.g.video).length&&(aq[b]||bq[b])||!a.g.$a()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
806
|
+
function yq(a,b,c){a.g.$a()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",vq);vq.prototype.changeReceiverId=vq.prototype.nh;vq.prototype.forceDisconnect=vq.prototype.wc;vq.prototype.suggestDisconnect=vq.prototype.Ni;vq.prototype.setAppData=vq.prototype.Cf;vq.prototype.cast=vq.prototype.cast;vq.prototype.receiverName=vq.prototype.rf;vq.prototype.isCasting=vq.prototype.$a;vq.prototype.canCast=vq.prototype.mh;vq.prototype.getPlayer=vq.prototype.Jh;
|
|
807
|
+
vq.prototype.getVideo=vq.prototype.Uh;vq.prototype.destroy=vq.prototype.destroy;function Gq(a,b,c,d){ig.call(this);var e=this;this.g=a;this.h=b;this.j=new hb;this.H={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Sc(function(){Hq(e)});Iq(this)}ra(Gq,ig);r=Gq.prototype;r.isConnected=function(){return this.F};r.$h=function(){return this.o};r.Ji=function(a){this.i=a};r.rh=function(){this.i=null};
|
|
808
|
+
r.Ki=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Ii=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Hi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
809
|
+
r.destroy=function(){var a=this,b,c;return O(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,ig.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();G(d)})};
|
|
809
810
|
function Iq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Jq(a)};b.onSenderDisconnected=function(){return Jq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Kq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Kq(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 Lq(a,
|
|
810
811
|
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Mq(a,e)};b.start();b=t(Xp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Nq(a,"video",e)});for(var d in hg)a.j.D(a.h,hg[d],function(e){return Nq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;Oq(a)});a.j.D(a.g,"playing",function(){a.o=!1;Oq(a)});a.j.D(a.g,"pause",function(){Oq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Oq(a)});
|
|
811
|
-
a.j.D(a.g,"ended",function(){(new Sc(function(){a.g&&a.g.ended&&(a.o=!0,Oq(a))})).Y(Pq)})}function Jq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Oq(a)}function Oq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);Qq(a)||Rq(a);
|
|
812
|
+
a.j.D(a.g,"ended",function(){(new Sc(function(){a.g&&a.g.ended&&(a.o=!0,Oq(a))})).Y(Pq)})}function Jq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Oq(a)}function Oq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);Qq(a)||Rq(a);G(c)})}
|
|
812
813
|
function Sq(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(q){switch(q.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,wa(q,5),E(q,a.h.load(b.manifest,b.startTime),7)):E(q,Promise.resolve(),3);case 7:ya(q,3);break;case 5:return g=za(q),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),q.return();case 3:if(!a.h)return q.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
813
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),Rq(a));
|
|
814
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),Rq(a));G(q)}})}function Nq(a,b,c){a.h&&(Hq(a),Kq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
814
815
|
function Hq(a){a.G.Y(Tq);for(var b={video:{},player:{}},c=t(Yp),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 cq)0==a.m%cq[e]&&(b.player[e]=a.h[e]());for(var f in aq)0==a.m%aq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Kq(a,{type:"update",update:b},a.l);for(var g in bq)0==a.m%bq[g]&&(b={player:{}},b.player[g]=a.h[g](),Kq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
815
816
|
1);Qq(a)}function Qq(a){return a.A&&(a.g.duration||a.h.V())?(Uq(a),a.A=!1,!0):!1}function Uq(a,b){var c={contentId:a.h.xc(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Rq(a,void 0===b?0:b,c)}
|
|
816
817
|
function Mq(a,b){var c=Vp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Sq(a,c.initState,c.appData);Hq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
@@ -818,7 +819,7 @@ function Mq(a,b){var c=Vp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0
|
|
|
818
819
|
function Lq(a,b){var c=Vp(b.data);switch(c.type){case "PLAY":a.g.play();Rq(a);break;case "PAUSE":a.g.pause();Rq(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(),Rq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Rq(a));break;case "STOP":a.h.mc().then(function(){a.h&&Rq(a)});break;case "GET_STATUS":Uq(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));
|
|
819
820
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Rq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Uq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Kq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Kq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
820
821
|
function Vq(a,b,c,d){a.h&&Kq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Kq(a,b,c,d){a.F&&(a=Up(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Rq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Wq:a.h.Xe()?Xq:a.g.paused?Yq:Zq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Kq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
821
|
-
S("shaka.cast.CastReceiver",Gq);Gq.prototype.destroy=Gq.prototype.destroy;Gq.prototype.setContentArtist=Gq.prototype.
|
|
822
|
+
S("shaka.cast.CastReceiver",Gq);Gq.prototype.destroy=Gq.prototype.destroy;Gq.prototype.setContentArtist=Gq.prototype.Hi;Gq.prototype.setContentImage=Gq.prototype.Ii;Gq.prototype.setContentTitle=Gq.prototype.Ki;Gq.prototype.clearContentMetadata=Gq.prototype.rh;Gq.prototype.setContentMetadata=Gq.prototype.Ji;Gq.prototype.isIdle=Gq.prototype.$h;Gq.prototype.isConnected=Gq.prototype.isConnected;var Tq=.5,Pq=5,Wq="IDLE",Zq="PLAYING",Xq="BUFFERING",Yq="PAUSED";function $q(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(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=ar(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){q=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
822
823
|
q||-1===u)p=br(d,e),a.nestedCues.push(p);else{for(;q<=u;q++)if(v=p[q]){var w=v.l,A=v.i,y=v.j,C=v.h;if(w!=h||A!=k||y!=l||C!=m)n.payload&&a.nestedCues.push(n),n=ar(d,e,w,A,y,C),h=w,k=A,l=y,m=C;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=br(d,e),a.nestedCues.push(n));n=ar(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
823
824
|
function ar(a,b,c,d,e,f){a=new Rb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function br(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}function cr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function dr(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";er(this)}function fr(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Rb(b,c,"");e.lineInterpretation=1;var f=gr.get(a.g);f&&(e.line=f);(b=$q(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=gr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function er(a){hr(a,0,15);a.g=1}
|
|
824
825
|
function ir(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=jr.has(c)?jr.get(c):String.fromCharCode(c);break;case 1:d=kr.get(c);break;case 2:a.i[a.g].pop();d=lr.get(c);break;case 3:a.i[a.g].pop(),d=mr.get(c)}d&&a.i[a.g].push(new cr(d,a.m,a.j,a.o,a.l))}}function nr(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 hr(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
@@ -826,100 +827,100 @@ var jr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u0
|
|
|
826
827
|
[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"]]),mr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
|
|
827
828
|
[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"]]),gr=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 or(a,b){this.h=0;this.o=new dr(a,b);this.i=new dr(a,b);this.g=this.j=new dr(a,b);this.l=0;this.m=null}function pr(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=fr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,hr(c,0,15),c=a.j,c.g=0<c.h?c.h:0,hr(c,0,15),d.g=15);a.h=3;d.h=b;return e}function qr(a){a.h=1;a.g=a.j;a.g.h=0}function rr(a){ab("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var sr="black green blue cyan red yellow magenta black".split(" "),tr="white green blue cyan red yellow magenta white_italics".split(" ");function ur(a,b){this.J=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";vr(this)}function vr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(wr())}function wr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function xr(a,b){yr(a)&&(a.i[a.h][a.g]=new cr(b,a.C,a.A,a.s,a.B),a.g++)}function yr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}ur.prototype.isVisible=function(){return this.l};
|
|
828
829
|
function zr(a,b,c){var d=new Rb(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Tb;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Lb: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=
|
|
829
|
-
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=$q(d,"svc"+c,a.i,a.j,b))a.j=b;return c};function Ar(){this.i=[];this.h=null;this.g=0}function Br(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 Cr(a.h)),a.h=null,a.g=0))}function Cr(a){this.g=0;this.h=a}Cr.prototype.
|
|
830
|
+
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=$q(d,"svc"+c,a.i,a.j,b))a.j=b;return c};function Ar(){this.i=[];this.h=null;this.g=0}function Br(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 Cr(a.h)),a.h=null,a.g=0))}function Cr(a){this.g=0;this.h=a}Cr.prototype.na=function(){return this.g<this.h.length};Cr.prototype.ra=function(){return this.g};function Dr(a){if(!a.na())throw new T(2,2,3E3);return a.h[a.g++]}Cr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function Er(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
830
831
|
function Fr(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=Dr(b).value;b=null;c=t(Gr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=zr(e,d,a.i)),vr(e);return b}if(137===c)for(b=Dr(b).value,b=t(Gr(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=Dr(b).value;b=null;c=t(Gr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=zr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Dr(b).value;
|
|
831
832
|
b=null;c=t(Gr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=zr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Dr(b).value,Hr(a,b,d);if(143===c)return d=Hr(a,255,d),Ir(a),d;if(144===c)b.skip(1),d=Dr(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Dr(b).value,c=Dr(b).value,b.skip(1),a.g&&(b=Jr((c&48)>>4,(c&12)>>2,c&3),a.g.B=Jr((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Dr(b).value,b=Dr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
832
833
|
b.skip(1),d=Dr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new ur(c,a.i);f.j=d;a.h[c]=f}d=Dr(b).value;f=Dr(b).value;var g=Dr(b).value,h=Dr(b).value,k=Dr(b).value;b=Dr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
833
834
|
function Gr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Hr(a,b,c){var d=null;b=t(Gr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=zr(f,c,a.i));a.h[e]=null}return d}function Ir(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Jr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Kr[a<<2|b<<1|c]}
|
|
834
835
|
var Lr=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"]]),Kr="black blue green cyan red magenta yellow white".split(" ");function Mr(){this.h=[];this.g=[];this.i=new Ar;this.l=0;this.m=new Map([["CC1",new or(0,0)],["CC2",new or(0,1)],["CC3",new or(1,0)],["CC4",new or(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Nr(this)}Mr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Nr(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Ir(b.value)};
|
|
835
836
|
function Nr(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,er(c.i),er(c.j),er(c.o);a.B=!0}
|
|
836
|
-
Mr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Gg(a,0);if(!(8>a.getLength())&&181===a.S()&&49===a.
|
|
837
|
+
Mr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Gg(a,0);if(!(8>a.getLength())&&181===a.S()&&49===a.ja()&&1195456820===a.O()&&3===a.S()&&(c=a.S(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.S(),f=(e&4)>>2,g=a.S(),h=a.S();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Xa:g,yb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
837
838
|
Mr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Or(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Br(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Pr(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
838
839
|
function Or(a,b){var c=b.type;if(16===(b.Xa&112)){var d=b.Xa>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Xa&&255===b.yb||!b.Xa&&!b.yb||!Qr(b.Xa)||!Qr(b.yb))return 45<=++a.l&&Nr(a),null;a.l=0;b.Xa&=127;b.yb&=127;var e=b.Xa;if(1<=e&&15>=e||!b.Xa&&!b.yb)return null;e=null;if(16===(b.Xa&112))a:{a.A.add(d),d=b.Xa;a=b.yb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
839
840
|
"white";e=!1;7>f?d=tr[f]:7===f&&(e=!0);a=1===(a&1);4!==c.h&&(f=c.g,3===c.h&&b!==f.g&&(c=1+b-f.h,nr(f,c,1+f.g-f.h,f.h),hr(f,0,c-1),hr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ir(c.g,0,32),d=!1,b=tr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=sr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))ir(c.g,
|
|
840
841
|
1,a);else if(18===(d&246)&&32===(a&224))ir(c.g,d&1?3:2,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.yb){case 32:qr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=pr(c,2,a);break;case 38:d=pr(c,3,a);break;case 39:d=pr(c,4,a);break;case 40:ir(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:er(c.o);rr(c);break;case 43:rr(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=fr(b,c.l,a));hr(b,0,15);break;case 45:b=c.g;3!==c.h?d=null:(d=fr(b,c.l,a),e=b.g-b.h+1,nr(b,e-1,e,
|
|
841
842
|
b.h),hr(b,0,e-1),hr(b,b.g,15-b.g),c.l=a);break;case 46:hr(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=fr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,qr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.yb,ir(c.g,0,b.Xa),ir(c.g,0,a);return e}
|
|
842
|
-
function Pr(a,b){var c=[];try{for(;b.
|
|
843
|
+
function Pr(a,b){var c=[];try{for(;b.na();){var d=Dr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Dr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Er(e));for(var g=a.j.get(e),h=b.ra();b.ra()-h<f;){e=g;var k=b,l=Dr(k),m=l.value,n=l.pts;if(16===m){var p=Dr(k);m=m<<16|p.value}if(0<=m&&31>=m){k=e;var q=m,u=n;if(k.g){var v=k.g;e=null;switch(q){case 8:!yr(v)||0>=v.g&&0>=v.h||(0>=v.g?(v.g=v.m-1,v.h--):v.g--,v.i[v.h][v.g]=null);break;case 13:v.isVisible()&&(e=zr(v,u,k.i));if(v.h+1>=v.o){k=
|
|
843
844
|
v;q=0;for(u=1;16>u;u++,q++)k.i[q]=k.i[u];for(u=0;1>u;u++,q++)k.i[q]=wr()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=zr(v,u,k.i));v.i[v.h]=wr();v.g=0;break;case 12:v.isVisible()&&(e=zr(v,u,k.i)),vr(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=Fr(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&&
|
|
844
845
|
(127===k?xr(e.g,"\u266a"):xr(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&xr(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Lr.has(k)){var A=Lr.get(k);xr(e.g,A)}else xr(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?xr(e.g,"_"):xr(e.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(y){if(y instanceof T&&3E3===y.code)ab("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}
|
|
845
846
|
function Qr(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Mr.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",Mr);Jb=function(){return new Mr};function Rr(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 Sr(){this.j=new Map;this.i=this.h=0;this.g=Tr}
|
|
846
|
-
Sr.prototype.init=function(a){function b(f){f=f.name;f in Ur&&(c.g=Ur[f])}var c=this,d=[],e=[];(new Jg).box("moov",Qg).box("mvex",Qg).R("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Qg).R("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.O();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.
|
|
847
|
+
Sr.prototype.init=function(a){function b(f){f=f.name;f in Ur&&(c.g=Ur[f])}var c=this,d=[],e=[];(new Jg).box("moov",Qg).box("mvex",Qg).R("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Qg).R("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.O();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.ja();g.ja();g.ja();g.ja();d.push(h)}).box("mdia",Qg).R("mdhd",
|
|
847
848
|
function(f){f=Zi(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Tg).box("sinf",Qg).box("frma",function(f){f=bj(f.reader).codec;f in Ur&&(c.g=Ur[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Tr&&$a("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
848
|
-
Sr.prototype.parse=function(a){var b=this;if(this.g==Tr)return[];var c=[],d=0,e=[];(new Jg).box("moof",function(f){d=f.start;e=[];Qg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,
|
|
849
|
-
1];f=Yi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw $a("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Vr(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.
|
|
850
|
-
function Vr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.
|
|
851
|
-
c+(n[l].
|
|
852
|
-
S("shaka.cea.TsCeaParser",Yr);Ib["video/mp2t"]=function(){return new Yr};function Zr(a,b,c){var d=$r(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.
|
|
853
|
-
l.
|
|
854
|
-
function cs(a,b,c,d){var e=Zr(a,c,d);if(b.
|
|
849
|
+
Sr.prototype.parse=function(a){var b=this;if(this.g==Tr)return[];var c=[],d=0,e=[];(new Jg).box("moof",function(f){d=f.start;e=[];Qg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Rc:b.h,wd:b.i,Ag:[],timescale:9E4});Qg(f)}).R("trun",function(f){var g=e[e.length-1];f=$i(f.reader,f.version,f.flags);g.Ag.push(f)}).R("tfhd",function(f){var g=e[e.length-1];f=Xi(f.reader,f.flags);g.Rc=f.Rc||b.h;g.wd=f.wd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).R("tfdt",function(f){var g=e[e.length-
|
|
850
|
+
1];f=Yi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw $a("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Vr(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Rc,l.wd,g,l.Ag,c)}}).parse(a,!1);return c};
|
|
851
|
+
function Vr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Hg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].th);b.na();){g=b.O();var p=b.S(),q=null;q=!1;h=1;switch(a.g){case Wr:q=p&31;q=6==q;break;case Xr:h=2;b.skip(1);q=p>>1&63;q=39==q||40==q;break;default:return}if(q)for(p=0,l<n.length&&(p=n[l].ee||0),p=(c+p)/d,h=t(Rr(b.mb(g-h))),q=h.next();!q.done;q=h.next())k.push({packet:q.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
852
|
+
c+(n[l].yf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Sr);var Tr=0,Wr=1,Xr=2,Ur={avc1:Wr,avc3:Wr,hev1:Xr,hvc1:Xr,dvav:Wr,dva1:Wr,dvh1:Xr,dvhe:Xr};Ib["video/mp4"]=function(){return new Sr};function Yr(){this.g=null}Yr.prototype.init=function(){};Yr.prototype.parse=function(a){this.g?this.g.clearData():this.g=new wj;var b=[];a=Bb(a);if(!Dj(a))return b;a=this.g.parse(a);var c=a.Vc(),d=a.Ed();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(Rr(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
853
|
+
S("shaka.cea.TsCeaParser",Yr);Ib["video/mp2t"]=function(){return new Yr};function Zr(a,b,c){var d=$r(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Ic});if(1<f.length)throw new T(2,4,4050);f.length&&(g=as(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ic}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ic?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
854
|
+
l.Ic});f.length&&(a=bs(e,k,f,c,h),0==a.length&&(a=[Pd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Pd(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{cg:h,Qj:e,drmInfos:a,re:g,hg:!0}}
|
|
855
|
+
function cs(a,b,c,d){var e=Zr(a,c,d);if(b.hg){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.hg=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.cg||b.cg}
|
|
855
856
|
function ds(a){var b=0,c=Fb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function es(a){a=t(ih(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return gh(c)}return""}
|
|
856
857
|
function fs(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=gh(b)))return b;a=kh(a.node,"urn:microsoft:playready","pro");if(!a||!gh(a))return"";a=gh(a);a=Id(a);a=ds(a).filter(function(c){return c.type===gs})[0];if(!a)return"";a=yd(a.value,!0);return(a=Zg(a,"WRMHEADER"))?es(a):""}
|
|
857
|
-
function bs(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.
|
|
858
|
+
function bs(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Ic];if(h){var k;if((k=kh(g.node,"urn:microsoft:playready","pro"))&&gh(k)){k=gh(k);k=Id(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Xg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Ic){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
|
|
858
859
|
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Xg(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Pd(h,b,g.init||a||k||l);if(h=hs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function $r(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=is(c.value))&&b.push(c);return b}
|
|
859
|
-
function is(a){var b=a.attributes.schemeIdUri,c=nh(a,"urn:mpeg:cenc:2013","default_KID"),d=lh(a,"urn:mpeg:cenc:2013","pssh").map(hh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Id(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,
|
|
860
|
+
function is(a){var b=a.attributes.schemeIdUri,c=nh(a,"urn:mpeg:cenc:2013","default_KID"),d=lh(a,"urn:mpeg:cenc:2013","pssh").map(hh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Id(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Ic:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
860
861
|
function as(a){if(!window.crypto||!window.crypto.subtle)throw $a("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Ed(b.attributes.keyUriTemplate);
|
|
861
|
-
if(!a||!b)throw new T(2,4,4051);a=Jd(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{
|
|
862
|
+
if(!a||!b)throw new T(2,4,4051);a=Jd(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{fi:b,iv:a}}
|
|
862
863
|
var gs=1,hs=(new Map).set("com.widevine.alpha",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"urn:microsoft","laurl"))?Ed(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",fs).set("com.microsoft.playready.recommendation",fs).set("com.microsoft.playready.software",fs).set("com.microsoft.playready.hardware",fs).set("org.w3.clearkey",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
863
864
|
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=gh(a))?a:""});function js(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&$a("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
864
865
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
865
|
-
function ks(a,b){var c=ls(a,b,"timescale"),d=1;c&&(d=th(c)||1);c=ls(a,b,"duration");(c=th(c||""))&&(c/=d);var e=ls(a,b,"startNumber"),f=Number(ls(a,b,"presentationTimeOffset"))||0,g=uh(e||"");if(null==e||null==g)g=1;e=null;if(b=ms(a,b,"SegmentTimeline")){b=fh(b,"S");e=d;a=a.
|
|
866
|
-
p)break;else if(q>=p)break;v=Math.ceil((p-q)/u)-1}else{if(Infinity==a)break;else if(q/e>=a)break;v=Math.ceil((a*e-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/e);for(p=0;p<=v;++p)l=q+u,k.push({start:q/e,end:l/e,
|
|
866
|
+
function ks(a,b){var c=ls(a,b,"timescale"),d=1;c&&(d=th(c)||1);c=ls(a,b,"duration");(c=th(c||""))&&(c/=d);var e=ls(a,b,"startNumber"),f=Number(ls(a,b,"presentationTimeOffset"))||0,g=uh(e||"");if(null==e||null==g)g=1;e=null;if(b=ms(a,b,"SegmentTimeline")){b=fh(b,"S");e=d;a=a.da.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],q=mh(n,"t",uh),u=mh(n,"d",uh),v=mh(n,"r",sh);n=mh(n,"k",sh)||0;null!=q&&(q-=f);if(u){q=null!=q?q:l;v=v||0;if(0>v)if(p){p=mh(p,"t",uh);if(null==
|
|
867
|
+
p)break;else if(q>=p)break;v=Math.ceil((p-q)/u)-1}else{if(Infinity==a)break;else if(q/e>=a)break;v=Math.ceil((a*e-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/e);for(p=0;p<=v;++p)l=q+u,k.push({start:q/e,end:l/e,Rf:q,wb:n,Fi:k.length+h}),q=l}}e=k}return{timescale:d,Ja:c,ld:g,Gb:f/d||0,Qf:f,timeline:e}}function ns(a,b){return[b(a.I),b(a.ha),b(a.ia)].filter(we)}function ls(a,b,c){b=ns(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
867
868
|
function ms(a,b,c){b=ns(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=jh(d.value,c));d=b.next());return a}
|
|
868
869
|
function os(a,b,c,d,e,f){for(var g=nh(a,"http://www.w3.org/1999/xlink","href"),h=nh(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=ah("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return ag(new T(2,4,4028));if("onLoad"!=h)return ag(new T(2,4,4027));var p=Od([d],[g]);return e.request(0,qg(p,b)).xa(function(q){q=Yg(q.data,a.tagName);if(!q)return ag(new T(2,4,4001,g));for(a.children=
|
|
869
870
|
[];q.children.length;){var u=q.children.shift();a.children.push(u)}u=t(Object.keys(q.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=q.attributes[v];return ps(a,b,c,p[0],e,f+1)})}
|
|
870
|
-
function ps(a,b,c,d,e,f){f=void 0===f?0:f;if(nh(a,"http://www.w3.org/1999/xlink","href")){var g=os(a,b,c,d,e,f);c&&(g=g.xa(void 0,function(){return ps(a,b,c,d,e,f)}));return g}g=[];for(var h=t(eh(a)),k=h.next(),l={};!k.done;l={
|
|
871
|
+
function ps(a,b,c,d,e,f){f=void 0===f?0:f;if(nh(a,"http://www.w3.org/1999/xlink","href")){var g=os(a,b,c,d,e,f);c&&(g=g.xa(void 0,function(){return ps(a,b,c,d,e,f)}));return g}g=[];for(var h=t(eh(a)),k=h.next(),l={};!k.done;l={Nc:void 0},k=h.next())l.Nc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==nh(l.Nc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Nc}}(l)):"SegmentTimeline"!=l.Nc.tagName&&g.push(ps(l.Nc,b,c,d,e,f));return eg(g).xa(function(){return a})}
|
|
871
872
|
;function qs(a,b,c,d,e,f,g){var h,k=(new Jg).R("sidx",function(l){h=rs(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
872
|
-
function rs(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.
|
|
873
|
+
function rs(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Hc(),m=g.reader.Hc();g.reader.skip(2);var n=g.reader.ja();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.O(),q=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==q)throw new T(2,3,3006);h.push(new Gi(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 ss(a){this.h=Fb(a);this.g=new Gg(this.h,0)}ss.prototype.na=function(){return this.g.na()};
|
|
873
874
|
function ts(a){var b=us(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=us(a);a:{d=t(vs);for(var e=d.next();!e.done;e=d.next())if(yb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ra();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.ra()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ra();d=Fb(a.h,a.g.ra(),b);a.g.skip(b);return new ws(c,
|
|
874
875
|
d)}function us(a){var b=a.g.ra(),c=a.g.S();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Bb(a.h,b,c)}var vs=[[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 ws(a,b){this.id=a;this.g=b}
|
|
875
|
-
function xs(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 ys(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ss(a.g);for(var n=null,p=null;a.
|
|
876
|
-
function zs(a){var b=new ss(a.g);a=ts(b);if(179!=a.id)throw new T(2,3,3013);a=xs(a);b=ts(b);if(183!=b.id)throw new T(2,3,3012);b=new ss(b.g);for(var c=0;b.
|
|
876
|
+
function xs(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 ys(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ss(a.g);for(var n=null,p=null;a.na();){var q=ts(a);if(187==q.id){var u=zs(q);u&&(q=c*u.Ri,u=b+u.vi,null!=n&&m.push(new Gi(n+g,q+g,l,p,u-1,f,g,h,k)),n=q,p=u)}}null!=n&&m.push(new Gi(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
877
|
+
function zs(a){var b=new ss(a.g);a=ts(b);if(179!=a.id)throw new T(2,3,3013);a=xs(a);b=ts(b);if(183!=b.id)throw new T(2,3,3012);b=new ss(b.g);for(var c=0;b.na();){var d=ts(b);if(241==d.id){c=xs(d);break}}return{Ri:a,vi:c}};function As(a,b,c){b=ms(a,b,"Initialization");if(!b)return null;var d=a.I.La(),e=b.attributes.sourceURL;e&&(d=Od(d,[Ed(e)]));e=0;var f=null;if(b=mh(b,"range",rh))e=b.start,f=b.end;c=new Bi(function(){return d},e,f,Bs(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
|
|
877
878
|
function Cs(a,b,c){var d=Number(ls(a,Ds,"presentationTimeOffset"))||0,e=ls(a,Ds,"timescale"),f=1;e&&(f=th(e)||1);var g=d/f||0,h=As(a,Ds,c);Es(a,h);var k=Ie(a);return{Wb:function(){var l=ms(k,Ds,"RepresentationIndex");var m=k.I.La();l&&(l=Ed(l.attributes.sourceURL))&&(m=Od(m,[l]));l=Fs(k);return Gs(k,b,h,m,l.start,l.end,g)}}}
|
|
878
|
-
function Gs(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
879
|
-
3,3009);
|
|
880
|
-
D.next())
|
|
881
|
-
function Bs(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Vd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Is(a,b,c){var d=As(a,Js,c),e=Ks(a);if(!e.Ja&&!e.timeline&&1<e.
|
|
882
|
-
a.
|
|
883
|
-
function Ls(a,b,c,d,e,f,g,h){var k=d.
|
|
884
|
-
function Ms(a){return[a.I.Hb,a.
|
|
885
|
-
(p=d.segmentIndex);var q=a.
|
|
886
|
-
function Qs(a){var b=ks(a,Os),c=ls(a,Os,"media"),d=ls(a,Os,"index");return{Ja:b.Ja,timescale:b.timescale,ld:b.ld,Gb:b.Gb,
|
|
887
|
-
function Ss(a,b,c,d,e,f,g){function h(
|
|
888
|
-
v})}function l(){var
|
|
889
|
-
h(
|
|
879
|
+
function Gs(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H;return O(function(K){if(1==K.g)return h=a.presentationTimeline,k=!a.sb||!a.da.Ye,l=a.da.start,m=a.da.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Da,c.pa,!0):null],p=null,E(K,Promise.all(u),2);v=K.h;w=v[0];A=v[1]||null;y=null;C=l-g;z=l;B=m?l+m:Infinity;if("mp4"==n)var I=qs(w,e,d,c,C,z,B);else{I=w;var F=new ss(A);if(440786851!=ts(F).id)throw new T(2,3,3008);var M=ts(F);if(408125543!=M.id)throw new T(2,
|
|
880
|
+
3,3009);F=M.g.byteOffset;M=new ss(M.g);for(var N=null;M.na();){var L=ts(M);if(357149030==L.id){N=L;break}}if(!N)throw new T(2,3,3010);N=new ss(N.g);L=1E6;for(M=null;N.na();){var P=ts(N);if(2807729==P.id)L=xs(P);else if(17545==P.id)if(4==P.g.byteLength)M=P.g.getFloat32(0);else if(8==P.g.byteLength)M=P.g.getFloat64(0);else throw new T(2,3,3003);}if(null==M)throw new T(2,3,3011);N=L/1E9;M*=N;I=ts(new ss(I));if(475249515!=I.id)throw new T(2,3,3007);I=ys(I,F,N,M,d,c,C,z,B)}y=I;D=t(y);for(J=D.next();!J.done;J=
|
|
881
|
+
D.next())H=J.value,H.codecs=a.I.codecs,H.mimeType=a.I.mimeType;h.hd(y);q=new Lk(y);k&&q.vc(z,B,!0);return K.return(q)})}function Ds(a){return a.Kc}function Fs(a){var b=ms(a,Ds,"RepresentationIndex");a=ls(a,Ds,"indexRange");a=rh(a||"");b&&(a=mh(b,"range",rh,a));return a}function Es(a,b){Hs(a,b);if(!Fs(a))throw new T(2,4,4002);}function Hs(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Ud&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
882
|
+
function Bs(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Vd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Is(a,b,c){var d=As(a,Js,c),e=Ks(a);if(!e.Ja&&!e.timeline&&1<e.Cc.length)throw new T(2,4,4002);if(!e.Ja&&!a.da.duration&&!e.timeline&&1==e.Cc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.ia.id&&a.I.id&&(g=b[a.ia.id+","+a.I.id])&&(f=g.segmentIndex);var h=Ls(a.da.start,a.da.duration,a.I.La,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.gd(h,a.presentationTimeline.ib()):f=new Lk(h);a.presentationTimeline.hd(h);a.sb&&a.da.Ye||f.vc(a.da.start,
|
|
883
|
+
a.da.duration?a.da.start+a.da.duration:Infinity,b);g&&(g.segmentIndex=f);return{Wb:function(){f&&0!=f.getNumReferences()||f.Qd(h);return Promise.resolve(f)}}}function Js(a){return a.Hb}function Ks(a){var b=Ms(a);a=ks(a,Js);var c=a.ld;0==c&&(c=1);var d=0;a.Ja?d=a.Ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ja:a.Ja,startTime:d,ld:c,Gb:a.Gb,timeline:a.timeline,Cc:b}}
|
|
884
|
+
function Ls(a,b,c,d,e,f,g,h){var k=d.Cc.length;d.timeline&&d.timeline.length!=d.Cc.length&&(k=Math.min(d.timeline.length,d.Cc.length));for(var l=a-d.Gb,m=b?a+b:Infinity,n=[],p=d.startTime,q={},u=0;u<k;q={je:void 0,fe:void 0},u++){q.fe=d.Cc[u];var v=p;p=void 0;p=null!=d.Ja?v+d.Ja:d.timeline?d.timeline[u].end:v+b;q.je=null;q=new Gi(a+v,a+p,function(w){return function(){null==w.je&&(w.je=Od(c(),[w.fe.li]));return w.je}}(q),q.fe.start,q.fe.end,e,l,a,m,[],"",null,null,Hi,f);q.codecs=h;q.mimeType=g;n.push(q)}return n}
|
|
885
|
+
function Ms(a){return[a.I.Hb,a.ha.Hb,a.ia.Hb].filter(we).map(function(b){return fh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Ue&&(a.Ue=!0);var c=Ed(b.attributes.media);b=mh(b,"mediaRange",rh,{start:0,end:null});return{li:c,start:b.start,end:b.end}})};function Ns(a,b,c,d,e,f,g,h,k){k||a.I.Hd||(a.I.Hd=ls(a,Os,"initialization"));var l=a.I.Hd?Ps(a,g):null,m=Qs(a);Rs(m);var n=Ie(a);if(m.cd)return Hs(a,l),{Wb:function(){var w=js(m.cd,n.I.id,null,null,n.bandwidth||null,null);w=Od(n.I.La(),[w]);return Gs(n,b,l,w,0,null,m.Gb)}};if(m.Ja)return d||"image"===a.ha.contentType||"text"===a.ha.contentType||(a.presentationTimeline.hf(m.Ja),a.presentationTimeline.Ud(a.da.start)),{Wb:function(){return Ss(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.ia.id&&a.I.id&&(d=
|
|
886
|
+
a.ia.id+","+a.I.id,d=c[d])&&(p=d.segmentIndex);var q=a.da.start,u=a.da.duration?q+a.da.duration:Infinity,v=!(a.sb&&a.da.Ye);p?(c=p,Ts(c,m,q,u,v,l),c.Ca(a.presentationTimeline.ib())):p=new Us(m,a.I.id,a.bandwidth,a.I.La,q,u,l,v,g,a.I.zf);m.timeline&&"image"!==a.ha.contentType&&"text"!==a.ha.contentType&&a.presentationTimeline.zg(m.timeline,q);d&&a.sb&&(d.segmentIndex=p);return{Wb:function(){p instanceof Us&&0==p.getNumReferences()&&Ts(p,m,q,u,v,l);return Promise.resolve(p)}}}
|
|
887
|
+
function Os(a){return a.Qb}function Qs(a){var b=ks(a,Os),c=ls(a,Os,"media"),d=ls(a,Os,"index");return{Ja:b.Ja,timescale:b.timescale,ld:b.ld,Gb:b.Gb,Qf:b.Qf,timeline:b.timeline,Nb:c&&Ed(c),cd:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function Rs(a){var b=a.cd?1:0;b+=a.timeline?1:0;b+=a.Ja?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.cd&&(a.timeline=null),a.Ja=null);if(!a.cd&&!a.Nb)throw new T(2,4,4002);}
|
|
888
|
+
function Ss(a,b,c,d,e,f,g){function h(F){var M=(F-v)*u,N=M+b.Gb,L=M+n;M=L+u;var P=Math.min(M,l());L=new Gi(L,P,function(){var R=N*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(N)*BigInt(w));R=js(A,C,F,null,y,R);return Od(z(),[R])},0,null,d,B,n,l(),[],"",null,null,Hi,f);L.codecs=a.I.codecs;L.mimeType=a.I.mimeType;L.j=M;return L}function k(){var F=[Math.max(m.ib(),n),Math.min(m.Mb(),l())].map(function(M){return M-n});F=[Math.ceil(F[0]/u),Math.ceil(F[1]/u)-1];a.I.Oa&&F[1]++;return F.map(function(M){return M+
|
|
889
|
+
v})}function l(){var F=null!=p&&e[p]||q;return F?n+F:Infinity}var m=a.presentationTimeline,n=a.da.start,p=a.ia.id,q=a.da.duration,u=b.Ja,v=b.ld,w=b.timescale,A=b.Nb,y=a.bandwidth||null,C=a.I.id,z=a.I.La,B=n-b.Gb,D=k();c=a.sb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var J=c;J<=g;++J){var H=h(J);D.push(H)}var K=new Lk(D);D=m.Mb()<l();J=m.V();if(D||J){var I=Math.max(c,g+1);c=u;a.I.Oa&&(c=.1);K.ie(c,function(){var F=m.ib();K.Ca(F);var M=t(k());M.next();M=M.next().value;for(var N=[];I<=M;){var L=
|
|
890
|
+
h(I);N.push(L);I++}return F>l()&&!N.length?null:N})}return Promise.resolve(K)}function Ps(a,b){var c=a.I.Hd;c||(c=ls(a,Os,"initialization"));if(!c)return null;c=Ed(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.La;b=new Bi(function(){var g=js(c,d,null,null,e,null);return Od(f(),[g])},0,null,Bs(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
|
|
890
891
|
function Us(a,b,c,d,e,f,g,h,k,l){Lk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.j=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Vs(this)}ra(Us,Lk);r=Us.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Lk.prototype.release.call(this);this.h=null};
|
|
891
892
|
r.Ca=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
|
|
892
|
-
function Ts(a,b,c,d,e,f){Ws(a,f);if(a.h){c=a.h.timeline;a.h.
|
|
893
|
+
function Ts(a,b,c,d,e,f){Ws(a,f);if(a.h){c=a.h.timeline;a.h.Nb!==b.Nb&&(a.h.Nb=b.Nb);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.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;e&&Vs(a)}function Ws(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ji(c,b)}}
|
|
893
894
|
function Vs(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Ca(a.j)}}r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
|
|
894
|
-
r.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.
|
|
895
|
-
null==w.ke&&(w.ke=Xs(b.h.
|
|
896
|
-
function Xs(a,b,c,d,e,f,g){a=js(a,b,c,f,d||null,e);return Od(g(),[a]).map(function(h){return h.toString()})};function Ys(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,nd:null,colorGamut:null}}
|
|
897
|
-
function Zs(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var D=B.
|
|
898
|
-
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(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,q=null,u=null,v=null,w;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).R("mdhd",function(z){l=Zi(z.reader,z.version).language}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("mp4a",function(z){var B=aj(z.reader);p=B.channelCount;q=B.sampleRate;z.reader.
|
|
899
|
-
"mp4a",D,
|
|
900
|
-
c).box("av01",c).box("avcC",function(z){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}z=z.reader;z.skip(1);z=B+"."+dj(z.S())+dj(z.S())+dj(z.S());g.push(z);k=!0}).box("hvcC",function(z){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var D=z.reader;D.skip(1);z=D.S();var
|
|
901
|
-
dj(
|
|
902
|
-
function(z){var B=w||"",D=z.reader;D.skip(1);z=D.S();D=D.S();var
|
|
903
|
-
|
|
895
|
+
r.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Fi,f=this.h.Qf+d.Rf;c=this.j-this.h.Gb;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=[],n=(d.end-d.start)/d.wb,p={},q=0;q<d.wb;p={ke:void 0,Vg:void 0},q++){var u=d.start+n*q,v=u+n;p.Vg=q+1;p.ke=null;p=new Gi(this.j+u,this.j+v,function(w){return function(){if(!b.h)return[];
|
|
896
|
+
null==w.ke&&(w.ke=Xs(b.h.Nb,b.F,e,b.B,f,w.Vg,b.C));return w.ke}}(p),0,null,this.s,c,this.j,this.l,[],"",null,null,Hi,this.A);p.codecs=k;p.mimeType=l;0==this.G?0<q&&p.Od():0!=q%this.G&&p.Od();m.push(p)}c=new Gi(this.j+d.start,h,function(){return 0<d.wb||!b.h?[]:Xs(b.h.Nb,b.F,e,b.B,f,null,b.C)},0,null,this.s,c,this.j,this.l,m,"",null,null,Hi,this.A,0<d.wb);c.codecs=k;c.mimeType=l;c.j=g;this.g[a]=c}return c};
|
|
897
|
+
r.Kb=function(a){Vs(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Xs(a,b,c,d,e,f,g){a=js(a,b,c,f,d||null,e);return Od(g(),[a]).map(function(h){return h.toString()})};function Ys(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,nd:null,colorGamut:null}}
|
|
898
|
+
function Zs(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var D=B.ja(),J=B.ja();B.skip(50);n=String(D);m=String(J);z.reader.na()&&Qg(z)}function d(z){var B=aj(z.reader);p=B.channelCount;q=B.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
|
|
899
|
+
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(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,q=null,u=null,v=null,w;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).R("mdhd",function(z){l=Zi(z.reader,z.version).language}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("mp4a",function(z){var B=aj(z.reader);p=B.channelCount;q=B.sampleRate;z.reader.na()?Qg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
|
|
900
|
+
"mp4a",D,J;z.na();){D=z.S();for(var H=z.S();H&128;)H=z.S();if(3==D)z.ja(),H=z.S(),H&128&&z.ja(),H&64&&z.skip(z.S()),H&32&&z.ja();else if(4==D)J=z.S(),z.skip(12);else if(5==D)break}J&&(B+="."+dj(J),5==D&&z.na()&&(D=z.S(),J=(D&248)>>3,31===J&&z.na()&&(J=32+((D&7)<<3)+((z.S()&224)>>5)),B+="."+J));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",
|
|
901
|
+
c).box("av01",c).box("avcC",function(z){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}z=z.reader;z.skip(1);z=B+"."+dj(z.S())+dj(z.S())+dj(z.S());g.push(z);k=!0}).box("hvcC",function(z){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var D=z.reader;D.skip(1);z=D.S();var J=["","A","B","C"][z>>6],H=z&31,K=D.O(),I=(z&32)>>5?"H":"L";z=[D.S(),D.S(),D.S(),D.S(),D.S(),D.S()];D=D.S();for(var F=0,M=0;32>M;M++){F|=K&1;if(31==M)break;F<<=1;K>>=1}B=B+("."+J+H)+("."+
|
|
902
|
+
dj(F,!0));B+="."+I+D;J="";for(H=z.length;H--;)if((I=z[H])||J)J="."+I.toString(16).toUpperCase()+J;B+=J;g.push(B);k=!0}).box("dvcC",function(z){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var D=z.reader;D.skip(2);z=D.S();D=D.S();g.push(B+"."+ej(z>>1&127)+"."+ej(z<<5&32|D>>3&31));k=!0}).R("vpcC",function(z){var B=w||"",D=z.reader;z=D.S();var J=D.S();D=D.S()>>4&15;g.push(B+"."+ej(z)+"."+ej(J)+"."+ej(D));k=!0}).box("av1C",
|
|
903
|
+
function(z){var B=w||"",D=z.reader;D.skip(1);z=D.S();D=D.S();var J=z>>>5,H=(D&64)>>6;g.push(B+"."+J+"."+ej(z&31)+(D>>>7?"H":"M")+"."+ej(2===J&&H?(D&32)>>5?12:10:H?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+ej(1)+"."+ej(1)+"."+ej(1)+".0");k=!0}).box("enca",Ug).box("encv",Tg).box("sinf",Qg).box("frma",function(z){z=bj(z.reader).codec;e(z)}).box("colr",function(z){g=g.map(function(J){if(J.startsWith("av01.")){var H=z.reader,K=H.ra(),I=H.mb(4);var F=String.fromCharCode(I[0]);F+=String.fromCharCode(I[1]);
|
|
904
|
+
F+=String.fromCharCode(I[2]);F+=String.fromCharCode(I[3]);if("nclx"===F){I=H.ja();F=H.ja();var M=H.ja(),N=H.S()>>7,L=J.split(".");10==L.length&&(L[6]=ej(I),L[7]=ej(F),L[8]=ej(M),L[9]=String(N),J=L.join("."))}H.seek(K)}return J});var B=cj(z.reader),D=B.colorGamut;u=B.nd;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var C=new Hb("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);C.g()}return{type:A?"audio":"video",
|
|
904
905
|
mimeType:A?"audio/mp4":"video/mp4",codecs:$s(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:q,closedCaptions:y,nd:u,colorGamut:v}}function $s(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ge(d);b.has(e)||(c.push(d),b.add(e))}b=Vd("audio",c);d=Vd("video",c);a=Vd(Ud,c);d=at(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
905
906
|
function at(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?nb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function bt(a){var b=null;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("encv",Tg).box("enca",Ug).box("sinf",Qg).box("schi",Qg).R("tenc",function(c){c=c.reader;c.S();c.S();c.S();c.S();b=Kd(c.mb(16))}).parse(a,!0);return b};function ct(a){this.o=null;this.A=a;this.G=new jg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}ct.prototype.configure=function(a){this.o=a};ct.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};ct.prototype.setManifestType=function(a){this.s=a};
|
|
906
|
-
function dt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Od(a.i,[et(a,b)]),d=qg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),kg(a.G,e),wa(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=xd(f.data),h=JSON.parse(g),1==h.VERSION&&ft(a,h,f.uri),ya(l,0);if((k=za(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Sc(function(){dt(a,b)});a.g.Y(a.C);
|
|
907
|
+
function dt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Od(a.i,[et(a,b)]),d=qg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),kg(a.G,e),wa(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=xd(f.data),h=JSON.parse(g),1==h.VERSION&&ft(a,h,f.uri),ya(l,0);if((k=za(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Sc(function(){dt(a,b)});a.g.Y(a.C);G(l)})}
|
|
907
908
|
function et(a,b){if(!a.m.length)return b;b=new sc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&wc(b,e);return b.toString()}function ft(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Sc(function(){dt(a,d)});if(c=b.TTL)a.C=c;a.g.Y(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
908
909
|
function gt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}ct.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
909
|
-
function ht(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={
|
|
910
|
-
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 sc(k.location)).zb))return!1;return!0});d.length&&(a.B=d[0].pf);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:Od(a.i,d)};function it(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=it.prototype;r.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()};r.
|
|
911
|
-
r.
|
|
910
|
+
function ht(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={Fc:void 0},f=e.next())if(g.Fc=f.value,f=b.get(g.Fc))d.push({pf:g.Fc,location:f});else if(f=a.F.find(function(k){return function(l){return l.ij==k.Fc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].dh?(h=new sc(h),uc(h,f["URI-REPLACEMENT"].dh),d.push({pf:g.Fc,location:h.toString()})):d.push({pf:g.Fc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
911
|
+
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 sc(k.location)).zb))return!1;return!0});d.length&&(a.B=d[0].pf);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:Od(a.i,d)};function it(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=it.prototype;r.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()};r.Th=function(){return this.l};r.Se=function(){return this.j.slice()};r.Ah=function(){return this.i};
|
|
912
|
+
r.dg=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=
|
|
912
913
|
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)}};
|
|
913
|
-
function jt(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[kt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[lt(n),n]})),l=new Map(h.textStreams.map(function(n){return[mt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[nt(n),n]}));if(b){var m=ot(Ud);l.set(mt(m),m);m=ot("image");h.set(nt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{
|
|
914
|
-
r.ve=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
915
|
-
return E(ca,Promise.all([pt(d,d.h,v,n,qt,rt,m),pt(d,d.g,w,n,qt,rt,m),pt(d,d.j,A,n,qt,rt,m),pt(d,d.i,y,n,qt,rt,m)]),2)}C=0;z=[];if(d.g.length&&d.h.length)for(
|
|
916
|
-
allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),
|
|
917
|
-
function st(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
918
|
-
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.pe}).map(function(Q){return[nt(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=tt(b.qa),k.set(mt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=tt(b.pe),p.set(nt(q),q);u=new it;return E(P,pt(u,[],c,0,ut,vt,0),2);case 2:return v=P.h,E(P,pt(u,[],d,0,ut,vt,0),3);case 3:return w=P.h,E(P,pt(u,[],e,0,ut,vt,0),4);case 4:return A=P.h,E(P,pt(u,[],f,0,ut,vt,0),5);case 5:y=P.h;C=0;if(w.length&&v.length)for(
|
|
919
|
-
t(v),
|
|
920
|
-
function pt(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
921
|
-
z.next())for(D=B.value,
|
|
922
|
-
function Bt(a,b){var c,d,e,f,g,h;return O(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex());return E(k,Promise.all(c),2)}if(a.segmentIndex instanceof Ok)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);
|
|
914
|
+
function jt(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[kt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[lt(n),n]})),l=new Map(h.textStreams.map(function(n){return[mt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[nt(n),n]}));if(b){var m=ot(Ud);l.set(mt(m),m);m=ot("image");h.set(nt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Yf:c,$g:d,Wg:e,qg:f}}
|
|
915
|
+
r.ve=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F,M,N,L,P,R,Q;return O(function(ca){if(1==ca.g){e=Wd;if(!b&&1==a.length)return f=jt(a,!1),g=f.Yf,h=f.$g,k=f.Wg,l=f.qg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ca.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)q=a[p],d.m.has(q.id)||(d.m.add(q.id),-1==n&&(n=p));if(-1==n)return ca.return();u=jt(a,!0);v=u.Yf;w=u.$g;A=u.Wg;y=u.qg;
|
|
916
|
+
return E(ca,Promise.all([pt(d,d.h,v,n,qt,rt,m),pt(d,d.g,w,n,qt,rt,m),pt(d,d.j,A,n,qt,rt,m),pt(d,d.i,y,n,qt,rt,m)]),2)}C=0;z=[];if(d.g.length&&d.h.length)for(I=t(d.h),F=I.next();!F.done;F=I.next())for(M=F.value,N=t(d.g),L=N.next();!L.done;L=N.next())P=L.value,R=Lc(M.drmInfos,P.drmInfos),M.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=C++,z.push({id:Q,language:M.language,disabledUntilTime:0,primary:M.primary,audio:M,video:P,bandwidth:(M.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,
|
|
917
|
+
allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),J=D.next();!J.done;J=D.next())H=J.value,K=C++,z.push({id:K,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H.type==e.W?H:null,video:H.type==e.ga?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=z;G(ca)})};
|
|
918
|
+
function st(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F,M,N,L;return O(function(P){switch(P.g){case 1:b=Wd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.W}).map(function(Q){return[kt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ga}).map(function(Q){return[lt(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.qa}).map(function(Q){return[mt(Q),Q]}))});
|
|
919
|
+
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.pe}).map(function(Q){return[nt(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=tt(b.qa),k.set(mt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=tt(b.pe),p.set(nt(q),q);u=new it;return E(P,pt(u,[],c,0,ut,vt,0),2);case 2:return v=P.h,E(P,pt(u,[],d,0,ut,vt,0),3);case 3:return w=P.h,E(P,pt(u,[],e,0,ut,vt,0),4);case 4:return A=P.h,E(P,pt(u,[],f,0,ut,vt,0),5);case 5:y=P.h;C=0;if(w.length&&v.length)for(H=
|
|
920
|
+
t(v),K=H.next();!K.done;K=H.next())for(I=K.value,F=t(w),M=F.next();!M.done;M=F.next())N=M.value,L=C++,N.variantIds.push(L),I.variantIds.push(L);else for(z=w.concat(v),B=t(z),D=B.next();!D.done;D=B.next())J=D.value,J.variantIds=[C++];return P.return(w.concat(v).concat(A).concat(y))}})}
|
|
921
|
+
function pt(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I;return O(function(F){switch(F.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){F.u(4);break}n=m.value;return E(F,wt(a,n,c,d,f,h,g),5);case 5:p=F.h;if(!p)throw new T(2,4,4037);m=l.next();F.u(2);break;case 4:q=t(h);for(u=q.next();!u.done;u=q.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())y=A.value,(C=xt(a,y,c,e,f,h))&&b.push(C);z=t(h);for(B=z.next();!B.done;B=
|
|
922
|
+
z.next())for(D=B.value,J=t(D),H=J.next(),K={};!H.done;K={Hf:void 0},H=J.next())if(K.Hf=H.value,!yt(K.Hf)&&(I=b.some(function(M){return function(N){return zt(a,M.Hf,N)}}(K))))throw new T(2,4,4037);return F.return(b)}})}function wt(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return At(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,Bt(b,d+g),2):h.u(2):h.return(!1);Ct(b,d,e,f,g);return h.return(!0)})}
|
|
923
|
+
function Bt(a,b){var c,d,e,f,g,h;return O(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex());return E(k,Promise.all(c),2)}if(a.segmentIndex instanceof Ok)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);G(k)})}
|
|
923
924
|
function xt(a,b,c,d,e,f){if(yt(b))return null;var g=d(b);At(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Ok;return E(h,Bt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Ct(g,0,e,f,0);return g}
|
|
924
925
|
function Ct(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==De(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
925
926
|
function qt(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):
|
|
@@ -930,7 +931,7 @@ for(var g=new Ok,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.nex
|
|
|
930
931
|
function vt(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
931
932
|
function At(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=Dt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
932
933
|
function Dt(a,b,c){var d={audio:kt,video:lt,text:mt,image:nt}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return zt(a,l,m)},video:function(l,m){return zt(a,l,m)},text:Et,image:Ft}[c.type];for(var g={audio:Gt,video:Ht,text:It,image:Jt}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!yt(e)&&b.delete(d(e));return e}
|
|
933
|
-
function Kt(a,b){return a.mimeType!=b.mimeType?!1:Lt(a.codecs)===Lt(b.codecs)}r.
|
|
934
|
+
function Kt(a,b){return a.mimeType!=b.mimeType?!1:Lt(a.codecs)===Lt(b.codecs)}r.Kg=function(a){this.o=a};r.Rg=function(a){this.s=a};function zt(a,b,c){return!Kt(b,c)&&!a.o||b.drmInfos&&!Kc(b.drmInfos,c.drmInfos)?!1:!0}function Et(a,b){return b.language?a.forced!==b.forced||0==De(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Ft(){return!0}
|
|
934
935
|
function Gt(a,b,c){var d=Kt(a,b),e=Kt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=De(a.language,b.language);e=De(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length<
|
|
935
936
|
b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Mt(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Nt)return!0;if(d==Ot)return!1;d=Mt(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Nt?!0:d==Ot?!1:a.bandwidth&&Pt(a.bandwidth,b.bandwidth,c.bandwidth)==Nt?!0:!1}
|
|
936
937
|
function Ht(a,b,c){var d=Kt(a,b),e=Kt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Mt(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Nt)return!0;if(d==Ot)return!1;if(a.frameRate){d=Mt(a.frameRate,b.frameRate,c.frameRate);if(d==Nt)return!0;if(d==Ot)return!1}return a.bandwidth&&Pt(a.bandwidth,b.bandwidth,c.bandwidth)==Nt?!0:!1}
|
|
@@ -940,109 +941,109 @@ function tt(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType
|
|
|
940
941
|
function ot(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Lk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
|
|
941
942
|
function Mt(a,b,c){if(b==a&&a!=c)return Ot;if(c==a&&a!=b)return Nt;if(b>a){if(c<=a||c-a<b-a)return Nt;if(c-a>b-a)return Ot}else{if(c>a)return Ot;if(a-c<a-b)return Nt;if(a-c>a-b)return Ot}return Qt}function Pt(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Nt:b<a?Ot:Qt}function yt(a){switch(a.type){case Ud:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
942
943
|
function lt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,Lt(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function kt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,Lt(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function mt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
943
|
-
function nt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Lt(a){if(!Rt.has(a)){var b=ee(a);Rt.set(a,b)}return Rt.get(a)}S("shaka.util.PeriodCombiner",it);it.prototype.setUseStreamOnce=it.prototype.
|
|
944
|
+
function nt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Lt(a){if(!Rt.has(a)){var b=ee(a);Rt.set(a,b)}return Rt.get(a)}S("shaka.util.PeriodCombiner",it);it.prototype.setUseStreamOnce=it.prototype.Rg;it.prototype.setAllowMultiTypeVariants=it.prototype.Kg;it.prototype.combinePeriods=it.prototype.ve;it.prototype.deleteStream=it.prototype.dg;it.prototype.getImageStreams=it.prototype.Ah;it.prototype.getTextStreams=it.prototype.Se;it.prototype.getVariants=it.prototype.Th;
|
|
944
945
|
var Nt=1,Qt=0,Ot=-1,Rt=new Map;function St(a,b){var c=new DOMParser,d=Tt.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 Ut(a,b){try{var c=Ad(a);return St(c,b)}catch(d){return null}}
|
|
945
946
|
var Tt=new Jc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Vt(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ba=1;this.F=[];this.l={Sd:"",type:"",profiles:[],Db:null,Oa:0,La:null,jd:0};this.s=new Map;this.o={};this.B={};this.$={};this.m=new it;this.H=0;this.aa=new Va(5);this.J=new Sc(function(){Wt(a)});this.N=new jg;this.K=null;this.C=[];this.L=Infinity;this.G=!1;this.h=null;this.P=!1;this.U=[]}r=Vt.prototype;
|
|
946
|
-
r.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.J.lc();this.h&&this.h.configure(this.g);this.m&&(this.m.
|
|
947
|
+
r.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.J.lc();this.h&&this.h.configure(this.g);this.m&&(this.m.Kg(this.g.dash.multiTypeVariantsAllowed&&pb()),this.m.Rg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.G=b.isLowLatencyMode(),c.A=[a],c.j=b,E(e,Xt(c),2);d=e.h;c.j&&Yt(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
947
948
|
r.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={Sd:"",type:"",profiles:[],Db:null,Oa:0,La:null,jd:0};this.m=null;null!=this.J&&(this.J.stop(),this.J=null);this.h&&this.h.destroy();return this.N.destroy()};
|
|
948
|
-
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return wa(c,2),E(c,Xt(a),4);if(2!=c.g)return ya(c,0);b=za(c);if(!a.j||!b)return c.return();a.j.onError(b);
|
|
949
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return wa(c,2),E(c,Xt(a),4);if(2!=c.g)return ya(c,0);b=za(c);if(!a.j||!b)return c.return();a.j.onError(b);G(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.V()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Mb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Yt(this,0))}}};
|
|
949
950
|
r.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
950
951
|
function Xt(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=Zt(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=ht(a.h,"Location",!0),e.length&&(d=e)),f=qg(d,a.g.retryParameters),g=Date.now(),E(m,$t(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.j)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,au(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.aa.sample(1,l);return m.return(l)})}
|
|
951
952
|
function au(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=lm;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Ut(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Bd(h.outerHTML)}k=Yg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=mm;l!=m&&l(k);if("Patch"===d)return v.return(bu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(cu(a,k,c));
|
|
952
953
|
p=a.g.dash.xlinkFailGracefully;q=ps(k,a.g.retryParameters,p,c,a.j.networkingEngine);kg(a.N,q);return E(v,q.promise,2)}u=v.h;return v.return(cu(a,u,c))})}
|
|
953
|
-
function cu(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
954
|
-
"";a.l.jd=mh(b,"publishTime",ph)||0;a.F=fh(b,"PatchLocation");u=Promise.resolve();if((v=jh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new ct(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=hh(v))(y=mh(v,"queryBeforeStart",wh,!1))?u=dt(a.h,A):dt(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),gt(a.h,"Location",B,D)}
|
|
955
|
-
M=
|
|
954
|
+
function cu(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F,M,N,L,P,R,Q,ca,ea,la,Qa,ua,Aa,La,Ra,ma,bb,kb,qd,jf,rd,Pc,sd,he,td,kf,Di,Ei,zg,Fi,Ag;return O(function(Vb){switch(Vb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=fh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=hh(l))p=Od(d,[n])[0],m&&(a.h?gt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=ht(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.l.Sd=b.attributes.id||
|
|
955
|
+
"";a.l.jd=mh(b,"publishTime",ph)||0;a.F=fh(b,"PatchLocation");u=Promise.resolve();if((v=jh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new ct(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=hh(v))(y=mh(v,"queryBeforeStart",wh,!1))?u=dt(a.h,A):dt(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),gt(a.h,"Location",B,D)}J=fh(b,"BaseURL");H=!1;if(a.h)for(K=t(J),I=K.next();!I.done;I=K.next())F=I.value,
|
|
956
|
+
M=F.attributes.serviceLocation,N=hh(F),M&&N&&(gt(a.h,"BaseURL",M,N),H=!0);a.U=null;H&&a.h||(L=J.map(hh),a.U=Od(d,L));P=function(){return a.h&&H?ht(a.h,"BaseURL"):a.U?a.U:[]};a.l.La=P;R=0;J&&J.length&&(R=mh(J[0],"availabilityTimeOffset",vh)||0);a.l.Oa=R;Q=a.g.dash.ignoreMinBufferTime;ca=0;Q||(ca=mh(b,"minBufferTime",qh)||0);a.H=mh(b,"minimumUpdatePeriod",qh,-1);ea=mh(b,"availabilityStartTime",ph);la=mh(b,"timeShiftBufferDepth",qh);Qa=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Qa||(ua=mh(b,"suggestedPresentationDelay",
|
|
956
957
|
qh));Aa=a.g.dash.ignoreMaxSegmentDuration;La=null;Aa||(La=mh(b,"maxSegmentDuration",qh));Ra=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.P=a.i.presentationTimeline.V()&&"static"==Ra);a.l.type=Ra;du(a);if(a.i)for(ma=a.i.presentationTimeline,bb=t(Object.values(a.o)),kb=bb.next();!kb.done;kb=bb.next())qd=kb.value,qd.segmentIndex&&qd.segmentIndex.Ca(ma.ib());else jf=a.g.defaultPresentationDelay||1.5*ca,rd=null!=ua?ua:jf,ma=new pk(ea,rd,a.g.dash.autoCorrectDrift);ma.kc("static"==Ra);(Pc=
|
|
957
|
-
ma.V())&&!isNaN(a.g.availabilityWindowOverride)&&(la=a.g.availabilityWindowOverride);null==la&&(la=Infinity);ma.ge(la);sd=b.attributes.profiles||"";a.l.profiles=sd.split(",");he={sb:"static"!=Ra,presentationTimeline:ma,
|
|
958
|
-
a.G?ma.
|
|
959
|
-
minBufferTime:ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:gu(b),nextUrl:hu(b)};if(!ma.
|
|
960
|
-
function fu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.ve(b,!0,c),2);a.i.variants=a.m.l;d=a.m.Se();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);
|
|
961
|
-
function bu(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
958
|
+
ma.V())&&!isNaN(a.g.availabilityWindowOverride)&&(la=a.g.availabilityWindowOverride);null==la&&(la=Infinity);ma.ge(la);sd=b.attributes.profiles||"";a.l.profiles=sd.split(",");he={sb:"static"!=Ra,presentationTimeline:ma,ia:null,da:null,ha:null,I:null,bandwidth:0,Ue:!1,Oa:R,Db:null,profiles:sd.split(",")};td=eu(a,he,P,b,!1);kf=td.duration;Di=td.periods;("static"!=Ra||a.P)&&td.fg||ma.Ua(kf||Infinity);a.L&&!a.G&&(Ei=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.G=a.j.isLowLatencyMode());
|
|
959
|
+
a.G?ma.Lg(a.L):a.L&&$a("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");ma.hf(La||1);return E(Vb,u,2);case 2:return a.G&&(ca=0,zg=null!=ua?ua:a.g.defaultPresentationDelay,ma.Df(zg)),a.i?E(Vb,fu(a,td.periods,!1),4):E(Vb,a.m.ve(Di,he.sb),6);case 6:a.i={presentationTimeline:ma,variants:a.m.l,textStreams:a.m.Se(),imageStreams:a.m.i,offlineSessionIds:[],
|
|
960
|
+
minBufferTime:ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:gu(b),nextUrl:hu(b)};if(!ma.Yg()){Vb.u(7);break}Fi=fh(b,"UTCTiming");return E(Vb,iu(a,P,Fi),8);case 8:Ag=Vb.h;if(!a.j)return Vb.return();ma.Mg(Ag);case 7:ma.Md();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),G(Vb)}})}
|
|
961
|
+
function fu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.ve(b,!0,c),2);a.i.variants=a.m.l;d=a.m.Se();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);G(e)})}
|
|
962
|
+
function bu(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F,M;return O(function(N){if(1==N.g){c=b.attributes.mpdId;d=mh(b,"originalPublishTime",ph);if(!c||c!==a.l.Sd||d!==a.l.jd)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(eh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=yh(l.attributes.sel||""),n=m[m.length-1],p=hh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Jb){q=hh(l)||"";var L=qh(q);if(null!=L){a.l.Db=L;for(var P=t(a.s.values()),R=P.next();!R.done;R=P.next())R.value.Db=
|
|
962
963
|
L}}else if("type"===n.Jb){a.i.presentationTimeline.kc("static"==p);a.l.type=p;L=t(a.s.values());for(P=L.next();!P.done;P=L.next())P.value.sb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.Jb?a.l.jd=ph(p)||0:null===n.Jb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)zh(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&ju(a,n.id);else if("SegmentTemplate"===n.name){P=yh(l.attributes.sel||"");L=P[P.length-1];if(L.Jb){P=ku(a,P);R=hh(l)||
|
|
963
|
-
"";for(var Q=t(P),ca=Q.next();!ca.done;ca=Q.next())ca=a.s.get(ca.value),Bh(ca.I.
|
|
964
|
-
lu(a,
|
|
964
|
+
"";for(var Q=t(P),ca=Q.next();!ca.done;ca=Q.next())ca=a.s.get(ca.value),Bh(ca.I.Qb,l.tagName,L.Jb,R);L=P}else L=[];u=L;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){L=yh(l.attributes.sel||"");L=ku(a,L);P=t(L);for(R=P.next();!R.done;R=P.next())R=a.s.get(R.value),R=ms(R,Os,"SegmentTimeline"),Q=fh(R,"S"),zh(Q,l),R.children=Q;y=L;C=t(y);for(z=C.next();!z.done;z=C.next())B=z.value,g.add(B)}D=t(g);for(J=D.next();!J.done;J=D.next())H=J.value,
|
|
965
|
+
lu(a,H);K=t(f);for(I=K.next();!I.done;I=K.next())F=I.value,e.push.apply(e,x(eu(a,{sb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,ia:null,da:null,ha:null,I:null,bandwidth:0,Ue:!1,Oa:a.l.Oa,profiles:a.l.profiles,Db:a.l.Db},a.l.La,F,!0).periods));return e.length?E(N,fu(a,e,!0),2):N.u(2)}"static"==a.l.type&&(M=a.l.Db,a.i.presentationTimeline.Ua(M||Infinity));G(N)})}
|
|
965
966
|
function ju(a,b){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);ms(e,Os,"SegmentTimeline").children=[];lu(a,d);a.s.delete(d)}a.C=a.C.filter(function(f){return f!==b})}
|
|
966
|
-
function ku(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.s.values()),a=e.next();!a.done;a=e.next())a=a.value,a.
|
|
967
|
-
","+a.I.id);return b}function lu(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ca(a.i.presentationTimeline.ib());try{var e=Ns(c,function(f,g,h,k){return mu(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.$,c.I.aesKey,null,!0);d.createSegmentIndex=function(){return O(function(f){if(1==f.g)return d.segmentIndex?f.u(0):E(f,e.Wb(),3);d.segmentIndex=f.h;
|
|
967
|
+
function ku(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.s.values()),a=e.next();!a.done;a=e.next())a=a.value,a.ia.id===c&&a.ha.id===d&&a.I.id&&b.push(c+","+a.I.id);else if(-1<e)for(d=t(a.s.values()),a=d.next();!a.done;a=d.next())a=a.value,a.ia.id===c&&a.ha.position===e&&a.I.id&&b.push(c+
|
|
968
|
+
","+a.I.id);return b}function lu(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ca(a.i.presentationTimeline.ib());try{var e=Ns(c,function(f,g,h,k){return mu(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.$,c.I.aesKey,null,!0);d.createSegmentIndex=function(){return O(function(f){if(1==f.g)return d.segmentIndex?f.u(0):E(f,e.Wb(),3);d.segmentIndex=f.h;G(f)})}}catch(f){if(b=c.I.contentType,b!=Ud&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
968
969
|
function gu(a){var b=jh(a,"ServiceDescription");if(!b)return null;a=jh(b,"Latency");b=jh(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)));
|
|
969
970
|
return c}function hu(a){a=fh(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}
|
|
970
971
|
function eu(a,b,c,d,e){var f=b.Db;f||(f=mh(d,"mediaPresentationDuration",qh),a.l.Db=f);var g=0;a.i&&a.i.presentationTimeline&&a.P&&(g=a.i.presentationTimeline.Bb());var h=[],k=g;d=fh(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=mh(m,"start",qh,k),q=m.attributes.id,u=mh(m,"duration",qh);p=0==l&&0==p&&a.P?g:p;var v=null;if(n){var w=mh(n,"start",qh);null!=w&&(v=w-p+g)}else null!=f&&(v=f-p+g);null==v&&(v=u);if(!(null!==a.K&&null!==q&&null!==p&&p<a.K)||a.C.includes(q)||l+1==d.length){null!==
|
|
971
|
-
p&&(null===a.K||p>a.K)&&(a.K=p);k=nu(a,b,c,{start:p,duration:v,node:m,Ye:null==v||!n});h.push(k);b.
|
|
972
|
-
function du(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.
|
|
973
|
-
function nu(a,b,c,d){b.
|
|
974
|
-
4,4018);}d=c.filter(function(m){return!m.
|
|
975
|
-
d,Ud);d=ru(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.
|
|
976
|
-
function qu(a,b,c,d){function e(
|
|
972
|
+
p&&(null===a.K||p>a.K)&&(a.K=p);k=nu(a,b,c,{start:p,duration:v,node:m,Ye:null==v||!n});h.push(k);b.ia.id&&v&&(a.$[b.ia.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,fg:!1}:{periods:h,duration:k,fg:!0}}
|
|
973
|
+
function du(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.dg(a.o[e],c),delete a.o[e];delete a.B[c]}}
|
|
974
|
+
function nu(a,b,c,d){b.ia=ou(a,d.node,null,c);b.da=d;b.ia.Oa=b.Oa;b.ia.id||(b.ia.id="__shaka_period_"+d.start);var e=fh(d.node,"EventStream");c=b.presentationTimeline.ib();e=t(e);for(var f=e.next();!f.done;f=e.next())pu(a,d.start,d.duration,f.value,c);c=fh(d.node,"AdaptationSet").map(function(m,n){return qu(a,b,n,m)}).filter(we);if(b.sb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.zi);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,
|
|
975
|
+
4,4018);}d=c.filter(function(m){return!m.Of});c=c.filter(function(m){return m.Of});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Of.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={If:void 0},k=h.next())l.If=k.value,l.If.trickModeVideo=e.streams.find(function(m){return function(n){return ee(m.If.codecs)==ee(n.codecs)}}(l))}}c=ru(a.g.disableAudio,d,"audio");e=ru(a.g.disableVideo,d,"video");f=ru(a.g.disableText,
|
|
976
|
+
d,Ud);d=ru(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.ia.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function ru(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
977
|
+
function qu(a,b,c,d){function e(F){switch(F){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ha=ou(a,d,b.ia,null);b.ha.position=c;var g=!1;c=fh(d,"Role");var h=c.map(function(F){return F.attributes.value}).filter(we),k=void 0,l=b.ha.contentType==Ud;l&&(k="subtitle");c=t(c);for(var m=c.next();!m.done;m=c.next()){m=m.value;var n=m.attributes.schemeIdUri;
|
|
977
978
|
if(null==n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":g=!0;break;case "caption":case "subtitle":k=m}}var p,q;n=fh(d,"EssentialProperty");c=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?c=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?q=e(parseInt(v.attributes.value,10)):
|
|
978
979
|
"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=fh(d,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(q=e(parseInt(v.attributes.value,10)));n=fh(d,"Accessibility");
|
|
979
|
-
var y=new Map,C;n=t(n);for(v=n.next();!v.done;v=n.next())if(w=v.value,v=w.attributes.schemeIdUri,w=w.attributes.value,"urn:scte:dash:cc:cea-608:2015"==v)if(v=1,null!=w){w=w.split(";");for(var z=t(w),B=z.next();!B.done;B=z.next()){var D=B.value,
|
|
980
|
-
w.next())B=z.value,D=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,D=B),y.set(z,ze(D));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?C="visually impaired":"2"==w&&(C="hard of hearing"));if(m)return null;m=fh(d,"ContentProtection");var
|
|
981
|
-
(m=fh(d,"Label"))&&m.length&&(m=gh(m[0]))&&(
|
|
982
|
-
b.
|
|
983
|
-
function su(a,b,c,d,e,f,g,h,k,l,m,n){b.I=ou(a,l,b.
|
|
984
|
-
16!=M.data.byteLength)throw new T(2,4,4049);N={name:"AES-CBC"};L=w;return E(P,window.crypto.subtle.importKey("raw",M.data,N,!0,["decrypt"]),3)}L.cryptoKey=P.h;w.fetchKey=void 0;
|
|
985
|
-
N.codecs=
|
|
986
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(M.attributes.schemeIdUri)}))&&(
|
|
987
|
-
(
|
|
988
|
-
closedCaptions:k,hdr:
|
|
989
|
-
function vu(a){function b(c){if(!c)return null;c=Ie(c);c.
|
|
990
|
-
function Wt(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,wa(d,2),E(d,Xt(a),4);case 4:b=d.h;ya(d,3);break;case 2:if(c=za(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();Yt(a,b);
|
|
991
|
-
function ou(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vd:null,audioSamplingRate:null,Oa:0,
|
|
980
|
+
var y=new Map,C;n=t(n);for(v=n.next();!v.done;v=n.next())if(w=v.value,v=w.attributes.schemeIdUri,w=w.attributes.value,"urn:scte:dash:cc:cea-608:2015"==v)if(v=1,null!=w){w=w.split(";");for(var z=t(w),B=z.next();!B.done;B=z.next()){var D=B.value,J=B=void 0;D.includes("=")?(D=D.split("="),B=D[0].startsWith("CC")?D[0]:"CC"+D[0],J=D[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,J=D);y.set(B,ze(J))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==v)if(v=1,null!=w)for(w=t(w.split(";")),z=w.next();!z.done;z=
|
|
981
|
+
w.next())B=z.value,D=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,D=B),y.set(z,ze(D));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?C="visually impaired":"2"==w&&(C="hard of hearing"));if(m)return null;m=fh(d,"ContentProtection");var H=Zr(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),K=ze(b.ha.language||"und"),I=d.attributes.label;
|
|
982
|
+
(m=fh(d,"Label"))&&m.length&&(m=gh(m[0]))&&(I=m);m=fh(d,"Representation");d=m.map(function(F){if(F=su(a,b,H,k,K,I,g,h,y,F,C,A))F.hdr=F.hdr||p,F.colorGamut=F.colorGamut||q,F.fastSwitching=u;return F}).filter(function(F){return!!F});if(0==d.length){c="image"==b.ha.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new T(2,4,4003);}if(!b.ha.contentType||"application"==b.ha.contentType)for(b.ha.contentType=tu(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=
|
|
983
|
+
b.ha.contentType;l=b.ha.id||"__fake__"+a.ba++;n=t(d);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(H.drmInfos);for(z=w.next();!z.done;z=w.next())z=z.value,z.keyIds=z.keyIds&&v.keyIds?new Set([].concat(x(z.keyIds),x(v.keyIds))):z.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(F){return F.attributes.id}).filter(we);return{id:l,contentType:b.ha.contentType,language:K,Rj:g,streams:d,drmInfos:H.drmInfos,Of:c,zi:m}}
|
|
984
|
+
function su(a,b,c,d,e,f,g,h,k,l,m,n){b.I=ou(a,l,b.ha,null);var p=b.I.id;a.L=Math.min(a.L,b.I.Oa);if(!uu(b.I))return null;var q=b.da.start;b.bandwidth=mh(l,"bandwidth",th)||0;var u=b.I.contentType,v=u==Ud||"application"==u;u="image"==u;try{var w=void 0;if(c.re){var A=b.I.La,y=Od(A(),[c.re.fi]),C=qg(y,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.re.iv,firstMediaSequenceNumber:0,fetchKey:function(){var M,N,L;return O(function(P){if(1==P.g)return E(P,$t(a,C,6),2);if(3!=P.g){M=P.h;if(!M.data||
|
|
985
|
+
16!=M.data.byteLength)throw new T(2,4,4049);N={name:"AES-CBC"};L=w;return E(P,window.crypto.subtle.importKey("raw",M.data,N,!0,["decrypt"]),3)}L.cryptoKey=P.h;w.fetchKey=void 0;G(P)})}}}b.I.aesKey=w;A=function(M,N,L,P){return mu(a,M,N,L,P)};if(b.I.Kc)var z=Cs(b,A,w);else if(b.I.Hb)z=Is(b,a.o,w);else if(b.I.Qb)z=Ns(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.$,w,n,!1);else{var B=b.da.duration||0,D=b.I.La,J=b.I.mimeType,H=b.I.codecs;z={Wb:function(){var M=Nk(q,B,D());M.Kb(function(N){N.mimeType=J;
|
|
986
|
+
N.codecs=H});return Promise.resolve(M)}}}}catch(M){if((v||u)&&4002==M.code)return null;throw M;}n=fh(l,"ContentProtection");n=cs(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;fh(l,"SupplementalProperty").some(function(M){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==M.attributes.schemeIdUri&&"JOC"==M.attributes.value})&&(A=!0);y=!1;v&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(u&&((l=fh(l,"EssentialProperty").find(function(M){return["http://dashif.org/thumbnail_tile",
|
|
987
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(M.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var I;v=b.I.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"))&&(I="PQ");l=b.I.id?b.ia.id+","+b.I.id:"";a.F.length&&p&&a.s.set(b.ia.id+","+p,vu(b));var F=l&&a.o[l]?a.o[l]:{id:a.ba++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){F.segmentIndex&&
|
|
988
|
+
(F.segmentIndex.release(),F.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:v,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ha.language,label:f,type:b.ha.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.I.Vd,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:A,
|
|
989
|
+
closedCaptions:k,hdr:I,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Yd(b.I.mimeType,b.I.codecs)])};F.createSegmentIndex=function(){var M;return O(function(N){if(1==N.g){if(F.segmentIndex)return N.u(0);M=F;return E(N,z.Wb(),3)}M.segmentIndex=N.h;G(N)})};l&&b.sb&&!a.o[l]&&(b=b.ia.id||"",a.B[b]||(a.B[b]=[]),a.o[l]=F,a.B[b].push(l));return F}
|
|
990
|
+
function vu(a){function b(c){if(!c)return null;c=Ie(c);c.Kc=null;c.Hb=null;c.Qb=Dh(c.Qb);return c}a=Ie(a);a.ia=b(a.ia);a.ha=b(a.ha);a.I=b(a.I);a.da&&(a.da=Ie(a.da),a.da.node=null);return a}
|
|
991
|
+
function Wt(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,wa(d,2),E(d,Xt(a),4);case 4:b=d.h;ya(d,3);break;case 2:if(c=za(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();Yt(a,b);G(d)}})}function Yt(a,b){if(!(0>a.H)){var c=a.H;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.J.Y(Math.max(c-b,Wa(a.aa)))}}
|
|
992
|
+
function ou(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vd:null,audioSamplingRate:null,Oa:0,zf:0};d=d||c.La;var e=b.attributes.id,f=fh(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=hh(m);l&&m&&(gt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(hh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=nh(b,
|
|
992
993
|
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=$s(m).join(",");n=mh(b,"frameRate",xh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,q=wu(fh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=fh(b,"AudioChannelConfiguration");u=Ju(u)||c.Vd;var v=mh(b,"audioSamplingRate",uh)||c.audioSamplingRate;k||(k=tu(l,m));var w=jh(b,"SegmentBase"),A=jh(b,"SegmentTemplate"),y=w?mh(w,"availabilityTimeOffset",vh)||0:0,C=A?mh(A,"availabilityTimeOffset",vh)||0:0,z=f&&f.length?mh(f[0],"availabilityTimeOffset",
|
|
993
|
-
vh)||0:0;y=c.Oa+z+y+C;C=null;(z=jh(b,"SegmentSequenceProperties"))&&(z=jh(z,"SAP"))&&(C=mh(z,"cadence",sh));return{La:function(){return Od(d(),f.length?a.h&&h?ht(a.h,e):g?g:[]:[])},
|
|
994
|
+
vh)||0:0;y=c.Oa+z+y+C;C=null;(z=jh(b,"SegmentSequenceProperties"))&&(z=jh(z,"SAP"))&&(C=mh(z,"cadence",sh));return{La:function(){return Od(d(),f.length?a.h&&h?ht(a.h,e):g?g:[]:[])},Kc:w||c.Kc,Hb:jh(b,"SegmentList")||c.Hb,Qb:A||c.Qb,width:mh(b,"width",uh)||c.width,height:mh(b,"height",uh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:q,id:e,language:b.attributes.lang,Vd:u,audioSamplingRate:v,Oa:y,Hd:null,zf:C||c.zf}}
|
|
994
995
|
function wu(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}
|
|
995
996
|
function Ju(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
|
|
996
997
|
16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&0<b&&b<c.length)return c[b]}}return null}
|
|
997
|
-
function uu(a){var b=a.
|
|
998
|
+
function uu(a){var b=a.Kc?1:0;b+=a.Hb?1:0;b+=a.Qb?1:0;if(0==b)return a.contentType==Ud||"application"==a.contentType?!0:!1;1!=b&&(a.Kc&&(a.Hb=null),a.Qb=null);return!0}
|
|
998
999
|
function Ku(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Ed(c)],f=Od(b(),e),g=qg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),kg(a.N,h),E(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=xd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
999
1000
|
function iu(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;wa(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);
|
|
1000
1001
|
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":$a("NTP UTCTiming scheme is not supported");break;default:$a("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,Ku(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return E(n,Ku(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ya(n,
|
|
1001
1002
|
3);break;case 5:za(n);case 3:g=f.next();n.u(2);break;case 4:return $a("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
1002
1003
|
function pu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=mh(d,"timescale",uh)||1,k=mh(d,"presentationTimeOffset",uh)||0;d=t(fh(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=mh(l,"presentationTime",uh)||0,n=mh(l,"duration",uh)||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:Ch(l),eventNode:Dh(l)},a.j.onTimelineRegionAdded(l))}}
|
|
1003
1004
|
function mu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=wg,g=e?0:1,h=pl(b,c,d,a.g.retryParameters),E(l,$t(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function tu(a,b){b=Yd(a,b);return ne(b)?Ud:a.split("/")[0]}function $t(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);kg(a.N,b);return b.promise}
|
|
1004
|
-
function Zt(a){var b=a.l.jd;if(!a.l.Sd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=uh(e.attributes.ttl);return!e||b+e>c}).map(hh).filter(we);return d.length?Od(a.A,d):[]}S("shaka.dash.DashParser",Vt);wi["application/dash+xml"]=function(){return new Vt};wi["video/vnd.mpeg.dash.mpd"]=function(){return new Vt};function Lu(){}S("shaka.dependencies",Lu);Lu.has=function(a){return Mu.has(a)};Lu.add=function(a,b){if(!Nu[a])throw Error(a+" is not supported");a==Ou?rb("mux.js","mux.js is no longer used in Shaka Player."):Mu.set(a,function(){return b})};var Ou="muxjs",Nu={
|
|
1005
|
+
function Zt(a){var b=a.l.jd;if(!a.l.Sd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=uh(e.attributes.ttl);return!e||b+e>c}).map(hh).filter(we);return d.length?Od(a.A,d):[]}S("shaka.dash.DashParser",Vt);wi["application/dash+xml"]=function(){return new Vt};wi["video/vnd.mpeg.dash.mpd"]=function(){return new Vt};function Lu(){}S("shaka.dependencies",Lu);Lu.has=function(a){return Mu.has(a)};Lu.add=function(a,b){if(!Nu[a])throw Error(a+" is not supported");a==Ou?rb("mux.js","mux.js is no longer used in Shaka Player."):Mu.set(a,function(){return b})};var Ou="muxjs",Nu={Sj:Ou,ISOBoxer:"ISOBoxer"};Lu.Allowed=Nu;var Mu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Pu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Qu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Qu.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};
|
|
1005
1006
|
function Ru(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 Su(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=Su(a,b))?a.value:c||null}function Tu(a,b){a=Su(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Uu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.wb=c}function Vu(a,b){this.name=a;this.value=b};function Wu(a,b){return a.filter(function(c){return c.name==b})}function Xu(a,b){return a.filter(function(c){return Tu(c,"TYPE")==b})}function Yu(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 Zu(a,b,c){c=void 0===c?0:c;return(a=Yu(a,b))?Number(a.value):c}function $u(a,b,c){return b?av(a,[b],c):[]}
|
|
1006
1007
|
function av(a,b,c){if(!b.length)return[];b=Od(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new T(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function bv(){this.g=0}
|
|
1007
1008
|
function cv(a,b){b=xd(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=dv(a,f),--a.g,ev.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=dv(a,g);if(fv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
1008
1009
|
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=dv(a,k),ev.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 Uu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Uu("",d,f)));return new Pu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
1009
1010
|
g.name&&(g.attributes.push(new Vu("URI",h)),d=!0)}}return new Pu(b,e)}function dv(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 zp(d);var f;(f=Bp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Bp(d,g);)c.push(new Vu(f[1],f[2]||f[3])),Ap(d)}return new Qu(a,b,c,e)}
|
|
1010
1011
|
var ev="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),fv="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 gv(){}function hv(a){try{var b=iv(a);return cg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return ag(c)}}
|
|
1011
|
-
function iv(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=Id(a):e=Bd(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",gv);gv.parse=hv;mg("data",hv);function jv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Ud,new Map);this.N.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.L="";this.Ba=new bv;this.J=-1;this.aa=Infinity;this.$=this.qb=this.rb=!1;this.A=new Sc(function(){kv(a)});this.oa=lv;this.o=null;this.Fa=0;this.m=Infinity;this.
|
|
1012
|
-
new Map;this.K=new Map;this.
|
|
1013
|
-
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.U&&(a.push(this.U.destroy()),this.U=null);this.g=this.h=null;this.Ea.clear();this.o=null;this.i.clear();this.H.clear();this.G.clear();this.s.clear();this.ba.clear();this.
|
|
1014
|
-
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!ov(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(pv(a,g));return E(m,Promise.all(b),2)}qv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n
|
|
1015
|
-
h&&tv(a);
|
|
1016
|
-
function pv(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
1017
|
-
b.M().includes(m)||b.
|
|
1018
|
-
0,
|
|
1012
|
+
function iv(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=Id(a):e=Bd(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",gv);gv.parse=hv;mg("data",hv);function jv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Ud,new Map);this.N.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.L="";this.Ba=new bv;this.J=-1;this.aa=Infinity;this.$=this.qb=this.rb=!1;this.A=new Sc(function(){kv(a)});this.oa=lv;this.o=null;this.Fa=0;this.m=Infinity;this.va=this.ua=this.P=0;this.U=new jg;this.F=new Map;this.G=new Map;this.ba=new Map;this.la=
|
|
1013
|
+
new Map;this.K=new Map;this.ta=new Map;this.ma=new Map;this.hb=this.C=!1;this.Ka=new Va(5);this.j=null;this.fa=!0}r=jv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.C=b.isLowLatencyMode(),E(e,mv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,E(e,nv(c,d.data,a),3)):e.return(c.o)})};
|
|
1014
|
+
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.U&&(a.push(this.U.destroy()),this.U=null);this.g=this.h=null;this.Ea.clear();this.o=null;this.i.clear();this.H.clear();this.G.clear();this.s.clear();this.ba.clear();this.la.clear();this.K.clear();this.ta.clear();this.ma.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
1015
|
+
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!ov(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(pv(a,g));return E(m,Promise.all(b),2)}qv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.$c});d.length&&!h&&(k=rv,sv(a,k.eh),l=d.map(function(n){return n.Cb}),a.l.Ua(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
1016
|
+
h&&tv(a);G(m)})};function uv(a,b){return ov(a)?a.N.get(b.type):b.Pd}
|
|
1017
|
+
function pv(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F,M,N,L,P;return O(function(R){if(1==R.g){c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new sc(f),h=g.g,b.td&&(0<=b.kb&&h.add("_HLS_msn",String(b.kb)),0<=b.lb&&h.add("_HLS_part",String(b.lb))),b.ud&&h.add("_HLS_skip","YES"),Hc(h)&&wc(g,h),c.push(g.toString());return E(R,mv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=cv(a.Ba,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
|
|
1018
|
+
b.M().includes(m)||b.Eg.push(m);n=Wu(l.g,"EXT-X-DEFINE");p=vv(a,n,m);q=b.stream;u=uv(a,b);return E(R,wv(a,l,q.mimeType,b.M,p),3)}v=R.h;w=v.keyIds;A=v.drmInfos;y=function(Q,ca){return Q.size===ca.size&&[].concat(x(Q)).every(function(ea){return ca.has(ea)})};y(q.keyIds,w)||(q.keyIds=w,q.drmInfos=A,a.h.newDrmInfo(q));C=xv(a,l,u,p,b.M,b.type);z=C.segments;if(B=C.bandwidth)q.bandwidth=B;q.segmentIndex.gd(z,a.l.ib());z.length&&(D=Zu(l.g,"EXT-X-MEDIA-SEQUENCE",0),H=(J=Yu(l.g,"EXT-X-SKIP"))?Number(Z(J,"SKIPPED-SEGMENTS")):
|
|
1019
|
+
0,K=yv(D,z),I=K.kb,F=K.lb,b.kb=I+H,b.lb=F,M=u.get(D),q.segmentIndex.Ca(M));N=q.segmentIndex.g[0]||null;b.fc=N.startTime;L=z[z.length-1];b.Cb=L.endTime;if(P=Yu(l.g,"EXT-X-ENDLIST"))b.$c=!0;zv(a,l);G(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
1019
1020
|
function Av(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.J,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=uv(a,f);if(g=g.g[0]||null){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.J=Math.max(a.J,l));f.Ae=l;break}}}}if(!(0>a.J))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Bv(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.J-d.Ae,0<f&&(e.g.splice(0,f),e=e.g[0]||null))e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
1020
1021
|
Cv(a,d,e)}
|
|
1021
|
-
function Dv(a,b){if(Infinity==a.aa){b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.stream.segmentIndex.g[0]||null,null!=c&&null!=c.h&&(a.aa=Math.min(a.aa,c.h))}b=a.aa;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Bv(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(f)if(null==f.h)Za("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.M(),"Expect AV sync issues!");else for(Cv(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.
|
|
1022
|
+
function Dv(a,b){if(Infinity==a.aa){b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.stream.segmentIndex.g[0]||null,null!=c&&null!=c.h&&(a.aa=Math.min(a.aa,c.h))}b=a.aa;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Bv(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(f)if(null==f.h)Za("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.M(),"Expect AV sync issues!");else for(Cv(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Kf(b)}}}}
|
|
1022
1023
|
function Cv(a,b,c){b.fc+=c;b.Cb+=c;a=uv(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}
|
|
1023
|
-
function nv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
1024
|
-
u=Wu(d.g,"EXT-X-SESSION-DATA");v=Wu(d.g,"EXT-X-CONTENT-STEERING");Gv(a,u);return E(ma,Hv(a,v),4);case 4:return Iv(a,m),Jv(a,l),E(ma,Kv(a,m,q,l,k,a.s),5);case 5:return f=ma.h,g=Lv(a,l),E(ma,Mv(a,n,p),6);case 6:h=ma.h;ma.u(3);break;case 7:return y=ma.h,C=y.type,z=y.mimeType,B=y.codecs,D=y.language,
|
|
1025
|
-
Ov(L.stream,
|
|
1024
|
+
function nv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F,M,N,L,P,R,Q,ca,ea,la,Qa,ua,Aa,La,Ra;return O(function(ma){switch(ma.g){case 1:d=cv(a.Ba,b);e=Wu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new pk(null,0);a.l.kc(!0);k=function(){return[c]};if(1==d.type)return a.fa=!1,w=Wu(d.g,"EXT-X-DEFINE"),A=vv(a,w,a.L),E(ma,Ev(a,d,k,A),7);Fv(a,e);l=Wu(d.g,"EXT-X-MEDIA");m=Wu(d.g,"EXT-X-STREAM-INF");n=Wu(d.g,"EXT-X-IMAGE-STREAM-INF");p=Wu(d.g,"EXT-X-I-FRAME-STREAM-INF");q=Wu(d.g,"EXT-X-SESSION-KEY");
|
|
1025
|
+
u=Wu(d.g,"EXT-X-SESSION-DATA");v=Wu(d.g,"EXT-X-CONTENT-STEERING");Gv(a,u);return E(ma,Hv(a,v),4);case 4:return Iv(a,m),Jv(a,l),E(ma,Kv(a,m,q,l,k,a.s),5);case 5:return f=ma.h,g=Lv(a,l),E(ma,Mv(a,n,p),6);case 6:h=ma.h;ma.u(3);break;case 7:return y=ma.h,C=y.type,z=y.mimeType,B=y.codecs,D=y.language,J=y.height,H=y.width,K=y.channelCount,I=y.sampleRate,F=y.closedCaptions,M=y.nd,N=y.colorGamut,E(ma,Nv(a,a.B++,A,d,k,B,C,D,!0,"Media Playlist",K,F,null,!1,I,!1,z),8);case 8:L=ma.h,a.i.set(c,L),"video"==C&&
|
|
1026
|
+
Ov(L.stream,H,J,null,M,null,N),f.push({id:0,language:ze(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==C?L.stream:null,video:"video"==C?L.stream:null,bandwidth:L.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==d.type&&(ov(a)&&(Pv(a,d),P=a.m,a.A.Y(P)),R=Array.from(a.i.values()),Qv(a,R),tv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
1026
1027
|
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){ma.u(9);break}Q=[];ca=t(a.o.variants);for(ea=ca.next();!ea.done;ea=ca.next())la=ea.value,la.audio&&""===la.audio.codecs&&Q.push(la.audio.createSegmentIndex()),la.video&&""===la.video.codecs&&Q.push(la.video.createSegmentIndex());return E(ma,Promise.all(Q),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){Qa=
|
|
1027
1028
|
[];ua=f[0];Aa=t([ua.video,ua.audio]);for(La=Aa.next();!La.done;La=Aa.next())(Ra=La.value)&&!Ra.segmentIndex&&Qa.push(Ra.createSegmentIndex());if(0<Qa.length)return E(ma,Promise.all(Qa),0)}ma.u(0)}})}
|
|
1028
|
-
function Ev(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
1029
|
-
t(Uv(null,y.value)),w=C.next().value,A=C.next().value;z=pl(g,w,A,a.g.retryParameters);return E(
|
|
1030
|
-
case "opus":N.push("opus"),L=!0}switch(M.video){case "avc":
|
|
1031
|
-
sampleRate:null,closedCaptions:L,nd:null,colorGamut:null}}else
|
|
1029
|
+
function Ev(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H;return O(function(K){switch(K.g){case 1:e=Ys(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return K.return(e);f=b.segments[0];g=$u(c(),f.h,d);h=g[0];k=new sc(h);l=k.Na.split(".").pop();if(m=Rv[l])return K.return(Ys(m));n=wg;p=null;q=Sv(a,b,f.g,c,d);a.ba.clear();if(!q){K.u(2);break}u=pl(q.M(),q.ac(),q.Yb(),a.g.retryParameters);return E(K,Tv(a,u,n,{type:0}),3);case 3:v=K.h,p=v.data;case 2:w=0;A=null;if(y=Yu(f.g,"EXT-X-BYTERANGE"))C=
|
|
1030
|
+
t(Uv(null,y.value)),w=C.next().value,A=C.next().value;z=pl(g,w,A,a.g.retryParameters);return E(K,Tv(a,z,n,{type:1}),4);case 4:B=K.h;(D=B.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var I=B.data;var F=Bb(I);F=(new wj).parse(F);var M=F.Vc();F=F.Te();var N=[],L=!1,P=!1;switch(M.audio){case "aac":case "aac-loas":N.push("mp4a.40.2");L=!0;break;case "mp3":N.push("mp4a.40.34");L=!0;break;case "ac3":N.push("ac-3");L=!0;break;case "ec3":N.push("ec-3");L=!0;break;
|
|
1031
|
+
case "opus":N.push("opus"),L=!0}switch(M.video){case "avc":F.codec?N.push(F.codec):N.push("avc1.42E01E");P=!0;break;case "hvc":F.codec?N.push(F.codec):N.push("hvc1.1.6.L93.90");P=!0;break;case "av1":N.push("av01.0.01M.08"),P=!0}if(N.length){M=L&&!P;L=new Map;if(P){P=new Hb("video/mp2t");P.i(I);I=t(P.j());for(var R=I.next();!R.done;R=I.next())R=R.value,L.set(R,R);P.g()}F={type:M?"audio":"video",mimeType:"video/mp2t",codecs:N.join(", "),language:null,height:F.height,width:F.width,channelCount:null,
|
|
1032
|
+
sampleRate:null,closedCaptions:L,nd:null,colorGamut:null}}else F=null;if(J=F)return K.return(J)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(H=Zs(p,B.data))return K.return(H);return K.return(e)}})}
|
|
1032
1033
|
function tv(a){if(ov(a)){if(a.oa==Vv){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.Cb),c=Math.min(c,e.fc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ge(b)}}else a.l.Ua(Wv(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1033
|
-
c.h&&a.l.
|
|
1034
|
+
c.h&&a.l.Ng(c.h);a.l.Md()}function Fv(a,b){var c=(new sc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
1034
1035
|
function vv(a,b,c){c=(new sc(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}
|
|
1035
1036
|
function Iv(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=Xv(a,d);if(f){var g=Sd(Ud,d);a.G.set(f,g);Ob(d,g)}e&&(f=Sd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Sd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
1036
1037
|
function Gv(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",$u([a.L],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1037
1038
|
function Hv(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 ct(a.h);a.j.configure(a.g);a.j.i=[a.L];a.j.setManifestType("HLS");a.j.h=g;c=dt(a.j,h);break}return E(k,c,0)})}
|
|
1038
1039
|
function Lv(a,b){var c=Xu(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Yv(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=Tu(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Zv(Ud,d)||$v(Ud),aw(f.stream)}}return b.filter(function(g){return g})}
|
|
1039
|
-
function aw(a){var b=new Set([Yd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.
|
|
1040
|
+
function aw(a){var b=new Set([Yd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Kb(function(c){c.mimeType&&b.add(Yd(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1040
1041
|
function Mv(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);wa(m,2);return E(m,bw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=za(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=Tu(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"),
|
|
1041
1042
|
p=Z(g,"CHARACTERISTICS"),q=cw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;q.stream.width=Number(w)||void 0;q.stream.height=Number(A)||void 0;var y=Z(g,"BANDWIDTH");y&&(q.stream.bandwidth=Number(y));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1042
1043
|
function dw(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=Ru(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Yv(a,d[g],c)}
|
|
1043
|
-
function Kv(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
1044
|
-
y(m,""):null;Ra.u(6);break}return E(Ra,gw(a,m,"",e,null,f),9);case 9:q=Ra.h;case 6:if(q){if(q.keyIds)for(C=t(q.keyIds),z=C.next();!z.done;z=C.next())B=z.value,h.add(B);g.push(q)}case 4:l=k.next();Ra.u(3);break;case 2:D={};
|
|
1045
|
-
Qa=Z(L,"VIDEO-RANGE"),(ua=Z(L,"REQ-VIDEO-LAYOUT"))&&ua.includes(",")&&(Aa=ua.split(",").filter(function(ma){return"CH-STEREO"==ma||"CH-MONO"==ma}),ua=Aa[0]),ua=ua||"CH-MONO",La=hw(a,N,d),
|
|
1044
|
+
function Kv(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F,M,N,L,P,R,Q,ca,ea,la,Qa,ua,Aa,La;return O(function(Ra){switch(Ra.g){case 1:g=[];h=new Set;if(!(0<c.length)){Ra.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Ra.u(2);break}m=l.value;n=Tu(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";q=null;if("NONE"==n){Ra.u(4);break}if(ew(n)){u=$u(e(),Tu(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=qg(u,a.g.retryParameters),A=Tv(a,w,6),a.K.set(v,A));Ra.u(4);break}if("identity"!=p){q=(y=fw[p])?
|
|
1045
|
+
y(m,""):null;Ra.u(6);break}return E(Ra,gw(a,m,"",e,null,f),9);case 9:q=Ra.h;case 6:if(q){if(q.keyIds)for(C=t(q.keyIds),z=C.next();!z.done;z=C.next())B=z.value,h.add(B);g.push(q)}case 4:l=k.next();Ra.u(3);break;case 2:D={};J=t(b);for(H=J.next();!H.done;H=J.next())K=H.value,I=Ru(K,!a.j),D[I]?D[I].push(K):D[I]=[K];F=[];for(M in D)N=D[M],L=N[0],P=Z(L,"FRAME-RATE"),R=Number(Z(L,"AVERAGE-BANDWIDTH"))||Number(Tu(L,"BANDWIDTH")),Q=Z(L,"RESOLUTION"),ca=t(Q?Q.split("x"):[null,null]),ea=ca.next().value,la=ca.next().value,
|
|
1046
|
+
Qa=Z(L,"VIDEO-RANGE"),(ua=Z(L,"REQ-VIDEO-LAYOUT"))&&ua.includes(",")&&(Aa=ua.split(",").filter(function(ma){return"CH-STEREO"==ma||"CH-MONO"==ma}),ua=Aa[0]),ua=ua||"CH-MONO",La=hw(a,N,d),F.push.apply(F,x(iw(a,La.audio,La.video,R,ea,la,P,Qa,ua,g,h)));return Ra.return(F.filter(function(ma){return null!=ma}))}})}
|
|
1046
1047
|
function hw(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(Tu(v,"GROUP-ID"))}),dw(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var q=b.map(function(v){return Tu(v,
|
|
1047
1048
|
"URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return q.includes(w)})});g=Xv(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=Tu(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
|
|
1048
1049
|
n=Z(c,"NAME"),p=jw(c),kw(c),m=Z(c,"CHARACTERISTICS"),u=lw(c));a=mw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
@@ -1050,65 +1051,65 @@ function Xv(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.$=0<c.le
|
|
|
1050
1051
|
function lw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function kw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1051
1052
|
function iw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Ov(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var q=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=q?q.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=q?q.stream.drmInfos:null;
|
|
1052
1053
|
q=q?q.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";q=q+" - "+u;h&&k&&!Kc(n,p)||a.Ea.has(q)||(h={id:a.B++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ea.add(q))}return e}
|
|
1053
|
-
function Jv(a,b){b=Xu(b,"CLOSED-CAPTIONS");a.
|
|
1054
|
+
function Jv(a,b){b=Xu(b,"CLOSED-CAPTIONS");a.fa=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=ze(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Tu(d,"GROUP-ID");d=Tu(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
|
|
1054
1055
|
function Yv(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=Tu(k,"URI");k=Tu(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Tu(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.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
1055
1056
|
m=n.next().value;n=n.next().value;(m=c.get(m))&>(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?jw(h):null;var p="audio"==k?kw(h):!1,q=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?lw(h):null;d=cw(a,l,d,b,k,c,m,f,n,null,q,u,h,p);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.i.set(e,d);return d}
|
|
1056
1057
|
function bw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Tu(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=cw(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?E(p,h.stream.createSegmentIndex(),3):p.u(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
1057
1058
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1058
|
-
function mw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var q=p.value;p=Tu(q,"URI");q=Z(q,"PATHWAY-ID");a.j&&q&>(a.j,l,q,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.
|
|
1059
|
-
function cw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(B){var D,
|
|
1060
|
-
break}if(P=0<
|
|
1061
|
-
y.kb=ea.kb;y.lb=ea.lb;y.ef=!0;w.segmentIndex=la.segmentIndex;w.encrypted=la.encrypted;w.drmInfos=la.drmInfos;w.keyIds=la.keyIds;w.mimeType=la.mimeType;w.bandwidth=w.bandwidth||la.bandwidth;w.codecs=w.codecs||la.codecs;w.closedCaptions=w.closedCaptions||la.closedCaptions;aw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&L&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.
|
|
1062
|
-
aw(Aa.stream));e==D.qa&&(La=la.segmentIndex.get(0))&&La.
|
|
1059
|
+
function mw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var q=p.value;p=Tu(q,"URI");q=Z(q,"PATHWAY-ID");a.j&&q&>(a.j,l,q,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.fa=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}b=null}c=Rd(d,c);d=cw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
1060
|
+
function cw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(B){var D,J,H,K,I,F,M,N,L,P,R,Q,ca,ea,la,Qa,ua,Aa,La,Ra,ma,bb;return O(function(kb){switch(kb.g){case 1:return D=Wd,J=y.M(),E(kb,mv(a,y.M(),!0),2);case 2:H=kb.h;if(B.aborted)return kb.return();K=H.uri;K==H.originalUri||J.includes(K)||A.push(K);I=cv(a.Ba,H.data);if(1!=I.type)throw new T(2,4,4017);F=Wu(I.g,"EXT-X-DEFINE");M=vv(a,F,K);N=void 0;L=!1;if(!(!a.$&&a.g.hls.disableCodecGuessing||a.fa&&e==D.ga&&!a.g.hls.disableClosedCaptionsDetection)){kb.u(3);
|
|
1061
|
+
break}if(P=0<I.segments.length)R=I.segments[0],Yu(R.g,"EXT-X-GAP")&&(P=!1);if(!P){kb.u(3);break}a.fa=!1;return E(kb,Ev(a,I,v,M),5);case 5:Q=kb.h,!Q.closedCaptions.size||l&&l.size==Q.closedCaptions.size||(l=Q.closedCaptions,L=!0),!a.$&&a.g.hls.disableCodecGuessing&&(N=Q.mimeType,d=Q.codecs);case 3:return ca=ov(a),E(kb,Nv(a,0,M,I,v,d,e,f,g,h,k,l,m,n,p,q,N),6);case 6:ea=kb.h;if(B.aborted)return kb.return();la=ea.stream;ov(a)&&!ca&&Pv(a,I);y.fc=ea.fc;y.Cb=ea.Cb;y.ud=ea.ud;y.td=ea.td;y.$c=ea.$c;y.Pd=ea.Pd;
|
|
1062
|
+
y.kb=ea.kb;y.lb=ea.lb;y.ef=!0;w.segmentIndex=la.segmentIndex;w.encrypted=la.encrypted;w.drmInfos=la.drmInfos;w.keyIds=la.keyIds;w.mimeType=la.mimeType;w.bandwidth=w.bandwidth||la.bandwidth;w.codecs=w.codecs||la.codecs;w.closedCaptions=w.closedCaptions||la.closedCaptions;aw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&L&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.ga||e==D.W)for(Qa=t(a.i.values()),ua=Qa.next();!ua.done;ua=Qa.next())Aa=ua.value,Aa.ef||Aa.type!=e||(Aa.stream.mimeType=la.mimeType,
|
|
1063
|
+
aw(Aa.stream));e==D.qa&&(La=la.segmentIndex.get(0))&&La.ea&&(w.mimeType="application/mp4",aw(w));nw(a)&&(a.qb?Qv(a,[y]):(a.qb=!0,Ra=Array.from(a.i.values()),ma=Ra.filter(function(qd){return qd.stream.segmentIndex}),Qv(a,ma),tv(a),bb=a.m,0<bb&&a.A.Y(bb)));G(kb)}})}function v(){return a.j&&1<c.length?ht(a.j,b):A.concat(av([a.L],c,a.s))}var w=ow(a,d,e,f,g,h,k,l,m,n,p,q),A=[],y={stream:w,type:e,Eg:A,M:v,fc:0,Cb:0,Pd:new Map,ud:!1,td:!1,$c:!1,Ae:-1,kb:-1,lb:-1,ef:!1},C=null,z=new AbortController;w.createSegmentIndex=
|
|
1063
1064
|
function(){if(C)return C;z=new AbortController;return C=new Promise(function(B){B(u(z.signal))})};w.closeSegmentIndex=function(){C&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);C=null};return y}function Wv(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.Cb));return b}
|
|
1064
|
-
function qv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.
|
|
1065
|
+
function qv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Kb(function(e){c.push(e)});a.l.hd(c)}function Qv(a,b){if(!ov(a))for(var c=Wv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.vc(0,c);qv(a,b.map(function(f){return f.stream}));c=ov(a)&&!a.rb;a.g.hls.ignoreManifestProgramDateTime||c?Av(a,b,c):(Dv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Av(a,b))}
|
|
1065
1066
|
function Bv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function nw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1066
|
-
function Nv(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w){var A,y,C,z,B,D,
|
|
1067
|
-
D=B.drmInfos;
|
|
1068
|
-
Cb:N,ud:R,td:Q
|
|
1067
|
+
function Nv(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w){var A,y,C,z,B,D,J,H,K,I,F,M,N,L,P,R,Q,ca,ea,la,Qa;return O(function(ua){switch(ua.g){case 1:var Aa=Yu(d.g,"EXT-X-PLAYLIST-TYPE"),La=Yu(d.g,"EXT-X-ENDLIST");La=Aa&&"VOD"==Aa.value||La;Aa=Aa&&"EVENT"==Aa.value&&!La;Aa=!La&&!Aa;La?sv(a,lv):Aa?sv(a,Vv):sv(a,pw);ov(a)&&zv(a,d);A=ov(a)?a.N.get(g):new Map;y=xv(a,d,A,c,e,g);C=y.segments;z=y.bandwidth;if(w){ua.u(2);break}return E(ua,qw(a,g,f,C),3);case 3:w=ua.h;case 2:return E(ua,wv(a,d,w,e,c),4);case 4:B=ua.h;
|
|
1068
|
+
D=B.drmInfos;J=B.keyIds;H=B.encrypted;K=B.ih;if(H&&!D.length&&!K)throw new T(2,4,4026);I=ow(a,f,g,h,k,l,m,n,p,q,u,v);I.encrypted=H;I.drmInfos=D;I.keyIds=J;I.mimeType=w;z&&(I.bandwidth=z);aw(I);ov(a)&&zv(a,d);F=C[0].startTime;M=C[C.length-1];N=M.endTime;L=new Lk(C);I.segmentIndex=L;R=(P=Yu(d.g,"EXT-X-SERVER-CONTROL"))?null!=Su(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=Su(P,"CAN-BLOCK-RELOAD"):!1;ca=Zu(d.g,"EXT-X-MEDIA-SEQUENCE",0);ea=yv(ca,C);la=ea.kb;Qa=ea.lb;return ua.return({stream:I,type:g,Eg:[],M:e,fc:F,
|
|
1069
|
+
Cb:N,ud:R,td:Q,$c:!1,Ae:-1,kb:la,lb:Qa,Pd:A,ef:!1})}})}function yv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{kb:a,lb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{kb:a,lb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{kb:a,lb:c}}
|
|
1069
1070
|
function ow(a,b,c,d,e,f,g,h,k,l,m,n){var p=Zv(c,b)||$v(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Ud?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1070
1071
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Ud?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ze(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
1071
1072
|
fullMimeTypes:new Set};aw(a);return a}
|
|
1072
|
-
function wv(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
1073
|
-
!0;
|
|
1074
|
-
function rw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw $a("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=Jd(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Zu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.
|
|
1075
|
-
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u;return O(function(v){if(1==v.g)return l=$u(d(),Tu(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=qg(l,a.g.retryParameters),p=Tv(a,n,6),a.K.set(m,p)),E(v,a.K.get(m),2);if(3!=v.g){q=v.h;if(!q.data||q.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return E(v,window.crypto.subtle.importKey("raw",q.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;
|
|
1076
|
-
a.
|
|
1077
|
-
function zv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Yu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Yu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Yu(b.g,"EXT-X-PART-INF"))a.P=Number(Tu(e,"PART-TARGET"));b=Yu(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.P?(a.m=a.hb?5*a.P<=c?Math.min(a.P,a.m):Math.min(c,a.m):Math.min(a.P,a.m),a.
|
|
1078
|
-
Su(b,"HOLD-BACK"):null,a.
|
|
1073
|
+
function wv(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F,M,N,L,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Wu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Sv(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())q=p.value,f.set(q,m);v=u=!1;w=[];A=new Set;y=t(f);C=y.next();case 2:if(C.done){Q.u(4);break}z=C.value;B=t(z);D=B.next().value;J=B.next().value;H=D;K=J;I=Tu(H,"METHOD");if("NONE"==I){Q.u(3);break}u=
|
|
1074
|
+
!0;F=Z(H,"KEYFORMAT")||"identity";M=null;if(ew(I)){v=!0;Q.u(3);break}if("identity"!=F){M=(N=fw[F])?N(H,c):null;Q.u(6);break}return E(Q,gw(a,H,c,d,K,e),8);case 8:M=Q.h;case 6:if(M){if(M.keyIds)for(L=t(M.keyIds),P=L.next();!P.done;P=L.next())R=P.value,A.add(R);w.push(M)}case 3:C=y.next();Q.u(2);break;case 4:return Q.return({drmInfos:w,keyIds:A,encrypted:u,ih:v})}})}
|
|
1075
|
+
function rw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw $a("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=Jd(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Zu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.la.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Tu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1076
|
+
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u;return O(function(v){if(1==v.g)return l=$u(d(),Tu(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=qg(l,a.g.retryParameters),p=Tv(a,n,6),a.K.set(m,p)),E(v,a.K.get(m),2);if(3!=v.g){q=v.h;if(!q.data||q.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return E(v,window.crypto.subtle.importKey("raw",q.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;G(v)})};
|
|
1077
|
+
a.la.set(c,k)}return a.la.get(c)}
|
|
1078
|
+
function zv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Yu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Yu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Yu(b.g,"EXT-X-PART-INF"))a.P=Number(Tu(e,"PART-TARGET"));b=Yu(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.P?(a.m=a.hb?5*a.P<=c?Math.min(a.P,a.m):Math.min(c,a.m):Math.min(a.P,a.m),a.va=b?Number(Tu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1079
|
+
Su(b,"HOLD-BACK"):null,a.ua=c?Number(c.value):0);a.Fa=Math.max(d,a.Fa)}function Pv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.va)b=a.va;else if(a.ua)b=a.ua;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Fa*c}a.l.Og(0);a.l.Df(b);a.l.kc(!1)}
|
|
1079
1080
|
function Sv(a,b,c,d,e){var f=Yu(c,"EXT-X-MAP");if(!f)return null;var g=Tu(f,"URI"),h=$u(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ba.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?ew(Tu(m,"METHOD"))&&m.id<f.id&&(k=rw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=sw(h,f,l,k);a.ba.set(g,b)}return a.ba.get(g)}
|
|
1080
1081
|
function sw(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 Bi(function(){return a},e,f,null,null,null,d)}
|
|
1081
1082
|
function tw(a,b,c,d,e,f,g,h,k){function l(ca){ca=(new sc(ca)).Na.split(".").pop();var ea=uw[g][ca];ea||(ea=Rv[ca]);return ea}var m=d.g,n=Yu(m,"EXTINF"),p=0,q=0,u=null;d.wb.length&&!a.C&&$a("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Yu(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=ph(w.value),
|
|
1082
|
-
a.rb=!0)}var A=Hi;Yu(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.wb.length)throw new T(2,4,4024,"EXTINF");if(!a.C)return null}var y=[];w=!1;var C=null,z=!1,B=!1;if(a.C&&d.wb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,
|
|
1083
|
-
"BYTERANGE-LENGTH"))?P=L+Number(
|
|
1084
|
-
null);y.push(
|
|
1085
|
-
return Q||[]},q,u,b,0,0,Infinity,y,c,n,v,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,vw.has(e)&&(b.
|
|
1083
|
+
a.rb=!0)}var A=Hi;Yu(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.wb.length)throw new T(2,4,4024,"EXTINF");if(!a.C)return null}var y=[];w=!1;var C=null,z=!1,B=!1;if(a.C&&d.wb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,J={},H=0;H<d.wb.length;J={le:void 0,$d:void 0},H++){var K=d.wb[H],I=0==H?c:y[y.length-1],F=0==H?e:I.endTime,M=Number(Z(K,"DURATION"))||a.P;if(M){var N=F+M,L=0,P=null;"EXT-X-PRELOAD-HINT"==K.name?(L=(L=Z(K,"BYTERANGE-START"))?Number(L):0,(I=Z(K,
|
|
1084
|
+
"BYTERANGE-LENGTH"))?P=L+Number(I)-1:L&&(P=Number.MAX_SAFE_INTEGER)):(L=Z(K,"BYTERANGE"),P=t(Uv(I,L)),L=P.next().value,P=P.next().value);J.$d=Z(K,"URI");if(J.$d){I=Hi;"YES"==Z(K,"GAP")&&(I=2,z=!0);J.le=null;var R=function(ca){return function(){null==ca.le&&(ca.le=$u(h(),ca.$d,f));return ca.le}}(J);p&&0<=L&&null!=P&&(C=R,w=!0);F=new Gi(F,N,R,L,P,b,0,0,Infinity,[],"",null,D,I,k);"EXT-X-PRELOAD-HINT"==K.name&&(F.ff(),B=!0);"YES"!=Z(K,"INDEPENDENT")&&0<H&&F.Od();if(J=l(J.$d))F.mimeType=J,vw.has(J)&&(F.ea=
|
|
1085
|
+
null);y.push(F);D&&(D+=M)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;w&&(z||0!=y[0].Da?(w=!1,C=null):y=[]);(n=Yu(m,"EXT-X-BYTERANGE"))?(u=t(Uv(c,n.value)),q=u.next().value,u=u.next().value):y.length&&(q=y[0].Da,u=y[y.length-1].pa);c="";n=null;"image"==g&&(c="1x1",m=Yu(m,"EXT-X-TILES"))&&(c=Tu(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Gi(e,p,function(){if(C)return C();null==Q&&(Q=$u(h(),d.h,f));
|
|
1086
|
+
return Q||[]},q,u,b,0,0,Infinity,y,c,n,v,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,vw.has(e)&&(b.ea=null);w&&(a.hb=!0,b.ug(),B&&b.ff());return b}function Uv(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.pa+1,d=c+b-1);return[c,d]}
|
|
1086
1087
|
function xv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Zu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Zu(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Yu(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,q=0;ov(a)&&c.has(p)&&(q=c.get(p));0===q&&a.oa==Vv&&0<c.size&&!c.has(p)&&(q=a.l.ib());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],y=0==w?q:v.endTime;p=l+n+w;Yu(A.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(A.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&(ew(Tu(z,"METHOD"))?
|
|
1087
1088
|
h=rw(a,z,b,e,d):h=void 0);c.set(p,y);C=Sv(a,b,A.g,e,d);!a.C&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());if(y=tw(a,C,v,A,y,d,f,e,h))(v=Zu(A.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.i=k,Bv(a,f)&&null!=a.J&&p<a.J||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(B,D){return B+D.duration},0),b=Math.round(m.reduce(function(B,D){return B+D.bitrate*D.duration},0)/
|
|
1088
1089
|
b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={zd:void 0,yd:void 0,qd:void 0,ic:void 0,pd:void 0},d++)if(c.ic=u[d],null==c.ic.h)for(c.yd=0,c.zd=d,e=function(B){return function(){var D=u[B.zd];if(D){if(null!=D.h)return D.h+B.yd;B.yd-=D.endTime-D.startTime;B.zd+=1}return null}}(c),c.pd=0,c.qd=d,g=function(B){return function(){var D=u[B.qd];if(D){D!=B.ic&&(B.pd+=D.endTime-D.startTime);if(null!=D.h)return D.h+B.pd;--B.qd}return null}}(c);null==c.ic.h;)c.ic.h=g(),null==c.ic.h&&
|
|
1089
|
-
(c.ic.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.aa;if(m&&Infinity!=c&&!Bv(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.
|
|
1090
|
+
(c.ic.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.aa;if(m&&Infinity!=c&&!Bv(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Kf(c);return{segments:u,bandwidth:b}}
|
|
1090
1091
|
function Zv(a,b){if(a==Ud){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function $v(a){return a==Ud?"text/vtt":uw[a].mp4}
|
|
1091
1092
|
function qw(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A;return O(function(y){switch(y.g){case 1:e=wg;f=Math.trunc((d.length-1)/2);for(g=d[f];2==g.status&&f<d.length;)f++,g=d[f];if(2==g.status)return y.return($v(b));h=g.M();k=new sc(h[0]);l=k.Na.split(".").pop();m=uw[b];if((n=m[l])||(n=Rv[l])||(n=Zv(b,c)))return y.return(n);q=1;u=qg(h,a.g.retryParameters);wa(y,2);u.method="HEAD";return E(y,Tv(a,u,e,{type:q}),4);case 4:v=y.h;p=v.headers["content-type"];ya(y,3);break;case 2:w=za(y);if(!w||1002!=w.code&&
|
|
1092
1093
|
1001!=w.code){y.u(3);break}u.method="GET";return E(y,Tv(a,u,e,{type:q}),6);case 6:A=y.h,p=A.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return($v(b))}})}function Ov(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function mv(a,b,c){return Tv(a,qg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1093
|
-
function kv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();wa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();ov(a)&&(d=(c-b)/1E3,a.Ka.sample(1,d),e=a.m,f=Math.max(0,e-Wa(a.Ka)),a.A.Y(f));ya(h,3);break;case 2:g=za(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.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
|
|
1094
|
+
function kv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();wa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();ov(a)&&(d=(c-b)/1E3,a.Ka.sample(1,d),e=a.m,f=Math.max(0,e-Wa(a.Ka)),a.A.Y(f));ya(h,3);break;case 2:g=za(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.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();G(h)}})}
|
|
1094
1095
|
function ov(a){return a.oa!=lv}function sv(a,b){a.oa=b;a.l&&a.l.kc(!ov(a));ov(a)||a.A.stop()}function Tv(a,b,c,d){if(!a.U)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);kg(a.U,b);return b.promise}function ew(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1095
|
-
function gw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(pd())throw new T(2,4,4041);g=Tu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=$u(d(),Tu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Kd(Id(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.
|
|
1096
|
-
3);case 3:q=B.h,l=Kd(q.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.
|
|
1096
|
+
function gw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(pd())throw new T(2,4,4041);g=Tu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=$u(d(),Tu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Kd(Id(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.ta.has(m)||(n=qg(k,a.g.retryParameters),p=Tv(a,n,6),a.ta.set(m,p));return E(B,a.ta.get(m),
|
|
1097
|
+
3);case 3:q=B.h,l=Kd(q.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.ma.has(e)){v=a.ma.get(e);B.u(5);break}w=pl(e.M(),e.ac(),e.Yb(),a.g.retryParameters);A=wg;return E(B,Tv(a,w,A,{type:0}),6);case 6:y=B.h,v=bt(y.data),a.ma.set(e,v);case 5:v&&(u=v);case 4:return C=new Map,C.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Qd(C,z))}})}S("shaka.hls.HlsParser",jv);
|
|
1097
1098
|
var Rv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},uw={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",
|
|
1098
1099
|
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"}},vw=new Set(["video/mp2t"].concat(x(Zd))),fw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(pd())throw new T(2,4,4041);a=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Pd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
1099
1100
|
keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Tu(a,"URI");b=iv(b.split("?")[0]);b=Bb(b.data);c=Pd("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=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
1100
|
-
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Tu(a,"URI");a=iv(a.split("?")[0]);a=Bb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xg(a,b,new Set,0);return Pd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},lv="VOD",pw="EVENT",Vv="LIVE",rv={
|
|
1101
|
+
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Tu(a,"URI");a=iv(a.split("?")[0]);a=Bb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xg(a,b,new Set,0);return Pd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},lv="VOD",pw="EVENT",Vv="LIVE",rv={eh:lv,cj:pw,kj:Vv};wi["application/x-mpegurl"]=function(){return new jv};wi["application/vnd.apple.mpegurl"]=function(){return new jv};function ww(a){var b=0,c=Fb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function xw(a){if(a=yw(a))a:{a=t(ih(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=jh(b.value,"LA_URL")){a=gh(b);break a}a=""}else a="";return a}
|
|
1101
1102
|
function yw(a){a=Id(gh(a));a=ww(a).filter(function(b){return b.type===zw})[0];if(!a)return null;a=yd(a.value,!0);return(a=Zg(a,"WRMHEADER"))?a:null}var zw=1,Aw=(new Map).set("com.microsoft.playready",xw).set("com.microsoft.playready.recommendation",xw).set("com.microsoft.playready.software",xw).set("com.microsoft.playready.hardware",xw);function Bw(a){if(!Cw){Cw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Dw=Ew("ftyp",b,d,b,c);b=Ew("dref",Fw);Gw=Ew("dinf",b)}this.g=a}
|
|
1102
1103
|
function Hw(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Ew;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Iw+1));m=Math.floor(m%(Iw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Jw(h,4)),[0,0,0,0],x(Jw(n,4)),x(Jw(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Jw(k,2)),[0,0],x(Jw(l,
|
|
1103
1104
|
2)),[0,0]));h=Ew("tkhd",h);k=Ew;n=g.duration*g.timescale;l=Math.floor(n/(Iw+1));n=Math.floor(n%(Iw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Jw(g.timescale,4)),x(Jw(l,4)),x(Jw(n,4)),x(Jw(m,2)),[0,0]));l=Ew("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Kw;break;case "audio":m=Lw}n=Ew("hdlr",m);a:{switch(g.type){case "video":g=Ew("minf",Ew("vmhd",Mw),Gw,Nw(g));break a;
|
|
1104
1105
|
case "audio":g=Ew("minf",Ew("smhd",Ow),Gw,Nw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Nd.apply(Fd,x(b));f=a.g[0];c=Ew;d=f.duration*f.timescale;e=Math.floor(d/(Iw+1));d=Math.floor(d%(Iw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Jw(f.timescale,4)),x(Jw(e,4)),x(Jw(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
1105
|
-
255]));e=Ew("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Jw(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,
|
|
1106
|
+
255]));e=Ew("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Jw(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Ew("trex",k),h.call(g,k);a=Nd.apply(Fd,x(d));a=Ew("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Nd.apply(Fd,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Dw.byteLength+
|
|
1106
1107
|
a.byteLength);b.set(Dw);b.set(a,Dw.byteLength);return b}
|
|
1107
1108
|
function Nw(a){var b=Ew,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.sa.byteLength)var e=Ew("avcC",a.sa);else{e=Ew;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Wa.length;n++){var p=Pw(a.Wa[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1108
1109
|
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Jw(c,2)),x(Jw(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Qw(a);g=new Uint8Array([]);
|
|
1109
1110
|
a.encrypted&&(g=Rw(a),d="encv");c=Ew(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.sa.byteLength&&(c=Ew("hvcC",a.sa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Jw(d,2)),x(Jw(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=Qw(a),g=new Uint8Array([]),a.encrypted&&(g=Rw(a),e="encv"),c=Ew(e,d,
|
|
1110
|
-
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Ew(".mp3",Sw(a));else if(a.codecs.includes("ac-3"))c=Ew("dac3",a.
|
|
1111
|
-
a.
|
|
1111
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Ew(".mp3",Sw(a));else if(a.codecs.includes("ac-3"))c=Ew("dac3",a.ka),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Rw(a),d="enca"),a=Ew(d,Sw(a),c,e);else if(a.codecs.includes("ec-3"))c=Ew("dec3",a.ka),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Rw(a),d="enca"),a=Ew(d,Sw(a),c,e);else if(a.codecs.includes("opus"))c=Ew("dOps",a.ka),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Rw(a),d="enca"),a=Ew(d,Sw(a),c,e);else{if(0<a.ka.byteLength)c=Ew("esds",
|
|
1112
|
+
a.ka);else{c=Ew;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(Jw(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=Rw(a),d="enca");
|
|
1112
1113
|
a=Ew(d,Sw(a),c,e)}c=a}a=Ew("stsd",Tw,c);return b("stbl",a,Ew("stts",Uw),Ew("stsc",Vw),Ew("stsz",Ww),Ew("stco",Xw))}function Qw(a){if(!a.ya&&!a.Aa)return new Uint8Array([]);var b=a.Aa;a=new Uint8Array([].concat(x(Jw(a.ya,4)),x(Jw(b,4))));return Ew("pasp",a)}function Sw(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(Jw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1113
1114
|
function Rw(a){var b=Ew;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(Jw(d,4))));c=Ew("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Ew("schm",d);e=Ew;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=Pw(h.value)}a=new Uint8Array([0,
|
|
1114
1115
|
0,0,0,0,0,1,8]);f=Ew("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
@@ -1118,37 +1119,37 @@ g,k);e.call(d,b,[f,Zw(c)])}return Nd.apply(Fd,x(b))}function Zw(a){a=(a.data?a.d
|
|
|
1118
1119
|
function Ew(a){var b=Ja.apply(1,arguments),c=$w[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],$w[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
1119
1120
|
var Cw=!1,Iw=Math.pow(2,32)-1,$w={},Kw=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Lw=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Uw=new Uint8Array([0,0,0,0,0,0,0,0]),Vw=new Uint8Array([0,0,0,0,0,0,0,0]),Xw=new Uint8Array([0,0,0,0,0,0,0,0]),Ww=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Mw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ow=new Uint8Array([0,
|
|
1120
1121
|
0,0,0,0,0,0,0]),Tw=new Uint8Array([0,0,0,0,0,0,0,1]),Dw=new Uint8Array([]),Fw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Gw=new Uint8Array([]);function ax(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Va(5);this.o=new Sc(function(){bx(a)});this.A=new jg;this.m=new Map}r=ax.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,cx(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
|
|
1121
|
-
function bx(a){var b;O(function(c){switch(c.g){case 1:return wa(c,2),E(c,cx(a),4);case 4:ya(c,3);break;case 2:b=za(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();
|
|
1122
|
-
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return wa(c,2),E(c,cx(a),4);if(2!=c.g)return ya(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);
|
|
1122
|
+
function bx(a){var b;O(function(c){switch(c.g){case 1:return wa(c,2),E(c,cx(a),4);case 4:ya(c,3);break;case 2:b=za(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();G(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
|
|
1123
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return wa(c,2),E(c,cx(a),4);if(2!=c.g)return ya(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);G(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
|
|
1123
1124
|
function cx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=qg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),kg(a.A,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=lm){rb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Ut(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
|
|
1124
1125
|
l);n(m);m=Bd(m.outerHTML)}var p=Yg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=mm&&l(p);a.i||(a.i=new pk(null,0));if(l=mh(p,"IsLive",wh,!1))throw new T(2,4,4047);a.i.kc(!l);n=mh(p,"TimeScale",uh,1E7);m=mh(p,"DVRWindowLength",uh);l&&(0===m||isNaN(m))&&(m=Infinity);var q=mh(p,"CanSeek",wh,!1);0===m&&q&&(m=Infinity);q=null;m&&0<m&&(q=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(q=a.g.availabilityWindowOverride);null==q&&(q=Infinity);a.i.ge(q);m=mh(p,
|
|
1125
1126
|
"Duration",uh,Infinity);l||a.i.Ua(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;q=fh(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];q=t(q);for(u=q.next();!u.done;u=q.next())m=m.concat(fh(u.value,"ProtectionHeader"));if(m.length){q=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var y=yw(v);if(y)a:{y=t(ih(y,"DATA"));for(var C=y.next();!C.done;C=y.next())if(C=jh(C.value,"KID")){y=Id(gh(C));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
|
|
1126
|
-
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Kd(y);break a}y=null}else y=null;C=Id(gh(v));w=Jd(w.replace(/-/g,""));w=[{initData:Xg(C,w,new Set,0),initDataType:"cenc",keyId:y}];w=Pd(A,"cenc",w);y&&w.keyIds.add(y);if(A=Aw.get(A))w.licenseServerUri=A(v);q.push(w)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=fh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=fh(v,"QualityLevel");w=l.timescale;y=l.duration;C=fh(v,"c");for(var z=[],B=0,D=0;D<C.length;++D){var
|
|
1127
|
-
mh(
|
|
1127
|
+
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Kd(y);break a}y=null}else y=null;C=Id(gh(v));w=Jd(w.replace(/-/g,""));w=[{initData:Xg(C,w,new Set,0),initDataType:"cenc",keyId:y}];w=Pd(A,"cenc",w);y&&w.keyIds.add(y);if(A=Aw.get(A))w.licenseServerUri=A(v);q.push(w)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=fh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=fh(v,"QualityLevel");w=l.timescale;y=l.duration;C=fh(v,"c");for(var z=[],B=0,D=0;D<C.length;++D){var J=C[D],H=C[D+1],K=mh(J,"t",uh),I=
|
|
1128
|
+
mh(J,"d",uh);J=mh(J,"r",sh);if(!I)break;K=null!=K?K:B;(J=J||0)&&J--;if(0>J)if(H){H=mh(H,"t",uh);if(null==H)break;else if(K>=H)break;J=Math.ceil((H-K)/I)-1}else{if(Infinity==y)break;else if(K/w>=y)break;J=Math.ceil((y*w-K)/I)-1}for(H=0;H<=J;++H)B=K+I,z.push({start:K/w,end:B/w,Rf:K}),K=B}w=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=dx(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Ud||a.g.disableText||m.push(y):n.push(y):q.push(y))}p=[];q=t(0<q.length?
|
|
1128
1129
|
q:[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,v=t(0<n.length?n:[null]),z=v.next();!z.done;z=v.next())A=p,w=A.push,y=a,C=u,z=z.value,D=0,C&&C.bandwidth&&0<C.bandwidth&&(D+=C.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(D+=z.bandwidth),y={id:y.s++,language:C?C.language:"und",disabledUntilTime:0,primary:!!C&&C.primary||!!z&&z.primary,audio:C,video:z,bandwidth:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,y);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,
|
|
1129
|
-
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null},a.i.Md());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);
|
|
1130
|
+
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null},a.i.Md());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);G(k)})}
|
|
1130
1131
|
function dx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return $a("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=mh(c,"Bitrate",th),m=mh(c,"MaxWidth",th),n=mh(c,"MaxHeight",th),p=mh(c,"Channels",th),q=mh(c,"SamplingRate",th),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Ua(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1131
1132
|
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:ze(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:q,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1132
1133
|
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=ex[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 $a('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!fx.includes(e.toUpperCase()))return $a("Codec not supported:",
|
|
1133
1134
|
e),null;c=gx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return $a("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=hx(e,c);break;case "video":if(!c)return $a("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=ix(c);break;case "text":if(w.type=Ud,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Yd(w.mimeType,w.codecs));
|
|
1134
|
-
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,Wa:A,
|
|
1135
|
+
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,Wa:A,ka:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:null,stream:w},A=Hw(new Bw([A])),a.m.set(w.id,A);A=jx(a,new Bi(function(){return[]},0,null,null,void 0,
|
|
1135
1136
|
A),w,b,d);w.segmentIndex=new Lk(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1136
1137
|
function gx(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;
|
|
1137
1138
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function hx(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 ix(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1138
|
-
function jx(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={he:void 0},g=e.next())h.he=g.value,d.push(new Gi(h.he.start,h.he.end,function(k){return function(){return Od(a.l,[f.replace("{start time}",String(k.he.
|
|
1139
|
-
wi["application/vnd.ms-sstr+xml"]=function(){return new ax};function kx(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=Ad(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function lx(){}function mx(a,b,c,d,e){var f=new nx;Eg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ox,h={
|
|
1140
|
-
function px(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return h=qx,k=rx,p=n=0,q=Date.now(),wa(z,2),E(z,h(a,c),4);case 4:l=z.h;f(sx(l.headers));if("HEAD"==c.method){z.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function D(){var
|
|
1141
|
-
|
|
1139
|
+
function jx(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={he:void 0},g=e.next())h.he=g.value,d.push(new Gi(h.he.start,h.he.end,function(k){return function(){return Od(a.l,[f.replace("{start time}",String(k.he.Rf))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",ax);var fx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),ex={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1140
|
+
wi["application/vnd.ms-sstr+xml"]=function(){return new ax};function kx(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=Ad(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function lx(){}function mx(a,b,c,d,e){var f=new nx;Eg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ox,h={$f:!1,Xg:!1};a=px(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 $f(a,function(){h.$f=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Sc(function(){h.Xg=!0;g.abort()});k.Y(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1141
|
+
function px(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return h=qx,k=rx,p=n=0,q=Date.now(),wa(z,2),E(z,h(a,c),4);case 4:l=z.h;f(sx(l.headers));if("HEAD"==c.method){z.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function D(){var J,H,K;return O(function(I){switch(I.g){case 1:return wa(I,2),E(I,u.read(),4);case 4:J=I.h;ya(I,3);break;case 2:return za(I),I.return();case 3:if(J.done){I.u(5);break}n+=
|
|
1142
|
+
J.value.byteLength;if(!g){I.u(5);break}return E(I,g(J.value),5);case 5:H=Date.now();if(100<H-q||J.done)K=J.done?0:w-n,e(H-q,n-p,K),p=n,q=H;J.done?B.close():(B.enqueue(J.value),D());G(I)}})}D()};new k({start:A});return E(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:ya(z,3);break;case 2:y=za(z);if(d.$f)throw new T(1,1,7001,a,b);if(d.Xg)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,y,b);case 3:return C=sx(l.headers),z.return(kx(C,m,l.status,a,l.url,b))}})}
|
|
1142
1143
|
function sx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function tx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",lx);lx.isSupported=tx;lx.parse=mx;var qx=window.fetch,ox=window.AbortController,rx=window.ReadableStream,nx=window.Headers;
|
|
1143
1144
|
tx()&&(mg("http",mx,2,!0),mg("https",mx,2,!0),mg("blob",mx,2,!0));function ux(){}
|
|
1144
1145
|
function vx(a,b,c,d,e){var f=new wx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=xx(f);e(q);n=!0}};f.onload=function(q){var u=xx(f),v=f.response;try{d(Date.now()-g,q.loaded-h,0);var w=kx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(q){m(new T(1,
|
|
1145
1146
|
1,1002,a,q,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(q){var u=Date.now();if(100<u-g||q.lengthComputable&&q.loaded==q.total)d(u-g,q.loaded-h,4==f.readyState?0:q.total-q.loaded),h=q.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new $f(k,function(){f.abort();return Promise.resolve()})}
|
|
1146
|
-
function xx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",ux);ux.parse=vx;var wx=window.XMLHttpRequest;mg("http",vx,1,!0);mg("https",vx,1,!0);mg("blob",vx,1,!0);function yx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function zx(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Da+":"+a.pa}function Ax(a,b){return pl(a.g.M(),a.g.Da,a.g.pa,b.streaming.retryParameters)};function Bx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Cx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Bx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function Dx(a){var b=this;this.o=a;this.j=new Map;this.i=new
|
|
1147
|
+
function xx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",ux);ux.parse=vx;var wx=window.XMLHttpRequest;mg("http",vx,1,!0);mg("https",vx,1,!0);mg("blob",vx,1,!0);function yx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function zx(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Da+":"+a.pa}function Ax(a,b){return pl(a.g.M(),a.g.Da,a.g.pa,b.streaming.retryParameters)};function Bx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Cx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Bx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function Dx(a){var b=this;this.o=a;this.j=new Map;this.i=new yg(function(){return Ex(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Bx}Dx.prototype.destroy=function(){return this.i.destroy()};function Fx(a,b,c){a.m=b;a.l=c}function Ex(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1147
1148
|
function Gx(a,b,c,d,e,f){Bg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return E(u,Hx(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Bb(h),l=new Wg(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Ix(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1148
|
-
function Hx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=wg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Ob(a.h,e);return g.return(f.data)})};function Jx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Zf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Jx.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}wa(b,2);return E(b,a.g,4)}if(2!=b.g)return ya(b,0);za(b);
|
|
1149
|
-
function Kx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();
|
|
1149
|
+
function Hx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=wg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Ob(a.h,e);return g.return(f.data)})};function Jx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Zf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Jx.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}wa(b,2);return E(b,a.g,4)}if(2!=b.g)return ya(b,0);za(b);G(b)})};
|
|
1150
|
+
function Kx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();G(g)})}})}Jx.prototype.store=function(){return this.h};Jx.prototype.promise=function(){return this.g};function Lx(a){this.h=a;this.g=[]}Lx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Mx(a,b){return Nx(a,b,"readwrite")}function Nx(a,b,c){c=a.h.transaction([b],c);var d=new Jx(c,b);a.g.push(d);d.promise().then(function(){Ob(a.g,d)},function(){Ob(a.g,d)});return d};function Ox(a,b,c){this.h=new Lx(a);this.i=b;this.g=c}r=Ox.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Px(this.i)};r.removeSegments=function(a,b){return Qx(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Rx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.ag(e)}))})};r.addManifests=function(){return Px(this.g)};
|
|
1150
1151
|
r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function Sx(a,b,c){a=Mx(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Mx(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Qx(this,this.g,a,b)};
|
|
1151
|
-
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Rx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.
|
|
1152
|
+
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Rx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Pc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Nx(a.h,a.g,"readonly"),c=new Map,E(d,Kx(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.Pc(f),2);g=h.h;c.set(e,g);G(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};r.ag=function(a){return a};r.Pc=function(a){return Promise.resolve(a)};
|
|
1152
1153
|
function Px(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Mx(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={uf:void 0},h=g.next())l=h.value,k.uf=e.add(l),k.uf.onsuccess=function(n){return function(){f.push(n.uf.result)}}(k);return E(m,d.promise(),2)}return m.return(f)})};
|
|
1153
1154
|
function Qx(a,b,c,d){a=Mx(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={$e:void 0},e=c.next())f.$e=e.value,b.delete(f.$e).onsuccess=function(g){return function(){return d(g.$e)}}(f);return a.promise()}
|
|
1154
1155
|
function Rx(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Nx(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={de:void 0,Jd:void 0},k=h.next())l.Jd=k.value,l.de=e.get(l.Jd),l.de.onsuccess=function(n){return function(){void 0==n.de.result&&g.push(n.Jd);f[n.Jd]=n.de.result}}(l);return E(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Tx(a){this.g=new Lx(a)}Tx.prototype.destroy=function(){return this.g.destroy()};Tx.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Nx(a.g,"session-ids","readonly"),c=[],E(d,Kx(b,function(e,f){c.push(f)}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};Tx.prototype.add=function(a){var b=Mx(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
@@ -1156,20 +1157,20 @@ Tx.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?
|
|
|
1156
1157
|
function Wx(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{jb:d,Ga:f},Ga:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function Xx(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({jb:d,Ga:f},e)})})}
|
|
1157
1158
|
function Yx(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function Zx(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function $x(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1158
1159
|
function ay(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Vx,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function by(a,b){Vx.set(a,b)}S("shaka.offline.StorageMuxer",Ux);Ux.unregister=function(a){Vx.delete(a)};Ux.register=by;Ux.prototype.destroy=Ux.prototype.destroy;var Vx=new Map;function cy(){Ox.apply(this,arguments)}ra(cy,Ox);cy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=Mx(c.h,c.g);e=d.store();f=new Zf;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return E(g,Promise.all([d.promise(),f]),0)})};
|
|
1159
|
-
cy.prototype.
|
|
1160
|
+
cy.prototype.Pc=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=dy(a.periods[c],e),b.push(f);return E(h,st(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1160
1161
|
function dy(a,b){ey(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return fy(e,a.startTime,b)})}
|
|
1161
1162
|
function fy(a,b,c){var d=a.initSegmentUri?gy(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1162
|
-
gy(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}cy.prototype
|
|
1163
|
+
gy(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}cy.prototype.ag=function(a){return{data:a.data}};
|
|
1163
1164
|
function gy(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new T(2,9,9004,"Could not parse uri "+a);}
|
|
1164
1165
|
function ey(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
|
|
1165
1166
|
e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function hy(){Ox.apply(this,arguments)}ra(hy,Ox);
|
|
1166
|
-
hy.prototype.
|
|
1167
|
+
hy.prototype.Pc=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(iy(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,st(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1167
1168
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1168
1169
|
function iy(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1169
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function jy(){Ox.apply(this,arguments)}ra(jy,Ox);r=jy.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Sx(this,a,b)};r.
|
|
1170
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function jy(){Ox.apply(this,arguments)}ra(jy,Ox);r=jy.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Sx(this,a,b)};r.Pc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ky(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ky.prototype;
|
|
1170
1171
|
r.init=function(){var a=this,b=new Zf,c=!1,d=new Sc(function(){c=!0;b.reject(new T(2,9,9017))});d.Y(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new cy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new hy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1171
1172
|
new hy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new jy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Tx(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new T(2,
|
|
1172
|
-
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),
|
|
1173
|
+
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),G(b)}})};
|
|
1173
1174
|
r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
|
|
1174
1175
|
r.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,ly(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
|
|
1175
1176
|
function ly(){var a=new Zf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}by("idb",function(){return ed()||Xc()||!window.indexedDB?null:new ky});function my(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}my.prototype.jb=function(){return this.i};my.prototype.Ga=function(){return this.h};my.prototype.key=function(){return this.l};my.prototype.toString=function(){return this.j};
|
|
@@ -1178,7 +1179,7 @@ function py(a,b){var c=new pk(null,0);c.Ua(b.duration);var d=b.streams.filter(fu
|
|
|
1178
1179
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null}}
|
|
1179
1180
|
function qy(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
1180
1181
|
b.next())for(g=e.value,e=ry(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=ry(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
|
|
1181
|
-
function ry(a,b,c){var d=b.segments.map(function(e){return sy(a,e,b)});c.
|
|
1182
|
+
function ry(a,b,c){var d=b.segments.map(function(e){return sy(a,e,b)});c.hd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Lk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1182
1183
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Yd(b.mimeType,b.codecs)])}}
|
|
1183
1184
|
function sy(a,b,c){var d=new my("segment",a.h,a.g,b.dataKey);a=new Gi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?ty(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function ty(a,b){var c=new my("segment",a.h,a.g,b);return new Bi(function(){return[c.toString()]},0,null)};function uy(){this.g=null}r=uy.prototype;r.configure=function(){};
|
|
1184
1185
|
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=ny(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Ux;xa(m,2);return E(m,e.init(),4);case 4:return E(m,Yx(e,d.jb(),d.Ga()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new oy(d.jb(),d.Ga()),l=py(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ba(m),E(m,e.destroy(),7);case 7:Ca(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
@@ -1187,47 +1188,47 @@ r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m
|
|
|
1187
1188
|
r.onInitialVariantChosen=function(){};r.banLocation=function(){};wi["application/x-offline-manifest"]=function(){return new uy};function vy(){}function wy(a){var b=ny(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=cg(a)):a=b&&"segment"==b.g?xy(b.key(),b):ag(new T(2,1,9004,a));return a}
|
|
1188
1189
|
function xy(a,b){var c=new Ux;return cg(void 0).xa(function(){return c.init()}).xa(function(){return Yx(c,b.jb(),b.Ga())}).xa(function(d){return d.getSegments([b.key()])}).xa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",vy);vy.plugin=wy;mg("offline",wy);function yy(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,zy(v.info,p)){v.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Ay(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1189
1190
|
function Ay(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Eh({Eb:b,onError:function(){},Xd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),wa(f,2),d.configure(a),E(f,Mh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ya(f,3);break;case 2:return za(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1190
|
-
h.g)return wa(h,2),E(h,Yh(d,g),4);if(2!=h.g)return e.push(g),ya(h,0);za(h);
|
|
1191
|
-
function Cy(a){var b=[],c=wf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(gf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(hf(c.value));return b};function Ey(){this.g={}}function Fy(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 Gy(a,b){a.g[b.id]=b.bandwidth||2048}function Hy(a,b){a=a.g[b];null==a&&(a=0);return a};function Iy(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Zb()):(this.h=km(),this.g=new lg);this.i=[];this.j=[];var c=!a;this.l=new
|
|
1192
|
-
case 4:b.h=null,b.g=null,
|
|
1191
|
+
h.g)return wa(h,2),E(h,Yh(d,g),4);if(2!=h.g)return e.push(g),ya(h,0);za(h);G(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function zy(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pb(a.audioCapabilities,b.audioCapabilities,c)&&Pb(a.videoCapabilities,b.videoCapabilities,c)};function By(a,b,c){var d=b.presentationTimeline.getDuration();b=Cy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Dy(a,b){var c=py(new oy(a.jb(),a.Ga()),b),d=b.appMetadata||{};c=Cy(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}}
|
|
1192
|
+
function Cy(a){var b=[],c=wf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(gf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(hf(c.value));return b};function Ey(){this.g={}}function Fy(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 Gy(a,b){a.g[b.id]=b.bandwidth||2048}function Hy(a,b){a=a.g[b];null==a&&(a=0);return a};function Iy(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Zb()):(this.h=km(),this.g=new lg);this.i=[];this.j=[];var c=!a;this.l=new yg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return E(k,Promise.all(b.j.map(function(l){return Ex(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return E(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return E(k,b.g.destroy(),4);
|
|
1193
|
+
case 4:b.h=null,b.g=null,G(k)}})})}function Jy(){if(Tc())a:{var a=t(Vx.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Iy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=bm(a,b));return om(this.h,a)};r.getConfiguration=function(){var a=km();om(a,this.h,km());return a};r.Zb=function(){return this.g};
|
|
1193
1194
|
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Dx(this.g);this.j.push(f);b=Ky(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):E(h,Jm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=vi(a,c||null);return h.return(g())})},e,f);b=new $f(b,function(){return Ex(f)});b.finally(function(){Ob(d.j,f)});return Ly(this,b)};
|
|
1194
|
-
function Ky(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return My(),h=g=null,k=new Ux,n=m=l=null,wa(z,2,3),E(z,d(),5);case 5:return g=z.h,E(z,Ny(a,b,g,e),6);case 6:p=z.h;Oy(a);q=!p.presentationTimeline.V()&&!p.presentationTimeline.
|
|
1195
|
-
p,b,c,e,f),v=u.
|
|
1195
|
+
function Ky(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return My(),h=g=null,k=new Ux,n=m=l=null,wa(z,2,3),E(z,d(),5);case 5:return g=z.h,E(z,Ny(a,b,g,e),6);case 6:p=z.h;Oy(a);q=!p.presentationTimeline.V()&&!p.presentationTimeline.ec();if(!q)throw new T(2,9,9005,b);return E(z,a.sc(p,function(B){n=n||B},e),7);case 7:h=z.h;Oy(a);if(n)throw n;return E(z,Py(p,h,e),8);case 8:return E(z,k.init(),9);case 9:return Oy(a),E(z,Wx(k),10);case 10:return l=z.h,Oy(a),u=Qy(h,
|
|
1196
|
+
p,b,c,e,f),v=u.gi,w=u.Nf,E(z,l.Ga.addManifests([v]),11);case 11:A=z.h;Oy(a);m=A[0];Oy(a);if(n)throw n;return E(z,Ry(a,w,m,v,f,e,l.Ga,p,h),12);case 12:return Oy(a),Sy(p,v,h,e),E(z,l.Ga.updateManifest(m,v),13);case 13:return Oy(a),y=new my("manifest",l.path.jb,l.path.Ga,m),z.return(Dy(y,v));case 3:return Ba(z),E(z,k.destroy(),14);case 14:if(!g){z.u(15);break}return E(z,g.stop(),15);case 15:if(!h){z.u(17);break}return E(z,h.destroy(),17);case 17:Ca(z,0);break;case 2:C=za(z);if(null==m){z.u(19);break}return E(z,
|
|
1196
1197
|
Ty(m),19);case 19:throw n||C;}})}
|
|
1197
|
-
function Ry(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,v,w,A,y;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(z,B){var D,
|
|
1198
|
+
function Ry(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,v,w,A,y;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(z,B){var D,J,H,K,I,F,M;return O(function(N){if(1==N.g){D=t(z);J=D.next();for(H={};!J.done;H={uc:void 0},J=D.next())H.uc=J.value,K=Ax(H.uc,f),I=H.uc.i,F=H.uc.h,M=function(L){return function(P){var R,Q,ca;return O(function(ea){if(1==ea.g)return E(ea,g.addSegments([{data:P}]),2);R=ea.h;Oy(a);Q=L.uc.g;ca=zx(Q);l[ca]=R[0];m+=P.byteLength;G(ea)})}}(H),Gx(e,H.uc.groupId,K,I,F,M);return E(N,
|
|
1198
1199
|
Ix(e),2)}if(!B)return N.u(0);Oy(a);Sy(h,d,k,f);return E(N,g.updateManifest(c,d),0)})};p=!1;wa(C,2);if(!Uy(h)||!p||Vy(h)){C.u(4);break}return E(C,n(b.filter(function(z){return z.h}),!0),5);case 5:return Oy(a),b=b.filter(function(z){return!z.h}),q=l,u=m,l={},m=0,E(C,Wy(g,c,d,q,u,function(){return Oy(a)}),6);case 6:Oy(a);case 4:if(p){C.u(7);break}return E(C,n(b,!1),8);case 8:return Oy(a),v=l,w=m,l={},m=0,E(C,Wy(g,c,d,v,w,function(){return Oy(a)}),9);case 9:Oy(a);case 7:ya(C,0);break;case 2:return A=
|
|
1199
1200
|
za(C),y=Object.values(l),E(C,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function Ty(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new Ux,E(f,b.init(),2);case 2:return E(f,Wx(b),3);case 3:return c=f.h,d=new my("manifest",c.path.jb,c.path.Ga,a),E(f,b.destroy(),4);case 4:return e=new Iy,E(f,e.remove(d.toString()),0)}})}
|
|
1200
1201
|
function Wy(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;wa(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
|
|
1201
1202
|
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();ya(A,0);break;case 2:return v=za(A),E(A,Ty(b),5);case 5:if(g){A.u(6);break}w=Object.values(d);return E(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
|
|
1202
|
-
function Py(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,
|
|
1203
|
-
e.push(hf(q));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(lf(w));return E(R,c.offline.trackSelectionCallback(e),3);case 3:A=R.h;y=a.presentationTimeline.getDuration();C=0;z=t(A);for(B=z.next();!B.done;B=z.next())D=B.value,
|
|
1204
|
-
N.next())P=L.value,"variant"==P.type&&
|
|
1205
|
-
function Qy(a,b,c,d,e,f){var g=By(c,b,d),h=e.offline.progressCallback;Fx(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Uh(a,"cenc",q)});var k=Uy(b)&&!Vy(b),l=null;k&&(l=Yy.get(a.g.keySystem));for(var m=new Ey,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Gy(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Fy(m,p.value);m=Zy(f,m,b,e);f=m.streams;m=m.
|
|
1206
|
-
n&&p&&(n.initData=[]);return{
|
|
1207
|
-
function Vy(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Sy(a,b,c,d){b.expiration=c.
|
|
1203
|
+
function Py(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,J,H,K,I,F,M,N,L,P;return O(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Me(a,c.restrictions,d),E(R,Qe(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ke(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(gf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
|
|
1204
|
+
e.push(hf(q));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(lf(w));return E(R,c.offline.trackSelectionCallback(e),3);case 3:A=R.h;y=a.presentationTimeline.getDuration();C=0;z=t(A);for(B=z.next();!B.done;B=z.next())D=B.value,J=D.bandwidth*y/8,C+=J;wa(R,4);return E(R,c.offline.downloadSizeCallback(C),6);case 6:H=R.h;if(!H)throw new T(2,9,9014);ya(R,5);break;case 4:K=za(R);if(K instanceof T)throw K;throw new T(2,9,9015);case 5:I=new Set;F=new Set;M=new Set;N=t(A);for(L=N.next();!L.done;L=
|
|
1205
|
+
N.next())P=L.value,"variant"==P.type&&I.add(P.id),"text"==P.type&&F.add(P.id),"image"==P.type&&M.add(P.id);a.variants=a.variants.filter(function(Q){return I.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return F.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return M.has(Q.id)});Xy(a);G(R)}})}
|
|
1206
|
+
function Qy(a,b,c,d,e,f){var g=By(c,b,d),h=e.offline.progressCallback;Fx(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Uh(a,"cenc",q)});var k=Uy(b)&&!Vy(b),l=null;k&&(l=Yy.get(a.g.keySystem));for(var m=new Ey,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Gy(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Fy(m,p.value);m=Zy(f,m,b,e);f=m.streams;m=m.Nf;n=a.g;p=e.offline.usePersistentLicense;
|
|
1207
|
+
n&&p&&(n.initData=[]);return{gi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Wc(),streams:f,sessionIds:p?ci(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Nf:m}}function Uy(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1208
|
+
function Vy(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Sy(a,b,c,d){b.expiration=c.Wc();c=ci(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Uy(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}r.remove=function(a){return $y(this,az(this,a))};
|
|
1208
1209
|
function az(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:My();c=ny(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Ux;xa(k,2);return E(k,e.init(),4);case 4:return E(k,Yx(e,d.jb(),d.Ga()),5);case 5:return f=k.h,E(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],E(k,Promise.all([bz(a,h,e),cz(f,d,h)]),2);case 2:return Ba(k),E(k,e.destroy(),8);case 8:Ca(k,0)}})}
|
|
1209
1210
|
function dz(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Yd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Yd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function bz(a,b,c){return O(function(d){return E(d,ez(a.g,a.h.drm,c,b),0)})}
|
|
1210
|
-
function cz(a,b,c){function d(){}var e=fz(c);Dy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.
|
|
1211
|
+
function cz(a,b,c){function d(){}var e=fz(c);Dy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.yi=function(){return $y(this,gz(this))};
|
|
1211
1212
|
function gz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return My(),b=a.g,c=a.h.drm,d=new Ux,e=!1,xa(n,2),E(n,d.init(),4);case 4:f=[],Zx(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return E(n,k.getAll(),8);case 8:return l=n.h,E(n,yy(c,b,l),9);case 9:return m=n.h,E(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return Ba(n),E(n,d.destroy(),11);case 11:Ca(n,3);break;case 3:return n.return(!e)}})}
|
|
1212
|
-
r.list=function(){return $y(this,hz())};function hz(){var a,b,c;return O(function(d){switch(d.g){case 1:return My(),a=[],b=new Ux,xa(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),Xx(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Dy(new my("manifest",e.jb,e.Ga,l),k);a.push(k)});
|
|
1213
|
+
r.list=function(){return $y(this,hz())};function hz(){var a,b,c;return O(function(d){switch(d.g){case 1:return My(),a=[],b=new Ux,xa(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),Xx(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Dy(new my("manifest",e.jb,e.Ga,l),k);a.push(k)});G(h)})})}),E(d,c,2);case 2:return Ba(d),E(d,b.destroy(),6);case 6:Ca(d,3);break;case 3:return d.return(a)}})}
|
|
1213
1214
|
function Ny(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
|
|
1214
1215
|
c.configure(d.manifest),Oy(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Oy(a),k=iz(h),E(l,Promise.all(Cg(k,function(m){return m.createSegmentIndex()})),3);Oy(a);if(e)throw e;return l.return(h)})}r.sc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Eh({Eb:d.g,onError:b,Xd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Jh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Wh(e),3):f.return(e)})};
|
|
1215
|
-
function Zy(a,b,c,d){var e=new Map,f=iz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=jz(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),
|
|
1216
|
+
function Zy(a,b,c,d){var e=new Map,f=iz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=jz(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Nf:Array.from(e.values())}}
|
|
1216
1217
|
function jz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1217
|
-
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;kz(d,c.presentationTimeline.ib(),function(l){var m=zx(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Hy(b,d.id)*p;p=Cx(a.g,p);f.set(m,new yx(l,p,k,!1))}l.
|
|
1218
|
+
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;kz(d,c.presentationTimeline.ib(),function(l){var m=zx(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Hy(b,d.id)*p;p=Cx(a.g,p);f.set(m,new yx(l,p,k,!1))}l.ea&&(n=zx(l.ea),f.has(n)||(p=.5*Hy(b,d.id),p=Cx(a.g,p),f.set(n,new yx(l.ea,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
1218
1219
|
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});0!==h&&(k=(k+1)%h)});return g}function kz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Oy(a){if(a.l.g)throw new T(2,9,7001);}
|
|
1219
1220
|
function My(){if(!Jy())throw new T(2,9,9E3);}function $y(a,b){return O(function(c){if(1==c.g)return a.i.push(b),xa(c,2),E(c,b,4);if(2!=c.g)return c.return(c.h);Ba(c);Ob(a.i,b);return Ca(c,0)})}function Ly(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Ob(a.i,c)})}
|
|
1220
1221
|
function fz(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
1221
1222
|
function ez(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=$x(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:dz(d,!1),videoCapabilities:dz(d,!0)}});return E(h,yy(b,a,f),2)}return 3!=h.g?(g=h.h,E(h,e.remove(g),3)):E(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1222
1223
|
function iz(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
|
|
1223
1224
|
function Xy(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",Iy);Iy.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new Ux,xa(b,2),E(b,ay(a),2)):5!=b.g?(Ba(b),E(b,a.destroy(),5)):Ca(b,0)})};
|
|
1224
|
-
Iy.prototype.list=Iy.prototype.list;Iy.prototype.removeEmeSessions=Iy.prototype.
|
|
1225
|
+
Iy.prototype.list=Iy.prototype.list;Iy.prototype.removeEmeSessions=Iy.prototype.yi;Iy.prototype.remove=Iy.prototype.remove;Iy.prototype.store=Iy.prototype.store;Iy.prototype.getNetworkingEngine=Iy.prototype.Zb;Iy.prototype.getConfiguration=Iy.prototype.getConfiguration;Iy.prototype.configure=Iy.prototype.configure;Iy.prototype.destroy=Iy.prototype.destroy;Iy.support=Jy;
|
|
1225
1226
|
var Yy=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");op.offline=Jy;function lz(){}function mz(a,b){a={priority:b||0,callback:a};for(b=0;b<nz.length;b++)if(nz[b].priority<a.priority){nz.splice(b,0,a);return}nz.push(a)}S("shaka.polyfill",lz);lz.register=mz;lz.installAll=function(){for(var a=t(nz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){$a("Error installing polyfill!",c)}}};var nz=[];function oz(){this.g=new pz}function qz(){window.AbortController||(window.AbortController=oz,window.AbortSignal=pz)}oz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(oz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});lz.AbortController=oz;oz.install=qz;
|
|
1226
1227
|
function pz(){this.h=!1;this.g=void 0;this.onabort=null;this.i=new ig}pz.prototype.addEventListener=function(a,b,c){return this.i.addEventListener(a,b,c)};pz.prototype.removeEventListener=function(a,b,c){return this.i.removeEventListener(a,b,c)};pz.prototype.dispatchEvent=function(a){return this.i.dispatchEvent(a)};pz.prototype.throwIfAborted=function(){if(this.h)throw this.g;};
|
|
1227
1228
|
fa.Object.defineProperties(pz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});mz(qz);function rz(){}function sz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())tz(b.value)}function tz(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}lz.Aria=rz;rz.install=sz;mz(sz);function uz(){}function vz(){hd()||Yc("Sky_STB")||wz()}lz.EncryptionScheme=uz;uz.install=vz;mz(vz,-2);function xz(){}
|
|
1228
1229
|
function yz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
1229
1230
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",zz);document.addEventListener("webkitfullscreenerror",zz);document.addEventListener("mozfullscreenchange",zz);document.addEventListener("mozfullscreenerror",zz);document.addEventListener("MSFullscreenChange",zz);document.addEventListener("MSFullscreenError",zz)}}
|
|
1230
|
-
function zz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}lz.Fullscreen=xz;xz.install=yz;mz(yz);function Az(){}function Bz(){var a=!0;!ed()||ed()&&md()||ed()&&Yc("Fuchsia")||(a=!1);if(fd()||id()||hd()||bd()||Zc()||Yc("PC=EOS")||jd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Cz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Dz)}
|
|
1231
|
+
function zz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}lz.Fullscreen=xz;xz.install=yz;mz(yz);function Az(){}function Bz(){var a=!0;!ed()||ed()&&md()||ed()&&Yc("Fuchsia")||(a=!1);if(fd()||id()||hd()||bd()||Zc()||Yc("PC=EOS")||jd()||Yc("WPE"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Cz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Dz)}
|
|
1231
1232
|
function Dz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Uc(e),!f)||d&&(g=d.contentType,h=Uc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Tc())return p.return(b);if(!c){p.u(3);break}return E(p,Ez(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var q=d.contentType;ed()&&d.spatialRendering&&
|
|
1232
1233
|
(q+="; spatialRendering=true");l=nb(q);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,Fz(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
|
|
1233
1234
|
function Ez(a){var b,c;return O(function(d){return 1==d.g?ed()?E(d,Gz(a),3):Zc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(nb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(nb(a.contentType))})}
|
|
@@ -1235,7 +1236,7 @@ function Fz(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){switch(u.g){ca
|
|
|
1235
1236
|
{initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=ie(k)+";"+ge(k);n=ie(l)+";"+ge(l);p=c.keySystem;q=null;wa(u,2);if(Oc.has(m+"#"+n+"#"+p)){q=Oc.get(m+"#"+n+"#"+p)||null;u.u(4);break}return E(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:q=u.h,Oc.set(m+"#"+n+"#"+p,q);case 4:ya(u,
|
|
1236
1237
|
3);break;case 2:za(u);case 3:return u.return(q)}})}
|
|
1237
1238
|
function Gz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(nb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Hz?(c=Hz[b],d.u(2)):E(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Hz[b]=c);return d.return(c)})}lz.MediaCapabilities=Az;Az.install=Bz;
|
|
1238
|
-
var Cz=null;Az.originalMcap=Cz;var Hz={};Az.memoizedCanDisplayTypeRequests_=Hz;mz(Bz,-1);function Iz(){}function Jz(){var a=kd();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(Kz(),Lz()):15>=a&&Kz():Yc("DT_STB_BCM")?(Kz(),Lz()):
|
|
1239
|
+
var Cz=null;Az.originalMcap=Cz;var Hz={};Az.memoizedCanDisplayTypeRequests_=Hz;mz(Bz,-1);function Iz(){}function Jz(){var a=kd();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(Kz(),Lz()):15>=a&&Kz():Yc("DT_STB_BCM")?(Kz(),Lz()):ad()||$c()||Yc("Tizen 4")?Mz():Yc("WPE")&&(Kz(),Lz());(window.MediaSource||window.ManagedMediaSource)&&Nz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Oz()}
|
|
1239
1240
|
function Kz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}function Lz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1240
1241
|
function Nz(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=de(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=de(c)&&b(c)}}}
|
|
1241
1242
|
function Mz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=ge(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=ge(c)&&b(c)}}}
|
|
@@ -1251,10 +1252,10 @@ function bA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=
|
|
|
1251
1252
|
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;}
|
|
1252
1253
|
bA.prototype.createMediaKeys=function(){var a=new fA(this.keySystem);return Promise.resolve(a)};bA.prototype.getConfiguration=function(){return this.g};function fA(a){this.h=new WebKitMediaKeys(a);this.g=new hb}fA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new hA(this.h,a)};fA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1253
1254
|
function dA(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",eA);try{return wk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}fA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function hA(a){ig.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hb;this.sessionId="";this.expiration=NaN;this.closed=new Zf;this.keyStatuses=new iA}ra(hA,ig);r=hA.prototype;
|
|
1254
|
-
r.generateRequest=function(a,b){var c=this;this.h=new Zf;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.
|
|
1255
|
+
r.generateRequest=function(a,b){var c=this;this.h=new Zf;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.bc()?"license-request":"license-renewal").set("message",Cb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(jA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1255
1256
|
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:jA(c,"output-not-allowed");break;default:jA(c,"internal-error")}});jA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1256
1257
|
r.update=function(a){this.g=new Zf;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function jA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
|
|
1257
|
-
function iA(){this.size=0;this.g=void 0}r=iA.prototype;r.
|
|
1258
|
+
function iA(){this.size=0;this.g=void 0}r=iA.prototype;r.bc=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Nc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Nc.value();return this.g&&yb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var gA="apple";function kA(){}function lA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||$c()||Yc("Tizen 4")||Yc("Tizen 5.0")||cd())&&(MediaKeys.prototype.setServerCertificate=mA)}function mA(){return Promise.resolve(!1)}lz.PatchedMediaKeysCert=kA;kA.install=lA;mz(lA);function nA(){}function oA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=pA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qA,window.MediaKeys=rA,window.MediaKeySystemAccess=sA,window.shakaMediaKeysPolyfill=tA)}function pA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1258
1259
|
function qA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}lz.PatchedMediaKeysNop=nA;nA.install=oA;function rA(){throw new TypeError("Illegal constructor.");}rA.prototype.createSession=function(){};rA.prototype.setServerCertificate=function(){};rA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function sA(){this.keySystem="";throw new TypeError("Illegal constructor.");}sA.prototype.getConfiguration=function(){};
|
|
1259
1260
|
sA.prototype.createMediaKeys=function(){};var tA="nop";mz(oA,-10);function uA(){}
|
|
1260
1261
|
function vA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)wA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=yA;window.MediaKeys=zA;window.MediaKeySystemAccess=AA;window.shakaMediaKeysPolyfill=BA}}
|
|
@@ -1262,14 +1263,14 @@ function CA(a){var b=wA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}functi
|
|
|
1262
1263
|
function AA(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),
|
|
1263
1264
|
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"]):
|
|
1264
1265
|
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;}AA.prototype.createMediaKeys=function(){var a=new zA(this.g);return Promise.resolve(a)};AA.prototype.getConfiguration=function(){return this.h};function zA(a){this.l=a;this.h=null;this.g=new hb;this.i=[];this.j=new Map}
|
|
1265
|
-
function DA(a,b){a.h=b;a.g.nb();var c=wA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Cb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=EA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.
|
|
1266
|
+
function DA(a,b){a.h=b;a.g.nb();var c=wA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Cb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=EA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.bc()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=EA(a,d.sessionId))&&d.ready()}),
|
|
1266
1267
|
a.g.D(b,c+"keyerror",function(d){var e=EA(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?FA(e,"output-restricted"):1==f?FA(e,"expired"):FA(e,"internal-error"))}}))}
|
|
1267
1268
|
zA.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 GA(b,this.l,a);this.i.push(a);return a};zA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};zA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1268
1269
|
function EA(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 GA(a,b,c){ig.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 Zf;this.keyStatuses=new HA}ra(GA,ig);r=GA.prototype;r.ready=function(){FA(this,"usable");this.g&&this.g.resolve();this.g=null};
|
|
1269
1270
|
function IA(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=Bb(Bd("LOAD_SESSION|"+c));else{var e=Bd("PERSISTENT|");d=Nd(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new Zf;var f=CA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Sc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).Y(.01)}return a.h}
|
|
1270
1271
|
function JA(a,b,c){if(a.g)a.g.then(function(){return JA(a,b,c)}).catch(function(){return JA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=xd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Id(e.keys[0].k);e=Id(e.keys[0].kid)}else d=Bb(c),e=null;var f=CA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1271
1272
|
function FA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r.generateRequest=function(a,b){return IA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?IA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Zf;JA(this,b,a);return b};
|
|
1272
|
-
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=CA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function HA(){this.size=0;this.g=void 0}r=HA.prototype;r.
|
|
1273
|
+
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=CA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function HA(){this.size=0;this.g=void 0}r=HA.prototype;r.bc=function(){return this.g};
|
|
1273
1274
|
r.forEach=function(a){this.g&&a(this.g,Nc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Nc.value();return this.g&&yb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var wA="",BA="webkit";mz(vA);function KA(){}function LA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=MA,Object.defineProperty(a,"disablePictureInPicture",{get:NA,set:OA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=PA,document.addEventListener("webkitpresentationmodechanged",QA,!0))}}
|
|
1274
1275
|
function QA(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
1275
1276
|
function MA(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function PA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
@@ -1294,7 +1295,7 @@ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.inclu
|
|
|
1294
1295
|
function FB(a,b,c){a=qB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=nh(a[e],"urn:ebu:tt:style",c);f||(f=oh(a[e],kB,c));f||(f=EB(a[e],b,c));f&&(d=f)}return d}function qB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?nh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1295
1296
|
function sB(a,b,c,d){a=rB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function rB(a,b){var c=GB(a.attributes.begin,b),d=GB(a.attributes.end,b);a=GB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1296
1297
|
function GB(a,b){var c=null;if(HB.test(a)){a=HB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(IB.test(a))c=JB(IB,a);else if(KB.test(a))c=JB(KB,a);else if(LB.test(a))a=LB.exec(a),c=Number(a[1])/b.frameRate;else if(MB.test(a))a=MB.exec(a),c=Number(a[1])/b.g;else if(NB.test(a))c=JB(NB,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1297
|
-
function JB(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 mB(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{
|
|
1298
|
+
function JB(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 mB(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Ub:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",iB);iB.prototype.parseMedia=iB.prototype.parseMedia;iB.prototype.setManifestType=iB.prototype.setManifestType;iB.prototype.setSequenceMode=iB.prototype.setSequenceMode;iB.prototype.parseInit=iB.prototype.parseInit;
|
|
1298
1299
|
function lB(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]))}
|
|
1299
1300
|
var uB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,CB=/^(\d{1,4}(?:\.\d+)?|100)%$/,BB=/^(\d+px|\d+em|\d*\.?\d+c)$/,vB=/^(\d+)px (\d+)px$/,HB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,IB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,KB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,LB=/^(\d*(?:\.\d*)?)f$/,MB=/^(\d*(?:\.\d*)?)t$/,NB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),AB={left:Yb,center:"center",right:"end",start:Yb,
|
|
1300
1301
|
end:"end"},zB={left:"line-left",center:"center",right:"line-right"},jB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],kB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],pB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];oe["application/ttml+xml"]=function(){return new iB};function OB(){this.g=new iB}OB.prototype.parseInit=function(a){var b=!1;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};OB.prototype.setSequenceMode=function(){};OB.prototype.setManifestType=function(){};
|
|
@@ -1317,15 +1318,15 @@ function SB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exe
|
|
|
1317
1318
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sb);else if(d=/^region:(.*)$/.exec(b)){if(b=YB(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=fc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Xb,a.line=Number(c[1]),c[2]&&(a.lineAlign=fc[c[2].toUpperCase()])}
|
|
1318
1319
|
function YB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function QB(a){a=Bp(a,UB);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",PB);PB.prototype.parseMedia=PB.prototype.parseMedia;PB.prototype.setManifestType=PB.prototype.setManifestType;PB.prototype.setSequenceMode=PB.prototype.setSequenceMode;PB.prototype.parseInit=PB.prototype.parseInit;var UB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1319
1320
|
oe["text/vtt"]=function(){return new PB};oe['text/vtt; codecs="vtt"']=function(){return new PB};oe['text/vtt; codecs="wvtt"']=function(){return new PB};function ZB(){this.g=null}ZB.prototype.parseInit=function(a){var b=this,c=!1;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).R("mdhd",function(d){d=Zi(d.reader,d.version);b.g=d.timescale}).box("minf",Qg).box("stbl",Qg).R("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);};ZB.prototype.setSequenceMode=function(){};ZB.prototype.setManifestType=function(){};
|
|
1320
|
-
ZB.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 Jg).box("moof",Qg).box("traf",Qg).R("tfdt",function(C){g=!0;c=Yi(C.reader,C.version).baseMediaDecodeTime}).R("tfhd",function(C){l=Xi(C.reader,C.flags).
|
|
1321
|
-
p.value;var q=p.
|
|
1321
|
+
ZB.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 Jg).box("moof",Qg).box("traf",Qg).R("tfdt",function(C){g=!0;c=Yi(C.reader,C.version).baseMediaDecodeTime}).R("tfhd",function(C){l=Xi(C.reader,C.flags).Rc}).R("trun",function(C){h=!0;d=$i(C.reader,C.version,C.flags).Hg}).box("mdat",Vg(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Gg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1322
|
+
p.value;var q=p.yf||l,u=p.ee?c+p.ee:a;a=u+(q||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),y=null;"vttc"==Pg(A)?8<w&&(y=m.mb(w-8)):m.skip(w-8);q&&y&&(w=$B(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(we)};function $B(a,b,c){var d,e,f;(new Jg).box("payl",Vg(function(g){d=xd(g)})).box("iden",Vg(function(g){e=xd(g)})).box("sttg",Vg(function(g){f=xd(g)})).parse(a);return d?aC(d,e,f,b,c):null}
|
|
1322
1323
|
function aC(a,b,c,d,e){d=new Rb(d,e,"");TB(a,d,new Map);b&&(d.id=b);if(c)for(a=new zp(c),b=Cp(a);b;)SB(d,b,[]),Ap(a),b=Cp(a);return d}S("shaka.text.Mp4VttParser",ZB);ZB.prototype.parseMedia=ZB.prototype.parseMedia;ZB.prototype.setManifestType=ZB.prototype.setManifestType;ZB.prototype.setSequenceMode=ZB.prototype.setSequenceMode;ZB.prototype.parseInit=ZB.prototype.parseInit;oe['application/mp4; codecs="wvtt"']=function(){return new ZB};function bC(){}bC.prototype.parseInit=function(){};bC.prototype.setSequenceMode=function(){};bC.prototype.setManifestType=function(){};bC.prototype.parseMedia=function(a){var b=xd(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 zp(c[0]),e=cC(d),f=Bp(d,/,/g);d=cC(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 Rb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1323
1324
|
function cC(a){a=Bp(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",bC);bC.prototype.parseMedia=bC.prototype.parseMedia;bC.prototype.setManifestType=bC.prototype.setManifestType;bC.prototype.setSequenceMode=bC.prototype.setSequenceMode;bC.prototype.parseInit=bC.prototype.parseInit;oe["text/x-subviewer"]=function(){return new bC};function dC(){this.g=new PB}dC.prototype.parseInit=function(){};dC.prototype.setSequenceMode=function(){};dC.prototype.setManifestType=function(){};dC.prototype.parseMedia=function(a,b,c){a=xd(a);a=eC(a);a=Bb(Bd(a));return this.g.parseMedia(a,b,c)};
|
|
1324
1325
|
function eC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",dC);dC.srt2webvtt=eC;dC.prototype.parseMedia=dC.prototype.parseMedia;
|
|
1325
1326
|
dC.prototype.setManifestType=dC.prototype.setManifestType;dC.prototype.setSequenceMode=dC.prototype.setSequenceMode;dC.prototype.parseInit=dC.prototype.parseInit;oe["text/srt"]=function(){return new dC};function fC(){}fC.prototype.parseInit=function(){};fC.prototype.setSequenceMode=function(){};fC.prototype.setManifestType=function(){};
|
|
1326
1327
|
fC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=xd(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=gC.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=hC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(iC);else if("Style"==a){a=f.split(iC);f={};for(var g=0;g<e.length&&
|
|
1327
|
-
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={
|
|
1328
|
-
l.
|
|
1328
|
+
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={Ug:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=hC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(iC);else if("Dialogue"==f){g=g.split(iC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=jC(f.Start);var k=jC(f.End);g=new Rb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Ug=f.Style;(a=d.find(function(l){return function(m){return m.Name==
|
|
1329
|
+
l.Ug}}(a)))&&kC(g,a);e.push(g)}return e};
|
|
1329
1330
|
function kC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=lC(c))a.color=c;if(c=b.BackColour)if(c=lC(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=Zb;a.textAlign="start";break;case 2:a.displayAlign=Zb;a.textAlign=Tb;break;case 3:a.displayAlign=Zb;a.textAlign="end";
|
|
1330
1331
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Tb;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=Tb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1331
1332
|
function lC(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 jC(a){a=mC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",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;
|
|
@@ -1334,34 +1335,34 @@ function pC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1
|
|
|
1334
1335
|
function qC(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,
|
|
1335
1336
|
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 rC(a){this.i=a;this.h=0;this.g=new Map}r=rC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(je(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1336
1337
|
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Wi(e),g=f.length;g<e.length&&!pC(e,g);g++);a=1E3*c.endTime;f=Vi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=oC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=nC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Fd+k.Z;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1337
|
-
k.Fd,g+l),size:k.Z,duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb: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,Wa:[],
|
|
1338
|
+
k.Fd,g+l),size:k.Z,duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb: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,Wa:[],ka:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:h},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};
|
|
1338
1339
|
S("shaka.transmuxer.AacTransmuxer",rC);rC.prototype.transmux=rC.prototype.transmux;rC.prototype.getOriginalMimeType=rC.prototype.getOriginalMimeType;rC.prototype.convertCodecs=rC.prototype.convertCodecs;rC.prototype.isSupported=rC.prototype.isSupported;rC.prototype.destroy=rC.prototype.destroy;kc("audio/aac",function(){return new rC("audio/aac")},qc);function sC(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,
|
|
1339
|
-
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,
|
|
1340
|
+
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,ka:a,Z:e}}
|
|
1340
1341
|
function tC(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 uC(a){this.i=a;this.h=0;this.g=new Map}r=uC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1341
|
-
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Wi(a),f=e.length;f<a.length&&!tC(a,f);f++);var g=1E3*c.endTime;e=Vi(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=sC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.
|
|
1342
|
-
Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}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,Wa:[],
|
|
1343
|
-
uC.prototype.getOriginalMimeType=uC.prototype.getOriginalMimeType;uC.prototype.convertCodecs=uC.prototype.convertCodecs;uC.prototype.isSupported=uC.prototype.isSupported;uC.prototype.destroy=uC.prototype.destroy;kc("audio/ac3",function(){return new uC("audio/ac3")},qc);function vC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new fj(a.subarray(b+2));hj(c,2);hj(c,3);var d=ij(c,11)+1<<1,e=ij(c,2);if(3==e){e=ij(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ij(c,2);var g=ij(c,3),h=ij(c,1);c=ij(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,
|
|
1344
|
-
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Wi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Vi(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=vC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.
|
|
1345
|
-
duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}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,Wa:[],
|
|
1346
|
-
wC.prototype.getOriginalMimeType=wC.prototype.getOriginalMimeType;wC.prototype.convertCodecs=wC.prototype.convertCodecs;wC.prototype.isSupported=wC.prototype.isSupported;wC.prototype.destroy=wC.prototype.destroy;kc("audio/ec3",function(){return new wC("audio/ec3")},qc);function xC(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 fj(b.data),d=
|
|
1347
|
-
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=
|
|
1342
|
+
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Wi(a),f=e.length;f<a.length&&!tC(a,f);f++);var g=1E3*c.endTime;e=Vi(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=sC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ka;k.push({data:a.subarray(f,f+l.Z),size:l.Z,duration:1536,
|
|
1343
|
+
Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}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,Wa:[],ka:h,sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",uC);uC.prototype.transmux=uC.prototype.transmux;
|
|
1344
|
+
uC.prototype.getOriginalMimeType=uC.prototype.getOriginalMimeType;uC.prototype.convertCodecs=uC.prototype.convertCodecs;uC.prototype.isSupported=uC.prototype.isSupported;uC.prototype.destroy=uC.prototype.destroy;kc("audio/ac3",function(){return new uC("audio/ac3")},qc);function vC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new fj(a.subarray(b+2));hj(c,2);hj(c,3);var d=ij(c,11)+1<<1,e=ij(c,2);if(3==e){e=ij(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ij(c,2);var g=ij(c,3),h=ij(c,1);c=ij(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,ka:a,Z:d}};function wC(a){this.i=a;this.h=0;this.g=new Map}r=wC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1345
|
+
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Wi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Vi(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=vC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ka;k.push({data:a.subarray(f,f+l.Z),size:l.Z,
|
|
1346
|
+
duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}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,Wa:[],ka:h,sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",wC);wC.prototype.transmux=wC.prototype.transmux;
|
|
1347
|
+
wC.prototype.getOriginalMimeType=wC.prototype.getOriginalMimeType;wC.prototype.convertCodecs=wC.prototype.convertCodecs;wC.prototype.isSupported=wC.prototype.isSupported;wC.prototype.destroy=wC.prototype.destroy;kc("audio/ec3",function(){return new wC("audio/ec3")},qc);function xC(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 fj(b.data),d=mj(c);mj(c);mj(c);kj(c);if(yC.includes(d)&&(d=V(c),3===d&&hj(c,1),kj(c),kj(c),hj(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?nj(c,16):nj(c,64))}kj(c);d=V(c);if(0===d)V(c);else if(1===d)for(hj(c,1),kj(c),kj(c),d=V(c),e=0;e<d;e++)kj(c);kj(c);hj(c,1);var f=V(c),g=V(c),h=ij(c,1);0===h&&hj(c,1);hj(c,1);var k=0,l=0,m=0,n=0;W(c)&&
|
|
1348
|
+
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=mj(c),q=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=q[p-1],e=u[p-1]):255===p&&(d=ij(c,16),e=ij(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
|
|
1348
1349
|
225].concat(k,[1],b));return{height:c,width:f,sa:a,ya:d,Aa:e}}
|
|
1349
1350
|
function zC(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=vj(new fj(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?
|
|
1350
|
-
{data:Nd.apply(Fd,x(c)),
|
|
1351
|
-
sa:b,ya:a.
|
|
1352
|
-
function CC(a){a=new fj(a,!0);
|
|
1353
|
-
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(
|
|
1354
|
-
1)}K=
|
|
1355
|
-
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ca=!1;Q?V(a):ca=W(a);ca||(R=V(a)+1);if(M){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}if(N){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),
|
|
1356
|
-
function DC(a){var b=new fj(a,!0);
|
|
1357
|
-
function EC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Ne&3)<<6|(d.Oe?1:0)<<5|d.Me&31;e[2]=d.Ie;e[3]=d.Je;e[4]=d.Ke;e[5]=d.Le;e[6]=d.Be;e[7]=d.Ce;e[8]=d.De;e[9]=d.Ee;e[10]=d.Fe;e[11]=d.Ge;e[12]=d.He;e[13]=240|(d.Rd&3840)>>8;e[14]=d.Rd&255;e[15]=252|d.mf&3;e[16]=252|d.ue&3;e[17]=248|d.te&7;e[18]=248|d.se&7;e[19]=0;e[20]=0;e[21]=(d.we&3)<<6|(d.jf&7)<<3|(d.
|
|
1358
|
-
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function FC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*GC[14*(3===c?3-d:3===d?3:4)+e-1];f=HC[3*(3===c?0:2===c?1:2)+f];c=IC[c][d];var h=JC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,Z:k,
|
|
1351
|
+
{data:Nd.apply(Fd,x(c)),dd:b}:null}var yC=[100,110,122,244,44,83,86,118,128,138,139,134];function AC(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=BC(b.fullData);a=CC(c.fullData);var f=DC(d.fullData);b=EC(b.fullData,c.fullData,d.fullData,{jf:e.jf,Mf:e.Mf,Ne:a.Ne,Oe:a.Oe,He:a.He,Me:a.Me,Ie:a.Ie,Je:a.Je,Ke:a.Ke,Le:a.Le,Be:a.Be,Ce:a.Ce,De:a.De,Ee:a.Ee,Fe:a.Fe,Ge:a.Ge,we:a.we,Rd:a.Rd,ue:a.ue,te:a.te,se:a.se,mf:f.mf});return{height:a.height,width:a.width,
|
|
1352
|
+
sa:b,ya:a.Ei,Aa:a.Di}}function BC(a){var b=new fj(a,!0);mj(b);mj(b);ij(b,4);ij(b,2);ij(b,6);a=ij(b,3);b=W(b);return{jf:a+1,Mf:b}}
|
|
1353
|
+
function CC(a){a=new fj(a,!0);mj(a);mj(a);var b=0,c=0,d=0,e=0;ij(a,4);var f=ij(a,3);W(a);for(var g=ij(a,2),h=ij(a,1),k=ij(a,5),l=mj(a),m=mj(a),n=mj(a),p=mj(a),q=mj(a),u=mj(a),v=mj(a),w=mj(a),A=mj(a),y=mj(a),C=mj(a),z=[],B=[],D=0;D<f;D++)z.push(W(a)),B.push(W(a));if(0<f)for(D=f;8>D;D++)ij(a,2);for(D=0;D<f;D++)z[D]&&ij(a,88),B[D]&&mj(a);V(a);z=V(a);3==z&&ij(a,1);B=V(a);D=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var J=V(a),H=V(a),K=V(a);if(W(a))for(var I=0;I<=f;I++)V(a),V(a),V(a);else V(a),V(a),
|
|
1354
|
+
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(I=0;4>I;I++)for(var F=0;F<(3===I?2:6);F++)if(W(a)){var M=Math.min(64,1<<4+(I<<1));1<I&&lj(a);for(var N=0;N<M;N++)lj(a)}else V(a);W(a);W(a);W(a)&&(mj(a),V(a),V(a),W(a));I=V(a);for(M=F=0;M<I;M++)if(N=!1,0!==M&&(N=W(a)),N){M===I&&V(a);W(a);V(a);for(var L=N=0;L<=F;L++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&N++}F=N}else{L=V(a);N=V(a);F=L+N;for(P=0;P<L;P++)V(a),W(a);for(L=0;L<N;L++)V(a),W(a)}if(W(a))for(I=V(a),F=0;F<I;F++){for(M=0;M<K+4;M++)ij(a,1);ij(a,
|
|
1355
|
+
1)}I=K=1;F=0;W(a);W(a);if(W(a)){W(a)&&(M=mj(a),N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(K=N[M-1],I=L[M-1]):255===M&&(K=ij(a,16),I=ij(a,16)));W(a)&&W(a);W(a)&&(ij(a,3),W(a),W(a)&&(mj(a),mj(a),mj(a)));W(a)&&(V(a),V(a));W(a);W(a);W(a);if(M=W(a))V(a),V(a),V(a),V(a);if(W(a)&&(ij(a,32),ij(a,32),W(a)&&V(a),W(a))){L=!1;M=W(a);N=W(a);if(M||N){if(L=W(a))mj(a),ij(a,5),W(a),ij(a,5);ij(a,4);ij(a,4);L&&ij(a,4);ij(a,5);ij(a,5);ij(a,5)}for(P=0;P<=
|
|
1356
|
+
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ca=!1;Q?V(a):ca=W(a);ca||(R=V(a)+1);if(M){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}if(N){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),F=V(a),V(a),V(a),V(a),V(a))}return{He:C,Ne:g,Oe:h,Me:k,Ie:l,Je:m,Ke:n,Le:p,Be:q,Ce:u,De:v,Ee:w,Fe:A,Ge:y,Rd:F,we:0,ue:z,te:J,se:H,width:B-(b+c)*(1===z||2===z?2:1),height:D-(d+e)*(1===z?2:1),Ei:K,Di:I}}
|
|
1357
|
+
function DC(a){var b=new fj(a,!0);mj(b);mj(b);V(b);V(b);W(b);W(b);ij(b,3);W(b);W(b);V(b);V(b);lj(b);W(b);W(b);W(b)&&V(b);lj(b);lj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{mf:c}}
|
|
1358
|
+
function EC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Ne&3)<<6|(d.Oe?1:0)<<5|d.Me&31;e[2]=d.Ie;e[3]=d.Je;e[4]=d.Ke;e[5]=d.Le;e[6]=d.Be;e[7]=d.Ce;e[8]=d.De;e[9]=d.Ee;e[10]=d.Fe;e[11]=d.Ge;e[12]=d.He;e[13]=240|(d.Rd&3840)>>8;e[14]=d.Rd&255;e[15]=252|d.mf&3;e[16]=252|d.ue&3;e[17]=248|d.te&7;e[18]=248|d.se&7;e[19]=0;e[20]=0;e[21]=(d.we&3)<<6|(d.jf&7)<<3|(d.Mf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1359
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function FC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*GC[14*(3===c?3-d:3===d?3:4)+e-1];f=HC[3*(3===c?0:2===c?1:2)+f];c=IC[c][d];var h=JC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,Z:k,Ci:8*c*h}}return null}
|
|
1359
1360
|
function KC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function LC(a,b){if(b+1<a.length&&KC(a,b)){var c=FC(a,b),d=4;c&&c.Z&&(d=c.Z);b+=d;return b===a.length||b+1<a.length&&KC(a,b)}return!1}
|
|
1360
1361
|
var GC=[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],HC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],IC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],JC=[0,1,1,4];function MC(a){this.i=a;this.h=0;this.g=new Map}r=MC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1361
|
-
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Wi(e).length;f<e.length&&!LC(e,f);f++);var g;for(a=[];f<e.length;){var h=FC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.Z<=e.length&&a.push({data:e.subarray(f,f+h.Z),size:h.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=h.Z}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.
|
|
1362
|
-
duration:d,Wa:[],
|
|
1362
|
+
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Wi(e).length;f<e.length&&!LC(e,f);f++);var g;for(a=[];f<e.length;){var h=FC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.Z<=e.length&&a.push({data:e.subarray(f,f+h.Z),size:h.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=h.Z}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Ci/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1363
|
+
duration:d,Wa:[],ka:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.h,baseMediaDecodeTime:e,Ta:a},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",MC);MC.prototype.transmux=MC.prototype.transmux;MC.prototype.getOriginalMimeType=MC.prototype.getOriginalMimeType;MC.prototype.convertCodecs=MC.prototype.convertCodecs;MC.prototype.isSupported=MC.prototype.isSupported;
|
|
1363
1364
|
MC.prototype.destroy=MC.prototype.destroy;kc("audio/mpeg",function(){return new MC("audio/mpeg")},qc);function NC(a){this.h=a;this.g=null}r=NC.prototype;r.destroy=function(){};r.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"!=ee(c)?!1:nb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
|
|
1364
|
-
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new wj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.
|
|
1365
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new wj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.Vc().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Lb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=FC(a,b))?(b+d.Z<=a.length&&(c=Nd(c,a.subarray(b,b+d.Z))),b+=d.Z):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",NC);NC.prototype.transmux=NC.prototype.transmux;
|
|
1365
1366
|
NC.prototype.getOriginalMimeType=NC.prototype.getOriginalMimeType;NC.prototype.convertCodecs=NC.prototype.convertCodecs;NC.prototype.isSupported=NC.prototype.isSupported;NC.prototype.destroy=NC.prototype.destroy;kc("video/mp2t",function(){return new NC("video/mp2t")},pc);/*
|
|
1366
1367
|
@license
|
|
1367
1368
|
MSS Transmuxer
|
|
@@ -1379,22 +1380,22 @@ m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");
|
|
|
1379
1380
|
OC.prototype.getOriginalMimeType=OC.prototype.getOriginalMimeType;OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;var QC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);kc("mss/audio/mp4",function(){return new OC("mss/audio/mp4")},qc);kc("mss/video/mp4",function(){return new OC("mss/video/mp4")},qc);function SC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=SC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1380
1381
|
r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=je(c).split(",");c=Sd("audio",d);d=Sd("video",d);if(c&&(c=ee(c),!TC.includes(c))||d&&(c=ee(d),!UC.includes(c)))return!1;if(b)return nb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return nb(b)||nb(a)};
|
|
1381
1382
|
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=je(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Ye(c,"audio/mp4")}).map(Xe).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
|
|
1382
|
-
r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Dj(f)){for(var g=Wi(f),h=g.length;h<f.length;h++)if(LC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(pC(f,h))return this.h||(this.h=new rC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new wj;var k=this.j.parse(f),l=[],m=k.
|
|
1383
|
-
if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var C=zC(y);if(C){null==q&&(q=A.dts);var z=void 0;z=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:C.data,size:C.data.byteLength,duration:z,Ya:Math.round((A.pts||0)-(A.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:C.
|
|
1384
|
-
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],
|
|
1385
|
-
P=!0;break;case 19:case 20:case 21:N=ea=P=!0;break;case 32:ea=!0;break;case 33:ea=!0;break;case 34:ea=!0;break;case 35:P=ea=!0;break;case 39:case 40:ea=!0;break;default:ea=!1}if(P&&ea){var la=ca.fullData.byteLength,Qa=new Uint8Array(4);Qa[0]=la>>24&255;Qa[1]=la>>16&255;Qa[2]=la>>8&255;Qa[3]=la&255;L.push(Qa);L.push(ca.fullData)}}var ua=L.length?{data:Nd.apply(Fd,x(L)),
|
|
1386
|
-
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:ua.data,size:ua.data.byteLength,duration:Aa,Ya:Math.round((
|
|
1387
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Ra=[],ma,bb=null,kb=t(k.
|
|
1388
|
-
Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Pc+=he}else Pc++}}}if(!ma||null==bb){if(!k.zc().length)throw new T(2,3,3018,c?c.M()[0]:null);bb=9E4*c.startTime;var td=Sd("audio",b.codecs.split(","));if(!td||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ma={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:td};var kf=qC(td,b.channelsCount);if(!kf)throw new T(2,3,3018,c?c.M()[0]:null);for(var
|
|
1389
|
-
duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),
|
|
1390
|
-
|
|
1391
|
-
ya:0,Aa:0,data:{ob:this.g,baseMediaDecodeTime:jD,Ta:
|
|
1392
|
-
tf++}}if(0==
|
|
1393
|
-
le);uf?(
|
|
1394
|
-
|
|
1395
|
-
2,3,4];break;case 134:zb=[1,1,6,0,1,2,3,4,5];break;case 135:zb=[1,1,7,0,1,2,3,4,5,6];break;case 136:zb=[1,1,8,0,1,2,3,4,5,6,7]}var Eu=new Uint8Array([0,Rc.channelCount,0,0,Rc.sampleRate>>>24&255,Rc.sampleRate>>>17&255,Rc.sampleRate>>>8&255,Rc.sampleRate>>>0&255,0,0].concat(x(zb)));for(var Fu=Rc.sampleRate,Gu=t(k.
|
|
1396
|
-
2,
|
|
1397
|
-
data:{ob:this.g,baseMediaDecodeTime:oD,Ta:Du},stream:b}}n&&(l.push(n),n=null)}}catch(
|
|
1383
|
+
r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Dj(f)){for(var g=Wi(f),h=g.length;h<f.length;h++)if(LC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(pC(f,h))return this.h||(this.h=new rC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new wj;var k=this.j.parse(f),l=[],m=k.Vc();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],q=null,u=[],v=k.zc();
|
|
1384
|
+
if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var C=zC(y);if(C){null==q&&(q=A.dts);var z=void 0;z=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:C.data,size:C.data.byteLength,duration:z,Ya:Math.round((A.pts||0)-(A.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:C.dd?2:1,bb:C.dd?0:1}})}}var B=xC(u);if(!B||null==q)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
|
|
1385
|
+
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],ka:new Uint8Array([]),sa:B.sa,ya:B.ya,Aa:B.Aa,data:{ob:this.g,baseMediaDecodeTime:q,Ta:p},stream:b};break;case "hvc":var D=[],J=null,H=[],K=k.zc();if(!K.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var I=0;I<K.length;I++){var F=K[I],M=F.nalus;H.push.apply(H,x(M));for(var N=!1,L=[],P=!1,R=t(M),Q=R.next();!Q.done;Q=R.next()){var ca=Q.value;switch(ca.type){case 1:case 0:var ea=
|
|
1386
|
+
P=!0;break;case 19:case 20:case 21:N=ea=P=!0;break;case 32:ea=!0;break;case 33:ea=!0;break;case 34:ea=!0;break;case 35:P=ea=!0;break;case 39:case 40:ea=!0;break;default:ea=!1}if(P&&ea){var la=ca.fullData.byteLength,Qa=new Uint8Array(4);Qa[0]=la>>24&255;Qa[1]=la>>16&255;Qa[2]=la>>8&255;Qa[3]=la&255;L.push(Qa);L.push(ca.fullData)}}var ua=L.length?{data:Nd.apply(Fd,x(L)),dd:N}:null;if(ua){null==J&&null!=F.dts&&(J=F.dts);var Aa=void 0;Aa=I+1<K.length?(K[I+1].dts||0)-(F.dts||0):1<K.length?(F.dts||0)-(K[I-
|
|
1387
|
+
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:ua.data,size:ua.data.byteLength,duration:Aa,Ya:Math.round((F.pts||0)-(F.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:ua.dd?2:1,bb:ua.dd?0:1}})}}var La=AC(H);if(!La||null==J)throw new T(2,3,3018,c?c.M()[0]:null);b.height=La.height;b.width=La.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],ka:new Uint8Array([]),sa:La.sa,ya:La.ya,Aa:La.Aa,data:{ob:this.g,baseMediaDecodeTime:J,Ta:D},stream:b}}n&&
|
|
1388
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Ra=[],ma,bb=null,kb=t(k.Lb()),qd=kb.next();!qd.done;qd=kb.next()){var jf=qd.value,rd=jf.data;if(rd){var Pc=0;ma=oC(rd,Pc);if(!ma)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=ma.sampleRate;b.channelsCount=ma.channelCount;null==bb&&null!==jf.pts&&(bb=jf.pts);for(;Pc<rd.length;){var sd=nC(rd,Pc);if(sd){var he=sd.Fd+sd.Z;Pc+he<=rd.length&&Ra.push({data:rd.subarray(Pc+sd.Fd,Pc+he),size:sd.Z,duration:1024,Ya:0,flags:{ab:0,
|
|
1389
|
+
Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Pc+=he}else Pc++}}}if(!ma||null==bb){if(!k.zc().length)throw new T(2,3,3018,c?c.M()[0]:null);bb=9E4*c.startTime;var td=Sd("audio",b.codecs.split(","));if(!td||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ma={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:td};var kf=qC(td,b.channelsCount);if(!kf)throw new T(2,3,3018,c?c.M()[0]:null);for(var Di=bb+9E4*(c.endTime-c.startTime),Ei=bb;Ei<Di;)Ra.push({data:kf,size:kf.byteLength,
|
|
1390
|
+
duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),Ei+=1024/ma.sampleRate*9E4}var zg=ma.sampleRate,Fi=bb/9E4*zg;n={id:b.id,type:"audio",codecs:ma.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:zg,duration:d,Wa:[],ka:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.g,baseMediaDecodeTime:Fi,Ta:Ra},stream:b};break;case "ac3":for(var Ag=[],Vb=0,Pm=new Uint8Array([]),oj=null,xu=t(k.Lb()),Qm=xu.next();!Qm.done;Qm=xu.next()){var Rm=Qm.value,Sm=Rm.data;null==oj&&null!==
|
|
1391
|
+
Rm.pts&&(oj=Rm.pts);for(var sf=0;sf<Sm.length;){var Ld=sC(Sm,sf);Ld?(b.audioSamplingRate=Ld.sampleRate,b.channelsCount=Ld.channelCount,Vb=Ld.sampleRate,Pm=Ld.ka,Ag.push({data:Sm.subarray(sf,sf+Ld.Z),size:Ld.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),sf+=Ld.Z):sf++}}if(0==Vb||0==Pm.byteLength||null==oj)throw new T(2,3,3018,c?c.M()[0]:null);var jD=oj/9E4*Vb;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Vb,duration:d,Wa:[],ka:Pm,sa:new Uint8Array([]),
|
|
1392
|
+
ya:0,Aa:0,data:{ob:this.g,baseMediaDecodeTime:jD,Ta:Ag},stream:b};break;case "ec3":for(var yu=[],pj=0,Tm=new Uint8Array([]),qj=null,zu=t(k.Lb()),Um=zu.next();!Um.done;Um=zu.next()){var Vm=Um.value,Wm=Vm.data;null==qj&&null!==Vm.pts&&(qj=Vm.pts);for(var tf=0;tf<Wm.length;){var Md=vC(Wm,tf);Md?(b.audioSamplingRate=Md.sampleRate,b.channelsCount=Md.channelCount,pj=Md.sampleRate,Tm=Md.ka,yu.push({data:Wm.subarray(tf,tf+Md.Z),size:Md.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),tf+=Md.Z):
|
|
1393
|
+
tf++}}if(0==pj||0==Tm.byteLength||null==qj)throw new T(2,3,3018,c?c.M()[0]:null);var kD=qj/9E4*pj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:pj,duration:d,Wa:[],ka:Tm,sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.g,baseMediaDecodeTime:kD,Ta:yu},stream:b};break;case "mp3":for(var Au=[],rj,sj=null,Bu=t(k.Lb()),Xm=Bu.next();!Xm.done;Xm=Bu.next()){var Ym=Xm.value,Ng=Ym.data;if(Ng){null==sj&&null!==Ym.pts&&(sj=Ym.pts);for(var le=0;le<Ng.length;){var uf=FC(Ng,
|
|
1394
|
+
le);uf?(rj||(rj=uf),le+uf.Z<=Ng.length&&Au.push({data:Ng.subarray(le,le+uf.Z),size:uf.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),le+=uf.Z):le++}}}if(!rj||null==sj)throw new T(2,3,3018,c?c.M()[0]:null);var Cu=rj.sampleRate,lD=sj/9E4*Cu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Cu,duration:d,Wa:[],ka:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.g,baseMediaDecodeTime:lD,Ta:Au},stream:b};break;case "opus":var Du=[],
|
|
1395
|
+
tj=null,Rc=k.F;if(!Rc)throw new T(2,3,3018,c?c.M()[0]:null);var zb=[];switch(Rc.oh){case 1:case 2:zb=[0];break;case 0:zb=[255,1,1,0,1];break;case 128:zb=[255,2,0,0,1];break;case 3:zb=[1,2,1,0,2,1];break;case 4:zb=[1,2,2,0,1,2,3];break;case 5:zb=[1,3,2,0,4,1,2,3];break;case 6:zb=[1,4,2,0,4,1,2,3,5];break;case 7:zb=[1,4,2,0,4,1,2,3,5,6];break;case 8:zb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:zb=[1,1,2,0,1];break;case 131:zb=[1,1,3,0,1,2];break;case 132:zb=[1,1,4,0,1,2,3];break;case 133:zb=[1,1,5,0,1,
|
|
1396
|
+
2,3,4];break;case 134:zb=[1,1,6,0,1,2,3,4,5];break;case 135:zb=[1,1,7,0,1,2,3,4,5,6];break;case 136:zb=[1,1,8,0,1,2,3,4,5,6,7]}var Eu=new Uint8Array([0,Rc.channelCount,0,0,Rc.sampleRate>>>24&255,Rc.sampleRate>>>17&255,Rc.sampleRate>>>8&255,Rc.sampleRate>>>0&255,0,0].concat(x(zb)));for(var Fu=Rc.sampleRate,Gu=t(k.Lb()),Zm=Gu.next();!Zm.done;Zm=Gu.next()){var $m=Zm.value,vf=$m.data;null==tj&&null!==$m.pts&&(tj=$m.pts);for(var Og=0;Og<vf.length;){for(var mD=0!==(vf[Og+1]&16),nD=0!==(vf[Og+1]&8),vd=Og+
|
|
1397
|
+
2,uj=0;255===vf[vd];)uj+=255,vd+=1;uj+=vf[vd];vd+=1;vd+=mD?2:0;vd+=nD?2:0;var Hu=vf.slice(vd,vd+uj);Du.push({data:Hu,size:Hu.byteLength,duration:960,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Og=vd+uj}}if(0==Eu.byteLength||null==tj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Rc.sampleRate;b.channelsCount=Rc.channelCount;var oD=tj/9E4*Fu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Fu,duration:d,Wa:[],ka:Eu,sa:new Uint8Array([]),ya:0,Aa:0,
|
|
1398
|
+
data:{ob:this.g,baseMediaDecodeTime:oD,Ta:Du},stream:b}}n&&(l.push(n),n=null)}}catch(an){return an&&3023==an.code?Promise.resolve(new Uint8Array([])):Promise.reject(an)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Iu=new Bw(l),bn=b.id+"_"+c.i;if(this.i.has(bn))var cn=this.i.get(bn);else cn=Hw(Iu),this.i.set(bn,cn);var pD=Yw(Iu);this.g++;var qD=Nd(cn,pD);return Promise.resolve(qD)};S("shaka.transmuxer.TsTransmuxer",SC);SC.prototype.transmux=SC.prototype.transmux;
|
|
1398
1399
|
SC.prototype.getOriginalMimeType=SC.prototype.getOriginalMimeType;SC.prototype.convertCodecs=SC.prototype.convertCodecs;SC.prototype.isSupported=SC.prototype.isSupported;SC.prototype.destroy=SC.prototype.destroy;var TC=["aac","ac-3","ec-3","mp3","opus"],UC=["avc","hevc"];kc("video/mp2t",function(){return new SC("video/mp2t")},oc);/*
|
|
1399
1400
|
@license
|
|
1400
1401
|
EME Encryption Scheme Polyfill
|