shaka-player 4.9.26 → 4.9.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controls.css +2 -2
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +1 -1
- package/dist/locales.js +54 -54
- package/dist/shaka-player.compiled.d.ts +4 -0
- package/dist/shaka-player.compiled.debug.d.ts +4 -0
- package/dist/shaka-player.compiled.debug.externs.js +6 -0
- package/dist/shaka-player.compiled.debug.js +58 -50
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +6 -0
- package/dist/shaka-player.compiled.js +738 -733
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +4 -0
- package/dist/shaka-player.ui.debug.d.ts +4 -0
- package/dist/shaka-player.ui.debug.externs.js +6 -0
- package/dist/shaka-player.ui.debug.js +109 -100
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +6 -0
- package/dist/shaka-player.ui.js +828 -822
- package/dist/shaka-player.ui.map +4 -4
- package/externs/ima.js +22 -2
- package/lib/dash/dash_parser.js +10 -5
- package/lib/dash/mpd_utils.js +0 -3
- package/lib/media/segment_index.js +18 -6
- package/lib/media/streaming_engine.js +7 -0
- package/lib/player.js +4 -2
- package/lib/text/simple_text_displayer.js +1 -1
- package/lib/text/text_utils.js +4 -0
- package/lib/text/ttml_text_parser.js +26 -5
- package/lib/util/periods.js +60 -4
- package/lib/util/tXml.js +17 -9
- package/package.json +1 -1
- package/ui/less/overflow_menu.less +1 -0
- package/ui/less/tooltip.less +1 -1
- package/ui/locales/ar-XB.json +1 -1
- package/ui/locales/ar.json +1 -1
- package/ui/locales/bg.json +1 -1
- package/ui/locales/ca.json +5 -5
- package/ui/locales/cs.json +1 -1
- package/ui/locales/da.json +1 -1
- package/ui/locales/de.json +1 -1
- package/ui/locales/el.json +1 -1
- package/ui/locales/en-GB.json +1 -1
- package/ui/locales/en-XA.json +1 -1
- package/ui/locales/es-419.json +4 -4
- package/ui/locales/es.json +3 -3
- package/ui/locales/fa.json +1 -1
- package/ui/locales/fi.json +1 -1
- package/ui/locales/fil.json +1 -1
- package/ui/locales/fr.json +6 -6
- package/ui/locales/hi.json +1 -1
- package/ui/locales/hr.json +1 -1
- package/ui/locales/hu.json +1 -1
- package/ui/locales/id.json +1 -1
- package/ui/locales/it.json +1 -1
- package/ui/locales/iw.json +1 -1
- package/ui/locales/ja.json +1 -1
- package/ui/locales/ko.json +1 -1
- package/ui/locales/lt.json +1 -1
- package/ui/locales/lv.json +1 -1
- package/ui/locales/nl.json +1 -1
- package/ui/locales/no.json +1 -1
- package/ui/locales/pl.json +6 -6
- package/ui/locales/pt-BR.json +6 -6
- package/ui/locales/pt-PT.json +7 -7
- package/ui/locales/ro.json +1 -1
- package/ui/locales/ru.json +1 -1
- package/ui/locales/sk.json +1 -1
- package/ui/locales/sl.json +1 -1
- package/ui/locales/sr.json +1 -1
- package/ui/locales/sv.json +1 -1
- package/ui/locales/th.json +1 -1
- package/ui/locales/tr.json +1 -1
- package/ui/locales/uk.json +1 -1
- package/ui/locales/vi.json +1 -1
- package/ui/locales/zh-HK.json +1 -1
- package/ui/locales/zh-TW.json +1 -1
- package/ui/locales/zh.json +1 -1
|
@@ -9,37 +9,37 @@
|
|
|
9
9
|
Copyright The Closure Library Authors.
|
|
10
10
|
SPDX-License-Identifier: Apache-2.0
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
12
|
+
var q;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
13
13
|
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}
|
|
14
14
|
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
|
|
15
15
|
fa("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=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(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
|
-
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},
|
|
18
|
-
function qa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(pa)pa(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 Da(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.
|
|
21
|
-
function Ga(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),Ha(a)}a.g.l=null;d.call(a.g,f);return Ha(a)}function Ha(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.
|
|
17
|
+
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=ka;
|
|
18
|
+
function qa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(pa)pa(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.Tj=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
|
|
19
|
+
function va(a,b){a.i={fg:b,qg:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function E(a,b,c){a.g=c;return{value:b}}ra.prototype.u=function(a){this.g=a};function H(a){a.g=0}function xa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ya(a,b){a.m=0;a.j=b||0}function za(a,b,c){a.g=b;a.m=c||0}function Aa(a,b){a.m=b||0;b=a.i.fg;a.i=null;return b}function Ba(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function Da(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.qg?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 Ea(a){this.g=new ra;this.h=a}function Fa(a,b){sa(a.g);var c=a.g.l;if(c)return Ga(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ha(a)}
|
|
21
|
+
function Ga(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),Ha(a)}a.g.l=null;d.call(a.g,f);return Ha(a)}function Ha(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.qg)throw b.fg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Ia(a){this.next=function(b){sa(a.g);a.g.l?b=Ga(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ha(a));return b};this.throw=function(b){sa(a.g);a.g.l?b=Ga(a,a.g.l["throw"],b,a.g.s):(va(a.g,b),b=Ha(a));return b};this.return=function(b){return Fa(a,b)};this[Symbol.iterator]=function(){return this}}function Ja(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 Ja(new Ia(new Ea(a)))}function La(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
24
|
fa("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=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
25
25
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.C(g):this.m(g)}};
|
|
26
26
|
b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.A()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
|
|
27
27
|
function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.A=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
28
|
-
b.prototype.H=function(g){var h=this.j();g.rd(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,
|
|
29
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).rd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(
|
|
28
|
+
b.prototype.H=function(g){var h=this.j();g.rd(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.rd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.rd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
29
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).rd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){p[u]=v;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).rd(n(p.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ma(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
31
31
|
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ma(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ma(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ma(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ma(k,
|
|
33
33
|
g)&&Ma(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ma(k,g)&&Ma(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
34
|
-
fa("Map",function(a){function b(){var h={};return h.
|
|
34
|
+
fa("Map",function(a){function b(){var h={};return h.Eb=h.next=h.head=h}function c(h,k){var l=h[1];return ia(function(){if(l){for(;l.head!=h[1];)l=l.Eb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Ma(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
|
|
35
35
|
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=
|
|
36
|
-
m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],
|
|
37
|
-
h.entry.next,h.entry.next.
|
|
36
|
+
m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Eb:this[1].Eb,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Eb.next=l.entry,this[1].Eb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.Eb.next=
|
|
37
|
+
h.entry.next,h.entry.next.Eb=h.entry.Eb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Eb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
|
|
38
38
|
function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
39
39
|
fa("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 Oa(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}fa("Array.prototype.keys",function(a){return a?a:function(){return Oa(this,function(b){return b})}});
|
|
42
|
-
function Pa(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 Pa(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{og:e,v:f}}return{og:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Pa(this,b,c).og}});
|
|
43
43
|
fa("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}});fa("Array.prototype.values",function(a){return a?a:function(){return Oa(this,function(b,c){return c})}});
|
|
44
44
|
fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});fa("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 Qa(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+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Qa(this,b,"includes").indexOf(b,c||0)}});
|
|
@@ -49,20 +49,20 @@ fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d
|
|
|
49
49
|
var Ra="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ma(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Ra});fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
|
|
50
50
|
fa("Array.prototype.entries",function(a){return a?a:function(){return Oa(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Qa(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});
|
|
51
51
|
fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ma(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
|
|
52
|
-
fa("
|
|
53
|
-
function S(a,b){a=a.split(".");var c=Sa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
|
|
52
|
+
fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Qa(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});
|
|
53
|
+
fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ma(b,d)&&c.push([d,b[d]]);return c}});var Sa=this||self;function S(a,b){a=a.split(".");var c=Sa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
|
|
54
54
|
@license
|
|
55
55
|
Shaka Player
|
|
56
56
|
Copyright 2016 Google LLC
|
|
57
57
|
SPDX-License-Identifier: Apache-2.0
|
|
58
58
|
*/
|
|
59
|
-
function Ta(){}function
|
|
60
|
-
|
|
61
|
-
ib.prototype.
|
|
62
|
-
function kb(a){var b=lb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}lb=b}return b||!1}var lb=void 0;function mb(a){if(nb.has(a))return nb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);nb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),nb.set(a,b),b):!1}function pb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var nb=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){ab([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){$a([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
|
|
59
|
+
function Ta(){}function Ua(){};function Wa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Wa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Xa(a){return a.h/(1-Math.pow(a.g,a.i))};function Ya(){this.h=new Wa(2);this.j=new Wa(5);this.g=0;this.i=128E3;this.l=16E3}Ya.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Ya.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Ya.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Xa(this.h),Xa(this.j))};function Za(){}function $a(){}function ab(){}function bb(a){var b=La.apply(1,arguments);cb.has(a)||(cb.add(a),ab.apply(Za,x(b)))}function db(){}function eb(){}function fb(){}var cb=new Set;window.console&&(ab=function(){return console.warn.apply(console,x(La.apply(0,arguments)))},$a=function(){console.error.apply(console,x(La.apply(0,arguments)))});function gb(){this.g={}}q=gb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function hb(){this.g=new gb}q=hb.prototype;q.release=function(){this.nb();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new ib(a,b,c,d),this.g.push(b,a))};q.sa=function(a,b,c,d){function e(g){f.Hb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.Hb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Hb(),this.g.remove(b,e))}};
|
|
60
|
+
q.nb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Hb();this.g.g={}}};S("shaka.util.EventManager",hb);hb.prototype.removeAll=hb.prototype.nb;hb.prototype.unlisten=hb.prototype.Hb;hb.prototype.listenOnce=hb.prototype.sa;hb.prototype.listen=hb.prototype.D;hb.prototype.release=hb.prototype.release;function ib(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=jb(a,d);this.target.addEventListener(b,c,this.g)}
|
|
61
|
+
ib.prototype.Hb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function jb(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return kb(a)?b:b.capture||!1}
|
|
62
|
+
function kb(a){var b=lb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}lb=b}return b||!1}var lb=void 0;function mb(a){if(nb.has(a))return nb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);nb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),nb.set(a,b),b):!1}function pb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var nb=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){ab([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){$a([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
|
-
S("shaka.util.BufferUtils",xb);xb.toDataView=Fb;xb.toUint16=Eb;xb.toUint8=Bb;xb.toArrayBuffer=Cb;xb.equal=
|
|
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={
|
|
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={rg:void 0},d=a.next()){e.rg=d.value;d=b.findIndex(function(f){return function(g){return c(f.rg,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
|
|
66
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=Vb;this.lineInterpretation=Wb;this.line=null;this.lineHeight="";this.lineAlign=Xb;this.displayAlign=Yb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Zb;this.fontStyle=$b;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
67
67
|
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Sb:32,rows:15}}function ac(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 bc(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,bc))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=bc;Rb.prototype.clone=Rb.prototype.clone;var Sb="auto";
|
|
@@ -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.wb),this.mc=a.mc,uc(this,a.yb),vc(this,a.
|
|
83
|
-
|
|
84
|
-
|
|
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.Ub;c&&(b.Ub=a.Ub);return b};
|
|
82
|
+
function sc(a){var b;a instanceof sc?(tc(this,a.wb),this.mc=a.mc,uc(this,a.yb),vc(this,a.Dc),this.Na=a.Na,wc(this,a.g.clone()),this.Ub=a.Ub):a&&(b=String(a).match(rc))?(tc(this,b[1]||"",!0),this.mc=xc(b[2]||""),uc(this,b[3]||"",!0),vc(this,b[4]),this.Na=xc(b[5]||"",!0),wc(this,b[6]||"",!0),this.Ub=xc(b[7]||"")):this.g=new yc(null)}q=sc.prototype;q.wb="";q.mc="";q.yb="";q.Dc=null;q.Na="";q.Ub="";
|
|
83
|
+
q.toString=function(){var a=[],b=this.wb;b&&a.push(zc(b,Ac,!0),":");if(b=this.yb){a.push("//");var c=this.mc;c&&a.push(zc(c,Ac,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Dc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.yb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zc(b,"/"==b.charAt(0)?Bc:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ub)&&a.push("#",zc(b,Dc));return a.join("")};
|
|
84
|
+
q.resolve=function(a){var b=this.clone();"data"===b.wb&&(b=new sc);var c=!!a.wb;c?tc(b,a.wb):c=!!a.mc;c?b.mc=a.mc:c=!!a.yb;c?uc(b,a.yb):c=null!=a.Dc;var d=a.Na;if(c)vc(b,a.Dc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.yb&&!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.Ub;c&&(b.Ub=a.Ub);return b};q.clone=function(){return new sc(this)};function tc(a,b,c){a.wb=c?xc(b,!0):b;a.wb&&(a.wb=a.wb.replace(/:$/,""))}function uc(a,b,c){a.yb=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.Dc=b}else a.Dc=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.
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
function Gc(a){if(!a.Ha&&(a.Ha={},a.Nc=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," ")))}}q=yc.prototype;q.Ha=null;q.Nc=null;function Ic(a){Gc(a);return a.Nc}q.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.Nc++;return this};
|
|
88
|
+
q.set=function(a,b){Gc(this);this.g=null;this.Ha.hasOwnProperty(a)?this.Ha[a]=[b]:this.add(a,b);return this};q.get=function(a){Gc(this);return this.Ha[a]||[]};q.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
|
+
q.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.Nc=this.Nc}return a};function T(a,b,c){var d=La.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(Jc)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 Jc=!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,
|
|
@@ -103,12 +103,12 @@ Tc.prototype.tickAfter=Tc.prototype.X;Tc.prototype.tickNow=Tc.prototype.kc;funct
|
|
|
103
103
|
function ed(){if(!Zc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function gd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!$c()&&!Zc("PC=EOS")&&!Zc("PC=APL")&&!Zc("VirginMedia")&&!hd()&&!id()&&!Zc("AFT")&&!Zc("WPE")&&!Zc("DT_STB_BCM")}function jd(){return Zc("PlayStation 5")}function id(){return Zc("PlayStation 4")}function kd(){return Zc("Hisense")||Zc("VIDAA")}
|
|
104
104
|
function hd(){return Zc("SOPOpenBrowser")}function ld(){if(!gd())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 md(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1}function nd(){return Zc("Android")}
|
|
105
105
|
function Zc(a){return(navigator.userAgent||"").includes(a)}function Wc(){if(od)return od;pd||(pd=new Tc(function(){od=null}));(od=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(od=document.createElement("video"));pd.X(1);return od}function sd(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
|
|
106
|
-
function ud(){var a,b,c,d,e,f,g,h,k,l,m,n,p,
|
|
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){ab("Tizen: Error detecting screen size, default screen size 1920x1080.")}
|
|
108
|
-
e=c.Media.Protection.ProtectionCapabilityResult;f=null;do f=d.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(f===e.maybe);f===e.probably&&(a.width=3840,a.height=2160)}catch(w){ab("Xbox: Error detecting screen size, default screen size 1920x1080.")}
|
|
109
|
-
a.width=Math.max(1920,g.screenWidth),a.height=Math.max(1080,g.screenHeight)}catch(w){ab("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}
|
|
110
|
-
xa(
|
|
111
|
-
a.height=1080);case 19:za(
|
|
106
|
+
function ud(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){switch(v.g){case 1:a={width:Infinity,height:Infinity};if(fd()){n=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;xa(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($c()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
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){ab("Tizen: Error detecting screen size, default screen size 1920x1080.")}v.u(3);break}if(Yc()){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;
|
|
108
|
+
e=c.Media.Protection.ProtectionCapabilityResult;f=null;do f=d.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(f===e.maybe);f===e.probably&&(a.width=3840,a.height=2160)}catch(w){ab("Xbox: Error detecting screen size, default screen size 1920x1080.")}v.u(3);break}if(cd()){try{g=JSON.parse(window.PalmSystem.deviceInfo),
|
|
109
|
+
a.width=Math.max(1920,g.screenWidth),a.height=Math.max(1080,g.screenHeight)}catch(w){ab("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}v.u(3);break}if(kd()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.u(3);break}if(!id()&&!jd()){v.u(3);break}h=!1;xa(v,9);return E(v,window.msdk.device.getDisplayInfo(),11);case 11:k=v.h;h="4K"===k.resolution;za(v,10);break;case 9:return Aa(v),
|
|
110
|
+
xa(v,12),E(v,window.msdk.device.getDisplayInfoImmediate(),14);case 14:l=v.h;h="4K"===l.resolution;za(v,10);break;case 12:m=Aa(v),ab("PlayStation: Failed to get the display info:",m);case 10:h?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.u(3);break;case 18:p=v.h;case 17:if(p){a.width=3840;a.height=2160;v.u(19);break}if(!(r=n)){v.u(20);break}return E(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),21);case 21:r=v.h;case 20:r&&(a.width=1920,
|
|
111
|
+
a.height=1080);case 19:za(v,3);break;case 15:u=Aa(v),$a("Failed to check canDisplayType:",u);case 3:return v.return(a)}})}var pd=null,od=null;function vd(){}
|
|
112
112
|
function wd(a){if(!a)return"";a=Bb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!id())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&$a('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
113
113
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
114
114
|
function xd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Fb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return yd(d)}
|
|
@@ -120,13 +120,13 @@ function Ld(a){var b=Bb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c
|
|
|
120
120
|
function Od(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 Pd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Gd(Kd(h),!1));var l=g;22!=l.length&&(l=Gd(Kd(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(Ad(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 Qd(a,b){if(1==b.length)return b[0];a=Rd(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Rd(a,b){for(var c=t(Sd[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==Td?"":null}
|
|
123
|
-
function Ud(a,b){var c=[];a=t(Sd[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 Td="text",Vd={fa:"video",V:"audio",qa:Td,pe:"image",
|
|
123
|
+
function Ud(a,b){var c=[];a=t(Sd[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 Td="text",Vd={fa:"video",V:"audio",qa:Td,pe:"image",Ti:"application"},Sd={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 Wd(){}function Xd(a,b){var c=a;b&&!Yd.includes(a)&&(c+='; codecs="'+b+'"');return c}function Zd(a,b){b&&(a+='; codecs="'+b+'"');return a}function $d(a,b,c){var d=Xd(a,b);b=Zd(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 ae(a,b,c){var d=[b];be.forEach(function(e,f){var g=a[f];"codecs"==f?Yd.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function ce(a){return a.split(";")[0].split("/")[1]}
|
|
125
125
|
function de(a){var b=ee(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 ke(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=ee(c.value),b.push(c[0]);return b.sort().join(",")}
|
|
127
127
|
function le(a){return a.split(";")[0]}function me(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function oe(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function ee(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",Wd);Wd.getFullTypeWithAllCodecs=Zd;Wd.getFullType=Xd;
|
|
128
128
|
var be=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Yd=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function pe(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 qe(a){return re[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Jb:!1}pe.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
129
|
-
function se(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(
|
|
129
|
+
function se(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(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(p)})}
|
|
130
130
|
pe.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));H(d)})};function te(a,b,c){a.l=b;a.m=c}function ue(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 ve(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())ve(a,d.value,c)}
|
|
132
132
|
function we(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,[]);ve(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,
|
|
@@ -141,11 +141,11 @@ var Fe=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
141
141
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
142
142
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
143
143
|
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ke(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer instanceof ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Le(a){var b={},c;for(c in a)b[c]=a[c];return b};function Me(){}
|
|
144
|
-
function Ne(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Oe(e,b,c);if(d.length){b=new gb;e=t(e);for(c=e.next();!c.done;c=e.next())c=c.value,b.push(String(c.video.width||0),c);var f=[];b.forEach(function(v
|
|
145
|
-
e.next())g=g.value,g.audio&&c.add(g.audio),g.video&&b.add(g.video);c=Array.from(c).sort(function(v
|
|
146
|
-
e.set(k,l)}c=Array.from(b).sort(function(v
|
|
147
|
-
m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),
|
|
148
|
-
function Oe(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={
|
|
144
|
+
function Ne(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Oe(e,b,c);if(d.length){b=new gb;e=t(e);for(c=e.next();!c.done;c=e.next())c=c.value,b.push(String(c.video.width||0),c);var f=[];b.forEach(function(u,v){u=0;var w=[];v=t(v);for(var A=v.next(),y={};!A.done;y={ne:void 0},A=v.next())y.ne=A.value,A=d.filter(function(C){return function(z){return C.ne.decodingInfos[0][z]}}(y)).length,A>u?(u=A,w=[y.ne]):A==u&&w.push(y.ne);f.push.apply(f,x(w))});e=f}c=new Set;b=new Set;e=t(e);for(var g=e.next();!g.done;g=
|
|
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=de(m.codecs),p=de(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
|
+
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 r=[];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=de(m.codecs),p=de(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),r.push(g.id)):g.width==m.width&&g.height==m.height&&(n=de(m.codecs),p=de(g.codecs),n!=p||g.bandwidth&&
|
|
147
|
+
m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),r.push(g.id)))}else l.push(g),r.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&&!r.includes(u.id)?!1:!0})}
|
|
148
|
+
function Oe(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={Yg:void 0},d=b.next())if(e.Yg=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Yg)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={Wf:void 0},b=c.next())if(d.Wf=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Wf)}}(d)),b.length){a=b;break}return a}function Pe(a,b,c){a.variants=a.variants.filter(function(d){return Qe(d,b,c)})}
|
|
149
149
|
function Qe(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 Re(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=Qe(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Se(a,b,c){c=void 0===c?[]:c;return O(function(d){if(1==d.g)return E(d,Te(a,b,0<b.offlineSessionIds.length,c),2);Ue(b);return E(d,Ve(b),0)})}
|
|
151
151
|
function Te(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return Yc()&&We(b.variants),E(g,Xe(b.variants,c,!1,d),2);e=null;a&&(f=a.g)&&(e=f.keySystem);b.variants=b.variants.filter(function(h){var k=Ye(h,e);if(!k){var l=[];h.audio&&l.push(Ze(h.audio));h.video&&l.push(Ze(h.video))}return k});H(g)})}
|
|
@@ -153,17 +153,17 @@ function We(a){var b={dvav:"avc3",dva1:"avc1",dvhe:"hev1",dvh1:"hvc1"},c=new Set
|
|
|
153
153
|
function Ye(a,b){var c=Yc(),d=Zc("Firefox")&&nd(),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=$e(e.codecs);if(e.codecs.includes(",")){f=e.codecs.split(",");c=Qd("video",f);c=$e(c);f=Qd("audio",f);f=af(f,e.mimeType);g=$d(e.mimeType,f,"audio");if(!mb(g))return!1;c=[c,f].join()}f=$d(e.mimeType,c,"video");if(!mb(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=af(e.codecs,e.mimeType);c=$d(e.mimeType,d,"audio");if(!mb(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 bf(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=bf(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
155
155
|
function cf(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=Le(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,qd:void 0},g=f.next())k=g.value,h.qd=bf(k),h.cache=df,h.cache[h.qd]?d=c(d,h.cache[h.qd]):e.push(ef(k).then(function(m){return function(n){var p=
|
|
156
|
-
null;n=t(n||[]);for(var
|
|
156
|
+
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.cache[m.qd]=p,d=c(d,p))}}(h)));return E(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
|
|
157
157
|
function ef(a){var b=[""];a.video&&(b=me(a.video.contentType).split(","));var c=[""];a.audio&&(c=me(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={qc:void 0},g=f.next())g=g.value,h.qc=Ke(a),a.video&&(h.qc.video.contentType=Xd(le(h.qc.video.contentType),e)),a.audio&&(h.qc.audio.contentType=Xd(le(h.qc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.qc).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
158
158
|
return null})}
|
|
159
|
-
function Xe(a,b,c,d){var e,f,g,h,k,l,m,n,p,
|
|
160
|
-
return E(I,cf(n,
|
|
159
|
+
function Xe(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D;return O(function(I){switch(I.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return I.return();f=t(d);g=f.next();h={};case 2:if(g.done){I.u(4);break}h.Ag=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){I.u(7);break}n=m.value;p=ff(n,b,c).filter(function(F){return function(J){J=J[0];return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.Ag}}(h));r=t(p);u=r.next();case 8:if(u.done){I.u(10);break}v=u.value;
|
|
160
|
+
return E(I,cf(n,v),9);case 9:u=r.next();I.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();I.u(5);break;case 7:if(k)return I.return();h={Ag:void 0};g=f.next();I.u(2);break;case 4:w=t(a),A=w.next();case 12:if(A.done){I.u(0);break}y=A.value;C=ff(y,b,c).filter(function(F){F=F[0];F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});z=t(C);B=z.next();case 15:if(B.done){A=w.next();I.u(12);break}D=B.value;return E(I,cf(y,D),16);case 16:B=z.next(),I.u(15)}})}
|
|
161
161
|
function ff(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=me(k);if(l.includes(",")&&!d){var m=l.split(","),n=le(k);l=Qd("video",m);m=Qd("audio",m);m=af(m,n);n=$d(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=$e(l);k={contentType:$d(le(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=le(l),l=af(me(l),k),k=$d(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=
|
|
164
|
-
n.next()){m=Object.assign({},m.value);var p=c.get(k),
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
n.next()){m=Object.assign({},m.value);var p=c.get(k),r={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=t(p);for(var u=p.next();!u.done;u=p.next()){u=u.value;if(u.initData&&u.initData.length){for(var v=new Set,w=t(u.initData),A=w.next();!A.done;A=w.next())v.add(A.value.initDataType);r.initDataType=u.initData[0].initDataType}u.distinctiveIdentifierRequired&&(r.distinctiveIdentifier="required");u.persistentStateRequired&&(r.persistentState="required");
|
|
165
|
+
u.sessionType&&(r.sessionTypes=[u.sessionType]);d&&(r.audio?(u.encryptionScheme&&(r.audio.encryptionScheme=r.audio.encryptionScheme||u.encryptionScheme),r.audio.robustness=r.audio.robustness||u.audioRobustness):(r.audio={robustness:u.audioRobustness},u.encryptionScheme&&(r.audio.encryptionScheme=u.encryptionScheme)),""==r.audio.robustness&&delete r.audio.robustness);e&&(r.video?(u.encryptionScheme&&(r.video.encryptionScheme=r.video.encryptionScheme||u.encryptionScheme),r.video.robustness=r.video.robustness||
|
|
166
|
+
u.videoRobustness):(r.video={robustness:u.videoRobustness},u.encryptionScheme&&(r.video.encryptionScheme=u.encryptionScheme)),""==r.video.robustness&&delete r.video.robustness)}m.keySystemConfiguration=r;l.push(m)}a.push(l)}return a}function af(a,b){return"flac"==a.toLowerCase()?ld()?"fLaC":"flac":"opus"===a.toLowerCase()?ld()?"mp4"==ce(b)?"Opus":"opus":"opus":a}
|
|
167
167
|
function $e(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 Ue(a){a.textStreams=a.textStreams.filter(function(b){b=Xd(b.mimeType,b.codecs);return qe(b)})}
|
|
168
168
|
function Ve(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(gf.has(f)){l.u(5);break}g=hf.get(f);if(!g){gf.set(f,!1);l.u(5);break}return E(l,jf(g),7);case 7:h=l.h,gf.set(f,h);case 5:(k=gf.get(f))&&b.push(e);d=c.next();l.u(2);break;case 4:a.imageStreams=b,H(l)}})}
|
|
169
169
|
function jf(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)}})}
|
|
@@ -181,13 +181,13 @@ originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:nu
|
|
|
181
181
|
function yf(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Je(Ce(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Ce(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=zf(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(xe,[]);return a.length?
|
|
182
182
|
zf(e,a[0]):e}function zf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Ze(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}S("shaka.util.StreamUtils",Me);Me.meetsRestrictions=Qe;
|
|
183
183
|
var df={},of=0,gf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),hf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Af(){var a=this;this.A=null;this.j=!1;this.i=new Ya;this.F=new hb;navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",function(){if(a.j&&a.g.useNetworkInformation){a.i=new Ya;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.s=[];this.B=1;this.G=!1;this.h=this.o=this.g=this.l=null;this.C=new Tc(function(){if(a.j&&a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
184
|
-
b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=null}
|
|
185
|
-
|
|
184
|
+
b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=null}q=Af.prototype;q.stop=function(){this.A=null;this.j=!1;this.s=[];this.B=1;this.o=this.l=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.m=null};q.release=function(){this.F.release();this.C=null};q.init=function(a){this.A=a};
|
|
185
|
+
q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.o.clientHeight*d);c=Math.min(c,this.o.clientWidth*d)}var e=this.s.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||
|
|
186
186
|
(e=this.s);d=e;a&&e.length!=this.s.length&&(d=this.s.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=Bf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Cf(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Bf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Bf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=
|
|
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};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
function Df(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 Bf(a,b,c,d,e){if(a.m){var f=a.m.
|
|
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};q.enable=function(){this.j=!0};q.disable=function(){this.j=!1};
|
|
188
|
+
q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.l&&this.j&&Df(this))};q.trySuggestStreams=function(){null!=this.l&&this.j&&Df(this)};q.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};q.setVariants=function(a){this.s=a};
|
|
189
|
+
q.playbackRateChanged=function(a){this.B=a};q.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.X(Ef)}),this.h.observe(this.o))};q.setCmsdManager=function(a){this.m=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
190
|
+
function Df(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 Bf(a,b,c,d,e){if(a.m){var f=a.m.lg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Qe(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
191
191
|
function Cf(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",Af);Af.prototype.configure=Af.prototype.configure;Af.prototype.setCmsdManager=Af.prototype.setCmsdManager;Af.prototype.setMediaElement=Af.prototype.setMediaElement;Af.prototype.playbackRateChanged=Af.prototype.playbackRateChanged;Af.prototype.setVariants=Af.prototype.setVariants;
|
|
192
192
|
Af.prototype.getBandwidthEstimate=Af.prototype.getBandwidthEstimate;Af.prototype.trySuggestStreams=Af.prototype.trySuggestStreams;Af.prototype.segmentDownloaded=Af.prototype.segmentDownloaded;Af.prototype.disable=Af.prototype.disable;Af.prototype.enable=Af.prototype.enable;Af.prototype.chooseVariant=Af.prototype.chooseVariant;Af.prototype.init=Af.prototype.init;Af.prototype.release=Af.prototype.release;Af.prototype.stop=Af.prototype.stop;var Ef=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 Ff(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)}Ff.prototype.add=function(a,b,c){return Gf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
193
193
|
function Gf(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&&!Hf(e,f)||!If(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Hf(a,b))&&If(a.roles,b.roles)));return d?!1:!0}Ff.prototype.values=function(){return this.g.values()};
|
|
@@ -201,96 +201,96 @@ function fg(a){return new ag(Promise.all(a.map(function(b){return b.promise})),f
|
|
|
201
201
|
ag.prototype.za=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=gg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new $f,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new ag(f,function(){return d()})};
|
|
202
202
|
function gg(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",ag);ag.prototype.chain=ag.prototype.za;ag.prototype["finally"]=ag.prototype.finally;ag.all=fg;ag.prototype.abort=ag.prototype.abort;ag.notAbortable=eg;ag.completed=dg;ag.aborted=cg;ag.failed=bg;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
203
|
function hg(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 ig={
|
|
205
|
-
|
|
206
|
-
jg.prototype.release=function(){this.wa=null};function kg(){this.g=[]}function lg(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}kg.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 mg(a,b,c,d,e,f){jg.call(this);this.i=!1;this.m=new kg;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}qa(mg,jg);
|
|
207
|
-
function qg(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)}
|
|
208
|
-
function rg(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}}
|
|
209
|
-
|
|
210
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.za(function(p){var
|
|
204
|
+
var ig={Vi:"abrstatuschanged",Wi:"adaptation",Xi:"buffering",Yi:"complete",Zi:"downloadfailed",$i:"downloadheadersreceived",aj:"drmsessionupdate",cj:"emsg",tj:"prft",Error:"error",dj:"expirationupdated",ej:"firstquartile",fj:"gapjumped",ij:"keystatuschanged",kj:"loaded",lj:"loading",nj:"manifestparsed",oj:"manifestupdated",pj:"mediaqualitychanged",Metadata:"metadata",qj:"midpoint",rj:"nospatialvideoinfo",sj:"onstatechange",uj:"ratechange",wj:"segmentappended",xj:"sessiondata",yj:"spatialvideoinfo",
|
|
205
|
+
zj:"stalldetected",Aj:"started",Bj:"statechanged",Cj:"streaming",Dj:"textchanged",Ej:"texttrackvisibility",Fj:"thirdquartile",Gj:"timelineregionadded",Hj:"timelineregionenter",Ij:"timelineregionexit",Jj:"trackschanged",Lj:"unloading",Nj:"variantchanged"};function jg(){this.wa=new gb;this.Wd=this}jg.prototype.addEventListener=function(a,b){this.wa&&this.wa.push(a,b)};jg.prototype.removeEventListener=function(a,b){this.wa&&this.wa.remove(a,b)};jg.prototype.dispatchEvent=function(a){if(!this.wa)return!0;var b=this.wa.get(a.type)||[],c=this.wa.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};
|
|
206
|
+
jg.prototype.release=function(){this.wa=null};function kg(){this.g=[]}function lg(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}kg.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 mg(a,b,c,d,e,f){jg.call(this);this.i=!1;this.m=new kg;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}qa(mg,jg);q=mg.prototype;q.Df=function(a){this.s=a};q.Ef=function(a){this.o=a};function ng(a,b,c,d){c=c||og;var e=pg[a];if(!e||c>=e.priority)pg[a]={priority:c,be:b,oi:void 0===d?!1:d}}
|
|
207
|
+
function qg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.si=function(a){this.g.add(a)};q.Oi=function(a){this.g.delete(a)};q.oh=function(){this.g.clear()};q.ti=function(a){this.h.add(a)};q.Pi=function(a){this.h.delete(a)};q.ph=function(){this.h.clear()};
|
|
208
|
+
function rg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();jg.prototype.release.call(this);return this.m.destroy()};
|
|
209
|
+
q.request=function(a,b,c){var d=this,e=new sg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new tg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ke(b.retryParameters):Yf();b.uris=Ke(b.uris);f=ug(this,a,b,c);var g=f.za(function(){return vg(d,a,b,c,new Xf(b.retryParameters,!1),0,null,e)}),h=g.za(function(p){return wg(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.za(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.Wh||!d.l||u.fromCache||"HEAD"==b.method||a!=xg||d.l(u.timeMs,u.data.byteLength,Ag(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new tg(n.promise,function(){return n.abort()},e);lg(this.m,f);return f};
|
|
211
211
|
function ug(a,b,c,d){function e(h){f=f.za(function(){c.body&&(c.body=Cb(c.body));return h(b,c,d)})}var f=dg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.za(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
212
|
-
function vg(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.wb,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=pg[l])?l.be:null;if(!n)return bg(new T(2,1,1E3,k));var p=l.
|
|
213
|
-
var C=n(c.uris[f],c,b,function(D,I,F){
|
|
214
|
-
|
|
215
|
-
function wg(a,b,c,d){var e=dg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={
|
|
216
|
-
mg.prototype.request=mg.prototype.request;mg.prototype.destroy=mg.prototype.destroy;mg.makeRequest=rg;mg.defaultRetryParameters=function(){return Yf()};mg.prototype.clearAllResponseFilters=mg.prototype.
|
|
212
|
+
function vg(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.wb,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=pg[l])?l.be:null;if(!n)return bg(new T(2,1,1E3,k));var p=l.oi,r=null,u=null,v=!1,w=!1,A;return eg(Zf(e)).za(function(){if(a.i)return cg();A=Date.now();var y=0;c.requestStartTime=Date.now();
|
|
213
|
+
var C=n(c.uris[f],c,b,function(D,I,F){r&&r.stop();u&&u.X(B/1E3);a.l&&b==xg&&(y++,c.packetNumber=y,a.l(D,I,Ag(d),c),m=!0,h.g=F)},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&&(r=new Tc(function(){v=!0;C.abort()}),r.X(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Tc(function(){v=!0;C.abort()}));return C}).za(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var C={response:y,
|
|
214
|
+
Wh:m};!w&&a.j&&a.j(y.headers,c,b);return C},function(y){r&&r.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 cg();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,vg(a,b,c,d,e,f,y,h)}throw y;})}
|
|
215
|
+
function wg(a,b,c,d){var e=dg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Fg:void 0},f=a.next())g.Fg=f.value,e=e.za(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return(0,h.Fg)(b,k,d)}}(g));return e.za(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function Ag(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.gd)return!1}return!0}S("shaka.net.NetworkingEngine",mg);
|
|
216
|
+
mg.prototype.request=mg.prototype.request;mg.prototype.destroy=mg.prototype.destroy;mg.makeRequest=rg;mg.defaultRetryParameters=function(){return Yf()};mg.prototype.clearAllResponseFilters=mg.prototype.ph;mg.prototype.unregisterResponseFilter=mg.prototype.Pi;mg.prototype.registerResponseFilter=mg.prototype.ti;mg.prototype.clearAllRequestFilters=mg.prototype.oh;mg.prototype.unregisterRequestFilter=mg.prototype.Oi;mg.prototype.registerRequestFilter=mg.prototype.si;mg.unregisterScheme=function(a){delete pg[a]};
|
|
217
217
|
mg.registerScheme=ng;mg.prototype.setForceHTTPS=mg.prototype.Ef;mg.prototype.setForceHTTP=mg.prototype.Df;function sg(){this.g=0}mg.NumBytesRemainingClass=sg;function tg(a,b,c){ag.call(this,a,b);this.h=c}qa(tg,ag);mg.PendingRequest=tg;var xg=1;mg.RequestType={MANIFEST:0,SEGMENT:xg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};mg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var og=3;
|
|
218
|
-
mg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:og};var pg={};function Bg(a){this.g=!1;this.h=new $f;this.i=a}Bg.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 Cg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Dg(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 Eg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Fg(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 Gg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Hg(a,b){this.h=Fb(a);this.i=b==Ig;this.g=0}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
Hg.prototype.skip=Hg.prototype.skip;Hg.prototype.readBytes=Hg.prototype.mb;Hg.prototype.readUint64=Hg.prototype.
|
|
222
|
-
|
|
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 Rg(a){for(var b=Sg(a);a.reader.ma()&&!a.parser.g;)a.parser.
|
|
224
|
-
function Vg(a){var b=Sg(a);a.reader.skip(8);var c=a.reader.ka();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.ma()&&!a.parser.g;)a.parser.
|
|
225
|
-
function Sg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Kg);Kg.headerSize=Sg;Kg.typeToString=Qg;Kg.allData=Wg;Kg.audioSampleEntry=Vg;Kg.visualSampleEntry=Ug;Kg.sampleDescription=Tg;Kg.children=Rg;Kg.prototype.parseNext=Kg.prototype.
|
|
218
|
+
mg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:og};var pg={};function Bg(a){this.g=!1;this.h=new $f;this.i=a}Bg.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 Cg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Dg(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 Eg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Fg(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 Gg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Hg(a,b){this.h=Fb(a);this.i=b==Ig;this.g=0}q=Hg.prototype;q.ma=function(){return this.g<this.h.byteLength};q.ra=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.S=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Jg();}};q.ka=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Jg();}};q.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Jg();}};
|
|
219
|
+
q.Cg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Jg();}};q.Ec=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 Jg();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.mb=function(a){if(this.g+a>this.h.byteLength)throw Jg();var b=Bb(this.h,this.g,a);this.g+=a;return b};
|
|
220
|
+
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Jg();this.g+=a};q.Ai=function(a){if(this.g<a)throw Jg();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Jg();this.g=a};q.fc=function(){for(var a=this.g;this.ma()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Bb(this.h,a,this.g-a);this.g+=1;return wd(a)};function Jg(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Hg);Hg.prototype.readTerminatedString=Hg.prototype.fc;Hg.prototype.seek=Hg.prototype.seek;Hg.prototype.rewind=Hg.prototype.Ai;
|
|
221
|
+
Hg.prototype.skip=Hg.prototype.skip;Hg.prototype.readBytes=Hg.prototype.mb;Hg.prototype.readUint64=Hg.prototype.Ec;Hg.prototype.readInt32=Hg.prototype.Cg;Hg.prototype.readUint32=Hg.prototype.O;Hg.prototype.readUint16=Hg.prototype.ka;Hg.prototype.readUint8=Hg.prototype.S;Hg.prototype.getLength=Hg.prototype.getLength;Hg.prototype.getPosition=Hg.prototype.ra;Hg.prototype.hasMoreData=Hg.prototype.ma;var Ig=1;Hg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ig};function Kg(){this.i=[];this.h=[];this.g=!1}q=Kg.prototype;q.box=function(a,b){a=Lg(a);this.i[a]=Og;this.h[a]=b;return this};q.R=function(a,b){a=Lg(a);this.i[a]=Pg;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Hg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Bc(0,a,b,c)};
|
|
222
|
+
q.Bc=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=Qg(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.Ec();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Pg){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 Hg(b,0),l({name:h,parser:this,
|
|
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 Rg(a){for(var b=Sg(a);a.reader.ma()&&!a.parser.g;)a.parser.Bc(a.start+b,a.reader,a.partialOkay)}function Tg(a){for(var b=Sg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Bc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Ug(a){var b=Sg(a);for(a.reader.skip(78);a.reader.ma()&&!a.parser.g;)a.parser.Bc(a.start+b,a.reader,a.partialOkay)}
|
|
224
|
+
function Vg(a){var b=Sg(a);a.reader.skip(8);var c=a.reader.ka();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.ma()&&!a.parser.g;)a.parser.Bc(a.start+b,a.reader,a.partialOkay)}function Wg(a){return function(b){a(b.reader.mb(b.reader.getLength()-b.reader.ra()))}}function Lg(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 Qg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
225
|
+
function Sg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Kg);Kg.headerSize=Sg;Kg.typeToString=Qg;Kg.allData=Wg;Kg.audioSampleEntry=Vg;Kg.visualSampleEntry=Ug;Kg.sampleDescription=Tg;Kg.children=Rg;Kg.prototype.parseNext=Kg.prototype.Bc;Kg.prototype.parse=Kg.prototype.parse;Kg.prototype.stop=Kg.prototype.stop;Kg.prototype.fullBox=Kg.prototype.R;Kg.prototype.box=Kg.prototype.box;var Og=0,Pg=1;function Xg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Kg).box("moov",Rg).box("moof",Rg).R("pssh",function(c){if(!(1<c.version)){var d=Bb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Ld(c.reader.mb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=Ld(c.reader.mb(16));b.h.push(f)}}}}).parse(a)}
|
|
226
226
|
function Yg(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=Kd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
227
227
|
@license
|
|
228
228
|
tXml
|
|
229
229
|
Copyright 2015 Tobias Nickel
|
|
230
230
|
SPDX-License-Identifier: MIT
|
|
231
231
|
*/
|
|
232
|
-
function Zg(a,b){a=zd(a);return $g(a,b)}function $g(a,b){a=ah(a);return!b&&a.length?a[0]:(a=a.find(function(
|
|
233
|
-
function ah(a){function
|
|
234
|
-
45!=a.charCodeAt(
|
|
235
|
-
|
|
236
|
-
|
|
232
|
+
function Zg(a,b){var c=void 0===c?!1:c;a=zd(a);return $g(a,b,c)}function $g(a,b,c){a=ah(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return d.tagName===b}))?a:null}function bh(a){return ch.has(a)?ch.get(a):""}
|
|
233
|
+
function ah(a,b){function c(f,g){g=void 0===g?!1:g;for(var h=[];a[e];)if(60==a.charCodeAt(e)){if(47===a.charCodeAt(e+1)){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0<l&&(k=g.indexOf(f.substring(0,l)))}if(-1==k)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(33===a.charCodeAt(e+1)){if(45==a.charCodeAt(e+2)){for(;-1!==e&&(62!==a.charCodeAt(e)||
|
|
234
|
+
45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var p=a.charCodeAt(e);if(64<p&&91>p||96<p&&123>p){p=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123>
|
|
235
|
+
r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(p.startsWith("xmlns:")){r=u;var v=p.split(":")[1];ch.set(r,v);dh.set(v,r)}"tt"===m&&"xml:space"===p&&"preserve"===u&&(l=!0);n[p]=u}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n=
|
|
236
|
+
0;n<m;n++)p=k[n],"string"!==typeof p?b&&(p.parent=l):n==m-1&&"\n"==p&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
|
|
237
237
|
function eh(a){return"string"===typeof a}function fh(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function gh(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function hh(a){if("string"===typeof a)return Dd(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Dd(a)}
|
|
238
238
|
function ih(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=hh(a))&&(a=a.trim());return a}function jh(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())jh(d.value,b,c)}return c}function kh(a,b){a=gh(a,b);return 1!=a.length?null:a[0]}function lh(a,b,c){a=mh(a,b,c);return 1!=a.length?null:a[0]}
|
|
239
239
|
function nh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function oh(a,b,c){b=bh(b);return a.attributes[b+":"+c]||null}function mh(a,b,c){b=bh(b);var d=[];if(a.children){a=t(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function ph(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=oh(a,d.value,c))return d;return null}
|
|
240
240
|
function qh(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function rh(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
241
241
|
function sh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function th(a){a=Number(a);return 0===a%1?a:null}function uh(a){a=Number(a);return 0===a%1&&0<a?a:null}function vh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function wh(a){a=Number(a);return isNaN(a)?null:a}function xh(a){return a?"true"===a.toLowerCase():!1}
|
|
242
242
|
function yh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
243
|
-
function zh(a){var b=[];a=Dd(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,
|
|
244
|
-
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].
|
|
245
|
-
function Ah(a,b){var c=zh(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=Bh(a,"t",d.t)),null!==d.n&&(c=Bh(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.
|
|
243
|
+
function zh(a){var b=[];a=Dd(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Ib:c.split("/@")[1]||
|
|
244
|
+
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Ib=c.slice(1))}return b}
|
|
245
|
+
function Ah(a,b){var c=zh(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=Bh(a,"t",d.t)),null!==d.n&&(c=Bh(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Ib)&&a[c]?Ch(a[c],e,d,ih(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
|
|
246
246
|
function Bh(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 Ch(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
247
247
|
function Dh(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=dh.has(b)?dh.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=Dh(d),b.appendChild(c);return b}
|
|
248
|
-
function Eh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Le(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=Eh(c),c.parent=b,b.children.push(c));return b}var ch=new Map,dh=new Map;function Fh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ha=this.ca=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new $f;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.ea=new Map;this.L=new Tc(function(){return Gh(b)});this.P=!1;this.N=[];this.W=!1;this.K=new Tc(function(){Hh(b)});this.l.catch(function(){});this.j=new Bg(function(){return Ih(b)});this.aa=!1;this.F=this.G=null}
|
|
249
|
-
function Ih(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,E(b,Jh(a),2);case 2:if(!a.m){b.u(3);break}xa(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:za(b,5);break;case 4:Aa(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.aa=!1,a.G=null,H(b)}})}
|
|
248
|
+
function Eh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Le(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=Eh(c),c.parent=b,b.children.push(c));return b}var ch=new Map,dh=new Map;function Fh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ha=this.ca=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new $f;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.ea=new Map;this.L=new Tc(function(){return Gh(b)});this.P=!1;this.N=[];this.W=!1;this.K=new Tc(function(){Hh(b)});this.l.catch(function(){});this.j=new Bg(function(){return Ih(b)});this.aa=!1;this.F=this.G=null}q=Fh.prototype;q.destroy=function(){return this.j.destroy()};
|
|
249
|
+
function Ih(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,E(b,Jh(a),2);case 2:if(!a.m){b.u(3);break}xa(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:za(b,5);break;case 4:Aa(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.aa=!1,a.G=null,H(b)}})}q.configure=function(a){this.h=a;this.K&&this.K.Va(this.h.updateExpirationTime)};
|
|
250
250
|
function Kh(a,b,c){a.ha=!0;a.A=new Map;a.P=c;return Lh(a,b)}function Mh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.P=0<a.A.size;return Lh(a,b)}
|
|
251
251
|
function Nh(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 Oh(a,g,[])}
|
|
252
|
-
function Lh(a,b){var c,d,e,f,g,h,k,l,m,n,p,
|
|
252
|
+
function Lh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c=Ph(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=Fg(a.h.servers),Qh(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=Rh(n),r=t(p),u=r.next();!u.done;u=r.next())v=u.value,k.add(v);w=t(k);for(A=w.next();!A.done;A=
|
|
253
253
|
w.next())y=A.value,Sh(y,Fg(a.h.servers),Fg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,Xe(b,a.P,a.aa,a.h.preferredKeySystems),2)}Cg(a.j);C=g||Object.keys(a.h.servers).length;if(!C)return a.ca=!0,B.return(Promise.resolve());z=Oh(a,void 0,b);return B.return(g?z:z.catch(function(){}))})}
|
|
254
254
|
function Th(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return E(c,a.G,3);case 3:return Cg(a.j),c.return();case 2:return xa(c,4),a.G=a.m.setMediaKeys(a.s),E(c,a.G,6);case 6:za(c,5);break;case 4:b=Aa(c),a.o(new T(2,6,6003,b.message));case 5:Cg(a.j),H(c)}})}function Uh(a,b){return O(function(c){if(1==c.g)return E(c,Th(a),2);Vh(a,b.initDataType,Bb(b.initData));H(c)})}
|
|
255
|
-
|
|
255
|
+
q.pc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.sa(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.sa(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Wh(b,e.value);b.W=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Jh(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||
|
|
256
256
|
b.A.size?E(c,Th(b),2):c.u(2)}Xh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Uh(b,d)});H(c)})};
|
|
257
|
-
function Yh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=rg([a.g.serverCertificateUri],a.h.retryParameters);xa(g,3);c=a.C.
|
|
257
|
+
function Yh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=rg([a.g.serverCertificateUri],a.h.retryParameters);xa(g,3);c=a.C.Db.request(5,b);return E(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Bb(d.data);za(g,4);break;case 3:throw e=Aa(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();
|
|
258
258
|
xa(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:za(g,0);break;case 6:throw f=Aa(g),new T(2,6,6004,f.message);}})}function Zh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,$h(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 $f,d.push(e.fb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
|
|
259
259
|
function Xh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){$h(a,k,h)});return E(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&ai(a))return g.return(a.l);a.l=new $f;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Vh(a,f.initDataType,f.initData);bi(a)&&a.l.resolve();return g.return(a.l)})}
|
|
260
|
-
function Vh(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(
|
|
261
|
-
|
|
262
|
-
function Oh(a,b,c){var d,e,f,g,h,k,l,m,n,p,
|
|
260
|
+
function Vh(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}0<a.i.size&&bi(a)&&(a.l.resolve(),a.l=new $f,a.l.catch(function(){}));ci(a,b,c,a.g.sessionType)}}function di(a){a=a.i.keys();a=Dg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
261
|
+
q.Pe=function(){var a=this,b=this.i.keys();b=Dg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Uc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.zd=function(){return Gg(this.ea)};
|
|
262
|
+
function Oh(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y;return O(function(C){switch(C.g){case 1:d=new Map;if(c.length){e=ei(a,c,d);C.u(2);break}return E(C,fi(a,b),3);case 3:e=C.h;case 2:f=e;if(!f)throw new T(2,6,6001);Cg(a.j);xa(C,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=t(k);for(r=p.next();!r.done;r=p.next())u=r.value,a.H.add(u.contentType.toLowerCase());if(c.length){var z=
|
|
263
263
|
f.keySystem;var B=d.get(f.keySystem);var D=[],I=[],F=[],J=[],K=[],G=new Set;gi(B,D,I,J,F,K,G);var M=a.P?"persistent-license":"temporary";z={keySystem:z,encryptionScheme:D[0],licenseServerUri:I[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||M,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:K,keyIds:G};B=t(B);
|
|
264
264
|
for(D=B.next();!D.done;D=B.next())D=D.value,D.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(z.persistentStateRequired=D.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),D=[],I=[],F=[],J=[],K=[],G=new Set,gi(z.drmInfos,D,I,J,F,K,G),B={keySystem:B,encryptionScheme:D[0],licenseServerUri:I[0],distinctiveIdentifierRequired:"required"==z.distinctiveIdentifier,persistentStateRequired:"required"==z.persistentState,
|
|
265
|
-
sessionType:z.sessionTypes[0]||"temporary",audioRobustness:(z.audioCapabilities?z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:K,keyIds:G};a.g=B;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return E(C,f.createMediaKeys(),6);case 6:
|
|
265
|
+
sessionType:z.sessionTypes[0]||"temporary",audioRobustness:(z.audioCapabilities?z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:K,keyIds:G};a.g=B;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return E(C,f.createMediaKeys(),6);case 6:v=C.h;Cg(a.j);a.s=v;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){C.u(7);break}xa(C,8);return E(C,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
|
|
266
266
|
10);case 10:w=C.h;if("usable"!=w)throw new T(2,6,6018);Cg(a.j);za(C,7,4);break;case 8:A=Aa(C,4);if(A instanceof T)throw A;throw new T(2,6,6019,A.message);case 7:return a.ca=!0,E(C,Yh(a),11);case 11:Cg(a.j);za(C,0);break;case 4:y=Aa(C);Cg(a.j,y);a.g=null;a.H.clear();if(y instanceof T)throw y;throw new T(2,6,6002,y.message);}})}
|
|
267
|
-
function ei(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Rh(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.
|
|
269
|
-
function fi(a,b){var c,d,e,f,g,h,k,l,m,n,p,
|
|
270
|
-
y.h,y.return(c);case 6:Aa(y);case 7:Cg(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;
|
|
267
|
+
function ei(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Rh(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={Bg:void 0},e=a.next())for(d.Bg=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==
|
|
268
|
+
l.Bg}}(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
|
+
function fi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,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);xa(y,6);return E(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
270
|
+
y.h,y.return(c);case 6:Aa(y);case 7:Cg(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;r=t(b.keys());u=r.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}xa(y,15);return E(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:Aa(y);case 16:Cg(a.j);case 13:u=r.next();y.u(12);break;case 11:return y.return(c)}})}
|
|
271
271
|
function Ph(a){a=Fg(a.h.clearKeys);return 0==a.size?null:Pd(a)}function hi(a){bi(a)&&a.l.resolve()}function ii(a,b){(new Tc(function(){b.loaded=!0;hi(a)})).X(ji)}
|
|
272
272
|
function $h(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.W?a.N.push(n):Wh(a,n)});a.B.D(d,"keystatuseschange",function(n){return ki(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,kf:Infinity,fb:null,type:"persistent-license"};a.i.set(d,f);xa(m,2);return E(m,
|
|
273
273
|
d.load(b),4);case 4:return g=m.h,Cg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),ii(a,f),hi(a),m.return(d);case 2:k=Aa(m),Cg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(l,6,6005,k.message)),f.loaded=!0,hi(a);case 3:return m.return(Promise.resolve())}})}
|
|
274
274
|
function ci(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.W?a.N.push(f):Wh(a,f)});a.B.D(e,"keystatuseschange",function(f){return ki(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.o(b);return}a.h.logLicenseExchange&&Gd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
275
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.o(new T(2,6,6006,f.message,f,h))}})}
|
|
276
|
-
function Wh(a,b){var c,d,e,f,g,h,k,l,m,n,p,
|
|
277
|
-
f.headers[h];if(Nc(a.g.keySystem)){var A=xd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=$g(A,"PlayReadyKeyMessage");var y=jh(A,"HttpHeader");y=t(y);for(var C=y.next();!C.done;C=y.next()){var z=C.value;C=jh(z,"name")[0];z=jh(z,"value")[0];g.headers[hh(C)]=hh(z)}A=jh(A,"Challenge")[0];g.body=Hd(hh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();xa(w,2);m=a.C.
|
|
278
|
-
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.reject(p),a.i.delete(c),bi(a)&&(a.l.resolve(),a.L.X(.1)));return w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Gd(l.data);xa(w,5);return E(w,c.update(l.data),7);case 7:za(w,6);break;case 5:return
|
|
276
|
+
function Wh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Gd(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=rg([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
|
+
f.headers[h];if(Nc(a.g.keySystem)){var A=xd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=$g(A,"PlayReadyKeyMessage");var y=jh(A,"HttpHeader");y=t(y);for(var C=y.next();!C.done;C=y.next()){var z=C.value;C=jh(z,"name")[0];z=jh(z,"value")[0];g.headers[hh(C)]=hh(z)}A=jh(A,"Challenge")[0];g.body=Hd(hh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();xa(w,2);m=a.C.Db.request(2,g);return E(w,m.promise,4);case 4:l=w.h;za(w,3);break;case 2:n=Aa(w);if(a.j.g)return w.return();
|
|
278
|
+
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.reject(p),a.i.delete(c),bi(a)&&(a.l.resolve(),a.L.X(.1)));return w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Gd(l.data);xa(w,5);return E(w,c.update(l.data),7);case 7:za(w,6);break;case 5:return r=Aa(w),u=new T(2,6,6008,r.message),a.o(u),d&&d.fb&&d.fb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.fb&&d.fb.resolve(),
|
|
279
279
|
ii(a,d));H(w)}})}
|
|
280
280
|
function ki(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Nc(a.g.keySystem)&&16==g.byteLength&&(Xc()||id())){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=Ld(g).slice(0,32);a.$.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(){}));bi(a)&&
|
|
281
281
|
(a.l.resolve(),a.L.X(li))}function Gh(a){var b=a.$,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new T(2,6,6014));a.C.Xd(Gg(c))}
|
|
282
|
-
function mi(){var a,b,c,d,e,f,g,h,k,l,m,n,p,
|
|
283
|
-
[{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,ha,ba,
|
|
284
|
-
(P=L.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,ad()&&(R=!1),Q=L.getConfiguration().videoCapabilities,ha=L.getConfiguration().audioCapabilities,ba={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(N)&&k.get(N)?ba=k.get(N):k.set(N,ba),(
|
|
285
|
-
ha[0].robustness)&&!ba.audioRobustnessLevels.includes(wa)&&ba.audioRobustnessLevels.push(wa),H(ta)}})};m=function(N,L,P,R){var Q,ha,ba,
|
|
286
|
-
|
|
287
|
-
robustness:R}}},E(
|
|
288
|
-
J.next())G=K.value,
|
|
282
|
+
function mi(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G;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
|
+
[{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,ha,ba,oa,Ka,wa;return O(function(ta){switch(ta.g){case 1:return xa(ta,2),E(ta,L.createMediaKeys(),4);case 4:za(ta,3);break;case 2:return Aa(ta),ta.return();case 3:R=
|
|
284
|
+
(P=L.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,ad()&&(R=!1),Q=L.getConfiguration().videoCapabilities,ha=L.getConfiguration().audioCapabilities,ba={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(N)&&k.get(N)?ba=k.get(N):k.set(N,ba),(oa=Q[0].encryptionScheme)&&!ba.encryptionSchemes.includes(oa)&&ba.encryptionSchemes.push(oa),(Ka=Q[0].robustness)&&!ba.videoRobustnessLevels.includes(Ka)&&ba.videoRobustnessLevels.push(Ka),(wa=
|
|
285
|
+
ha[0].robustness)&&!ba.audioRobustnessLevels.includes(wa)&&ba.audioRobustnessLevels.push(wa),H(ta)}})};m=function(N,L,P,R){var Q,ha,ba,oa,Ka,wa,ta,Na,Va,ua;return O(function(Ca){switch(Ca.g){case 1:xa(Ca,2);Q=Ke(g);ha=t(Q.videoCapabilities);for(ba=ha.next();!ba.done;ba=ha.next())oa=ba.value,oa.encryptionScheme=L,oa.robustness=P;Ka=t(Q.audioCapabilities);for(wa=Ka.next();!wa.done;wa=Ka.next())ta=wa.value,ta.encryptionScheme=L,ta.robustness=R;Na=Ke(Q);Na.persistentState="required";Na.sessionTypes=["persistent-license"];
|
|
286
|
+
Va=[Na,Q];return E(Ca,navigator.requestMediaKeySystemAccess(N,Va),4);case 4:return ua=Ca.h,E(Ca,l(N,ua),5);case 5:za(Ca,0);break;case 2:Aa(Ca),H(Ca)}})};n=function(N,L,P,R){var Q,ha,ba;return O(function(oa){switch(oa.g){case 1:return xa(oa,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,
|
|
287
|
+
robustness:R}}},E(oa,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return ha=oa.h,ba=ha.keySystemAccess,E(oa,l(N,ba),5);case 5:za(oa,0);break;case 2:Aa(oa),H(oa)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(y=A.value,C=t(a),z=C.next();!z.done;z=C.next())B=z.value,"org.w3.clearkey"===B&&ld()||(v.push(m(B,y,"","")),v.push(n(B,y,"","")));D=t(a);for(I=D.next();!I.done;I=D.next())for(F=I.value,J=t(d[F]||[]),K=J.next();!K.done;K=
|
|
288
|
+
J.next())G=K.value,v.push(m(F,null,G,"")),v.push(m(F,null,"",G)),v.push(n(F,null,G,"")),v.push(n(F,null,"",G));return E(M,Promise.all(v),2)}return M.return(Gg(k))})}function ni(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Tc(e)).X(oi)}),xa(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return za(c,0);Aa(c);H(c)})}
|
|
289
289
|
function Jh(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 xa(g,2),a.ha||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,ni(e),5):E(g,e.remove(),5);if(2!=g.g)return za(g,0);Aa(g);H(g)})})),0)})}function Rh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
290
290
|
function Hh(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 bi(a){a=a.i.values();return Eg(a,function(b){return b.loaded})}function ai(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.$.get(c.value))return!1;return!0}
|
|
291
291
|
function Qh(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
292
|
function gi(a,b,c,d,e,f,g){var h=[];a=t(a);for(var k=a.next(),l={};!k.done;l={va:void 0},k=a.next()){l.va=k.value;b.includes(l.va.encryptionScheme)||b.push(l.va.encryptionScheme);"org.w3.clearkey"==l.va.keySystem&&l.va.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(l.va.licenseServerUri)||h.push(l.va.licenseServerUri):c.includes(l.va.licenseServerUri)||c.push(l.va.licenseServerUri);e.includes(l.va.serverCertificateUri)||e.push(l.va.serverCertificateUri);l.va.serverCertificate&&
|
|
293
|
-
(d.some(function(p){return function(
|
|
293
|
+
(d.some(function(p){return function(r){return yb(r,p.va.serverCertificate)}}(l))||d.push(l.va.serverCertificate));if(l.va.initData){k=t(l.va.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(r){var u=p.Ve;return r.keyId&&r.keyId==u.keyId?!0:r.initDataType==u.initDataType&&yb(r.initData,u.initData)}}(n))||f.push(n.Ve)}if(l.va.keyIds)for(l=t(l.va.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
294
|
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
295
|
function Sh(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
296
|
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 oi=1,ji=5,li=.5;/*
|
|
@@ -302,18 +302,18 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
302
302
|
function pi(a,b,c){this.h=a;this.i=b;this.g=c}function qi(a,b){return O(function(c){if(1==c.g)return E(c,Se(a.g,b,a.h.drm.preferredKeySystems),2);Ne(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(sf))throw new T(2,4,4032);return c.return(ri(a,b))})}
|
|
303
303
|
function ri(a,b){var c=Re(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,si(a,d.keySystem,f.video),si(a,d.keySystem,f.audio);ti(a,b)}return c}function si(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,Vh(a.g,e.initDataType,e.initData)}}}
|
|
304
304
|
function ti(a,b){a=a.g?a.g.zd():{};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?ui.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 ui=["output-restricted","internal-error"];function vi(){}function wi(a,b){if(b){var c=xi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",vi);vi.unregisterParserByMime=function(a){delete xi[a]};vi.registerParserByMime=function(a,b){xi[a]=b};vi.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};vi.AccessibilityPurpose={
|
|
305
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var ui=["output-restricted","internal-error"];function vi(){}function wi(a,b){if(b){var c=xi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",vi);vi.unregisterParserByMime=function(a){delete xi[a]};vi.registerParserByMime=function(a,b){xi[a]=b};vi.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};vi.AccessibilityPurpose={Mj:"visually impaired",gj:"hard of hearing"};var xi={};function yi(a,b){function c(){f=!0}function d(m){h.push(m);Rg(m)}var e=a=Bb(a),f=!1,g,h=[],k=[];(new Kg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).R("stsd",function(m){g=m;h.push(m);Tg(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
306
|
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(Ld(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
307
|
e=zi(e,g,l.box,h,l.cb);return Xc()&&md()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
308
308
|
function zi(a,b,c,d,e){var f=Ai.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);Bi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Yc()||Xc()?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,Bi(e,d.start,d.size+k.byteLength);k=Fb(e,b.start);b=Sg(b);
|
|
309
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Bi(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 Ai=new Kc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function
|
|
310
|
-
|
|
311
|
-
function Hi(a,b,c,d,e,f,g,h,k,l,m,n,p,
|
|
312
|
-
a.next())b.value.
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
Hi.prototype.getThumbnailSprite=Hi.prototype.
|
|
316
|
-
Hi.prototype.markAsPreload=Hi.prototype.ff;Hi.prototype.markAsUnavailable=Hi.prototype.
|
|
309
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Bi(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 Ai=new Kc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ci(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}Ci.prototype.Zb=function(){return this.Da};Ci.prototype.Xb=function(){return this.pa};Ci.prototype.Wc=function(){return this.g};function Gi(a,b){return a===b?!0:a&&b?a.Zb()==b.Zb()&&a.Xb()==b.Xb()&&Qb(a.M().sort(),b.M().sort())&&yb(a.Wc(),b.Wc()):a==b}S("shaka.media.InitSegmentReference",Ci);
|
|
310
|
+
Ci.prototype.getEndByte=Ci.prototype.Xb;Ci.prototype.getStartByte=Ci.prototype.Zb;
|
|
311
|
+
function Hi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Ii:r;this.startTime=a;this.j=this.endTime=b;this.C=c;this.Da=d;this.pa=e;this.da=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=r;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.gd=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
312
|
+
a.next())b.value.vg();this.o&&this.g.length&&this.g[this.g.length-1].ug();this.B=this.mimeType=this.codecs=null}q=Hi.prototype;q.M=function(){return this.C()};q.getStartTime=function(){return this.startTime};q.yh=function(){return this.endTime};q.Zb=function(){return this.Da};q.Xb=function(){return this.pa};q.Rh=function(){return this.tilesLayout};q.Qh=function(){return this.A};q.$b=function(){return this.status};q.ii=function(){this.status=Ji};q.ff=function(){this.preload=!0};q.ci=function(){return this.preload};
|
|
313
|
+
q.Od=function(){this.l=!1};q.$h=function(){return this.l};q.vg=function(){this.gd=!0};q.bi=function(){return this.gd};q.ug=function(){this.Ld=!0};q.ai=function(){return this.Ld};q.tg=function(){this.m=!0};q.Xh=function(){return this.m};q.Pg=function(a){this.s=a};q.Ph=function(){return this.s};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
314
|
+
q.Jf=function(a){null==this.h?$a("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Li=function(a){this.B=a};q.Wc=function(){return this.B};function Ki(a,b){a.da=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ki(c.value,b)}S("shaka.media.SegmentReference",Hi);Hi.prototype.getSegmentData=Hi.prototype.Wc;Hi.prototype.setSegmentData=Hi.prototype.Li;Hi.prototype.syncAgainst=Hi.prototype.Jf;Hi.prototype.offset=Hi.prototype.offset;
|
|
315
|
+
Hi.prototype.getThumbnailSprite=Hi.prototype.Ph;Hi.prototype.setThumbnailSprite=Hi.prototype.Pg;Hi.prototype.hasByterangeOptimization=Hi.prototype.Xh;Hi.prototype.markAsByterangeOptimization=Hi.prototype.tg;Hi.prototype.isLastPartial=Hi.prototype.ai;Hi.prototype.markAsLastPartial=Hi.prototype.ug;Hi.prototype.isPartial=Hi.prototype.bi;Hi.prototype.markAsPartial=Hi.prototype.vg;Hi.prototype.isIndependent=Hi.prototype.$h;Hi.prototype.markAsNonIndependent=Hi.prototype.Od;Hi.prototype.isPreload=Hi.prototype.ci;
|
|
316
|
+
Hi.prototype.markAsPreload=Hi.prototype.ff;Hi.prototype.markAsUnavailable=Hi.prototype.ii;Hi.prototype.getStatus=Hi.prototype.$b;Hi.prototype.getTileDuration=Hi.prototype.Qh;Hi.prototype.getTilesLayout=Hi.prototype.Rh;Hi.prototype.getEndByte=Hi.prototype.Xb;Hi.prototype.getStartByte=Hi.prototype.Zb;Hi.prototype.getEndTime=Hi.prototype.yh;Hi.prototype.getStartTime=Hi.prototype.getStartTime;Hi.prototype.getUris=Hi.prototype.M;var Ii=0,Ji=1;Hi.Status={Ui:Ii,Kj:Ji,mj:2};function Li(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Mi(a){return!a||Li(a)?null:a.length?a.end(a.length-1):null}function Ni(a,b){return!a||!a.length||Li(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Oi(a,b){if(!a||!a.length||Li(a))return 0;var c=0;a=t(Pi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
317
317
|
function Qi(a,b,c){if(!a||!a.length||Li(a))return null;a=Pi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Pi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
|
|
318
318
|
@license
|
|
319
319
|
Shaka Player
|
|
@@ -325,8 +325,8 @@ function Vi(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
325
325
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=wd(Bb(a.data,1,d));a=wd(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=wd(Bb(a.data,1,d));a=wd(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=wd(Bb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
326
326
|
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=wd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=wd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Cb(a.data),b):null}
|
|
327
327
|
function Wi(a){for(var b=0,c=[];Si(a,b);){var d=Ui(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=Ui(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Vi(e))&&c.push(f);b+=e.size+10}Ti(a,b)&&(b+=10)}return c}function Xi(a,b){for(var c=b=void 0===b?0:b,d=0;Si(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ui(a,b+6),Ti(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Ri);Ri.getID3Data=Xi;
|
|
328
|
-
Ri.getID3Frames=Wi;function Yi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.
|
|
329
|
-
function aj(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={xf:null,sampleSize:null,ee:null};c&256&&(h.xf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.ee=0==b?a.O():a.
|
|
328
|
+
Ri.getID3Frames=Wi;function Yi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Ec());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Pc:c,vd:d,Oj:e}}function Zi(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function $i(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ka();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
329
|
+
function aj(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={xf:null,sampleSize:null,ee:null};c&256&&(h.xf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.ee=0==b?a.O():a.Cg());e.push(h)}return{Sj:d,Gg:e,sh:f}}function bj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ka();a.skip(2);a.skip(2);a.skip(2);a=a.ka()+a.ka()/65536;return{channelCount:b,sampleRate:a}}function cj(a){a=a.O();return{codec:Qg(a)}}
|
|
330
330
|
function dj(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.ka()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ka();a.ka();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,md:c}}
|
|
331
331
|
function ej(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function fj(a){return(10>a?"0":"")+a};/*
|
|
332
332
|
|
|
@@ -345,137 +345,138 @@ function ej(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
|
|
|
345
345
|
limitations under the License.
|
|
346
346
|
*/
|
|
347
347
|
function gj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Bb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function hj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Hg(c,0)).O(),a.g=8*d,a.i-=d)}function ij(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;hj(a)}a.h<<=b;a.g-=b}
|
|
348
|
-
function jj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&hj(a);c=b-c;return 0<c?d<<c|jj(a,c):d}function kj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;hj(a);return b+kj(a)}function lj(a){ij(a,1+kj(a))}function V(a){var b=kj(a);return jj(a,b+1)-1}function
|
|
349
|
-
function vj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=
|
|
350
|
-
|
|
351
|
-
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
|
|
352
|
-
null,128===f[n+2]&&(
|
|
348
|
+
function jj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&hj(a);c=b-c;return 0<c?d<<c|jj(a,c):d}function kj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;hj(a);return b+kj(a)}function lj(a){ij(a,1+kj(a))}function V(a){var b=kj(a);return jj(a,b+1)-1}function mj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===jj(a,1)}function uj(a){return jj(a,8)}
|
|
349
|
+
function vj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=mj(a),d=(c+d+256)%256),c=0===d?c:d}function wj(a){uj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",gj);function xj(){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}q=xj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
350
|
+
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,yj(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
|
+
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=yd(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
|
|
352
|
+
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,nh:u,sampleRate:48E3}))}n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.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
353
|
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
354
|
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
355
|
function zj(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=Aj(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=Aj(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}
|
|
357
|
-
|
|
358
|
-
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=Md(b.data,a),b.fullData=Md(b.fullData,a));return h};
|
|
359
|
-
|
|
360
|
-
|
|
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)};
|
|
362
|
-
|
|
356
|
+
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.ni=function(a){rb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.nf(a)};
|
|
357
|
+
q.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=Md(b.data,p),b.fullData=Md(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=Md(b.data,k),b.fullData=Md(b.fullData,k)));if(n>=e-f)return h;
|
|
358
|
+
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=Md(b.data,a),b.fullData=Md(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Md.apply(Ed,x(c.value)),(c=zj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Wi(c.data),dts:c.dts,pts:c.pts});return a};
|
|
359
|
+
q.Jb=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=Md.apply(Ed,x(c.value)),e=zj(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=Md(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
|
+
q.yc=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=Md.apply(Ed,x(d.value)),f=zj(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=Md(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)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.Jb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.yc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Tc=function(){return{audio:this.A,video:this.m}};
|
|
362
|
+
q.Ed=function(){for(var a=[],b=t(this.yc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.Uh=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Te();return{height:a.height,width:a.width}};q.Te=function(){return"hvc"==this.m?Bj(this):Cj(this)};
|
|
363
363
|
function Cj(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 gj(a.data);var c=uj(a),d=uj(a),e=uj(a);lj(a);if(Dj.includes(c)){var f=V(a);3===f&&ij(a,1);lj(a);lj(a);ij(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?vj(a,16):vj(a,64))}}lj(a);f=V(a);if(0===f)V(a);else if(1===f)for(ij(a,1),lj(a),lj(a),f=V(a),g=0;g<f;g++)lj(a);lj(a);ij(a,1);f=V(a);g=V(a);var h=jj(a,1);0===h&&ij(a,1);ij(a,1);var k=0,l=0,m=
|
|
364
364
|
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 Bj(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 gj(a.fullData,!0);uj(c);uj(c);jj(c,4);var d=jj(c,3);W(c);var e=jj(c,2),f=jj(c,1),g=jj(c,5),h=jj(c,32);a=uj(c);for(var k=uj(c),l=uj(c),m=uj(c),n=uj(c),p=uj(c),
|
|
366
|
-
(w+=V(c),A+=V(c),y+=V(c),C+=V(c));b.width=String(
|
|
367
|
-
a.toString(16).toUpperCase());b.codec=e;return b}function Aj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Ej(a){return 0>yj(a)?!1:!0}function yj(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",xj);xj.syncOffset=yj;xj.probe=Ej;xj.prototype.getVideoInfo=xj.prototype.Te;xj.prototype.getVideoResolution=xj.prototype.
|
|
368
|
-
xj.prototype.getCodecs=xj.prototype.
|
|
365
|
+
function Bj(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 gj(a.fullData,!0);uj(c);uj(c);jj(c,4);var d=jj(c,3);W(c);var e=jj(c,2),f=jj(c,1),g=jj(c,5),h=jj(c,32);a=uj(c);for(var k=uj(c),l=uj(c),m=uj(c),n=uj(c),p=uj(c),r=uj(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++)jj(c,2);for(w=0;w<d;w++)u[w]&&jj(c,88),v[w]&&uj(c);V(c);d=V(c);3==d&&jj(c,1);u=V(c);v=V(c);var A=w=0,y=0,C=0;W(c)&&
|
|
366
|
+
(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+r;p&&(e+="."+p.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
367
|
+
a.toString(16).toUpperCase());b.codec=e;return b}function Aj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Ej(a){return 0>yj(a)?!1:!0}function yj(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",xj);xj.syncOffset=yj;xj.probe=Ej;xj.prototype.getVideoInfo=xj.prototype.Te;xj.prototype.getVideoResolution=xj.prototype.Uh;xj.prototype.getVideoNalus=xj.prototype.Ed;
|
|
368
|
+
xj.prototype.getCodecs=xj.prototype.Tc;xj.prototype.getStartTime=xj.prototype.getStartTime;xj.prototype.getVideoData=xj.prototype.yc;xj.prototype.getAudioData=xj.prototype.Jb;xj.prototype.getMetadata=xj.prototype.getMetadata;xj.prototype.parseNalus=xj.prototype.nf;xj.prototype.parseAvcNalus=xj.prototype.ni;xj.prototype.parse=xj.prototype.parse;xj.prototype.clearData=xj.prototype.clearData;xj.Timescale=9E4;var Dj=[100,110,122,244,44,83,86,118,128,138,139,134];function Fj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&ab("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,rb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ab("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(ab("Could not find LCEVC Library on this page"),
|
|
369
369
|
a=!1):(this.h.SupportObject.SupportStatus||ab(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Gj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
370
|
-
Fj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Hj(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",Fj);Fj.prototype.release=Fj.prototype.release;function Ij(a,b,c,d){var e=this;this.i=a;this.ca=c;this.A=null;this.F=b;this.h={};this.G={};this.
|
|
370
|
+
Fj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Hj(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",Fj);Fj.prototype.release=Fj.prototype.release;function Ij(a,b,c,d){var e=this;this.i=a;this.ca=c;this.A=null;this.F=b;this.h={};this.G={};this.Ea={};this.g=null;this.ha=!1;this.$=d||null;this.l={};this.s=new hb;this.j={};this.H=null;this.L=new $f;this.N="";this.ua=!1;this.m=Jj(this,this.L);this.C=!1;this.J=new Bg(function(){return Kj(e)});this.B=!1;this.aa="UNKNOWN";this.Fa=this.Ka=!1;this.ya=new $f;this.o=!1;this.xa=!0;this.na=this.P=this.oa=this.W=this.K=this.ea=null;this.wa=new $f}
|
|
371
371
|
function Jj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.xa=!0});a.s.D(c,"endstreaming",function(){a.xa=!1});a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.ua=!0});a.N=Lj(c);a.i.src=a.N;return c}c=new MediaSource;a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.ua=!0});a.N=Lj(c);a.i.src=a.N;return c}
|
|
372
|
-
function Mj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(
|
|
373
|
-
ae(a,h,k),p=Zd(h,k),!mb(n)&&!mc(p))return
|
|
372
|
+
function Mj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g)return a.createSegmentIndex?E(r,a.createSegmentIndex(),2):r.u(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Vd;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=Xd(h,k),!qe(m))return r.return(!1)}else if(b==c.fa?k=$e(k):b==c.V&&(k=af(k,h)),n=
|
|
373
|
+
ae(a,h,k),p=Zd(h,k),!mb(n)&&!mc(p))return r.return(!1);return r.return(!0)})}q=Ij.prototype;q.destroy=function(){return this.J.destroy()};
|
|
374
374
|
function Kj(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(ye)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.j)b.push(a.j[k].destroy());return E(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.m=null;a.g=null;a.F=null;a.h={};a.j={};a.H=null;
|
|
375
|
-
a.l={};a.$=null;a.K=null;a.ca=null;H(l)})}
|
|
376
|
-
function Nj(a,b,c,d){var e,f,g,h,k,l,m,n,p,
|
|
377
|
-
Nj(a,e.fa,c,n),7);case 7:return w.return();case 5:if(p=mc(l))
|
|
378
|
-
H(w)}})}
|
|
375
|
+
a.l={};a.$=null;a.K=null;a.ca=null;H(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Vd,E(m,e.L,2);case 2:e.B=b,e.aa=c,e.Ka=d,e.Fa=!e.B&&"HLS"==e.aa&&!e.Ka,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return E(m,Nj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.V]=[],e.l[f.fa]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
|
|
376
|
+
function Nj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:return e=Vd,f=Ta,g=Ua,E(w,Mj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Xd(c.mimeType,d);if(b==e.qa){Oj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&Yd.includes(h))k=!0;l=Zd(c.mimeType,d);if(!k){w.u(4);break}m=Rd(e.V,(d||"").split(","));n=Rd(e.fa,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return E(w,Nj(a,e.V,c,m),6);case 6:return E(w,
|
|
377
|
+
Nj(a,e.fa,c,n),7);case 7:return w.return();case 5:if(p=mc(l))r=p(),a.j[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Cg(a.J);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=Pj);a.s.D(v,"error",function(){var A=a.l[b][0];A.p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.s.D(v,"updateend",function(){return Qj(a,b)});a.h[b]=v;a.G[b]=h;a.Ea[b]=!!c.drmInfos.length;
|
|
378
|
+
H(w)}})}q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
379
379
|
function Oj(a,b,c,d){a.g||(a.g=new pe(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ha;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,re[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)}
|
|
380
380
|
function Rj(a){return a.C?!1:a.m?"ended"==a.m.readyState:!0}function Sj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Td?a=a.g.g:(a=Tj(a,b),a=!a||Li(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Uj(a,b){return a.C?null:b==Td?a.g.h:Mi(Tj(a,b))}function Vj(a,b,c){if(a.C)return 0;if(b==Td)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Tj(a,b);return Oi(a,c)}
|
|
381
|
-
|
|
381
|
+
q.sb=function(){var a={total:this.C?[]:Pi(this.i.buffered),audio:this.C?[]:Pi(Tj(this,"audio")),video:this.C?[]:Pi(Tj(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 Tj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
382
382
|
function Wj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Yd.includes(e))f=Wi(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ca.Yd([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.da&&d.da.timescale){var k=d.da.timescale;if(!isNaN(k)){var l=0,m=!1;(new Kg).box("moof",Rg).box("traf",Rg).R("tfdt",function(n){l=Zi(n.reader,
|
|
383
383
|
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Ej(h)||(a.K?a.K.clearData():a.K=new xj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ca.Yd(h,f,d?d.endTime:null));return g}
|
|
384
|
-
function Xj(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,
|
|
385
|
-
case 6:if(!a.h[b])return F.return();p=a.h[b].timestampOffset;
|
|
386
|
-
C=b==m.fa||!(m.fa in a.h),a.B&&C&&a.ya.resolve(p)));f&&b==m.fa&&(a.g||Oj(a,"application/cea-608",a.B,!1),a.H||(z=
|
|
384
|
+
function Xj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,A,y,C,z,B,D,I;return O(function(F){switch(F.g){case 1:m=Vd;if(b!=m.qa){F.u(2);break}if(!a.B){F.u(3);break}return E(F,a.ya,4);case 4:n=F.h,a.g.s=n;case 3:return E(F,se(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return F.return();case 2:if(l||!a.o){F.u(6);break}return E(F,Xj(a,m.V,c,d,e,f,g,h,k,!0),7);case 7:return E(F,Xj(a,m.fa,c,d,e,f,g,h,k,!0),8);case 8:return F.return();
|
|
385
|
+
case 6:if(!a.h[b])return F.return();p=a.h[b].timestampOffset;r=a.G[b];a.j[b]&&(r=a.j[b].getOriginalMimeType());d&&(u=Wj(a,b,c,d,r,p),null!=u&&(null==a.W&&b==m.fa&&(a.W=u,a.oa=d.startTime,null!=a.P&&(v=0,a.oa==a.na&&(v=a.W-a.P),a.wa.resolve(v))),null==a.P&&b==m.V&&(a.P=u,a.na=d.startTime,null!=a.W&&(w=0,a.oa==a.na&&(w=a.W-a.P),a.wa.resolve(w))),A=d.startTime-u,y=Math.abs(p-A),(.001<=y||g||h)&&(!k||0<A||!p)&&(p=A,a.Fa&&(Yj(a,b,function(){return Zj(a,b)},null),Yj(a,b,function(){return ak(a,b,p)},null))),
|
|
386
|
+
C=b==m.fa||!(m.fa in a.h),a.B&&C&&a.ya.resolve(p)));f&&b==m.fa&&(a.g||Oj(a,"application/cea-608",a.B,!1),a.H||(z=r.split(";",1)[0],a.H=new Hb(z)),d?(B=a.H.i(c),B.length&&we(a.g,B,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.j[b]){F.u(9);break}return E(F,a.j[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=F.h;case 9:c=bk(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.qa){F.u(11);break}if(!g&&!h){F.u(11);break}D=d.startTime;if("HLS"!=a.aa||a.o||b!=m.V||!a.h[m.fa]){F.u(13);break}return E(F,
|
|
387
387
|
a.wa,14);case 14:I=F.h,.1<Math.abs(I)&&(D-=I);case 13:Yj(a,b,function(){return Zj(a,b)},null),Yj(a,b,function(){return ak(a,b,D)},null);case 11:return E(F,Yj(a,b,function(){var J=c;if("video"==b&&a.$){var K=a.$;K.g&&K.g.appendBuffer(J,"video",K.o,-p)}a.h[b].appendBuffer(J)},d?d.M()[0]:null),15);case 15:H(F)}})}function ck(a,b){var c=Uj(a,"video")||0;ue(a.g,b,c)}function dk(a){a.g&&ue(a.g,"",0)}
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Vd,a==e.qa?E(f,d.g.remove(b,c),0):E(f,Yj(d,a,function(){return ek(d,a,b,c)},null),4)):d.o?E(f,Yj(d,e.V,function(){return ek(d,e.V,b,c)},null),0):f.u(0)})};function fk(a,b){var c;return O(function(d){return 1==d.g?(c=Vd,b==c.qa?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,Yj(a,b,function(){return ek(a,b,0,a.m.duration)},null),4)):a.o?E(d,Yj(a,c.V,function(){return ek(a,c.V,0,a.m.duration)},null),0):d.u(0)})}
|
|
389
|
+
q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Vd,a==c.qa?d.return():E(d,Yj(b,a,function(){b.i.currentTime-=.001;Qj(b,a)},null),2)):b.o?E(d,Yj(b,c.V,function(){var e=c.V;b.i.currentTime-=.001;Qj(b,e)},null),0):d.u(0)})};
|
|
390
390
|
function gk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Vd;if(b==l.qa)return f||(a.g.s=c),te(a.g,d,e),p.return();m=[];return E(p,hk(a,b,g,h,k),2)}n=p.h;n||(m.push(Yj(a,b,function(){return Zj(a,b)},null)),a.o&&m.push(Yj(a,l.V,function(){return Zj(a,l.V)},null)));f||(m.push(Yj(a,b,function(){return ak(a,b,c)},null)),a.o&&m.push(Yj(a,l.V,function(){return ak(a,l.V,c)},null)));m.push(Yj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Qj(a,
|
|
391
|
-
b)},null));a.o&&m.push(Yj(a,l.V,function(){var
|
|
392
|
-
function ik(a,b,c){var d;return O(function(e){if(1==e.g){d=Vd;if(b==d.qa)return e.return();b==d.fa&&(a.ya=new $f);Yj(a,b,function(){return Zj(a,b)},null);a.o&&Yj(a,d.V,function(){return Zj(a,d.V)},null);return E(e,Yj(a,b,function(){return ak(a,b,c)},null),2)}return a.o?E(e,Yj(a,d.V,function(){return ak(a,d.V,c)},null),0):e.u(0)})}
|
|
393
|
-
|
|
391
|
+
b)},null));a.o&&m.push(Yj(a,l.V,function(){var r=l.V;a.h[r].appendWindowStart=0;a.h[r].appendWindowEnd=e;a.h[r].appendWindowStart=d;Qj(a,r)},null));return E(p,Promise.all(m),0)})}
|
|
392
|
+
function ik(a,b,c){var d;return O(function(e){if(1==e.g){d=Vd;if(b==d.qa)return e.return();b==d.fa&&(a.ya=new $f);Yj(a,b,function(){return Zj(a,b)},null);a.o&&Yj(a,d.V,function(){return Zj(a,d.V)},null);return E(e,Yj(a,b,function(){return ak(a,b,c)},null),2)}return a.o?E(e,Yj(a,d.V,function(){return ak(a,d.V,c)},null),0):e.u(0)})}q.endOfStream=function(a){var b=this;return O(function(c){return E(c,jk(b,function(){Rj(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
|
|
393
|
+
q.Ua=function(a){var b=this;return O(function(c){return E(c,jk(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new $f,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.ea=a}),0)})};q.getDuration=function(){return this.m.duration};function ek(a,b,c,d){d<=c?Qj(a,b):a.h[b].remove(c,d)}function Zj(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;Qj(a,b)}
|
|
394
394
|
function ak(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Qj(a,b)}function Qj(a,b){if(!a.C){var c=a.l[b][0];c&&(c.p.resolve(),kk(a,b))}}function Yj(a,b,c,d){Cg(a.J);c={start:c,p:new $f,uri:d};a.l[b].push(c);1==a.l[b].length&&lk(a,b);return c.p}
|
|
395
395
|
function jk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Cg(a.J);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new $f,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();xa(l,2);return E(l,Promise.all(c),4);case 4:za(l,3);break;case 2:throw g=Aa(l),g;case 3:return xa(l,5,6),E(l,b(),6);case 6:Ba(l);for(h in a.h)kk(a,h);Da(l,0);break;case 5:throw k=Aa(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
|
|
396
|
-
null);}})}function kk(a,b){a.l[b].shift();lk(a,b)}function lk(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.i.error||"No error in the media element",c.uri)),kk(a,b)}}function bk(a,b,c,d,e){var f=null==c,g=a.
|
|
396
|
+
null);}})}function kk(a,b){a.l[b].shift();lk(a,b)}function lk(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.i.error||"No error in the media element",c.uri)),kk(a,b)}}function bk(a,b,c,d,e){var f=null==c,g=a.Ea[d];c=a.ca.Ch();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Nc(c),f=$c()||Yc()||hd()||Xc()&&md()&&c;f&&"mp4"==ce(a.G[d])&&(b=yi(b,e));return b}
|
|
397
397
|
function mk(a,b,c,d){return Yj(a,b,function(){b!==Td&&(pb()&&(a.j[b]&&(a.j[b].destroy(),delete a.j[b]),d&&(a.j[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Qj(a,b))},null)}
|
|
398
|
-
function nk(a,b){var c,d,e,f,g,h,k,l,m,n,p,
|
|
399
|
-
Promise.all(g),4);case 4:return a.j={},a.h={},w=a.m.duration,a.L=new $f,a.m=Jj(a,a.L),E(K,a.L,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.ea)&&a.ea&&(a.m.duration=a.ea),A=new $f,y=a.m.sourceBuffers,C=b.size,z=0,B=function(){z++;z===C&&(A.resolve(),a.s.
|
|
398
|
+
function nk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J;return O(function(K){switch(K.g){case 1:c=Vd;a.C=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.ua&&(a.i.autoplay=!1);ya(K,2);a.s.nb();g=[];for(h in a.j)g.push(a.j[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(ye)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(G){}}return E(K,
|
|
399
|
+
Promise.all(g),4);case 4:return a.j={},a.h={},w=a.m.duration,a.L=new $f,a.m=Jj(a,a.L),E(K,a.L,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.ea)&&a.ea&&(a.m.duration=a.ea),A=new $f,y=a.m.sourceBuffers,C=b.size,z=0,B=function(){z++;z===C&&(A.resolve(),a.s.Hb(y,"addsourcebuffer",B))},a.s.D(y,"addsourcebuffer",B),D=t(b.keys()),I=D.next();case 6:if(I.done)return a.i.currentTime=d,E(K,A,2);F=I.value;J=b.get(F);return E(K,Nj(a,F,J,J.codecs),9);case 9:a.o?(a.l[c.V]=[],a.l[c.fa]=[]):a.l[F]=[];I=D.next();
|
|
400
400
|
K.u(6);break;case 2:Ba(K),a.C=!1,Cg(a.J),a.s.sa(a.i,"canplaythrough",function(){a.J.g||(a.i.autoplay=e,f||a.i.play())}),Da(K,0)}})}function ok(a,b){return jk(a,function(){return nk(a,b)})}
|
|
401
|
-
function hk(a,b,c,d,e){var f,g,h,k,l,m,n,p,
|
|
401
|
+
function hk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){if(1==z.g){f=Vd;if(b==f.qa)return z.return(!1);g=de(me(a.G[b]));h=le(a.G[b]);l=!1;m=Xd(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&Yd.includes(m))n=!0;n&&(p=Zd(c,d),r=mc(p))&&(k=r(),u=Rd(f.V,(d||"").split(",")),v=Rd(f.fa,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.V&&(w=u),m=k.convertCodecs(b,Zd(c,w))):m=k.convertCodecs(b,p));A=de(me(m));y=le(m);if(g===A&&h===y)return a.j[b]&&!k?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&k?a.j[b]=
|
|
402
402
|
k:k&&(a.j[b]&&a.j[b].transmux!=k.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=k):k.destroy()),z.return(!1);C=!0;if(a.o||l&&k&&!a.j[b])C=!1;if(C&&"smooth"===a.A.codecSwitchingStrategy&&pb())return E(z,mk(a,b,m,k),3);k&&k.destroy();return E(z,ok(a,e),3)}return z.return(!0)})}
|
|
403
|
-
function pk(a,b,c,d){if(b==Td)var e=!1;else{e=de(me(a.G[b]));var f=le(a.G[b]),g=Xd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Yd.includes(g))h=!0;c=Zd(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=de(me(g));g=le(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var Lj=window.URL.createObjectURL,Pj="sequence";function qk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
qk.prototype.isInProgress=qk.prototype.cc;qk.prototype.isLive=qk.prototype.U;qk.prototype.offset=qk.prototype.offset;qk.prototype.notifyMaxSegmentDuration=qk.prototype.hf;qk.prototype.notifyMinSegmentStartTime=qk.prototype.Ud;qk.prototype.getInitialProgramDateTime=qk.prototype.
|
|
410
|
-
qk.prototype.getDelay=qk.prototype.
|
|
403
|
+
function pk(a,b,c,d){if(b==Td)var e=!1;else{e=de(me(a.G[b]));var f=le(a.G[b]),g=Xd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Yd.includes(g))h=!0;c=Zd(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=de(me(g));g=le(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var Lj=window.URL.createObjectURL,Pj="sequence";function qk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}q=qk.prototype;q.getDuration=function(){return this.j};q.Fh=function(){return this.g};q.Ng=function(a){this.i=a};q.Ua=function(a){this.j=a};q.Kh=function(){return this.i};q.Lg=function(a){this.A=a};q.jc=function(a){this.F=a};q.ge=function(a){this.m=a};q.Dd=function(){return this.m};q.Cf=function(a){this.s=a};q.xh=function(){return this.s};
|
|
404
|
+
q.yg=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.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
405
|
+
q.fd=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.C&&!this.o&&(this.i=d-this.h-this.g)}};q.Md=function(){this.o=!0};q.di=function(){return this.o};q.Mg=function(a){this.B=a};q.Bh=function(){return this.B};
|
|
406
|
+
q.Ud=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.hf=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.F};q.cc=function(){return Infinity!=this.j&&!this.F};q.ib=function(){return Math.max(this.G,this.Kb()-this.m)};q.Rg=function(a){this.G=a};
|
|
407
|
+
q.Kb=function(){return this.U()||this.cc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};q.Vc=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Kb()-this.m+a,this.ub()))};q.Ab=function(){return this.Vc(0)};q.ub=function(){return Math.max(0,this.Kb()-(this.U()||this.cc()?this.s:0))};q.Xg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
|
|
408
|
+
q.Kg=function(a){this.H=a};S("shaka.media.PresentationTimeline",qk);qk.prototype.setAvailabilityTimeOffset=qk.prototype.Kg;qk.prototype.usingPresentationStartTime=qk.prototype.Xg;qk.prototype.getSeekRangeEnd=qk.prototype.ub;qk.prototype.getSeekRangeStart=qk.prototype.Ab;qk.prototype.getSafeSeekRangeStart=qk.prototype.Vc;qk.prototype.getSegmentAvailabilityEnd=qk.prototype.Kb;qk.prototype.setUserSeekStart=qk.prototype.Rg;qk.prototype.getSegmentAvailabilityStart=qk.prototype.ib;
|
|
409
|
+
qk.prototype.isInProgress=qk.prototype.cc;qk.prototype.isLive=qk.prototype.U;qk.prototype.offset=qk.prototype.offset;qk.prototype.notifyMaxSegmentDuration=qk.prototype.hf;qk.prototype.notifyMinSegmentStartTime=qk.prototype.Ud;qk.prototype.getInitialProgramDateTime=qk.prototype.Bh;qk.prototype.setInitialProgramDateTime=qk.prototype.Mg;qk.prototype.isStartTimeLocked=qk.prototype.di;qk.prototype.lockStartTime=qk.prototype.Md;qk.prototype.notifySegments=qk.prototype.fd;qk.prototype.notifyTimeRange=qk.prototype.yg;
|
|
410
|
+
qk.prototype.getDelay=qk.prototype.xh;qk.prototype.setDelay=qk.prototype.Cf;qk.prototype.getSegmentAvailabilityDuration=qk.prototype.Dd;qk.prototype.setSegmentAvailabilityDuration=qk.prototype.ge;qk.prototype.setStatic=qk.prototype.jc;qk.prototype.setClockOffset=qk.prototype.Lg;qk.prototype.getPresentationStartTime=qk.prototype.Kh;qk.prototype.setDuration=qk.prototype.Ua;qk.prototype.setPresentationStartTime=qk.prototype.Ng;qk.prototype.getMaxSegmentDuration=qk.prototype.Fh;
|
|
411
411
|
qk.prototype.getDuration=qk.prototype.getDuration;function rk(a,b,c){this.j=c;this.l=a;this.s=sk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}rk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function tk(a,b){a.i=b}function uk(a){this.g=a}function sk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Pi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function vk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new hb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return wk(f)});this.m=(new Tc(function(){wk(f)})).Va(this.s.gapJumpTimerTime)}vk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};vk.prototype.lf=function(){this.o=!0;wk(this)};
|
|
412
412
|
function wk(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=sk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Qi(c,b,a.s.gapDetectionThreshold),
|
|
413
413
|
null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Yc())e=Math.ceil(100*(e+.01))/100;e>=a.B.ub()||.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 xk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=yk.value().get(b),c.sa(a,b,d))}var yk=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function zk(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 Ak(a);xk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Bk(e,e.j())})}zk.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 Ck(a){return a.o?a.g.currentTime:a.j()}
|
|
414
414
|
function Dk(a,b){0<a.g.readyState?Ek(a.i,b):xk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Bk(a,a.j())})}function Bk(a,b){.001>Math.abs(a.g.currentTime-b)?Fk(a):(a.h.sa(a.g,"seeking",function(){Fk(a)}),Ek(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Fk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
415
|
-
function Ak(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Tc(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--)})}Ak.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Ek(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Va(.1)};function Gk(a){this.h=a;this.j=!1;this.g=null;this.i=new hb}
|
|
416
|
-
|
|
415
|
+
function Ak(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Tc(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--)})}Ak.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Ek(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Va(.1)};function Gk(a){this.h=a;this.j=!1;this.g=null;this.i=new hb}q=Gk.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.sa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;xk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.qe=function(a){this.g=this.j?this.g:a};
|
|
416
|
+
q.nd=function(){return(this.j?this.h.currentTime:this.g)||0};q.Uf=function(){return 0};q.Tf=function(){return 0};q.xg=function(){};
|
|
417
417
|
function Hk(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=Ik(a,c,f);this.j=new vk(a,b.presentationTimeline,c,this.o,f);this.h=new zk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Ck(g.h);h=Jk(g,k);if(.001<Math.abs(h-k)){k=!1;if(!fd()||fd()&&nd())k=!0;else{var l=Date.now()/1E3;if(!g.s||g.s<l-1)g.s=l,k=!0}if(k){Dk(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},
|
|
418
|
-
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.
|
|
419
|
-
|
|
420
|
-
function Jk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.
|
|
421
|
-
function Ik(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new rk(new uk(a),b.stallThreshold,c);tk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Mk(a){this.g=a;this.m=null;this.
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
418
|
+
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Ab():g.g.ub():0>h&&(h=g.g.ub()+h);return Kk(g,Lk(g,h))});this.m=new Tc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ck(g.h),k=g.g.Ab(),l=g.g.ub();3>l-k&&(k=l-3);h<k&&(h=Jk(g,h),g.i.currentTime=h)}})}q=Hk.prototype;q.ready=function(){this.m.Va(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};
|
|
419
|
+
q.qe=function(a){Dk(this.h,a)};q.nd=function(){var a=Ck(this.h);return 0<this.i.readyState&&!this.i.paused?Lk(this,a):a};q.Uf=function(){return this.o?this.o.o:0};q.Tf=function(){return this.j.C};q.xg=function(){this.j.lf()};function Kk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
420
|
+
function Jk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ab(),f=a.g.ub(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Vc(c),k=a.g.Vc(d);c=a.g.Vc(c+d);return b>=g?Kk(a,b):b>f?f:b<e?Ni(a.i.buffered,k)?k:c:b>=h||Ni(a.i.buffered,b)?b:c}function Lk(a,b){var c=a.g.Ab();if(b<c)return c;a=a.g.ub();return b>a?a:b}
|
|
421
|
+
function Ik(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new rk(new uk(a),b.stallThreshold,c);tk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Mk(a){this.g=a;this.m=null;this.i=0;this.o=!1}q=Mk.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.ji=function(){this.o=!0};q.Tb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
422
|
+
q.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};q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.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
|
+
q.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))}};q.ed=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)};q.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}};
|
|
424
|
+
q.uc=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 Hi(a.startTime,b,a.C,a.Da,a.pa,a.da,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
|
+
q.ie=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Tc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Va(a))};Mk.prototype[Symbol.iterator]=function(){return this.zb(0)};
|
|
426
426
|
Mk.prototype.zb=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 $a("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Nk(this,d,f,c)};function Ok(a,b,c){a=new Hi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Mk([a])}
|
|
427
|
-
S("shaka.media.SegmentIndex",Mk);Mk.forSingleSegment=Ok;Mk.prototype.getIteratorForTime=Mk.prototype.zb;Mk.prototype.updateEvery=Mk.prototype.ie;Mk.prototype.fit=Mk.prototype.uc;Mk.prototype.evict=Mk.prototype.
|
|
428
|
-
Mk.prototype.getNumReferences=Mk.prototype.getNumReferences;function Nk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Nk.prototype.
|
|
429
|
-
Nk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Nk);Nk.prototype.next=Nk.prototype.next;Nk.prototype.current=Nk.prototype.current;Nk.prototype.currentPosition=Nk.prototype.
|
|
430
|
-
Nk.prototype.setReverse=Nk.prototype.
|
|
431
|
-
|
|
432
|
-
|
|
427
|
+
S("shaka.media.SegmentIndex",Mk);Mk.forSingleSegment=Ok;Mk.prototype.getIteratorForTime=Mk.prototype.zb;Mk.prototype.updateEvery=Mk.prototype.ie;Mk.prototype.fit=Mk.prototype.uc;Mk.prototype.evict=Mk.prototype.Ca;Mk.prototype.mergeAndEvict=Mk.prototype.ed;Mk.prototype.offset=Mk.prototype.offset;Mk.prototype.get=Mk.prototype.get;Mk.prototype.find=Mk.prototype.find;Mk.prototype.markImmutable=Mk.prototype.ji;Mk.prototype.release=Mk.prototype.release;Mk.prototype.getNumEvicted=Mk.prototype.getNumEvicted;
|
|
428
|
+
Mk.prototype.getNumReferences=Mk.prototype.getNumReferences;function Nk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Nk.prototype.Ic=function(a){this.reverse=a};Nk.prototype.rh=function(){return this.h};Nk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
429
|
+
Nk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Nk);Nk.prototype.next=Nk.prototype.next;Nk.prototype.current=Nk.prototype.current;Nk.prototype.currentPosition=Nk.prototype.rh;
|
|
430
|
+
Nk.prototype.setReverse=Nk.prototype.Ic;function Pk(){Mk.call(this,[]);this.h=[]}qa(Pk,Mk);q=Pk.prototype;q.clone=function(){var a=new Pk;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.Tb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Tb(a)};
|
|
431
|
+
q.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};q.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};q.offset=function(){};q.Qd=function(){};
|
|
432
|
+
q.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()};q.ed=function(){};q.uc=function(){};q.ie=function(){};S("shaka.media.MetaSegmentIndex",Pk);Pk.prototype.updateEvery=Pk.prototype.ie;Pk.prototype.fit=Pk.prototype.uc;Pk.prototype.mergeAndEvict=Pk.prototype.ed;Pk.prototype.evict=Pk.prototype.Ca;Pk.prototype.merge=Pk.prototype.Qd;Pk.prototype.offset=Pk.prototype.offset;
|
|
433
|
+
Pk.prototype.get=Pk.prototype.get;Pk.prototype.find=Pk.prototype.find;Pk.prototype.forEachTopLevelReference=Pk.prototype.Tb;Pk.prototype.release=Pk.prototype.release;function Qk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Cd();this.h=new Tc(function(){b.g.wg(.25*b.i)})}Qk.prototype.release=function(){this.set(this.Wb());this.h&&(this.h.stop(),this.h=null);this.g=null};Qk.prototype.set=function(a){this.i=a;Rk(this)};Qk.prototype.Wb=function(){return this.g.Wb()};function Rk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Cd()!=b&&a.g.Ff(b);return}catch(c){}a.h.Va(.25);0!=a.g.Cd()&&a.g.Ff(0)};function Sk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Tc(function(){Tk(b,!1)})).Va(.25)}Sk.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 Tk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Uk(){this.g=null;this.h=[]}function Vk(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 Wk(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 Xk(){this.i=this.h=null;this.g=[]}function Yk(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 Zk(){this.Rb=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 Uk;this.h=new Xk};function $k(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 al(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
433
434
|
function bl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.zb(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.$b()&&(c=!1);c&&b.da&&cl(a,b.da);c&&!a.h.has(b)&&(c=new dl(a.l),el(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.gd&&b.Ld)break}fl(a)}}function cl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Gi(d,b)})){var c=new dl(a.l);el(c,b,a.i);a.j.set(b,c)}}
|
|
434
|
-
function gl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&hl(a,c)}function il(a){gl(a,a.h);gl(a,a.j);a.g=null}$k.prototype.
|
|
435
|
-
function fl(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 Gi(g.da,f.We)}}(e))||hl(a,e.We)}function jl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&hl(a,d)}fl(a)}function kl(a,b){b&&b!==a.i&&(il(a),a.i=b)}function hl(a,b){var c=a.h;b instanceof
|
|
435
|
+
function gl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&hl(a,c)}function il(a){gl(a,a.h);gl(a,a.j);a.g=null}$k.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&&hl(this,d);b&&fl(this)};$k.prototype.Ic=function(a){this.o=a;this.g&&this.g.Ic(a)};
|
|
436
|
+
function fl(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 Gi(g.da,f.We)}}(e))||hl(a,e.We)}function jl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&hl(a,d)}fl(a)}function kl(a,b){b&&b!==a.i&&(il(a),a.i=b)}function hl(a,b){var c=a.h;b instanceof Ci&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function dl(a){this.g=a;this.Zd=this.If=null}
|
|
436
437
|
function el(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=Md(d,e):d=e,a.If?E(f,a.If(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}dl.prototype.abort=function(){this.Zd&&this.Zd.abort()};function ll(a){jg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Tc(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)}qa(ll,jg);ll.prototype.release=function(){this.g.clear();this.h.stop();jg.prototype.release.call(this)};function ml(a){jg.call(this);this.g=new Map;this.h=a}qa(ml,jg);ml.prototype.release=function(){this.g.clear();jg.prototype.release.call(this)};function nl(a,b){var c=a.g.get(b);c||(c={jd:[],ag:null,contentType:b},a.g.set(b,c));return c}function ol(a,b,c){var d=nl(a,b.contentType);pl(a,d);a={gf:b,position:c};d=d.jd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
437
438
|
ml.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.jd;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.ag,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);
|
|
438
|
-
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.ag=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function pl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.jd;b.jd=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.jd=[]};function ql(a,b,c,d,e){a=rg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function rl(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.F=new Map;this.B=1;this.s=this.j=null;this.J=0;this.G=!1;this.i=new Map;this.C=!1;this.K=null;this.A=!1;this.m=new Bg(function(){return sl(c)});this.L=Date.now()/1E3;this.o=new Map;this.H={projection:null,hfov:null};this.P=0;this.N=Infinity}
|
|
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.ag=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function pl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.jd;b.jd=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.jd=[]};function ql(a,b,c,d,e){a=rg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function rl(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.F=new Map;this.B=1;this.s=this.j=null;this.J=0;this.G=!1;this.i=new Map;this.C=!1;this.K=null;this.A=!1;this.m=new Bg(function(){return sl(c)});this.L=Date.now()/1E3;this.o=new Map;this.H={projection:null,hfov:null};this.P=0;this.N=Infinity}q=rl.prototype;q.destroy=function(){return this.m.destroy()};
|
|
439
440
|
function sl(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,tl(e),b.push(ul(e)),e.T&&(il(e.T),e.T=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,il(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;H(k)})}
|
|
440
|
-
|
|
441
|
+
q.configure=function(a){this.h=a;this.K=new Xf({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&&(il(b.T),b.T=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,il(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Td))&&
|
|
441
442
|
b.T&&(il(b.T),b.T=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.T&&(il(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?(jl(c.T,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(il(c.T),c.T=null)):0<a.segmentPrefetchLimit&&(c.T=vl(this,c.stream));a.disableAudioPrefetch||wl(this)};function xl(a,b,c){a.l.presentationTimeline.U()||(a.P=b,a.N=c)}
|
|
442
|
-
|
|
443
|
-
function Cl(a){var b=a.i.get(Td);b&&(tl(b),ul(b).catch(function(){}),a.i.delete(Td));a.s=null}function Dl(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.ga&&e.ga.
|
|
443
|
+
q.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,yl(b,a||new Map),2);Cg(b.m);b.C=!0;H(c)})};function zl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Vd,a.J++,d=a.J,xa(l,2),E(l,fk(a.g.Y,c.qa),4);case 4:za(l,3);break;case 2:if(e=Aa(l),a.g)a.g.onError(e);case 3:f=Xd(b.mimeType,b.codecs),Oj(a.g.Y,f,a.l.sequenceMode,b.external),g=a.g.Y.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.J==d&&(k=Al(a,b),a.i.set(c.qa,k),Bl(a,k,0)),H(l)}})}
|
|
444
|
+
function Cl(a){var b=a.i.get(Td);b&&(tl(b),ul(b).catch(function(){}),a.i.delete(Td));a.s=null}function Dl(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.ga&&e.ga.Ic(c),e.T&&e.T.Ic(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Ic(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Mb&&(El(a,b,!1,0,!1),c.Mb=d);else if(b=c.Mb)c.Mb=null,El(a,b,!0,0,!1)}
|
|
444
445
|
function Fl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.C&&(b.video&&El(a,b.video,c,d,e,f),b.audio&&El(a,b.audio,c,d,e,f))}function Gl(a,b){O(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();El(a,b,!0,0,!1);H(c)})}function Hl(a,b){for(var c=t(a.F.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.F.delete(d))}}
|
|
445
|
-
function El(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Td?g&&(g.Mb&&(b.trickModeVideo?(g.Mb=b,b=b.trickModeVideo):g.Mb=null),g.stream!=b||e)&&(a.o.has(b)?g.T=a.o.get(b):g.T&&kl(g.T,b),b.type==Td&&(e=Xd(b.mimeType,b.codecs),Oj(a.g.Y,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.
|
|
446
|
-
g.oe=!0):(tl(g),Il(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.
|
|
447
|
-
function Jl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Bd();var g=Uj(a.g.Y,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.
|
|
446
|
+
function El(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Td?g&&(g.Mb&&(b.trickModeVideo?(g.Mb=b,b=b.trickModeVideo):g.Mb=null),g.stream!=b||e)&&(a.o.has(b)?g.T=a.o.get(b):g.T&&kl(g.T,b),b.type==Td&&(e=Xd(b.mimeType,b.codecs),Oj(a.g.Y,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ia?(e="("+g.type+":"+g.stream.id+")",a.F.has(e)||a.F.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.ga=null,g.Vf=!!f,c?g.Lc?g.oe=!0:g.Ia?(g.Qb=!0,g.ud=d,
|
|
447
|
+
g.oe=!0):(tl(g),Il(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ia||g.pb||Bl(a,g,0),Jl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):zl(a,b)}
|
|
448
|
+
function Jl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Bd();var g=Uj(a.g.Y,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.da)&&(h+=(k.pa?k.pa-k.Da:null)||0),k=a.g.getBandwidthEstimate(),
|
|
448
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();H(e)})}
|
|
449
|
-
|
|
450
|
-
function Kl(a,b){b.
|
|
450
|
+
q.Gc=function(){if(this.g)for(var a=this.g.Bd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.Y;e.C?e=!1:d==Td?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Tj(e,d),e=Ni(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.ga=null;(null!=Uj(this.g.Y,d)||c.Ia)&&Kl(this,c);c.eb&&(c.eb.abort(),c.eb=null);d===Td&&(d=this.g.Y,d.H&&d.H.g());c.Gc=!0}}};
|
|
451
|
+
function Kl(a,b){b.Lc||b.Qb||(b.Ia?(b.Qb=!0,b.ud=0):null==Sj(a.g.Y,b.type)?null==b.pb&&Bl(a,b,0):(tl(b),Il(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
451
452
|
function yl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Vd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.V,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.qa,a.s),e.add(a.s));f=a.g.Y;return E(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Cg(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=Al(a,l),b.has(l.id)&&(n=
|
|
452
|
-
b.get(l.id),al(n,function(
|
|
453
|
-
function vl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Td&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Td&&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 $k(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ll(d,e,f||null,a.h.retryParameters,a.g.
|
|
453
|
+
b.get(l.id),al(n,function(r,u,v){return Ll(r,u,v||null,a.h.retryParameters,a.g.Db)}),m.T=n),a.i.set(k,m),Bl(a,m,0));H(p)})}function Al(a,b){return{stream:b,type:b.type,ga:null,T:vl(a,b),Ma:null,dc:null,df:null,bf:null,af:null,Mb:null,endOfStream:!1,Ia:!1,pb:null,Qb:!1,ud:0,oe:!1,Lc:!1,Gc:!0,tf:!1,Zc:!1,eb:null}}
|
|
454
|
+
function vl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Td&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Td&&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 $k(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ll(d,e,f||null,a.h.retryParameters,a.g.Db)},0>a.g.Za()):null}
|
|
454
455
|
function wl(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),jl(e,b),!(0<b&&c.some(function(h){return function(k){return Be(h.gb.audio.language,k)}}(f)))){var g=a.i.get(f.gb.audio.type);e!==(g&&g.T)&&il(e);a.o.delete(f.gb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Be(h.gb.audio.language,k)}}(f))||!(e=vl(a,f.gb.audio))||
|
|
455
|
-
(f.gb.audio.segmentIndex||f.gb.audio.createSegmentIndex(),a.o.set(f.gb.audio,e))}
|
|
456
|
-
function Ml(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Cg(a.m);if(b.
|
|
456
|
+
(f.gb.audio.segmentIndex||f.gb.audio.createSegmentIndex(),a.o.set(f.gb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.Y.Ua(a):this.g.Y.Ua(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
457
|
+
function Ml(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Cg(a.m);if(b.Ia||null==b.pb||b.Lc)return h.return();b.pb=null;if(!b.Qb){h.u(2);break}return E(h,Il(a,b,b.oe,b.ud),3);case 3:return h.return();case 2:Hl(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||Bl(a,b,0),h.return();case 4:xa(h,6);d=Nl(a,b);null!=d&&(Bl(a,b,d),b.Zc=!1);za(h,7);break;case 6:return e=
|
|
457
458
|
Aa(h),E(h,Ol(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.Y.endOfStream(),10);case 10:Cg(a.m),g=a.g.Y.getDuration(),0!=g&&g<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Ua(g),H(h)}})}
|
|
458
|
-
function Nl(a,b){if(Pl(b))return ck(a.g.Y,b.stream.originalId||""),null;b.type==Td&&dk(a.g.Y);if(!a.g.Y.xa&&b.type!=Td)return a.h.updateIntervalSeconds/2;var c=a.g.Bd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.
|
|
459
|
-
!0,"video"==b.type&&(a=a.i.get(Td))&&Pl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.ga;e=Ql(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.Vf&&(f=!0,b.Vf=!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,Pl(k)||k.ga&&!k.ga.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.ga&&!a.o.has(b.stream)&&(b.T.
|
|
459
|
+
function Nl(a,b){if(Pl(b))return ck(a.g.Y,b.stream.originalId||""),null;b.type==Td&&dk(a.g.Y);if(!a.g.Y.xa&&b.type!=Td)return a.h.updateIntervalSeconds/2;var c=a.g.Bd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ca(c,!0),bl(e,c);d=b.Ma?b.Ma.endTime:c;var f=Vj(a.g.Y,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=Uj(a.g.Y,b.type);if(1E-6>h&&e)return b.endOfStream=
|
|
460
|
+
!0,"video"==b.type&&(a=a.i.get(Td))&&Pl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.ga;e=Ql(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.Vf&&(f=!0,b.Vf=!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,Pl(k)||k.ga&&!k.ga.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.ga&&!a.o.has(b.stream)&&(b.T.Ca(e.startTime),bl(b.T,
|
|
460
461
|
e.startTime));Rl(a,b,c,e,f).catch(function(){});return null}function Ql(a,b,c,d){if(b.ga)return b.ga.current();if(b.Ma||d)return b.ga=b.stream.segmentIndex.zb(b.Ma?b.Ma.endTime:d,!1,0>a.g.Za()),b.ga&&b.ga.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.ga=b.stream.segmentIndex.zb(e,!1,a),f=b.ga&&b.ga.next().value);f||(b.ga=b.stream.segmentIndex.zb(c,!1,a),f=b.ga&&b.ga.next().value);return f}
|
|
461
|
-
function Rl(a,b,c,d,e){var f,g,h,k,l,m,n,p,
|
|
462
|
-
if(a.A)return G.return();xa(G,2);p=Tl(p,D);I=!1;F=0;(new Kg).box("mdat",function(M){F=M.size+M.start;I=!0}).parse(p,!1,!0);if(!I){G.u(4);break}J=p.subarray(0,F);p=p.subarray(F);return E(G,Ul(a,b,c,g,d,J,!0,e),5);case 5:b.T&&b.ga&&bl(b.T,d.startTime,!0);case 4:za(G,0);break;case 2:
|
|
463
|
-
break}
|
|
464
|
-
z.code)Wl(a,b,z),B.u(0);else return b.
|
|
465
|
-
function Tl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Wl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.tf})){if(a.g.wd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.
|
|
466
|
-
function Sl(a,b,c,d){var e,f,g,h,k,l,m,n,p,
|
|
467
|
-
break}return E(B,ul(
|
|
462
|
+
function Rl(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:f=Vd;g=b.stream;h=b.ga;b.Ia=!0;xa(B,2);if(2==d.$b())throw new T(1,1,1011);return E(B,Sl(a,b,d,e),4);case 4:Cg(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=r=!1,w=function(D){var I,F,J,K;return O(function(G){switch(G.g){case 1:if(r)return G.return();u=!0;Cg(a.m);
|
|
463
|
+
if(a.A)return G.return();xa(G,2);p=Tl(p,D);I=!1;F=0;(new Kg).box("mdat",function(M){F=M.size+M.start;I=!0}).parse(p,!1,!0);if(!I){G.u(4);break}J=p.subarray(0,F);p=p.subarray(F);return E(G,Ul(a,b,c,g,d,J,!0,e),5);case 5:b.T&&b.ga&&bl(b.T,d.startTime,!0);case 4:za(G,0);break;case 2:v=K=Aa(G),H(G)}})},E(B,Vl(a,b,d,w),9);m=Vl(a,b,d);return E(B,m,7);case 7:n=B.h;Cg(a.m);if(a.A)return B.return();Cg(a.m);return b.Qb?(b.Ia=!1,Bl(a,b,0),B.return()):E(B,Ul(a,b,c,g,d,n,!1,e),6);case 9:A=B.h;if(v)throw v;if(u){B.u(10);
|
|
464
|
+
break}r=!0;Cg(a.m);return a.A?B.return():b.Qb?(b.Ia=!1,Bl(a,b,0),B.return()):E(B,Ul(a,b,c,g,d,A,!1,e),10);case 10:b.T&&b.ga&&bl(b.T,d.startTime,!0);case 6:Cg(a.m);if(a.A)return B.return();b.Ma=d;h.next();b.Ia=!1;b.tf=!1;y=a.g.Y.sb();C=y[b.type];eb(JSON.stringify(C));b.Qb||a.g.lf(d,b.stream);Bl(a,b,0);za(B,0);break;case 2:z=Aa(B);Cg(a.m,z);if(a.A)return B.return();b.Ia=!1;if(7001==z.code)b.Ia=!1,tl(b),Bl(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==
|
|
465
|
+
z.code)Wl(a,b,z),B.u(0);else return b.Zc=!0,1==z.category&&b.T&&hl(b.T,d),z.severity=2,E(B,Ol(a,b,z),0)}})}function Xl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=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))})}
|
|
466
|
+
function Tl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Wl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.tf})){if(a.g.wd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.Zc=!0;a.A=!0;a.g.onError(c);return}b.tf=!0}Bl(a,b,4)}
|
|
467
|
+
function Sl(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:e=Vd;f=null==b.Ma&&null==b.dc;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.P)-.1);k=Math.min(c.appendWindowEnd,a.N)+.01;l=c.codecs||b.stream.codecs;m=ke(l);n=le(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.df&&h==b.bf&&k==b.af&&m==b.cf&&n==b.sg){B.u(2);break}r=b.cf&&b.sg&&pk(a.g.Y,b.type,n,l);if(!r){B.u(3);break}u=null;b.type===e.fa?u=a.i.get(e.V):b.type===e.V&&(u=a.i.get(e.fa));if(!u){B.u(3);
|
|
468
|
+
break}return E(B,ul(u).catch(function(){}),5);case 5:u.dc=null,Kl(a,u);case 3:return v=function(){var D,I,F;return O(function(J){if(1==J.g)return D=new Map,a.j.audio&&D.set(e.V,a.j.audio),a.j.video&&D.set(e.fa,a.j.video),xa(J,2),b.bf=h,b.af=k,b.cf=m,b.sg=n,b.df=p,I=a.l.sequenceMode||"HLS"==a.l.type,E(J,gk(a.g.Y,b.type,p,h,k,I,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,D),4);if(2!=J.g)return za(J,0);F=Aa(J);b.bf=null;b.af=null;b.cf=null;b.df=null;throw F;})},E(B,v(),2);case 2:return Gi(c.da,
|
|
468
469
|
b.dc)||(b.dc=c.da,c.l&&c.da&&(w=Vl(a,b,c.da),A=function(){var D,I,F,J,K,G,M;return O(function(N){switch(N.g){case 1:return xa(N,2),E(N,w,4);case 4:return D=N.h,Cg(a.m),I=null,F=new Map,J={projection:null,hfov:null},K=new Kg,K.box("moov",Rg).box("trak",Rg).box("mdia",Rg).R("mdhd",function(L){I=$i(L.reader,L.version).timescale}).box("hdlr",function(L){L=L.reader;L.skip(8);switch(L.fc()){case "soun":F.set(e.V,I);break;case "vide":F.set(e.fa,I)}I=null}).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).box("encv",
|
|
469
|
-
Ug).box("avc1",Ug).box("avc3",Ug).box("hev1",Ug).box("hvc1",Ug).box("dvav",Ug).box("dva1",Ug).box("dvh1",Ug).box("dvhe",Ug).box("vexu",Rg).box("proj",Rg).R("prji",function(L){L=L.reader.fc();J.projection=L}).box("hfov",function(L){L=L.reader.O()/1E3;J.hfov=L}).parse(D),Yl(a,J),F.has(b.type)?c.da.timescale=F.get(b.type):null!=I&&(c.da.timescale=I),G=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(N,a.g.Yf(b.type,D),5);case 5:return E(N,Xj(a.g.Y,b.type,D,null,b.stream,G,b.
|
|
470
|
-
0);break;case 2:throw M=Aa(N),b.dc=null,M;}})},y=c.startTime,f&&(C=Uj(a.g.Y,b.type),null!=C&&(y=C)),a.g.
|
|
471
|
-
function Ul(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(
|
|
472
|
-
|
|
473
|
-
w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=Wi(
|
|
474
|
-
|
|
475
|
-
function Pl(a){return a&&a.type==Td&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
476
|
-
function Vl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.
|
|
477
|
-
function Ll(a,b,c,d,e){var f=a instanceof Hi?a:void 0,g=f?1:0;a=ql(a.M(),a.
|
|
478
|
-
function Il(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Qb=!1,b.oe=!1,b.ud=0,b.
|
|
470
|
+
Ug).box("avc1",Ug).box("avc3",Ug).box("hev1",Ug).box("hvc1",Ug).box("dvav",Ug).box("dva1",Ug).box("dvh1",Ug).box("dvhe",Ug).box("vexu",Rg).box("proj",Rg).R("prji",function(L){L=L.reader.fc();J.projection=L}).box("hfov",function(L){L=L.reader.O()/1E3;J.hfov=L}).parse(D),Yl(a,J),F.has(b.type)?c.da.timescale=F.get(b.type):null!=I&&(c.da.timescale=I),G=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(N,a.g.Yf(b.type,D),5);case 5:return E(N,Xj(a.g.Y,b.type,D,null,b.stream,G,b.Gc,d),6);case 6:za(N,
|
|
471
|
+
0);break;case 2:throw M=Aa(N),b.dc=null,M;}})},y=c.startTime,f&&(C=Uj(a.g.Y,b.type),null!=C&&(y=C)),a.g.li(y,c.da),g.push(A()))),a.l.sequenceMode&&(z=b.Ma?b.Ma.i:null,c.i!=z&&g.push(ik(a.g.Y,b.type,c.startTime))),E(B,Promise.all(g),0)}})}
|
|
472
|
+
function Ul(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(r){switch(r.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.G;if(m||n)l=new Kg;m&&l.R("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.fc();var A=u.reader.fc();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=
|
|
473
|
+
u.reader.O(),D=u.reader.Ec()/y+e.timestampOffset,C=D-e.startTime,z=u.reader.O(),B=u.reader.O(),w=u.reader.fc(),A=u.reader.fc();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.mi():(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"!=
|
|
474
|
+
w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=Wi(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.G&&e.da.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.da.timescale*1E3)});v=new U("prft",
|
|
475
|
+
v);a.g.onEvent(v);a.G=!0}});(m||n)&&l.parse(f);return E(r,Zl(a,b,c),2);case 2:return Cg(a.m),p=b.Gc,b.Gc=!1,E(r,a.g.Yf(b.type,f),3);case 3:return E(r,Xj(a.g.Y,b.type,f,e,d,k,p,h,g),4);case 4:Cg(a.m),H(r)}})}
|
|
476
|
+
function Zl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof Pk&&d.Ca(a.l.presentationTimeline.Ab());e=Math.max(a.h.bufferBehind,a.l.presentationTimeline.g);f=Sj(a.g.Y,b.type);if(null==f)return k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():E(k,a.g.Y.remove(b.type,f,f+h),2)}Cg(a.m);H(k)})}function Pl(a){return a&&a.type==Td&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
477
|
+
function Vl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Wc())return l.return(e);f=null;if(b.T){var m=b.T,n=m.h;c instanceof Ci&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.If=d),f=m.Zd):f=null}f||(f=Ll(c,b.stream,d||null,a.h.retryParameters,a.g.Db));g=0;b.ga&&(g=b.ga.h);b.eb=f;return E(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Xl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
478
|
+
function Ll(a,b,c,d,e){var f=a instanceof Hi?a:void 0,g=f?1:0;a=ql(a.M(),a.Da,a.pa,d,c);a.contentType=b.type;return e.request(xg,a,{type:g,stream:b,segment:f})}
|
|
479
|
+
function Il(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Qb=!1,b.oe=!1,b.ud=0,b.Lc=!0,b.Ma=null,b.ga=null,b.T&&!a.o.has(b.stream)&&il(b.T),d?(e=a.g.Bd(),f=a.g.Y.getDuration(),E(g,a.g.Y.remove(b.type,e+d,f),3)):E(g,fk(a.g.Y,b.type),4);if(3!=g.g)return Cg(a.m),c?E(g,a.g.Y.flush(b.type),3):g.u(3);Cg(a.m);b.Lc=!1;b.endOfStream=!1;b.Ia||b.pb||Bl(a,b,0);H(g)})}
|
|
479
480
|
function Bl(a,b,c){var d=b.type;if(d!=Td||a.i.has(d))b.pb=(new Sc(function(){var e;return O(function(f){if(1==f.g)return xa(f,2),E(f,Ml(a,b),4);if(2!=f.g)return za(f,0);e=Aa(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function tl(a){null!=a.pb&&(a.pb.stop(),a.pb=null)}function ul(a){return O(function(b){return a.eb?E(b,a.eb.abort(),0):b.u(0)})}
|
|
480
481
|
function Ol(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Zf(a.K),2);Cg(a.m);if(1===c.category){if(b.Mb)return Dl(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.wd(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
|
|
481
482
|
function $l(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.L<c)return h.return(!1);a.L=b;d=Vd;if(e=a.i.get(d.V))e.dc=null,Kl(a,e),ul(e).catch(function(){});if(f=a.i.get(d.fa))f.dc=null,Kl(a,f),ul(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.V,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return E(h,ok(a.g.Y,g),2)}return h.return(!0)})}
|
|
@@ -503,40 +504,40 @@ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth
|
|
|
503
504
|
drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(om(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
504
505
|
function pm(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return bm(a,b,c||lm(),d,"")}
|
|
505
506
|
function om(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Je(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Ce(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-
|
|
506
|
-
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!=Td&&"image"!=c.type||b.push(c);return b}function mm(a){return dm([a],a)}function nm(a){return dm([a],a)}S("shaka.util.PlayerConfiguration",km);km.mergeConfigObjects=pm;km.createDefault=lm;function qm(a,b,c,d,e){jg.call(this);this.K=a;this.P=b;this.xa=e.networkingEngine;this.W=d;this.o=null;this.qb=c;this.ua=0;this.
|
|
507
|
-
function rm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function sm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function tm(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}
|
|
507
|
+
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!=Td&&"image"!=c.type||b.push(c);return b}function mm(a){return dm([a],a)}function nm(a){return dm([a],a)}S("shaka.util.PlayerConfiguration",km);km.mergeConfigObjects=pm;km.createDefault=lm;function qm(a,b,c,d,e){jg.call(this);this.K=a;this.P=b;this.xa=e.networkingEngine;this.W=d;this.o=null;this.qb=c;this.ua=0;this.Ka=e.rc;this.B=e.gi;this.hb=e.hi;this.g=e.config;this.j=this.C=this.h=null;this.ea=!1;this.F=e.ri;this.na=!1;this.l=null;this.ca=!1;this.i=this.A=null;this.aa=!1;this.J=new Map;this.oa=!1;this.ya=e.pi;this.$=new Zk;this.m=new $f;this.L=null;this.s=!1;this.Ea=e.jh;this.ha=null;this.Fa=e.ih;this.N=!1;this.H=[];this.G=[]}qa(qm,jg);
|
|
508
|
+
function rm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function sm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function tm(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}q=qm.prototype;q.getStartTime=function(){return this.W};q.wc=function(){return this.K};q.Qe=function(){return this.h};function um(a){a.aa=!0;return a.i}function vm(a){a.ea=!0;return a.j}function wm(a){a.na=!0;return a.F}q.getStats=function(){return this.$};
|
|
508
509
|
function xm(a){a.ca=!0;return a.l}function ym(a){a.oa=!0;return a.J}
|
|
509
|
-
|
|
510
|
-
if(a.
|
|
511
|
-
|
|
510
|
+
q.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 xa(c,3),E(c,zm(a),5);case 5:return Am(a),E(c,Bm(a),6);case 6:Am(a);a.o||(a.o=new Kf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
|
|
511
|
+
if(a.Fa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ea){d=a.h.presentationTimeline.U();var e=xf(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.ha=e,e.video&&Cm(a,e.video,d),e.audio&&Cm(a,e.audio,d)}return E(c,void 0,7);case 7:Am(a);a.m.resolve();za(c,0);break;case 3:b=Aa(c),a.m.reject(b),H(c)}})})()};q.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):jg.prototype.dispatchEvent.call(this,a)};
|
|
512
|
+
q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Am(a){if(a.s)throw new T(2,7,7003);}function Dm(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
|
|
512
513
|
function zm(a){var b,c,d,e;return O(function(f){if(1==f.g)return Dm(a,"manifest-parser"),a.j||(a.C=wi(a.K,a.P),a.j=a.C(),a.j.configure(a.g.manifest)),b=Date.now()/1E3,Dm(a,"manifest"),a.h?f.u(2):E(f,a.j.start(a.K,a.hb),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);Em(a.h);d=Date.now()/1E3;e=d-b;a.$.F=e;H(f)})}
|
|
513
|
-
function Bm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Dm(a,"drm-engine");a.ua=Date.now()/1E3;a.l=a.
|
|
514
|
-
Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}
|
|
515
|
-
function Cm(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new $k(d,b,function(l,m,n){return Ll(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.W||0;(h=(g=b.segmentIndex.zb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.da&&cl(e,h.da):bl(e,h.startTime));H(k)})}
|
|
516
|
-
|
|
517
|
-
function Em(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",qm);qm.prototype.destroy=qm.prototype.destroy;qm.prototype.waitForFinish=qm.prototype.
|
|
514
|
+
function Bm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Dm(a,"drm-engine");a.ua=Date.now()/1E3;a.l=a.Ka();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Re(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return E(g,Promise.resolve(),3);case 3:Am(a),a.dispatchEvent(c);case 2:return d=xf(a.h.variants),E(g,Mh(a.l,d,a.h.offlineSessionIds),4);case 4:return Am(a),E(g,qi(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,
|
|
515
|
+
Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}q.configure=function(a,b){a=cm(a,b);pm(this.g,a)};q.getConfiguration=function(){return Ke(this.g)};
|
|
516
|
+
function Cm(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new $k(d,b,function(l,m,n){return Ll(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.W||0;(h=(g=b.segmentIndex.zb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.da&&cl(e,h.da):bl(e,h.startTime));H(k)})}q.Si=function(){return this.m};
|
|
517
|
+
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ea){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.na&&a.F.release();if(!a.l||a.ca){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.oa)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,il(d);H(e)}})};
|
|
518
|
+
function Em(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",qm);qm.prototype.destroy=qm.prototype.destroy;qm.prototype.waitForFinish=qm.prototype.Si;function Fm(a,b){jg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{oc:null,nc:Gm,bc:function(d,e){return Hm(c,"enter",d,e)}},{oc:Im,nc:Gm,bc:function(d,e){return Hm(c,"enter",d,e)}},{oc:Jm,nc:Gm,bc:function(d,e){return Hm(c,"enter",d,e)}},{oc:Gm,nc:Im,bc:function(d,e){return Hm(c,"exit",d,e)}},{oc:Gm,nc:Jm,bc:function(d,e){return Hm(c,"exit",d,e)}},{oc:Im,nc:Jm,bc:function(d,e){return Hm(c,"skip",d,e)}},{oc:Jm,nc:Im,bc:function(d,e){return Hm(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
|
|
518
519
|
"regionremove",function(d){c.g.delete(d.region)})}qa(Fm,jg);Fm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;jg.prototype.release.call(this)};Fm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Im:a>d.endTime?Jm:Gm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.oc==e&&h.nc==f&&h.bc(d,b)}}};
|
|
519
|
-
function Hm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Im=1,Gm=2,Jm=3;function
|
|
520
|
+
function Hm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Im=1,Gm=2,Jm=3;function Km(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=Lm[d])return m.return(e);f=0;g=rg([a],c);xa(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];za(m,3);break;case 2:k=Aa(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?
|
|
520
521
|
e.toLowerCase().split(";").shift():"")}})}
|
|
521
|
-
var
|
|
522
|
-
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
522
|
+
var Lm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function $m(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return $m(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=an(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=an(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);
|
|
523
|
+
h=k.next().value;k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
523
524
|
function an(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";
|
|
524
525
|
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 bn(a,b){var c=[];a=t(cn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(bn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=$m(d,b);c.push(e)}return c}
|
|
525
526
|
function cn(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 bc(e.xe,f)}}(d))||b.push(d.xe);return b}
|
|
526
527
|
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&&
|
|
527
|
-
(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"}
|
|
528
|
-
|
|
529
|
-
c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};
|
|
530
|
-
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(){}
|
|
531
|
-
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}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
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
|
|
535
|
-
|
|
528
|
+
(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"}q=en.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;fn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
529
|
+
q.append=function(a){var b=bn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={zc:void 0},d=b.next())e.zc=d.value,!a.some(function(f){return function(g){return g.startTime==f.zc.startTime&&g.endTime==f.zc.endTime&&g.text==f.zc.payload?!0:!1}}(e))&&e.zc.payload&&(d=dn(e.zc))&&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):
|
|
530
|
+
c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(fn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
531
|
+
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(){}q=gn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",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 Tc(function(){d.A.paused||
|
|
532
|
+
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}q=kn.prototype;q.configure=function(a){this.C&&this.C.Va(a.captionsUpdatePeriod)};
|
|
533
|
+
q.append=function(a){var b=[].concat(x(this.h));a=t(cn(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 bc(f,e.ye)}}(d))||this.h.push(d.ye);ln(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
534
|
+
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});ln(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function mn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
535
|
+
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.$g:null;l&&(g.push(l.ze),l.ic&&g.push(l.ic),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.$g,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,r){return p.startTime!=
|
|
536
|
+
r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.ic?(d.ic.contains(c)&&d.ic.removeChild(c),c.appendChild(d.ic),d.ic.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,[])}}
|
|
536
537
|
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==
|
|
537
538
|
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-
|
|
538
539
|
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=
|
|
539
|
-
"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
|
|
540
|
+
"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,$g:e,ic:c})}
|
|
540
541
|
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"}
|
|
541
542
|
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=
|
|
542
543
|
"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-
|
|
@@ -554,160 +555,160 @@ function Hn(a){if(0===a.type)return In;if(a=a.stream){var b=a.type;if("video"==b
|
|
|
554
555
|
function Mn(a,b){b=a.h.sb()[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.ac();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}}
|
|
555
556
|
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"===
|
|
556
557
|
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}
|
|
557
|
-
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",
|
|
558
|
-
|
|
559
|
-
On.prototype.getMaxBitrate=On.prototype.
|
|
560
|
-
this.wf=[];this.s=null;this.xa=new Kf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.
|
|
561
|
-
this.G=Zn(this);this.G.Df(this.g.streaming.forceHTTP);this.G.Ef(this.g.streaming.forceHTTPS);this.Sf=this.na=this.B=null;this.Rf=new Tc(function(){return O(function(d){if(1==d.g)return c.na?E(d,c.pc(c.Sf,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.na),4);c.Sf.play();c.na=null;H(d)})});$n&&(this.B=$n(),this.B.configure(this.g.ads),this.
|
|
562
|
-
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return g.return();c.Rf.stop();if(c.na)return g.u(0);c.Sf=c.h;return E(g,c.
|
|
563
|
-
this.pc(a,!0))}qa(X,jg);function co(a){null!=a.K&&(Gj(a.K),a.K.release(),a.K=null)}function eo(a,b){b.lcevc.enabled?(co(a),null==a.K&&(a.K=new Fj(a.h,a
|
|
564
|
-
|
|
558
|
+
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",vj:"s",OTHER:"o"});function On(a){this.h=a;this.g=null}q=On.prototype;q.configure=function(a){this.h=a};q.lg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Pn)?1E3*this.g.get(Pn):null};q.kg=function(){return this.h.enabled&&this.g&&this.g.has(Qn)?1E3*this.g.get(Qn):null};q.Lh=function(){return this.h.enabled&&this.g&&this.g.has(Rn)?this.g.get(Rn):null};q.Mh=function(){return this.h.enabled&&this.g&&this.g.has(Sn)?this.g.get(Sn):null};
|
|
559
|
+
q.getBandwidthEstimate=function(a){var b=this.kg();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.Mh;On.prototype.getResponseDelay=On.prototype.Lh;On.prototype.getEstimatedThroughput=On.prototype.kg;
|
|
560
|
+
On.prototype.getMaxBitrate=On.prototype.lg;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;H(c)})}Un.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){jg.call(this);var c=this;this.l=Wn;this.Kd=this.h=null;this.ea=!1;this.ae=new hb;this.Rc=new hb;this.m=new hb;this.ya=new hb;this.Qc=new hb;this.C=this.F=this.A=this.G=null;this.ce=0;this.W=new Un;this.ha=this.qf=this.$=this.i=this.Fa=this.J=this.j=this.qb=this.K=this.ah=this.aa=this.N=this.Oc=this.L=this.Nd=this.H=this.hb=null;this.Ka=!1;this.ua=this.o=null;this.Of=1E9;this.cd=[];this.P=NaN;this.g=Xn(this);this.ca={width:Infinity,height:Infinity};this.Id=new pi(this.g,this.ca,null);
|
|
561
|
+
this.wf=[];this.s=null;this.xa=new Kf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Ea=this.g.preferredTextLanguage;this.$c=this.g.preferredTextRole;this.Xc=this.g.preferForcedSubs;this.Sc=[];b&&b(this);this.N=Yn(this);this.aa=new On(this.g.cmsd);
|
|
562
|
+
this.G=Zn(this);this.G.Df(this.g.streaming.forceHTTP);this.G.Ef(this.g.streaming.forceHTTPS);this.Sf=this.na=this.B=null;this.Rf=new Tc(function(){return O(function(d){if(1==d.g)return c.na?E(d,c.pc(c.Sf,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.na),4);c.Sf.play();c.na=null;H(d)})});$n&&(this.B=$n(),this.B.configure(this.g.ads),this.Qc.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();
|
|
563
|
+
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return g.return();c.Rf.stop();if(c.na)return g.u(0);c.Sf=c.h;return E(g,c.dg(!0),3)}c.na=g.h;H(g)})}),this.Qc.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Rf.X(.1)}));this.ae.D(window,"online",function(){ao(c);c.vf()});this.Td=new Tc(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."),
|
|
564
|
+
this.pc(a,!0))}qa(X,jg);function co(a){null!=a.K&&(Gj(a.K),a.K.release(),a.K=null)}function eo(a,b){b.lcevc.enabled?(co(a),null==a.K&&(a.K=new Fj(a.h,a.ah,b.lcevc),a.F&&(a.F.$=a.K))):co(a)}function fo(a,b){return new U(a,b)}q=X.prototype;
|
|
565
|
+
q.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.wf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.wf=[];return E(g,Promise.all(c),3);case 3:a.ae&&(a.ae.release(),a.ae=null);a.Rc&&(a.Rc.release(),a.Rc=null);a.m&&(a.m.release(),a.m=null);a.ya&&(a.ya.release(),a.ya=null);a.Qc&&(a.Qc.release(),a.Qc=null);a.ua=null;a.g=null;a.s=null;a.Kd=null;a.N=null;a.aa=
|
|
565
566
|
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),jg.prototype.release.call(a),H(g)}})};function ho(a,b){a.dispatchEvent(fo("onstatechange",(new Map).set("state",b)))}
|
|
566
|
-
|
|
567
|
-
}})};
|
|
568
|
-
|
|
569
|
-
if(!c.J){
|
|
570
|
-
null);b||c.Rf.stop();c.N&&vn(c.N);c.aa&&(c.aa.g=null);c.h&&jn(c.h);if(!c.h||!c.h.src){
|
|
571
|
-
k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(df={},Qc.clear());c.i=null;c.s=new Zk;c.Kf=null;c.cd=[];c.P=NaN;mo(c);case 3:Ba(
|
|
572
|
-
|
|
573
|
-
2),E(z,Vn(d.W,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.W.release(),Da(z,0)}})};xa(A,5,6);null==b&&e&&(b=e.getStartTime());d.ha=b;d.
|
|
567
|
+
q.pc=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();xa(g,5,6);d||(ho(c,"attach"),e=function(){var h=jo(c,!1);h&&ko(c,h)},c.Rc.D(a,"error",e),c.h=a);if(!b||!Uc()||c.F){g.u(6);break}return E(g,lo(c),6);case 6:Ba(g);c.W.release();Da(g,0);break;case 5:return f=Aa(g),E(g,c.detach(),10);case 10:throw f;
|
|
568
|
+
}})};q.kh=function(a){this.ah=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==go)throw new T(2,7,7E3);return E(c,b.lc(!1,a),2)}if(3!=c.g)return E(c,io(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Rc.nb(),b.h=null),ho(b,"detach"),b.B&&!a&&b.B.release()}finally{b.W.release()}H(c)})};function io(a,b){var c;return O(function(d){return 1==d.g?(c=++a.ce,E(d,Vn(a.W,b),2)):c!=a.ce?(a.W.release(),d.return(!0)):d.return(!1)})}
|
|
569
|
+
q.lc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:return c.l!=go&&(c.l=Wn),E(r,io(c,"unload"),2);case 2:if(r.h)return r.return();ya(r,3);c.Ka=!1;ho(c,"unload");a&&!Uc()&&(a=!1);co(c);d=c.Sc.map(function(u){return u()});c.Sc=[];return E(r,Promise.all(d),5);case 5:c.dispatchEvent(fo("unloading"));c.Oc&&(c.Oc.release(),c.Oc=null);c.h&&(c.m.nb(),c.ya.nb());c.Td.stop();c.hb&&(c.hb.release(),c.hb=null);c.Nd&&(c.Nd.stop(),c.Nd=null);
|
|
570
|
+
if(!c.J){r.u(6);break}return E(r,c.J.stop(),7);case 7:c.J=null,c.Fa=null;case 6:if(!c.o){r.u(8);break}return E(r,c.o.stop(),8);case 8:if(!c.j){r.u(10);break}return E(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!sd("webkit")||!c.A){r.u(12);break}return E(r,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.F){r.u(14);break}return E(r,c.F.destroy(),15);case 15:c.F=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.na&&!b&&(c.na.destroy(),c.na=
|
|
571
|
+
null);b||c.Rf.stop();c.N&&vn(c.N);c.aa&&(c.aa.g=null);c.h&&jn(c.h);if(!c.h||!c.h.src){r.u(16);break}return E(r,new Promise(function(u){return(new Tc(u)).X(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.A){r.u(18);break}return E(r,c.A.destroy(),19);case 19:c.A=null;case 18:c.oa&&c.$!=c.oa.wc()&&(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=
|
|
572
|
+
k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(df={},Qc.clear());c.i=null;c.s=new Zk;c.Kf=null;c.cd=[];c.P=NaN;mo(c);case 3:Ba(r);c.W.release();Da(r,4);break;case 4:if(a&&Uc()&&!c.F)return E(r,lo(c),0);r.u(0)}})};q.Ri=function(a){this.ha=a};
|
|
573
|
+
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==go)throw new T(2,7,7E3);e=null;f="";a instanceof qm?(e=a,f=e.wc()||""):f=a||"";return E(A,Vn(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new T(2,7,7002);if(!d.$){A.u(3);break}d.$=f;return E(A,d.lc(!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 ya(z,
|
|
574
|
+
2),E(z,Vn(d.W,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.W.release(),Da(z,0)}})};xa(A,5,6);null==b&&e&&(b=e.getStartTime());d.ha=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;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){tm(e,d);d.s=e.getStats();A.u(11);break}return E(A,oo(d,f,b,c,!0),12);case 12:(e=
|
|
574
575
|
A.h)?(tm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Zk;case 11:m=!e;n=e?e.qb:Date.now()/1E3;d.s=e?e.getStats():new Zk;d.$=f;d.qf=c||null;if(m)return E(A,k(function(){return O(function(y){return E(y,po(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){A.u(15);break}return E(A,k(function(){return O(function(y){return E(y,lo(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return E(A,k(function(){return O(function(y){return E(y,e.m,0)})},"waitForFinish"),17);case 17:d.g=
|
|
575
|
-
e.getConfiguration();d.Id=e.B;d.
|
|
576
|
-
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(){})),
|
|
576
|
+
e.getConfiguration();d.Id=e.B;d.Fa=e.C;d.J=vm(e);d.Oc=wm(e);d.qb=e.ya;d.i=e.Qe();if(p=e.o)d.xa=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(qo(d),d.configure("manifest.disableVideo",!0));d.A=xm(e);return E(A,k(function(){return O(function(y){return E(y,d.A.pc(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(r=e.A)||d.ua&&d.ua==r||(d.o=um(e),d.ua=e.A,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
|
|
577
|
+
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=ym(e),v=e.ha,E(A,k(function(){return O(function(y){return E(y,ro(d,n,v,u),0)})},"loadInner_"),19);case 19:sm(e);A.u(14);break;case 20:return E(A,
|
|
577
578
|
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(22);break}return E(A,e.destroy(),22);case 22:d.oa=null;Da(A,0);break;case 5:w=Aa(A);if(!w||7E3==w.code){A.u(24);break}return E(A,d.lc(!1),24);case 24:throw w;}})};
|
|
578
|
-
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})}
|
|
579
|
-
|
|
580
|
-
function to(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.
|
|
581
|
-
|
|
582
|
-
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,
|
|
583
|
-
filter:function(F){var J,K;return O(function(G){if(1==G.g)return E(G,qi(
|
|
584
|
-
new U("regionadd",new Map([["region",F]])),J.dispatchEvent(F))},onEvent:function(F){return k.dispatchEvent(F)},onError:function(F){return k.onError(F)},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(F){var J=k.l,K=J?J.g:null;K&&J.s&&si(
|
|
579
|
+
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})}q.Ni=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.lc(a,b),3)):e.return(d)})};
|
|
580
|
+
q.dg=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)})};
|
|
581
|
+
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.U()&&(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.xa;b.start();a.i=null;a.J=null;a.Fa=null;a.o=null;a.ua=null}return e.return(b)})}
|
|
582
|
+
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return 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))})}
|
|
583
|
+
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,r,u,v,w,A,y,C,z,B,D;return O(function(I){if(1==I.g)return k=null,l=Ke(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(F,J){m()?k.configure(F,J):a.configure(F,J)},Infinity!=a.ca.width||Infinity!=a.ca.height?I.u(2):E(I,ud(),3);2!=I.g&&(r=I.h,a.ca.width=r.width,a.ca.height=r.height);u=new pi(l,a.ca,null);v={networkingEngine:a.G,
|
|
584
|
+
filter:function(F){var J,K;return O(function(G){if(1==G.g)return E(G,qi(u,F),2);if(4!=G.g){J=G.h;if(!J)return G.u(0);K=fo("trackschanged");return E(G,Promise.resolve(),4)}k.dispatchEvent(K);H(G)})},makeTextStreamsForClosedCaptions:function(F){return wo(a,F)},onTimelineRegionAdded:function(F){var J=k.F;a:{var K=t(J.g);for(var G=K.next();!G.done;G=K.next())if(G=G.value,G.schemeIdUri==F.schemeIdUri&&G.id==F.id&&G.startTime==F.startTime&&G.endTime==F.endTime){K=G;break a}K=null}null==K&&(J.g.add(F),F=
|
|
585
|
+
new U("regionadd",new Map([["region",F]])),J.dispatchEvent(F))},onEvent:function(F){return k.dispatchEvent(F)},onError:function(F){return k.onError(F)},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(F){var J=k.l,K=J?J.g:null;K&&J.s&&si(u,K.keySystem,F)},onManifestUpdated:function(){var F=
|
|
585
586
|
(new Map).set("isLive",a.U());k.dispatchEvent(fo("manifestupdated",F));rm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new ll(function(){return a.Nb()});w.addEventListener("regionadd",function(F){var J=F.region;xo(a,"timelineregionadded",J,k);rm(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(J)})});A=null;l.streaming.observeQualityChanges&&(A=new ml(function(){return a.sb()}),A.addEventListener("qualitychange",function(F){var J=
|
|
586
|
-
F.quality;F=F.position;J=(new Map).set("mediaQuality",{bandwidth:J.bandwidth,audioSamplingRate:J.audioSamplingRate,codecs:J.codecs,contentType:J.contentType,frameRate:J.frameRate,height:J.height,mimeType:J.mimeType,channelsCount:J.channelsCount,pixelAspectRatio:J.pixelAspectRatio,width:J.width}).set("position",F);a.dispatchEvent(fo("mediaqualitychanged",J))}));y=!0;C={
|
|
587
|
+
F.quality;F=F.position;J=(new Map).set("mediaQuality",{bandwidth:J.bandwidth,audioSamplingRate:J.audioSamplingRate,codecs:J.codecs,contentType:J.contentType,frameRate:J.frameRate,height:J.height,mimeType:J.mimeType,channelsCount:J.channelsCount,pixelAspectRatio:J.pixelAspectRatio,width:J.width}).set("position",F);a.dispatchEvent(fo("mediaqualitychanged",J))}));y=!0;C={Db:a.G,onError:function(F){return k.onError(F)},Xd:function(F){rm(k,!0,function(){a:{var J=F,K=fo("keystatuschanged");a.dispatchEvent(K);
|
|
587
588
|
var G=Object.keys(J);1==G.length&&""==G[0]&&(G=["00"],J={"00":J[""]});K=1==G.length&&"00"==G[0];var M=!1;if(G.length){G=t(a.i.variants);for(var N=G.next();!N.done;N=G.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=J[K?"00":Q])||a.A.F)N.allowedByKeySystem=N.allowedByKeySystem&&!!Q&&
|
|
588
|
-
!ui.includes(Q)}P!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(yo(a),!zo(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&Ao(a)}})},onExpirationUpdated:function(F,J){var K=fo("expirationupdated");k.dispatchEvent(K);if((K=k.j)&&K.onExpirationUpdated)K.onExpirationUpdated(F,J)},onEvent:function(F){k.dispatchEvent(F);"drmsessionupdate"==F.type&&y&&(y=!1,F=Date.now()/1E3-k.ua,(a.s||k.getStats()).j=F,a.K&&Gj(a.K))}};z=Zn(a,m);qg(a.G,z);B=function(){return a.rc(C)};D={config:l,
|
|
589
|
-
|
|
589
|
+
!ui.includes(Q)}P!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(yo(a),!zo(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&Ao(a)}})},onExpirationUpdated:function(F,J){var K=fo("expirationupdated");k.dispatchEvent(K);if((K=k.j)&&K.onExpirationUpdated)K.onExpirationUpdated(F,J)},onEvent:function(F){k.dispatchEvent(F);"drmsessionupdate"==F.type&&y&&(y=!1,F=Date.now()/1E3-k.ua,(a.s||k.getStats()).j=F,a.K&&Gj(a.K))}};z=Zn(a,m);qg(a.G,z);B=function(){return a.rc(C)};D={config:l,hi:v,ri:w,pi:A,rc:B,gi:u,networkingEngine:z,
|
|
590
|
+
jh:f,ih:h};k=new qm(b,d,e,c,D);a.wf.push(k);return I.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,Km(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&gd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
590
591
|
function vo(a,b){if(!Uc())return!0;if(b){if(""==(a.h||Wc()).canPlayType(b))return!1;if(!(Uc()&&b in xi))return!0;if(oe(b)){if(a.g.streaming.preferNativeHls)return!0;if(gd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(gd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
591
|
-
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.Kf=b,d=Bo(a.h,c,{
|
|
592
|
-
function ro(a,b,c,d){var e,f,g,h,k,l,m,n,p,
|
|
593
|
-
Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,M,N){a.i&&a.j&&G!=a.j.j&&Go(a,G,!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(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Jo(a,G)}});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())(
|
|
594
|
-
p.value)&&!
|
|
595
|
-
break}
|
|
592
|
+
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.Kf=b,d=Bo(a.h,c,{Ch: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.ha=f,E(g,d.L,2);a.F=d;H(g)})}
|
|
593
|
+
function ro(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J;return O(function(K){switch(K.g){case 1:ho(a,"load");e=a.h;a.H=new Qk({Cd:function(){return e.playbackRate},Wb:function(){return e.defaultPlaybackRate},Ff:function(G){e.playbackRate=G},wg:function(G){e.currentTime+=G}});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.$c=a.g.preferredTextRole;a.Xc=a.g.preferForcedSubs;
|
|
594
|
+
Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,M,N){a.i&&a.j&&G!=a.j.j&&Go(a,G,!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(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Jo(a,G)}});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())(r=
|
|
595
|
+
p.value)&&!r.segmentIndex&&l.push(r.createSegmentIndex());if(!(0<l.length)){K.u(2);break}return E(K,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);xl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.C=Lo(a,G);a.hb=Mo(a,G);No(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ha);if(k){K.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){K.u(5);
|
|
596
|
+
break}v=a.i.presentationTimeline;w=a.ha||a.h.currentTime;A=v.Ab();y=v.ub();w<A?w=A:w>y&&(w=y);return E(K,Oo(h,w),6);case 6:C=K.h,u(C);case 5:Go(a,h,!0,!1,0);case 4:return a.C.ready(),z=a.xc().find(function(G){return G.active}),z||((B=yf(a.i.textStreams,a.Ea,a.$c,a.Xc)[0]||null)&&Yk(a.s.h,B,!0),h&&(B?(Po(a,h.audio,B)&&(a.ea=!0),a.ea&&a.F.F.setTextVisibility(!0),Qo(a)):a.ea=!1),B&&(a.g.streaming.alwaysStreamText||a.Ze())&&Gl(a.j,B)),E(K,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Ro(a));yo(a);
|
|
596
597
|
zo(a);a.i.variants.some(function(G){return G.primary});if((D=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)I=function(){return So(a)},a.m.D(e,"timeupdate",I);D||(F=function(){return To(a)},a.m.D(e,"timeupdate",F),To(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(J=function(){var G;return O(function(M){if(1==M.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return M.u(0);
|
|
597
|
-
a.m.
|
|
598
|
-
function po(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Vd,d=Date.now()/1E3,e=!0,a.A=a.rc({
|
|
598
|
+
a.m.Hb(e,"timeupdate",J);return E(M,a.preload(a.i.nextUrl),4)}a.oa=M.h;H(M)})},a.m.D(e,"timeupdate",J)),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.sa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(K)}})}
|
|
599
|
+
function po(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Vd,d=Date.now()/1E3,e=!0,a.A=a.rc({Db: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:[]},
|
|
599
600
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?le(b):"",codecs:b?me(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.fa,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(Xd(g.mimeType,
|
|
600
601
|
g.codecs)),b.startsWith("audio/")?(g.type=c.V,f.audio=g):f.video=g,a.A.aa=!0,E(h,Mh(a.A,[f],[]),2)):E(h,a.A.pc(a.h),0)})}
|
|
601
|
-
function so(a,b,c){var d,e,f,g,h,k,l,m,n,p,
|
|
602
|
+
function so(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g)return ho(a,"src-equals"),d=a.h,a.C=new Gk(d),e=!1,a.Sc.push(function(){e=!0}),null!=a.ha&&a.C.qe(a.ha),a.H=new Qk({Cd:function(){return d.playbackRate},Wb:function(){return d.defaultPlaybackRate},Ff:function(w){d.playbackRate=w},wg: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,
|
|
602
603
|
"ratechange",h),"none"!=d.preload&&a.m.sa(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)}),
|
|
603
604
|
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,($c()||cd())&&d.load(),"none"!=d.preload&&!d.autoplay&&oe(c)&&ld()&&d.load(),a.l=Vo,a.dispatchEvent(fo("streaming")),l=new $f,xk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.ready();l.resolve()}),xk(d,HTMLMediaElement.HAVE_CURRENT_DATA,
|
|
604
605
|
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.ea=!0),A.u(2)):E(A,new Promise(function(y){a.m.sa(d.textTracks,"change",y);(new Tc(y)).X(1)}),2);if(e)return A.return();Yo(a);H(A)})}),d.error?l.reject(jo(a)):"none"==d.preload&&(ab('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),
|
|
605
|
-
l.resolve()),a.m.sa(d,"error",function(){l.reject(jo(a))}),m=new Promise(function(w,A){(new Tc(A)).X(a.g.streaming.loadTimeout)}),E(
|
|
606
|
-
|
|
607
|
-
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 Tc(function(){var d=$o(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).kc().X(.5);a.
|
|
606
|
+
l.resolve()),a.m.sa(d,"error",function(){l.reject(jo(a))}),m=new Promise(function(w,A){(new Tc(A)).X(a.g.streaming.loadTimeout)}),E(v,Promise.race([l,m]),2);if((n=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return So(a)},a.m.D(d,"timeupdate",p);n||(r=function(){return To(a)},a.m.D(d,"timeupdate",r),To(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.Nb().end,a.m.D(d,"progress",function(){var w=a.Nb().end;u!=w&&(a.B.onManifestUpdated(a.U()),
|
|
607
|
+
u=w)})));a.Ka=!0;H(v)})}function Wo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Hg(b,a.g.preferredVariantRole)}function Yo(a){var b=a.g.preferredTextLanguage;""!=b&&a.zf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
608
|
+
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 Tc(function(){var d=$o(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).kc().X(.5);a.Sc.push(function(){c.stop()})}}
|
|
608
609
|
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))}
|
|
609
|
-
function Jo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Tc(function(){b.mode="hidden"})).kc().X(.5);a.
|
|
610
|
+
function Jo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Tc(function(){b.mode="hidden"})).kc().X(.5);a.Sc.push(function(){c.stop()})}}q.vi=function(){for(var a=this.W;a.g;)a.release()};q.rc=function(a){return new Fh(a)};
|
|
610
611
|
function Zn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?rm(b(),!0,e):e()}b||(b=function(){return null});return new mg(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],
|
|
611
|
-
Tn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,
|
|
612
|
-
"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){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",L)}break;case xg: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.U()?"l":"v"};n.ot=Hn(k);var p=n.ot===En||n.ot===yn||n.ot===zn||n.ot===Jn,
|
|
613
|
-
if(
|
|
614
|
-
500,M=
|
|
615
|
-
function Lo(a,b){return new Hk(a.h,a.i,a.g.streaming,b,function(){a.hb&&Tk(a.hb,!0);a.j&&a.j.
|
|
616
|
-
function Mo(a,b){b=new Fm(a.
|
|
612
|
+
Tn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],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=
|
|
613
|
+
"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){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",L)}break;case xg: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.U()?"l":"v"};n.ot=Hn(k);var p=n.ot===En||n.ot===yn||n.ot===zn||n.ot===Jn,r=k.stream;if(r){var u=h.h.Za();if(p&&(n.bl=Ln(h,r.type),n.ot!==Jn)){var v=Mn(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);
|
|
614
|
+
if(r.segmentIndex&&m){var w=r.segmentIndex.zb(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 I=z.pathname.split("/").slice(1),F=B.pathname.split("/").slice(1,-1);I[0]===F[0];)I.shift(),F.shift();for(;F.length;)F.shift(),I.unshift("..");D=I.join("/")}n.nor=D}if((A.Da||A.pa)&&(m.Da!=A.Da||m.pa!=A.pa)){var J=A.Da+"-";A.pa&&(J+=A.pa);n.nrr=J}}}var K=h.h.Za()||1,G=Mn(h,r.type)||
|
|
615
|
+
500,M=r.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(G/K/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){bb("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.Rb=isNaN(f.Rb)?e:f.Rb+e)})}
|
|
616
|
+
function Lo(a,b){return new Hk(a.h,a.i,a.g.streaming,b,function(){a.hb&&Tk(a.hb,!0);a.j&&a.j.Gc();a.L&&ap(a)},function(c){return a.dispatchEvent(c)})}
|
|
617
|
+
function Mo(a,b){b=new Fm(a.Oc,a.U()||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 Sk(a.h);c.g.add(b);a.qb&&c.g.add(a.qb);return c}
|
|
617
618
|
function No(a,b,c){a.L=new Tf;a.L.g=Vf;Wf(a.L,c,Math.min(.5,c/2));mo(a);a.Nd=(new Tc(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)})}
|
|
618
619
|
function ap(a){switch(a.l){case Vo:if(a.h.ended)var b=!0;else{var c=Mi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Io:a:if(a.h.ended||Rj(a.F))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Kb();var d=Mi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Oi(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Uf:Vf;c.g=d;(b=b!=d)&&d===Uf&&(c.h=Date.now());b&&mo(a)}function Bo(a,b,c,d){return new Ij(a,b,c,d)}
|
|
619
620
|
function Yn(a){return new un({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},sb:function(){return a.sb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Za:function(){return a.Za()},Yb:function(){return a.Yb()},ac:function(){return a.ac()},U:function(){return a.U()}},a.g.cmcd)}
|
|
620
|
-
function Ho(a){return new rl(a.i,{Bd:function(){return a.C?a.C.nd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Za:function(){return a.Za()},Y:a.F,
|
|
621
|
-
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(fo("segmentappended",d));a.o&&c.fastSwitching&&b.gd&&b.Ld&&a.o.trySuggestStreams()},
|
|
621
|
+
function Ho(a){return new rl(a.i,{Bd:function(){return a.C?a.C.nd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Za:function(){return a.Za()},Y:a.F,Db:a.G,onError:function(b){return ko(a,b)},onEvent:function(b){return a.dispatchEvent(b)},mi: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(a.C){a.C.xg();var h=Sj(a.F,f);!a.U()&&a.h.paused&&null!=h&&f!=Td&&0<h&&a.C.nd()<h&&a.C.qe(h)}ap(a);d=(new Map).set("start",
|
|
622
|
+
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(fo("segmentappended",d));a.o&&c.fastSwitching&&b.gd&&b.Ld&&a.o.trySuggestStreams()},li:function(b,c){(c=c.gf)&&a.qb&&ol(a.qb,c,b)},Yf:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Xg(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,
|
|
622
623
|
e),e+=f.length;Vh(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},Yd:function(b,c,d){Co(a,b,c,d)},wd:function(b,c){return a.wd(b,c)}})}
|
|
623
|
-
|
|
624
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cm(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);
|
|
624
625
|
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&&
|
|
625
626
|
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==
|
|
626
627
|
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&&
|
|
627
628
|
(a.drm.retryParameters.baseDelay=100));var d=pm(this.g,a,Xn(this));bp(this);return d};
|
|
628
629
|
function bp(a){a.Id=new pi(a.g,a.ca,a.A);if(a.J){var b=Ke(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&&ri(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.Df(a.g.streaming.forceHTTP),a.G.Ef(a.g.streaming.forceHTTPS));if(a.F)if(a.F.configure(a.g.mediaSource),a.F.ha=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
629
630
|
a.Kf!=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.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Kf=b;a.j&&(b=a.j,(c=b.i.get(Td))&&El(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Ro(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
630
|
-
Wf(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)}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
631
|
+
Wf(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)}q.getConfiguration=function(){var a=Xn(this);pm(a,this.g,Xn(this));return a};q.Hh=function(){var a=Xn(this);pm(a,this.g,Xn(this));return em(this.g,Xn(this))};
|
|
632
|
+
q.ig=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Nb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.zi=function(){for(var a in this.g)delete this.g[a];pm(this.g,Xn(this),Xn(this));bp(this)};q.Dh=function(){return this.l};q.Re=function(){return this.i?this.i.type:null};q.Gh=function(){return this.h};
|
|
633
|
+
q.Yb=function(){return this.G};q.wc=function(){return this.$};q.hg=function(){return this.B?this.B:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};q.cc=function(){return this.i?this.i.presentationTimeline.cc():!1};q.Yh=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};
|
|
634
|
+
q.Nb=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Ab(),end:a.ub()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Vh=function(){this.U()&&(this.h.currentTime=this.Nb().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.A?this.A.g:null};q.Uc=function(){return this.A?this.A.Uc():Infinity};
|
|
635
|
+
q.Pe=function(){return this.A?this.A.Pe():[]};q.zd=function(){return this.A?this.A.zd():{}};q.Xe=function(){return this.L?this.L.g==Vf:!1};q.Za=function(){return this.h?this.H?this.H.i:1:0};
|
|
636
|
+
q.ld=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.ya.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Io&&(this.o.playbackRateChanged(a),Dl(this.j,1<Math.abs(a))),this.U()&&this.ya.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Nb(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Jc():Math.floor(c)<=Math.floor(d.start+e)&&b.Jc()}))};
|
|
637
|
+
q.Jc=function(){var a=this.H.Wb();this.l==Vo&&this.H.set(a);this.l==Io&&(this.H.set(a),this.o.playbackRateChanged(a),Dl(this.j,!1));this.ya.nb()};
|
|
638
|
+
q.ac=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,sf(e)){var f=kf(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return rf(g)}):[]};
|
|
639
|
+
q.xc=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=lf(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 pf(f)}):[]};q.Ah=function(){var a=this.cd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return mf(b)})};
|
|
640
|
+
q.th=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.cd;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.Tb(function(h){var k=cp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Sb;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.ng(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
640
641
|
function cp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Sb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
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,nf(c)==a.id){ep(this,c);break}};
|
|
646
|
-
|
|
647
|
-
b))c=f;c!=b&&(c?(a=kf(c),this.Af(a,!0,d)):Ao(this))}else this.h&&this.h.audioTracks&&(d=yf(this.ac(),a,b||"",!1)[0])&&this.Af(d)};
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
642
|
+
q.ng=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,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.cd;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.Sb;n=l/h.rows;p=h.Sb*h.rows;r=g.j-g.startTime;
|
|
643
|
+
u=g.A||r/p;v=g.startTime;A=w=0;1<p&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.Sb*m,A=Math.floor(y/h.Sb)*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})})};
|
|
644
|
+
q.Ig=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&&(Yk(this.s.h,b,!1),Gl(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,nf(c)==a.id?c.mode=this.ea?"showing":"hidden":c.mode="disabled";dp(this)}};
|
|
645
|
+
q.Af=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&sf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&ab("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.xa=new Jf(d,
|
|
646
|
+
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,nf(c)==a.id){ep(this,c);break}};q.vh=function(){return fp(this.ac())};q.Oh=function(){return fp(this.xc())};q.uh=function(){return Array.from(gp(this.ac()))};q.Nh=function(){return Array.from(gp(this.xc()))};
|
|
647
|
+
q.Hg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.xa=new Kf(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.xa.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,
|
|
648
|
+
b))c=f;c!=b&&(c?(a=kf(c),this.Af(a,!0,d)):Ao(this))}else this.h&&this.h.audioTracks&&(d=yf(this.ac(),a,b||"",!1)[0])&&this.Af(d)};q.zf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ea=a,this.$c=b||"",this.Xc=c,(a=yf(this.i.textStreams,this.Ea,this.$c,this.Xc)[0]||null)&&a!=this.j.s&&(Yk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.Ze()))Gl(this.j,a),dp(this)}else(a=yf(this.xc(),a,b||"",c)[0])&&this.Ig(a)};
|
|
649
|
+
q.Fi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.xa=new Kf(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)}};
|
|
650
|
+
q.Ze=function(){var a=this.ea;return this.F&&this.l==Io?this.F.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Xo(this).some(function(b){return"showing"==b.mode}):a};q.jg=function(){return this.h&&this.h.src&&this.h.textTracks?hp(this).map(function(a){return pf(a)}):[]};
|
|
651
|
+
q.wh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Ce(a),c=hp(this).filter(function(h){return Ce(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};
|
|
651
652
|
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})}
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
653
|
+
q.Og=function(a){a=!!a;if(this.ea!=a){this.ea=a;if(this.l==Io)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=yf(this.i.textStreams,this.Ea,this.$c,this.Xc),0<a.length&&(Gl(this.j,a[0]),dp(this))):Cl(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)}};
|
|
654
|
+
q.Jh=function(){if(this.C)var a=this.C.nd();else{if(null==this.ha)return new Date;a=this.ha}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};q.mg=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};
|
|
655
|
+
q.Dd=function(){return this.U()?this.i?this.i.presentationTimeline.Dd():null:null};q.sb=function(){if(this.l==Io)return this.F.sb();var a={total:[],audio:[],video:[],text:[]};this.l==Vo&&(a.total=Pi(this.h.buffered));return a};
|
|
656
|
+
q.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)&&
|
|
656
657
|
!this.U()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Tf(),this.s.N=this.C.Uf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==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=
|
|
657
|
-
this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.
|
|
658
|
-
w=Vk(f.g,"buffering"),A=f.s,y=f.C,C=f.G,z=f.Rb,B=Wk(f.g),D=[];f=t(f.h.g);for(var I=f.next();!I.done;I=f.next())I=I.value,D.push({timestamp:I.timestamp,id:I.id,type:I.type,fromAdaptation:I.fromAdaptation,bandwidth:I.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:
|
|
658
|
+
this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.mg().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.Rb=isNaN(c.Rb)?NaN:c.Rb+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,r=f.j,u=Vk(f.g,"playing"),v=Vk(f.g,"paused"),
|
|
659
|
+
w=Vk(f.g,"buffering"),A=f.s,y=f.C,C=f.G,z=f.Rb,B=Wk(f.g),D=[];f=t(f.h.g);for(var I=f.next();!I.done;I=f.next())I=I.value,D.push({timestamp:I.timestamp,id:I.id,type:I.type,fromAdaptation:I.fromAdaptation,bandwidth:I.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:y,
|
|
659
660
|
maxSegmentDuration:C,bytesDownloaded:z,stateHistory:B,switchHistory:D}};
|
|
660
|
-
|
|
661
|
-
l&&B.label==(f||"")&&B.kind==c}))return yo(h),z.return(n);throw new T(1,2,2012);case 4:p=Vd;
|
|
661
|
+
q.fh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,A,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&&ab("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=Ce(b);m=h.xc();if(n=m.find(function(B){return Ce(B.language)==
|
|
662
|
+
l&&B.label==(f||"")&&B.kind==c}))return yo(h),z.return(n);throw new T(1,2,2012);case 4:p=Vd;r=h.h.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)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=Lj(w),d="text/vtt";case 6:A={id:h.Of++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ok(0,r,[a]),mimeType:d||"",
|
|
662
663
|
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([Xd(d||"",e||"")])};y=Xd(A.mimeType,A.codecs);C=qe(y);if(!C)throw new T(2,2,2014,d);h.i.textStreams.push(A);yo(h);return z.return(lf(A))}})};
|
|
663
|
-
|
|
664
|
-
vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);
|
|
664
|
+
q.gh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y;return O(function(C){switch(C.g){case 1:if(c.l!=Io&&c.l!=Vo)throw new T(1,7,7004);if(b){C.u(2);break}return E(C,ip(c,a),3);case 3:b=C.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Vd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return E(C,kp(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=C.h;g=re[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
665
|
+
vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);r=p.next();for(u={};!r.done;u={me:void 0,sc:void 0},r=p.next())u.sc=r.value,u.me=null,v=function(z){return function(){null==z.me&&(z.me=Nd([a],[z.sc.payload]));return z.me||[]}}(u),w=new Hi(u.sc.startTime,u.sc.endTime,v,0,null,null,0,0,Infinity),u.sc.payload.includes("#xywh")&&(A=u.sc.payload.split("#xywh=")[1].split(","),4===A.length&&w.Pg({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
665
666
|
n.push(w);y={id:c.Of++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Mk(n),mimeType:b||"",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,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Xd(b||
|
|
666
667
|
"","")])};c.l==Vo?c.cd.push(y):c.i.imageStreams.push(y);yo(c);return C.return(mf(y))}})};
|
|
667
|
-
|
|
668
|
-
2,2012);}})};function ip(a,b){var c;return O(function(d){switch(d.g){case 1:return xa(d,2),E(d,
|
|
669
|
-
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=Lj(l),e="text/vtt");m=document.createElement("track");var p=a.N,
|
|
668
|
+
q.eh=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.jg();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.sa(f,"load",l);d.m.sa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return yo(d),k.return(h);case 5:throw new T(1,
|
|
669
|
+
2,2012);}})};function ip(a,b){var c;return O(function(d){switch(d.g){case 1:return xa(d,2),E(d,Km(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;za(d,3);break;case 2:Aa(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
670
|
+
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=Lj(l),e="text/vtt");m=document.createElement("track");var p=a.N,r=b;try{if(p.g.enabled){var u=xn(p);u.ot=Kn;u.su=!0;var v=Bn(u);var w=Cn(r,v)}else w=r}catch(A){bb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=r}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
670
671
|
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=xg;f=rg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Dn(k,f,{ot:Kn,su:!0})}catch(l){bb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return E(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
671
|
-
function lp(a,b,c,d){var e=re[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);}
|
|
672
|
-
|
|
673
|
-
function Xn(a){var b=lm();b.streaming.failureCallback=function(c){if(a.U()){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.vf(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}
|
|
672
|
+
function lp(a,b,c,d){var e=re[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);}q.Ki=function(a,b){this.ca.width=a;this.ca.height=b};q.vf=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.Zc||d.Ia||d.pb||(d.Zc=!1,Bl(b,d,a));b=!0}}else b=!1;return b};
|
|
673
|
+
q.Qe=function(){ab("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Eh=function(){return this.Fa};
|
|
674
|
+
function Xn(a){var b=lm();b.streaming.failureCallback=function(c){if(a.U()){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.vf(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}q.Sg=function(a){this.Kd=a};
|
|
674
675
|
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 Pk,l=e.closedCaptions.get(g);h={id:a.Of++,originalId:g,groupId:null,
|
|
675
676
|
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:Td,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([Xd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
676
|
-
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(
|
|
677
|
+
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(r){if(1==r.g)return k?E(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.zb(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.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)})}
|
|
677
678
|
function mo(a){var b=a.Xe();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Rk(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))}
|
|
678
679
|
function Do(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Vf?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)))}}
|
|
679
|
-
function So(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.
|
|
680
|
+
function So(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ig();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.ld(d):1==e&&b!==a.H.Wb()&&a.Jc()}if(c&&(e=a.Nb(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
|
|
680
681
|
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-
|
|
681
682
|
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.ld(k):f&&g&&c-
|
|
682
|
-
d>f?b!=g&&a.ld(g):h&&k&&c-d<h?b!=k&&a.ld(k):b!==a.H.Wb()&&a.
|
|
683
|
+
d>f?b!=g&&a.ld(g):h&&k&&c-d<h?b!=k&&a.ld(k):b!==a.H.Wb()&&a.Jc()}}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)}}}
|
|
683
684
|
function zo(a){try{ti(a.Id,a.i)}catch(c){return ko(a,c),!1}var b=xf(a.i.variants);b=a.xa.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}
|
|
684
685
|
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)}
|
|
685
686
|
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)}function Go(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Fl(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}));Fl(a.j,b,d,e,f,c);d=null;g&&(d=kf(g));b=kf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Hj(a.K,b,a.Re()),c=fo("adaptation",c),mp(a,c)):np(a,d,b)}}
|
|
686
687
|
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=rf(c),b=rf(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=Ce(a.g.preferredTextLanguage);c=Ce(c.language);if(2==a.g.autoShowText)return Be(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Ce(b.language);return Be(c,d)&&!Be(a,c)}ab("Invalid autoShowText setting!");return!1}
|
|
687
688
|
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&&Hj(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))}
|
|
688
689
|
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)}}
|
|
689
|
-
|
|
690
|
-
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.
|
|
690
|
+
q.wd=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.sb().video.reduce(function(h,k){return h+k.end-
|
|
691
|
+
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}xa(f,3);return E(f,$l(a.j),5);case 5:d=f.h;c=!d;za(f,2);break;case 3:Aa(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);H(f)}})}
|
|
691
692
|
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)}
|
|
692
|
-
function Fo(a,b,c){0<b&&(a.U()||a.
|
|
693
|
+
function Fo(a,b,c){0<b&&(a.U()||a.Rg(b));b=a.getDuration();c<b&&(a.U()||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);H(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(Ce(c.language)):b.add("und");return b}
|
|
693
694
|
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=Ce(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));
|
|
694
|
-
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.
|
|
695
|
-
X.prototype.getBufferedInfo=X.prototype.sb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Dd;X.prototype.getPresentationStartTimeAsDate=X.prototype.
|
|
696
|
-
X.prototype.selectAudioLanguage=X.prototype.
|
|
697
|
-
X.prototype.getVariantTracks=X.prototype.ac;X.prototype.cancelTrickPlay=X.prototype.
|
|
698
|
-
X.prototype.isAudioOnly=X.prototype.
|
|
699
|
-
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.
|
|
695
|
+
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Sg;X.prototype.getManifestParserFactory=X.prototype.Eh;X.prototype.getManifest=X.prototype.Qe;X.prototype.retryStreaming=X.prototype.vf;X.prototype.setMaxHardwareResolution=X.prototype.Ki;X.prototype.addChaptersTrack=X.prototype.eh;X.prototype.addThumbnailsTrack=X.prototype.gh;X.prototype.addTextTrackAsync=X.prototype.fh;X.prototype.getStats=X.prototype.getStats;
|
|
696
|
+
X.prototype.getBufferedInfo=X.prototype.sb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Dd;X.prototype.getPresentationStartTimeAsDate=X.prototype.mg;X.prototype.getPlayheadTimeAsDate=X.prototype.Jh;X.prototype.setTextTrackVisibility=X.prototype.Og;X.prototype.getChapters=X.prototype.wh;X.prototype.getChaptersTracks=X.prototype.jg;X.prototype.isTextTrackVisible=X.prototype.Ze;X.prototype.selectVariantsByLabel=X.prototype.Fi;X.prototype.selectTextLanguage=X.prototype.zf;
|
|
697
|
+
X.prototype.selectAudioLanguage=X.prototype.Hg;X.prototype.getTextLanguages=X.prototype.Nh;X.prototype.getAudioLanguages=X.prototype.uh;X.prototype.getTextLanguagesAndRoles=X.prototype.Oh;X.prototype.getAudioLanguagesAndRoles=X.prototype.vh;X.prototype.selectVariantTrack=X.prototype.Af;X.prototype.selectTextTrack=X.prototype.Ig;X.prototype.getThumbnails=X.prototype.ng;X.prototype.getAllThumbnails=X.prototype.th;X.prototype.getImageTracks=X.prototype.Ah;X.prototype.getTextTracks=X.prototype.xc;
|
|
698
|
+
X.prototype.getVariantTracks=X.prototype.ac;X.prototype.cancelTrickPlay=X.prototype.Jc;X.prototype.trickPlay=X.prototype.ld;X.prototype.getPlaybackRate=X.prototype.Za;X.prototype.isBuffering=X.prototype.Xe;X.prototype.getKeyStatuses=X.prototype.zd;X.prototype.getActiveSessionsMetadata=X.prototype.Pe;X.prototype.getExpiration=X.prototype.Uc;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Vh;X.prototype.seekRange=X.prototype.Nb;
|
|
699
|
+
X.prototype.isAudioOnly=X.prototype.Yh;X.prototype.isInProgress=X.prototype.cc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.hg;X.prototype.getAssetUri=X.prototype.wc;X.prototype.getNetworkingEngine=X.prototype.Yb;X.prototype.getMediaElement=X.prototype.Gh;X.prototype.getManifestType=X.prototype.Re;X.prototype.getLoadMode=X.prototype.Dh;X.prototype.resetConfiguration=X.prototype.zi;X.prototype.getBufferFullness=X.prototype.ig;X.prototype.getNonDefaultConfiguration=X.prototype.Hh;
|
|
700
|
+
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.vi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.dg;X.prototype.unloadAndSavePreload=X.prototype.Ni;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Ri;X.prototype.unload=X.prototype.lc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.kh;X.prototype.attach=X.prototype.pc;
|
|
700
701
|
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,mi(),3);case 3:b=k.h;case 2:var l={};if(Uc())for(var m in xi)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]=Uc()?!!xi[n]:Vc(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(Yd));
|
|
701
702
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=qe(n)?!0:Uc()?mb(n)||(mc(n)?!0:!1):Vc(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)}})};
|
|
702
703
|
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Uc()?!0:Vc("application/x-mpegurl")};X.setAdManagerFactory=function(a){$n=a};
|
|
703
|
-
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.
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
704
|
+
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.27";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})}q=rp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
705
|
+
q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
706
|
+
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
707
|
+
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
708
|
+
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",rp);rp.prototype.release=rp.prototype.release;
|
|
708
709
|
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;
|
|
709
710
|
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;
|
|
710
|
-
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.
|
|
711
|
+
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.27");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
711
712
|
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.sa(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)};
|
|
712
713
|
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",[])))}
|
|
713
714
|
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",
|
|
@@ -720,17 +721,17 @@ a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paus
|
|
|
720
721
|
a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
|
|
721
722
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
722
723
|
function yp(a,b){var c=b.getAd();c?(a.j=new rp(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new U("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):ab("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
723
|
-
function vp(a,b){a.m(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function zp(a){this.h=a||"";this.g=0}function Ap(a){Bp(a,/[ \t]+/gm)}function Bp(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Cp(a){return a.g==a.h.length?null:(a=Bp(a,/[^ \t\n]*/gm))?a[0]:null};function Dp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Bp(new zp(a),Ep),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
724
|
+
function vp(a,b){a.m(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function zp(a){this.h=a||"";this.g=0}function Ap(a){Bp(a,/[ \t]+/gm)}function Bp(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Cp(a){return a.g==a.h.length?null:(a=Bp(a,/[^ \t\n]*/gm))?a[0]:null};function Dp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Bp(new zp(a),Ep),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}q=Dp.prototype;q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
|
|
725
|
+
q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};
|
|
726
|
+
q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return this.o};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};
|
|
727
|
+
q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Dp);Dp.prototype.release=Dp.prototype.release;Dp.prototype.getPodIndex=Dp.prototype.getPodIndex;Dp.prototype.getTimeOffset=Dp.prototype.getTimeOffset;
|
|
727
728
|
Dp.prototype.getMediaUrl=Dp.prototype.getMediaUrl;Dp.prototype.getAdvertiserName=Dp.prototype.getAdvertiserName;Dp.prototype.getCreativeAdId=Dp.prototype.getCreativeAdId;Dp.prototype.getAdId=Dp.prototype.getAdId;Dp.prototype.getVastMediaWidth=Dp.prototype.getVastMediaWidth;Dp.prototype.getVastMediaHeight=Dp.prototype.getVastMediaHeight;Dp.prototype.getVastMediaBitrate=Dp.prototype.getVastMediaBitrate;Dp.prototype.getDescription=Dp.prototype.getDescription;Dp.prototype.getTitle=Dp.prototype.getTitle;
|
|
728
729
|
Dp.prototype.getPositionInSequence=Dp.prototype.getPositionInSequence;Dp.prototype.getSequenceLength=Dp.prototype.getSequenceLength;Dp.prototype.setMuted=Dp.prototype.setMuted;Dp.prototype.resize=Dp.prototype.resize;Dp.prototype.isLinear=Dp.prototype.isLinear;Dp.prototype.isMuted=Dp.prototype.isMuted;Dp.prototype.setVolume=Dp.prototype.setVolume;Dp.prototype.getVolume=Dp.prototype.getVolume;Dp.prototype.play=Dp.prototype.play;Dp.prototype.pause=Dp.prototype.pause;Dp.prototype.skip=Dp.prototype.skip;
|
|
729
|
-
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.W=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.
|
|
730
|
+
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.W=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.Hb(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()};
|
|
730
731
|
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};
|
|
731
|
-
function Ip(a,b,c){var d,e,f,g,h,k,l,m,n,p,
|
|
732
|
-
return za(
|
|
733
|
-
function Hp(a,b,c){var d,e,f,g,h,k,l,m,n,p,
|
|
732
|
+
function Ip(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=rg([b],Yf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Ad(e)),f=a.K.request(7,d),xa(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=wd(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.W,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),r=new sc(k.manifestUrl),a.l.resolve(l.resolve(r).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
733
|
+
return za(u,0)}Aa(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;H(u)})}
|
|
734
|
+
function Hp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;O(function(y){if(1==y.g)return d=rg([b],Yf()),e=a.K.request(7,d),xa(y,2),E(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=wd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),r=p.next();!r.done;r=p.next())for(u=r.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,Jp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
|
|
734
735
|
(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 za(y,0)}Aa(y);H(y)})}
|
|
735
736
|
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=rg([b.staticResource],Yf());f=a.K.request(7,e);xa(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=wd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),za(m,0);Aa(m);a.F.delete(c);H(m)})}
|
|
736
737
|
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)})}
|
|
@@ -739,30 +740,30 @@ function Mp(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if
|
|
|
739
740
|
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Op(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Gp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Gp(a);a.L=e;a.g=new Dp(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&Op(a,"breakStart");Pp(a);break}}}if(!a.g)for(d=
|
|
740
741
|
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(Lp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Gp(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
|
|
741
742
|
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new Dp(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&Op(a,"breakStart");Pp(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
742
|
-
function Gp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?Op(a,"skip"):Op(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.
|
|
743
|
+
function Gp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?Op(a,"skip"):Op(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Hb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Op(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
|
|
743
744
|
function Pp(a){var b=!1;a.h.paused?b=!0:(Op(a,"impression"),Op(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Op(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Op(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Op(a,"impression"),Op(a,"start"),b=!1):Op(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Op(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
|
|
744
745
|
d.type,d.listener)}
|
|
745
746
|
function Op(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=rg([d],Yf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
|
|
746
747
|
case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
|
|
747
|
-
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function Qp(a,b){this.g=a;this.i=null;this.h=b}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
748
|
+
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function Qp(a,b){this.g=a;this.i=null;this.h=b}q=Qp.prototype;q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
749
|
+
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.h.muted=a};
|
|
750
|
+
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};
|
|
751
|
+
q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",Qp);Qp.prototype.release=Qp.prototype.release;Qp.prototype.getPodIndex=Qp.prototype.getPodIndex;
|
|
751
752
|
Qp.prototype.getTimeOffset=Qp.prototype.getTimeOffset;Qp.prototype.getMediaUrl=Qp.prototype.getMediaUrl;Qp.prototype.getAdvertiserName=Qp.prototype.getAdvertiserName;Qp.prototype.getCreativeAdId=Qp.prototype.getCreativeAdId;Qp.prototype.getAdId=Qp.prototype.getAdId;Qp.prototype.getVastMediaWidth=Qp.prototype.getVastMediaWidth;Qp.prototype.getVastMediaHeight=Qp.prototype.getVastMediaHeight;Qp.prototype.getVastMediaBitrate=Qp.prototype.getVastMediaBitrate;Qp.prototype.getDescription=Qp.prototype.getDescription;
|
|
752
753
|
Qp.prototype.getTitle=Qp.prototype.getTitle;Qp.prototype.getPositionInSequence=Qp.prototype.getPositionInSequence;Qp.prototype.getSequenceLength=Qp.prototype.getSequenceLength;Qp.prototype.setMuted=Qp.prototype.setMuted;Qp.prototype.resize=Qp.prototype.resize;Qp.prototype.isLinear=Qp.prototype.isLinear;Qp.prototype.isMuted=Qp.prototype.isMuted;Qp.prototype.setVolume=Qp.prototype.setVolume;Qp.prototype.getVolume=Qp.prototype.getVolume;Qp.prototype.play=Qp.prototype.play;Qp.prototype.pause=Qp.prototype.pause;
|
|
753
754
|
Qp.prototype.skip=Qp.prototype.skip;Qp.prototype.canSkipNow=Qp.prototype.canSkipNow;Qp.prototype.getTimeUntilSkippable=Qp.prototype.getTimeUntilSkippable;Qp.prototype.isSkippable=Qp.prototype.isSkippable;Qp.prototype.isPaused=Qp.prototype.isPaused;Qp.prototype.getRemainingTime=Qp.prototype.getRemainingTime;Qp.prototype.getMinSuggestedDuration=Qp.prototype.getMinSuggestedDuration;Qp.prototype.getDuration=Qp.prototype.getDuration;function Rp(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new hb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Sp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
754
755
|
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Qp(f,e.l);e.A&&(e.m.i=e.A);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
755
756
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
|
|
756
757
|
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
|
|
757
|
-
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}
|
|
758
|
-
function Sp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){jg.call(this);this.g=this.h=this.i=null;this.j=new qp;this.m=navigator.language;this.l=null}qa(Y,jg);
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
(c.G=!0),c.j=new $f,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};
|
|
764
|
-
|
|
765
|
-
|
|
758
|
+
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=Rp.prototype;q.configure=function(){};q.stop=function(){this.B="";this.o=null;this.C=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.C};
|
|
759
|
+
function Sp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){jg.call(this);this.g=this.h=this.i=null;this.j=new qp;this.m=navigator.language;this.l=null}qa(Y,jg);q=Y.prototype;q.setLocale=function(a){this.m=a};q.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new sp(a,b,this.m,c,function(e){return Tp(d,e)});this.i.configure(this.l)};
|
|
760
|
+
q.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);jg.prototype.release.call(this)};q.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};q.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)};
|
|
761
|
+
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Fp(a,b,c,function(e){return Tp(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new $f,Ip(d,a,b),d.H=c||"",d.W=Date.now()/1E3,a=d.l);return a};
|
|
762
|
+
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Rp(a,b,this.m,function(d){return Tp(c,d)});this.g.configure(this.l)};
|
|
763
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.27";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
764
|
+
(c.G=!0),c.j=new $f,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.27";this.g.g.replaceAdTagParameters(a)};
|
|
765
|
+
q.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
766
|
+
q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
766
767
|
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;
|
|
767
768
|
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
|
|
768
769
|
Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";
|
|
@@ -774,37 +775,37 @@ function Wp(a){return{length:a.length,start:function(b){return a.start[b]},end:f
|
|
|
774
775
|
var Xp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Yp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Zp=["loop","playbackRate"],$p=["pause","play"],aq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
775
776
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},bq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},cq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},dq=[["getConfiguration","configure"]],eq=[["isTextTrackVisible","setTextTrackVisibility"]],fq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
776
777
|
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 Tc(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=hg(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,
|
|
777
|
-
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)}
|
|
778
|
-
|
|
779
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new $f,this.s=!0,nq(this,a)):lq=null}else window.__onGCastApiAvailable!==qq&&(rq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=qq)};
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
778
|
+
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)}q=hq.prototype;q.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()};q.$a=function(){return this.h};q.rf=function(){return this.J};
|
|
779
|
+
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.kc();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 $f;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.kc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});oq&&this.l.X(pq);(a=lq)&&
|
|
780
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new $f,this.s=!0,nq(this,a)):lq=null}else window.__onGCastApiAvailable!==qq&&(rq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=qq)};q.Bf=function(a){this.o=a;this.h&&sq(this,{type:"appData",appData:this.o})};
|
|
781
|
+
q.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 $f;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)})}q.vc=function(){if(this.h){kq(this);if(lq){mq(this);try{lq.stop(function(){},function(){})}catch(a){}lq=null}iq(this)}};
|
|
782
|
+
q.get=function(a,b){var c=this;if("video"==a){if($p.includes(b))return function(){return c.Eg.apply(c,[a,b].concat(x(La.apply(0,arguments))))}}else if("player"==a){if(cq[b]&&!this.get("player","isLive")())return function(){};if(fq.includes(b))return function(){return c.Eg.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(gq.includes(b))return function(){return c.wi.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(aq[b]||bq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
783
|
+
q.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))}
|
|
784
|
+
q.Eg=function(a,b){sq(this,{type:"call",targetName:a,methodName:b,args:La.apply(2,arguments)})};q.wi=function(a,b){var c=La.apply(2,arguments),d=new $f,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)}
|
|
784
785
|
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.kc()}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.vc(),b;}}var pq=.02,oq=!1,lq=null,rq=null,jq=new Set;
|
|
785
|
-
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;jg.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)}qa(vq,jg);
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
786
|
+
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;jg.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)}qa(vq,jg);q=vq.prototype;
|
|
787
|
+
q.destroy=function(a){a&&this.g.vc();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;jg.prototype.release.call(this);return Promise.all(a)};q.Th=function(){return this.l};q.Ih=function(){return this.s};q.lh=function(){return this.g.m&&oq};q.$a=function(){return this.g.$a()};q.rf=function(){return this.g.rf()};
|
|
788
|
+
q.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.lc(),0):b.return()})};q.Bf=function(a){this.g.Bf(a)};q.Mi=function(){uq(this.g)};q.vc=function(){this.g.vc()};
|
|
789
|
+
q.mh=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.vc();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();H(d)})};
|
|
789
790
|
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=hg(f),a.j.dispatchEvent(f))});for(var d in ig)a.m.D(a.h,ig[d],function(f){a.g.$a()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={dd:b.dd},b.dd=e,Object.defineProperty(a.l,b.dd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Cq(a,f.dd)}}(b),set:function(f){return function(g){var h=f.dd;a.g.$a()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Dq(a,
|
|
790
791
|
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Eq(a,f)}})});Fq(a);a.j=new jg;a.j.Wd=a.l;a.o=new jg;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)})}
|
|
791
792
|
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)}}
|
|
792
793
|
function Aq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.wc(),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)}
|
|
793
794
|
function xq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
794
795
|
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=
|
|
795
|
-
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.
|
|
796
|
+
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.Og(h);g&&a.h.zf(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)})}
|
|
796
797
|
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)}
|
|
797
|
-
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.Yb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.
|
|
798
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
799
|
-
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.
|
|
800
|
-
vq.prototype.getVideo=vq.prototype.
|
|
801
|
-
|
|
802
|
-
|
|
798
|
+
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.Yb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.hg()};
|
|
799
|
+
if("setVideoContainer"==b)return function(c){return a.h.Sg(c)};if(a.g.$a()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return a.g.$a()&&0==Object.keys(a.g.g.video).length&&(aq[b]||bq[b])||!a.g.$a()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
800
|
+
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.mh;vq.prototype.forceDisconnect=vq.prototype.vc;vq.prototype.suggestDisconnect=vq.prototype.Mi;vq.prototype.setAppData=vq.prototype.Bf;vq.prototype.cast=vq.prototype.cast;vq.prototype.receiverName=vq.prototype.rf;vq.prototype.isCasting=vq.prototype.$a;vq.prototype.canCast=vq.prototype.lh;vq.prototype.getPlayer=vq.prototype.Ih;
|
|
801
|
+
vq.prototype.getVideo=vq.prototype.Th;vq.prototype.destroy=vq.prototype.destroy;function Gq(a,b,c,d){jg.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 Tc(function(){Hq(e)});Iq(this)}qa(Gq,jg);q=Gq.prototype;q.isConnected=function(){return this.F};q.Zh=function(){return this.o};q.Ii=function(a){this.i=a};q.qh=function(){this.i=null};
|
|
802
|
+
q.Ji=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Hi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Gi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
803
|
+
q.destroy=function(){var a=this,b,c;return O(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.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,jg.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
|
|
803
804
|
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,
|
|
804
805
|
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 ig)a.j.D(a.h,ig[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)});
|
|
805
806
|
a.j.D(a.g,"ended",function(){(new Tc(function(){a.g&&a.g.ended&&(a.o=!0,Oq(a))})).X(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);H(c)})}
|
|
806
|
-
function Sq(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(
|
|
807
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),Rq(a));H(
|
|
807
|
+
function Sq(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,xa(r,5),E(r,a.h.load(b.manifest,b.startTime),7)):E(r,Promise.resolve(),3);case 7:za(r,3);break;case 5:return g=Aa(r),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
808
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),Rq(a));H(r)}})}function Nq(a,b,c){a.h&&(Hq(a),Kq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
808
809
|
function Hq(a){a.G.X(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.U())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+=
|
|
809
810
|
1);Qq(a)}function Qq(a){return a.A&&(a.g.duration||a.h.U())?(Uq(a),a.A=!1,!0):!1}function Uq(a,b){var c={contentId:a.h.wc(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Rq(a,void 0===b?0:b,c)}
|
|
810
811
|
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;
|
|
@@ -812,8 +813,8 @@ function Mq(a,b){var c=Vp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0
|
|
|
812
813
|
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.lc().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));
|
|
813
814
|
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)}}
|
|
814
815
|
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)}
|
|
815
|
-
S("shaka.cast.CastReceiver",Gq);Gq.prototype.destroy=Gq.prototype.destroy;Gq.prototype.setContentArtist=Gq.prototype.
|
|
816
|
-
|
|
816
|
+
S("shaka.cast.CastReceiver",Gq);Gq.prototype.destroy=Gq.prototype.destroy;Gq.prototype.setContentArtist=Gq.prototype.Gi;Gq.prototype.setContentImage=Gq.prototype.Hi;Gq.prototype.setContentTitle=Gq.prototype.Ji;Gq.prototype.clearContentMetadata=Gq.prototype.qh;Gq.prototype.setContentMetadata=Gq.prototype.Ii;Gq.prototype.isIdle=Gq.prototype.Zh;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],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
817
|
+
r||-1===u)p=br(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){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}
|
|
817
818
|
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}
|
|
818
819
|
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]=[]}
|
|
819
820
|
var jr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),kr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),lr=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
|
|
@@ -833,96 +834,98 @@ 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.
|
|
|
833
834
|
"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,
|
|
834
835
|
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.xb){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,
|
|
835
836
|
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.xb,ir(c.g,0,b.Xa),ir(c.g,0,a);return e}
|
|
836
|
-
function Pr(a,b){var c=[];try{for(;b.ma();){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
|
|
837
|
-
|
|
837
|
+
function Pr(a,b){var c=[];try{for(;b.ma();){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 r=m,u=n;if(k.g){var v=k.g;e=null;switch(r){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=
|
|
838
|
+
v;r=0;for(u=1;16>u;u++,r++)k.i[r]=k.i[u];for(u=0;1>u;u++,r++)k.i[r]=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&&
|
|
838
839
|
(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)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}
|
|
839
840
|
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}
|
|
840
841
|
Sr.prototype.init=function(a){function b(f){f=f.name;f in Ur&&(c.g=Ur[f])}var c=this,d=[],e=[];(new Kg).box("moov",Rg).box("mvex",Rg).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",Rg).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.ka();g.ka();g.ka();g.ka();d.push(h)}).box("mdia",Rg).R("mdhd",
|
|
841
842
|
function(f){f=$i(f.reader,f.version);e.push(f.timescale)}).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).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",Ug).box("sinf",Rg).box("frma",function(f){f=cj(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&&ab("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
842
|
-
Sr.prototype.parse=function(a){var b=this;if(this.g==Tr)return[];var c=[],d=0,e=[];(new Kg).box("moof",function(f){d=f.start;e=[];Rg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,
|
|
843
|
-
1];f=Zi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("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.
|
|
844
|
-
function Vr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(
|
|
845
|
-
c+(n[l].xf||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 xj;var b=[];a=Bb(a);if(!Ej(a))return b;a=this.g.parse(a);var c=a.
|
|
846
|
-
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.
|
|
847
|
-
l.
|
|
848
|
-
function cs(a,b,c,d){var e=Zr(a,c,d);if(b.
|
|
843
|
+
Sr.prototype.parse=function(a){var b=this;if(this.g==Tr)return[];var c=[],d=0,e=[];(new Kg).box("moof",function(f){d=f.start;e=[];Rg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Pc:b.h,vd:b.i,zg:[],timescale:9E4});Rg(f)}).R("trun",function(f){var g=e[e.length-1];f=aj(f.reader,f.version,f.flags);g.zg.push(f)}).R("tfhd",function(f){var g=e[e.length-1];f=Yi(f.reader,f.flags);g.Pc=f.Pc||b.h;g.vd=f.vd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).R("tfdt",function(f){var g=e[e.length-
|
|
844
|
+
1];f=Zi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("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.Pc,l.vd,g,l.zg,c)}}).parse(a,!1);return c};
|
|
845
|
+
function Vr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Gg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].sh);b.ma();){g=b.O();var p=b.S(),r=null;r=!1;h=1;switch(a.g){case Wr:r=p&31;r=6==r;break;case Xr:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].ee||0),p=(c+p)/d,h=t(Rr(b.mb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
846
|
+
c+(n[l].xf||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 xj;var b=[];a=Bb(a);if(!Ej(a))return b;a=this.g.parse(a);var c=a.Tc(),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};
|
|
847
|
+
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.Fc});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.Fc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Fc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
848
|
+
l.Fc});f.length&&(a=bs(e,k,f,c,h),0==a.length&&(a=[Od("",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(Od(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{bg:h,Pj:e,drmInfos:a,re:g,gg:!0}}
|
|
849
|
+
function cs(a,b,c,d){var e=Zr(a,c,d);if(b.gg){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.gg=!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.bg||b.bg}
|
|
849
850
|
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(jh(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 hh(c)}return""}
|
|
850
851
|
function fs(a){var b=lh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=hh(b)))return b;a=lh(a.node,"urn:microsoft:playready","pro");if(!a||!hh(a))return"";a=hh(a);a=Hd(a);a=ds(a).filter(function(c){return c.type===gs})[0];if(!a)return"";a=xd(a.value,!0);return(a=$g(a,"WRMHEADER"))?es(a):""}
|
|
851
|
-
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.
|
|
852
|
+
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.Fc];if(h){var k;if((k=lh(g.node,"urn:microsoft:playready","pro"))&&hh(k)){k=hh(k);k=Hd(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Yg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Fc){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
|
|
852
853
|
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Yg(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Od(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}
|
|
853
|
-
function is(a){var b=a.attributes.schemeIdUri,c=oh(a,"urn:mpeg:cenc:2013","default_KID"),d=mh(a,"urn:mpeg:cenc:2013","pssh").map(ih),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:Hd(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,
|
|
854
|
+
function is(a){var b=a.attributes.schemeIdUri,c=oh(a,"urn:mpeg:cenc:2013","default_KID"),d=mh(a,"urn:mpeg:cenc:2013","pssh").map(ih),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:Hd(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Fc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
854
855
|
function as(a){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=lh(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=lh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Dd(b.attributes.keyUriTemplate);
|
|
855
|
-
if(!a||!b)throw new T(2,4,4051);a=Kd(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{
|
|
856
|
+
if(!a||!b)throw new T(2,4,4051);a=Kd(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{ei:b,iv:a}}
|
|
856
857
|
var gs=1,hs=(new Map).set("com.widevine.alpha",function(a){var b=lh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=hh(b))?b:(a=lh(a.node,"urn:microsoft","laurl"))?Dd(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=lh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=hh(b))?b:(a=lh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
857
858
|
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=hh(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))&&ab("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
858
859
|
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})}
|
|
859
|
-
function ks(a,b){var c=ls(a,b,"timescale"),d=1;c&&(d=uh(c)||1);c=ls(a,b,"duration");(c=uh(c||""))&&(c/=d);var e=ls(a,b,"startNumber"),f=Number(ls(a,b,"presentationTimeOffset"))||0,g=vh(e||"");if(null==e||null==g)g=1;e=null;if(b=ms(a,b,"SegmentTimeline")){b=gh(b,"S");e=d;a=a.ba.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],
|
|
860
|
-
p)break;else if(
|
|
860
|
+
function ks(a,b){var c=ls(a,b,"timescale"),d=1;c&&(d=uh(c)||1);c=ls(a,b,"duration");(c=uh(c||""))&&(c/=d);var e=ls(a,b,"startNumber"),f=Number(ls(a,b,"presentationTimeOffset"))||0,g=vh(e||"");if(null==e||null==g)g=1;e=null;if(b=ms(a,b,"SegmentTimeline")){b=gh(b,"S");e=d;a=a.ba.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],r=nh(n,"t",vh),u=nh(n,"d",vh),v=nh(n,"r",th);n=nh(n,"k",th)||0;null!=r&&(r-=f);if(u){r=null!=r?r:l;v=v||0;if(0>v)if(p){p=nh(p,"t",vh);if(null==
|
|
861
|
+
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,Qf:r,vb:n,Ei:k.length+h}),r=l}}e=k}return{timescale:d,Ja:c,kd:g,Fb:f/d||0,Pf:f,timeline:e}}function ns(a,b){return[b(a.I),b(a.ia),b(a.ja)].filter(ze)}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}
|
|
861
862
|
function ms(a,b,c){b=ns(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=kh(d.value,c));d=b.next());return a}
|
|
862
|
-
function os(a,b,c,d,e,f){for(var g=oh(a,"http://www.w3.org/1999/xlink","href"),h=oh(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=bh("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return bg(new T(2,4,4028));if("onLoad"!=h)return bg(new T(2,4,4027));var p=Nd([d],[g]);return e.request(0,rg(p,b)).za(function(
|
|
863
|
-
[];
|
|
864
|
-
function ps(a,b,c,d,e,f){f=void 0===f?0:f;if(oh(a,"http://www.w3.org/1999/xlink","href")){var g=os(a,b,c,d,e,f);c&&(g=g.za(void 0,function(){return ps(a,b,c,d,e,f)}));return g}g=[];for(var h=t(fh(a)),k=h.next(),l={};!k.done;l={
|
|
863
|
+
function os(a,b,c,d,e,f){for(var g=oh(a,"http://www.w3.org/1999/xlink","href"),h=oh(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=bh("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return bg(new T(2,4,4028));if("onLoad"!=h)return bg(new T(2,4,4027));var p=Nd([d],[g]);return e.request(0,rg(p,b)).za(function(r){r=Zg(r.data,a.tagName);if(!r)return bg(new T(2,4,4001,g));for(a.children=
|
|
864
|
+
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return ps(a,b,c,p[0],e,f+1)})}
|
|
865
|
+
function ps(a,b,c,d,e,f){f=void 0===f?0:f;if(oh(a,"http://www.w3.org/1999/xlink","href")){var g=os(a,b,c,d,e,f);c&&(g=g.za(void 0,function(){return ps(a,b,c,d,e,f)}));return g}g=[];for(var h=t(fh(a)),k=h.next(),l={};!k.done;l={Kc:void 0},k=h.next())l.Kc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==oh(l.Kc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Kc}}(l)):"SegmentTimeline"!=l.Kc.tagName&&g.push(ps(l.Kc,b,c,d,e,f));return fg(g).za(function(){return a})}
|
|
865
866
|
;function qs(a,b,c,d,e,f,g){var h,k=(new Kg).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);}
|
|
866
|
-
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.
|
|
867
|
-
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(
|
|
867
|
+
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.Ec(),m=g.reader.Ec();g.reader.skip(2);var n=g.reader.ka();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.O(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Hi(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 Hg(this.h,0)}ss.prototype.ma=function(){return this.g.ma()};
|
|
868
|
+
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,
|
|
868
869
|
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}
|
|
869
|
-
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.ma();){var
|
|
870
|
-
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.ma();){var d=ts(b);if(241==d.id){c=xs(d);break}}return{
|
|
870
|
+
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.ma();){var r=ts(a);if(187==r.id){var u=zs(r);u&&(r=c*u.Qi,u=b+u.ui,null!=n&&m.push(new Hi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Hi(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
871
|
+
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.ma();){var d=ts(b);if(241==d.id){c=xs(d);break}}return{Qi:a,ui: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=Nd(d,[Dd(e)]));e=0;var f=null;if(b=nh(b,"range",sh))e=b.start,f=b.end;c=new Ci(function(){return d},e,f,Bs(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
|
|
871
872
|
function Cs(a,b,c){var d=Number(ls(a,Ds,"presentationTimeOffset"))||0,e=ls(a,Ds,"timescale"),f=1;e&&(f=uh(e)||1);var g=d/f||0,h=As(a,Ds,c);Es(a,h);var k=Le(a);return{Vb:function(){var l=ms(k,Ds,"RepresentationIndex");var m=k.I.La();l&&(l=Dd(l.attributes.sourceURL))&&(m=Nd(m,[l]));l=Fs(k);return Gs(k,b,h,m,l.start,l.end,g)}}}
|
|
872
|
-
function Gs(a,b,c,d,e,f,g){var h,k,l,m,n,p,
|
|
873
|
+
function Gs(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F;return O(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.rb||!a.ba.Ye,l=a.ba.start,m=a.ba.duration,n=a.I.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Da,c.pa,!0):null],p=null,E(J,Promise.all(u),2);v=J.h;w=v[0];A=v[1]||null;y=null;C=l-g;z=l;B=m?l+m:Infinity;if("mp4"==n)var K=qs(w,e,d,c,C,z,B);else{K=w;var G=new ss(A);if(440786851!=ts(G).id)throw new T(2,3,3008);var M=ts(G);if(408125543!=M.id)throw new T(2,
|
|
873
874
|
3,3009);G=M.g.byteOffset;M=new ss(M.g);for(var N=null;M.ma();){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.ma();){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;K=ts(new ss(K));if(475249515!=K.id)throw new T(2,3,3007);K=ys(K,G,N,M,d,c,C,z,B)}y=K;D=t(y);for(I=D.next();!I.done;I=
|
|
874
|
-
D.next())F=I.value,F.codecs=a.I.codecs,F.mimeType=a.I.mimeType;h.fd(y);
|
|
875
|
-
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.
|
|
876
|
-
a.ba.duration?a.ba.start+a.ba.duration:Infinity,b);g&&(g.segmentIndex=f);return{Vb:function(){f&&0!=f.getNumReferences()||f.Qd(h);return Promise.resolve(f)}}}function Js(a){return a.
|
|
877
|
-
function Ls(a,b,c,d,e,f,g,h){var k=d.
|
|
878
|
-
function Ms(a){return[a.I.
|
|
879
|
-
(p=d.segmentIndex);var
|
|
880
|
-
function Qs(a){var b=ks(a,Os),c=ls(a,Os,"media"),d=ls(a,Os,"index");return{
|
|
881
|
-
function Ss(a,b,c,d,e,f,g){function h(G){var M=(G-
|
|
882
|
-
|
|
883
|
-
h(K);N.push(L);K++}return G>l()&&!N.length?null:N})}return Promise.resolve(J)}function Ps(a,b){var c=a.I.Hd;c||(c=ls(a,Os,"initialization"));if(!c)return null;c=Dd(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.La;b=new
|
|
884
|
-
function Us(a,b,c,d,e,f,g,h,k,l){Mk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.
|
|
885
|
-
|
|
886
|
-
function Ts(a,b,c,d,e,f){Ws(a,f);if(a.h){c=a.h.timeline;a.h.Lb!==b.Lb&&(a.h.Lb=b.Lb);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.
|
|
887
|
-
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.
|
|
888
|
-
|
|
889
|
-
null==w.ke&&(w.ke=Xs(b.h.Lb,b.F,e,b.B,f,w.
|
|
875
|
+
D.next())F=I.value,F.codecs=a.I.codecs,F.mimeType=a.I.mimeType;h.fd(y);r=new Mk(y);k&&r.uc(z,B,!0);return J.return(r)})}function Ds(a){return a.Hc}function Fs(a){var b=ms(a,Ds,"RepresentationIndex");a=ls(a,Ds,"indexRange");a=sh(a||"");b&&(a=nh(b,"range",sh,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!=Td&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
876
|
+
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.Ac.length)throw new T(2,4,4002);if(!e.Ja&&!a.ba.duration&&!e.timeline&&1==e.Ac.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.ja.id&&a.I.id&&(g=b[a.ja.id+","+a.I.id])&&(f=g.segmentIndex);var h=Ls(a.ba.start,a.ba.duration,a.I.La,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.ed(h,a.presentationTimeline.ib()):f=new Mk(h);a.presentationTimeline.fd(h);a.rb&&a.ba.Ye||f.uc(a.ba.start,
|
|
877
|
+
a.ba.duration?a.ba.start+a.ba.duration:Infinity,b);g&&(g.segmentIndex=f);return{Vb:function(){f&&0!=f.getNumReferences()||f.Qd(h);return Promise.resolve(f)}}}function Js(a){return a.Gb}function Ks(a){var b=Ms(a);a=ks(a,Js);var c=a.kd;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,kd:c,Fb:a.Fb,timeline:a.timeline,Ac:b}}
|
|
878
|
+
function Ls(a,b,c,d,e,f,g,h){var k=d.Ac.length;d.timeline&&d.timeline.length!=d.Ac.length&&(k=Math.min(d.timeline.length,d.Ac.length));for(var l=a-d.Fb,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={je:void 0,fe:void 0},u++){r.fe=d.Ac[u];var v=p;p=void 0;p=null!=d.Ja?v+d.Ja:d.timeline?d.timeline[u].end:v+b;r.je=null;r=new Hi(a+v,a+p,function(w){return function(){null==w.je&&(w.je=Nd(c(),[w.fe.ki]));return w.je}}(r),r.fe.start,r.fe.end,e,l,a,m,[],"",null,null,Ii,f);r.codecs=h;r.mimeType=g;n.push(r)}return n}
|
|
879
|
+
function Ms(a){return[a.I.Gb,a.ia.Gb,a.ja.Gb].filter(ze).map(function(b){return gh(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=Dd(b.attributes.media);b=nh(b,"mediaRange",sh,{start:0,end:null});return{ki: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=Le(a);if(m.ad)return Hs(a,l),{Vb:function(){var w=js(m.ad,n.I.id,null,null,n.bandwidth||null,null);w=Nd(n.I.La(),[w]);return Gs(n,b,l,w,0,null,m.Fb)}};if(m.Ja)return d||"image"===a.ia.contentType||(a.presentationTimeline.hf(m.Ja),a.presentationTimeline.Ud(a.ba.start)),{Vb:function(){return Ss(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.ja.id&&a.I.id&&(d=a.ja.id+","+a.I.id,d=c[d])&&
|
|
880
|
+
(p=d.segmentIndex);var r=a.ba.start,u=a.ba.duration?r+a.ba.duration:Infinity,v=!(a.rb&&a.ba.Ye);p?(c=p,Ts(c,m,r,u,v,l),c.Ca(a.presentationTimeline.ib())):p=new Us(m,a.I.id,a.bandwidth,a.I.La,r,u,l,v,g,a.I.yf);m.timeline&&"image"!==a.ia.contentType&&a.presentationTimeline.yg(m.timeline,r);d&&a.rb&&(d.segmentIndex=p);return{Vb:function(){p instanceof Us&&0==p.getNumReferences()&&Ts(p,m,r,u,v,l);return Promise.resolve(p)}}}function Os(a){return a.Ob}
|
|
881
|
+
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,kd:b.kd,Fb:b.Fb,Pf:b.Pf,timeline:b.timeline,Lb:c&&Dd(c),ad:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function Rs(a){var b=a.ad?1:0;b+=a.timeline?1:0;b+=a.Ja?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.ad&&(a.timeline=null),a.Ja=null);if(!a.ad&&!a.Lb)throw new T(2,4,4002);}
|
|
882
|
+
function Ss(a,b,c,d,e,f,g){function h(G){var M=(G-v)*u,N=M+b.Fb,L=M+n;M=L+u;var P=Math.min(M,l());L=new Hi(L,P,function(){var R=N*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(N)*BigInt(w));R=js(A,C,G,null,y,R);return Nd(z(),[R])},0,null,d,B,n,l(),[],"",null,null,Ii,f);L.codecs=a.I.codecs;L.mimeType=a.I.mimeType;L.j=M;return L}function k(){var G=[Math.max(m.ib(),n),Math.min(m.Kb(),l())].map(function(M){return M-n});G=[Math.ceil(G[0]/u),Math.ceil(G[1]/u)-1];a.I.Oa&&G[1]++;return G.map(function(M){return M+
|
|
883
|
+
v})}function l(){var G=null!=p&&e[p]||r;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ba.start,p=a.ja.id,r=a.ba.duration,u=b.Ja,v=b.kd,w=b.timescale,A=b.Lb,y=a.bandwidth||null,C=a.I.id,z=a.I.La,B=n-b.Fb,D=k();c=a.rb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var I=c;I<=g;++I){var F=h(I);D.push(F)}var J=new Mk(D);D=m.Kb()<l();I=m.U();if(D||I){var K=Math.max(c,g+1);c=u;a.I.Oa&&(c=.1);J.ie(c,function(){var G=m.ib();J.Ca(G);var M=t(k());M.next();M=M.next().value;for(var N=[];K<=M;){var L=
|
|
884
|
+
h(K);N.push(L);K++}return G>l()&&!N.length?null:N})}return Promise.resolve(J)}function Ps(a,b){var c=a.I.Hd;c||(c=ls(a,Os,"initialization"));if(!c)return null;c=Dd(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.La;b=new Ci(function(){var g=js(c,d,null,null,e,null);return Nd(f(),[g])},0,null,Bs(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
|
|
885
|
+
function Us(a,b,c,d,e,f,g,h,k,l){Mk.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)}qa(Us,Mk);q=Us.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){Mk.prototype.release.call(this);this.h=null};
|
|
886
|
+
q.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())}};
|
|
887
|
+
function Ts(a,b,c,d,e,f){Ws(a,f);if(a.h){c=a.h.timeline;a.h.Lb!==b.Lb&&(a.h.Lb=b.Lb);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.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)&&Ki(c,b)}}
|
|
888
|
+
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)}}q.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};
|
|
889
|
+
q.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.Ei,f=this.h.Pf+d.Qf;c=this.j-this.h.Fb;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.vb,p={},r=0;r<d.vb;p={ke:void 0,Ug:void 0},r++){var u=d.start+n*r,v=u+n;p.Ug=r+1;p.ke=null;p=new Hi(this.j+u,this.j+v,function(w){return function(){if(!b.h)return[];
|
|
890
|
+
null==w.ke&&(w.ke=Xs(b.h.Lb,b.F,e,b.B,f,w.Ug,b.C));return w.ke}}(p),0,null,this.s,c,this.j,this.l,[],"",null,null,Ii,this.A);p.codecs=k;p.mimeType=l;0==this.G?0<r&&p.Od():0!=r%this.G&&p.Od();m.push(p)}c=new Hi(this.j+d.start,h,function(){return 0<d.vb||!b.h?[]:Xs(b.h.Lb,b.F,e,b.B,f,null,b.C)},0,null,this.s,c,this.j,this.l,m,"",null,null,Ii,this.A,0<d.vb);c.codecs=k;c.mimeType=l;c.j=g;this.g[a]=c}return c};
|
|
890
891
|
function Xs(a,b,c,d,e,f,g){a=js(a,b,c,f,d||null,e);return Nd(g(),[a]).map(function(h){return h.toString()})};function Ys(a){var b=le(a),c=b.split("/")[0];a=me(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,md:null,colorGamut:null}}
|
|
891
|
-
function Zs(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var D=B.ka(),I=B.ka();B.skip(50);n=String(D);m=String(I);z.reader.ma()&&Rg(z)}function d(z){var B=bj(z.reader);p=B.channelCount;
|
|
892
|
-
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,
|
|
892
|
+
function Zs(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var D=B.ka(),I=B.ka();B.skip(50);n=String(D);m=String(I);z.reader.ma()&&Rg(z)}function d(z){var B=bj(z.reader);p=B.channelCount;r=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");
|
|
893
|
+
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,r=null,u=null,v=null,w;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).R("mdhd",function(z){l=$i(z.reader,z.version).language}).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).box("mp4a",function(z){var B=bj(z.reader);p=B.channelCount;r=B.sampleRate;z.reader.ma()?Rg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
|
|
893
894
|
"mp4a",D,I;z.ma();){D=z.S();for(var F=z.S();F&128;)F=z.S();if(3==D)z.ka(),F=z.S(),F&128&&z.ka(),F&64&&z.skip(z.S()),F&32&&z.ka();else if(4==D)I=z.S(),z.skip(12);else if(5==D)break}I&&(B+="."+ej(I),5==D&&z.ma()&&(D=z.S(),I=(D&248)>>3,31===I&&z.ma()&&(I=32+((D&7)<<3)+((z.S()&224)>>5)),B+="."+I));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",
|
|
894
895
|
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+"."+ej(z.S())+ej(z.S())+ej(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 I=["","A","B","C"][z>>6],F=z&31,J=D.O(),K=(z&32)>>5?"H":"L";z=[D.S(),D.S(),D.S(),D.S(),D.S(),D.S()];D=D.S();for(var G=0,M=0;32>M;M++){G|=J&1;if(31==M)break;G<<=1;J>>=1}B=B+("."+I+F)+("."+
|
|
895
896
|
ej(G,!0));B+="."+K+D;I="";for(F=z.length;F--;)if((K=z[F])||I)I="."+K.toString(16).toUpperCase()+I;B+=I;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+"."+fj(z>>1&127)+"."+fj(z<<5&32|D>>3&31));k=!0}).R("vpcC",function(z){var B=w||"",D=z.reader;z=D.S();var I=D.S();D=D.S()>>4&15;g.push(B+"."+fj(z)+"."+fj(I)+"."+fj(D));k=!0}).box("av1C",
|
|
896
897
|
function(z){var B=w||"",D=z.reader;D.skip(1);z=D.S();D=D.S();var I=z>>>5,F=(D&64)>>6;g.push(B+"."+I+"."+fj(z&31)+(D>>>7?"H":"M")+"."+fj(2===I&&F?(D&32)>>5?12:10:F?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+fj(1)+"."+fj(1)+"."+fj(1)+".0");k=!0}).box("enca",Vg).box("encv",Ug).box("sinf",Rg).box("frma",function(z){z=cj(z.reader).codec;e(z)}).box("colr",function(z){g=g.map(function(I){if(I.startsWith("av01.")){var F=z.reader,J=F.ra(),K=F.mb(4);var G=String.fromCharCode(K[0]);G+=String.fromCharCode(K[1]);
|
|
897
|
-
G+=String.fromCharCode(K[2]);G+=String.fromCharCode(K[3]);if("nclx"===G){K=F.ka();G=F.ka();var M=F.ka(),N=F.S()>>7,L=I.split(".");10==L.length&&(L[6]=fj(K),L[7]=fj(G),L[8]=fj(M),L[9]=String(N),I=L.join("."))}F.seek(J)}return I});var B=dj(z.reader),D=B.colorGamut;
|
|
898
|
-
mimeType:A?"audio/mp4":"video/mp4",codecs:$s(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:
|
|
898
|
+
G+=String.fromCharCode(K[2]);G+=String.fromCharCode(K[3]);if("nclx"===G){K=F.ka();G=F.ka();var M=F.ka(),N=F.S()>>7,L=I.split(".");10==L.length&&(L[6]=fj(K),L[7]=fj(G),L[8]=fj(M),L[9]=String(N),I=L.join("."))}F.seek(J)}return I});var B=dj(z.reader),D=B.colorGamut;u=B.md;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",
|
|
899
|
+
mimeType:A?"audio/mp4":"video/mp4",codecs:$s(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:y,md: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=ke(d);b.has(e)||(c.push(d),b.add(e))}b=Ud("audio",c);d=Ud("video",c);a=Ud(Td,c);d=at(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
899
900
|
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?mb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function bt(a){var b=null;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).box("encv",Ug).box("enca",Vg).box("sinf",Rg).box("schi",Rg).R("tenc",function(c){c=c.reader;c.S();c.S();c.S();c.S();b=Ld(c.mb(16))}).parse(a,!0);return b};function ct(a){this.o=null;this.A=a;this.G=new kg;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};
|
|
900
901
|
function dt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Nd(a.i,[et(a,b)]),d=rg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),lg(a.G,e),xa(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=wd(f.data),h=JSON.parse(g),1==h.VERSION&&ft(a,h,f.uri),za(l,0);if((k=Aa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Tc(function(){dt(a,b)});a.g.X(a.C);H(l)})}
|
|
901
902
|
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)));Ic(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 Tc(function(){dt(a,d)});if(c=b.TTL)a.C=c;a.g.X(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
902
903
|
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)};
|
|
903
|
-
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={
|
|
904
|
-
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)).yb))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:Nd(a.i,d)};function it(){this.
|
|
905
|
-
function
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
function
|
|
913
|
-
|
|
914
|
-
function
|
|
904
|
+
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={Cc:void 0},f=e.next())if(g.Cc=f.value,f=b.get(g.Cc))d.push({pf:g.Cc,location:f});else if(f=a.F.find(function(k){return function(l){return l.hj==k.Cc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].bh?(h=new sc(h),uc(h,f["URI-REPLACEMENT"].bh),d.push({pf:g.Cc,location:h.toString()})):d.push({pf:g.Cc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
905
|
+
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)).yb))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:Nd(a.i,d)};function it(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=it.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[]};q.Sh=function(){return this.l};q.Se=function(){return this.j.slice()};q.zh=function(){return this.i};
|
|
906
|
+
q.cg=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==Td)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
|
|
907
|
+
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)}};
|
|
908
|
+
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(Td);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{Xf:c,Zg:d,Vg:e,pg:f}}
|
|
909
|
+
q.ve=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q;return O(function(ha){if(1==ha.g){e=Vd;if(!b&&1==a.length)return f=jt(a,!1),g=f.Xf,h=f.Zg,k=f.Vg,l=f.pg,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()),ha.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return ha.return();u=jt(a,!0);v=u.Xf;w=u.Zg;A=u.Vg;y=u.pg;
|
|
910
|
+
return E(ha,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(K=t(d.h),G=K.next();!G.done;G=K.next())for(M=G.value,N=t(d.g),L=N.next();!L.done;L=N.next())P=L.value,R=Mc(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,
|
|
911
|
+
allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),I=D.next();!I.done;I=D.next())F=I.value,J=C++,z.push({id:J,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==e.V?F:null,video:F.type==e.fa?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=z;H(ha)})};
|
|
912
|
+
function st(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L;return O(function(P){switch(P.g){case 1:b=Vd;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.V}).map(function(Q){return[kt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.fa}).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]}))});
|
|
913
|
+
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,r=tt(b.pe),p.set(nt(r),r);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(F=
|
|
914
|
+
t(v),J=F.next();!J.done;J=F.next())for(K=J.value,G=t(w),M=G.next();!M.done;M=G.next())N=M.value,L=C++,N.variantIds.push(L),K.variantIds.push(L);else for(z=w.concat(v),B=t(z),D=B.next();!D.done;D=B.next())I=D.value,I.variantIds=[C++];return P.return(w.concat(v).concat(A).concat(y))}})}
|
|
915
|
+
function pt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K;return O(function(G){switch(G.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){G.u(4);break}n=m.value;return E(G,wt(a,n,c,d,f,h,g),5);case 5:p=G.h;if(!p)throw new T(2,4,4037);m=l.next();G.u(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.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=
|
|
916
|
+
z.next())for(D=B.value,I=t(D),F=I.next(),J={};!F.done;J={Hf:void 0},F=I.next())if(J.Hf=F.value,!yt(J.Hf)&&(K=b.some(function(M){return function(N){return zt(a,M.Hf,N)}}(J))))throw new T(2,4,4037);return G.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)})}
|
|
917
|
+
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 Pk)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);H(k)})}
|
|
915
918
|
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 Pk;return E(h,Bt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Ct(g,0,e,f,0);return g}
|
|
916
919
|
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==Ge(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)}}
|
|
917
|
-
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=
|
|
918
|
-
function ut(a){
|
|
919
|
-
function rt(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:
|
|
920
|
-
d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=qt(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
|
|
920
|
+
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):
|
|
921
|
+
null;b.trickModeVideo=null;return b}function ut(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set;b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
|
|
922
|
+
function rt(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Mc(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,
|
|
923
|
+
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=qt(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
|
|
921
924
|
for(var g=new Pk,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),rt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),rt(a.trickModeVideo,b))}
|
|
922
925
|
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)}
|
|
923
926
|
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}
|
|
924
927
|
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}
|
|
925
|
-
function Kt(a,b){return a.mimeType!=b.mimeType?!1:Lt(a.codecs)===Lt(b.codecs)}
|
|
928
|
+
function Kt(a,b){return a.mimeType!=b.mimeType?!1:Lt(a.codecs)===Lt(b.codecs)}q.Jg=function(a){this.o=a};q.Qg=function(a){this.s=a};function zt(a,b,c){return!Kt(b,c)&&!a.o||b.drmInfos&&!Lc(b.drmInfos,c.drmInfos)?!1:!0}function Et(a,b){return b.language?a.forced!==b.forced||0==Ge(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Ft(){return!0}
|
|
926
929
|
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=Ge(a.language,b.language);e=Ge(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<
|
|
927
930
|
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}
|
|
928
931
|
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}
|
|
@@ -932,95 +935,96 @@ function tt(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType
|
|
|
932
935
|
function ot(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Mk([]),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}}
|
|
933
936
|
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 Td:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
934
937
|
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])}
|
|
935
|
-
function nt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Lt(a){if(!Rt.has(a)){var b=de(a);Rt.set(a,b)}return Rt.get(a)}S("shaka.util.PeriodCombiner",it);it.prototype.setUseStreamOnce=it.prototype.
|
|
936
|
-
var
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
938
|
+
function nt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Lt(a){if(!Rt.has(a)){var b=de(a);Rt.set(a,b)}return Rt.get(a)}S("shaka.util.PeriodCombiner",it);it.prototype.setUseStreamOnce=it.prototype.Qg;it.prototype.setAllowMultiTypeVariants=it.prototype.Jg;it.prototype.combinePeriods=it.prototype.ve;it.prototype.deleteStream=it.prototype.cg;it.prototype.getImageStreams=it.prototype.zh;it.prototype.getTextStreams=it.prototype.Se;it.prototype.getVariants=it.prototype.Sh;
|
|
939
|
+
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=zd(a);return St(c,b)}catch(d){return null}}
|
|
940
|
+
var Tt=new Kc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Vt(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.aa=1;this.F=[];this.l={Sd:"",type:"",profiles:[],Cb:null,Oa:0,La:null,hd:0};this.s=new Map;this.o={};this.B={};this.W={};this.m=new it;this.H=0;this.$=new Wa(5);this.J=new Tc(function(){Wt(a)});this.N=new kg;this.K=null;this.C=[];this.L=Infinity;this.G=!1;this.h=null;this.P=!1}q=Vt.prototype;
|
|
941
|
+
q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.J.kc();this.h&&this.h.configure(this.g);this.m&&(this.m.Jg(this.g.dash.multiTypeVariantsAllowed&&pb()),this.m.Qg(this.g.dash.useStreamOnceInPeriodFlattening))};q.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)})};
|
|
942
|
+
q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Sd:"",type:"",profiles:[],Cb:null,Oa:0,La:null,hd:0};this.m=null;null!=this.J&&(this.J.stop(),this.J=null);this.h&&this.h.destroy();return this.N.destroy()};
|
|
943
|
+
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return xa(c,2),E(c,Xt(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Kb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Yt(this,0))}}};
|
|
944
|
+
q.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
941
945
|
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=rg(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.$.sample(1,l);return m.return(l)})}
|
|
942
|
-
function au(a,b,c,d){var e,f,g,h,k,l,m,n,p,
|
|
943
|
-
p=a.g.dash.xlinkFailGracefully;
|
|
944
|
-
function cu(a,b,c){var d,e,f,g,h,k,l,m,n,p,
|
|
945
|
-
b.attributes.id||"";a.l.hd=nh(b,"publishTime",qh)||0;a.F=gh(b,"PatchLocation");
|
|
946
|
-
K.next())M=G.value,N=M.attributes.serviceLocation,L=ih(M),N&&L&&(gt(a.h,"BaseURL",N,L),J=!0);J&&a.h||(P=I.map(ih),F=Nd(d,P));R=function(){return a.h&&J?ht(a.h,"BaseURL"):F?F:[]};a.l.La=R;Q=0;I&&I.length&&(Q=nh(I[0],"availabilityTimeOffset",wh)||0);a.l.Oa=Q;ha=a.g.dash.ignoreMinBufferTime;ba=0;ha||(ba=nh(b,"minBufferTime",rh)||0);a.H=nh(b,"minimumUpdatePeriod",rh,-1);
|
|
947
|
-
nh(b,"suggestedPresentationDelay",rh));Na=a.g.dash.ignoreMaxSegmentDuration;
|
|
948
|
-
Ca.jc("static"==ua);(ge=Ca.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Ka=a.g.availabilityWindowOverride);null==Ka&&(Ka=Infinity);Ca.ge(Ka);he=b.attributes.profiles||"";a.l.profiles=he.split(",");ie={rb:"static"!=ua,presentationTimeline:Ca,ja:null,ba:null,ia:null,I:null,bandwidth:0,Ue:!1,Oa:Q,
|
|
949
|
-
a.j.isLowLatencyMode());a.G?Ca.
|
|
950
|
-
offlineSessionIds:[],minBufferTime:ba||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:gu(b),nextUrl:hu(b)};if(!Ca.
|
|
951
|
-
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.
|
|
952
|
-
function bu(a,b){var c,d,e,f,g,h,k,l,m,n,p,
|
|
953
|
-
L}}else if("type"===n.
|
|
954
|
-
"";for(var Q=t(P),ha=Q.next();!ha.done;ha=Q.next())ha=a.
|
|
955
|
-
lu(a,F);J=t(f);for(K=J.next();!K.done;K=J.next())G=K.value,e.push.apply(e,x(eu(a,{rb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,ja:null,ba:null,ia:null,I:null,bandwidth:0,Ue:!1,Oa:a.l.Oa,profiles:a.l.profiles,
|
|
956
|
-
function ju(a,b){for(var c=t(a.
|
|
957
|
-
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.
|
|
958
|
-
","+a.I.id);return b}function lu(a,b){var c=a.
|
|
946
|
+
function au(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=mm;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=Ad(h.outerHTML)}k=Zg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=nm;l!=m&&l(k);if("Patch"===d)return v.return(bu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(cu(a,k,c));
|
|
947
|
+
p=a.g.dash.xlinkFailGracefully;r=ps(k,a.g.retryParameters,p,c,a.j.networkingEngine);lg(a.N,r);return E(v,r.promise,2)}u=v.h;return v.return(cu(a,u,c))})}
|
|
948
|
+
function cu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ha,ba,oa,Ka,wa,ta,Na,Va,ua,Ca,ob,Pc,fe,qd,Hc,ge,he,ie,rd,Di,yg,Ei,Fi,zg,je;return O(function(jc){switch(jc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=gh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=ih(l))p=Nd(d,[n])[0],m&&(a.h?gt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=ht(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Sd=
|
|
949
|
+
b.attributes.id||"";a.l.hd=nh(b,"publishTime",qh)||0;a.F=gh(b,"PatchLocation");u=Promise.resolve();if((v=kh(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=ih(v))(y=nh(v,"queryBeforeStart",xh,!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)}I=gh(b,"BaseURL");J=!1;if(a.h)for(K=t(I),G=K.next();!G.done;G=
|
|
950
|
+
K.next())M=G.value,N=M.attributes.serviceLocation,L=ih(M),N&&L&&(gt(a.h,"BaseURL",N,L),J=!0);J&&a.h||(P=I.map(ih),F=Nd(d,P));R=function(){return a.h&&J?ht(a.h,"BaseURL"):F?F:[]};a.l.La=R;Q=0;I&&I.length&&(Q=nh(I[0],"availabilityTimeOffset",wh)||0);a.l.Oa=Q;ha=a.g.dash.ignoreMinBufferTime;ba=0;ha||(ba=nh(b,"minBufferTime",rh)||0);a.H=nh(b,"minimumUpdatePeriod",rh,-1);oa=nh(b,"availabilityStartTime",qh);Ka=nh(b,"timeShiftBufferDepth",rh);wa=a.g.dash.ignoreSuggestedPresentationDelay;ta=null;wa||(ta=
|
|
951
|
+
nh(b,"suggestedPresentationDelay",rh));Na=a.g.dash.ignoreMaxSegmentDuration;Va=null;Na||(Va=nh(b,"maxSegmentDuration",rh));ua=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.P=a.i.presentationTimeline.U()&&"static"==ua);a.l.type=ua;du(a);if(a.i)for(Ca=a.i.presentationTimeline,ob=t(Object.values(a.o)),Pc=ob.next();!Pc.done;Pc=ob.next())fe=Pc.value,fe.segmentIndex&&fe.segmentIndex.Ca(Ca.ib());else qd=a.g.defaultPresentationDelay||1.5*ba,Hc=null!=ta?ta:qd,Ca=new qk(oa,Hc,a.g.dash.autoCorrectDrift);
|
|
952
|
+
Ca.jc("static"==ua);(ge=Ca.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Ka=a.g.availabilityWindowOverride);null==Ka&&(Ka=Infinity);Ca.ge(Ka);he=b.attributes.profiles||"";a.l.profiles=he.split(",");ie={rb:"static"!=ua,presentationTimeline:Ca,ja:null,ba:null,ia:null,I:null,bandwidth:0,Ue:!1,Oa:Q,Cb:null,profiles:he.split(",")};rd=eu(a,ie,R,b,!1);Di=rd.duration;yg=rd.periods;("static"!=ua||a.P)&&rd.eg||Ca.Ua(Di||Infinity);a.L&&!a.G&&(Ei=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.G=
|
|
953
|
+
a.j.isLowLatencyMode());a.G?Ca.Kg(a.L):a.L&&ab("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");Ca.hf(Va||1);return E(jc,u,2);case 2:return a.G&&(ba=0,Fi=null!=ta?ta:a.g.defaultPresentationDelay,Ca.Cf(Fi)),a.i?E(jc,fu(a,rd.periods,!1),4):E(jc,a.m.ve(yg,ie.rb),6);case 6:a.i={presentationTimeline:Ca,variants:a.m.l,textStreams:a.m.Se(),imageStreams:a.m.i,
|
|
954
|
+
offlineSessionIds:[],minBufferTime:ba||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:gu(b),nextUrl:hu(b)};if(!Ca.Xg()){jc.u(7);break}zg=gh(b,"UTCTiming");return E(jc,iu(a,R,zg),8);case 8:je=jc.h;if(!a.j)return jc.return();Ca.Lg(je);case 7:Ca.Md();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(jc)}})}
|
|
955
|
+
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);H(e)})}
|
|
956
|
+
function bu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M;return O(function(N){if(1==N.g){c=b.attributes.mpdId;d=nh(b,"originalPublishTime",qh);if(!c||c!==a.l.Sd||d!==a.l.hd)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(fh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=zh(l.attributes.sel||""),n=m[m.length-1],p=ih(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Ib){r=ih(l)||"";var L=rh(r);if(null!=L){a.l.Cb=L;for(var P=t(a.s.values()),R=P.next();!R.done;R=P.next())R.value.Cb=
|
|
957
|
+
L}}else if("type"===n.Ib){a.i.presentationTimeline.jc("static"==p);a.l.type=p;L=t(a.s.values());for(P=L.next();!P.done;P=L.next())P.value.rb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.Ib?a.l.hd=qh(p)||0:null===n.Ib&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Ah(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=zh(l.attributes.sel||"");L=P[P.length-1];if(L.Ib){P=ku(a,P);R=ih(l)||
|
|
958
|
+
"";for(var Q=t(P),ha=Q.next();!ha.done;ha=Q.next())ha=a.s.get(ha.value),Ch(ha.I.Ob,l.tagName,L.Ib,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=zh(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=gh(R,"S"),Ah(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(I=D.next();!I.done;I=D.next())F=I.value,
|
|
959
|
+
lu(a,F);J=t(f);for(K=J.next();!K.done;K=J.next())G=K.value,e.push.apply(e,x(eu(a,{rb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,ja:null,ba:null,ia:null,I:null,bandwidth:0,Ue:!1,Oa:a.l.Oa,profiles:a.l.profiles,Cb:a.l.Cb},a.l.La,G,!0).periods));return e.length?E(N,fu(a,e,!0),2):N.u(2)}"static"==a.l.type&&(M=a.l.Cb,a.i.presentationTimeline.Ua(M||Infinity));H(N)})}
|
|
960
|
+
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})}
|
|
961
|
+
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.ja.id===c&&a.ia.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.ja.id===c&&a.ia.position===e&&a.I.id&&b.push(c+
|
|
962
|
+
","+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.W,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.Vb(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.I.contentType,b!=Td&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
959
963
|
function gu(a){var b=kh(a,"ServiceDescription");if(!b)return null;a=kh(b,"Latency");b=kh(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)));
|
|
960
964
|
return c}function hu(a){a=gh(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}
|
|
961
|
-
function eu(a,b,c,d,e){var f=b.
|
|
962
|
-
(a.K=p);k=nu(a,b,c,{start:p,duration:
|
|
963
|
-
function du(a){var b=Object.keys(a.
|
|
964
|
-
function nu(a,b,c,d){b.ja=ou(a,d.node,null,c);b.ba=d;b.ja.Oa=b.Oa;b.ja.id||(b.ja.id="__shaka_period_"+d.start);var e=gh(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=gh(d.node,"AdaptationSet").map(function(m,n){return qu(a,b,n,m)}).filter(ze);if(b.rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.
|
|
965
|
-
4,4018);}d=c.filter(function(m){return!m.Nf});c=c.filter(function(m){return m.Nf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Nf.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={
|
|
965
|
+
function eu(a,b,c,d,e){var f=b.Cb;f||(f=nh(d,"mediaPresentationDuration",rh),a.l.Cb=f);var g=0;a.i&&a.i.presentationTimeline&&a.P&&(g=a.i.presentationTimeline.Ab());var h=[],k=g;d=gh(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=nh(m,"start",rh,k),r=m.attributes.id,u=nh(m,"duration",rh),v=null;if(n){var w=nh(n,"start",rh);null!=w&&(v=w-p)}else null!=f&&(v=f-p+g);null==v&&(v=u);if(!(null!==a.K&&null!==r&&null!==p&&p<a.K)||a.C.includes(r)||l+1==d.length){null!==p&&(null===a.K||p>a.K)&&
|
|
966
|
+
(a.K=p);k=nu(a,b,c,{start:p,duration:v,node:m,Ye:null==v||!n});h.push(k);b.ja.id&&v&&(a.W[b.ja.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,eg:!1}:{periods:h,duration:k,eg:!0}}
|
|
967
|
+
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.cg(a.o[e],c),delete a.o[e];delete a.B[c]}}
|
|
968
|
+
function nu(a,b,c,d){b.ja=ou(a,d.node,null,c);b.ba=d;b.ja.Oa=b.Oa;b.ja.id||(b.ja.id="__shaka_period_"+d.start);var e=gh(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=gh(d.node,"AdaptationSet").map(function(m,n){return qu(a,b,n,m)}).filter(ze);if(b.rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.yi);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,
|
|
969
|
+
4,4018);}d=c.filter(function(m){return!m.Nf});c=c.filter(function(m){return m.Nf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Nf.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={Gf:void 0},k=h.next())l.Gf=k.value,l.Gf.trickModeVideo=e.streams.find(function(m){return function(n){return de(m.Gf.codecs)==de(n.codecs)}}(l))}}c=ru(a.g.disableAudio,d,"audio");e=ru(a.g.disableVideo,d,"video");f=ru(a.g.disableText,
|
|
966
970
|
d,Td);d=ru(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.ja.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},[])}
|
|
967
971
|
function qu(a,b,c,d){function e(G){switch(G){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ia=ou(a,d,b.ja,null);b.ia.position=c;var g=!1;c=gh(d,"Role");var h=c.map(function(G){return G.attributes.value}).filter(ze),k=void 0,l=b.ia.contentType==Td;l&&(k="subtitle");c=t(c);for(var m=c.next();!m.done;m=c.next()){m=m.value;var n=m.attributes.schemeIdUri;
|
|
968
|
-
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,
|
|
969
|
-
"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?
|
|
970
|
-
var y=new Map,C;n=t(n);for(
|
|
971
|
-
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"+
|
|
972
|
-
(m=gh(d,"Label"))&&m.length&&(m=hh(m[0]))&&(K=m);m=gh(d,"Representation");d=m.map(function(G){if(G=su(a,b,F,k,J,K,g,h,y,G,C,A))G.hdr=G.hdr||p,G.colorGamut=G.colorGamut||
|
|
973
|
-
b.ia.contentType;l=b.ia.id||"__fake__"+a.aa++;n=t(d);for(
|
|
974
|
-
function su(a,b,c,d,e,f,g,h,k,l,m,n){b.I=ou(a,l,b.ia,null);var p=b.I.id;a.L=Math.min(a.L,b.I.Oa);if(!uu(b.I))return null;var
|
|
975
|
-
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;H(P)})}}}b.I.aesKey=w;A=function(M,N,L,P){return mu(a,M,N,L,P)};if(b.I.
|
|
976
|
-
N.codecs=F});return Promise.resolve(M)}}}}catch(M){if((u
|
|
977
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(M.attributes.schemeIdUri)}))&&(J=l.attributes.value),!J))return null;var K;
|
|
978
|
-
(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:
|
|
979
|
-
closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Xd(b.I.mimeType,b.I.codecs)])};G.createSegmentIndex=function(){var M;return O(function(N){if(1==N.g){if(G.segmentIndex)return N.u(0);M=G;return E(N,z.Vb(),3)}M.segmentIndex=N.h;H(N)})};l&&b.rb&&!a.
|
|
980
|
-
function
|
|
972
|
+
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,r;n=gh(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?r=e(parseInt(v.attributes.value,10)):
|
|
973
|
+
"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=gh(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&&(r=e(parseInt(v.attributes.value,10)));n=gh(d,"Accessibility");
|
|
974
|
+
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,I=B=void 0;D.includes("=")?(D=D.split("="),B=D[0].startsWith("CC")?D[0]:"CC"+D[0],I=D[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,I=D);y.set(B,Ce(I))}}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=
|
|
975
|
+
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,Ce(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=gh(d,"ContentProtection");var F=Zr(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=Ce(b.ia.language||"und"),K=d.attributes.label;
|
|
976
|
+
(m=gh(d,"Label"))&&m.length&&(m=hh(m[0]))&&(K=m);m=gh(d,"Representation");d=m.map(function(G){if(G=su(a,b,F,k,J,K,g,h,y,G,C,A))G.hdr=G.hdr||p,G.colorGamut=G.colorGamut||r,G.fastSwitching=u;return G}).filter(function(G){return!!G});if(0==d.length){c="image"==b.ia.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new T(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=tu(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=
|
|
977
|
+
b.ia.contentType;l=b.ia.id||"__fake__"+a.aa++;n=t(d);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(F.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(G){return G.attributes.id}).filter(ze);return{id:l,contentType:b.ia.contentType,language:J,Qj:g,streams:d,drmInfos:F.drmInfos,Nf:c,yi:m}}
|
|
978
|
+
function su(a,b,c,d,e,f,g,h,k,l,m,n){b.I=ou(a,l,b.ia,null);var p=b.I.id;a.L=Math.min(a.L,b.I.Oa);if(!uu(b.I))return null;var r=b.ba.start;b.bandwidth=nh(l,"bandwidth",uh)||0;var u=b.I.contentType,v=u==Td||"application"==u;u="image"==u;try{var w=void 0;if(c.re){var A=b.I.La,y=Nd(A(),[c.re.ei]),C=rg(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||
|
|
979
|
+
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;H(P)})}}}b.I.aesKey=w;A=function(M,N,L,P){return mu(a,M,N,L,P)};if(b.I.Hc)var z=Cs(b,A,w);else if(b.I.Gb)z=Is(b,a.o,w);else if(b.I.Ob)z=Ns(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.W,w,n,!1);else{var B=b.ba.duration||0,D=b.I.La,I=b.I.mimeType,F=b.I.codecs;z={Vb:function(){var M=Ok(r,B,D());M.Tb(function(N){N.mimeType=I;
|
|
980
|
+
N.codecs=F});return Promise.resolve(M)}}}}catch(M){if((v||u)&&4002==M.code)return null;throw M;}n=gh(l,"ContentProtection");n=cs(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;gh(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 J;if(u&&((l=gh(l,"EssentialProperty").find(function(M){return["http://dashif.org/thumbnail_tile",
|
|
981
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(M.attributes.schemeIdUri)}))&&(J=l.attributes.value),!J))return null;var K;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"))&&(K="PQ");l=b.I.id?b.ja.id+","+b.I.id:"";a.F.length&&p&&a.s.set(b.ja.id+","+p,vu(b));var G=l&&a.o[l]?a.o[l]:{id:a.aa++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&
|
|
982
|
+
(G.segmentIndex.release(),G.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.ia.language,label:f,type:b.ia.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.I.Vd,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:A,
|
|
983
|
+
closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Xd(b.I.mimeType,b.I.codecs)])};G.createSegmentIndex=function(){var M;return O(function(N){if(1==N.g){if(G.segmentIndex)return N.u(0);M=G;return E(N,z.Vb(),3)}M.segmentIndex=N.h;H(N)})};l&&b.rb&&!a.o[l]&&(b=b.ja.id||"",a.B[b]||(a.B[b]=[]),a.o[l]=G,a.B[b].push(l));return G}
|
|
984
|
+
function vu(a){function b(c){if(!c)return null;c=Le(c);c.Hc=null;c.Gb=null;c.Ob=Eh(c.Ob);return c}a=Le(a);a.ja=b(a.ja);a.ia=b(a.ia);a.I=b(a.I);a.ba&&(a.ba=Le(a.ba),a.ba.node=null);return a}
|
|
981
985
|
function Wt(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,xa(d,2),E(d,Xt(a),4);case 4:b=d.h;za(d,3);break;case 2:if(c=Aa(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);H(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.X(Math.max(c-b,Xa(a.$)))}}
|
|
982
986
|
function ou(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vd:null,audioSamplingRate:null,Oa:0,yf:0};d=d||c.La;var e=b.attributes.id,f=gh(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=ih(m);l&&m&&(gt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(ih));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=oh(b,
|
|
983
|
-
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=$s(m).join(",");n=nh(b,"frameRate",yh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,
|
|
984
|
-
wh)||0:0;y=c.Oa+z+y+C;C=null;(z=kh(b,"SegmentSequenceProperties"))&&(z=kh(z,"SAP"))&&(C=nh(z,"cadence",th));return{La:function(){return Nd(d(),f.length?a.h&&h?ht(a.h,e):g?g:[]:[])},
|
|
987
|
+
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=$s(m).join(",");n=nh(b,"frameRate",yh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=Iu(gh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=gh(b,"AudioChannelConfiguration");u=Ju(u)||c.Vd;var v=nh(b,"audioSamplingRate",vh)||c.audioSamplingRate;k||(k=tu(l,m));var w=kh(b,"SegmentBase"),A=kh(b,"SegmentTemplate"),y=w?nh(w,"availabilityTimeOffset",wh)||0:0,C=A?nh(A,"availabilityTimeOffset",wh)||0:0,z=f&&f.length?nh(f[0],"availabilityTimeOffset",
|
|
988
|
+
wh)||0:0;y=c.Oa+z+y+C;C=null;(z=kh(b,"SegmentSequenceProperties"))&&(z=kh(z,"SAP"))&&(C=nh(z,"cadence",th));return{La:function(){return Nd(d(),f.length?a.h&&h?ht(a.h,e):g?g:[]:[])},Hc:w||c.Hc,Gb:kh(b,"SegmentList")||c.Gb,Ob:A||c.Ob,width:nh(b,"width",vh)||c.width,height:nh(b,"height",vh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,Vd:u,audioSamplingRate:v,Oa:y,Hd:null,yf:C||c.yf}}
|
|
985
989
|
function Iu(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}
|
|
986
990
|
function Ju(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
987
|
-
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function uu(a){var b=a.
|
|
991
|
+
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function uu(a){var b=a.Hc?1:0;b+=a.Gb?1:0;b+=a.Ob?1:0;if(0==b)return a.contentType==Td||"application"==a.contentType?!0:!1;1!=b&&(a.Hc&&(a.Gb=null),a.Ob=null);return!0}
|
|
988
992
|
function Ku(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=Nd(b(),e),g=rg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),lg(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=wd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
989
993
|
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;xa(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);
|
|
990
994
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,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:za(n,
|
|
991
995
|
3);break;case 5:Aa(n);case 3:g=f.next();n.u(2);break;case 4:return ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
992
|
-
function pu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=nh(d,"timescale",vh)||1;d=t(gh(d,"Event"));for(var
|
|
996
|
+
function pu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=nh(d,"timescale",vh)||1,k=nh(d,"presentationTimeOffset",vh)||0;d=t(gh(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=nh(l,"presentationTime",vh)||0,n=nh(l,"duration",vh)||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:Dh(l),eventNode:Eh(l)},a.j.onTimelineRegionAdded(l))}}
|
|
993
997
|
function mu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=xg,g=e?0:1,h=ql(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=Xd(a,b);return qe(b)?Td:a.split("/")[0]}function $t(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);lg(a.N,b);return b.promise}
|
|
994
|
-
function Zt(a){var b=a.l.hd;if(!a.l.Sd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=vh(e.attributes.ttl);return!e||b+e>c}).map(ih).filter(ze);return d.length?Nd(a.A,d):[]}S("shaka.dash.DashParser",Vt);xi["application/dash+xml"]=function(){return new Vt};xi["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={
|
|
998
|
+
function Zt(a){var b=a.l.hd;if(!a.l.Sd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=vh(e.attributes.ttl);return!e||b+e>c}).map(ih).filter(ze);return d.length?Nd(a.A,d):[]}S("shaka.dash.DashParser",Vt);xi["application/dash+xml"]=function(){return new Vt};xi["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={Rj: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};
|
|
995
999
|
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.vb=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):[]}
|
|
996
1000
|
function av(a,b,c){if(!b.length)return[];b=Nd(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}
|
|
997
1001
|
function cv(a,b){b=wd(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=
|
|
998
1002
|
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"==
|
|
999
1003
|
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)}
|
|
1000
1004
|
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 dg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return bg(c)}}
|
|
1001
|
-
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=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",gv);gv.parse=hv;ng("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(Td,new Map);this.N.set("image",new Map);this.
|
|
1002
|
-
this.K=new Map;this.wa=new Map;this.na=new Map;this.hb=this.C=!1;this.
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
+
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=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",gv);gv.parse=hv;ng("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(Td,new Map);this.N.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.L="";this.ya=new bv;this.J=-1;this.aa=Infinity;this.$=this.qb=!1;this.A=new Tc(function(){kv(a)});this.oa=lv;this.o=null;this.Fa=0;this.m=Infinity;this.xa=this.ua=this.P=0;this.W=new kg;this.F=new Map;this.G=new Map;this.ca=new Map;this.ha=new Map;
|
|
1006
|
+
this.K=new Map;this.wa=new Map;this.na=new Map;this.hb=this.C=!1;this.Ka=new Wa(5);this.j=null;this.ea=!0}q=jv.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};q.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)})};
|
|
1007
|
+
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=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.ca.clear();this.ha.clear();this.K.clear();this.wa.clear();this.na.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
1008
|
+
q.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.Yc});d.length&&!h&&(k=rv,sv(a,k.dh),l=d.map(function(n){return n.Bb}),a.l.Ua(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
1005
1009
|
h&&tv(a);H(m)})};function uv(a,b){return ov(a)?a.N.get(b.type):b.Pd}
|
|
1006
|
-
function pv(a,b){var c,d,e,f,g,h,k,l,m,n,p,
|
|
1007
|
-
b.M().includes(m)||b.
|
|
1008
|
-
0,J=yv(D,z),K=J.kb,G=J.lb,b.kb=K+F,b.lb=G,M=
|
|
1010
|
+
function pv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,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.sd&&(0<=b.kb&&h.add("_HLS_msn",String(b.kb)),0<=b.lb&&h.add("_HLS_part",String(b.lb))),b.td&&h.add("_HLS_skip","YES"),Ic(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.ya,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
|
|
1011
|
+
b.M().includes(m)||b.Dg.push(m);n=Wu(l.g,"EXT-X-DEFINE");p=vv(a,n,m);r=b.stream;u=uv(a,b);return E(R,wv(a,l,r.mimeType,b.M,p),3)}v=R.h;w=v.keyIds;A=v.drmInfos;y=function(Q,ha){return Q.size===ha.size&&[].concat(x(Q)).every(function(ba){return ha.has(ba)})};y(r.keyIds,w)||(r.keyIds=w,r.drmInfos=A,a.h.newDrmInfo(r));C=xv(a,l,u,p,b.M,b.type);z=C.segments;if(B=C.bandwidth)r.bandwidth=B;r.segmentIndex.ed(z,a.l.ib());z.length&&(D=Zu(l.g,"EXT-X-MEDIA-SEQUENCE",0),F=(I=Yu(l.g,"EXT-X-SKIP"))?Number(Z(I,"SKIPPED-SEGMENTS")):
|
|
1012
|
+
0,J=yv(D,z),K=J.kb,G=J.lb,b.kb=K+F,b.lb=G,M=u.get(D),r.segmentIndex.Ca(M));N=r.segmentIndex.g[0]||null;b.ec=N.startTime;L=z[z.length-1];b.Bb=L.endTime;if(P=Yu(l.g,"EXT-X-ENDLIST"))b.Yc=!0;zv(a,l);H(R)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
1009
1013
|
function Av(a,b){for(var c=-1==a.J,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=uv(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.J=Math.max(a.J,k));e.Ae=k;break}}}}if(!(0>a.J))for(b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,Bv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.Ae,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Cv(a,
|
|
1010
1014
|
c,d)}
|
|
1011
1015
|
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)$a("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.Jf(b)}}}}
|
|
1012
|
-
function Cv(a,b,c){b.ec+=c;b.
|
|
1013
|
-
function nv(a,b,c){var d,e,f,g,h,k,l,m,n,p,
|
|
1014
|
-
|
|
1016
|
+
function Cv(a,b,c){b.ec+=c;b.Bb+=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()}
|
|
1017
|
+
function nv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ha,ba,oa,Ka,wa,ta,Na,Va;return O(function(ua){switch(ua.g){case 1:d=cv(a.ya,b);e=Wu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new qk(null,0);a.l.jc(!0);k=function(){return[c]};if(1==d.type)return a.ea=!1,w=Wu(d.g,"EXT-X-DEFINE"),A=vv(a,w,a.L),E(ua,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");r=Wu(d.g,"EXT-X-SESSION-KEY");
|
|
1018
|
+
u=Wu(d.g,"EXT-X-SESSION-DATA");v=Wu(d.g,"EXT-X-CONTENT-STEERING");Gv(a,u);return E(ua,Hv(a,v),4);case 4:return Iv(a,m),Jv(a,l),E(ua,Kv(a,m,r,l,k,a.s),5);case 5:return f=ua.h,g=Lv(a,l),E(ua,Mv(a,n,p),6);case 6:h=ua.h;ua.u(3);break;case 7:return y=ua.h,C=y.type,z=y.mimeType,B=y.codecs,D=y.language,I=y.height,F=y.width,J=y.channelCount,K=y.sampleRate,G=y.closedCaptions,M=y.md,N=y.colorGamut,E(ua,Nv(a,a.B++,A,d,k,B,C,D,!0,"Media Playlist",J,G,null,!1,K,!1,z),8);case 8:L=ua.h,a.i.set(c,L),"video"==C&&
|
|
1015
1019
|
Ov(L.stream,F,I,null,M,null,N),f.push({id:0,language:Ce(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.X(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,
|
|
1016
|
-
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){ua.u(9);break}Q=[];ha=t(a.o.variants);for(ba=ha.next();!ba.done;ba=ha.next())
|
|
1017
|
-
[];wa=f[0];ta=t([wa.video,wa.audio]);for(Na=ta.next();!Na.done;Na=ta.next())(
|
|
1018
|
-
function Ev(a,b,c,d){var e,f,g,h,k,l,m,n,p,
|
|
1019
|
-
t(Uv(null,y.value)),w=C.next().value,A=C.next().value;z=ql(g,w,A,a.g.retryParameters);return E(J,Tv(a,z,n,{type:1}),4);case 4:B=J.h;(D=B.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var K=B.data;var G=Bb(K);G=(new xj).parse(G);var M=G.
|
|
1020
|
+
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){ua.u(9);break}Q=[];ha=t(a.o.variants);for(ba=ha.next();!ba.done;ba=ha.next())oa=ba.value,oa.audio&&""===oa.audio.codecs&&Q.push(oa.audio.createSegmentIndex()),oa.video&&""===oa.video.codecs&&Q.push(oa.video.createSegmentIndex());return E(ua,Promise.all(Q),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){Ka=
|
|
1021
|
+
[];wa=f[0];ta=t([wa.video,wa.audio]);for(Na=ta.next();!Na.done;Na=ta.next())(Va=Na.value)&&!Va.segmentIndex&&Ka.push(Va.createSegmentIndex());if(0<Ka.length)return E(ua,Promise.all(Ka),0)}ua.u(0)}})}
|
|
1022
|
+
function Ev(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F;return O(function(J){switch(J.g){case 1:e=Ys(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return J.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 J.return(Ys(m));n=xg;p=null;r=Sv(a,b,f.g,c,d);a.ca.clear();if(!r){J.u(2);break}u=ql(r.M(),r.Zb(),r.Xb(),a.g.retryParameters);return E(J,Tv(a,u,n,{type:0}),3);case 3:v=J.h,p=v.data;case 2:w=0;A=null;if(y=Yu(f.g,"EXT-X-BYTERANGE"))C=
|
|
1023
|
+
t(Uv(null,y.value)),w=C.next().value,A=C.next().value;z=ql(g,w,A,a.g.retryParameters);return E(J,Tv(a,z,n,{type:1}),4);case 4:B=J.h;(D=B.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var K=B.data;var G=Bb(K);G=(new xj).parse(G);var M=G.Tc();G=G.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;
|
|
1020
1024
|
case "opus":N.push("opus"),L=!0}switch(M.video){case "avc":G.codec?N.push(G.codec):N.push("avc1.42E01E");P=!0;break;case "hvc":G.codec?N.push(G.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(K);K=t(P.j());for(var R=K.next();!R.done;R=K.next())R=R.value,L.set(R,R);P.g()}G={type:M?"audio":"video",mimeType:"video/mp2t",codecs:N.join(", "),language:null,height:G.height,width:G.width,channelCount:null,
|
|
1021
1025
|
sampleRate:null,closedCaptions:L,md:null,colorGamut:null}}else G=null;if(I=G)return J.return(I)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(F=Zs(p,B.data))return J.return(F);return J.return(e)}})}
|
|
1022
|
-
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.
|
|
1023
|
-
c.h&&a.l.
|
|
1026
|
+
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.Bb),c=Math.min(c,e.ec));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))&&
|
|
1027
|
+
c.h&&a.l.Mg(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)}}
|
|
1024
1028
|
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}
|
|
1025
1029
|
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=Rd(Td,d);a.G.set(f,g);Ob(d,g)}e&&(f=Rd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Rd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
1026
1030
|
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)}}
|
|
@@ -1028,66 +1032,66 @@ function Hv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.ret
|
|
|
1028
1032
|
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(Td,d)||$v(Td),aw(f.stream)}}return b.filter(function(g){return g})}
|
|
1029
1033
|
function aw(a){var b=new Set([Xd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Tb(function(c){c.mimeType&&b.add(Xd(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1030
1034
|
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);xa(m,2);return E(m,bw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=Aa(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"),
|
|
1031
|
-
p=Z(g,"CHARACTERISTICS"),
|
|
1035
|
+
p=Z(g,"CHARACTERISTICS"),r=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;r.stream.width=Number(w)||void 0;r.stream.height=Number(A)||void 0;var y=Z(g,"BANDWIDTH");y&&(r.stream.bandwidth=Number(y));a.i.set(h,r);l=r}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}))})}
|
|
1032
1036
|
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)}
|
|
1033
|
-
function Kv(a,b,c,d,e,f){var g,h,k,l,m,n,p,
|
|
1034
|
-
y(m,""):null;
|
|
1035
|
-
Ka=Z(L,"VIDEO-RANGE"),(wa=Z(L,"REQ-VIDEO-LAYOUT"))&&wa.includes(",")&&(ta=wa.split(",").filter(function(ua){return"CH-STEREO"==ua||"CH-MONO"==ua}),wa=ta[0]),wa=wa||"CH-MONO",Na=hw(a,N,d),G.push.apply(G,x(iw(a,Na.audio,Na.video,R,ba,
|
|
1036
|
-
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(
|
|
1037
|
-
"URI")});h=d.audio.find(function(
|
|
1038
|
-
n=Z(c,"NAME"),p=jw(c),kw(c),m=Z(c,"CHARACTERISTICS"),
|
|
1037
|
+
function Kv(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ha,ba,oa,Ka,wa,ta,Na;return O(function(Va){switch(Va.g){case 1:g=[];h=new Set;if(!(0<c.length)){Va.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Va.u(2);break}m=l.value;n=Tu(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){Va.u(4);break}if(ew(n)){u=$u(e(),Tu(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=rg(u,a.g.retryParameters),A=Tv(a,w,6),a.K.set(v,A));Va.u(4);break}if("identity"!=p){r=(y=fw[p])?
|
|
1038
|
+
y(m,""):null;Va.u(6);break}return E(Va,gw(a,m,"",e,null,f),9);case 9:r=Va.h;case 6:if(r){if(r.keyIds)for(C=t(r.keyIds),z=C.next();!z.done;z=C.next())B=z.value,h.add(B);g.push(r)}case 4:l=k.next();Va.u(3);break;case 2:D={};I=t(b);for(F=I.next();!F.done;F=I.next())J=F.value,K=Ru(J,!a.j),D[K]?D[K].push(J):D[K]=[J];G=[];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"),ha=t(Q?Q.split("x"):[null,null]),ba=ha.next().value,oa=ha.next().value,
|
|
1039
|
+
Ka=Z(L,"VIDEO-RANGE"),(wa=Z(L,"REQ-VIDEO-LAYOUT"))&&wa.includes(",")&&(ta=wa.split(",").filter(function(ua){return"CH-STEREO"==ua||"CH-MONO"==ua}),wa=ta[0]),wa=wa||"CH-MONO",Na=hw(a,N,d),G.push.apply(G,x(iw(a,Na.audio,Na.video,R,ba,oa,P,Ka,wa,g,h)));return Va.return(G.filter(function(ua){return null!=ua}))}})}
|
|
1040
|
+
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 r=b.map(function(v){return Tu(v,
|
|
1041
|
+
"URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return r.includes(w)})});g=Xv(a,b[0]);n=Rd("video",g);(p=Rd("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"),
|
|
1042
|
+
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}
|
|
1039
1043
|
function Xv(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.$=0<c.length;a.$||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return $s(a)}function jw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1040
1044
|
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}
|
|
1041
|
-
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
|
|
1042
|
-
|
|
1045
|
+
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 r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;
|
|
1046
|
+
r=r?r.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";r=r+" - "+u;h&&k&&!Lc(n,p)||a.Ea.has(r)||(h={id:a.B++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ea.add(r))}return e}
|
|
1043
1047
|
function Jv(a,b){b=Xu(b,"CLOSED-CAPTIONS");a.ea=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=Ce(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)}}
|
|
1044
1048
|
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=Td);if(k==Td)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);
|
|
1045
|
-
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,
|
|
1049
|
+
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,r=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,r,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}
|
|
1046
1050
|
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])*
|
|
1047
1051
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1048
|
-
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
|
|
1049
|
-
function cw(a,b,c,d,e,f,g,h,k,l,m,n,p,
|
|
1050
|
-
break}if(P=0<K.segments.length)R=K.segments[0],Yu(R.g,"EXT-X-GAP")&&(P=!1);if(!P){ob.u(3);break}a.ea=!1;return E(ob,Ev(a,K,
|
|
1051
|
-
y.kb=ba.kb;y.lb=ba.lb;y.ef=!0;w.segmentIndex=
|
|
1052
|
-
aw(ta.stream));e==D.qa&&(Na=
|
|
1053
|
-
function(){if(C)return C;z=new AbortController;return C=new Promise(function(B){B(
|
|
1052
|
+
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 r=p.value;p=Tu(r,"URI");r=Z(r,"PATHWAY-ID");a.j&&r&>(a.j,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.ea=!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=Qd(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}
|
|
1053
|
+
function cw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var D,I,F,J,K,G,M,N,L,P,R,Q,ha,ba,oa,Ka,wa,ta,Na,Va,ua,Ca;return O(function(ob){switch(ob.g){case 1:return D=Vd,I=y.M(),E(ob,mv(a,y.M(),!0),2);case 2:F=ob.h;if(B.aborted)return ob.return();J=F.uri;J==F.originalUri||I.includes(J)||A.push(J);K=cv(a.ya,F.data);if(1!=K.type)throw new T(2,4,4017);G=Wu(K.g,"EXT-X-DEFINE");M=vv(a,G,J);N=void 0;L=!1;if(!(!a.$&&a.g.hls.disableCodecGuessing||a.ea&&e==D.fa&&!a.g.hls.disableClosedCaptionsDetection)){ob.u(3);
|
|
1054
|
+
break}if(P=0<K.segments.length)R=K.segments[0],Yu(R.g,"EXT-X-GAP")&&(P=!1);if(!P){ob.u(3);break}a.ea=!1;return E(ob,Ev(a,K,v,M),5);case 5:Q=ob.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 ha=ov(a),E(ob,Nv(a,0,M,K,v,d,e,f,g,h,k,l,m,n,p,r,N),6);case 6:ba=ob.h;if(B.aborted)return ob.return();oa=ba.stream;ov(a)&&!ha&&Pv(a,K);y.ec=ba.ec;y.Bb=ba.Bb;y.td=ba.td;y.sd=ba.sd;y.Yc=ba.Yc;y.Pd=ba.Pd;
|
|
1055
|
+
y.kb=ba.kb;y.lb=ba.lb;y.ef=!0;w.segmentIndex=oa.segmentIndex;w.encrypted=oa.encrypted;w.drmInfos=oa.drmInfos;w.keyIds=oa.keyIds;w.mimeType=oa.mimeType;w.bandwidth=w.bandwidth||oa.bandwidth;w.codecs=w.codecs||oa.codecs;w.closedCaptions=w.closedCaptions||oa.closedCaptions;aw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&L&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.fa||e==D.V)for(Ka=t(a.i.values()),wa=Ka.next();!wa.done;wa=Ka.next())ta=wa.value,ta.ef||ta.type!=e||(ta.stream.mimeType=oa.mimeType,
|
|
1056
|
+
aw(ta.stream));e==D.qa&&(Na=oa.segmentIndex.get(0))&&Na.da&&(w.mimeType="application/mp4",aw(w));nw(a)&&(a.qb?Qv(a,[y]):(a.qb=!0,Va=Array.from(a.i.values()),ua=Va.filter(function(Pc){return Pc.stream.segmentIndex}),Qv(a,ua),tv(a),Ca=a.m,0<Ca&&a.A.X(Ca)));H(ob)}})}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,r),A=[],y={stream:w,type:e,Dg:A,M:v,ec:0,Bb:0,Pd:new Map,td:!1,sd:!1,Yc:!1,Ae:-1,kb:-1,lb:-1,ef:!1},C=null,z=new AbortController;w.createSegmentIndex=
|
|
1057
|
+
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.Bb));return b}
|
|
1054
1058
|
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.Tb(function(e){c.push(e)});a.l.fd(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.uc(0,c);qv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Av(a,b):(Dv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Av(a,b))}
|
|
1055
1059
|
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}
|
|
1056
|
-
function Nv(a,b,c,d,e,f,g,h,k,l,m,n,p,
|
|
1057
|
-
D=B.drmInfos;I=B.keyIds;F=B.encrypted;J=B.
|
|
1058
|
-
|
|
1059
|
-
function ow(a,b,c,d,e,f,g,h,k,l,m,n){var p=Zv(c,b)||$v(c),
|
|
1060
|
-
segmentIndex:null,mimeType:p,codecs:b,kind:c==Td?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ce(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:
|
|
1060
|
+
function Nv(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w){var A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ha,ba,oa,Ka;return O(function(wa){switch(wa.g){case 1:var ta=Yu(d.g,"EXT-X-PLAYLIST-TYPE"),Na=Yu(d.g,"EXT-X-ENDLIST");Na=ta&&"VOD"==ta.value||Na;ta=ta&&"EVENT"==ta.value&&!Na;ta=!Na&&!ta;Na?sv(a,lv):ta?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){wa.u(2);break}return E(wa,qw(a,g,f,C),3);case 3:w=wa.h;case 2:return E(wa,wv(a,d,w,e,c),4);case 4:B=wa.h;
|
|
1061
|
+
D=B.drmInfos;I=B.keyIds;F=B.encrypted;J=B.hh;if(F&&!D.length&&!J)throw new T(2,4,4026);K=ow(a,f,g,h,k,l,m,n,p,r,u,v);K.encrypted=F;K.drmInfos=D;K.keyIds=I;K.mimeType=w;z&&(K.bandwidth=z);aw(K);ov(a)&&zv(a,d);G=C[0].startTime;M=C[C.length-1];N=M.endTime;L=new Mk(C);K.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;ha=Zu(d.g,"EXT-X-MEDIA-SEQUENCE",0);ba=yv(ha,C);oa=ba.kb;Ka=ba.lb;return wa.return({stream:K,type:g,Dg:[],M:e,ec:G,
|
|
1062
|
+
Bb:N,td:R,sd:Q,Yc:!1,Ae:-1,kb:oa,lb:Ka,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}}
|
|
1063
|
+
function ow(a,b,c,d,e,f,g,h,k,l,m,n){var p=Zv(c,b)||$v(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Td?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1064
|
+
segmentIndex:null,mimeType:p,codecs:b,kind:c==Td?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ce(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
1061
1065
|
fullMimeTypes:new Set};aw(a);return a}
|
|
1062
|
-
function wv(a,b,c,d,e){var f,g,h,k,l,m,n,p,
|
|
1063
|
-
!0;G=Z(F,"KEYFORMAT")||"identity";M=null;if(ew(K)){
|
|
1066
|
+
function wv(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,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())r=p.value,f.set(r,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;I=B.next().value;F=D;J=I;K=Tu(F,"METHOD");if("NONE"==K){Q.u(3);break}u=
|
|
1067
|
+
!0;G=Z(F,"KEYFORMAT")||"identity";M=null;if(ew(K)){v=!0;Q.u(3);break}if("identity"!=G){M=(N=fw[G])?N(F,c):null;Q.u(6);break}return E(Q,gw(a,F,c,d,J,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,hh:v})}})}
|
|
1064
1068
|
function rw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Kd(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.ha.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=
|
|
1065
|
-
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,
|
|
1069
|
+
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,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=rg(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){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return E(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;H(v)})};
|
|
1066
1070
|
a.ha.set(c,k)}return a.ha.get(c)}
|
|
1067
1071
|
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.xa=b?Number(Tu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1068
|
-
Su(b,"HOLD-BACK"):null,a.ua=c?Number(c.value):0);a.
|
|
1072
|
+
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.xa)b=a.xa;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.Ng(0);a.l.Cf(b);a.l.jc(!1)}
|
|
1069
1073
|
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.ca.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?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.ca.set(g,b)}return a.ca.get(g)}
|
|
1070
|
-
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
|
|
1071
|
-
function tw(a,b,c,d,e,f,g,h,k){function l(ha){ha=(new sc(ha)).Na.split(".").pop();var ba=uw[g][ha];ba||(ba=Rv[ha]);return ba}var m=d.g,n=Yu(m,"EXTINF"),p=0,
|
|
1072
|
-
Ii;Yu(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.vb.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.vb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=
|
|
1074
|
+
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 Ci(function(){return a},e,f,null,null,null,d)}
|
|
1075
|
+
function tw(a,b,c,d,e,f,g,h,k){function l(ha){ha=(new sc(ha)).Na.split(".").pop();var ba=uw[g][ha];ba||(ba=Rv[ha]);return ba}var m=d.g,n=Yu(m,"EXTINF"),p=0,r=0,u=null;d.vb.length&&!a.C&&ab("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Yu(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=qh(w.value))}var A=
|
|
1076
|
+
Ii;Yu(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.vb.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.vb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,I={},F=0;F<d.vb.length;I={le:void 0,$d:void 0},F++){var J=d.vb[F],K=0==F?c:y[y.length-1],G=0==F?e:K.endTime,M=Number(Z(J,"DURATION"))||a.P;if(M){var N=G+M,L=0,P=null;"EXT-X-PRELOAD-HINT"==J.name?(L=(L=Z(J,"BYTERANGE-START"))?Number(L):0,(K=Z(J,"BYTERANGE-LENGTH"))?
|
|
1073
1077
|
P=L+Number(K)-1:L&&(P=Number.MAX_SAFE_INTEGER)):(L=Z(J,"BYTERANGE"),P=t(Uv(K,L)),L=P.next().value,P=P.next().value);I.$d=Z(J,"URI");if(I.$d){K=Ii;"YES"==Z(J,"GAP")&&(K=2,z=!0);I.le=null;var R=function(ha){return function(){null==ha.le&&(ha.le=$u(h(),ha.$d,f));return ha.le}}(I);p&&0<=L&&null!=P&&(C=R,w=!0);G=new Hi(G,N,R,L,P,b,0,0,Infinity,[],"",null,D,K,k);"EXT-X-PRELOAD-HINT"==J.name&&(G.ff(),B=!0);"YES"!=Z(J,"INDEPENDENT")&&0<F&&G.Od();if(I=l(I.$d))G.mimeType=I,vw.has(I)&&(G.da=null);y.push(G);
|
|
1074
|
-
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].
|
|
1075
|
-
|
|
1076
|
-
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,
|
|
1077
|
-
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,
|
|
1078
|
-
b*1E3));if(m=
|
|
1079
|
-
(c.hc.h=e());if(m)for(c=t(
|
|
1078
|
+
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)),r=u.next().value,u=u.next().value):y.length&&(r=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 Hi(e,p,function(){if(C)return C();null==Q&&(Q=$u(h(),d.h,f));return Q||[]},r,
|
|
1079
|
+
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.da=null);w&&(a.hb=!0,b.tg(),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]}
|
|
1080
|
+
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,r=0;ov(a)&&c.has(p)&&(r=c.get(p));0===r&&a.oa==Vv&&0<c.size&&!c.has(p)&&(r=a.l.ib());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],y=0==w?r: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"))?
|
|
1081
|
+
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)/
|
|
1082
|
+
b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={yd:void 0,xd:void 0,pd:void 0,hc:void 0,od:void 0},d++)if(c.hc=u[d],null==c.hc.h)for(c.xd=0,c.yd=d,e=function(B){return function(){var D=u[B.yd];if(D){if(null!=D.h)return D.h+B.xd;B.xd-=D.endTime-D.startTime;B.yd+=1}return null}}(c),c.od=0,c.pd=d,g=function(B){return function(){var D=u[B.pd];if(D){D!=B.hc&&(B.od+=D.endTime-D.startTime);if(null!=D.h)return D.h+B.od;--B.pd}return null}}(c);null==c.hc.h;)c.hc.h=g(),null==c.hc.h&&
|
|
1083
|
+
(c.hc.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.Jf(c);return{segments:u,bandwidth:b}}
|
|
1080
1084
|
function Zv(a,b){if(a==Td){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==Td?"text/vtt":uw[a].mp4}
|
|
1081
|
-
function qw(a,b,c,d){var e,f,g,h,k,l,m,n,p,
|
|
1082
|
-
1001!=w.code){y.u(3);break}
|
|
1083
|
-
function kv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();xa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();ov(a)&&(d=(c-b)/1E3,a.
|
|
1085
|
+
function qw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(y){switch(y.g){case 1:e=xg;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);r=1;u=rg(h,a.g.retryParameters);xa(y,2);u.method="HEAD";return E(y,Tv(a,u,e,{type:r}),4);case 4:v=y.h;p=v.headers["content-type"];za(y,3);break;case 2:w=Aa(y);if(!w||1002!=w.code&&
|
|
1086
|
+
1001!=w.code){y.u(3);break}u.method="GET";return E(y,Tv(a,u,e,{type:r}),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,rg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1087
|
+
function kv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();xa(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-Xa(a.Ka)),a.A.X(f));za(h,3);break;case 2:g=Aa(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.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
|
|
1084
1088
|
function ov(a){return a.oa!=lv}function sv(a,b){a.oa=b;a.l&&a.l.jc(!ov(a));ov(a)||a.A.stop()}function Tv(a,b,c,d){if(!a.W)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);lg(a.W,b);return b.promise}function ew(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1085
|
-
function gw(a,b,c,d,e,f){var g,h,k,l,m,n,p,
|
|
1086
|
-
3);case 3:
|
|
1089
|
+
function gw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,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(sd())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=Ld(Hd(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.wa.has(m)||(n=rg(k,a.g.retryParameters),p=Tv(a,n,6),a.wa.set(m,p));return E(B,a.wa.get(m),
|
|
1090
|
+
3);case 3:r=B.h,l=Ld(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.na.has(e)){v=a.na.get(e);B.u(5);break}w=ql(e.M(),e.Zb(),e.Xb(),a.g.retryParameters);A=xg;return E(B,Tv(a,w,A,{type:0}),6);case 6:y=B.h,v=bt(y.data),a.na.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(Pd(C,z))}})}S("shaka.hls.HlsParser",jv);
|
|
1087
1091
|
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",
|
|
1088
1092
|
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(Yd))),fw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(sd())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 Od("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
1089
1093
|
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=Od("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;
|
|
1090
|
-
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=Yg(a,b,new Set,0);return Od("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},lv="VOD",pw="EVENT",Vv="LIVE",rv={
|
|
1094
|
+
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=Yg(a,b,new Set,0);return Od("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},lv="VOD",pw="EVENT",Vv="LIVE",rv={dh:lv,bj:pw,jj:Vv};xi["application/x-mpegurl"]=function(){return new jv};xi["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(jh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=kh(b.value,"LA_URL")){a=hh(b);break a}a=""}else a="";return a}
|
|
1091
1095
|
function yw(a){a=Hd(hh(a));a=ww(a).filter(function(b){return b.type===zw})[0];if(!a)return null;a=xd(a.value,!0);return(a=$g(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}
|
|
1092
1096
|
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,
|
|
1093
1097
|
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;
|
|
@@ -1103,66 +1107,66 @@ a=Ew(d,Sw(a),c,e)}c=a}a=Ew("stsd",Tw,c);return b("stbl",a,Ew("stts",Uw),Ew("stsc
|
|
|
1103
1107
|
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,
|
|
1104
1108
|
0,0,0,0,0,1,8]);f=Ew("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1105
1109
|
function Yw(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Ew;var g=new Uint8Array([0,0,0,0].concat(x(Jw(c.data?c.data.ob:0,4))));g=Ew("mfhd",g);var h;var k=c.data?c.data.Ta:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Qa<<4|m.Sa<<2|m.Ra}k=Ew("sdtp",l);var n=k.length+92;l=Ew;h=new Uint8Array([0,0,0,58].concat(x(Jw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Ew("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1106
|
-
0;var p=Math.floor(m%(Iw+1));m=new Uint8Array([1,0,0,0].concat(x(Jw(Math.floor(m/(Iw+1)),4)),x(Jw(p,4))));m=Ew("tfdt",m);var
|
|
1110
|
+
0;var p=Math.floor(m%(Iw+1));m=new Uint8Array([1,0,0,0].concat(x(Jw(Math.floor(m/(Iw+1)),4)),x(Jw(p,4))));m=Ew("tfdt",m);var r=n;n=c.data?c.data.Ta:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);r+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Jw(p,4)),x(Jw(r,4))),0);for(r=0;r<p;r++){var w=n[r];u=Jw(w.duration,4);var A=Jw(w.size,4),y=w.flags;w=Jw(w.Ya,4);v.set([].concat(x(u),x(A),[y.ab<<2|y.Qa,y.Sa<<6|y.Ra<<4|y.bb,y.Pa&61440,y.Pa&15],x(w)),12+16*r)}n=Ew("trun",v);k=l("traf",h,m,n,k);f=f("moof",
|
|
1107
1111
|
g,k);e.call(d,b,[f,Zw(c)])}return Md.apply(Ed,x(b))}function Zw(a){a=(a.data?a.data.Ta:[]).map(function(b){return b.data});a=Md.apply(Ed,x(a));return Ew("mdat",a)}function Jw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Pw(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
1108
1112
|
function Ew(a){var b=La.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}
|
|
1109
1113
|
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,
|
|
1110
|
-
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 Wa(5);this.o=new Tc(function(){bx(a)});this.A=new kg;this.m=new Map}
|
|
1111
|
-
function bx(a){var b;O(function(c){switch(c.g){case 1:return xa(c,2),E(c,cx(a),4);case 4:za(c,3);break;case 2:b=Aa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}
|
|
1112
|
-
|
|
1114
|
+
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 Wa(5);this.o=new Tc(function(){bx(a)});this.A=new kg;this.m=new Map}q=ax.prototype;q.configure=function(a){this.g=a};q.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)})};
|
|
1115
|
+
function bx(a){var b;O(function(c){switch(c.g){case 1:return xa(c,2),E(c,cx(a),4);case 4:za(c,3);break;case 2:b=Aa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}q.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()};
|
|
1116
|
+
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return xa(c,2),E(c,cx(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};
|
|
1113
1117
|
function cx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=rg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),lg(a.A,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=mm){rb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Ut(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
|
|
1114
|
-
l);n(m);m=Ad(m.outerHTML)}var p=Zg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=nm&&l(p);a.i||(a.i=new qk(null,0));if(l=nh(p,"IsLive",xh,!1))throw new T(2,4,4047);a.i.jc(!l);n=nh(p,"TimeScale",vh,1E7);m=nh(p,"DVRWindowLength",vh);l&&(0===m||isNaN(m))&&(m=Infinity);var
|
|
1115
|
-
"Duration",vh,Infinity);l||a.i.Ua(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var
|
|
1116
|
-
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Ld(y);break a}y=null}else y=null;C=Hd(hh(
|
|
1117
|
-
nh(I,"d",vh);I=nh(I,"r",th);if(!K)break;J=null!=J?J:B;I=I||0;if(0>I)if(F){F=nh(F,"t",vh);if(null==F)break;else if(J>=F)break;I=Math.ceil((F-J)/K)-1}else{if(Infinity==y)break;else if(J/w>=y)break;I=Math.ceil((y*w-J)/K)-1}for(F=0;F<=I;++F)B=J+K,z.push({start:J/w,end:B/w,Qf:J}),J=B}w=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=dx(a,
|
|
1118
|
-
|
|
1118
|
+
l);n(m);m=Ad(m.outerHTML)}var p=Zg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=nm&&l(p);a.i||(a.i=new qk(null,0));if(l=nh(p,"IsLive",xh,!1))throw new T(2,4,4047);a.i.jc(!l);n=nh(p,"TimeScale",vh,1E7);m=nh(p,"DVRWindowLength",vh);l&&(0===m||isNaN(m))&&(m=Infinity);var r=nh(p,"CanSeek",xh,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.ge(r);m=nh(p,
|
|
1119
|
+
"Duration",vh,Infinity);l||a.i.Ua(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=gh(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(gh(u.value,"ProtectionHeader"));if(m.length){r=[];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(jh(y,"DATA"));for(var C=y.next();!C.done;C=y.next())if(C=kh(C.value,"KID")){y=Hd(hh(C));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
|
|
1120
|
+
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Ld(y);break a}y=null}else y=null;C=Hd(hh(v));w=Kd(w.replace(/-/g,""));w=[{initData:Yg(C,w,new Set,0),initDataType:"cenc",keyId:y}];w=Od(A,"cenc",w);y&&w.keyIds.add(y);if(A=Aw.get(A))w.licenseServerUri=A(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=gh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=gh(v,"QualityLevel");w=l.timescale;y=l.duration;C=gh(v,"c");for(var z=[],B=0,D=0;D<C.length;++D){var I=C[D],F=C[D+1],J=nh(I,"t",vh),K=
|
|
1121
|
+
nh(I,"d",vh);I=nh(I,"r",th);if(!K)break;J=null!=J?J:B;I=I||0;if(0>I)if(F){F=nh(F,"t",vh);if(null==F)break;else if(J>=F)break;I=Math.ceil((F-J)/K)-1}else{if(Infinity==y)break;else if(J/w>=y)break;I=Math.ceil((y*w-J)/K)-1}for(F=0;F<=I;++F)B=J+K,z.push({start:J/w,end:B/w,Qf:J}),J=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!=Td||a.g.disableText||m.push(y):n.push(y):r.push(y))}p=[];r=t(0<r.length?
|
|
1122
|
+
r:[null]);for(u=r.next();!u.done;u=r.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,
|
|
1119
1123
|
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);H(k)})}
|
|
1120
|
-
function dx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return ab("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=nh(c,"Bitrate",uh),m=nh(c,"MaxWidth",uh),n=nh(c,"MaxHeight",uh),p=nh(c,"Channels",uh),
|
|
1121
|
-
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:Ce(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:
|
|
1122
|
-
matchedStreams:[],mssPrivateData:{duration:
|
|
1124
|
+
function dx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return ab("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=nh(c,"Bitrate",uh),m=nh(c,"MaxWidth",uh),n=nh(c,"MaxHeight",uh),p=nh(c,"Channels",uh),r=nh(c,"SamplingRate",uh),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()},
|
|
1125
|
+
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:Ce(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1126
|
+
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 ab('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 ab("Codec not supported:",
|
|
1123
1127
|
e),null;c=gx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=hx(e,c);break;case "video":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=ix(c);break;case "text":if(w.type=Td,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Xd(w.mimeType,w.codecs));
|
|
1124
|
-
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,la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:w},A=Hw(new Bw([A])),a.m.set(w.id,A);A=jx(a,new
|
|
1128
|
+
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,la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:w},A=Hw(new Bw([A])),a.m.set(w.id,A);A=jx(a,new Ci(function(){return[]},0,null,null,void 0,
|
|
1125
1129
|
A),w,b,d);w.segmentIndex=new Mk(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1126
1130
|
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;
|
|
1127
1131
|
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):""}
|
|
1128
1132
|
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 Hi(h.he.start,h.he.end,function(k){return function(){return Nd(a.l,[f.replace("{start time}",String(k.he.Qf))])}}(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"};
|
|
1129
|
-
xi["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=zd(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;Fg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ox,h={Zf:!1,
|
|
1130
|
-
function px(a,b,c,d,e,f,g){var h,k,l,m,n,p,
|
|
1131
|
-
I.value.byteLength;if(!g){K.u(5);break}return E(K,g(I.value),5);case 5:F=Date.now();if(100<F-
|
|
1133
|
+
xi["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=zd(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;Fg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ox,h={Zf:!1,Wg:!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 ag(a,function(){h.Zf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Tc(function(){h.Wg=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1134
|
+
function px(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return h=qx,k=rx,p=n=0,r=Date.now(),xa(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 I,F,J;return O(function(K){switch(K.g){case 1:return xa(K,2),E(K,u.read(),4);case 4:I=K.h;za(K,3);break;case 2:return Aa(K),K.return();case 3:if(I.done){K.u(5);break}n+=
|
|
1135
|
+
I.value.byteLength;if(!g){K.u(5);break}return E(K,g(I.value),5);case 5:F=Date.now();if(100<F-r||I.done)J=I.done?0:w-n,e(F-r,n-p,J),p=n,r=F;I.done?B.close():(B.enqueue(I.value),D());H(K)}})}D()};new k({start:A});return E(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:za(z,3);break;case 2:y=Aa(z);if(d.Zf)throw new T(1,1,7001,a,b);if(d.Wg)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))}})}
|
|
1132
1136
|
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;
|
|
1133
1137
|
tx()&&(ng("http",mx,2,!0),ng("https",mx,2,!0),ng("blob",mx,2,!0));function ux(){}
|
|
1134
|
-
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
|
|
1135
|
-
1,1002,a,
|
|
1136
|
-
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;ng("http",vx,1,!0);ng("https",vx,1,!0);ng("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.
|
|
1137
|
-
function Gx(a,b,c,d,e,f){Cg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,
|
|
1138
|
+
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 r=xx(f);e(r);n=!0}};f.onload=function(r){var u=xx(f),v=f.response;try{d(Date.now()-g,r.loaded-h,0);var w=kx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(r){m(new T(1,
|
|
1139
|
+
1,1002,a,r,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(r){var u=Date.now();if(100<u-g||r.lengthComputable&&r.loaded==r.total)d(u-g,r.loaded-h,4==f.readyState?0:r.total-r.loaded),h=r.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new ag(k,function(){f.abort();return Promise.resolve()})}
|
|
1140
|
+
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;ng("http",vx,1,!0);ng("https",vx,1,!0);ng("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 ql(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 Bg(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)}
|
|
1141
|
+
function Gx(a,b,c,d,e,f){Cg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;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 Xg(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);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)})}
|
|
1138
1142
|
function Hx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=xg,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 $f;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){}xa(b,2);return E(b,a.g,4)}if(2!=b.g)return za(b,0);Aa(b);H(b)})};
|
|
1139
|
-
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();H(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}
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
function Px(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}
|
|
1143
|
+
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();H(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}q=Ox.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Px(this.i)};q.removeSegments=function(a,b){return Qx(this,this.i,a,b)};q.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.$f(e)}))})};q.addManifests=function(){return Px(this.g)};
|
|
1144
|
+
q.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()}q.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()};q.removeManifests=function(a,b){return Qx(this,this.g,a,b)};
|
|
1145
|
+
q.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.Mc(e)})))})};q.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.Mc(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};q.$f=function(a){return a};q.Mc=function(a){return Promise.resolve(a)};
|
|
1146
|
+
function Px(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}q.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)})};
|
|
1143
1147
|
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()}
|
|
1144
1148
|
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()};
|
|
1145
1149
|
Tx.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Mx(b.g,"session-ids"),E(d,Kx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function Ux(){this.g=new Map}Ux.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Ux.prototype.init=function(){var a=this;Vx.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
1146
|
-
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,
|
|
1150
|
+
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)})})}
|
|
1147
1151
|
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()}
|
|
1148
1152
|
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)}qa(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 $f;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)})};
|
|
1149
|
-
cy.prototype.
|
|
1153
|
+
cy.prototype.Mc=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})})};
|
|
1150
1154
|
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)})}
|
|
1151
1155
|
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=
|
|
1152
1156
|
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.$f=function(a){return{data:a.data}};
|
|
1153
1157
|
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);}
|
|
1154
1158
|
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++,
|
|
1155
1159
|
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)}qa(hy,Ox);
|
|
1156
|
-
hy.prototype.
|
|
1160
|
+
hy.prototype.Mc=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?
|
|
1157
1161
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1158
1162
|
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,
|
|
1159
|
-
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)}qa(jy,Ox);
|
|
1160
|
-
|
|
1163
|
+
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)}qa(jy,Ox);q=jy.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Sx(this,a,b)};q.Mc=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}q=ky.prototype;
|
|
1164
|
+
q.init=function(){var a=this,b=new $f,c=!1,d=new Tc(function(){c=!0;b.reject(new T(2,9,9017))});d.X(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")?
|
|
1161
1165
|
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,
|
|
1162
|
-
9,9001,e.error)),d.stop(),f.preventDefault())};return b};
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
function ly(){var a=new $f,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 fd()||Yc()||!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.
|
|
1166
|
+
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.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(),H(b)}})};
|
|
1167
|
+
q.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};q.getEmeSessionCell=function(){return this.m};
|
|
1168
|
+
q.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)}})};
|
|
1169
|
+
function ly(){var a=new $f,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 fd()||Yc()||!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};
|
|
1166
1170
|
function ny(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new my(b,c,d,Number(a[4])):null};function oy(a,b){this.h=a;this.g=b}
|
|
1167
1171
|
function py(a,b){var c=new qk(null,0);c.Ua(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=qy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Td}).map(function(l){return ry(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ry(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
1168
1172
|
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}}
|
|
@@ -1170,38 +1174,38 @@ function qy(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t
|
|
|
1170
1174
|
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}
|
|
1171
1175
|
function ry(a,b,c){var d=b.segments.map(function(e){return sy(a,e,b)});c.fd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Mk(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||
|
|
1172
1176
|
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([Xd(b.mimeType,b.codecs)])}}
|
|
1173
|
-
function sy(a,b,c){var d=new my("segment",a.h,a.g,b.dataKey);a=new Hi(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
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
function xy(a,b){var c=new Ux;return dg(void 0).za(function(){return c.init()}).za(function(){return Yx(c,b.jb(),b.
|
|
1179
|
-
function Ay(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Fh({
|
|
1180
|
-
h.g)return xa(h,2),E(h,Zh(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);H(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.
|
|
1177
|
+
function sy(a,b,c){var d=new my("segment",a.h,a.g,b.dataKey);a=new Hi(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 Ci(function(){return[c.toString()]},0,null)};function uy(){this.g=null}q=uy.prototype;q.configure=function(){};
|
|
1178
|
+
q.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;ya(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:Da(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
1179
|
+
q.update=function(){};
|
|
1180
|
+
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new Ux,xa(m,2,3),E(m,e.init(),5);case 5:return E(m,Yx(e,d.jb(),d.Ga()),6);case 6:return f=m.h,E(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),E(m,e.destroy(),10);case 10:Da(m,0);break;case 2:Aa(m),m.u(3)}})};
|
|
1181
|
+
q.onInitialVariantChosen=function(){};q.banLocation=function(){};xi["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=dg(a)):a=b&&"segment"==b.g?xy(b.key(),b):bg(new T(2,1,9004,a));return a}
|
|
1182
|
+
function xy(a,b){var c=new Ux;return dg(void 0).za(function(){return c.init()}).za(function(){return Yx(c,b.jb(),b.Ga())}).za(function(d){return d.getSegments([b.key()])}).za(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",vy);vy.plugin=wy;ng("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 r=!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);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=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)}})}
|
|
1183
|
+
function Ay(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Fh({Db:b,onError:function(){},Xd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),xa(f,2),d.configure(a),E(f,Nh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Aa(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==
|
|
1184
|
+
h.g)return xa(h,2),E(h,Zh(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);H(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}}
|
|
1181
1185
|
function Cy(a){var b=[],c=xf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(kf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(lf(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.Yb()):(this.h=lm(),this.g=new mg);this.i=[];this.j=[];var c=!a;this.l=new Bg(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);
|
|
1182
|
-
case 4:b.h=null,b.g=null,H(k)}})})}function Jy(){if(Uc())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}
|
|
1183
|
-
|
|
1184
|
-
function Ky(a,b,c,d,e,f){var g,h,k,l,m,n,p,
|
|
1185
|
-
p,b,c,e,f),u
|
|
1186
|
+
case 4:b.h=null,b.g=null,H(k)}})})}function Jy(){if(Uc())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}q=Iy.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cm(a,b));return pm(this.h,a)};q.getConfiguration=function(){var a=lm();pm(a,this.h,lm());return a};q.Yb=function(){return this.g};
|
|
1187
|
+
q.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,Km(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=wi(a,c||null);return h.return(g())})},e,f);b=new ag(b,function(){return Ex(f)});b.finally(function(){Ob(d.j,f)});return Ly(this,b)};
|
|
1188
|
+
function Ky(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,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,xa(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);r=!p.presentationTimeline.U()&&!p.presentationTimeline.cc();if(!r)throw new T(2,9,9005,b);return E(z,a.rc(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,
|
|
1189
|
+
p,b,c,e,f),v=u.fi,w=u.Mf,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:Da(z,0);break;case 2:C=Aa(z);if(null==m){z.u(19);break}return E(z,
|
|
1186
1190
|
Ty(m),19);case 19:throw n||C;}})}
|
|
1187
|
-
function Ry(a,b,c,d,e,f,g,h,k){var l,m,n,p,
|
|
1188
|
-
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;xa(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}),
|
|
1189
|
-
Aa(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.
|
|
1190
|
-
function Wy(a,b,c,d,e,f){var g,h,k,l,m,n,p,
|
|
1191
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();za(A,0);break;case 2:return
|
|
1192
|
-
function Py(a,b,c){var d,e,f,g,h,k,l,m,n,p,
|
|
1193
|
-
e.push(lf(
|
|
1191
|
+
function Ry(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,A,y;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(z,B){var D,I,F,J,K,G,M;return O(function(N){if(1==N.g){D=t(z);I=D.next();for(F={};!I.done;F={tc:void 0},I=D.next())F.tc=I.value,J=Ax(F.tc,f),K=F.tc.i,G=F.tc.h,M=function(L){return function(P){var R,Q,ha;return O(function(ba){if(1==ba.g)return E(ba,g.addSegments([{data:P}]),2);R=ba.h;Oy(a);Q=L.tc.g;ha=zx(Q);l[ha]=R[0];m+=P.byteLength;H(ba)})}}(F),Gx(e,F.tc.groupId,J,K,G,M);return E(N,
|
|
1192
|
+
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;xa(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}),r=l,u=m,l={},m=0,E(C,Wy(g,c,d,r,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:za(C,0);break;case 2:return A=
|
|
1193
|
+
Aa(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)}})}
|
|
1194
|
+
function Wy(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;xa(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())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
|
|
1195
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();za(A,0);break;case 2:return v=Aa(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;}})}
|
|
1196
|
+
function Py(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P;return O(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Pe(a,c.restrictions,d),E(R,Te(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ne(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(kf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
|
|
1197
|
+
e.push(lf(r));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(mf(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,I=D.bandwidth*y/8,C+=I;xa(R,4);return E(R,c.offline.downloadSizeCallback(C),6);case 6:F=R.h;if(!F)throw new T(2,9,9014);za(R,5);break;case 4:J=Aa(R);if(J instanceof T)throw J;throw new T(2,9,9015);case 5:K=new Set;G=new Set;M=new Set;N=t(A);for(L=N.next();!L.done;L=
|
|
1194
1198
|
N.next())P=L.value,"variant"==P.type&&K.add(P.id),"text"==P.type&&G.add(P.id),"image"==P.type&&M.add(P.id);a.variants=a.variants.filter(function(Q){return K.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return G.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return M.has(Q.id)});Xy(a);H(R)}})}
|
|
1195
|
-
function Qy(a,b,c,d,e,f){var g=By(c,b,d),h=e.offline.progressCallback;Fx(f,function(
|
|
1196
|
-
n&&p&&(n.initData=[]);return{
|
|
1197
|
-
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.
|
|
1198
|
-
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;ya(k,2);return E(k,e.init(),4);case 4:return E(k,Yx(e,d.jb(),d.
|
|
1199
|
+
function Qy(a,b,c,d,e,f){var g=By(c,b,d),h=e.offline.progressCallback;Fx(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&Vh(a,"cenc",r)});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.Mf;n=a.g;p=e.offline.usePersistentLicense;
|
|
1200
|
+
n&&p&&(n.initData=[]);return{fi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Uc(),streams:f,sessionIds:p?di(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Mf:m}}function Uy(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1201
|
+
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.Uc();c=di(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Uy(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return $y(this,az(this,a))};
|
|
1202
|
+
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;ya(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:Da(k,0)}})}
|
|
1199
1203
|
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:Xd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xd(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)})}
|
|
1200
|
-
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)])}
|
|
1204
|
+
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)])}q.xi=function(){return $y(this,gz(this))};
|
|
1201
1205
|
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,ya(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:Da(n,3);break;case 3:return n.return(!e)}})}
|
|
1202
|
-
|
|
1206
|
+
q.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,ya(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)});H(h)})})}),E(d,c,2);case 2:return Ba(d),E(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})}
|
|
1203
1207
|
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}},
|
|
1204
|
-
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(Dg(k,function(m){return m.createSegmentIndex()})),3);Oy(a);if(e)throw e;return l.return(h)})}
|
|
1208
|
+
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(Dg(k,function(m){return m.createSegmentIndex()})),3);Oy(a);if(e)throw e;return l.return(h)})}q.rc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Fh({Db:d.g,onError:b,Xd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Kh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Xh(e),3):f.return(e)})};
|
|
1205
1209
|
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()),Mf:Array.from(e.values())}}
|
|
1206
1210
|
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,
|
|
1207
1211
|
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=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.da&&(n=zx(l.da),f.has(n)||(p=.5*Hy(b,d.id),p=Cx(a.g,p),f.set(n,new yx(l.da,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
@@ -1210,15 +1214,15 @@ function $y(a,b){return O(function(c){if(1==c.g)return a.i.push(b),ya(c,2),E(c,b
|
|
|
1210
1214
|
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)})}
|
|
1211
1215
|
function iz(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
1212
1216
|
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,ya(b,2),E(b,ay(a),2)):5!=b.g?(Ba(b),E(b,a.destroy(),5)):Da(b,0)})};
|
|
1213
|
-
Iy.prototype.list=Iy.prototype.list;Iy.prototype.removeEmeSessions=Iy.prototype.
|
|
1217
|
+
Iy.prototype.list=Iy.prototype.list;Iy.prototype.removeEmeSessions=Iy.prototype.xi;Iy.prototype.remove=Iy.prototype.remove;Iy.prototype.store=Iy.prototype.store;Iy.prototype.getNetworkingEngine=Iy.prototype.Yb;Iy.prototype.getConfiguration=Iy.prototype.getConfiguration;Iy.prototype.configure=Iy.prototype.configure;Iy.prototype.destroy=Iy.prototype.destroy;Iy.support=Jy;
|
|
1214
1218
|
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){ab("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)}};ea.Object.defineProperties(oz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});lz.AbortController=oz;oz.install=qz;
|
|
1215
1219
|
function pz(){this.h=!1;this.g=void 0;this.onabort=null;this.i=new jg}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;};
|
|
1216
1220
|
ea.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(){wz()}lz.EncryptionScheme=uz;uz.install=vz;mz(vz,-2);function xz(){}
|
|
1217
1221
|
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}}),
|
|
1218
1222
|
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)}}
|
|
1219
1223
|
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;!fd()||fd()&&nd()||fd()&&Zc("Fuchsia")||(a=!1);if(gd()||jd()||id()||cd()||$c()||Zc("PC=EOS")||kd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Cz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Dz)}
|
|
1220
|
-
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=Vc(e),!f)||d&&(g=d.contentType,h=Vc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Uc())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
|
|
1221
|
-
(
|
|
1224
|
+
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=Vc(e),!f)||d&&(g=d.contentType,h=Vc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Uc())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 r=d.contentType;fd()&&d.spatialRendering&&
|
|
1225
|
+
(r+="; spatialRendering=true");l=mb(r);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)}})}
|
|
1222
1226
|
function Ez(a){var b,c;return O(function(d){return 1==d.g?fd()?E(d,Gz(a),3):$c()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(mb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(mb(a.contentType))})}
|
|
1223
1227
|
function Fz(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},$c()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
|
|
1224
1228
|
distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=c.keySystem;n=null;xa(p,2);if(Qc.has(k+"#"+l+"#"+m)){n=Qc.get(k+"#"+l+"#"+m)||null;p.u(4);break}return E(p,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:n=p.h,Qc.set(k+"#"+l+"#"+m,n);case 4:za(p,3);break;case 2:Aa(p);case 3:return p.return(n)}})}
|
|
@@ -1238,11 +1242,11 @@ aA;window.shakaMediaKeysPolyfill=gA}};
|
|
|
1238
1242
|
function bA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1239
1243
|
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;}
|
|
1240
1244
|
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)};
|
|
1241
|
-
function dA(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",eA);try{return xk(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){jg.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 $f;this.keyStatuses=new iA}qa(hA,jg);
|
|
1242
|
-
|
|
1243
|
-
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};
|
|
1244
|
-
|
|
1245
|
-
function iA(){this.size=0;this.g=void 0}
|
|
1245
|
+
function dA(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",eA);try{return xk(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){jg.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 $f;this.keyStatuses=new iA}qa(hA,jg);q=hA.prototype;
|
|
1246
|
+
q.generateRequest=function(a,b){var c=this;this.h=new $f;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.$b()?"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",
|
|
1247
|
+
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};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1248
|
+
q.update=function(a){this.g=new $f;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function jA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
|
|
1249
|
+
function iA(){this.size=0;this.g=void 0}q=iA.prototype;q.$b=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Oc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Oc.value();return this.g&&yb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var gA="apple";function kA(){}function lA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ad()||Zc("Tizen 4")||Zc("Tizen 5.0")||dd())&&(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."))}
|
|
1246
1250
|
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(){};
|
|
1247
1251
|
sA.prototype.createMediaKeys=function(){};var tA="nop";mz(oA,-10);function uA(){}
|
|
1248
1252
|
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}}
|
|
@@ -1253,156 +1257,157 @@ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||
|
|
|
1253
1257
|
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.$b()?"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()}),
|
|
1254
1258
|
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"))}}))}
|
|
1255
1259
|
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")};
|
|
1256
|
-
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){jg.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 $f;this.keyStatuses=new HA}qa(GA,jg);
|
|
1260
|
+
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){jg.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 $f;this.keyStatuses=new HA}qa(GA,jg);q=GA.prototype;q.ready=function(){FA(this,"usable");this.g&&this.g.resolve();this.g=null};
|
|
1257
1261
|
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(Ad("LOAD_SESSION|"+c));else{var e=Ad("PERSISTENT|");d=Md(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new $f;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 Tc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
|
|
1258
1262
|
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=wd(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=Hd(e.keys[0].k);e=Hd(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}}}
|
|
1259
|
-
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)}
|
|
1260
|
-
|
|
1261
|
-
|
|
1263
|
+
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)}q.generateRequest=function(a,b){return IA(this,b,null)};q.load=function(a){return"persistent-license"==this.l?IA(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new $f;JA(this,b,a);return b};
|
|
1264
|
+
q.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};q.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}q=HA.prototype;q.$b=function(){return this.g};
|
|
1265
|
+
q.forEach=function(a){this.g&&a(this.g,Oc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Oc.value();return this.g&&yb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.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))}}
|
|
1262
1266
|
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)}
|
|
1263
1267
|
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"))}
|
|
1264
1268
|
function NA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function OA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}lz.PiPWebkit=KA;KA.install=LA;mz(LA);function RA(){}function SA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=TA))}function TA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}lz.RandomUUID=RA;RA.install=SA;mz(SA);function UA(){}function VA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:WA})}function WA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}lz.Symbol=UA;UA.install=VA;mz(VA);function XA(){}function YA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}lz.VideoPlayPromise=XA;XA.install=YA;mz(YA);function ZA(){}function $A(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||dd())&&(a.getVideoPlaybackQuality=aB)}}function aB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}lz.VideoPlaybackQuality=ZA;ZA.install=$A;mz($A);function bB(){}function cB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=dB;else if(6==b)a=eB;else{try{var c=!!dB(1,2,"")}catch(d){c=!1}c&&(a=dB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function dB(a,b,c){return new window.TextTrackCue(a,b,c)}function eB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}lz.VTTCue=bB;bB.install=cB;mz(cB);function fB(){}fB.prototype.parseInit=function(){};fB.prototype.setSequenceMode=function(){};fB.prototype.setManifestType=function(){};fB.prototype.parseMedia=function(a,b){var c=null,d=[];a=wd(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=gB.exec(e))){var f=hB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Rb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1265
1269
|
S("shaka.text.LrcTextParser",fB);fB.prototype.parseMedia=fB.prototype.parseMedia;fB.prototype.setManifestType=fB.prototype.setManifestType;fB.prototype.setSequenceMode=fB.prototype.setSequenceMode;fB.prototype.parseInit=fB.prototype.parseInit;var gB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,hB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;re["application/x-subtitle-lrc"]=function(){return new fB};function iB(){}iB.prototype.parseInit=function(){};iB.prototype.setSequenceMode=function(){};iB.prototype.setManifestType=function(){};
|
|
1266
|
-
iB.prototype.parseMedia=function(a,b,c){var d=wd(a);a=[];if(""==d)return a;var e=$g(d,"tt");if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=jh(e,"body")[0];if(!d)return[];var f=ph(e,jB,"frameRate"),g=ph(e,jB,"subFrameRate"),h=ph(e,jB,"frameRateMultiplier"),k=ph(e,jB,"tickRate"),l=ph(e,jB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=ph(e,kB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new lB(f,g,h,k);l=
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
g)
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
c,f,"
|
|
1279
|
-
|
|
1280
|
-
a.textDecoration.push("
|
|
1281
|
-
|
|
1282
|
-
function
|
|
1283
|
-
function
|
|
1284
|
-
function GB(a,b){a=
|
|
1270
|
+
iB.prototype.parseMedia=function(a,b,c){var d=wd(a);a=[];if(""==d)return a;var e=$g(d,"tt",!0);if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=jh(e,"body")[0];if(!d)return[];var f=ph(e,jB,"frameRate"),g=ph(e,jB,"subFrameRate"),h=ph(e,jB,"frameRateMultiplier"),k=ph(e,jB,"tickRate"),l=ph(e,jB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=ph(e,kB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new lB(f,g,h,k);l=mB(l);g=
|
|
1271
|
+
jh(e,"metadata")[0];g=(g?g.children:[]).filter(function(u){return"\n"!=u});h=jh(e,"style");e=jh(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next())(r=nB(r.value,h,n))&&k.push(r);if(gh(d,"p").length)throw new T(2,2,2001,"<p> can only be inside <div> in TTML");n=t(gh(d,"div"));for(p=n.next();!p.done;p=n.next())if(gh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=oB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),
|
|
1272
|
+
a.push(b);return a};
|
|
1273
|
+
function oB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(eh(a)){if(!m)return null;var r={tagName:"span",children:[hh(a)],attributes:{},parent:null}}else r=a;for(var u=null,v=t(pB),w=v.next();!w.done&&!(u=qB(r,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=ph(r,pB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new sc(n),A=new sc(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(r.attributes["xml:space"]||(h?"default":"preserve"));A=r.children.every(eh);h=
|
|
1274
|
+
[];if(!A)for(var y=t(r.children),C=y.next();!C.done;C=y.next())(C=oB(C.value,b,c,d,e,f,g,w,k,r,m,n))&&h.push(C);d=null!=l;n=hh(r);n=r.children.length&&n&&/\S/.test(n);C=r.attributes.begin||r.attributes.end||r.attributes.dur;if(!(C||n||"br"==r.tagName||0!=h.length||d&&!w))return null;y=rB(r,c);n=y.start;for(y=y.end;p&&p.tagName&&"tt"!=p.tagName;)y=sB(p,c,n,y),n=y.start,y=y.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);
|
|
1275
|
+
if(!C&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==r.tagName)return e=new Rb(n,y,""),e.lineBreak=!0,e;b="";A&&(b=Dd(hh(r)||""),w&&(b=b.replace(/\s+/g," ")));b=new Rb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=qB(r,"region",f,"")[0];if(r.attributes.region&&k&&k.attributes["xml:id"]){var z=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!r.attributes.region&&
|
|
1276
|
+
!r.attributes.style&&(g=qB(l,"region",f,"")[0]);tB(b,r,g,u,v,e,a,0==h.length);return b}
|
|
1277
|
+
function nB(a,b,c){var d=new Kb,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=uB.exec(c)||vB.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=wB(a,b,"extent");if(g){var h=(f=uB.exec(g))||vB.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Lb:0,d.heightUnits=f||null!=e?Lb:0)}if(a=wB(a,b,"origin"))if(h=(f=uB.exec(a))||vB.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
|
|
1278
|
+
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Lb,d.height=100-d.viewportAnchorY,d.heightUnits=Lb):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Lb:0;return d}function xB(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
|
|
1279
|
+
function tB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==yB(b,c,f,"direction",g)&&(a.direction="rtl");h=yB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Ub);(h=yB(b,c,f,"textAlign",!0))?(a.positionAlign=zB[h],a.lineAlign=AB[h],a.textAlign=cc[h.toUpperCase()]):a.textAlign=Tb;if(h=yB(b,c,f,"displayAlign",!0))a.displayAlign=dc[h.toUpperCase()];if(h=yB(b,c,f,"color",g))a.color=xB(h);if(h=yB(b,c,f,"backgroundColor",
|
|
1280
|
+
g))a.backgroundColor=xB(h);if(h=yB(b,c,f,"border",g))a.border=h;if(h=yB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
|
|
1281
|
+
k}).join(",")}(h=yB(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=yB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=yB(b,c,f,"lineHeight",g))&&h.match(BB)&&(a.lineHeight=h);(h=yB(b,c,f,"fontSize",g))&&(h.match(BB)||h.match(CB))&&(a.fontSize=h);if(h=yB(b,c,f,"fontStyle",g))a.fontStyle=hc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=hh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
|
|
1282
|
+
e);if(d=yB(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(BB)?a.textStrokeColor=a.color:(a.textStrokeColor=xB(d[0]),d.shift()),d[0]&&d[0].match(BB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=yB(b,c,f,"letterSpacing",g))&&d.match(BB)&&(a.letterSpacing=d);(d=yB(b,c,f,"linePadding",g))&&d.match(BB)&&(a.linePadding=d);if(d=yB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=wB(c,f,"textDecoration"))&&DB(a,d);(d=EB(b,f,"textDecoration"))&&DB(a,d);if(d=yB(b,c,f,"textCombine",g))a.textCombineUpright=
|
|
1283
|
+
d;switch(yB(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
1284
|
+
function DB(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Ob(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Ob(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1285
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ob(a.textDecoration,"overline")}}function yB(a,b,c,d,e){e=void 0===e?!0:e;return(a=EB(a,c,d))?a:e?wB(b,c,d):null}function wB(a,b,c){if(!a)return null;var d=ph(a,kB,c);return d?d:FB(a,b,c)}function EB(a,b,c){var d=ph(a,kB,c);return d?d:FB(a,b,c)}
|
|
1286
|
+
function FB(a,b,c){a=qB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=oh(a[e],"urn:ebu:tt:style",c);f||(f=ph(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?oh(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}
|
|
1287
|
+
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}}
|
|
1288
|
+
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}
|
|
1289
|
+
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))?{Sb: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;
|
|
1285
1290
|
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]))}
|
|
1286
|
-
var
|
|
1287
|
-
end:"end"},
|
|
1288
|
-
|
|
1289
|
-
re['application/mp4; codecs="stpp.ttml"']=function(){return new
|
|
1290
|
-
|
|
1291
|
+
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:Xb,center:"center",right:"end",start:Xb,
|
|
1292
|
+
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"];re["application/ttml+xml"]=function(){return new iB};function OB(){this.g=new iB}OB.prototype.parseInit=function(a){var b=!1;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).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(){};
|
|
1293
|
+
OB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Kg).box("mdat",Wg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",OB);OB.prototype.parseMedia=OB.prototype.parseMedia;OB.prototype.setManifestType=OB.prototype.setManifestType;OB.prototype.setSequenceMode=OB.prototype.setSequenceMode;OB.prototype.parseInit=OB.prototype.parseInit;re['application/mp4; codecs="stpp"']=function(){return new OB};
|
|
1294
|
+
re['application/mp4; codecs="stpp.ttml"']=function(){return new OB};re['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new OB};re['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new OB};re['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new OB};re['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new OB};re['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new OB};re['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new OB};function PB(){this.h=!1;this.g="UNKNOWN"}PB.prototype.parseInit=function(){};PB.prototype.setSequenceMode=function(a){this.h=a};PB.prototype.setManifestType=function(a){this.g=a};
|
|
1295
|
+
PB.prototype.parseMedia=function(a,b){a=wd(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=QB(new zp(a[1]));if(null==a)throw new T(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=
|
|
1291
1296
|
95443.7176888889,d+=8589934592;a=b.periodStart+d/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new zp(e);var f=new Kb;Cp(e);Ap(e);for(var g=Cp(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=
|
|
1292
|
-
Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Ap(e);g=Cp(e)}b.push(f)}d=new Map;
|
|
1293
|
-
t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Rb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var
|
|
1294
|
-
case "font-size":m=!0;l.fontSize=
|
|
1295
|
-
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new zp(l[0]),g=
|
|
1296
|
-
|
|
1297
|
-
function
|
|
1298
|
-
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=
|
|
1299
|
-
m.next())
|
|
1300
|
-
function
|
|
1301
|
-
|
|
1302
|
-
if(!f)break;if(f=
|
|
1303
|
-
function
|
|
1304
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sb);else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
1305
|
-
function
|
|
1306
|
-
re["text/vtt"]=function(){return new
|
|
1307
|
-
|
|
1308
|
-
p.value;var
|
|
1309
|
-
function
|
|
1310
|
-
function
|
|
1311
|
-
function
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
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={
|
|
1315
|
-
l.
|
|
1316
|
-
function
|
|
1297
|
+
Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Ap(e);g=Cp(e)}b.push(f)}d=new Map;RB(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
|
|
1298
|
+
t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Rb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;
|
|
1299
|
+
case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=700;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=$b;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,
|
|
1300
|
+
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new zp(l[0]),g=QB(h),n=Bp(h,/[ \t]+--\x3e[ \t]+/g),k=QB(h),null==g||null==n||null==k)ab("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;l=l.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=g,m.endTime=k,m.payload=""):m=new Rb(g,k,"");Ap(h);for(g=Cp(h);g;)SB(m,g,b),Ap(h),g=Cp(h);
|
|
1301
|
+
TB(l,m,d);null!=f&&(m.id=f);f=m}f&&e.push(f)}return e};function RB(a){for(var b=t(Object.entries(fc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Rb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(gc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Rb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1302
|
+
function TB(a,b,c){if(a.includes("<")){0===c.size&&RB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(UB)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
|
|
1303
|
+
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=VB(a);try{var m=$g("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
|
|
1304
|
+
m.next())WB(a.value,b,c);else b.payload=Dd(a);else b.payload=Dd(a)}else b.payload=Dd(a)}function VB(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function XB(a,b){return a&&0<a.length?a:b}
|
|
1305
|
+
function WB(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Kb;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=XB(g.backgroundColor,h.backgroundColor),h.color=XB(g.color,h.color),h.fontFamily=XB(g.fontFamily,h.fontFamily),h.fontSize=
|
|
1306
|
+
XB(g.fontSize,h.fontSize),h.textShadow=XB(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=ac(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
|
|
1307
|
+
if(!f)break;if(f=QB(new zp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(eh(a)||1==e.length&&eh(e[0]))for(c=hh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ac(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())WB(a.value,d,c)}
|
|
1308
|
+
function SB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Tb:a.textAlign=cc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1309
|
+
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=ec[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=ec[c[2].toUpperCase()])}
|
|
1310
|
+
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;
|
|
1311
|
+
re["text/vtt"]=function(){return new PB};re['text/vtt; codecs="vtt"']=function(){return new PB};re['text/vtt; codecs="wvtt"']=function(){return new PB};function ZB(){this.g=null}ZB.prototype.parseInit=function(a){var b=this,c=!1;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).R("mdhd",function(d){d=$i(d.reader,d.version);b.g=d.timescale}).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).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(){};
|
|
1312
|
+
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 Kg).box("moof",Rg).box("traf",Rg).R("tfdt",function(C){g=!0;c=Zi(C.reader,C.version).baseMediaDecodeTime}).R("tfhd",function(C){l=Yi(C.reader,C.flags).Pc}).R("trun",function(C){h=!0;d=aj(C.reader,C.version,C.flags).Gg}).box("mdat",Wg(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 Hg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1313
|
+
p.value;var r=p.xf||l,u=p.ee?c+p.ee:a;a=u+(r||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),y=null;"vttc"==Qg(A)?8<w&&(y=m.mb(w-8)):m.skip(w-8);r&&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(ze)};function $B(a,b,c){var d,e,f;(new Kg).box("payl",Wg(function(g){d=wd(g)})).box("iden",Wg(function(g){e=wd(g)})).box("sttg",Wg(function(g){f=wd(g)})).parse(a);return d?aC(d,e,f,b,c):null}
|
|
1314
|
+
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;re['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=wd(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};
|
|
1315
|
+
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;re["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=wd(a);a=eC(a);a=Bb(Ad(a));return this.g.parseMedia(a,b,c)};
|
|
1316
|
+
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;
|
|
1317
|
+
dC.prototype.setManifestType=dC.prototype.setManifestType;dC.prototype.setSequenceMode=dC.prototype.setSequenceMode;dC.prototype.parseInit=dC.prototype.parseInit;re["text/srt"]=function(){return new dC};function fC(){}fC.prototype.parseInit=function(){};fC.prototype.setSequenceMode=function(){};fC.prototype.setManifestType=function(){};
|
|
1318
|
+
fC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=wd(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&&
|
|
1319
|
+
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={Tg: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.Tg=f.Style;(a=d.find(function(l){return function(m){return m.Name==
|
|
1320
|
+
l.Tg}}(a)))&&kC(g,a);e.push(g)}return e};
|
|
1321
|
+
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=Yb;a.textAlign="start";break;case 2:a.displayAlign=Yb;a.textAlign=Tb;break;case 3:a.displayAlign=Yb;a.textAlign="end";
|
|
1317
1322
|
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)}
|
|
1318
|
-
function
|
|
1319
|
-
var
|
|
1320
|
-
function
|
|
1321
|
-
function
|
|
1322
|
-
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
|
|
1323
|
-
|
|
1323
|
+
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;
|
|
1324
|
+
var gC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,hC=/^\s*([^:]+):\s*(.*)/,iC=/\s*,\s*/,mC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;re["text/x-ssa"]=function(){return new fC};function nC(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Fd:c,Z:a}:null}function oC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
|
|
1325
|
+
function pC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1326
|
+
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,
|
|
1327
|
+
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}q=rC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(me(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1328
|
+
q.transmux=function(a,b,c,d){for(var e=Bb(a),f=Xi(e),g=f.length;g<e.length&&!pC(e,g);g++);a=1E3*c.endTime;f=Wi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=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+
|
|
1324
1329
|
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:[],la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba: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=Md(b,c);return Promise.resolve(b)};
|
|
1325
|
-
S("shaka.transmuxer.AacTransmuxer",
|
|
1330
|
+
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,
|
|
1326
1331
|
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,la:a,Z:e}}
|
|
1327
|
-
function
|
|
1328
|
-
|
|
1329
|
-
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:[],la:h,ta:new Uint8Array([]),Aa:0,Ba: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=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
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:[],la:h,ta:new Uint8Array([]),Aa:0,Ba: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=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",
|
|
1333
|
-
|
|
1334
|
-
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=uj(c),
|
|
1332
|
+
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}q=uC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1333
|
+
q.transmux=function(a,b,c,d){a=Bb(a);for(var e=Xi(a),f=e.length;f<a.length&&!tC(a,f);f++);var g=1E3*c.endTime;e=Wi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=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.la;k.push({data:a.subarray(f,f+l.Z),size:l.Z,duration:1536,
|
|
1334
|
+
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:[],la:h,ta:new Uint8Array([]),Aa:0,Ba: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=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",uC);uC.prototype.transmux=uC.prototype.transmux;
|
|
1335
|
+
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 gj(a.subarray(b+2));ij(c,2);ij(c,3);var d=jj(c,11)+1<<1,e=jj(c,2);if(3==e){e=jj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=jj(c,2);var g=jj(c,3),h=jj(c,1);c=jj(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,la:a,Z:d}};function wC(a){this.i=a;this.h=0;this.g=new Map}q=wC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1336
|
+
q.transmux=function(a,b,c,d){a=Bb(a);for(var e=Xi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Wi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=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.la;k.push({data:a.subarray(f,f+l.Z),size:l.Z,
|
|
1337
|
+
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:[],la:h,ta:new Uint8Array([]),Aa:0,Ba: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=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",wC);wC.prototype.transmux=wC.prototype.transmux;
|
|
1338
|
+
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 gj(b.data),d=uj(c);uj(c);uj(c);lj(c);if(yC.includes(d)&&(d=V(c),3===d&&ij(c,1),lj(c),lj(c),ij(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?vj(c,16):vj(c,64))}lj(c);d=V(c);if(0===d)V(c);else if(1===d)for(ij(c,1),lj(c),lj(c),d=V(c),e=0;e<d;e++)lj(c);lj(c);ij(c,1);var f=V(c),g=V(c),h=jj(c,1);0===h&&ij(c,1);ij(c,1);var k=0,l=0,m=0,n=0;W(c)&&
|
|
1339
|
+
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=uj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=jj(c,16),e=jj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
|
|
1335
1340
|
225].concat(k,[1],b));return{height:c,width:f,ta:a,Aa:d,Ba:e}}
|
|
1336
|
-
function
|
|
1337
|
-
{data:Md.apply(Ed,x(c)),bd:b}:null}var
|
|
1338
|
-
ta:b,Aa:a.
|
|
1339
|
-
function
|
|
1340
|
-
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(K=0;4>K;K++)for(var G=0;G<(3===K?2:6);G++)if(W(a)){var M=Math.min(64,1<<4+(K<<1));1<K&&
|
|
1341
|
+
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=wj(new gj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
|
|
1342
|
+
{data:Md.apply(Ed,x(c)),bd: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,Lf:e.Lf,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,
|
|
1343
|
+
ta:b,Aa:a.Di,Ba:a.Ci}}function BC(a){var b=new gj(a,!0);uj(b);uj(b);jj(b,4);jj(b,2);jj(b,6);a=jj(b,3);b=W(b);return{jf:a+1,Lf:b}}
|
|
1344
|
+
function CC(a){a=new gj(a,!0);uj(a);uj(a);var b=0,c=0,d=0,e=0;jj(a,4);var f=jj(a,3);W(a);for(var g=jj(a,2),h=jj(a,1),k=jj(a,5),l=uj(a),m=uj(a),n=uj(a),p=uj(a),r=uj(a),u=uj(a),v=uj(a),w=uj(a),A=uj(a),y=uj(a),C=uj(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++)jj(a,2);for(D=0;D<f;D++)z[D]&&jj(a,88),B[D]&&uj(a);V(a);z=V(a);3==z&&jj(a,1);B=V(a);D=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var I=V(a),F=V(a),J=V(a);if(W(a))for(var K=0;K<=f;K++)V(a),V(a),V(a);else V(a),V(a),
|
|
1345
|
+
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(K=0;4>K;K++)for(var G=0;G<(3===K?2:6);G++)if(W(a)){var M=Math.min(64,1<<4+(K<<1));1<K&&mj(a);for(var N=0;N<M;N++)mj(a)}else V(a);W(a);W(a);W(a)&&(uj(a),V(a),V(a),W(a));K=V(a);for(M=G=0;M<K;M++)if(N=!1,0!==M&&(N=W(a)),N){M===K&&V(a);W(a);V(a);for(var L=N=0;L<=G;L++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&N++}G=N}else{L=V(a);N=V(a);G=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(K=V(a),G=0;G<K;G++){for(M=0;M<J+4;M++)jj(a,1);jj(a,
|
|
1341
1346
|
1)}K=J=1;G=0;W(a);W(a);if(W(a)){W(a)&&(M=uj(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?(J=N[M-1],K=L[M-1]):255===M&&(J=jj(a,16),K=jj(a,16)));W(a)&&W(a);W(a)&&(jj(a,3),W(a),W(a)&&(uj(a),uj(a),uj(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)&&(jj(a,32),jj(a,32),W(a)&&V(a),W(a))){L=!1;M=W(a);N=W(a);if(M||N){if(L=W(a))uj(a),jj(a,5),W(a),jj(a,5);jj(a,4);jj(a,4);L&&jj(a,4);jj(a,5);jj(a,5);jj(a,5)}for(P=0;P<=
|
|
1342
|
-
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ha=!1;Q?V(a):ha=W(a);ha||(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),G=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:
|
|
1343
|
-
function
|
|
1344
|
-
function
|
|
1345
|
-
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
|
|
1346
|
-
function
|
|
1347
|
-
var
|
|
1348
|
-
|
|
1349
|
-
duration:d,Wa:[],la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba: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=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1347
|
+
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ha=!1;Q?V(a):ha=W(a);ha||(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),G=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:r,Ce:u,De:v,Ee:w,Fe:A,Ge:y,Rd:G,we:0,ue:z,te:I,se:F,width:B-(b+c)*(1===z||2===z?2:1),height:D-(d+e)*(1===z?2:1),Di:J,Ci:K}}
|
|
1348
|
+
function DC(a){var b=new gj(a,!0);uj(b);uj(b);V(b);V(b);W(b);W(b);jj(b,3);W(b);W(b);V(b);V(b);mj(b);W(b);W(b);W(b)&&V(b);mj(b);mj(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}}
|
|
1349
|
+
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.Lf?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&
|
|
1350
|
+
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,Bi:8*c*h}}return null}
|
|
1351
|
+
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}
|
|
1352
|
+
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}q=MC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1353
|
+
q.transmux=function(a,b,c,d){for(var e=Bb(a),f=Xi(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.Bi/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1354
|
+
duration:d,Wa:[],la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba: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=Md(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;
|
|
1355
|
+
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}q=NC.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=me(a).split(","),c=Rd("audio",b);b=Rd("video",b);return!c||b||"mp3"!=de(c)?!1:mb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
|
|
1356
|
+
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new xj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.Tc().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Jb());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=Md(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;
|
|
1357
|
+
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);/*
|
|
1353
1358
|
@license
|
|
1354
1359
|
MSS Transmuxer
|
|
1355
1360
|
Copyright 2015 Dash Industry Forum
|
|
1356
1361
|
SPDX-License-Identifier: BSD-3-Clause
|
|
1357
1362
|
*/
|
|
1358
|
-
function
|
|
1359
|
-
function
|
|
1363
|
+
function OC(a){this.h=a;(this.g=Mu.get("ISOBoxer")())&&PC(this)}
|
|
1364
|
+
function PC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1360
1365
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1361
|
-
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var
|
|
1365
|
-
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
if(!
|
|
1371
|
-
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],la:new Uint8Array([]),ta:B.ta,Aa:B.Aa,Ba:B.Ba,data:{ob:this.g,baseMediaDecodeTime:
|
|
1372
|
-
P=!0;break;case 19:case 20:case 21:N=ba=P=!0;break;case 32:ba=!0;break;case 33:ba=!0;break;case 34:ba=!0;break;case 35:P=ba=!0;break;case 39:case 40:ba=!0;break;default:ba=!1}if(P&&ba){var
|
|
1373
|
-
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:wa.data,size:wa.data.byteLength,duration:ta,Ya:Math.round((G.pts||0)-(G.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:wa.bd?2:1,bb:wa.bd?0:1}})}}var Na=
|
|
1374
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var
|
|
1375
|
-
Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Hc+=he}else Hc++}}}if(!ua||null==Ca){if(!k.yc().length)throw new T(2,3,3018,c?c.M()[0]:null);Ca=9E4*c.startTime;var ie=Rd("audio",b.codecs.split(","));if(!ie||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ua={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:ie};var rd=
|
|
1376
|
-
duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),yg+=1024/ua.sampleRate*9E4}var
|
|
1377
|
-
|
|
1378
|
-
Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:
|
|
1379
|
-
uf++}}if(0==
|
|
1380
|
-
ne);vf?(
|
|
1381
|
-
|
|
1382
|
-
2,3,4];break;case 134:
|
|
1383
|
-
2,
|
|
1384
|
-
data:{ob:this.g,baseMediaDecodeTime:
|
|
1385
|
-
|
|
1366
|
+
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==QC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=OC.prototype;q.destroy=function(){};
|
|
1367
|
+
q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
|
|
1368
|
+
q.transmux=function(a,b,c){if(!c)return Promise.resolve(Bb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.M()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1369
|
+
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
|
|
1370
|
+
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=RC(u,"traf")+RC(h,"senc")+16);var w=Bb(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function RC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",OC);OC.prototype.transmux=OC.prototype.transmux;
|
|
1371
|
+
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}q=SC.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1372
|
+
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=me(c).split(",");c=Rd("audio",d);d=Rd("video",d);if(c&&(c=de(c),!TC.includes(c))||d&&(c=de(d),!UC.includes(c)))return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};
|
|
1373
|
+
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=me(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return af(c,"audio/mp4")}).map($e).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1374
|
+
q.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Ej(f)){for(var g=Xi(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 xj;var k=this.j.parse(f),l=[],m=k.Tc();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.yc();
|
|
1375
|
+
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==r&&(r=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.bd?2:1,bb:C.bd?0:1}})}}var B=xC(u);if(!B||null==r)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
|
|
1376
|
+
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],la:new Uint8Array([]),ta:B.ta,Aa:B.Aa,Ba:B.Ba,data:{ob:this.g,baseMediaDecodeTime:r,Ta:p},stream:b};break;case "hvc":var D=[],I=null,F=[],J=k.yc();if(!J.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var K=0;K<J.length;K++){var G=J[K],M=G.nalus;F.push.apply(F,x(M));for(var N=!1,L=[],P=!1,R=t(M),Q=R.next();!Q.done;Q=R.next()){var ha=Q.value;switch(ha.type){case 1:case 0:var ba=
|
|
1377
|
+
P=!0;break;case 19:case 20:case 21:N=ba=P=!0;break;case 32:ba=!0;break;case 33:ba=!0;break;case 34:ba=!0;break;case 35:P=ba=!0;break;case 39:case 40:ba=!0;break;default:ba=!1}if(P&&ba){var oa=ha.fullData.byteLength,Ka=new Uint8Array(4);Ka[0]=oa>>24&255;Ka[1]=oa>>16&255;Ka[2]=oa>>8&255;Ka[3]=oa&255;L.push(Ka);L.push(ha.fullData)}}var wa=L.length?{data:Md.apply(Ed,x(L)),bd:N}:null;if(wa){null==I&&null!=G.dts&&(I=G.dts);var ta=void 0;ta=K+1<J.length?(J[K+1].dts||0)-(G.dts||0):1<J.length?(G.dts||0)-(J[K-
|
|
1378
|
+
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:wa.data,size:wa.data.byteLength,duration:ta,Ya:Math.round((G.pts||0)-(G.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:wa.bd?2:1,bb:wa.bd?0:1}})}}var Na=AC(F);if(!Na||null==I)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Na.height;b.width=Na.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],la:new Uint8Array([]),ta:Na.ta,Aa:Na.Aa,Ba:Na.Ba,data:{ob:this.g,baseMediaDecodeTime:I,Ta:D},stream:b}}n&&
|
|
1379
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Va=[],ua,Ca=null,ob=t(k.Jb()),Pc=ob.next();!Pc.done;Pc=ob.next()){var fe=Pc.value,qd=fe.data;if(qd){var Hc=0;ua=oC(qd,Hc);if(!ua)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=ua.sampleRate;b.channelsCount=ua.channelCount;null==Ca&&null!==fe.pts&&(Ca=fe.pts);for(;Hc<qd.length;){var ge=nC(qd,Hc);if(ge){var he=ge.Fd+ge.Z;Hc+he<=qd.length&&Va.push({data:qd.subarray(Hc+ge.Fd,Hc+he),size:ge.Z,duration:1024,Ya:0,flags:{ab:0,
|
|
1380
|
+
Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Hc+=he}else Hc++}}}if(!ua||null==Ca){if(!k.yc().length)throw new T(2,3,3018,c?c.M()[0]:null);Ca=9E4*c.startTime;var ie=Rd("audio",b.codecs.split(","));if(!ie||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ua={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:ie};var rd=qC(ie,b.channelsCount);if(!rd)throw new T(2,3,3018,c?c.M()[0]:null);for(var Di=Ca+9E4*(c.endTime-c.startTime),yg=Ca;yg<Di;)Va.push({data:rd,size:rd.byteLength,
|
|
1381
|
+
duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),yg+=1024/ua.sampleRate*9E4}var Ei=ua.sampleRate,Fi=Ca/9E4*Ei;n={id:b.id,type:"audio",codecs:ua.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ei,duration:d,Wa:[],la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:Fi,Ta:Va},stream:b};break;case "ac3":for(var zg=[],je=0,jc=new Uint8Array([]),nj=null,wu=t(k.Jb()),Mm=wu.next();!Mm.done;Mm=wu.next()){var Nm=Mm.value,Om=Nm.data;null==nj&&null!==
|
|
1382
|
+
Nm.pts&&(nj=Nm.pts);for(var tf=0;tf<Om.length;){var Id=sC(Om,tf);Id?(b.audioSamplingRate=Id.sampleRate,b.channelsCount=Id.channelCount,je=Id.sampleRate,jc=Id.la,zg.push({data:Om.subarray(tf,tf+Id.Z),size:Id.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),tf+=Id.Z):tf++}}if(0==je||0==jc.byteLength||null==nj)throw new T(2,3,3018,c?c.M()[0]:null);var jD=nj/9E4*je;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:je,duration:d,Wa:[],la:jc,ta:new Uint8Array([]),
|
|
1383
|
+
Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:jD,Ta:zg},stream:b};break;case "ec3":for(var xu=[],oj=0,Pm=new Uint8Array([]),pj=null,yu=t(k.Jb()),Qm=yu.next();!Qm.done;Qm=yu.next()){var Rm=Qm.value,Sm=Rm.data;null==pj&&null!==Rm.pts&&(pj=Rm.pts);for(var uf=0;uf<Sm.length;){var Jd=vC(Sm,uf);Jd?(b.audioSamplingRate=Jd.sampleRate,b.channelsCount=Jd.channelCount,oj=Jd.sampleRate,Pm=Jd.la,xu.push({data:Sm.subarray(uf,uf+Jd.Z),size:Jd.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),uf+=Jd.Z):
|
|
1384
|
+
uf++}}if(0==oj||0==Pm.byteLength||null==pj)throw new T(2,3,3018,c?c.M()[0]:null);var kD=pj/9E4*oj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:oj,duration:d,Wa:[],la:Pm,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:kD,Ta:xu},stream:b};break;case "mp3":for(var zu=[],qj,rj=null,Au=t(k.Jb()),Tm=Au.next();!Tm.done;Tm=Au.next()){var Um=Tm.value,Mg=Um.data;if(Mg){null==rj&&null!==Um.pts&&(rj=Um.pts);for(var ne=0;ne<Mg.length;){var vf=FC(Mg,
|
|
1385
|
+
ne);vf?(qj||(qj=vf),ne+vf.Z<=Mg.length&&zu.push({data:Mg.subarray(ne,ne+vf.Z),size:vf.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),ne+=vf.Z):ne++}}}if(!qj||null==rj)throw new T(2,3,3018,c?c.M()[0]:null);var Bu=qj.sampleRate,lD=rj/9E4*Bu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Bu,duration:d,Wa:[],la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:lD,Ta:zu},stream:b};break;case "opus":var Cu=[],
|
|
1386
|
+
sj=null,Rc=k.F;if(!Rc)throw new T(2,3,3018,c?c.M()[0]:null);var zb=[];switch(Rc.nh){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,
|
|
1387
|
+
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 Du=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 Eu=Rc.sampleRate,Fu=t(k.Jb()),Vm=Fu.next();!Vm.done;Vm=Fu.next()){var Wm=Vm.value,wf=Wm.data;null==sj&&null!==Wm.pts&&(sj=Wm.pts);for(var Ng=0;Ng<wf.length;){for(var mD=0!==(wf[Ng+1]&16),nD=0!==(wf[Ng+1]&8),td=Ng+
|
|
1388
|
+
2,tj=0;255===wf[td];)tj+=255,td+=1;tj+=wf[td];td+=1;td+=mD?2:0;td+=nD?2:0;var Gu=wf.slice(td,td+tj);Cu.push({data:Gu,size:Gu.byteLength,duration:960,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Ng=td+tj}}if(0==Du.byteLength||null==sj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Rc.sampleRate;b.channelsCount=Rc.channelCount;var oD=sj/9E4*Eu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Eu,duration:d,Wa:[],la:Du,ta:new Uint8Array([]),Aa:0,Ba:0,
|
|
1389
|
+
data:{ob:this.g,baseMediaDecodeTime:oD,Ta:Cu},stream:b}}n&&(l.push(n),n=null)}}catch(Xm){return Xm&&3023==Xm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Xm)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Hu=new Bw(l),Ym=b.id+"_"+c.i;if(this.i.has(Ym))var Zm=this.i.get(Ym);else Zm=Hw(Hu),this.i.set(Ym,Zm);var pD=Yw(Hu);this.g++;var qD=Md(Zm,pD);return Promise.resolve(qD)};S("shaka.transmuxer.TsTransmuxer",SC);SC.prototype.transmux=SC.prototype.transmux;
|
|
1390
|
+
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);/*
|
|
1386
1391
|
@license
|
|
1387
1392
|
EME Encryption Scheme Polyfill
|
|
1388
1393
|
Copyright 2019 Google LLC
|
|
1389
1394
|
SPDX-License-Identifier: Apache-2.0
|
|
1390
1395
|
*/
|
|
1391
|
-
function
|
|
1392
|
-
function
|
|
1393
|
-
function
|
|
1396
|
+
function VC(){}var WC;
|
|
1397
|
+
function XC(){WC||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(WC=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=YC,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1398
|
+
function YC(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),E(e,WC.call(c,a,b),2);d=e.h;if(ZC(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=WC,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=$C;return e.return($C.call(c,
|
|
1394
1399
|
a,b))})}
|
|
1395
|
-
function
|
|
1396
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(
|
|
1397
|
-
function
|
|
1398
|
-
function
|
|
1399
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
1400
|
-
function
|
|
1401
|
-
new
|
|
1402
|
-
function
|
|
1403
|
-
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",
|
|
1404
|
-
|
|
1405
|
-
function
|
|
1406
|
-
function
|
|
1400
|
+
function $C(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=aD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=bD(h.videoCapabilities,d),l=bD(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1401
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,WC.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new cD(p,r,u))})}function bD(a,b){return a?a.filter(function(c){return dD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",VC);VC.install=XC;function eD(){}var fD;
|
|
1402
|
+
function gD(){fD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(fD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=hD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1403
|
+
function hD(a){var b=this,c,d;return O(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(e,fD.call(b,a),2);case 2:c=e.h;if(!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&ZC(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=fD,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1404
|
+
navigator.mediaCapabilities.decodingInfo=iD;if(d){e.u(3);break}return E(e,rD(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(iD.call(b,a))}})}
|
|
1405
|
+
function iD(a){var b=this,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=aD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},dD(d,g)&&dD(c,g))?E(l,fD.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1406
|
+
new cD(k.keySystemAccess,c,d);l.u(3);break}if(!a.keySystemConfiguration){l.u(3);break}return E(l,rD(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
|
|
1407
|
+
function rD(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
1408
|
+
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",eD);eD.install=gD;function cD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
|
|
1409
|
+
cD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};cD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
|
|
1410
|
+
function aD(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function ZC(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
1411
|
+
function dD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(sD||tD)return!0;return!1}function uD(){}function wz(){XC();gD()}S("EncryptionSchemePolyfills",uD);uD.install=wz;var tD=navigator.userAgent.includes("CrKey"),sD=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=uD);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1407
1412
|
|
|
1408
1413
|
//# sourceMappingURL=shaka-player.compiled.map
|