shaka-player 4.2.0 → 4.2.1
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/.github/workflows/selenium-lab-tests.yaml +158 -53
- package/CHANGELOG.md +11 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/locales.js +32 -32
- package/dist/shaka-player.compiled.d.ts +0 -2
- package/dist/shaka-player.compiled.debug.d.ts +0 -2
- package/dist/shaka-player.compiled.debug.externs.js +0 -2
- package/dist/shaka-player.compiled.debug.js +55 -56
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +0 -2
- package/dist/shaka-player.compiled.js +372 -373
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +0 -2
- package/dist/shaka-player.ui.debug.d.ts +0 -2
- package/dist/shaka-player.ui.debug.externs.js +0 -2
- package/dist/shaka-player.ui.debug.js +57 -58
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +0 -2
- package/dist/shaka-player.ui.js +698 -700
- package/dist/shaka-player.ui.map +3 -3
- package/lib/hls/hls_parser.js +24 -74
- package/lib/player.js +13 -1
- package/lib/text/ui_text_displayer.js +8 -0
- package/lib/util/error.js +2 -10
- package/lib/util/player_configuration.js +1 -0
- package/package.json +1 -1
- package/test/hls/hls_parser_unit.js +52 -1
- package/test/media/drm_engine_unit.js +29 -0
- package/test/player_src_equals_integration.js +2 -0
- package/test/player_unit.js +39 -1
- package/test/test/assets/small.mp4 +0 -0
- package/ui/less/ad_controls.less +4 -0
|
@@ -15,60 +15,60 @@ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
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=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(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];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var 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 oa=ka;
|
|
18
|
-
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(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.dh=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function
|
|
19
|
-
function
|
|
20
|
-
function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.ye?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){
|
|
21
|
-
function Aa(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,
|
|
22
|
-
function
|
|
23
|
-
function Ea(a){this.next=function(b){
|
|
24
|
-
function Fa(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())})}function K(a){return Fa(new Ea(new ya(a)))}function
|
|
18
|
+
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(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.dh=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
|
|
19
|
+
function sa(a,b){a.i={re:b,ye:!0};a.g=a.m||a.j}qa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function z(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.re;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.ye?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){ra(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
|
|
21
|
+
function Aa(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,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
|
|
22
|
+
function Ba(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,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.ye)throw b.re;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
|
|
23
|
+
function Ea(a){this.next=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ba(a));return b};this["throw"]=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.s):(sa(a.g,b),b=Ba(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}
|
|
24
|
+
function Fa(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())})}function K(a){return Fa(new Ea(new ya(a)))}function Ia(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
25
25
|
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=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
26
26
|
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.I(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.D(g):this.m(g)}};
|
|
27
27
|
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.L(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.u()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
|
|
28
28
|
function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=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;
|
|
29
29
|
b.prototype.I=function(g){var h=this.j();g.Fc(h.resolve,h.reject)};b.prototype.L=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,q){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Fc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Fc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
30
30
|
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).Fc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Fc(n(p.length-1),m),k=h.next();
|
|
31
|
-
while(!k.done)})};return b});function
|
|
32
|
-
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(!
|
|
33
|
-
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(!
|
|
34
|
-
|
|
35
|
-
fa("Map",function(a){function b(){var h={};return h.
|
|
31
|
+
while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
32
|
+
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(!Ja(k,g)){var l=new c;ba(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({}),
|
|
33
|
+
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(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
34
|
+
Ja(k,g)&&Ja(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ja(k,g)&&Ja(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
35
|
+
fa("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Qa;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.h[l];if(m&&Ja(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,fa:p}}return{id:l,
|
|
36
36
|
list:m,index:-1,fa:void 0}}function e(h){this.h={};this.g=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!=m.value[0].x||
|
|
37
|
-
"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.h[l.id]=[]);l.fa?l.fa.value=k:(l.fa={next:this.g,
|
|
38
|
-
h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.
|
|
37
|
+
"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.h[l.id]=[]);l.fa?l.fa.value=k:(l.fa={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.fa),this.g.Qa.next=l.fa,this.g.Qa=l.fa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.fa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.fa.Qa.next=h.fa.next,h.fa.next.Qa=h.fa.Qa,
|
|
38
|
+
h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Qa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).fa};e.prototype.get=function(h){return(h=d(this,h).fa)&&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=function(h,k){for(var l=this.entries(),
|
|
39
39
|
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});
|
|
40
40
|
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||
|
|
41
41
|
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;
|
|
42
|
-
b.prototype[Symbol.iterator]=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
|
|
42
|
+
b.prototype[Symbol.iterator]=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 Ka(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{we:e,v:f}}return{we:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).we}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
|
|
43
43
|
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,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function La(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+""}
|
|
44
|
-
fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return
|
|
45
|
-
function Ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var Na="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)
|
|
44
|
+
fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=La(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
|
|
45
|
+
function Ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var Na="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)Ja(d,e)&&(a[e]=d[e])}return a};
|
|
46
46
|
fa("Object.assign",function(a){return a||Na});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 Ma(this,function(b,c){return c})}});
|
|
47
47
|
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;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});
|
|
48
|
-
fa("String.prototype.repeat",function(a){return a?a:function(b){var c=La(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}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)
|
|
49
|
-
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}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)
|
|
48
|
+
fa("String.prototype.repeat",function(a){return a?a:function(b){var c=La(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}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
|
|
49
|
+
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}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push([d,b[d]]);return c}});var Oa=this||self;
|
|
50
50
|
function M(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
|
|
51
51
|
@license
|
|
52
52
|
Shaka Player
|
|
53
53
|
Copyright 2016 Google LLC
|
|
54
54
|
SPDX-License-Identifier: Apache-2.0
|
|
55
55
|
*/
|
|
56
|
-
function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.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)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=
|
|
57
|
-
function gb(a,b,c){c||(c=db);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 hb(a,b,c){this.startTime=a;this.direction=
|
|
56
|
+
function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.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)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ia.apply(1,arguments);Xa.has(a)||(Xa.add(a),Va.apply(Ta,ia(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Va=cb[2];Ua=cb[1]};function db(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function eb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fb(a,b,c){c||(c=db);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={hd:d.hd},e=a.next()){d.hd=e.value;e=b.findIndex(function(f){return function(g){return c(f.hd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
57
|
+
function gb(a,b,c){c||(c=db);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 hb(a,b,c){this.startTime=a;this.direction=ib;this.endTime=b;this.payload=c;this.region=new jb;this.position=null;this.positionAlign=kb;this.size=0;this.textAlign=lb;this.writingMode=mb;this.lineInterpretation=nb;this.line=null;this.lineHeight="";this.lineAlign=ob;this.displayAlign=pb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=qb;this.fontStyle=sb;this.linePadding=this.letterSpacing=
|
|
58
58
|
this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}hb.prototype.clone=function(){var a=new hb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
59
|
-
function tb(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(!gb(a.nestedCues,b.nestedCues,tb))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(!gb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",hb);var
|
|
60
|
-
hb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:
|
|
61
|
-
hb.lineInterpretation={LINE_NUMBER:
|
|
62
|
-
var sb="normal",zb={NORMAL:sb,ITALIC:"italic",OBLIQUE:"oblique"};hb.fontStyle=zb;hb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function
|
|
63
|
-
function Fb(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,Uint8Array)}function Ib(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,DataView)}function Hb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Eb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Cb);Cb.toDataView=Ib;Cb.toUint8=Fb;Cb.toArrayBuffer=Gb;Cb.equal=Db;function Jb(){}M("shaka.dependencies",Jb);Jb.has=function(a){return Kb.has(a)};Jb.add=function(a,b){if(!Lb[a])throw Error(a+" is not supported");Kb.set(a,function(){return b})};var Lb={muxjs:"muxjs"};Jb.Allowed=Lb;var Kb=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=
|
|
59
|
+
function tb(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(!gb(a.nestedCues,b.nestedCues,tb))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(!gb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",hb);var kb="auto";
|
|
60
|
+
hb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:kb};var lb="center",ub={LEFT:"left",RIGHT:"right",CENTER:lb,START:"start",END:"end"};hb.textAlign=ub;var pb="after",vb={BEFORE:"before",CENTER:"center",AFTER:pb};hb.displayAlign=vb;var ib="ltr";hb.direction={HORIZONTAL_LEFT_TO_RIGHT:ib,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var mb="horizontal-tb";hb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:mb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var nb=0;
|
|
61
|
+
hb.lineInterpretation={LINE_NUMBER:nb,PERCENTAGE:1};var ob="start",wb={CENTER:"center",START:ob,END:"end"};hb.lineAlign=wb;var xb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};hb.defaultTextColor=xb;var yb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};hb.defaultTextBackgroundColor=yb;var qb=400;hb.fontWeight={NORMAL:qb,BOLD:700};
|
|
62
|
+
var sb="normal",zb={NORMAL:sb,ITALIC:"italic",OBLIQUE:"oblique"};hb.fontStyle=zb;hb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function jb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ab;this.scroll=Bb}M("shaka.text.CueRegion",jb);var Ab=1;jb.units={PX:0,PERCENTAGE:Ab,LINES:2};var Bb="";jb.scrollMode={NONE:Bb,UP:"up"};function Cb(){}function Db(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Eb(a)==Eb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Fb(a),d=Fb(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Eb(a){return a instanceof ArrayBuffer?a:a.buffer}function Gb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
63
|
+
function Fb(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,Uint8Array)}function Ib(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,DataView)}function Hb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Eb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Cb);Cb.toDataView=Ib;Cb.toUint8=Fb;Cb.toArrayBuffer=Gb;Cb.equal=Db;function Jb(){}M("shaka.dependencies",Jb);Jb.has=function(a){return Kb.has(a)};Jb.add=function(a,b){if(!Lb[a])throw Error(a+" is not supported");Kb.set(a,function(){return b})};var Lb={muxjs:"muxjs"};Jb.Allowed=Lb;var Kb=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=Ia.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
64
64
|
N.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,
|
|
65
65
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,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,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
|
|
66
66
|
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,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,
|
|
67
67
|
DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,HLS_AES_128_INVALID_IV_LENGTH:4043,HLS_AES_128_INVALID_KEY_LENGTH:4044,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,
|
|
69
|
+
FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,
|
|
70
|
+
ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,
|
|
71
|
+
MODIFY_OPERATION_NOT_SUPPORTED:9016,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
|
|
72
72
|
@license
|
|
73
73
|
Copyright 2008 The Closure Library Authors
|
|
74
74
|
SPDX-License-Identifier: Apache-2.0
|
|
@@ -78,25 +78,25 @@ var Mb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
78
78
|
Copyright 2006 The Closure Library Authors
|
|
79
79
|
SPDX-License-Identifier: Apache-2.0
|
|
80
80
|
*/
|
|
81
|
-
function Nb(a){var b;a instanceof Nb?(Ob(this,a.Ea),this.
|
|
82
|
-
r.toString=function(){var a=[],b=this.Ea;b&&a.push(
|
|
83
|
-
r.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Nb);var c=!!a.Ea;c?Ob(b,a.Ea):c=!!a.
|
|
84
|
-
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.ta=d:c=""!==a.g.toString();c?Qb(b,a.g.clone()):c=!!a.
|
|
85
|
-
function Rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function
|
|
86
|
-
function
|
|
87
|
-
r.set=function(a,b){
|
|
88
|
-
function
|
|
89
|
-
O.prototype.tickNow=O.prototype.Lb;function
|
|
90
|
-
function
|
|
91
|
-
function
|
|
81
|
+
function Nb(a){var b;a instanceof Nb?(Ob(this,a.Ea),this.nb=a.nb,this.Fa=a.Fa,Pb(this,a.Ib),this.ta=a.ta,Qb(this,a.g.clone()),this.eb=a.eb):a&&(b=String(a).match(Mb))?(Ob(this,b[1]||"",!0),this.nb=Rb(b[2]||""),this.Fa=Rb(b[3]||"",!0),Pb(this,b[4]),this.ta=Rb(b[5]||"",!0),Qb(this,b[6]||"",!0),this.eb=Rb(b[7]||"")):this.g=new Sb(null)}r=Nb.prototype;r.Ea="";r.nb="";r.Fa="";r.Ib=null;r.ta="";r.eb="";
|
|
82
|
+
r.toString=function(){var a=[],b=this.Ea;b&&a.push(Ub(b,Vb,!0),":");if(b=this.Fa){a.push("//");var c=this.nb;c&&a.push(Ub(c,Vb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ib;null!=b&&a.push(":",String(b))}if(b=this.ta)this.Fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ub(b,"/"==b.charAt(0)?Wb:Xb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.eb)&&a.push("#",Ub(b,Yb));return a.join("")};
|
|
83
|
+
r.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Nb);var c=!!a.Ea;c?Ob(b,a.Ea):c=!!a.nb;c?b.nb=a.nb:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Ib;var d=a.ta;if(c)Pb(b,a.Ib);else if(c=!!a.ta){if("/"!=d.charAt(0))if(this.Fa&&!this.ta)d="/"+d;else{var e=b.ta.lastIndexOf("/");-1!=e&&(d=b.ta.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(""):".."==
|
|
84
|
+
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.ta=d:c=""!==a.g.toString();c?Qb(b,a.g.clone()):c=!!a.eb;c&&(b.eb=a.eb);return b};r.clone=function(){return new Nb(this)};function Ob(a,b,c){a.Ea=c?Rb(b,!0):b;a.Ea&&(a.Ea=a.Ea.replace(/:$/,""))}function Pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ib=b}else a.Ib=null}function Qb(a,b,c){b instanceof Sb?a.g=b:(c||(b=Ub(b,Zb)),a.g=new Sb(b))}
|
|
85
|
+
function Rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ub(a,b,c){return null!=a?(a=encodeURI(a).replace(b,$b),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function $b(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Vb=/[#\/\?@]/g,Xb=/[#\?:]/g,Wb=/[#\?]/g,Zb=/[#\?@]/g,Yb=/#/g;function Sb(a){this.g=a||null}
|
|
86
|
+
function ac(a){if(!a.na&&(a.na={},a.Hc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=Sb.prototype;r.na=null;r.Hc=null;r.add=function(a,b){ac(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Hc++;return this};
|
|
87
|
+
r.set=function(a,b){ac(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new Sb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Hc=this.Hc}return a};function bc(a,b){return a.concat(b)}function cc(){}function dc(a){return null!=a};function ec(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Nb(d)});return a.map(function(d){return new Nb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(bc,[]).map(function(d){return d.toString()})}function fc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
88
|
+
function gc(a,b){if(1==b.length)return b[0];var c=hc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function hc(a,b){for(var c=t(ic[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==jc?"":null}var jc="text",kc={va:"video",bb:"audio",X:jc,Ub:"image",pg:"application"},ic={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function lc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}lc.prototype.resolve=function(){};lc.prototype.reject=function(){};function mc(a){this.h=a;this.g=void 0}mc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function nc(a){this.h=a;this.g=null}nc.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Lb=function(){this.stop();this.h();return this};O.prototype.R=function(a){var b=this;this.stop();this.g=(new nc(function(){b.h()})).R(a);return this};O.prototype.Ca=function(a){var b=this;this.stop();this.g=(new nc(function(){b.g.R(a);b.h()})).R(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ca;O.prototype.tickAfter=O.prototype.R;
|
|
89
|
+
O.prototype.tickNow=O.prototype.Lb;function oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pc(a){return""!=qc().canPlayType(a)}function rc(){return sc("Xbox One")}function tc(){return sc("Tizen")}function uc(){return sc("Web0S")&&sc("Chrome/38.0.2125.122 Safari/537.36")}function vc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tc()&&!sc("PC=EOS")&&!wc()&&!sc("AFT")}function wc(){return sc("PlayStation 4")}
|
|
90
|
+
function xc(){if(!vc())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 sc(a){return(navigator.userAgent||"").includes(a)}function qc(){if(yc)return yc;zc||(zc=new O(function(){yc=null}));(yc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yc=document.createElement("video"));zc.R(1);return yc}var zc=null,yc=null;function Ac(){}
|
|
91
|
+
function Bc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!wc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('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==
|
|
92
92
|
(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}
|
|
93
|
-
function
|
|
94
|
-
function
|
|
95
|
-
function Ic(a){if(window.TextEncoder&&!
|
|
96
|
-
|
|
97
|
-
function Pc(a){var b=Fb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Qc(){for(var a=
|
|
93
|
+
function Cc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Dc.value()(d)}
|
|
94
|
+
function Ec(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new N(2,2,2003);}
|
|
95
|
+
function Ic(a){if(window.TextEncoder&&!wc()){var b=new TextEncoder;return Gb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gb(b)}function Jc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Jc;Ac.toUTF8=Ic;Ac.fromBytesAutoDetect=Ec;Ac.fromUTF16=Cc;
|
|
96
|
+
Ac.fromUTF8=Bc;var Dc=new mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Kc(){}function Lc(a){a=Fb(a);a=Dc.value()(a);return btoa(a)}function Mc(a,b){b=void 0==b?!0:b;var c=Lc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Nc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Oc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
97
|
+
function Pc(a){var b=Fb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Qc(){for(var a=Ia.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Kc);Kc.concat=Qc;Kc.toHex=Pc;Kc.fromHex=Oc;Kc.fromBase64=Nc;Kc.toBase64=Mc;Kc.toStandardBase64=Lc;function Rc(){var a=this;this.o=Kb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Qc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Qc.apply(Kc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Rc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
98
98
|
function Sc(a,b){if(!Kb.get("muxjs")()||!Tc(a))return!1;if(b)return MediaSource.isTypeSupported(Uc(b,a));var c=Uc("audio",a),d=Uc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Tc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
99
|
-
function Uc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Vc(a,b){a.l=!0;a.h=new
|
|
99
|
+
function Uc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Vc(a,b){a.l=!0;a.h=new lc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Wc(){}function Xc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Yc(a,b,c){a=Xc(a,b);if(Tc(a)){if(Kb.get("muxjs")())return Uc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
|
|
100
100
|
function Zc(a){var b=$c(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===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"===a&&"b2"===b:return"dtsx";
|
|
101
101
|
case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function ad(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function $c(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}M("shaka.util.MimeUtils",Wc);Wc.getFullType=Xc;
|
|
102
102
|
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function bd(a){this.j=null;this.i=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function cd(a){return dd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}bd.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
|
|
@@ -105,65 +105,65 @@ bd.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)retu
|
|
|
105
105
|
function hd(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new hb(c.startTime,c.endTime,c.text)});return b}function id(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())id(a,d.value,c)}
|
|
106
106
|
function jd(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,[]);id(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.B&&a.i.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,
|
|
107
107
|
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",bd);bd.prototype.destroy=bd.prototype.destroy;bd.findParser=function(a){return dd[a]};bd.unregisterParser=function(a){delete dd[a]};bd.registerParser=function(a,b){dd[a]=b};var dd={};function kd(){}function ld(a,b){a=Q(a);b=Q(b);return a.split("-")[0]==b.split("-")[0]}function md(a,b){a=Q(a);b=Q(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function nd(a,b){a=Q(a);b=Q(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Q(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=od.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
|
|
108
|
-
function sd(a,b){a=Q(a);b=Q(b);return b==a?4:md(b,a)?3:nd(b,a)?2:md(a,b)?1:0}function
|
|
109
|
-
function
|
|
110
|
-
kd.getLocaleForText=function(a){return Q(a.language||"und")};kd.getBase=
|
|
108
|
+
function sd(a,b){a=Q(a);b=Q(b);return b==a?4:md(b,a)?3:nd(b,a)?2:md(a,b)?1:0}function ud(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=od.get(a)||a}function vd(a){return a.language?Q(a.language):a.audio&&a.audio.language?Q(a.audio.language):a.video&&a.video.language?Q(a.video.language):"und"}
|
|
109
|
+
function wd(a,b){for(var c=Q(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(Q(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,md(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,nd(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,md(c,f))return f;return null}M("shaka.util.LanguageUtils",kd);kd.findClosestLocale=wd;kd.getLocaleForVariant=vd;
|
|
110
|
+
kd.getLocaleForText=function(a){return Q(a.language||"und")};kd.getBase=ud;kd.relatedness=sd;kd.areSiblings=function(a,b){var c=ud(a),d=ud(b);return a!=c&&b!=d&&c==d};kd.normalize=Q;kd.isSiblingOf=nd;kd.isParentOf=md;kd.areLanguageCompatible=ld;kd.areLocaleCompatible=function(a,b){a=Q(a);b=Q(b);return a==b};
|
|
111
111
|
var od=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
|
|
112
112
|
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
113
113
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
114
114
|
"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",
|
|
115
115
|
"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",
|
|
116
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function
|
|
117
|
-
function
|
|
118
|
-
function
|
|
119
|
-
function
|
|
120
|
-
function
|
|
121
|
-
function
|
|
122
|
-
function
|
|
123
|
-
function
|
|
124
|
-
1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(
|
|
125
|
-
function
|
|
116
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function xd(){this.g={}}r=xd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function yd(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function zd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Ad(f,b,c);f=Bd(f,d);b=Cd(f);b=Dd(b);var g=Ed(b,e);a.variants=a.variants.filter(function(h){return Fd(h)==g?!0:!1})}function Cd(a){var b=new xd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Fd(c);b.push(d,c)}return b}
|
|
117
|
+
function Dd(a){var b=0,c=new Map,d=a.size();yd(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new xd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
|
|
118
|
+
function Ad(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={td:d.td},e=b.next())if(d.td=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.td)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={ed:d.ed},b=c.next())if(d.ed=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.ed)}}(d)),b.length){a=b;break}return a}
|
|
119
|
+
function Ed(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Gd||d==Hd){if(a=Id(a,d),1==a.size())return a.keys()[0]}else if(d==Jd)break;return Kd(a)}function Id(a,b){var c=0,d=new xd;yd(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
|
|
120
|
+
function Kd(a){var b="",c=Infinity;yd(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Fd(a){var b="";a.video&&(b=Zc(a.video.codecs));var c="";a.audio&&(c=Zc(a.audio.codecs));return b+"-"+c}function Ld(a,b,c){a.variants=a.variants.filter(function(d){return Md(d,b,c)})}
|
|
121
|
+
function Md(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
|
|
122
|
+
function Nd(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=Md(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Od(a,b){return K(function(c){if(1==c.g)return u(c,Pd(b,0<b.offlineSessionIds.length),2);Qd(a,b);Rd(b);return u(c,Sd(b),0)})}
|
|
123
|
+
function Pd(a,b){return K(function(c){if(1==c.g)return u(c,Td(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Ud(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=gc("video",g);g=gc("audio",g);g=Yc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Yc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Vd(f.codecs),f=Yc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(rc()&&e&&(e.width&&
|
|
124
|
+
1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(Wd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Wd(d));return e});z(c)})}
|
|
125
|
+
function Td(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return K(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return K(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return w=D.h,y.decodingInfos.push(w),va(D,0);F(D);JSON.stringify(x);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Xd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
|
|
126
126
|
0)})}
|
|
127
|
-
function
|
|
128
|
-
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
127
|
+
function Xd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=gc("video",g);f=Ud(f);g=gc("audio",g);g=Yc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Ud(f);f=Yc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
128
|
+
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Vd(d.codecs),f=Yc(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
|
|
129
129
|
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,q=t(h.initData),v=q.next();!v.done;v=q.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
130
|
-
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function
|
|
131
|
-
function
|
|
132
|
-
function
|
|
133
|
-
function
|
|
134
|
-
function
|
|
130
|
+
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function Vd(a){return tc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
|
|
131
|
+
function Ud(a){return"vp9"==a?"vp09.00.41.08":a}function Qd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Yd(d,a.audio)||c&&a&&a.video&&!Yd(c,a.video)?!1:!0})}function Rd(a){a.textStreams=a.textStreams.filter(function(b){return cd(Xc(b.mimeType,b.codecs))})}
|
|
132
|
+
function Sd(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Zd.has(f)){l.A(5);break}g=$d.get(f);if(!g){Zd.set(f,!1);l.A(5);break}return u(l,ae(g),7);case 7:h=l.h,Zd.set(f,h);case 5:(k=Zd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,z(l)}})}
|
|
133
|
+
function ae(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)}})}function Yd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
134
|
+
function be(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
135
135
|
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
|
|
136
136
|
a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
|
|
137
|
-
function
|
|
137
|
+
function ce(a){return{id:a.id,active:!1,type:jc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
|
|
138
138
|
originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
|
|
139
|
-
function
|
|
140
|
-
audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function
|
|
141
|
-
function
|
|
142
|
-
function
|
|
143
|
-
originalTextId:null,originalImageId:null}}function
|
|
144
|
-
function
|
|
145
|
-
function le(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=
|
|
146
|
-
me(e,a[0]):e}function me(a,b){return a.filter(function(c){return c.roles.includes(b)})}function
|
|
139
|
+
function de(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
|
|
140
|
+
audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function ee(a){a.__shaka_id||(a.__shaka_id=fe++);return a.__shaka_id}
|
|
141
|
+
function ge(a){var b=he(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ie(a){var b=he(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
142
|
+
function he(a){return{id:ee(a),active:!1,type:"",bandwidth:0,language:Q(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
|
|
143
|
+
originalTextId:null,originalImageId:null}}function je(a){return a.allowedByApplication&&a.allowedByKeySystem}function ke(a){return a.filter(function(b){return je(b)})}
|
|
144
|
+
function Bd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
|
|
145
|
+
function le(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=wd(Q(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Q(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=me(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(bc,[]);return a.length?
|
|
146
|
+
me(e,a[0]):e}function me(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Wd(a){var b=[];a.audio&&b.push(ne(a.audio));a.video&&b.push(ne(a.video));return b.join(", ")}
|
|
147
147
|
function ne(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"}
|
|
148
|
-
var
|
|
148
|
+
var fe=0,Gd="smooth",Hd="powerEfficient",Jd="bandwidth",Zd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),$d=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function oe(){var a=this;this.l=null;this.o=!1;this.i=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.o){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.m=[];this.u=1;this.B=!1;this.h=this.j=this.g=this.s=null;this.D=new O(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}r=oe.prototype;
|
|
149
149
|
r.stop=function(){this.l=null;this.o=!1;this.m=[];this.u=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.D.stop()};r.init=function(a){this.l=a};
|
|
150
150
|
r.chooseVariant=function(){var a=Infinity,b=Infinity;this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=pe(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(qe(this));this.m.length&&!a.length&&(a=pe(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.u)?1:Math.abs(this.u),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},
|
|
151
151
|
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=e)}this.s=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
|
|
152
152
|
r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.B){var c=this.i;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.i.getBandwidthEstimate(qe(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(qe(this))};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.u=a};
|
|
153
153
|
r.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.R(re)}),this.h.observe(this.j))};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function qe(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
|
|
154
|
-
function pe(a,b,c,d){a&&(b=b.filter(function(e){return
|
|
154
|
+
function pe(a,b,c,d){a&&(b=b.filter(function(e){return Md(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}M("shaka.abr.SimpleAbrManager",oe);oe.prototype.configure=oe.prototype.configure;oe.prototype.setMediaElement=oe.prototype.setMediaElement;oe.prototype.playbackRateChanged=oe.prototype.playbackRateChanged;oe.prototype.setVariants=oe.prototype.setVariants;oe.prototype.getBandwidthEstimate=oe.prototype.getBandwidthEstimate;oe.prototype.segmentDownloaded=oe.prototype.segmentDownloaded;
|
|
155
155
|
oe.prototype.disable=oe.prototype.disable;oe.prototype.enable=oe.prototype.enable;oe.prototype.chooseVariant=oe.prototype.chooseVariant;oe.prototype.init=oe.prototype.init;oe.prototype.stop=oe.prototype.stop;var re=1;function se(a,b){this.g=a;this.h=b}se.prototype.toString=function(){return"v"+this.g+"."+this.h};function te(){var a=new se(5,0),b=ue,c=b.g,d=a.h-c.h;(0<(a.g-c.g||d)?b.i:b.h)(b.g,a,"AbrManager","Please use an AbrManager with setMediaElement function.")}function ve(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function we(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var ue=null;function xe(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}xe.prototype.add=function(a){return ye(this.h,a)?(this.g.add(a),!0):!1};
|
|
156
156
|
function ye(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&ze(c,d)&&Ae(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(ze(c,d)&&Ae(c.roles,d.roles)));return c?!1:!0}xe.prototype.values=function(){return this.g.values()};
|
|
157
157
|
function ze(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return $c(f)[0]}),d=b.codecs.split(",").map(function(f){return $c(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Ae(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Be(a){this.g=a;this.h=new Ce(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Be.prototype.create=function(a){var b=this,c=a.filter(function(d){return ye(b.g,d)});return c.length?new xe(c[0],c):this.h.create(a)};function Ce(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
158
|
-
Ce.prototype.create=function(a){var b=[];b=De(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ee(b,this.j);a.length&&(b=a);this.g&&(a=
|
|
158
|
+
Ce.prototype.create=function(a){var b=[];b=De(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ee(b,this.j);a.length&&(b=a);this.g&&(a=Bd(b,this.g),a.length&&(b=a));this.h&&(a=Fe(b,this.h),a.length&&(b=a));a=new xe(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,ye(a.h,c)&&a.add(c);return a};function De(a,b){var c=Q(b),d=wd(c,a.map(function(e){return vd(e)}));return d?a.filter(function(e){return d==vd(e)}):[]}
|
|
159
159
|
function Ee(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Fe(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ge(){this.g=He;this.h=(new Map).set(He,2).set(Ie,1)}function Je(a,b,c){a.h.set(He,c).set(Ie,b)}var Ie=0,He=1;function Ke(a,b){var c=Le();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
160
160
|
function Me(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new O(e)).R(c/1E3)}),2)}a.h*=a.m;z(d)})}function Le(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ne(a,b){this.promise=a;this.i=b;this.g=!1}function Oe(a){return new Ne(Promise.reject(a),function(){return Promise.resolve()})}function Pe(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Ne(a,function(){return Promise.resolve()})}function Qe(a){return new Ne(Promise.resolve(a),function(){return Promise.resolve()})}function Re(a){return new Ne(a,function(){return a["catch"](function(){})})}Ne.prototype.abort=function(){this.g=!0;return this.i()};
|
|
161
161
|
function Se(a){return new Ne(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ne.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
162
|
-
Ne.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Te(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new
|
|
162
|
+
Ne.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Te(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new lc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ne(f,function(){return d()})};
|
|
163
163
|
function Te(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()}}}M("shaka.util.AbortableOperation",Ne);Ne.prototype.chain=Ne.prototype.Z;Ne.prototype["finally"]=Ne.prototype["finally"];Ne.all=Se;Ne.prototype.abort=Ne.prototype.abort;Ne.notAbortable=Re;Ne.completed=Qe;Ne.aborted=Pe;Ne.failed=Oe;function R(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}
|
|
164
164
|
function Ue(a){var b=new R(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}R.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};R.prototype.stopImmediatePropagation=function(){this.g=!0};R.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",R);
|
|
165
165
|
var Ve={rg:"abrstatuschanged",sg:"adaptation",tg:"buffering",vg:"downloadfailed",wg:"downloadheadersreceived",xg:"drmsessionupdate",zg:"emsg",Error:"error",Ag:"expirationupdated",Bg:"gapjumped",Dg:"loaded",Eg:"loading",Gg:"manifestparsed",Hg:"mediaqualitychanged",Metadata:"metadata",Jg:"onstatechange",Kg:"onstateidle",Lg:"ratechange",Ng:"sessiondata",Og:"stalldetected",Pg:"streaming",Qg:"textchanged",Rg:"texttrackvisibility",Sg:"timelineregionadded",Tg:"timelineregionenter",Ug:"timelineregionexit",
|
|
166
|
-
Vg:"trackschanged",Xg:"unloading",Yg:"variantchanged"};function We(){this.da=new
|
|
166
|
+
Vg:"trackschanged",Xg:"unloading",Yg:"variantchanged"};function We(){this.da=new xd;this.Kc=this}We.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};We.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};We.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.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.Kc;a.currentTarget=this.Kc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
167
167
|
We.prototype.release=function(){this.da=null};function Xe(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&&d.buffer.constructor==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 Set;return b(a)}function Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){this.g=[]}function $e(a,b){a.g.push(b["finally"](function(){eb(a.g,b)}))}Ze.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 af(a,b,c){We.call(this);this.i=!1;this.m=new Ze;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa(af,We);r=af.prototype;r.$d=function(a){this.o=a};function bf(a,b,c,d){c=c||cf;var e=df[a];if(!e||c>=e.priority)df[a]={priority:c,Sf:b,Tf:void 0===d?!1:d}}r.Uf=function(a){this.g.add(a)};r.kg=function(a){this.g["delete"](a)};r.af=function(){this.g.clear()};r.Vf=function(a){this.h.add(a)};r.lg=function(a){this.h["delete"](a)};r.bf=function(){this.h.clear()};
|
|
168
168
|
function ef(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();We.prototype.release.call(this);return this.m.destroy()};
|
|
169
169
|
r.request=function(a,b){var c=this,d=new ff;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new gf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xe(b.retryParameters):Le();b.uris=Xe(b.uris);e=hf(this,a,b);var f=e.Z(function(){return jf(c,a,b,new Ke(b.retryParameters,!1),0,null,d)}),g=f.Z(function(n){return kf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
@@ -174,20 +174,20 @@ if(!n)return w;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){
|
|
|
174
174
|
c.uris[e],b));if(w instanceof N){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new R("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,jf(a,b,c,d,e,w,g)}throw w;})}
|
|
175
175
|
function kf(a,b,c){var d=Qe(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={pd:e.pd},f=a.next())e.pd=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.pd(b,h)}}(e));return d.Z(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",af);af.prototype.request=af.prototype.request;af.prototype.destroy=af.prototype.destroy;af.makeRequest=ef;
|
|
176
176
|
af.defaultRetryParameters=function(){return Le()};af.prototype.clearAllResponseFilters=af.prototype.bf;af.prototype.unregisterResponseFilter=af.prototype.lg;af.prototype.registerResponseFilter=af.prototype.Vf;af.prototype.clearAllRequestFilters=af.prototype.af;af.prototype.unregisterRequestFilter=af.prototype.kg;af.prototype.registerRequestFilter=af.prototype.Uf;af.unregisterScheme=function(a){delete df[a]};af.registerScheme=bf;af.prototype.setForceHTTPS=af.prototype.$d;function ff(){this.g=0}
|
|
177
|
-
af.NumBytesRemainingClass=ff;function gf(a,b,c){Ne.call(this,a,b);this.h=c}pa(gf,Ne);af.PendingRequest=gf;var lf=1;af.RequestType={MANIFEST:0,SEGMENT:lf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var cf=3;af.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:cf};var df={};function mf(a){this.g=!1;this.h=new
|
|
178
|
-
r.
|
|
177
|
+
af.NumBytesRemainingClass=ff;function gf(a,b,c){Ne.call(this,a,b);this.h=c}pa(gf,Ne);af.PendingRequest=gf;var lf=1;af.RequestType={MANIFEST:0,SEGMENT:lf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var cf=3;af.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:cf};var df={};function mf(a){this.g=!1;this.h=new lc;this.i=a}mf.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 nf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function of(){this.g=new xd}r=of.prototype;r.release=function(){this.lb();this.g=null};r.C=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.wc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};r.wc=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.wc(),this.g.remove(b,e))}};
|
|
178
|
+
r.lb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.wc();this.g.g={}}};M("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.lb;of.prototype.unlisten=of.prototype.wc;of.prototype.listenOnce=of.prototype.oa;of.prototype.listen=of.prototype.C;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
179
179
|
pf.prototype.wc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function qf(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 rf(a)?b:b.capture||!1}
|
|
180
|
-
function rf(a){var b=sf;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}sf=b}return b||!1}var sf=void 0;function tf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function uf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function vf(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 wf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function yf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.s=null;this.ha=this.ca=!1;this.I=0;this.g=null;this.o=new of;this.i=new Map;this.B=[];this.u=new
|
|
180
|
+
function rf(a){var b=sf;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}sf=b}return b||!1}var sf=void 0;function tf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function uf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function vf(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 wf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function yf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.s=null;this.ha=this.ca=!1;this.I=0;this.g=null;this.o=new of;this.i=new Map;this.B=[];this.u=new lc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ia=new Map;this.da=new Map;this.T=new O(function(){return zf(c)});this.M=!1;this.L=[];this.O=!1;this.ea=(new O(function(){Af(c)})).Ca(b);this.u["catch"](function(){});this.j=new mf(function(){return Bf(c)});this.Y=!1;this.F=null}r=yf.prototype;r.destroy=function(){return this.j.destroy()};
|
|
181
181
|
function Bf(a){return K(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,Cf(a),2);case 2:if(!a.l){b.A(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.s=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.Y=!1,a.F=null,z(b)}})}r.configure=function(a){this.h=a};function Df(a,b,c){a.ha=!0;a.B=[];a.M=c;return Ef(a,b)}
|
|
182
182
|
function Ff(a,b,c){a.B=c;a.M=0<c.length;return Ef(a,b)}function If(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 Jf(a,g,[])}
|
|
183
183
|
function Ef(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g){if(c=Kf(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(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=vf(a.h.servers),Lf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Mf(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,Nf(q,vf(a.h.servers),vf(a.h.advanced||{}),a.h.keySystemsMapping);
|
|
184
|
-
return u(x,
|
|
184
|
+
return u(x,Td(b,a.M,a.Y),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ca=!0,x["return"](Promise.resolve());y=Jf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}function Of(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c["return"]();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return c["return"]();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.s),u(c,a.F,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new N(2,6,6003,b.message));case 5:nf(a.j),z(c)}})}
|
|
185
185
|
function Pf(a,b){return K(function(c){if(1==c.g)return u(c,Of(a),2);Qf(a,b.initDataType,Fb(b.initData));z(c)})}
|
|
186
186
|
r.Yb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.s)return b.o.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d["return"]();b.l=a;b.o.oa(b.l,"play",function(){for(var e=t(b.L),f=e.next();!f.done;f=e.next())Rf(b,f.value);b.O=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Cf(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||window.shakaMediaKeysPolyfill||b.B.length?u(d,
|
|
187
187
|
Of(b),2):d.A(2)}Sf(b);c||b.B.length||b.o.C(b.l,"encrypted",function(e){return Pf(b,e)});z(d)})};
|
|
188
|
-
function Tf(a){var b,c,d,e,f;return K(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.A(2);break}b=ef([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.
|
|
189
|
-
C(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Uf(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Vf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.
|
|
190
|
-
function Sf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Qf(a,d.initDataType,d.initData);c=t(a.B);for(d=c.next();!d.done;d=c.next())Vf(a,d.value);b.length||a.B.length||a.u.resolve();return a.u}function Qf(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!
|
|
188
|
+
function Tf(a){var b,c,d,e,f;return K(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.A(2);break}b=ef([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.jb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=F(g),new N(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"]();
|
|
189
|
+
C(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Uf(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Vf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ja=new lc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
|
|
190
|
+
function Sf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Qf(a,d.initDataType,d.initData);c=t(a.B);for(d=c.next();!d.done;d=c.next())Vf(a,d.value);b.length||a.B.length||a.u.resolve();return a.u}function Qf(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!sc("Tizen 2"))return;Wf(a,b,c,a.g.sessionType)}}function Xf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
|
|
191
191
|
function Yf(a){a=a.i.keys();a=tf(a,function(b){return b.sessionId});return Array.from(a)}r.ec=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Mc=function(){return wf(this.da)};
|
|
192
192
|
function Jf(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Zf(a,c,d);x.A(2);break}return u(x,$f(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);nf(a.j);C(x,4);a.G.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.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.G.add(q.contentType.toLowerCase());if(c.length){var w=
|
|
193
193
|
f.keySystem;var D=d.get(f.keySystem);var B=[],A=[],G=[],E=[],H=new Set;ag(D,B,G,A,E,H);var J=a.M?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:B[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};D=t(D);for(B=D.next();!B.done;B=
|
|
@@ -199,18 +199,18 @@ function $f(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w
|
|
|
199
199
|
w.h,w["return"](c);case 6:F(w);case 7:nf(a.j);case 3:h=g.next();w.A(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){w.A(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();w.A(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=p){w.A(13);break}C(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:F(w);case 16:nf(a.j);case 13:h=q.next();w.A(12);break;case 11:return w["return"](c)}})}
|
|
200
200
|
function Kf(a){a=vf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Oc(f),h=Oc(e);g={kty:"oct",kid:Mc(g,!1),k:Mc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Ic(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
201
201
|
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
202
|
-
function Vf(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(k):Rf(a,k)});a.o.C(c,"keystatuseschange",function(k){return bg(a,k)});e={initData:null,initDataType:null,loaded:!1,Od:Infinity,
|
|
202
|
+
function Vf(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(k):Rf(a,k)});a.o.C(c,"keystatuseschange",function(k){return bg(a,k)});e={initData:null,initDataType:null,loaded:!1,Od:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);
|
|
203
203
|
case 4:f=h.h;nf(a.j);if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;cg(a)&&a.u.resolve();return h["return"](c);case 2:g=F(h),nf(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
204
|
-
function Wf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(f):Rf(a,f)});a.o.C(e,"keystatuseschange",function(f){return bg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Od:Infinity,
|
|
204
|
+
function Wf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(f):Rf(a,f)});a.o.C(e,"keystatuseschange",function(f){return bg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Od:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Mc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
205
205
|
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.m(new N(2,6,6006,f.message,f,h))}})}
|
|
206
206
|
function Rf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;K(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Mc(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=ef([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),
|
|
207
|
-
Xf(a.g.keySystem)&&dg(g),h=Date.now(),C(x,2),l=a.D.
|
|
208
|
-
a.D.onEvent(v);d&&(d.
|
|
209
|
-
function dg(a){var b=
|
|
210
|
-
function bg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Xf(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||
|
|
207
|
+
Xf(a.g.keySystem)&&dg(g),h=Date.now(),C(x,2),l=a.D.jb.request(2,g),u(x,l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=F(x),n=new N(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Mc(k.data);C(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=F(x),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),x["return"]();case 6:if(a.j.g)return x["return"]();v=new R("drmsessionupdate");
|
|
208
|
+
a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new O(function(){d.loaded=!0;cg(a)&&a.u.resolve()}),y.R(eg));z(x)}})}
|
|
209
|
+
function dg(a){var b=Cc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Nc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
210
|
+
function bg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Xf(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||wc())){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Pc(h);a.ia.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),c.close()["catch"](function(){}));
|
|
211
211
|
cg(a)&&(a.u.resolve(),a.T.R(fg))}function zf(a){var b=a.ia,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Wc(wf(c))}
|
|
212
212
|
function gg(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,
|
|
213
|
-
p;return K(function(q){switch(q.g){case 1:C(q,2);if("org.w3.clearkey"===l&&
|
|
213
|
+
p;return K(function(q){switch(q.g){case 1:C(q,2);if("org.w3.clearkey"===l&&xc())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,sc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](wf(f))})}
|
|
214
214
|
function hg(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(ig)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
|
|
215
215
|
function Cf(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return C(g,2),a.ha||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,hg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
|
|
216
216
|
function jg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Da:f.Da},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Da=[];f.Da=f.Da.concat(e.initData||[]);f.Da=f.Da.concat(h.initData||[]);f.Da=f.Da.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Da.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
|
|
@@ -220,19 +220,19 @@ function Lf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseSer
|
|
|
220
220
|
function ag(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=t(g.qa.initData),l=k.next();!l.done;h={zc:h.zc},l=k.next())h.zc=l.value,e.some(function(m){return function(n){var p=
|
|
221
221
|
m.zc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.zc)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
222
222
|
function Nf(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=
|
|
223
|
-
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 ig=1,eg=5,fg=.5,kg=new
|
|
223
|
+
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 ig=1,eg=5,fg=.5,kg=new mc(function(){return Gb(new Uint8Array([0]))});function lg(){}function mg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=ng[d.toLowerCase()]))return k["return"](e);if(f=og(a))if(g=pg[f])return k["return"](g);return d?k.A(2):u(k,qg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=ng[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
|
|
224
224
|
function qg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=ef([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function og(a){a=(new Nb(a)).ta.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",lg);lg.unregisterParserByMime=function(a){delete ng[a]};lg.registerParserByMime=function(a,b){ng[a]=b};
|
|
225
|
-
lg.registerParserByExtension=function(a,b){pg[a]=b};var ng={},pg={};function rg(a,b){this.S=Ib(a);this.h=b==sg;this.g=0}r=rg.prototype;r.ma=function(){return this.g<this.S.byteLength};r.$=function(){return this.g};r.pf=function(){return this.S.byteLength};r.
|
|
226
|
-
r.Fe=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw tg();}};r.Jb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw tg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r
|
|
227
|
-
r.skip=function(a){if(this.g+a>this.S.byteLength)throw tg();this.g+=a};r.ag=function(a){if(this.g<a)throw tg();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw tg();this.g=a};r.pc=function(){for(var a=this.g;this.ma()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Fb(this.S,a,this.g-a);this.g+=1;return
|
|
228
|
-
rg.prototype.skip=rg.prototype.skip;rg.prototype.readBytes=rg.prototype
|
|
229
|
-
r.Yc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.Jb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==xg){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b
|
|
230
|
-
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function yg(a){for(var b=zg(a);a.reader.ma()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}function Ag(a){for(var b=zg(a),c=a.reader.N(),d=0;d<c&&(a.parser.Yc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Bg(a){return function(b){a(b.reader
|
|
225
|
+
lg.registerParserByExtension=function(a,b){pg[a]=b};var ng={},pg={};function rg(a,b){this.S=Ib(a);this.h=b==sg;this.g=0}r=rg.prototype;r.ma=function(){return this.g<this.S.byteLength};r.$=function(){return this.g};r.pf=function(){return this.S.byteLength};r.Ra=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw tg();}};r.Rd=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw tg();}};r.N=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw tg();}};
|
|
226
|
+
r.Fe=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw tg();}};r.Jb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw tg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.S.byteLength)throw tg();var b=Fb(this.S,this.g,a);this.g+=a;return b};
|
|
227
|
+
r.skip=function(a){if(this.g+a>this.S.byteLength)throw tg();this.g+=a};r.ag=function(a){if(this.g<a)throw tg();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw tg();this.g=a};r.pc=function(){for(var a=this.g;this.ma()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Fb(this.S,a,this.g-a);this.g+=1;return Bc(a)};function tg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",rg);rg.prototype.readTerminatedString=rg.prototype.pc;rg.prototype.seek=rg.prototype.seek;rg.prototype.rewind=rg.prototype.ag;
|
|
228
|
+
rg.prototype.skip=rg.prototype.skip;rg.prototype.readBytes=rg.prototype.Za;rg.prototype.readUint64=rg.prototype.Jb;rg.prototype.readInt32=rg.prototype.Fe;rg.prototype.readUint32=rg.prototype.N;rg.prototype.readUint16=rg.prototype.Rd;rg.prototype.readUint8=rg.prototype.Ra;rg.prototype.getLength=rg.prototype.pf;rg.prototype.getPosition=rg.prototype.$;rg.prototype.hasMoreData=rg.prototype.ma;var sg=1;rg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:sg};function ug(){this.i=[];this.h=[];this.g=!1}r=ug.prototype;r.box=function(a,b){var c=vg(a);this.i[c]=wg;this.h[c]=b;return this};r.U=function(a,b){var c=vg(a);this.i[c]=xg;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new rg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Yc(0,a,b,c)};
|
|
229
|
+
r.Yc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.Jb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==xg){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.Za(d):new Uint8Array(0),b=new rg(b,0),k({parser:this,partialOkay:c||
|
|
230
|
+
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function yg(a){for(var b=zg(a);a.reader.ma()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}function Ag(a){for(var b=zg(a),c=a.reader.N(),d=0;d<c&&(a.parser.Yc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Bg(a){return function(b){a(b.reader.Za(b.reader.S.byteLength-b.reader.$()))}}
|
|
231
231
|
function vg(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 Cg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function zg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",ug);ug.headerSize=zg;ug.typeToString=Cg;ug.allData=Bg;ug.sampleDescription=Ag;ug.children=yg;ug.prototype.parseNext=ug.prototype.Yc;ug.prototype.parse=ug.prototype.parse;ug.prototype.stop=ug.prototype.stop;
|
|
232
232
|
ug.prototype.fullBox=ug.prototype.U;ug.prototype.box=ug.prototype.box;var wg=0,xg=1;function Dg(a){function b(){d=!0}function c(l){f.push(l);yg(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new ug).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);Ag(l)}).U("encv",b).U("enca",b).U("avc1",function(l){g.push({box:l,nc:1701733238})}).U("avc3",function(l){g.push({box:l,nc:1701733238})}).U("ac-3",function(l){g.push({box:l,nc:1701733217})}).U("ec-3",function(l){g.push({box:l,nc:1701733217})}).U("mp4a",function(l){g.push({box:l,nc:1701733217})}).parse(a);
|
|
233
233
|
if(d)return a;if(0==g.length||!e)throw ab(Pc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Eg(a,e,k.box,f,k.nc);return a}
|
|
234
|
-
function Eg(a,b,c,d,e){var f=Fg.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Gg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=
|
|
235
|
-
k.setUint32(b,a+1);return e}function Gg(a,b,c){a=Ib(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 Fg=new
|
|
234
|
+
function Eg(a,b,c,d,e){var f=Fg.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Gg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=rc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Gg(e,d.start,d.size+k.byteLength);k=Ib(e,b.start);b=zg(b);a=k.getUint32(b);
|
|
235
|
+
k.setUint32(b,a+1);return e}function Gg(a,b,c){a=Ib(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 Fg=new mc(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 Hg(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(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Ig(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){q=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
|
|
236
236
|
q||-1===v)p=Jg(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(y=p[q]){var x=y.l,w=y.i,D=y.j,B=y.h;if(x!=h||w!=k||D!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Ig(d,e,x,w,D,B),h=x,k=w,l=D,m=B;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Jg(d,e),a.nestedCues.push(n));n=Ig(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
237
237
|
function Ig(a,b,c,d,e,f){a=new hb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Jg(a,b){var c=new hb(a,b,"");c.lineBreak=!0;return c}function Kg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Lg(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Mg(this)}function Ng(a,b,c){return Hg(new hb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function Mg(a){Og(a,0,15);a.g=1}function Pg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Qg:d=Rg.has(c)?Rg.get(c):String.fromCharCode(c);break;case Sg:d=Tg.get(c);break;case Ug:a.i[a.g].pop();d=Vg.get(c);break;case Wg:a.i[a.g].pop(),d=Xg.get(c)}d&&a.i[a.g].push(new Kg(d,a.m,a.j,a.o,a.l))}}
|
|
238
238
|
function Yg(a,b,c,d){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 Og(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
@@ -240,106 +240,106 @@ var Qg=0,Sg=1,Ug=2,Wg=3,Rg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[9
|
|
|
240
240
|
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Xg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
241
241
|
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Zg(a,b){this.h=$g;this.o=new Lg(a,b);this.i=new Lg(a,b);this.l=new Lg(a,b);this.g=this.i;this.j=0;this.m=null}function ah(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==bh&&a.h!==ch&&(e=Ng(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Og(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Og(c,0,15),d.g=15);a.h=bh;d.h=b;return e}function dh(a){a.h=eh;a.g=a.l;a.g.h=0}function fh(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=ch}
|
|
242
242
|
var $g=0,eh=1,bh=3,ch=4,gh="black green blue cyan red yellow magenta black".split(" "),hh="white green blue cyan red yellow magenta white_italics".split(" ");function ih(){this.l=!1;this.B=this.F=0;this.D=jh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";kh(this)}function kh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(lh())}function lh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function mh(a,b){nh(a)&&(a.i[a.h][a.g]=new Kg(b,a.u,a.o,a.m,a.s),a.g++)}function nh(a){var b=a.g<a.B&&0<=a.g;return a.h<a.F&&0<=a.h&&b}ih.prototype.isVisible=function(){return this.l};
|
|
243
|
-
function oh(a,b,c){var d=new hb(a.j,b,"");d.textAlign=a.D===ph?"left":a.D===qh?"right":
|
|
243
|
+
function oh(a,b,c){var d=new hb(a.j,b,"");d.textAlign=a.D===ph?"left":a.D===qh?"right":lb;if(c=Hg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var ph=0,qh=1,jh=2;function rh(){this.i=[];this.h=null;this.g=0}function sh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new th(a.h)),a.h=null,a.g=0))}function th(a){this.g=0;this.h=a}th.prototype.ma=function(){return this.g<this.h.length};th.prototype.$=function(){return this.g};function uh(a){if(!a.ma())throw new N(2,2,3E3);return a.h[a.g++]}th.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function vh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
244
244
|
function wh(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=uh(b).value;b=null;c=t(xh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=oh(e,d,a.i)),kh(e);return b}if(137===c)for(b=uh(b).value,b=t(xh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=uh(b).value;b=null;c=t(xh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=oh(e,d,a.i)),e.l=!1;return b}if(139===c){c=uh(b).value;
|
|
245
245
|
b=null;c=t(xh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=oh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=uh(b).value,yh(a,b,d);if(143===c)return d=yh(a,255,d),zh(a),d;if(144===c)b.skip(1),d=uh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=uh(b).value,c=uh(b).value,b.skip(1),a.g&&(b=Ah((c&48)>>4,(c&12)>>2,c&3),a.g.s=Ah((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=uh(b).value,b=uh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
246
246
|
b.skip(1),d=uh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new ih;f.j=d;a.h[c]=f}d=uh(b).value;uh(b);uh(b);f=uh(b).value;var g=uh(b).value;b=uh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.B=(g&63)+1;a.g=a.h[c]}}}return null}function xh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
|
|
247
247
|
function yh(a,b,c){var d=null;b=t(xh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=oh(f,c,a.i));a.h[e]=null}return d}function zh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Ah(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Bh[a<<2|b<<1|c]}
|
|
248
248
|
var Ch=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Bh="black blue green cyan red magenta yellow white".split(" ");function Dh(){this.h=[];this.g=[];this.i=new rh;this.l=0;this.s=new Map([["CC1",new Zg(0,0)],["CC2",new Zg(0,1)],["CC3",new Zg(1,0)],["CC4",new Zg(1,1)]]);this.o=this.m=0;this.j=new Map;Eh(this)}function Eh(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Mg(b.i),Mg(b.l),Mg(b.o)}
|
|
249
249
|
function Fh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=Gh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())sh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Hh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
|
|
250
|
-
function Gh(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.
|
|
250
|
+
function Gh(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.Ma||!b.xa&&!b.Ma||!Ih(b.xa)||!Ih(b.Ma))return 45<=++a.l&&Eh(a),null;a.l=0;b.xa&=127;b.Ma&=127;if(!b.xa&&!b.Ma)return null;d=null;if(16===(b.xa&112))a:{var e=b.xa;d=b.Ma;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=hh[f]:7===f&&(h=!0);
|
|
251
251
|
d=1===(d&1);if(c.h!==ch){f=c.g;if(c.h===bh&&e!==f.g){var k=1+e-f.h;Yg(f,k,1+f.g-f.h,f.h);Og(f,0,k-1);Og(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Pg(c.g,Qg,32),g=!1,e=hh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=gh[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))Pg(c.g,Sg,d);else if(18===
|
|
252
|
-
(e&246)&&32===(d&224))Pg(c.g,e&1?Wg:Ug,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.
|
|
253
|
-
0,h-1),Og(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Og(c.l,0,15);break;case 47:e=null,c.h!==ch&&(e=Ng(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,dh(c),c.j=d}d=e;break a}d=null}else e=b.
|
|
252
|
+
(e&246)&&32===(d&224))Pg(c.g,e&1?Wg:Ug,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Ma){case 32:dh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=ah(c,2,d);break;case 38:e=ah(c,3,d);break;case 39:e=ah(c,4,d);break;case 40:Pg(c.g,Qg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Mg(c.o);fh(c);break;case 43:fh(c);break;case 44:e=c.i;g=null;c.h!==ch&&(g=Ng(e,c.j,d));Og(e,0,15);e=g;break;case 45:e=c.g;c.h!==bh?e=null:(g=Ng(e,c.j,d),h=e.g-e.h+1,Yg(e,h-1,h,e.h),Og(e,
|
|
253
|
+
0,h-1),Og(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Og(c.l,0,15);break;case 47:e=null,c.h!==ch&&(e=Ng(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,dh(c),c.j=d}d=e;break a}d=null}else e=b.Ma,Pg(c.g,Qg,b.xa),Pg(c.g,Qg,e);return d}
|
|
254
254
|
function Hh(a,b){var c=[];try{for(;b.ma();){var d=uh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=uh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new vh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=uh(e),l=k.value,m=k.pts;if(16===l){var n=uh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!nh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.B-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=oh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;15>y;y++,
|
|
255
255
|
v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=lh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=oh(q,p,g.i));q.i[q.h]=lh();q.g=0;break;case 12:q.isVisible()&&(e=oh(q,p,g.i)),kh(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=wh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?mh(g.g,"\u266a"):mh(g.g,
|
|
256
256
|
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&mh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ch.has(e)){var w=Ch.get(e);mh(g.g,w)}else mh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?mh(g.g,"_"):mh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Ih(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Jh(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,pe:c,ef:d}}function Kh(a,b){return{ke:1==b?a.Jb():a.N()}}function Lh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
|
|
257
257
|
function Mh(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Vd:null,sampleSize:null,$c:null};c&256&&(g.Vd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.$c=0==b?a.N():a.Fe());e.push(g)}return{bh:d,He:e}};function Nh(){this.i=new Map;this.h=this.g=0}
|
|
258
258
|
Nh.prototype.init=function(a){var b=this,c=[],d=[];(new ug).box("moov",yg).box("mvex",yg).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",yg).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",yg).U("mdhd",function(e){e=Lh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
259
259
|
Nh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new ug).box("moof",yg).box("traf",yg).U("trun",function(k){f=Mh(k.reader,k.version,k.flags).He}).U("tfhd",function(k){k=Jh(k.reader,k.flags);d=k.pe||b.g;e=k.ef||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=Kh(k.reader,k.version).ke}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.ma();){var x=k.N();if(6==
|
|
260
|
-
(k.
|
|
260
|
+
(k.Ra()&31)){var w=0;q.length>v&&(w=q[v].$c||0);w=(l+w)/m;for(var D=[],B,A=k.Za(x-1),G=B=0;G<A.length;)2==B&&3==A[G]?(B=0,A=[].concat(ia(A)),A.splice(G,1),A=new Uint8Array(A)):0==A[G]?B++:B=0,G++;B=A;for(G=0;G<B.length;){for(A=0;255==B[G];)A+=255,G++;A+=B[G++];for(var E=0;255==B[G];)E+=255,G++;E+=B[G++];4==A&&D.push(B.subarray(G,G+E));G+=E}D=t(D);for(B=D.next();!B.done;B=D.next())c.push({Rf:B.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=q.length>v?l+(q[v].Vd||n):l+n,v++,y=q.length>
|
|
261
261
|
v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function Oh(){this.h=new Nh;this.g=new Dh}Oh.prototype.init=function(a){this.h.init(a)};
|
|
262
|
-
function Ph(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Rf);if(0<f.length&&(d=a.g,e=e.pts,f=new rg(f,0),181===f.
|
|
262
|
+
function Ph(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Rf);if(0<f.length&&(d=a.g,e=e.pts,f=new rg(f,0),181===f.Ra()&&49===f.Rd()&&1195456820===f.N()&&3===f.Ra())){var g=f.Ra();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Ra(),l=(k&4)>>2,m=f.Ra(),n=f.Ra();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,xa:m,Ma:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Fh(a.g)}
|
|
263
263
|
;function Qh(a,b,c,d){this.ya=a;this.Ba=b;this.la=c;this.Id=void 0===d?null:d}Qh.prototype.ic=function(){return this.Ba};Qh.prototype.dc=function(){return this.la};function Rh(a,b){return a&&b?a.ic()==b.ic()&&a.dc()==b.dc()&&gb(a.ya(),b.ya()):a==b}M("shaka.media.InitSegmentReference",Qh);Qh.prototype.getEndByte=Qh.prototype.dc;Qh.prototype.getStartByte=Qh.prototype.ic;
|
|
264
264
|
function Sh(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){l=void 0===l?[]:l;q=void 0===q?Th:q;this.startTime=a;this.j=this.endTime=b;this.o=c;this.Ba=d;this.la=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.m=void 0===n?null:n;this.g=void 0===p?null:p;this.status=q;this.l=void 0===v?null:v}r=Sh.prototype;r.ya=function(){return this.o()};r.getStartTime=function(){return this.startTime};r.mf=function(){return this.endTime};r.ic=function(){return this.Ba};
|
|
265
265
|
r.dc=function(){return this.la};r.Ef=function(){return this.tilesLayout};r.Df=function(){return this.m};r.Cb=function(){return this.status};r.Lf=function(){this.status=Uh};M("shaka.media.SegmentReference",Sh);Sh.prototype.markAsUnavailable=Sh.prototype.Lf;Sh.prototype.getStatus=Sh.prototype.Cb;Sh.prototype.getTileDuration=Sh.prototype.Df;Sh.prototype.getTilesLayout=Sh.prototype.Ef;Sh.prototype.getEndByte=Sh.prototype.dc;Sh.prototype.getStartByte=Sh.prototype.ic;Sh.prototype.getEndTime=Sh.prototype.mf;
|
|
266
266
|
Sh.prototype.getStartTime=Sh.prototype.getStartTime;Sh.prototype.getUris=Sh.prototype.ya;var Th=0,Uh=1;Sh.Status={qg:Th,Wg:Uh,Fg:2};function Vh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Wh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Xh(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
|
|
267
|
-
function Yh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Zh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function $h(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Zh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Zh(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};function ai(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.T=d||function(){};this.i={};this.o=new of;this.u={};this.B=b;this.G=new
|
|
268
|
-
function ci(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](
|
|
267
|
+
function Yh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Zh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function $h(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Zh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Zh(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};function ai(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.T=d||function(){};this.i={};this.o=new of;this.u={};this.B=b;this.G=new lc;this.l=bi(this,this.G);this.D=new mf(function(){return ci(e)});this.I="";this.s=!1;this.O=new lc}function bi(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=di(c);a.j.src=a.I;return c}r=ai.prototype;r.destroy=function(){return this.D.destroy()};
|
|
268
|
+
function ci(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](cc)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.u={};a.B=null;a.i=
|
|
269
269
|
{};z(l)})}
|
|
270
|
-
r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(n){if(1==n.g)return e=
|
|
271
|
-
function(p){return function(){return fi(d,p.pa)}}(f)),d.h[f.pa]=m,d.M[f.pa]=l,d.i[f.pa]=[],d.L[f.pa]=!!k.drmInfos.length);z(n)})};function ei(a,b,c){a.g||(a.g=new bd(a.m));var d=a.g;a=a.F;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,dd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function gi(a){return a.l?"ended"==a.l.readyState:!0}function hi(a,b){return b==
|
|
272
|
-
function ji(a,b){return b==
|
|
273
|
-
function li(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G;return K(function(E){switch(E.g){case 1:g=
|
|
270
|
+
r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(n){if(1==n.g)return e=kc,u(n,d.G,2);d.s=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={pa:f.pa},h=g.next())f.pa=h.value,k=a.get(f.pa),l=Xc(k.mimeType,k.codecs),f.pa==e.X?ei(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Sc(l,f.pa)||(d.u[f.pa]=new Rc,l=Uc(f.pa,l)),m=d.l.addSourceBuffer(l),d.o.C(m,"error",function(p){return function(){d.i[p.pa][0].p.reject(new N(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.o.C(m,"updateend",
|
|
271
|
+
function(p){return function(){return fi(d,p.pa)}}(f)),d.h[f.pa]=m,d.M[f.pa]=l,d.i[f.pa]=[],d.L[f.pa]=!!k.drmInfos.length);z(n)})};function ei(a,b,c){a.g||(a.g=new bd(a.m));var d=a.g;a=a.F;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,dd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function gi(a){return a.l?"ended"==a.l.readyState:!0}function hi(a,b){return b==jc?a.g.g:Vh(ii(a,b))}
|
|
272
|
+
function ji(a,b){return b==jc?a.g.h:Wh(ii(a,b))}function ki(a,b,c){if(b==jc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=ii(a,b);return Yh(a,c)}r.Na=function(){var a={total:Zh(this.j.buffered),audio:Zh(ii(this,"audio")),video:Zh(ii(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 ii(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
273
|
+
function li(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G;return K(function(E){switch(E.g){case 1:g=kc;if(b!=g.X){E.A(2);break}if(!a.s){E.A(3);break}return u(E,a.O,4);case 4:h=E.h,a.g.s=h;case 3:return u(E,ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return E["return"]();case 2:if(!a.u[b]){e&&(a.g||ei(a,"text/vtt",a.s),d?(k=Ph(a.B,c),k.length&&(l=a.h[g.va].timestampOffset,jd(a.g,k,d.startTime,d.endTime,l))):a.B.init(c));E.A(6);break}return u(E,Vc(a.u[b],c),7);case 7:m=E.h,a.g||ei(a,
|
|
274
274
|
"text/vtt",a.s),m.metadata&&(n=a.h[b].timestampOffset,a.T(m.metadata,n,d?d.endTime:null)),m.captions&&m.captions.length&&(p=a.h[g.va].timestampOffset,q=hd(m.captions),jd(a.g,q,d?d.startTime:null,d?d.endTime:null,p)),c=m.data;case 6:c=mi(a,c,d?d.startTime:null,b);v=a.h[b];y=ni;if(!a.s||v.mode==y||!d){E.A(8);break}x=b==g.va||!(g.va in a.h);if(!x){E.A(9);break}w=[v.appendWindowStart,v.appendWindowEnd];v.appendWindowStart=0;v.appendWindowEnd=Infinity;D=v.timestampOffset;v.timestampOffset=0;return u(E,
|
|
275
275
|
oi(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return v.timestampOffset=D,v.appendWindowStart=w[0],v.appendWindowEnd=w[1],B=Vh(ii(a,b)),A=(d.startTime||0)-(B||0),a.O.resolve(A),u(E,oi(a,b,function(){return pi(a,b,0,a.l.duration)}),9);case 9:v.mode=y;case 8:return d&&a.s&&b!=g.X&&f&&(G=d.startTime,oi(a,b,function(){var H=G;0>H&&(H+=.001);a.h[b].timestampOffset=H;fi(a,b)})),u(E,oi(a,b,function(){a.h[b].appendBuffer(c)}),12);case 12:z(E)}})}
|
|
276
|
-
function qi(a,b){var c=ji(a,"video")||0;gd(a.g,b,c)}function ri(a){a.g&&gd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return K(function(f){e=
|
|
277
|
-
r.flush=function(a){var b=this,c;return K(function(d){c=
|
|
278
|
-
function ti(a,b,c,d,e,f){var g;return K(function(h){g=
|
|
279
|
-
r.endOfStream=function(a){var b=this;return K(function(c){return u(c,ui(b,function(){gi(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.
|
|
280
|
-
function oi(a,b,c){nf(a.D);c={start:c,p:new
|
|
281
|
-
function ui(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:nf(a.D);c=[];d={};for(e in a.h)d.Sb=new
|
|
282
|
-
function wi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),vi(a,b)}}function mi(a,b,c,d){var e=a.L[d];null==c&&e&&(
|
|
276
|
+
function qi(a,b){var c=ji(a,"video")||0;gd(a.g,b,c)}function ri(a){a.g&&gd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return K(function(f){e=kc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,oi(d,a,function(){return pi(d,a,b,c)}),0)})};function si(a,b){var c;return K(function(d){c=kc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,oi(a,b,function(){return pi(a,b,0,a.l.duration)}),0)})}
|
|
277
|
+
r.flush=function(a){var b=this,c;return K(function(d){c=kc;return a==c.X?d["return"]():u(d,oi(b,a,function(){b.j.currentTime-=.001;fi(b,a)}),0)})};
|
|
278
|
+
function ti(a,b,c,d,e,f){var g;return K(function(h){g=kc;return b==g.X?(f||(a.g.s=c),fd(a.g,d,e),h["return"]()):u(h,Promise.all([oi(a,b,function(){var k=a.h[b].appendWindowStart,l=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=k;a.h[b].appendWindowEnd=l;fi(a,b)}),f?Promise.resolve():oi(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;fi(a,b)}),oi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;fi(a,b)})]),0)})}
|
|
279
|
+
r.endOfStream=function(a){var b=this;return K(function(c){return u(c,ui(b,function(){gi(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Ia=function(a){var b=this;return K(function(c){return u(c,ui(b,function(){b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function pi(a,b,c,d){d<=c?fi(a,b):a.h[b].remove(c,d)}function fi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),vi(a,b))}
|
|
280
|
+
function oi(a,b,c){nf(a.D);c={start:c,p:new lc};a.i[b].push(c);1==a.i[b].length&&wi(a,b);return c.p}
|
|
281
|
+
function ui(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:nf(a.D);c=[];d={};for(e in a.h)d.Sb=new lc,f={start:function(l){return function(){return l.Sb.resolve()}}(d),p:d.Sb},a.i[e].push(f),c.push(d.Sb),1==a.i[e].length&&f.start(),d={Sb:d.Sb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)vi(a,h)}z(k)}})}function vi(a,b){a.i[b].shift();wi(a,b)}
|
|
282
|
+
function wi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),vi(a,b)}}function mi(a,b,c,d){var e=a.L[d];null==c&&e&&(tc()||rc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=Dg(b));return b}var di=window.URL.createObjectURL,ni="sequence",xi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.l=a;this.Zc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.D=0;this.F=!1}r=T.prototype;r.getDuration=function(){return this.i};r.uf=function(){return this.g};r.Ia=function(a){this.i=a};r.zf=function(){return this.l};r.Le=function(a){this.o=a};r.vc=function(a){this.s=a};r.ce=function(a){this.m=a};r.gg=function(a){this.Zc=a};r.lf=function(){return this.Zc};
|
|
283
283
|
r.Gb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Md(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.B&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Fd=function(){this.F=!0};r.Md=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Ld=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
|
|
284
|
-
r.V=function(){return Infinity==this.i&&!this.s};r.
|
|
285
|
-
r.
|
|
286
|
-
T.prototype.setUserSeekStart=T.prototype.Me;T.prototype.getSegmentAvailabilityStart=T.prototype.
|
|
287
|
-
T.prototype.setSegmentAvailabilityDuration=T.prototype.ce;T.prototype.setStatic=T.prototype.vc;T.prototype.setClockOffset=T.prototype.Le;T.prototype.getPresentationStartTime=T.prototype.zf;T.prototype.setDuration=T.prototype.
|
|
284
|
+
r.V=function(){return Infinity==this.i&&!this.s};r.ib=function(){return Infinity!=this.i&&!this.s};r.Pa=function(){return Math.max(this.u,this.fb()-this.m)};r.Me=function(a){this.u=a};r.fb=function(){return this.V()||this.ib()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.hc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.fb()-this.m+a,this.Oa()))};r.Bb=function(){return this.hc(0)};
|
|
285
|
+
r.Oa=function(){return Math.max(0,this.fb()-(this.V()||this.ib()?this.Zc:0))};r.Pe=function(){return null==this.l||null!=this.h&&this.B?!1:!0};r.Ke=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Ke;T.prototype.usingPresentationStartTime=T.prototype.Pe;T.prototype.getSeekRangeEnd=T.prototype.Oa;T.prototype.getSeekRangeStart=T.prototype.Bb;T.prototype.getSafeSeekRangeStart=T.prototype.hc;T.prototype.getSegmentAvailabilityEnd=T.prototype.fb;
|
|
286
|
+
T.prototype.setUserSeekStart=T.prototype.Me;T.prototype.getSegmentAvailabilityStart=T.prototype.Pa;T.prototype.isInProgress=T.prototype.ib;T.prototype.isLive=T.prototype.V;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Ld;T.prototype.notifyMinSegmentStartTime=T.prototype.Md;T.prototype.lockStartTime=T.prototype.Fd;T.prototype.notifySegments=T.prototype.Gb;T.prototype.getDelay=T.prototype.lf;T.prototype.setDelay=T.prototype.gg;
|
|
287
|
+
T.prototype.setSegmentAvailabilityDuration=T.prototype.ce;T.prototype.setStatic=T.prototype.vc;T.prototype.setClockOffset=T.prototype.Le;T.prototype.getPresentationStartTime=T.prototype.zf;T.prototype.setDuration=T.prototype.Ia;T.prototype.getMaxSegmentDuration=T.prototype.uf;T.prototype.getDuration=T.prototype.getDuration;function yi(a,b,c){this.l=c;this.j=a;this.s=zi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}yi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function Ai(a,b){a.i=b}function Bi(a){this.g=a}function zi(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(Zh(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 Ci(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new of;this.m=!1;this.B=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return Di(f)});this.j=(new O(function(){Di(f)})).Ca(.25)}Ci.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.s=this.o=null};Ci.prototype.Pd=function(){this.l=!0;Di(this)};
|
|
288
288
|
function Di(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=zi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new R("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=$h(c,b,a.D.gapDetectionThreshold),null==
|
|
289
|
-
d||0==d&&!a.l||(e=c.start(d),e>=a.s.
|
|
289
|
+
d||0==d&&!a.l||(e=c.start(d),e>=a.s.Oa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new R("gapjumped")))))}}};function Ei(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Fi.value().get(b),c.oa(a,b,d))}var Fi=new mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Gi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new of;this.i=new Hi(a);Ei(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ii(d,d.j)})}Gi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ji(a){return a.m?a.g.currentTime:a.j}function Ki(a,b){0<a.g.readyState?Li(a.i,b):Ei(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ii(a,a.j)})}
|
|
290
290
|
function Ii(a,b){.001>Math.abs(a.g.currentTime-b)?Mi(a):(a.h.oa(a.g,"seeking",function(){Mi(a)}),Li(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Mi(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function Hi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Hi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
291
291
|
function Li(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Ni(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.oa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new of;Ei(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}r=Ni.prototype;r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.ud=function(a){this.h=this.j?this.h:a};r.Dc=function(){return(this.j?this.g.currentTime:this.h)||0};r.je=function(){return 0};r.ie=function(){return 0};
|
|
292
292
|
r.Be=function(){};
|
|
293
|
-
function Oi(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.s=e;this.o=null;this.u=Pi(a,c,f);this.j=new Ci(a,b.presentationTimeline,c,this.u,f);this.h=new Gi(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=Ji(g.h);h=Qi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Ki(g.h,h);h=void 0;break a}g.s();h=void 0}return h},Ri(this,d));this.m=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ji(g.h),k=g.g.Bb(),l=g.g.
|
|
293
|
+
function Oi(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.s=e;this.o=null;this.u=Pi(a,c,f);this.j=new Ci(a,b.presentationTimeline,c,this.u,f);this.h=new Gi(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=Ji(g.h);h=Qi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Ki(g.h,h);h=void 0;break a}g.s();h=void 0}return h},Ri(this,d));this.m=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ji(g.h),k=g.g.Bb(),l=g.g.Oa();3>
|
|
294
294
|
l-k&&(k=l-3);h<k&&(h=Qi(g,h),g.i.currentTime=h)}})).Ca(.25)}r=Oi.prototype;r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.s=function(){}};r.ud=function(a){Ki(this.h,a)};r.Dc=function(){var a=Ji(this.h);return 0<this.i.readyState&&!this.i.paused?Si(this,a):a};r.je=function(){return this.u.o};r.ie=function(){return this.j.u};
|
|
295
|
-
function Ri(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Bb():a.g.
|
|
296
|
-
function Si(a,b){var c=a.g.Bb();if(b<c)return c;c=a.g.
|
|
297
|
-
r.offset=function(a){if(!this.i)for(var b=t(this.J),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=t(c.h);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};r.mc=function(a){!this.i&&a.length&&(this.J=this.J.filter(function(b){return b.startTime<a[0].startTime}),this.J.push.apply(this.J,ia(a)))};r.Fb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.J.length||d.endTime>c.J[0].startTime)});this.mc(a);this.
|
|
298
|
-
r.
|
|
299
|
-
r.
|
|
295
|
+
function Ri(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Bb():a.g.Oa():0>b&&(b=a.g.Oa()+b);return Ti(a,Si(a,b))}r.Be=function(){this.j.Pd()};function Ti(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Qi(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.Oa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.hc(c),k=a.g.hc(d);c=a.g.hc(c+d);return b>=g?Ti(a,b):b>f?f:b<e?Xh(a.i.buffered,k)?k:c:b>=h||Xh(a.i.buffered,b)?b:c}
|
|
296
|
+
function Si(a,b){var c=a.g.Bb();if(b<c)return c;c=a.g.Oa();return b>c?c:b}function Pi(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new yi(new Bi(a),b.stallThreshold,c);Ai(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ui(a){this.J=a;this.g=null;this.h=0;this.i=!1}r=Ui.prototype;r.release=function(){this.i||(this.J=[],this.g&&this.g.stop(),this.g=null)};r.Mf=function(){this.i=!0};r.find=function(a){for(var b=this.J.length-1,c=b;0<=c;--c){var d=this.J[c],e=c<b?this.J[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.J.length&&a<this.J[0].startTime?this.h:null};r.get=function(a){if(0==this.J.length)return null;a-=this.h;return 0>a||a>=this.J.length?null:this.J[a]};
|
|
297
|
+
r.offset=function(a){if(!this.i)for(var b=t(this.J),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=t(c.h);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};r.mc=function(a){!this.i&&a.length&&(this.J=this.J.filter(function(b){return b.startTime<a[0].startTime}),this.J.push.apply(this.J,ia(a)))};r.Fb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.J.length||d.endTime>c.J[0].startTime)});this.mc(a);this.cb(b)};
|
|
298
|
+
r.cb=function(a){if(!this.i){var b=this.J.length;this.J=this.J.filter(function(c){return c.endTime>a});this.h+=b-this.J.length}};
|
|
299
|
+
r.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.J.length;)if(this.J[this.J.length-1].startTime>=b)this.J.pop();else break;for(;this.J.length;)if(this.J[0].endTime<=a)this.J.shift(),c||this.h++;else break;0!=this.J.length&&(a=this.J[this.J.length-1],this.J[this.J.length-1]=new Sh(a.startTime,b,a.o,a.Ba,a.la,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.m,a.g))}};
|
|
300
300
|
r.ad=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.J.push.apply(c.J,ia(d)):(c.g.stop(),c.g=null)}),this.g.Ca(a))};Ui.prototype[Symbol.iterator]=function(){return this.Ab(0)};Ui.prototype.Ab=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Vi(this,b,d)};
|
|
301
|
-
function Wi(a,b,c){return new Ui([new Sh(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",Ui);Ui.forSingleSegment=Wi;Ui.prototype.getIteratorForTime=Ui.prototype.Ab;Ui.prototype.updateEvery=Ui.prototype.ad;Ui.prototype.fit=Ui.prototype.
|
|
301
|
+
function Wi(a,b,c){return new Ui([new Sh(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",Ui);Ui.forSingleSegment=Wi;Ui.prototype.getIteratorForTime=Ui.prototype.Ab;Ui.prototype.updateEvery=Ui.prototype.ad;Ui.prototype.fit=Ui.prototype.Xa;Ui.prototype.evict=Ui.prototype.cb;Ui.prototype.mergeAndEvict=Ui.prototype.Fb;Ui.prototype.offset=Ui.prototype.offset;Ui.prototype.get=Ui.prototype.get;Ui.prototype.find=Ui.prototype.find;Ui.prototype.markImmutable=Ui.prototype.Mf;
|
|
302
302
|
Ui.prototype.release=Ui.prototype.release;function Vi(a,b,c){this.i=a;this.g=b;this.h=c}Vi.prototype.df=function(){return this.g};Vi.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.ya().length&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};
|
|
303
303
|
Vi.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.ya().length&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Vi);Vi.prototype.next=Vi.prototype.next;Vi.prototype.current=Vi.prototype.current;Vi.prototype.currentPosition=Vi.prototype.df;function Xi(){Ui.call(this,[]);this.j=[]}pa(Xi,Ui);r=Xi.prototype;r.clone=function(){var a=new Xi;a.j=this.j.slice();return a};
|
|
304
|
-
r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.J.length}return null};r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.J.length}return null};r.offset=function(){};r.mc=function(){};r.
|
|
305
|
-
M("shaka.media.MetaSegmentIndex",Xi);Xi.prototype.updateEvery=Xi.prototype.ad;Xi.prototype.fit=Xi.prototype.
|
|
304
|
+
r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.J.length}return null};r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.J.length}return null};r.offset=function(){};r.mc=function(){};r.cb=function(){};r.Fb=function(){};r.Xa=function(){};r.ad=function(){};
|
|
305
|
+
M("shaka.media.MetaSegmentIndex",Xi);Xi.prototype.updateEvery=Xi.prototype.ad;Xi.prototype.fit=Xi.prototype.Xa;Xi.prototype.mergeAndEvict=Xi.prototype.Fb;Xi.prototype.evict=Xi.prototype.cb;Xi.prototype.merge=Xi.prototype.mc;Xi.prototype.offset=Xi.prototype.offset;Xi.prototype.get=Xi.prototype.get;Xi.prototype.find=Xi.prototype.find;Xi.prototype.release=Xi.prototype.release;function Yi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Pc();this.h=new O(function(){b.g.Ae(.25*b.i)})}Yi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Yi.prototype.set=function(a){this.i=a;Zi(this)};Yi.prototype.Lc=function(){return this.g.Lc()};function Zi(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Pc()!=b&&a.g.be(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Pc()&&a.g.be(0)};function $i(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){aj(b,!1)})).Ca(.25)}$i.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 aj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function bj(a){We.call(this);this.g=new Map;this.h=a}pa(bj,We);bj.prototype.release=function(){this.g.clear();We.prototype.release.call(this)};function cj(a,b){var c=a.g.get(b);c||(c={oc:[],ne:null,contentType:b},a.g.set(b,c));return c}function dj(a,b,c){var d=cj(a,b.contentType);ej(a,d);a={Id:b,position:c};d=d.oc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
306
306
|
bj.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.oc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Id;break a}}d=null}if(e=d)e=c.ne,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);
|
|
307
|
-
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.ne=d,JSON.stringify(d),c=new R("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ej(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.oc;b.oc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.oc=[]};function fj(a){We.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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 R("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}pa(fj,We);fj.prototype.release=function(){this.g.clear();this.h.stop();We.prototype.release.call(this)};function gj(a){We.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{
|
|
308
|
-
function(c){b.g["delete"](c.region)})}pa(gj,We);gj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;We.prototype.release.call(this)};gj.prototype.j=function(a,b){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?jj:a>d.endTime?kj:hj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.
|
|
307
|
+
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.ne=d,JSON.stringify(d),c=new R("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ej(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.oc;b.oc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.oc=[]};function fj(a){We.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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 R("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}pa(fj,We);fj.prototype.release=function(){this.g.clear();this.h.stop();We.prototype.release.call(this)};function gj(a){We.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{qb:null,pb:hj,hb:function(c,d){return ij(b,"enter",c,d)}},{qb:jj,pb:hj,hb:function(c,d){return ij(b,"enter",c,d)}},{qb:kj,pb:hj,hb:function(c,d){return ij(b,"enter",c,d)}},{qb:hj,pb:jj,hb:function(c,d){return ij(b,"exit",c,d)}},{qb:hj,pb:kj,hb:function(c,d){return ij(b,"exit",c,d)}},{qb:jj,pb:kj,hb:function(c,d){return ij(b,"skip",c,d)}},{qb:kj,pb:jj,hb:function(c,d){return ij(b,"skip",c,d)}}];this.h=new of;this.h.C(this.i,"regionremove",
|
|
308
|
+
function(c){b.g["delete"](c.region)})}pa(gj,We);gj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;We.prototype.release.call(this)};gj.prototype.j=function(a,b){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?jj:a>d.endTime?kj:hj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.qb==e&&h.pb==f&&h.hb(d,b)}};
|
|
309
309
|
function ij(a,b,c,d){b=new R(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var jj=1,hj=2,kj=3;function lj(a,b,c,d,e){a=ef(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function mj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.i=new Map;this.B=!1;this.D=null;this.s=!1;this.h=new mf(function(){return nj(c)})}mj.prototype.destroy=function(){return this.h.destroy()};function nj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,oj(e),b.push(pj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;z(f)})}
|
|
310
310
|
mj.prototype.configure=function(a){this.j=a;this.D=new Ke({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)};mj.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return u(b,qj(a),2);nf(a.h);a.B=!0;z(b)})};
|
|
311
|
-
function rj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=
|
|
312
|
-
function vj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.
|
|
313
|
-
function wj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=
|
|
311
|
+
function rj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=kc,C(k,2),u(k,si(a.g.P,c.X),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Xc(b.mimeType,b.codecs);ei(a.g.P,e,a.m.sequenceMode);f=a.g.P.m;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=sj(b),a.i.set(c.X,h),tj(a,h,0);z(k)}})}function uj(a){var b=a.i.get(jc);b&&(oj(b),pj(b)["catch"](function(){}),a.i["delete"](jc));a.o=null}
|
|
312
|
+
function vj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.mb&&(wj(a,e,!1,0,!1),c.mb=d)}else if(d=c.mb)c.mb=null,wj(a,d,!0,0,!1)}}function xj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.B&&(b.video&&wj(a,b.video,c,d,e),b.audio&&wj(a,b.audio,c,d,e))}function yj(a,b){a.o=b;a.B&&wj(a,b,!0,0,!1)}
|
|
313
|
+
function wj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=jc?f&&(f.mb&&(b.trickModeVideo?(f.mb=b,b=b.trickModeVideo):f.mb=null),f.stream!=b||e)&&(b.type==jc&&ei(a.g.P,Xc(b.mimeType,b.codecs),a.m.sequenceMode),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.ac?f.dd=!0:f.Ha?(f.ob=!0,f.Gc=d,f.dd=!0):(oj(f),zj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Aj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):rj(a,b)}
|
|
314
314
|
function Aj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.sa)return e["return"]();c=b.stream;d=b.sa;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.sa!=d||b.stream!=c)return e["return"]();var f=a.g.Oc();var g=ji(a.g.P,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.la?k.la-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.la?k.la-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
|
|
315
315
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.sa.h.g>h?!0:!1):f=!1;f&&b.sa.abort();z(e)})}
|
|
316
|
-
mj.prototype.sc=function(){for(var a=this.g.Oc(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.ba=null;var e=this.g.P;d==
|
|
317
|
-
function Bj(a,b){b.ac||b.
|
|
318
|
-
function qj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=
|
|
319
|
-
a.i.has(k)||(m=sj(l),a.i.set(k,m),tj(a,m,0));z(n)})}function sj(a){return{stream:a,type:a.type,ba:null,za:null,Tc:null,Ed:null,Dd:null,Cd:null,
|
|
320
|
-
function Cj(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:nf(a.h);if(b.
|
|
321
|
-
F(h),u(h,Ej(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.P.endOfStream(),10);case 10:nf(a.h),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.
|
|
322
|
-
function Dj(a,b){if(Fj(b))return qi(a.g.P,b.stream.originalId||""),null;b.type==
|
|
316
|
+
mj.prototype.sc=function(){for(var a=this.g.Oc(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.ba=null;var e=this.g.P;d==jc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=ii(e,d),e=Xh(e,a));if(!e){(null!=ji(this.g.P,d)||c.Ha)&&Bj(this,c);c.sa&&(c.sa.abort(),c.sa=null);if(d===jc)for(d=this.g.P.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,Eh(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())zh(e.value);c.sc=!0}}};
|
|
317
|
+
function Bj(a,b){b.ac||b.ob||(b.Ha?(b.ob=!0,b.Gc=0):null==hi(a.g.P,b.type)?null==b.Ka&&tj(a,b,0):(oj(b),zj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
318
|
+
function qj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=kc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.bb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.va,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.P;f=a.j.forceTransmuxTS;return u(n,e.init(c,f,a.m.sequenceMode),2)}nf(a.h);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.P.Ia(p):a.g.P.Ia(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),
|
|
319
|
+
a.i.has(k)||(m=sj(l),a.i.set(k,m),tj(a,m,0));z(n)})}function sj(a){return{stream:a,type:a.type,ba:null,za:null,Tc:null,Ed:null,Dd:null,Cd:null,mb:null,endOfStream:!1,Ha:!1,Ka:null,ob:!1,Gc:0,dd:!1,ac:!1,sc:!0,Td:!1,jc:!1,sa:null}}
|
|
320
|
+
function Cj(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:nf(a.h);if(b.Ha||null==b.Ka||b.ac)return h["return"]();b.Ka=null;if(!b.ob){h.A(2);break}return u(h,zj(a,b,b.dd,b.Gc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ka&&tj(a,b,0),h["return"]();case 4:C(h,6);d=Dj(a,b);null!=d&&(tj(a,b,d),b.jc=!1);va(h,7);break;case 6:return e=
|
|
321
|
+
F(h),u(h,Ej(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.P.endOfStream(),10);case 10:nf(a.h),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),z(h)}})}
|
|
322
|
+
function Dj(a,b){if(Fj(b))return qi(a.g.P,b.stream.originalId||""),null;b.type==jc&&ri(a.g.P);var c=a.g.Oc(),d=b.za?b.za.endTime:c,e=ki(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(jc))&&Fj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=ji(a.g.P,b.type);e=Gj(a,b,c,e);if(!e)return a.j.updateIntervalSeconds;f=Infinity;
|
|
323
323
|
var g=Array.from(a.i.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Fj(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.za?h.za.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;Hj(a,b,c,e)["catch"](function(){});return null}
|
|
324
324
|
function Gj(a,b,c,d){if(b.ba)return b.ba.current();if(b.za||d)return b.ba=b.stream.segmentIndex.Ab(b.za?b.za.endTime:d),b.ba&&b.ba.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.Ab(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.Ab(c),e=b.ba&&b.ba.next().value);return e}
|
|
325
|
-
function Hj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){switch(x.g){case 1:e=
|
|
326
|
-
E.start;D=!0}).parse(n,!1,!0);if(!D)return G.A(0);A=n.subarray(0,B);n=n.subarray(B);return u(G,Kj(a,b,c,f,d,A),0)})},u(x,Lj(a,b,d,p),6);l=Lj(a,b,d);return u(x,l,7);case 7:m=x.h;nf(a.h);if(a.s)return x["return"]();if(!d.l){x.A(8);break}return u(x,Mj(m,d,g),9);case 9:m=x.h;case 8:return nf(a.h),b.
|
|
327
|
-
va(x,0);break;case 2:y=F(x);nf(a.h,y);if(a.s)return x["return"]();b.
|
|
325
|
+
function Hj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){switch(x.g){case 1:e=kc;f=b.stream;g=b.ba;b.Ha=!0;C(x,2);if(2==d.Cb())throw new N(1,1,1011);return u(x,Ij(a,b,d),4);case 4:nf(a.h);if(a.s)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h&&!d.l)return n=new Uint8Array(0),p=function(w){var D,B,A;return K(function(G){nf(a.h);if(a.s)return G["return"]();n=Jj(n,w);D=!1;B=0;(new ug).box("mdat",function(E){B=E.size+
|
|
326
|
+
E.start;D=!0}).parse(n,!1,!0);if(!D)return G.A(0);A=n.subarray(0,B);n=n.subarray(B);return u(G,Kj(a,b,c,f,d,A),0)})},u(x,Lj(a,b,d,p),6);l=Lj(a,b,d);return u(x,l,7);case 7:m=x.h;nf(a.h);if(a.s)return x["return"]();if(!d.l){x.A(8);break}return u(x,Mj(m,d,g),9);case 9:m=x.h;case 8:return nf(a.h),b.ob?(b.Ha=!1,tj(a,b,0),x["return"]()):u(x,Kj(a,b,c,f,d,m),6);case 6:nf(a.h);if(a.s)return x["return"]();b.za=d;g.next();b.Ha=!1;b.Td=!1;q=a.g.P.Na();v=q[b.type];$a(JSON.stringify(v));b.ob||a.g.Pd();tj(a,b,0);
|
|
327
|
+
va(x,0);break;case 2:y=F(x);nf(a.h,y);if(a.s)return x["return"]();b.Ha=!1;if(7001==y.code)b.Ha=!1,b.Ka=null,tj(a,b,0),x.A(0);else if(b.type==e.X&&a.j.ignoreTextStreamFailures)a.i["delete"](e.X),x.A(0);else if(3017==y.code)Nj(a,b,y),x.A(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Ha=!1,b.Ka=null,tj(a,b,1),x.A(0);else return b.jc=!0,y.severity=2,u(x,Ej(a,y),0)}})}
|
|
328
328
|
function Mj(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.A(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h["return"](window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Jj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
329
329
|
function Nj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Td})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.jc=!0;a.s=!0;a.g.onError(c);return}b.Td=!0}tj(a,b,4)}
|
|
330
330
|
function Ij(a,b,c){var d,e,f,g,h,k,l;return K(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Ed||e!=b.Dd||f!=b.Cd)h=function(){var n;return K(function(p){if(1==p.g)return C(p,2),b.Dd=e,b.Cd=f,b.Ed=g,u(p,ti(a.g.P,b.type,g,e,f,a.m.sequenceMode),4);if(2!=p.g)return va(p,0);n=F(p);b.Dd=null;b.Cd=null;b.Ed=null;throw n;})},d.push(h());!Rh(c.i,b.Tc)&&(b.Tc=c.i)&&(k=Lj(a,b,c.i),l=function(){var n,p,q;return K(function(v){switch(v.g){case 1:return C(v,
|
|
331
331
|
2),u(v,k,4);case 4:return n=v.h,nf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,li(a.g.P,b.type,n,null,p),5);case 5:va(v,0);break;case 2:throw q=F(v),b.Tc=null,q;}})},a.g.Pf(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
|
|
332
332
|
function Kj(a,b,c,d,e,f){var g,h;return K(function(k){if(1==k.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.j.dispatchAllEmsgBoxes)&&(new ug).U("emsg",function(l){var m=d.emsgSchemeIdUris;if(0===l.version){var n=l.reader.pc();var p=l.reader.pc();var q=l.reader.N();var v=l.reader.N();var y=l.reader.N();var x=l.reader.N();var w=e.startTime+v/q}else q=l.reader.N(),w=l.reader.Jb()/q+e.timestampOffset,v=w-e.startTime,y=l.reader.N(),x=l.reader.N(),
|
|
333
|
-
n=l.reader.pc(),p=l.reader.pc();l=l.reader
|
|
334
|
-
function Oj(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=hi(a.g.P,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.P.remove(b.type,e,e+g),2)}nf(a.h);z(h)})}function Fj(a){return a&&a.type==
|
|
335
|
-
function Lj(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=lj(c.ya(),c.Ba,c.la,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Qh,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.
|
|
336
|
-
function zj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.
|
|
337
|
-
function tj(a,b,c){var d=b.type;if(d!=
|
|
338
|
-
function Uj(a,b){var c={Hb:function(){},Vc:function(){},
|
|
339
|
-
function Rj(a){return K(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.
|
|
340
|
-
function Vj(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.wf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.ff(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.
|
|
333
|
+
n=l.reader.pc(),p=l.reader.pc();l=l.reader.Za(l.reader.S.byteLength-l.reader.$());if(m&&m.includes(n)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.Qf():(m=(new Map).set("detail",{startTime:w,endTime:w+y/q,schemeIdUri:n,value:p,timescale:q,presentationTimeDelta:v,eventDuration:y,id:x,messageData:l}),m=new R("emsg",m),a.g.onEvent(m))}).parse(f),u(k,Oj(a,b,c),2);if(3!=k.g)return nf(a.h),h=b.sc,b.sc=!1,u(k,li(a.g.P,b.type,f,e,g,h),3);nf(a.h);z(k)})}
|
|
334
|
+
function Oj(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=hi(a.g.P,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.P.remove(b.type,e,e+g),2)}nf(a.h);z(h)})}function Fj(a){return a&&a.type==jc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
335
|
+
function Lj(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=lj(c.ya(),c.Ba,c.la,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Qh,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.jb.request(e,f),b.sa=h,u(l,h.promise,2);k=l.h;b.sa=null;return l["return"](k.data)})}
|
|
336
|
+
function zj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.ob=!1,b.dd=!1,b.Gc=0,b.ac=!0,b.za=null,b.Tc=null,b.ba=null,d?(e=a.g.Oc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,si(a.g.P,b.type),4);if(3!=g.g)return nf(a.h),c?u(g,a.g.P.flush(b.type),3):g.A(3);nf(a.h);b.ac=!1;b.endOfStream=!1;tj(a,b,0);z(g)})}
|
|
337
|
+
function tj(a,b,c){var d=b.type;if(d!=jc||a.i.has(d))b.Ka=(new nc(function(){var e;return K(function(f){if(1==f.g)return C(f,2),u(f,Cj(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).R(c)}function oj(a){null!=a.Ka&&(a.Ka.stop(),a.Ka=null)}function pj(a){return K(function(b){return a.sa?u(b,a.sa.abort(),0):b.A(0)})}function Ej(a,b){return K(function(c){if(1==c.g)return u(c,Me(a.D),2);nf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);z(c)})};function Pj(a,b){var c=Qj(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Rj(d)});this.s=new mf(function(){return Sj(d)})}Pj.prototype.destroy=function(){return this.s.destroy()};function Sj(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Tj(a),u(e,a.u,2);a.g&&a.g.Ga.kb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.kb();a.g=null;a.m=[];a.j=null;z(e)})}
|
|
338
|
+
function Uj(a,b){var c={Hb:function(){},Vc:function(){},kb:function(){},onError:function(){},Xc:function(){},ah:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();Tj(a);return c}
|
|
339
|
+
function Rj(a){return K(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.gb)var c=!1;else{a.g&&(a.g.Ga.kb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Hb(),a.g={node:d.node,payload:d.payload,gb:d.gb,Ga:c.Ga}):c.Ga.Xc();c=!0}c?c=Promise.resolve():a.g?c=Vj(a):(a.j.Of(a.i),a.o=new lc,c=a.o);b=u(b,c,1)}return b})}
|
|
340
|
+
function Vj(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.wf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.ff(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ga.Vc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ga.kb();else a.g.Ga.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Tj(a){a.o&&(a.o.resolve(),a.o=null)};function Wj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=Wj.prototype;r.remove=function(a,b){if(!this.g)return!1;Xj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
341
341
|
r.append=function(a){function b(h,k){for(var l=t(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(c).join(""):
|
|
342
|
-
l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={
|
|
342
|
+
l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={rb:f.rb},g=d.next())f.rb=g.value,a.some(function(h){return function(k){return k.startTime==h.rb.startTime&&k.endTime==h.rb.endTime&&k.text==h.rb.payload?!0:!1}}(f))||(g=Yj(f.rb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
|
|
343
343
|
e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(Xj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
344
344
|
function Yj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
345
345
|
function Xj(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}M("shaka.text.SimpleTextDisplayer",Wj);Wj.prototype.setTextVisibility=Wj.prototype.setTextVisibility;Wj.prototype.isTextVisible=Wj.prototype.isTextVisible;Wj.prototype.destroy=Wj.prototype.destroy;Wj.prototype.append=Wj.prototype.append;Wj.prototype.remove=Wj.prototype.remove;function Zj(){}function ak(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Zj);Zj.removeAllChildren=ak;function bk(a,b){var c=this;this.j=!1;this.i=[];this.B=a;this.m=b;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.m.appendChild(this.g);this.u=(new O(function(){ck(c)})).Ca(.25);this.h=new Map;this.s=new of;this.s.C(document,"fullscreenchange",function(){ck(c,!0)});this.l=null;"ResizeObserver"in
|
|
@@ -350,17 +350,17 @@ p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.
|
|
|
350
350
|
function ek(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&fk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.o.has(c.id))c=a.o.get(c.id);else{e=document.createElement("span");var g=c.heightUnits==Ab?"%":"px",h=c.widthUnits==Ab?"%":"px",k=c.viewportAnchorUnits==Ab?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+g;e.style.width=c.width+h;e.style.position=
|
|
351
351
|
"absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(c.id,e);c=e}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{vd:f,Qe:e,qc:c})}
|
|
352
352
|
function fk(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=gk(c.linePadding,c,a.m);f.paddingRight=gk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
|
|
353
|
-
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center";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=hk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent=
|
|
354
|
-
"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=gk(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==
|
|
355
|
-
c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
|
|
356
|
-
(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==
|
|
357
|
-
M("shaka.text.UITextDisplayer",bk);bk.prototype.setTextVisibility=bk.prototype.setTextVisibility;bk.prototype.isTextVisible=bk.prototype.isTextVisible;bk.prototype.remove=bk.prototype.remove;bk.prototype.destroy=bk.prototype.destroy;bk.prototype.append=bk.prototype.append;function ik(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},
|
|
358
|
-
"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");break;case "right":k.push("align:right");break;case
|
|
353
|
+
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=hk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent=
|
|
354
|
+
"before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=gk(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mb?(f.width="100%",c.lineAlign==ob?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==ob?
|
|
355
|
+
f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==ob?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==mb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
|
|
356
|
+
f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==mb?f.width=c.size+"%":f.height=c.size+"%")}function gk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}
|
|
357
|
+
function hk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",bk);bk.prototype.setTextVisibility=bk.prototype.setTextVisibility;bk.prototype.isTextVisible=bk.prototype.isTextVisible;bk.prototype.remove=bk.prototype.remove;bk.prototype.destroy=bk.prototype.destroy;bk.prototype.append=bk.prototype.append;function ik(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},
|
|
358
|
+
"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");break;case "right":k.push("align:right");break;case lb:k.push("align:middle");
|
|
359
359
|
break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function jk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function kk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.V()?lk:mk};d.ot=nk(c);var e=d.ot===ok||d.ot===pk||d.ot===qk||d.ot===rk;e&&(d.bl=sk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==rk&&(d.tb=tk(a,d.ot)/1E3);uk(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
360
360
|
function vk(a,b,c){try{if(!a.g.enabled)return b;var d=wk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=qk;break a;case "application/x-mpegurl":e=xk;break a}e=void 0}d.ot=e;d.su=!0;var f=yk(d);return zk(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function wk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
361
361
|
function uk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,wk(a));c.pr=a.h.Nc();var e=c.ot===ok||c.ot===qk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Ak(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=yk(c);f&&(b.uris=b.uris.map(function(g){return zk(g,f)}))}}}
|
|
362
|
-
function nk(a){var b=a.type;if(a.init)return Bk;if("video"==b)return a.codecs.includes(",")?qk:ok;if("audio"==b)return pk;if("text"==b)return"application/mp4"===a.mimeType?rk:Ck}function sk(a,b){var c=a.h.
|
|
363
|
-
function tk(a,b){var c=a.h.
|
|
362
|
+
function nk(a){var b=a.type;if(a.init)return Bk;if("video"==b)return a.codecs.includes(",")?qk:ok;if("audio"==b)return pk;if("text"==b)return"application/mp4"===a.mimeType?rk:Ck}function sk(a,b){var c=a.h.Na()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
|
|
363
|
+
function tk(a,b){var c=a.h.Ya();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case ok:return d.videoBandwidth||NaN;case pk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
|
|
364
364
|
function yk(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"===
|
|
365
365
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Ak(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=yk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
366
366
|
function zk(a,b){if(!b||a.includes("offline:"))return a;var c=new Nb(a);c.g.set("CMCD",b);return c.toString()}var xk="m",pk="a",ok="v",qk="av",Bk="i",Ck="c",rk="tt",mk="v",lk="l";M("shaka.util.CmcdManager.StreamingFormat",{ug:"d",Cg:"h",Mg:"s",Ig:"o"});function Dk(){}
|
|
@@ -369,85 +369,85 @@ k),g=!1)}return g}function Fk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e
|
|
|
369
369
|
function Ik(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Le(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return Gk([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{}},c={retryParameters:Le(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",
|
|
370
370
|
ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
371
371
|
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Gk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},d={retryParameters:Le(),failureCallback:function(g){return Gk([g],void 0)},
|
|
372
|
-
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30};if(
|
|
372
|
+
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30};if(sc("Web0S")||tc()||sc("CrKey"))d.stallSkip=
|
|
373
373
|
0;var e={trackSelectionCallback:function(g){return K(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Gk([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new oe},
|
|
374
374
|
abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,ignoreDevicePixelRatio:!1},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",
|
|
375
375
|
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h["return"](Jk(g,
|
|
376
|
-
f.preferredAudioLanguage))})};return f}function Kk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Ek(a,b,c||Ik(),d,"")}
|
|
377
|
-
function Jk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=
|
|
378
|
-
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=
|
|
379
|
-
function Ok(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 Pk(){this.i=this.h=null;this.g=[]}function Qk(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 Rk(){this.
|
|
376
|
+
f.preferredAudioLanguage))})};return f}function Kk(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:""}};return Ek(a,b,c||Ik(),d,"")}
|
|
377
|
+
function Jk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=wd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Q(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
|
|
378
|
+
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=jc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Hk);Hk.mergeConfigObjects=Kk;Hk.createDefault=Ik;function Lk(){this.g=null;this.h=[]}function Mk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Nk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
|
|
379
|
+
function Ok(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 Pk(){this.i=this.h=null;this.g=[]}function Qk(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 Rk(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.I=this.L=this.M=this.l=this.o=NaN;this.g=new Lk;this.h=new Pk};function U(a,b){We.call(this);var c=this;this.l=Sk;this.Ic=this.g=null;this.ha=!1;this.Qc=new of;this.Wb=new of;this.s=new of;this.zd=this.u=this.Vb=this.i=this.Rc=this.I=this.j=this.ia=this.T=this.Sc=this.M=this.Jc=this.G=this.vb=this.B=this.L=this.m=this.F=null;this.Ee=1E9;this.h=Tk(this);this.$b={width:Infinity,height:Infinity};this.o=null;this.La=new Ce(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.sb=this.h.preferredTextLanguage;this.Zb=this.h.preferredTextRole;
|
|
380
380
|
this.Xb=this.h.preferForcedSubs;this.Mb=[];this.cc=null;b&&b(this);this.F=Uk(this);this.F.$d(this.h.streaming.forceHTTPS);this.D=null;Vk&&(this.D=Vk());this.Qc.C(window,"online",function(){c.Ud()});this.O={name:"detach"};this.Y={name:"attach"};this.ea={name:"unload"};this.Nd={name:"manifest-parser"};this.Kd={name:"manifest"};this.ub={name:"media-source"};this.Bd={name:"drm-engine"};this.ca={name:"load"};this.Qd={name:"src-equals-drm-engine"};this.wb={name:"src-equals"};var d=new Map;d.set(this.Y,
|
|
381
|
-
function(e,f){return Re(Wk(c,e,f))});d.set(this.O,function(e){e.K&&(c.Wb.
|
|
381
|
+
function(e,f){return Re(Wk(c,e,f))});d.set(this.O,function(e){e.K&&(c.Wb.lb(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Re(e)});d.set(this.ea,function(e){return Re(Xk(c,e))});d.set(this.ub,function(e){e=Yk(c,e);return Re(e)});d.set(this.Nd,function(e,f){var g=Zk(c,e,f);return Re(g)});d.set(this.Kd,function(e){return $k(c,e)});d.set(this.Bd,function(e){e=al(c,e);return Re(e)});d.set(this.ca,function(e,f){return Re(bl(c,e,f))});d.set(this.Qd,function(e,f){var g=cl(c,e,f);return Re(g)});
|
|
382
382
|
d.set(this.wb,function(e,f){return dl(c,e,f)});this.ua=new Pj(this.O,{wf:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Y);e==c.Y&&(k=g==c.O||f.K!=h.K?c.O:g==c.Y?c.Y:g==c.ub||g==c.ca?c.ub:g==c.wb?c.Qd:null);e==c.ub&&(k=g==c.ca&&f.K==h.K?c.Nd:c.ea);e==c.Nd&&(k=el(c.ca,c.Kd,c.ea,g,f,h));e==c.Kd&&(k=el(c.ca,c.Bd,c.ea,g,f,h));e==c.Bd&&(k=el(c.ca,c.ca,c.ea,g,f,h));e==c.Qd&&(k=g==c.wb&&f.K==h.K?c.wb:c.ea);if(e==c.ca||e==c.wb)k=c.ea;e==c.ea&&(k=h.K&&f.K==h.K?c.Y:c.O);return k},ff:function(e,f,g){c.dispatchEvent(fl("onstatechange",
|
|
383
|
-
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,Xk(c,e),2):f["return"](e.K?c.Y:c.O)})},Of:function(e){c.dispatchEvent(fl("onstateidle",(new Map).set("state",e.name)))}});this.De=new O(function(){
|
|
384
|
-
r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==hl)return c["return"]();a.l=hl;b=Uj(a.ua,function(){return{node:a.O,payload:Qj(),
|
|
385
|
-
a.T=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:We.prototype.release.call(a),z(c)}})};r.Yb=function(a,b){b=void 0===b?!0:b;if(this.l==hl)return Promise.reject(il());var c=Qj();c.K=a;
|
|
386
|
-
r.ge=function(a){var b=this;a=void 0===a?!0:a;if(this.l==hl)return Promise.reject(il());
|
|
387
|
-
r.load=function(a,b,c){var d=this;this.cc=null;if(this.l==hl)return Promise.reject(il());this.dispatchEvent(fl("loading"));var e=Qj();e.uri=a;e.de=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=kl(this,e)?this.wb:this.ca,g=Uj(this.ua,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,
|
|
388
|
-
g.
|
|
389
|
-
function Xk(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.l!=hl&&(a.l=Sk),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(fl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.
|
|
383
|
+
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,Xk(c,e),2):f["return"](e.K?c.Y:c.O)})},Of:function(e){c.dispatchEvent(fl("onstateidle",(new Map).set("state",e.name)))}});this.De=new O(function(){Nd(c.i.variants,c.h.restrictions,c.$b)&&gl(c)});a&&this.Yb(a,!0)}pa(U,We);function fl(a,b){return new R(a,b)}r=U.prototype;
|
|
384
|
+
r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==hl)return c["return"]();a.l=hl;b=Uj(a.ua,function(){return{node:a.O,payload:Qj(),gb:!1}});return u(c,new Promise(function(d){b.Hb=function(){};b.Vc=function(){d()};b.kb=function(){d()};b.onError=function(){d()};b.Xc=function(){d()}}),2);case 2:return u(c,a.ua.destroy(),3);case 3:a.Qc&&(a.Qc.release(),a.Qc=null);a.Wb&&(a.Wb.release(),a.Wb=null);a.s&&(a.s.release(),a.s=null);a.zd=null;a.u=null;a.h=null;a.o=null;a.Ic=null;
|
|
385
|
+
a.T=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:We.prototype.release.call(a),z(c)}})};r.Yb=function(a,b){b=void 0===b?!0:b;if(this.l==hl)return Promise.reject(il());var c=Qj();c.K=a;oc()||(b=!1);var d=b?this.ub:this.Y,e=Uj(this.ua,function(){return{node:d,payload:c,gb:!1}});e.Hb=function(){};return jl(e)};r.detach=function(){var a=this;if(this.l==hl)return Promise.reject(il());var b=Uj(this.ua,function(){return{node:a.O,payload:Qj(),gb:!1}});b.Hb=function(){};return jl(b)};
|
|
386
|
+
r.ge=function(a){var b=this;a=void 0===a?!0:a;if(this.l==hl)return Promise.reject(il());oc()||(a=!1);var c=Qj(),d=Uj(this.ua,function(e){var f=e.K&&a?b.ub:e.K?b.Y:b.O;c.K=e.K;return{node:f,payload:c,gb:!1}});d.Hb=function(){};return jl(d)};r.og=function(a){this.cc=a};
|
|
387
|
+
r.load=function(a,b,c){var d=this;this.cc=null;if(this.l==hl)return Promise.reject(il());this.dispatchEvent(fl("loading"));var e=Qj();e.uri=a;e.de=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=kl(this,e)?this.wb:this.ca,g=Uj(this.ua,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,gb:!0}});this.o=new Rk;this.T=ll(this);g.Hb=function(){};return new Promise(function(h,k){g.Xc=function(){return k(new N(2,7,7002))};g.Vc=function(){h();d.dispatchEvent(fl("loaded"))};
|
|
388
|
+
g.kb=function(){return k(il())};g.onError=function(l){return k(l)}})};function kl(a,b){if(!oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=og(d),c=ml[c]);if(c){if(""==(b.K||qc()).canPlayType(c))return!1;if(!oc()||!(c in ng||og(d)in pg)||a.h.streaming.preferNativeHls)return!0;if(vc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Wk(a,b,c){null==b.K&&(b.K=c.K,a.Wb.C(b.K,"error",function(){var d=nl(a);d&&ol(a,d)}));a.g=b.K;return Promise.resolve()}
|
|
389
|
+
function Xk(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.l!=hl&&(a.l=Sk),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(fl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.s.lb();a.De.stop();a.vb&&(a.vb.release(),a.vb=null);a.Jc&&(a.Jc.stop(),a.Jc=null);if(!a.I){n.A(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Rc=null;case 3:if(!a.u){n.A(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.A(7);break}return u(n,
|
|
390
390
|
a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.B&&(a.B.release(),a.B=null);if(!a.L){n.A(9);break}return u(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.K||!b.K.src){n.A(11);break}return u(n,new Promise(function(p){return(new O(p)).R(.1)}),12);case 12:for(b.K.removeAttribute("src"),b.K.load();b.K.lastChild;)b.K.removeChild(b.K.firstChild);case 11:if(!a.m){n.A(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Vb=null;a.M=null;if(a.i){d=
|
|
391
|
-
t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.
|
|
391
|
+
t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.o=new Rk;a.Gd=null;pl(a);z(n)}})}
|
|
392
392
|
function Yk(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new Oh,d=a.h.textDisplayFactory,e=d(),a.Gd=d,f=ql(b.K,c,e,function(l,m,n){l=t(l);for(var p=l.next();!p.done;p=l.next())if(p=p.value,p.data&&p.cueTime&&p.frames){for(var q=p.cueTime+m,v=n,y=t(p.frames),x=y.next();!x.done;x=y.next())rl(a,q,v,"ID3",x.value);if(a.D)a.D.onHlsTimedMetadata(p,q)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.L=f;z(k)})}
|
|
393
393
|
function Zk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Vb=d,f=a,u(h,mg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Rc=h.h;a.I=a.Rc();g=Xe(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
|
|
394
|
-
function $k(a,b){var c=b.uri,d=a.F;a.Sc=new fj(function(){return a.rc()});a.Sc.addEventListener("regionadd",function(g){g=g.region;sl(a,"timelineregionadded",g);if(a.D)a.D.onDashTimedMetadata(g)});a.ia=null;a.h.streaming.observeQualityChanges&&(a.ia=new bj(function(){return a.
|
|
394
|
+
function $k(a,b){var c=b.uri,d=a.F;a.Sc=new fj(function(){return a.rc()});a.Sc.addEventListener("regionadd",function(g){g=g.region;sl(a,"timelineregionadded",g);if(a.D)a.D.onDashTimedMetadata(g)});a.ia=null;a.h.streaming.observeQualityChanges&&(a.ia=new bj(function(){return a.Na()}),a.ia.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,
|
|
395
395
|
height:h.height,mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(fl("mediaqualitychanged",h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.T;try{k.g.enabled&&(k.o=h.format,uk(k,g,{ot:xk,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){kk(a.T,g,h)},filter:function(g){return tl(a,g)},makeTextStreamsForClosedCaptions:function(g){return ul(a,
|
|
396
396
|
g)},onTimelineRegionAdded:function(g){var h=a.Sc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new R("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return ol(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
397
|
-
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Ne(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=fl("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);vl(a.i);k=Date.now()/1E3;l=k-f;a.
|
|
398
|
-
function al(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=wl(a,{
|
|
399
|
-
function bl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.cc&&(b.startTime=a.cc,a.cc=null);d=b.K;e=b.uri;a.Vb=e;a.G=new Yi({Pc:function(){return d.playbackRate},Lc:function(){return d.defaultPlaybackRate},be:function(x){d.playbackRate=x},Ae:function(x){d.currentTime+=x}});f=function(){return zl(a)};g=function(){return Al(a)};a.
|
|
400
|
-
(a.zd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(te(),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.
|
|
401
|
-
k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Fl(a,k);
|
|
402
|
-
break}n=a.B.Dc();return u(y,Jl(l,n),4);case 4:p=y.h,a.B.ud(p);case 3:Kl(a,null,
|
|
403
|
-
a.
|
|
404
|
-
function cl(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=
|
|
397
|
+
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Ne(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=fl("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);vl(a.i);k=Date.now()/1E3;l=k-f;a.o.F=l;z(m)})}(),function(){return a.I.stop()})}
|
|
398
|
+
function al(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=wl(a,{jb:a.F,onError:function(f){ol(a,f)},Wc:function(f){xl(a,f)},onExpirationUpdated:function(f,g){yl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Ff(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Yb(b.K),3):u(e,tl(a,a.i),0)})}
|
|
399
|
+
function bl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.cc&&(b.startTime=a.cc,a.cc=null);d=b.K;e=b.uri;a.Vb=e;a.G=new Yi({Pc:function(){return d.playbackRate},Lc:function(){return d.defaultPlaybackRate},be:function(x){d.playbackRate=x},Ae:function(x){d.currentTime+=x}});f=function(){return zl(a)};g=function(){return Al(a)};a.s.C(d,"playing",f);a.s.C(d,"pause",f);a.s.C(d,"ended",f);a.s.C(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.zd==h||
|
|
400
|
+
(a.zd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(te(),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.La=new Ce(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.sb=a.h.preferredTextLanguage;a.Zb=a.h.preferredTextRole;a.Xb=a.h.preferForcedSubs;Bl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,w,D){a.j&&x!=a.j.l&&Cl(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.u.setMediaElement(d);a.B=Dl(a,b.startTime);a.vb=El(a);
|
|
401
|
+
k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Fl(a,k);zd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Gl(a);a.j.configure(a.h.streaming);a.l=Hl;d.textTracks&&a.s.C(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":Il(a,x)}});a.dispatchEvent(fl("streaming"));l=null;if(m=a.Ya().find(function(x){return x.active})){y.A(2);break}l=gl(a);Cl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);
|
|
402
|
+
break}n=a.B.Dc();return u(y,Jl(l,n),4);case 4:p=y.h,a.B.ud(p);case 3:Kl(a,null,be(l));case 2:return q=a.Db().find(function(x){return x.active}),q||((v=le(a.i.textStreams,a.sb,a.Zb,a.Xb)[0]||null)&&Qk(a.o.h,v,!0),l&&(v?(l.audio&&Ll(a,l.audio,v)&&(a.ha=!0),a.ha&&a.L.m.setTextVisibility(!0),Ml(a)):a.ha=!1),v&&(a.h.streaming.alwaysStreamText||a.yd())&&yj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),Nl(a)),Qd(a.j?a.j.l:null,a.i),Ol(a.i),Pl(a),Ql(a),a.i.variants.some(function(x){return x.primary}),
|
|
403
|
+
a.s.oa(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.de}),z(y)}})}
|
|
404
|
+
function cl(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=kc,e=Date.now()/1E3,f=!0,a.m=wl(a,{jb:a.F,onError:function(n){ol(a,n)},Wc:function(n){xl(a,n)},onExpirationUpdated:function(n,p){yl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=og(g),k=ml[h],"application/x-mpegurl"==k&&vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
405
405
|
primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
406
406
|
a.m.Y=!0,u(m,Ff(a.m,[l],[]),2)):u(m,a.m.Yb(b.K),0)})}
|
|
407
|
-
function dl(a,b,c){function d(){return zl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Vb=b.uri;var e=b.K;a.B=new Ni(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.B.ud(b.startTime);a.G=new Yi({Pc:function(){return e.playbackRate},Lc:function(){return e.defaultPlaybackRate},be:function(k){e.playbackRate=k},Ae:function(k){e.currentTime+=k}});Fl(a,a.h.streaming.rebufferingGoal);a.
|
|
408
|
-
e.preload&&a.
|
|
409
|
-
"change",function(){return Pl(a)}));var g=og(b.uri);e.src=vk(a.T,b.uri,ml[g]);(
|
|
410
|
-
z(l)})});e.error?h.reject(nl(a)):"none"==e.preload&&(Va('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.'),h.resolve());a.
|
|
407
|
+
function dl(a,b,c){function d(){return zl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Vb=b.uri;var e=b.K;a.B=new Ni(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.B.ud(b.startTime);a.G=new Yi({Pc:function(){return e.playbackRate},Lc:function(){return e.defaultPlaybackRate},be:function(k){e.playbackRate=k},Ae:function(k){e.currentTime+=k}});Fl(a,a.h.streaming.rebufferingGoal);a.s.C(e,"playing",d);a.s.C(e,"pause",d);a.s.C(e,"ended",d);a.s.C(e,"ratechange",function(){return Al(a)});"none"!=
|
|
408
|
+
e.preload&&a.s.oa(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.de});e.audioTracks&&(a.s.C(e.audioTracks,"addtrack",function(){return Pl(a)}),a.s.C(e.audioTracks,"removetrack",function(){return Pl(a)}),a.s.C(e.audioTracks,"change",function(){return Pl(a)}));e.textTracks&&(a.s.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Rl(a,k);break;case "chapters":Il(a,k);break;default:Pl(a)}}),a.s.C(e.textTracks,"removetrack",function(){return Pl(a)}),a.s.C(e.textTracks,
|
|
409
|
+
"change",function(){return Pl(a)}));var g=og(b.uri);e.src=vk(a.T,b.uri,ml[g]);(tc()||sc("Web0S"))&&e.load();a.l=Sl;a.dispatchEvent(fl("streaming"));var h=new lc;Ei(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){h.resolve()});Ei(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return K(function(l){if(1==l.g)return Tl(a),k=Ul(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.s.oa(e.textTracks,"change",m);(new O(m)).R(1)}),2);if(f)return l["return"]();Vl(a);
|
|
410
|
+
z(l)})});e.error?h.reject(nl(a)):"none"==e.preload&&(Va('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.'),h.resolve());a.s.oa(e,"error",function(){h.reject(nl(a))});return new Ne(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
|
|
411
411
|
function Tl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Xd(b);var c=a.h.preferredVariantRole;""!=c&&a.Xd(b,c)}}function Vl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Yd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Yd(b,d,c)}}
|
|
412
|
-
function Rl(a,b){if("metadata"==b.kind){b.mode="hidden";a.
|
|
412
|
+
function Rl(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.C(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,rl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Wl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().R(.5);a.Mb.push(function(){c.stop()})}}
|
|
413
413
|
function rl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(fl("metadata",b))}function Il(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Lb().R(.5);a.Mb.push(function(){c.stop()})}}function vl(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))}function wl(a,b){return new yf(b,a.h.drm.updateExpirationTime)}
|
|
414
414
|
function Uk(a){return new af(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(fl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(fl("downloadfailed",b))})}
|
|
415
415
|
function Dl(a,b){return new Oi(a.g,a.i,a.h.streaming,b,function(){a.vb&&aj(a.vb,!0);a.j&&a.j.sc();a.M&&Xl(a)},function(c){return a.dispatchEvent(c)})}
|
|
416
416
|
function El(a){var b=new gj(a.Sc);b.addEventListener("enter",function(d){sl(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){sl(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(sl(a,"timelineregionenter",e),sl(a,"timelineregionexit",e))});var c=new $i(a.g);c.g.add(b);a.ia&&c.g.add(a.ia);return c}function Fl(a,b){a.M=new Ge;a.M.g=Ie;Je(a.M,b,Math.min(.5,b/2));pl(a);a.Jc=(new O(function(){Xl(a)})).Ca(.25)}
|
|
417
|
-
function Xl(a){switch(a.l){case Sl:if(a.g.ended)var b=!0;else{var c=Wh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Hl:a:if(a.g.ended||gi(a.L))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.
|
|
418
|
-
function ll(a){return new jk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},
|
|
419
|
-
function Gl(a){return new mj(a.i,{Oc:function(){return a.B.Dc()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){kk(a.T,b,c)},P:a.L,
|
|
417
|
+
function Xl(a){switch(a.l){case Sl:if(a.g.ended)var b=!0;else{var c=Wh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Hl:a:if(a.g.ended||gi(a.L))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.fb();var d=Wh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Yh(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?He:Ie;c.g=d;b!=d&&pl(a)}function ql(a,b,c,d){return new ai(a,b,c,d)}
|
|
418
|
+
function ll(a){return new jk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Na:function(){return a.Na()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ya:function(){return a.Ya()},Nc:function(){return a.Nc()},V:function(){return a.V()}},a.h.cmcd)}
|
|
419
|
+
function Gl(a){return new mj(a.i,{Oc:function(){return a.B.Dc()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){kk(a.T,b,c)},P:a.L,jb:a.F,onError:function(b){return ol(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Qf:function(){a.I&&a.I.update&&a.I.update()},Pd:function(){a.B&&a.B.Be();Xl(a)},Pf:function(b,c){var d=c.Id;d&&a.ia&&dj(a.ia,d,b)}})}
|
|
420
420
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Fk(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Kk(this.h,a,Tk(this));Yl(this);return c};
|
|
421
421
|
function Yl(a){if(a.I){var b=Xe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Zl(a,a.i)}catch(f){ol(a,f)}a.u&&Ql(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||$l(a)}a.F&&a.F.$d(a.h.streaming.forceHTTPS);if(a.L&&(a.L.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Gd!=b)){var c=b(),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
|
|
422
|
-
c);a.Gd=b;a.j&&(b=a.j,(c=b.i.get(
|
|
422
|
+
c);a.Gd=b;a.j&&(b=a.j,(c=b.i.get(jc))&&wj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Nl(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Je(a.M,b,Math.min(.5,b/2)));a.i&&Bl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Tk(this);Kk(a,this.h,Tk(this));return a};
|
|
423
423
|
r.jf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.rc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.$f=function(){for(var a in this.h)delete this.h[a];Kk(this.h,Tk(this),Tk(this));Yl(this)};r.qf=function(){return this.l};r.vf=function(){return this.g};r.fc=function(){return this.F};r.wd=function(){return this.Vb};
|
|
424
|
-
r.te=function(){return this.D?this.D:null};r.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};r.
|
|
425
|
-
r.rc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Bb(),end:a.
|
|
424
|
+
r.te=function(){return this.D?this.D:null};r.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};r.ib=function(){return this.i?this.i.presentationTimeline.ib():!1};r.If=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
425
|
+
r.rc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Bb(),end:a.Oa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Gf=function(){this.V()&&(this.g.currentTime=this.rc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.ec=function(){return this.m?this.m.ec():Infinity};r.Mc=function(){return this.m?this.m.Mc():{}};
|
|
426
426
|
r.xd=function(){return this.M?this.M.g==Ie:!1};r.Nc=function(){return this.g?this.G?this.G.i:1:0};r.jg=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==Hl&&(this.u.playbackRateChanged(a),vj(this.j,1<Math.abs(a))))};r.Ze=function(){var a=this.G.Lc();this.l==Sl&&this.G.set(a);this.l==Hl&&(this.G.set(a),this.u.playbackRateChanged(a),vj(this.j,!1))};
|
|
427
|
-
r.
|
|
428
|
-
r.Db=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=
|
|
427
|
+
r.Ya=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,je(e)){var f=be(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.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ie(g)}):[]};
|
|
428
|
+
r.Db=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ce(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Ul(this).map(function(f){return ge(f)}):[]};r.nf=function(){return this.i?this.i.imageStreams.map(function(a){return de(a)}):[]};
|
|
429
429
|
r.Cf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G["return"](null):G.A(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
|
|
430
430
|
v=m*n;y=f.j-f.startTime;x=f.m||y/v;w=f.startTime;B=D=0;1<v&&(A=Math.floor((b-f.startTime)/x),w=f.startTime+A*x,D=A%m*p,B=Math.floor(A/m)*q);return G["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:B,startTime:w,duration:x,uris:f.ya(),width:p})}return G["return"](null)})};
|
|
431
|
-
r.Ie=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Qk(this.
|
|
432
|
-
r.Je=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&
|
|
433
|
-
|
|
434
|
-
r.Xd=function(a,b){if(this.i&&this.B){this.
|
|
435
|
-
t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=
|
|
436
|
-
r.Yd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.
|
|
437
|
-
r.bg=function(a){if(this.i&&this.B){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.
|
|
431
|
+
r.Ie=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Qk(this.o.h,b,!1),yj(this.j,b),am(this),this.sb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Ul(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ee(c)==a.id?c.mode=this.ha?"showing":"hidden":c.mode="disabled";am(this)}};
|
|
432
|
+
r.Je=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&je(d)&&(Cl(this,d,!1,b,c),this.La=new Be(d),Ql(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
433
|
+
ee(c)==a.id){bm(this,c);break}};r.hf=function(){return cm(this.Ya())};r.Bf=function(){return cm(this.Db())};r.gf=function(){return Array.from(dm(this.Ya()))};r.Af=function(){return Array.from(dm(this.Db()))};
|
|
434
|
+
r.Xd=function(a,b){if(this.i&&this.B){this.La=new Ce(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.La.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=be(f),this.Je(c,!0)):$l(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Q(a);f=d=null;e=
|
|
435
|
+
t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ie(g);Q(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?bm(this,f):d&&bm(this,d)}};
|
|
436
|
+
r.Yd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.sb=a,this.Zb=b||"",this.Xb=c,(a=le(this.i.textStreams,this.sb,this.Zb,this.Xb)[0]||null)&&a!=this.j.o&&(Qk(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.yd()))yj(this.j,a),am(this)}else{var d=Q(a);(a=this.Db().find(function(e){return Q(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ie(a)}};
|
|
437
|
+
r.bg=function(a){if(this.i&&this.B){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.La=new Ce(b.language,"",0,a),$l(this))}};r.yd=function(){var a=this.ha;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Ul(this).some(function(b){return"showing"==b.mode}):a};r.ue=function(){return this.g&&this.g.src&&this.g.textTracks?em(this).map(function(a){return ge(a)}):[]};
|
|
438
438
|
r.kf=function(a){var b=Q(a),c=em(this).filter(function(g){return Q(g.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
|
|
439
439
|
function Ul(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Wl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function em(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
440
|
-
r.hg=function(a){a=!!a;if(this.ha!=a){this.ha=a;if(this.l==Hl)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.
|
|
440
|
+
r.hg=function(a){a=!!a;if(this.ha!=a){this.ha=a;if(this.l==Hl)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.sb,this.Zb,this.Xb),0<a.length&&(yj(this.j,a[0]),am(this))):uj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Ul(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")}Ml(this)}};
|
|
441
441
|
r.yf=function(){if(!this.V())return null;var a=this.ua.l,b=0;if(this.B)b=this.B.Dc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
442
|
-
r.ve=function(){if(!this.V())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.
|
|
443
|
-
r.getStats=function(){if(this.l!=Hl&&this.l!=Sl)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,switchHistory:[],stateHistory:[]};zl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.
|
|
444
|
-
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.
|
|
445
|
-
1E3*this.rc().end,this.
|
|
446
|
-
return{width:a,height:c,streamBandwidth:b,decodedFrames:
|
|
442
|
+
r.ve=function(){if(!this.V())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Na=function(){if(this.l==Hl)return this.L.Na();var a={total:[],audio:[],video:[],text:[]};this.l==Sl&&(a.total=Zh(this.g.buffered));return a};
|
|
443
|
+
r.getStats=function(){if(this.l!=Hl&&this.l!=Sl)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,switchHistory:[],stateHistory:[]};zl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
|
|
444
|
+
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.O=this.B.ie(),this.o.T=this.B.je());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.L=d;this.o.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.o.s=c;if(this.l==Hl){if(c=this.j.l)this.o.B=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.ve().valueOf()+
|
|
445
|
+
1E3*this.rc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.o.u=c}this.l==Sl&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.B;d=e.L;var f=e.M,g=e.I,h=e.T,k=e.O,l=e.u,m=e.i,n=e.m,p=e.F,q=e.j,v=Nk(e.g,"playing"),y=Nk(e.g,"paused"),x=Nk(e.g,"buffering"),w=e.s,D=e.D,B=e.G,A=Ok(e.g),G=[];e=t(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
|
|
446
|
+
id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:v,pauseTime:y,bufferingTime:x,licenseTime:w,liveLatency:D,maxSegmentDuration:B,stateHistory:A,switchHistory:G}};
|
|
447
447
|
r.Ve=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,y,x,w,D;return K(function(B){switch(B.g){case 1:if(h.l!=Hl&&h.l!=Sl)throw new N(1,7,7004);if(d){B.A(2);break}return u(B,fm(h,a),3);case 3:d=B.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(A){}if(h.l!=Sl){B.A(4);break}g&&(c="forced");return u(B,gm(h,a,b,c,d,f||"",k),5);case 5:l=h.Db();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Pl(h),B["return"](m);throw new N(1,2,2012);case 4:n=
|
|
448
|
-
|
|
449
|
-
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Xc(x.mimeType,x.codecs);D=cd(w);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);Pl(h);return B["return"](
|
|
450
|
-
r.Ue=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Hl&&d.l!=Sl)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,fm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,gm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ue();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.
|
|
448
|
+
kc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){B.A(6);break}return u(B,hm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=B.h,v=im(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=di(y),d="text/vtt";case 6:x={id:h.Ee++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Wi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.X,primary:!1,trickModeVideo:null,
|
|
449
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Xc(x.mimeType,x.codecs);D=cd(w);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);Pl(h);return B["return"](ce(x))}})};
|
|
450
|
+
r.Ue=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Hl&&d.l!=Sl)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,fm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,gm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ue();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.s.oa(f,"load",l);d.s.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
|
|
451
451
|
case 5:throw new N(1,2,2012);}})};function fm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=og(b);if(d=jm[c])return e["return"](d);C(e,2);return u(e,qg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
|
|
452
452
|
function gm(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,hm(a,b,a.F,a.h.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=im(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=di(l),e="text/vtt");m=document.createElement("track");var p=a.T,q=b;try{if(p.g.enabled){var v=wk(p);v.ot=Ck;v.su=!0;var y=yk(v);var x=zk(q,y)}else x=q}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
453
453
|
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}function hm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=lf;f=ef([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&uk(k,f,{ot:Ck,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
|
|
@@ -455,41 +455,41 @@ function im(a,b,c,d){var e=dd[c];if(e)return c=e(),a={periodStart:0,segmentStart
|
|
|
455
455
|
r.rf=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.tf=function(){return this.Rc};
|
|
456
456
|
function Tk(a){var b=Ik();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.V()&&d.includes(c.code)&&(c.severity=1,a.Ud())};b.textDisplayFactory=function(){return a.Ic?new bk(a.g,a.Ic):new Wj(a.g)};return b}r.Ne=function(a){this.Ic=a};
|
|
457
457
|
function ul(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 Xi;h={id:a.Ee++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
458
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:
|
|
459
|
-
function km(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,
|
|
460
|
-
function Zl(a,b){if(a.l!=hl){
|
|
458
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:jc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function tl(a,b){return K(function(c){if(1==c.g)return u(c,km(a,b),2);Zl(a,b);z(c)})}
|
|
459
|
+
function km(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Od(c,b),2);Ol(b);z(d)})}
|
|
460
|
+
function Zl(a,b){if(a.l!=hl){Nd(b.variants,a.h.restrictions,a.$b)&&a.j&&Pl(a);var c=a.m?a.m.g:null;if(c&&a.m.s)for(var d=t(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=t(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,Qf(a.m,g.initDataType,g.initData)}}lm(a,b)}}
|
|
461
461
|
function Jl(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return K(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);n=(m=k.segmentIndex.Ab(l))?m.next().value:null;if(!n)return q["return"](null);p=n.startTime;return q["return"](p)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(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)})}
|
|
462
|
-
function pl(a){var b=a.xd();if(a.
|
|
463
|
-
function Ql(a){try{lm(a,a.i)}catch(c){return ol(a,c),!1}var b=a.i.variants.filter(function(c){return
|
|
464
|
-
function Cl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&xj(a.j,b,d,e,!0);else{var g=a.
|
|
462
|
+
function pl(a){var b=a.xd();if(a.o&&a.M&&a.B){var c=a.G;c.j=b;Zi(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);zl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(fl("buffering",b))}function Al(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=fl("ratechange"),a.dispatchEvent(b))}function zl(a){if(a.o&&a.M){var b=a.o.g;a.M.g==Ie?Mk(b,"buffering"):a.g.paused?Mk(b,"paused"):a.g.ended?Mk(b,"ended"):Mk(b,"playing")}}
|
|
463
|
+
function Ql(a){try{lm(a,a.i)}catch(c){return ol(a,c),!1}var b=a.i.variants.filter(function(c){return je(c)});b=a.La.create(b);a.u.setVariants(Array.from(b.values()));return!0}function gl(a){return Ql(a)?a.u.chooseVariant():null}function $l(a){var b=gl(a);b&&Cl(a,b,!0,!0,0)}
|
|
464
|
+
function Cl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&xj(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));xj(a.j,b,d,e);d=null;f&&(d=be(f));b=be(b);c?Kl(a,d,b):mm(a,d,b)}}function bm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ie(c);var d=ie(b);mm(a,c,d)}
|
|
465
465
|
function Ll(a,b,c){a=Q(a.h.preferredTextLanguage);b=Q(b.language);c=Q(c.language);return ld(c,a)&&!ld(b,c)}function Kl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=fl("adaptation",b);nm(a,b)}function Pl(a){var b=fl("trackschanged");nm(a,b)}function mm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=fl("variantchanged",b);nm(a,b)}function am(a){var b=fl("textchanged");nm(a,b)}function Ml(a){var b=fl("texttrackvisibility");nm(a,b)}
|
|
466
466
|
function Nl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);nm(a,fl("abrstatuschanged",b))}
|
|
467
|
-
function om(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;for(var d=a.
|
|
467
|
+
function om(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;for(var d=a.Ya().find(function(h){return h.active}),e=a.i,f=t(e.variants),g=f.next();!g.done;g=f.next())g=g.value,g.id===d.id&&(g.disabledUntilTime=Date.now()/1E3+c);Nd(e.variants,a.h.restrictions,a.$b);d=gl(a);if(!d)return!1;e=a.Na().video.reduce(function(h,k){return h+k.end-k.start},0);Cl(a,d,!1,!0,e);a.De.R(c);return!0}
|
|
468
468
|
function ol(a,b){if(a.l!=hl)if(om(a,b))b.handled=!0;else{var c=fl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function sl(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(fl(b,c))}
|
|
469
469
|
function nl(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
|
|
470
470
|
function xl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!pm.includes(l)}h!=f.allowedByKeySystem&&
|
|
471
|
-
(e=!0)}}}if(!e||Ql(a))(d=a.j.l)&&!d.allowedByKeySystem&&$l(a),e&&Pl(a)}}function yl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=fl("expirationupdated");a.dispatchEvent(b)}function Bl(a,b,c){0<b&&(a.V()||a.Me(b));b=a.getDuration();c<b&&(a.V()||a.
|
|
471
|
+
(e=!0)}}}if(!e||Ql(a))(d=a.j.l)&&!d.allowedByKeySystem&&$l(a),e&&Pl(a)}}function yl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=fl("expirationupdated");a.dispatchEvent(b)}function Bl(a,b,c){0<b&&(a.V()||a.Me(b));b=a.getDuration();c<b&&(a.V()||a.Ia(c))}
|
|
472
472
|
function lm(a,b){var c=a.m?a.m.Mc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?pm.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
473
|
-
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Ol(a){if(!a.variants.some(
|
|
473
|
+
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Ol(a){if(!a.variants.some(je))throw new N(2,4,4032);}function nm(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=hl&&a.dispatchEvent(b);z(c)})}function dm(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(Q(c.language)):b.add("und");return b}
|
|
474
474
|
function cm(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=Q(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){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
|
|
475
|
-
h.push({language:l,role:n,label:p})}});return h}function il(){return new N(2,7,7E3)}function el(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Qj(){return{K:null,mimeType:null,startTime:null,de:NaN,uri:null}}function jl(a){return new Promise(function(b,c){a.
|
|
476
|
-
U.prototype.getManifestParserFactory=U.prototype.tf;U.prototype.getManifest=U.prototype.rf;U.prototype.retryStreaming=U.prototype.Ud;U.prototype.setMaxHardwareResolution=U.prototype.ae;U.prototype.addChaptersTrack=U.prototype.Ue;U.prototype.addTextTrackAsync=U.prototype.Ve;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.
|
|
475
|
+
h.push({language:l,role:n,label:p})}});return h}function il(){return new N(2,7,7E3)}function el(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Qj(){return{K:null,mimeType:null,startTime:null,de:NaN,uri:null}}function jl(a){return new Promise(function(b,c){a.kb=function(){return c(il())};a.Vc=function(){return b()};a.onError=function(d){return c(d)};a.Xc=function(){return c(il())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Ne;
|
|
476
|
+
U.prototype.getManifestParserFactory=U.prototype.tf;U.prototype.getManifest=U.prototype.rf;U.prototype.retryStreaming=U.prototype.Ud;U.prototype.setMaxHardwareResolution=U.prototype.ae;U.prototype.addChaptersTrack=U.prototype.Ue;U.prototype.addTextTrackAsync=U.prototype.Ve;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Na;U.prototype.getPresentationStartTimeAsDate=U.prototype.ve;U.prototype.getPlayheadTimeAsDate=U.prototype.yf;
|
|
477
477
|
U.prototype.setTextTrackVisibility=U.prototype.hg;U.prototype.getChapters=U.prototype.kf;U.prototype.getChaptersTracks=U.prototype.ue;U.prototype.isTextTrackVisible=U.prototype.yd;U.prototype.selectVariantsByLabel=U.prototype.bg;U.prototype.selectTextLanguage=U.prototype.Yd;U.prototype.selectAudioLanguage=U.prototype.Xd;U.prototype.getTextLanguages=U.prototype.Af;U.prototype.getAudioLanguages=U.prototype.gf;U.prototype.getTextLanguagesAndRoles=U.prototype.Bf;
|
|
478
|
-
U.prototype.getAudioLanguagesAndRoles=U.prototype.hf;U.prototype.selectVariantTrack=U.prototype.Je;U.prototype.selectTextTrack=U.prototype.Ie;U.prototype.getThumbnails=U.prototype.Cf;U.prototype.getImageTracks=U.prototype.nf;U.prototype.getTextTracks=U.prototype.Db;U.prototype.getVariantTracks=U.prototype.
|
|
479
|
-
U.prototype.getExpiration=U.prototype.ec;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Gf;U.prototype.seekRange=U.prototype.rc;U.prototype.isAudioOnly=U.prototype.If;U.prototype.isInProgress=U.prototype.
|
|
478
|
+
U.prototype.getAudioLanguagesAndRoles=U.prototype.hf;U.prototype.selectVariantTrack=U.prototype.Je;U.prototype.selectTextTrack=U.prototype.Ie;U.prototype.getThumbnails=U.prototype.Cf;U.prototype.getImageTracks=U.prototype.nf;U.prototype.getTextTracks=U.prototype.Db;U.prototype.getVariantTracks=U.prototype.Ya;U.prototype.cancelTrickPlay=U.prototype.Ze;U.prototype.trickPlay=U.prototype.jg;U.prototype.getPlaybackRate=U.prototype.Nc;U.prototype.isBuffering=U.prototype.xd;U.prototype.getKeyStatuses=U.prototype.Mc;
|
|
479
|
+
U.prototype.getExpiration=U.prototype.ec;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Gf;U.prototype.seekRange=U.prototype.rc;U.prototype.isAudioOnly=U.prototype.If;U.prototype.isInProgress=U.prototype.ib;U.prototype.isLive=U.prototype.V;U.prototype.getAdManager=U.prototype.te;U.prototype.getAssetUri=U.prototype.wd;U.prototype.getNetworkingEngine=U.prototype.fc;U.prototype.getMediaElement=U.prototype.vf;
|
|
480
480
|
U.prototype.getLoadMode=U.prototype.qf;U.prototype.resetConfiguration=U.prototype.$f;U.prototype.getBufferFullness=U.prototype.jf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.og;U.prototype.unload=U.prototype.ge;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Yb;
|
|
481
|
-
U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?u(h,gg(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(
|
|
482
|
-
|
|
483
|
-
k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=
|
|
484
|
-
U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||
|
|
485
|
-
U.registerSupportPlugin=function(a,b){qm[a]=b};U.prototype.destroy=U.prototype.destroy;var hl=0,Sk=1,Hl=2,Sl=3;U.LoadMode={DESTROYED:hl,NOT_LOADED:Sk,MEDIA_SOURCE:Hl,SRC_EQUALS:Sl};U.version="v4.2.
|
|
481
|
+
U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?u(h,gg(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(oc()){for(var l in ng)k[l]=!0;for(var m in pg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};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,k[n]=oc()?!!ng[n]:pc(n);for(var p in l)k[p]=
|
|
482
|
+
oc()?!!pg[p]:pc(l[p]);c=k;p='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",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(ia(xi));
|
|
483
|
+
k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=oc()?cd(l)?!0:MediaSource.isTypeSupported(l)||Sc(l):pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=qm;for(g in f)e[g]=f[g]();return h["return"](e)})};
|
|
484
|
+
U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||sc("Trident/"))return!1;var a=xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:oc()?!0:pc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Vk=a};
|
|
485
|
+
U.registerSupportPlugin=function(a,b){qm[a]=b};U.prototype.destroy=U.prototype.destroy;var hl=0,Sk=1,Hl=2,Sl=3;U.LoadMode={DESTROYED:hl,NOT_LOADED:Sk,MEDIA_SOURCE:Hl,SRC_EQUALS:Sl};U.version="v4.2.1";var rm=["4","2"];ue=new function(a){this.g=a;this.i=ve;this.h=we}(new se(Number(rm[0]),Number(rm[1])));
|
|
486
486
|
var pm=["output-restricted","internal-error"],qm={},Vk=null,ml={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",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},jm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
487
487
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function sm(){this.h=[];this.j=this.i=this.g=0};function V(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new of;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
488
488
|
r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
|
|
489
489
|
r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
490
490
|
r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;
|
|
491
491
|
V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;
|
|
492
|
-
V.prototype.getDuration=V.prototype.getDuration;function tm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.
|
|
492
|
+
V.prototype.getDuration=V.prototype.getDuration;function tm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.1");this.g=null;this.h.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){um(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
493
493
|
function(f){vm(e,f)});this.i.onended=function(){e.m.contentComplete()}}tm.prototype.stop=function(){this.g&&this.g.stop();this.o&&ak(this.o)};tm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function vm(a,b){b.getError();wm(a,null);a.l(new R("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
494
494
|
function um(a,b){a.l(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new R("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new R("ad-cue-points-changed",(new Map).set("cuepoints",d)))}xm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,ym(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
|
|
495
495
|
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,ym(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,ym(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){wm(a,null)}}function ym(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
@@ -510,8 +510,8 @@ f;e.i(new R("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Am.prototyp
|
|
|
510
510
|
function Bm(a,b){a.i(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){We.call(this);this.g=this.i=null;this.h=new sm;this.j=navigator.language}pa(X,We);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new tm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
511
511
|
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);We.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new R("ad-stopped"));this.h=new sm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
|
|
512
512
|
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Am(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
513
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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.2.
|
|
514
|
-
(c.F=!0),c.j=new
|
|
513
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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.2.1";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
514
|
+
(c.F=!0),c.j=new lc,c.g.requestStream(a),c.B=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('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.2.1";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
|
|
515
515
|
r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",X);
|
|
516
516
|
X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
|
|
517
517
|
X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
|
|
@@ -526,10 +526,10 @@ Om=["attach","detach","load","unload"];function Pm(a,b,c,d,e,f,g){var h=this;thi
|
|
|
526
526
|
m.code);for(n in m)p[n]=m[n];q.reject(p)}else q.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;Rm.add(this)}r=Pm.prototype;r.destroy=function(){Rm["delete"](this);Sm(this);Tm&&Um(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ra=function(){return this.h};r.Sd=function(){return this.M};
|
|
527
527
|
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Lb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Rm),d=c.next();!d.done;d=c.next())Vm(d.value,b)},function(b){for(var c=t(Rm),d=c.next();!d.done;d=c.next())d=d.value,Wm="available"==b,d.j.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Wm&&this.j.R(Xm);(a=Tm)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
528
528
|
Vm(this,a):Tm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Ym),window.__onGCastApiAvailable!=Ym&&Va("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.Zd=function(a){this.o=a;this.h&&Zm(this,{type:"appData",appData:this.o})};
|
|
529
|
-
r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!Wm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new
|
|
530
|
-
r.get=function(a,b){var c=this;if("video"==a){if(Im.includes(b))return function(){return c.Ge.apply(c,[a,b].concat(ia(
|
|
529
|
+
r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!Wm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new lc;chrome.cast.requestSession(function(d){return $m(b,a,d)},function(d){return an(b,d)});return u(c,b.l,0)})};function bn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return $m(a,b,c)},function(c){return an(a,c)})}}r.yb=function(){if(this.h){Sm(this);if(Tm){Um(this);try{Tm.stop(function(){},function(){})}catch(a){}Tm=null}Qm(this)}};
|
|
530
|
+
r.get=function(a,b){var c=this;if("video"==a){if(Im.includes(b))return function(){return c.Ge.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(Km[b]&&!this.get("player","isLive")())return function(){};if(Nm.includes(b))return function(){return c.Ge.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(Om.includes(b))return function(){return c.Xf.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(Jm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
531
531
|
r.set=function(a,b,c){this.g[a][b]=c;Zm(this,{type:"set",targetName:a,property:b,value:c})};function $m(a,b,c){Tm=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Qm(a);Zm(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function an(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
|
|
532
|
-
r.Ge=function(a,b){Zm(this,{type:"call",targetName:a,methodName:b,args:
|
|
532
|
+
r.Ge=function(a,b){Zm(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};r.Xf=function(a,b){var c=Ia.apply(2,arguments),d=new lc,e=this.I.toString();this.I++;this.i[e]=d;try{Zm(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Vm(a,b){var c=a.L();a.l=new lc;a.u=!0;$m(a,c,b)}function Um(a){var b=Tm;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
|
|
533
533
|
function Qm(a){var b=Tm?"connected"==Tm.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Sm(a)}a.h=b;a.M=b?Tm.receiver.friendlyName:"";a.j.Lb()}function Sm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Zm(a,b){var c=Cm(b),d=Tm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ya)}catch(e){throw c=new N(2,8,8005,e),d=new R("error",(new Map).set("detail",c)),a.s("player",d),a.yb(),c;}}var Xm=.02,Wm=!1,Tm=null,Rm=new Set;
|
|
534
534
|
function Ym(a){if(a){a=t(Rm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function cn(a,b,c,d){d=void 0===d?!1:d;We.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.B=d;this.u=new Map;this.g=new Pm(c,function(){return dn(e)},function(){return en(e)},function(f,g){return gn(e,f,g)},function(){return hn(e)},function(){return jn(e)},d);kn(this)}pa(cn,We);r=cn.prototype;
|
|
535
535
|
r.destroy=function(a){a&&this.g.yb();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;We.prototype.release.call(this);return Promise.all(a)};r.Ff=function(){return this.l};r.xf=function(){return this.s};r.Xe=function(){return this.g.m&&Wm};r.ra=function(){return this.g.ra()};r.Sd=function(){return this.g.Sd()};
|
|
@@ -561,58 +561,58 @@ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.B=!1);var g=c.id,h=b.senderId;f=a.
|
|
|
561
561
|
function un(a,b){var c=Dm(b.data);switch(c.type){case "PLAY":a.g.play();An(a);break;case "PAUSE":a.g.pause();An(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),An(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),An(a));break;case "STOP":a.h.ge().then(function(){a.h&&An(a)});break;case "GET_STATUS":Dn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
|
|
562
562
|
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||An(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.L(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Dn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");tn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:tn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
563
563
|
function En(a,b,c,d){a.h&&tn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function tn(a,b,c,d){a.F&&(a=Cm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function An(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Fn:a.h.xd()?Gn:a.g.paused?Hn:In,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);tn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
564
|
-
M("shaka.cast.CastReceiver",pn);pn.prototype.destroy=pn.prototype.destroy;pn.prototype.setContentArtist=pn.prototype.cg;pn.prototype.setContentImage=pn.prototype.dg;pn.prototype.setContentTitle=pn.prototype.fg;pn.prototype.clearContentMetadata=pn.prototype.cf;pn.prototype.setContentMetadata=pn.prototype.eg;pn.prototype.isIdle=pn.prototype.Jf;pn.prototype.isConnected=pn.prototype.isConnected;var Cn=.5,yn=5,Fn="IDLE",In="PLAYING",Gn="BUFFERING",Hn="PAUSED";function Jn(a){var b=this;this.g=[];this.h=[];this.data=[];(new ug).box("moov",yg).U("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Pc(c.reader
|
|
564
|
+
M("shaka.cast.CastReceiver",pn);pn.prototype.destroy=pn.prototype.destroy;pn.prototype.setContentArtist=pn.prototype.cg;pn.prototype.setContentImage=pn.prototype.dg;pn.prototype.setContentTitle=pn.prototype.fg;pn.prototype.clearContentMetadata=pn.prototype.cf;pn.prototype.setContentMetadata=pn.prototype.eg;pn.prototype.isIdle=pn.prototype.Jf;pn.prototype.isConnected=pn.prototype.isConnected;var Cn=.5,yn=5,Fn="IDLE",In="PLAYING",Gn="BUFFERING",Hn="PAUSED";function Jn(a){var b=this;this.g=[];this.h=[];this.data=[];(new ug).box("moov",yg).U("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Pc(c.reader.Za(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=Pc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
|
|
565
565
|
function Kn(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=Ib(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=Oc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Ln(a,b){var c=Mn(a,b);return 1!=c.length?null:c[0]}function Nn(a,b,c){a=On(a,b,c);return 1!=a.length?null:a[0]}function Mn(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Pn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
566
566
|
function On(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Qn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Rn(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Sn(a){return Array.from(a.childNodes).every(Tn)?a.textContent.trim():null}
|
|
567
567
|
function Tn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Un(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Vn(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}
|
|
568
568
|
function Wn(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}
|
|
569
569
|
function Xn(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 Yn(a){a=Number(a);return 0===a%1?a:null}function Zn(a){a=Number(a);return 0===a%1&&0<a?a:null}function $n(a){a=Number(a);return 0===a%1&&0<=a?a:null}function ao(a){a=Number(a);return isNaN(a)?null:a}function bo(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
570
|
-
function co(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function eo(a,b){try{var c=
|
|
570
|
+
function co(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function eo(a,b){try{var c=Bc(a);return co(c,b)}catch(d){return null}};function fo(a,b,c){var d=go(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Wd?(e=h.init||e,!1):!0}),f.length&&(a=ho(e,f,c,g),0==a.length&&(a=[fc("",e)])));if(d.length&&(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(fc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
|
|
571
571
|
t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{oe:g,Zg:e,drmInfos:a,se:!0}}function io(a,b,c,d){var e=fo(a,c,d);if(b.se){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.se=!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 N(2,4,4008);return e.oe||b.oe}
|
|
572
572
|
function jo(a){var b=0,c=Ib(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
573
|
-
function ko(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function lo(a){a=Nn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Nc(a.textContent);a=jo(a).filter(function(b){return b.type===mo})[0];if(!a)return"";a=
|
|
573
|
+
function ko(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function lo(a){a=Nn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Nc(a.textContent);a=jo(a).filter(function(b){return b.type===mo})[0];if(!a)return"";a=Cc(a.value,!0);return(a=co(a,"WRMHEADER"))?ko(a):""}
|
|
574
574
|
function ho(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Wd];if(g){var h;if(h=Nn(f.node,"urn:microsoft:playready","pro")){h=Nc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Kn(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Wd)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
|
|
575
|
-
226,251,75]),m=new Uint8Array([]);k=[{initData:Kn(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=
|
|
575
|
+
226,251,75]),m=new Uint8Array([]);k=[{initData:Kn(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=fc(g,f.init||a||h||k);if(g=no.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function go(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=oo(c.value))&&b.push(c);return b}
|
|
576
576
|
function oo(a){var b=a.getAttribute("schemeIdUri"),c=Qn(a,"urn:mpeg:cenc:2013","default_KID"),d=On(a,"urn:mpeg:cenc:2013","pssh").map(Sn);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Nc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Wd:b,keyId:c,init:0<e.length?e:null}}
|
|
577
577
|
var mo=1,no=(new Map).set("com.widevine.alpha",function(a){return(a=Nn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",lo).set("com.microsoft.playready.recommendation",lo).set("com.microsoft.playready.software",lo).set("com.microsoft.playready.hardware",lo).set("org.w3.clearkey",function(a){return(a=Nn(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function po(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
|
|
578
578
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
579
579
|
function qo(a,b){var c=ro(a,b,"timescale"),d=1;c&&(d=Zn(c)||1);var e=ro(a,b,"duration");c=Zn(e||"");"image"==a.H.contentType&&(c=ao(e||""));c&&(c/=d);var f=ro(a,b,"startNumber");e=Number(ro(a,b,"presentationTimeOffset"))||0;var g=$n(f||"");if(null==f||null==g)g=1;var h=so(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.W.duration||Infinity;h=Mn(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Un(p,"t",$n),y=Un(p,"d",$n);p=Un(p,"r",Yn);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
|
|
580
|
-
p||0;if(0>p)if(q){q=Un(q,"t",$n);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,mg:v}),v=m}f=l}return{timescale:d,ga:c,Kb:g,
|
|
581
|
-
function so(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(
|
|
582
|
-
function to(a,b,c,d,e,f){for(var g=Qn(a,"http://www.w3.org/1999/xlink","href"),h=Qn(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Oe(new N(2,4,4028));if("onLoad"!=h)return Oe(new N(2,4,4027));var m=
|
|
580
|
+
p||0;if(0>p)if(q){q=Un(q,"t",$n);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,mg:v}),v=m}f=l}return{timescale:d,ga:c,Kb:g,Sa:e/d||0,he:e,timeline:f}}function ro(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(dc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
581
|
+
function so(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(dc).map(function(d){return Ln(d,c)}).reduce(function(d,e){return d||e})}
|
|
582
|
+
function to(a,b,c,d,e,f){for(var g=Qn(a,"http://www.w3.org/1999/xlink","href"),h=Qn(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Oe(new N(2,4,4028));if("onLoad"!=h)return Oe(new N(2,4,4027));var m=ec([d],[g]);return e.request(0,ef(m,b)).Z(function(n){n=eo(n.data,a.tagName);if(!n)return Oe(new N(2,4,4001,g));
|
|
583
583
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return uo(a,b,c,m[0],e,f+1)})}
|
|
584
584
|
function uo(a,b,c,d,e,f){f=void 0===f?0:f;if(Qn(a,"http://www.w3.org/1999/xlink","href")){var g=to(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return uo(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Qn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(uo(k,b,c,d,e,f)));return Se(g).Z(function(){return a})};function vo(a,b,c,d,e,f,g){var h,k=(new ug).U("sidx",function(l){h=wo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
|
|
585
585
|
function wo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Jb(),m=g.reader.Jb();g.reader.skip(2);var n=g.reader.Rd();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.N(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.N();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new Sh(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function xo(a){this.h=Ib(a);this.g=new rg(this.h,0)}xo.prototype.ma=function(){return this.g.ma()};
|
|
586
586
|
function yo(a){var b=zo(a);if(7<b.length)throw new N(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=zo(a);a:{d=t(Ao);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(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.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Ib(a.h,a.g.$(),b);a.g.skip(b);return new Bo(c,d)}
|
|
587
|
-
function zo(a){var b=a.g.$(),c=a.g.
|
|
587
|
+
function zo(a){var b=a.g.$(),c=a.g.Ra();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Ao=[[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 Bo(a,b){this.id=a;this.g=b}
|
|
588
588
|
function Co(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(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 Do(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new xo(a.g);for(var n=null,p=null;a.ma();){var q=yo(a);if(187==q.id){var v=Eo(q);v&&(q=c*v.ng,v=b+v.Wf,null!=n&&m.push(new Sh(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new Sh(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
589
|
-
function Eo(a){var b=new xo(a.g);a=yo(b);if(179!=a.id)throw new N(2,3,3013);a=Co(a);b=yo(b);if(183!=b.id)throw new N(2,3,3012);b=new xo(b.g);for(var c=0;b.ma();){var d=yo(b);if(241==d.id){c=Co(d);break}}return{ng:a,Wf:c}};function Fo(a,b){var c=so(a,b,"Initialization");if(!c)return null;var d=a.H.wa,e=c.getAttribute("sourceURL");e&&(d=
|
|
590
|
-
function Ho(a,b){var c=Number(ro(a,Io,"presentationTimeOffset"))||0,d=ro(a,Io,"timescale"),e=1;d&&(e=Zn(d)||1);var f=c/e||0,g=Fo(a,Io);Jo(a,g);var h=Ye(a);return{zb:function(){var k=so(h,Io,"RepresentationIndex"),l=h.H.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=
|
|
591
|
-
function Lo(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,B,A,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.
|
|
592
|
-
J=new xo(J.g);for(var I=null;J.ma();){var L=yo(J);if(357149030==L.id){I=L;break}}if(!I)throw new N(2,3,3010);I=new xo(I.g);L=1E6;for(J=null;I.ma();){var P=yo(I);if(2807729==P.id)L=Co(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=L/1E9;J*=I;L=yo(new xo(x));if(475249515!=L.id)throw new N(2,3,3007);H=Do(L,H,I,J,d,c,B,A,G)}D=H;h.Gb(D);q=new Ui(D);k&&q.
|
|
593
|
-
function Io(a){return a.tc}function Ko(a){var b=so(a,Io,"RepresentationIndex");a=ro(a,Io,"indexRange");a=Xn(a||"");b&&(a=Un(b,"range",Xn,a));return a}function Jo(a,b){Mo(a,b);if(!Ko(a))throw new N(2,4,4002);}function Mo(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=
|
|
594
|
-
function Go(a){var b=a.H;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.Uc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function No(a,b){var c=Fo(a,Oo),d=Po(a);if(!d.ga&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.ga&&!a.W.duration&&!d.timeline&&1==d.Eb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=Qo(a.W.start,a.W.duration,a.H.wa,d,c);c=!e;e?e.Fb(g,a.presentationTimeline.
|
|
595
|
-
Infinity,c);f&&(f.segmentIndex=e);return{zb:function(){e&&0!=e.J.length||e.mc(g);return Promise.resolve(e)}}}function Oo(a){return a
|
|
596
|
-
function Qo(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.
|
|
597
|
-
function Ro(a){return[a.H
|
|
598
|
-
n;l?(p&&(new Ui(m)).
|
|
589
|
+
function Eo(a){var b=new xo(a.g);a=yo(b);if(179!=a.id)throw new N(2,3,3013);a=Co(a);b=yo(b);if(183!=b.id)throw new N(2,3,3012);b=new xo(b.g);for(var c=0;b.ma();){var d=yo(b);if(241==d.id){c=Co(d);break}}return{ng:a,Wf:c}};function Fo(a,b){var c=so(a,b,"Initialization");if(!c)return null;var d=a.H.wa,e=c.getAttribute("sourceURL");e&&(d=ec(a.H.wa,[e]));e=0;var f=null;if(c=Un(c,"range",Xn))e=c.start,f=c.end;return new Qh(function(){return d},e,f,Go(a))}
|
|
590
|
+
function Ho(a,b){var c=Number(ro(a,Io,"presentationTimeOffset"))||0,d=ro(a,Io,"timescale"),e=1;d&&(e=Zn(d)||1);var f=c/e||0,g=Fo(a,Io);Jo(a,g);var h=Ye(a);return{zb:function(){var k=so(h,Io,"RepresentationIndex"),l=h.H.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=ec(h.H.wa,[k]));k=Ko(h);return Lo(h,b,g,l,k.start,k.end,f)}}}
|
|
591
|
+
function Lo(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,B,A,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Wa||!a.W.ze,l=a.W.start,m=a.W.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ya(),c.Ba,c.la):null],p=null,u(E,Promise.all(v),2);y=E.h;x=y[0];w=y[1]||null;D=null;B=l-g;A=l;G=m?l+m:Infinity;if("mp4"==n)var H=vo(x,e,d,c,B,A,G);else{H=new xo(w);if(440786851!=yo(H).id)throw new N(2,3,3008);var J=yo(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
|
|
592
|
+
J=new xo(J.g);for(var I=null;J.ma();){var L=yo(J);if(357149030==L.id){I=L;break}}if(!I)throw new N(2,3,3010);I=new xo(I.g);L=1E6;for(J=null;I.ma();){var P=yo(I);if(2807729==P.id)L=Co(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=L/1E9;J*=I;L=yo(new xo(x));if(475249515!=L.id)throw new N(2,3,3007);H=Do(L,H,I,J,d,c,B,A,G)}D=H;h.Gb(D);q=new Ui(D);k&&q.Xa(A,G,!0);return E["return"](q)})}
|
|
593
|
+
function Io(a){return a.tc}function Ko(a){var b=so(a,Io,"RepresentationIndex");a=ro(a,Io,"indexRange");a=Xn(a||"");b&&(a=Un(b,"range",Xn,a));return a}function Jo(a,b){Mo(a,b);if(!Ko(a))throw new N(2,4,4002);}function Mo(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=jc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
|
|
594
|
+
function Go(a){var b=a.H;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.Uc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function No(a,b){var c=Fo(a,Oo),d=Po(a);if(!d.ga&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.ga&&!a.W.duration&&!d.timeline&&1==d.Eb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=Qo(a.W.start,a.W.duration,a.H.wa,d,c);c=!e;e?e.Fb(g,a.presentationTimeline.Pa()):e=new Ui(g);a.presentationTimeline.Gb(g);a.Wa&&a.W.ze||e.Xa(a.W.start,a.W.duration?a.W.start+a.W.duration:
|
|
595
|
+
Infinity,c);f&&(f.segmentIndex=e);return{zb:function(){e&&0!=e.J.length||e.mc(g);return Promise.resolve(e)}}}function Oo(a){return a.$a}function Po(a){var b=Ro(a);a=qo(a,Oo);var c=a.Kb;0==c&&(c=1);var d=0;a.ga?d=a.ga*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ga:a.ga,startTime:d,Kb:c,Sa:a.Sa,timeline:a.timeline,Eb:b}}
|
|
596
|
+
function Qo(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={kd:m.kd},n++){var p=d.Eb[n];m.kd=ec(c,[p.Nf]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new Sh(a+l,a+q,function(v){return function(){return v.kd}}(m),p.start,p.end,e,g,a,h));l=q}return k}
|
|
597
|
+
function Ro(a){return[a.H.$a,a.ja.$a,a.aa.$a].filter(dc).map(function(b){return Mn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.xe&&(a.xe=!0);var c=b.getAttribute("media");b=Un(b,"mediaRange",Xn,{start:0,end:null});return{Nf:c,start:b.start,end:b.end}})};function So(a,b,c,d,e,f){var g=To(a),h=Uo(a);Vo(h);var k=Ye(a);if(h.kc)return Mo(a,g),{zb:function(){var q=po(h.kc,k.H.id,null,k.bandwidth||null,null);q=ec(k.H.wa,[q]);return Lo(k,b,g,q,0,null,h.Sa)}};if(h.ga)return d||(a.presentationTimeline.Ld(h.ga),a.presentationTimeline.Md(a.W.start)),{zb:function(){return Wo(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=Xo(k,h,g);c=a.W.start;var n=a.W.duration?a.W.start+a.W.duration:Infinity,p=Infinity!=
|
|
598
|
+
n;l?(p&&(new Ui(m)).Xa(c,n,!0),l.Fb(m,a.presentationTimeline.Pa())):l=new Ui(m);a.presentationTimeline.Gb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{zb:function(){l&&0!=l.J.length||l.mc(m);return Promise.resolve(l)}}}function Yo(a){return a.uc}function Uo(a){var b=qo(a,Yo),c=ro(a,Yo,"media");a=ro(a,Yo,"index");return{ga:b.ga,timescale:b.timescale,Kb:b.Kb,Sa:b.Sa,he:b.he,timeline:b.timeline,Jd:c,kc:a}}
|
|
599
599
|
function Vo(a){var b=a.kc?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.kc&&(a.timeline=null),a.ga=null);if(!a.kc&&!a.Jd)throw new N(2,4,4002);}
|
|
600
|
-
function Wo(a,b,c,d,e){function f(I){var L=(I-q)*p,P=L+b.
|
|
601
|
-
y=b.Jd,x=a.bandwidth||null,w=a.H.id,D=a.H.wa,B=l-b.
|
|
602
|
-
function Xo(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.
|
|
603
|
-
function To(a){var b=ro(a,Yo,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.wa;return new Qh(function(){var f=po(b,c,null,d,null);return
|
|
604
|
-
function $o(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P,S,Y,ea,
|
|
605
|
-
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(ep(d.X));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(ep(d.Ub));return u(
|
|
606
|
-
!
|
|
607
|
-
a.l=B;z(
|
|
600
|
+
function Wo(a,b,c,d,e){function f(I){var L=(I-q)*p,P=L+b.Sa,S=L+l;L=S+p;var Y=Math.min(L,h());S=new Sh(S,Y,function(){var ea=po(y,w,I,x,P*v);return ec(D,[ea])},0,null,d,B,l,h());S.j=L;return S}function g(){var I=[Math.max(k.Pa(),l),Math.min(k.fb(),h())].map(function(L){return L-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(L){return L+q})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.aa.id,n=a.W.duration,p=b.ga,q=b.Kb,v=b.timescale,
|
|
601
|
+
y=b.Jd,x=a.bandwidth||null,w=a.H.id,D=a.H.wa,B=l-b.Sa,A=g();a=a.Wa?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var G=a;G<=A;++G){var E=f(G);c.push(E)}var H=new Ui(c);c=k.fb()<h();G=k.V();if(c||G){var J=Math.max(a,A+1);H.ad(p,function(){var I=k.Pa();H.cb(I);var L=t(g());L.next();L=L.next().value;for(var P=[];J<=L;){var S=f(J);P.push(S);J++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
|
|
602
|
+
function Xo(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={jd:h.jd,nd:h.nd,qd:h.qd,fd:h.fd,sd:h.sd,gd:h.gd},k++){var l=b.timeline[k],m=l.start,n=l.mg;l=l.end;h.qd=k+b.Kb;h.sd=n+b.he;h.nd=a.H.id;h.fd=a.bandwidth||null;h.jd=b.Jd;h.gd=a.H.wa;g.push(new Sh(d+m,d+l,function(p){return function(){var q=po(p.jd,p.nd,p.qd,p.fd||null,p.sd);return ec(p.gd,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
603
|
+
function To(a){var b=ro(a,Yo,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.wa;return new Qh(function(){var f=po(b,c,null,d,null);return ec(e,[f])},0,null,Go(a))};function Zo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Zo.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
604
|
+
function $o(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P,S,Y,ea,ta,Ca;return K(function(Da){switch(Da.g){case 1:d=kc;ap(b);bp(b);cp(b);dp(b);if(!c&&1==b.length){e=b[0];a.g=e.Ec;a.h=e.cd;a.j=e.textStreams;a.i=e.imageStreams;Da.A(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Da["return"]();k=b.map(function(Ga){return Ga.Ec});l=b.map(function(Ga){return Ga.cd});m=b.map(function(Ga){return Ga.textStreams});n=b.map(function(Ga){return Ga.imageStreams});
|
|
605
|
+
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(ep(d.X));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(ep(d.Ub));return u(Da,fp(a.g,k,f,gp,hp),3);case 3:return u(Da,fp(a.h,l,f,gp,hp),4);case 4:return u(Da,fp(a.j,m,f,gp,hp),5);case 5:return u(Da,fp(a.i,n,f,gp,hp),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(I=t(a.g),L=I.next();!L.done;L=I.next())for(P=L.value,S=t(a.h),Y=S.next();!Y.done;Y=S.next())ea=Y.value,ta=jg(P.drmInfos,ea.drmInfos),P.drmInfos.length&&ea.drmInfos.length&&
|
|
606
|
+
!ta.length||(Ca=D++,B.push({id:Ca,language:P.language,primary:P.primary,audio:P,video:ea,bandwidth:(P.bandwidth||0)+(ea.bandwidth||0),drmInfos:ta,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),G=t(A),E=G.next();!E.done;E=G.next())H=E.value,J=D++,B.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.bb?H:null,video:H.type==d.va?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
607
|
+
a.l=B;z(Da)}})}function ap(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Ec),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&fb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Ec=c}}
|
|
608
608
|
function cp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&fb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
609
609
|
function bp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.cd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&fb(e.roles,h.roles)&&xf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.cd=c}}
|
|
610
610
|
function dp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
|
|
611
|
-
function ip(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P;return K(function(S){switch(S.g){case 1:b=
|
|
611
|
+
function ip(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P;return K(function(S){switch(S.g){case 1:b=kc;if(1==a.length)return S["return"](a[0]);c=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.bb})});d=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.va})});e=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.X})});f=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.Ub})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
|
|
612
612
|
k.push(jp(b.X));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(jp(b.Ub));return u(S,fp([],c,0,kp,lp),2);case 2:return p=S.h,u(S,fp([],d,0,kp,lp),3);case 3:return q=S.h,u(S,fp([],e,0,kp,lp),4);case 4:return v=S.h,u(S,fp([],f,0,kp,lp),5);case 5:y=S.h;x=0;if(q.length&&p.length)for(G=t(p),E=G.next();!E.done;E=G.next())for(H=E.value,J=t(q),I=J.next();!I.done;I=J.next())L=I.value,P=x++,L.variantIds.push(P),H.variantIds.push(P);else for(w=q.concat(p),D=t(w),B=D.next();!B.done;B=D.next())A=B.value,
|
|
613
613
|
A.variantIds=[x++];return S["return"](q.concat(p).concat(v).concat(y))}})}
|
|
614
|
-
function fp(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I;return K(function(L){switch(L.g){case 1:f=
|
|
615
|
-
B.next())for(A=q.value,G={},E=t(A),x=E.next();!x.done;G={
|
|
614
|
+
function fp(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I;return K(function(L){switch(L.g){case 1:f=kc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){L.A(4);break}m=l.value;return u(L,mp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new N(2,4,4037);l=k.next();L.A(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,y=t(v),x=y.next();!x.done;x=y.next())w=x.value,(D=np(w,b,d,e,g))&&a.push(D);B=t(g);for(q=B.next();!q.done;q=
|
|
615
|
+
B.next())for(A=q.value,G={},E=t(A),x=E.next();!x.done;G={Va:G.Va},x=E.next())if(G.Va=x.value,H=G.Va.type==f.X&&!G.Va.language,J=G.Va.type==f.Ub&&!G.Va.tilesLayout,!H&&!J&&(I=a.some(function(P){return function(S){return S.mimeType==P.Va.mimeType&&Zc(S.codecs)==Zc(P.Va.codecs)}}(G))))throw new N(2,4,4037);return L["return"](a)}})}
|
|
616
616
|
function mp(a,b,c,d,e){return K(function(f){if(1==f.g)return op(b,a),a.matchedStreams?a.segmentIndex?u(f,pp(a,c),2):f.A(2):f["return"](!1);qp(a,c,d,e);return f["return"](!0)})}
|
|
617
617
|
function pp(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Xi)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
|
|
618
618
|
function np(a,b,c,d,e){var f=c(a);op(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new Xi;return u(g,pp(f,0),0)})});if(!f.matchedStreams)return null;qp(f,0,d,e);return f}function qp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==sd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
|
|
@@ -633,95 +633,94 @@ function yp(a,b,c){if(b==a&&a!=c)return Ap;if(c==a&&a!=b)return zp;if(b>a){if(c<
|
|
|
633
633
|
r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return C(c,2),u(c,Fp(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};r.onExpirationUpdated=function(){};
|
|
634
634
|
function Fp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=ef(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),$e(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Hp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
|
|
635
635
|
function Hp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=eo(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Ip(a,d,c));f=a.g.dash.xlinkFailGracefully;g=uo(d,a.g.retryParameters,f,c,a.h.networkingEngine);$e(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](Ip(a,h,c))})}
|
|
636
|
-
function Ip(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P,S,Y,ea,
|
|
637
|
-
"timeShiftBufferDepth",Wn);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Un(b,"suggestedPresentationDelay",Wn));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Un(b,"maxSegmentDuration",Wn));B=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.
|
|
638
|
-
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.ce(v);P=b.getAttribute("profiles")||"";S={
|
|
639
|
-
A.Ld(D||1);return u(
|
|
636
|
+
function Ip(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P,S,Y,ea,ta,Ca,Da,Ga;return K(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Mn(b,"Location").map(Sn).filter(dc);0<f.length&&(g=ec(e,f),e=a.m=g);h=Mn(b,"BaseURL");k=h.map(Sn);l=ec(e,k);m=0;h&&h.length&&(m=Un(h[0],"availabilityTimeOffset",ao)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Un(b,"minBufferTime",Wn)||0);a.F=Un(b,"minimumUpdatePeriod",Wn,-1);q=Un(b,"availabilityStartTime",Vn);v=Un(b,
|
|
637
|
+
"timeShiftBufferDepth",Wn);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Un(b,"suggestedPresentationDelay",Wn));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Un(b,"maxSegmentDuration",Wn));B=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.cb(A.Pa());else J=a.g.defaultPresentationDelay||1.5*p,I=null!=x?x:J,A=new T(q,I,a.g.dash.autoCorrectDrift);A.vc("static"==B);(L=A.V())&&
|
|
638
|
+
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.ce(v);P=b.getAttribute("profiles")||"";S={Wa:"static"!=B,presentationTimeline:A,aa:null,W:null,ja:null,H:null,bandwidth:0,xe:!1,xb:m,profiles:P.split(",")};Y=Jp(a,S,l,b);ea=Y.duration;ta=Y.periods;"static"!=B&&Y.qe||A.Ia(ea||Infinity);a.u&&!a.B&&(Ca=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?A.Ke(a.u):a.u&&Va("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.");
|
|
639
|
+
A.Ld(D||1);return u(Ha,$o(a.j,ta,S.Wa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ha.A(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:!1};if(!A.Pe()){Ha.A(4);break}Da=Mn(b,"UTCTiming");return u(Ha,Kp(a,l,Da),5);case 5:Ga=Ha.h;if(!a.h)return Ha["return"]();A.Le(Ga);case 4:A.Fd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ha)}})}
|
|
640
640
|
function Jp(a,b,c,d){var e=Un(d,"mediaPresentationDuration",Wn),f=[],g=0;d=Mn(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Un(k,"start",Wn,g),n=k.id,p=Un(k,"duration",Wn),q=null;if(l){var v=Un(l,"start",Wn);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Lp(a,b,c,{start:m,duration:q,node:k,ze:null==q||!l});f.push(g);b.aa.id&&q&&(a.M[b.aa.id]=q);if(null==q){g=
|
|
641
641
|
null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,qe:!1}:{periods:f,duration:g,qe:!0}}
|
|
642
|
-
function Lp(a,b,c,d){b.aa=Mp(d.node,null,c);b.W=d;b.aa.xb=b.xb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Mn(d.node,"EventStream");c=b.presentationTimeline.
|
|
642
|
+
function Lp(a,b,c,d){b.aa=Mp(d.node,null,c);b.W=d;b.aa.xb=b.xb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Mn(d.node,"EventStream");c=b.presentationTimeline.Pa();e=t(e);for(var f=e.next();!f.done;f=e.next())Np(a,d.start,d.duration,f.value,c);c=Mn(d.node,"AdaptationSet").map(function(m){return Op(a,b,m)}).filter(dc);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Zf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
|
|
643
643
|
}d=c.filter(function(m){return!m.fe});c=c.filter(function(m){return m.fe});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.fe.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Cc:h.Cc},l=k.next())h.Cc=l.value,h.Cc.trickModeVideo=e.streams.find(function(m){return function(n){return Zc(m.Cc.codecs)==Zc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Pp(d,"audio");g=a.g.disableVideo?[]:Pp(d,"video");f=a.g.disableText?
|
|
644
|
-
[]:Pp(d,
|
|
644
|
+
[]:Pp(d,jc);c=a.g.disableThumbnails?[]:Pp(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.aa.id,Ec:d,cd:e,textStreams:g,imageStreams:f}}
|
|
645
645
|
function Pp(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
646
|
-
function Op(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ja=Mp(c,b.aa,null);var e=!1,f=Mn(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(
|
|
646
|
+
function Op(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ja=Mp(c,b.aa,null);var e=!1,f=Mn(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(dc),h=void 0,k=b.ja.contentType==jc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
647
647
|
l}}var n;m=Mn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Mn(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
|
|
648
648
|
10)));m=Mn(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var y=t(q),x=y.next();!x.done;x=y.next()){var w=x.value,D=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(x="CC"+p,2==q.length?p+=2:p++,D=w);v.set(x,Q(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
649
649
|
1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,Q(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Mn(c,"ContentProtection");var B=fo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Q(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Mn(c,"Label"))&&l.length&&
|
|
650
650
|
(l=l[0],l.textContent&&(G=l.textContent));l=Mn(c,"Representation");c=l.map(function(E){if(E=Qp(a,b,B,h,A,G,e,g,v,E))E.hdr=E.hdr||n;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ja.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ja.contentType||"application"==b.ja.contentType)for(b.ja.contentType=Rp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ja.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
651
|
-
m.value,p=t(B.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(
|
|
652
|
-
function Qp(a,b,c,d,e,f,g,h,k,l){b.H=Mp(l,b.ja,null);a.u=Math.min(a.u,b.H.xb);if(!Sp(b.H))return null;var m=b.W.start;b.bandwidth=Un(l,"bandwidth",Zn)||0;var n=b.H.contentType,p=n==
|
|
651
|
+
m.value,p=t(B.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(dc);return{id:b.ja.id||"__fake__"+a.G++,contentType:b.ja.contentType,language:A,$g:e,streams:c,drmInfos:B.drmInfos,fe:f,Zf:k}}
|
|
652
|
+
function Qp(a,b,c,d,e,f,g,h,k,l){b.H=Mp(l,b.ja,null);a.u=Math.min(a.u,b.H.xb);if(!Sp(b.H))return null;var m=b.W.start;b.bandwidth=Un(l,"bandwidth",Zn)||0;var n=b.H.contentType,p=n==jc||"application"==n;n="image"==n;try{var q=function(H,J,I){return Tp(a,H,J,I)};if(b.H.tc)var v=Ho(b,q);else if(b.H.$a)v=No(b,a.l);else if(b.H.uc)v=So(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.H.wa,x=b.W.duration||0;v={zb:function(){return Promise.resolve(Wi(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
|
|
653
653
|
throw H;}q=Mn(l,"ContentProtection");q=io(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;Mn(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=Mn(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
654
|
-
(B=l.getAttribute("value")),!B))return null;var A;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var G=b.H.id?b.aa.id+","+b.H.id:"",E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,J,I;return K(function(L){if(1==L.g){J=(H=G&&b.
|
|
654
|
+
(B=l.getAttribute("value")),!B))return null;var A;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var G=b.H.id?b.aa.id+","+b.H.id:"",E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,J,I;return K(function(L){if(1==L.g){J=(H=G&&b.Wa&&a.l[G])?a.l[G]:E;if(J.segmentIndex)return L.A(0);I=J;return u(L,v.zb(),3)}I.segmentIndex=L.h;z(L)})},closeSegmentIndex:function(){E.segmentIndex&&
|
|
655
655
|
(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ja.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Uc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:w,closedCaptions:k,
|
|
656
|
-
hdr:A,tilesLayout:B,matchedStreams:[]};G&&b.
|
|
656
|
+
hdr:A,tilesLayout:B,matchedStreams:[]};G&&b.Wa&&!a.l[G]&&(a.l[G]=E);return E}function Ep(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Fp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Gp(a,b);z(d)}})}function Gp(a,b){0>a.F||a.D.R(Math.max(3,a.F-b,Qa(a.I)))}
|
|
657
657
|
function Mp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Uc:null,audioSamplingRate:null,xb:0};c=c||b.wa;var d=Mn(a,"BaseURL"),e=d.map(Sn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Un(a,"frameRate",bo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Mn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
|
|
658
|
-
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Mn(a,"AudioChannelConfiguration");m=Up(m)||b.Uc;p=Un(a,"audioSamplingRate",$n)||b.audioSamplingRate;f||(f=Rp(g,h));var q=Ln(a,"SegmentBase"),v=Ln(a,"SegmentTemplate"),y=q?Un(q,"availabilityTimeOffset",ao)||0:0,x=v?Un(v,"availabilityTimeOffset",ao)||0:0;d=d&&d.length?Un(d[0],"availabilityTimeOffset",ao)||0:0;d=b.xb+d+y+x;return{wa:
|
|
658
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Mn(a,"AudioChannelConfiguration");m=Up(m)||b.Uc;p=Un(a,"audioSamplingRate",$n)||b.audioSamplingRate;f||(f=Rp(g,h));var q=Ln(a,"SegmentBase"),v=Ln(a,"SegmentTemplate"),y=q?Un(q,"availabilityTimeOffset",ao)||0:0,x=v?Un(v,"availabilityTimeOffset",ao)||0:0;d=d&&d.length?Un(d[0],"availabilityTimeOffset",ao)||0:0;d=b.xb+d+y+x;return{wa:ec(c,e),tc:q||b.tc,$a:Ln(a,"SegmentList")||b.$a,uc:v||b.uc,width:Un(a,"width",$n)||b.width,height:Un(a,
|
|
659
659
|
"height",$n)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Uc:m,audioSamplingRate:p,xb:d}}
|
|
660
660
|
function Up(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
661
|
-
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 Sp(a){var b=a.tc?1:0;b+=a
|
|
662
|
-
function Vp(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=
|
|
661
|
+
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 Sp(a){var b=a.tc?1:0;b+=a.$a?1:0;b+=a.uc?1:0;if(0==b)return a.contentType==jc||"application"==a.contentType?!0:!1;1!=b&&(a.tc&&(a.$a=null),a.uc=null);return!0}
|
|
662
|
+
function Vp(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=ec(b,[c]),f=ef(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),$e(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Bc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
663
663
|
function Kp(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("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.A(4);break}h=g.value;C(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.A(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.A(8);
|
|
664
664
|
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":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return u(n,Vp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Vp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
|
|
665
665
|
case 9:va(n,3);break;case 5:F(n);case 3:g=f.next();n.A(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
|
|
666
666
|
function Np(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Un(d,"timescale",$n)||1;d=t(Mn(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Un(k,"presentationTime",$n)||0,m=Un(k,"duration",$n)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
|
|
667
|
-
function Tp(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=lj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),$e(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Rp(a,b){return cd(Xc(a,b))?
|
|
668
|
-
Xp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Yp(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function Zp(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function $p(a,b){this.name=a;this.value=b};function aq(a,b){return a.filter(function(c){return c.name==b})}function bq(a,b){return a.filter(function(c){return Yp(c,"TYPE")==b})}function cq(a,b){var c=aq(a,b);return c.length?c[0]:null}function dq(a){var b=0;b=void 0===b?0:b;return(a=cq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function eq(a,b){return
|
|
669
|
-
function kq(a,b,c){b=
|
|
667
|
+
function Tp(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=lj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),$e(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Rp(a,b){return cd(Xc(a,b))?jc:a.split("/")[0]}M("shaka.dash.DashParser",Dp);pg.mpd=function(){return new Dp};ng["application/dash+xml"]=function(){return new Dp};ng["video/vnd.mpeg.dash.mpd"]=function(){return new Dp};function Wp(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Xp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Xp.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
|
|
668
|
+
Xp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Yp(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function Zp(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function $p(a,b){this.name=a;this.value=b};function aq(a,b){return a.filter(function(c){return c.name==b})}function bq(a,b){return a.filter(function(c){return Yp(c,"TYPE")==b})}function cq(a,b){var c=aq(a,b);return c.length?c[0]:null}function dq(a){var b=0;b=void 0===b?0:b;return(a=cq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function eq(a,b){return ec([a],[b])[0]};function fq(a){this.h=a;this.g=0}function gq(a){hq(a,/[ \t]+/gm)}function hq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function iq(a){return a.g==a.h.length?null:(a=hq(a,/[^ \t\n]*/gm))?a[0]:null};function jq(){this.g=0}
|
|
669
|
+
function kq(a,b,c){b=Bc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=lq(a,g),--a.g,mq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=lq(a,h);if(nq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
|
|
670
670
|
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=lq(a,m),mq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=eq(d,m.trim()),h&&g.push(h),e.push(new Zp(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Zp("",g,k)));return new Wp(c,b,f,e)}f.push(h);
|
|
671
671
|
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new $p("URI",k)),e=!0)}}return new Wp(c,b,f)}function lq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new fq(f);var h;(h=hq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=hq(f,k);)d.push(new $p(h[1],h[2]||h[3])),gq(f)}return new Xp(c,e,d,g)}
|
|
672
672
|
var mq="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".split(" "),nq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function oq(){}function pq(a){try{var b=qq(a);return Qe({uri:a,Ce:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Oe(c)}}function qq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(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=Nc(a):e=Ic(a);return{data:e,contentType:c}}
|
|
673
|
-
M("shaka.net.DataUriPlugin",oq);oq.parse=pq;bf("data",pq);function rq(){var a=this;this.h=this.j=null;this.
|
|
674
|
-
r.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,uq(c,a),2);if(3!=f.g)return d=f.h,c.L=d.uri,u(f,vq(c,d.data,a),3);e=c.
|
|
673
|
+
M("shaka.net.DataUriPlugin",oq);oq.parse=pq;bf("data",pq);function rq(){var a=this;this.h=this.j=null;this.La=1;this.o=new Map;this.u=new Map;this.ua=new Set;this.g=new Map;this.i=null;this.L="";this.ca=new jq;this.ia=0;this.T=!1;this.M=null;this.B=new O(function(){sq(a)});this.m=tq;this.G=null;this.ea=0;this.F=Infinity;this.Y=this.ha=0;this.D=new Ze;this.O=[];this.I=new Map;this.s=new Map;this.da=new Map;this.l=!1}r=rq.prototype;r.configure=function(a){this.h=a};
|
|
674
|
+
r.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,uq(c,a),2);if(3!=f.g)return d=f.h,c.L=d.uri,u(f,vq(c,d.data,a),3);e=c.ia;0<e&&c.B.R(e);return f["return"](c.G)})};r.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.h=this.j=null;this.ua.clear();this.G=null;this.g.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
675
675
|
r.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.m==tq)return e["return"]();b=[];c=Array.from(a.g.values());return c.length?u(e,wq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(wq(a,c[d]));return u(e,Promise.all(b),0)})};
|
|
676
|
-
function wq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return K(function(y){if(1==y.g)return c=xq,d=b.Te,e=new Nb(d),a.l&&b.Ye&&Qb(e,new Sb("_HLS_skip=YES")),u(y,uq(a,e.toString()),2);f=y.h;g=kq(a.
|
|
676
|
+
function wq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return K(function(y){if(1==y.g)return c=xq,d=b.Te,e=new Nb(d),a.l&&b.Ye&&Qb(e,new Sb("_HLS_skip=YES")),u(y,uq(a,e.toString()),2);f=y.h;g=kq(a.ca,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=aq(g.g,"EXT-X-DEFINE");k=yq(a,h);l=b.stream;m=zq(a,g,l.type,b.lc,k);l.segmentIndex.Fb(m,a.i.Pa());m.length&&(n=dq(g.g),p=b.lc.get(n),l.segmentIndex.cb(p));q=m[m.length-1];if(v=cq(g.g,"EXT-X-ENDLIST"))Aq(a,c.Se),a.i.Ia(q.endTime);z(y)})}
|
|
677
677
|
r.onExpirationUpdated=function(){};
|
|
678
678
|
function Bq(a){if(!a.T){for(var b=-1,c=new Map,d=t(a.g.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.J[0]||null))for(var g=t(e.lc),h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.M=b;b=t(a.g.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.M-c.get(d),e.J.splice(0,f),(e=e.J[0]||null)&&Cq(d,-e.startTime);a.T=!0}}}
|
|
679
679
|
function Dq(a){if(!a.T){for(var b=Infinity,c=t(a.g.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.J[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){c=t(a.g.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;null!=e&&(e=e.J[0]||null,null==e.g?Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.bd,"Expect AV sync issues!"):Cq(d,e.g-b-e.startTime))}a.T=!0}}}
|
|
680
680
|
function Cq(a,b){a.stream.segmentIndex.offset(b);a.Hd+=b;for(var c=t(a.lc),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.lc.set(d,e+b)}}
|
|
681
|
-
function vq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P,S,Y,ea,
|
|
681
|
+
function vq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P,S,Y,ea,ta,Ca,Da,Ga,Ha,Fc,Tb,pd,qd,rb,rd,Gc,Hc;return K(function(Ra){switch(Ra.g){case 1:d=kq(a.ca,b,a.L);e=aq(d.g,"EXT-X-DEFINE");Eq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.h.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],J=ad(G),I=new Map,u(Ra,Fq(a,d,c,c,J,H,"",!0,"Media Playlist",null,I,null,!1,!1,E),8);k=aq(d.g,"EXT-X-MEDIA");l=aq(d.g,"EXT-X-STREAM-INF");m=aq(d.g,"EXT-X-IMAGE-STREAM-INF");Gq(a,l);n=
|
|
682
682
|
aq(d.g,"EXT-X-SESSION-DATA");p=t(n);for(q=p.next();!q.done;q=p.next())if(v=q.value,y=Z(v,"DATA-ID"),x=Z(v,"URI"),w=Z(v,"LANGUAGE"),D=Z(v,"VALUE"),B=(new Map).set("id",y),x&&B.set("uri",eq(a.L,x)),w&&B.set("language",w),D&&B.set("value",D),A=new R("sessiondata",B),a.j)a.j.onEvent(A);return u(Ra,Hq(a,k),4);case 4:return Iq(a,k),u(Ra,Jq(a,l),5);case 5:return f=Ra.h,u(Ra,Kq(a,k),6);case 6:return g=Ra.h,u(Ra,Lq(a,m),7);case 7:h=Ra.h;Ra.A(3);break;case 8:L=Ra.h,a.g.set(c,L),f.push({id:0,language:"und",
|
|
683
|
-
disabledUntilTime:0,primary:!0,audio:"audio"==H?L.stream:null,video:"video"==H?L.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new N(2,7,7001);a.h.hls.ignoreManifestProgramDateTime?Bq(a):Dq(a);
|
|
684
|
-
a.
|
|
685
|
-
Gf.createSegmentIndex(),0)})})),9);case 9:
|
|
686
|
-
function yq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}function Gq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=Nq(a,e);if(g){var h=
|
|
683
|
+
disabledUntilTime:0,primary:!0,audio:"audio"==H?L.stream:null,video:"video"==H?L.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new N(2,7,7001);a.h.hls.ignoreManifestProgramDateTime?Bq(a):Dq(a);P=Infinity;S=t(a.g.values());for(Y=S.next();!Y.done;Y=S.next())ea=Y.value,"text"!=ea.stream.type&&(P=Math.min(P,ea.Hd));a.m!=tq?(a.i=new T(0,a.h.defaultPresentationDelay?a.h.defaultPresentationDelay:a.Y?a.Y:3*a.ea),a.i.vc(!1)):(a.i=new T(null,0),
|
|
684
|
+
a.i.vc(!0));if(a.m!=tq)a.ia=a.F,ta=xq,a.m==ta.Re&&(Ca=a.i.Zc,isNaN(a.h.availabilityWindowOverride)||(Ca=a.h.availabilityWindowOverride),a.i.ce(Ca));else for(a.i.Ia(P),Da=t(a.g.values()),Y=Da.next();!Y.done;Y=Da.next())Ga=Y.value,Ga.stream.segmentIndex.Xa(0,P);a.O=[];Ha=[];Fc=t(f);for(Tb=Fc.next();!Tb.done;Tb=Fc.next())for(pd=Tb.value,qd=t([pd.video,pd.audio]),rb=qd.next();!rb.done;rb=qd.next())(rd=rb.value)&&Ha.push(rd);return u(Ra,Promise.all(Ha.map(function(Gf){return K(function(Hf){return u(Hf,
|
|
685
|
+
Gf.createSegmentIndex(),0)})})),9);case 9:Gc=t(Ha);for(rb=Gc.next();!rb.done;rb=Gc.next())Hc=rb.value,a.O.push(Hc.segmentIndex.J);Mq(a);a.i.Fd();a.G={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.G);z(Ra)}})}function Eq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}
|
|
686
|
+
function yq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}function Gq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=Nq(a,e);if(g){var h=hc(jc,e);a.s.set(g,h);eb(e,h)}f&&(g=gc("audio",e),a.s.set(f,g));d&&(f=gc("video",e),a.s.set(d,f))}}
|
|
687
687
|
function Kq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return c=bq(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return K(function(B){if(1==B.g){if(x=a.h.disableText)return B["return"](null);C(B,2);return u(B,Oq(a,y),4)}if(2!=B.g)return w=B.h,B["return"](w.stream);D=F(B);if(a.h.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Yp(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
|
|
688
688
|
t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
|
|
689
689
|
function Lq(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.h.disableThumbnails)return l["return"](null);C(l,2);return u(l,Pq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.h.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
|
|
690
690
|
function Hq(a,b){var c;return K(function(d){b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f});c=b.map(function(e){return Oq(a,e)});return u(d,Promise.all(c),0)})}
|
|
691
|
-
function Jq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(Yp(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,Qq(a,g),2);
|
|
692
|
-
|
|
693
|
-
!!J&&J.primary,audio:E,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(E),a.
|
|
694
|
-
function Qq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g)return c=
|
|
695
|
-
|
|
691
|
+
function Jq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(Yp(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,Qq(a,g),2);v=y.h;for(var x=y["return"],w=v.audio,D=v.video,B=t(D),A=B.next();!A.done;A=B.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||void 0,
|
|
692
|
+
A.frameRate=Number(h)||void 0,A.hdr=q||void 0;B=a.h.disableAudio;if(!w.length||B)w=[null];B=a.h.disableVideo;if(!D.length||B)D=[null];B=[];w=t(w);for(A=w.next();!A.done;A=w.next()){A=A.value;for(var G=t(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=A?A.stream:null;var J=H?H.stream:null,I=A?A.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.bd:"")+" - "+(A?A.bd:"");E&&J&&I.length&&L.length&&!(0<jg(I,L).length)||a.ua.has(H)||(E={id:a.La++,language:E?E.language:"und",primary:!!E&&E.primary||
|
|
693
|
+
!!J&&J.primary,audio:E,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(E),a.ua.add(H))}}return x.call(y,B)})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(bc,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
694
|
+
function Qq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g)return c=kc,d=Nq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Yp(b,"URI"),p=k.audio.find(function(w){return w&&w.bd==n}),q=hc(c.va,d),(v=hc(c.bb,d))&&!q?l=c.bb:!h.length&&v&&q?(l=c.va,d=[[q,v].join()]):k.audio.length&&p?(l=c.bb,m=!0):l=k.video.length?c.bb:c.va,m?x.A(2):u(x,Rq(a,b,d,l),3);2!=x.g&&(y=x.h,k[y.stream.type]=[y]);Sq(k);return x["return"](k)})}
|
|
695
|
+
function Nq(a,b){var c=[];a.h.disableVideo||c.push(a.h.hls.defaultVideoCodec);a.h.disableAudio||c.push(a.h.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=$c(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Tq(a){a=Z(a,"LANGUAGE")||"und";return Q(a)}
|
|
696
696
|
function Sq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Iq(a,b){var c=bq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Tq(e);var f=Yp(e,"GROUP-ID");e=Yp(e,"INSTREAM-ID");a.I.get(f)||a.I.set(f,new Map);a.I.get(f).set(e,d)}}
|
|
697
|
-
function Oq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g){c=Yp(b,"GROUP-ID");d="";var w=Yp(b,"TYPE").toLowerCase();"subtitles"==w&&(w=
|
|
698
|
-
v="YES"==q;return u(x,Vq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(
|
|
699
|
-
function Pq(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(p){if(1==p.g){c=Uq(Yp(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return p["return"](a.g.get(c));e=Tq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Vq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(
|
|
700
|
-
Number(
|
|
701
|
-
function
|
|
702
|
-
function
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
spatialAudio:q,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return Hc["return"]({stream:Hf,bd:c,Te:d,Hd:Gc,lc:Da,Ye:Gf})})}
|
|
697
|
+
function Oq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g){c=Yp(b,"GROUP-ID");d="";var w=Yp(b,"TYPE").toLowerCase();"subtitles"==w&&(w=jc);e=w;e!=jc&&c&&a.s.has(c)&&(d=a.s.get(c));f=Uq(Yp(b,"URI"),a.o);if(a.g.has(f))return x["return"](a.g.get(f));g=Tq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
|
|
698
|
+
v="YES"==q;return u(x,Vq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(a.g.has(f))return x["return"](a.g.get(f));a.g.set(f,y);return x["return"](y)})}
|
|
699
|
+
function Pq(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(p){if(1==p.g){c=Uq(Yp(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return p["return"](a.g.get(c));e=Tq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Vq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(a.g.has(c))return p["return"](a.g.get(c));if(k=Z(b,"RESOLUTION"))if(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])*Number(m.split("x")[1]);
|
|
700
|
+
if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.g.set(c,h);return p["return"](h)})}function Rq(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=Uq(Yp(b,"URI"),a.o);if(a.g.has(e))return k["return"](a.g.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.I.get(l):null;g=gc(d,c);return u(k,Vq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
|
|
701
|
+
function Vq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v;return K(function(y){if(1==y.g)return p=eq(a.L,b),u(y,uq(a,p),2);q=y.h;p=q.uri;v=kq(a.ca,q.data,p);return y["return"](Fq(a,v,b,p,c,d,e,f,g,h,k,l,m,n))})}
|
|
702
|
+
function Fq(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){var y,x,w,D,B,A,G,E,H,J,I,L,P,S,Y,ea,ta,Ca,Da,Ga,Ha,Fc,Tb,pd,qd,rb,rd,Gc,Hc,Ra,Gf,Hf,fn;return K(function(td){if(1==td.g){if(1!=b.type)throw new N(2,4,4017);y=aq(b.g,"EXT-X-DEFINE");x=yq(a,y);Wq(a,b);return v?td.A(2):u(td,Xq(a,f,e,b,x),3)}2!=td.g&&(v=td.h);w=[];if(b.segments)for(D=t(b.segments),B=D.next();!B.done;B=D.next())A=B.value,G=aq(A.g,"EXT-X-KEY"),w.push.apply(w,ia(G));H=E=!1;J=[];I=new Set;L=t(w);for(P=L.next();!P.done;P=L.next())if(S=P.value,Y=
|
|
703
|
+
Yp(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(ea=Yp(S,"KEYFORMAT"),Ca=(ta=Yq[ea])?ta(S,v):null){if(Ca.keyIds)for(Da=t(Ca.keyIds),Ga=Da.next();!Ga.done;Ga=Da.next())Ha=Ga.value,I.add(Ha);J.push(Ca)}if(E&&!J.length&&!H)throw new N(2,4,4026);xi.includes(v)&&(e="");Fc=new Map;Tb=zq(a,b,f,Fc,x);pd=Tb[Tb.length-1].endTime;qd=new Ui(Tb);rb=f==jc?"subtitle":void 0;rd=[];if(n)for(Gc=t(n.split(",")),Hc=Gc.next();!Hc.done;Hc=Gc.next())Ra=Hc.value,rd.push(Ra);Hf=(Gf=cq(b.g,"EXT-X-SERVER-CONTROL"))?
|
|
704
|
+
null!=Gf.getAttribute("CAN-SKIP-UNTIL"):!1;fn={id:a.La++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:qd,mimeType:v,codecs:e,kind:rb,encrypted:E,drmInfos:J,keyIds:I,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:rd,forced:p,channelsCount:l,audioSamplingRate:null,spatialAudio:q,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return td["return"]({stream:fn,
|
|
705
|
+
bd:c,Te:d,Hd:pd,lc:Fc,Ye:Hf})})}
|
|
707
706
|
function Zq(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Oc(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=dq(c.g);b=eq(c.h,Yp(b,"URI"));var g=ef([b],a.h.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l;return K(function(m){if(1==m.g)return u(m,$q(a,g,6),2);if(3!=m.g){k=
|
|
708
707
|
m.h;if(!k.data||16!=k.data.byteLength)throw new N(2,4,4044);l=h;return u(m,window.crypto.subtle.importKey("raw",k.data,"AES-CBC",!0,["decrypt"]),3)}l.cryptoKey=m.h;h.fetchKey=void 0;z(m)})}};return h}
|
|
709
|
-
function Wq(a,b){var c=cq(b.g,"EXT-X-PLAYLIST-TYPE"),d=cq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Aq(a,tq);else{c?Aq(a,ar):Aq(a,br);d=cq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=cq(b.g,"EXT-X-PART-INF");a.l&&c?(a.
|
|
710
|
-
function cr(a,b,c,d){c=cq(c,"EXT-X-MAP");if(!c)return null;var e=Yp(c,"URI");d=Uq(eq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.
|
|
708
|
+
function Wq(a,b){var c=cq(b.g,"EXT-X-PLAYLIST-TYPE"),d=cq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Aq(a,tq);else{c?Aq(a,ar):Aq(a,br);d=cq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=cq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ha=Number(Yp(c,"PART-TARGET")),a.F=Math.min(a.ha,a.F),c=cq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(Yp(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ea=Math.max(d,a.ea)}}
|
|
709
|
+
function cr(a,b,c,d){c=cq(c,"EXT-X-MAP");if(!c)return null;var e=Yp(c,"URI");d=Uq(eq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=dr(d,c),a.da.set(b,c));return a.da.get(b)}function dr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Qh(function(){return[a]},c,d)}
|
|
711
710
|
function er(a,b,c,d,e,f,g,h,k){var l=d.g,m=Uq(d.i,f),n=cq(l,"EXTINF"),p=f=0,q=null;d.h.length&&!a.l&&Va("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.h.hls.ignoreManifestProgramDateTime){var y=cq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=Vn(y.value))}y=Th;cq(l,"EXT-X-GAP")&&(y=2);if(!n){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
|
|
712
|
-
if(!a.l)return null}var x=[];if(a.l)for(var w={},D=0;D<d.h.length;w={ld:w.ld},D++){var B=d.h[D],A=0==D?c:x[x.length-1],G=0==D?e:A.endTime,E=Number(Z(B,"DURATION"))||a.
|
|
711
|
+
if(!a.l)return null}var x=[];if(a.l)for(var w={},D=0;D<d.h.length;w={ld:w.ld},D++){var B=d.h[D],A=0==D?c:x[x.length-1],G=0==D?e:A.endTime,E=Number(Z(B,"DURATION"))||a.ha;if(E){E=G+E;var H=0,J=null;"EXT-X-PRELOAD-HINT"==B.name?H=(H=Z(B,"BYTERANGE-START"))?Number(H):0:(H=Z(B,"BYTERANGE"),J=t(fr(A,H)),H=J.next().value,J=J.next().value);if(A=Z(B,"URI"))w.ld=eq(g,A),A=Th,"YES"==Z(B,"GAP")&&(A=2),x.push(new Sh(G,E,function(I){return function(){return[I.ld]}}(w),H,J,b,0,0,Infinity,[],"",null,null,A))}}n?
|
|
713
712
|
f=e+Number(n.value.split(",")[0]):f=x[x.length-1].endTime;(a=cq(l,"EXT-X-BYTERANGE"))?(q=t(fr(c,a.value)),p=q.next().value,q=q.next().value):x.length&&(p=x[0].Ba,q=x[x.length-1].la);c="";a=null;"image"==h&&(c="1x1",h=cq(l,"EXT-X-TILES"))&&(c=Yp(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new Sh(e,f,function(){return m.length?[m]:[]},p,q,b,0,0,Infinity,x,c,a,v,y,k)}function fr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.la+1,d=c+d-1);return[c,d]}
|
|
714
713
|
function Mq(a){if(a.i){for(var b=t(a.O),c=b.next();!c.done;c=b.next())a.i.Gb(c.value);a.O=[]}}
|
|
715
714
|
function zq(a,b,c,d,e){var f=b.segments,g=void 0,h=dq(b.g),k=cq(b.g,"EXT-X-SKIP");k=k?Number(Z(k,"SKIPPED-SEGMENTS")):0;var l=h+k,m=0;a.m!=tq&&d.has(l)&&(m=d.get(l));for(var n=[],p=null,q=0;q<f.length;q++){var v=f[q],y=0==q?m:p.endTime;l=h+k+q;var x=t(v.g);for(var w=x.next();!w.done;w=x.next())w=w.value,"EXT-X-KEY"==w.name&&"AES-128"==Yp(w,"METHOD")&&(g=Zq(a,w,b));d.set(l,y);x=cr(a,b.h,v.g,e);!a.l&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());(p=v=er(a,x,p,v,
|
|
716
|
-
y,e,b.h,c,g))&&(a.h.hls.ignoreManifestProgramDateTime&&null!=a.M&&l<a.M||n.push(v))}if(a=n.some(function(D){return null!=D.g}))for(b={},c=0;c<n.length;b={Pb:b.Pb,Ob:b.Ob,xc:b.xc,
|
|
717
|
-
D.Nb;--D.xc}return null}}(b);null==b.
|
|
718
|
-
function Xq(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){if(1==w.g){f=
|
|
719
|
-
if(!y){if(b==f.X)return w["return"]("text/vtt");x=n.mp4;return w["return"](x)}return w["return"](y.split(";")[0])})}function uq(a,b){var c=ef([b],a.h.retryParameters);a.j.modifyManifestRequest(c,{format:"h"});return $q(a,c,0)}function sq(a){var b,c;K(function(d){if(1==d.g){if(!a.j)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.
|
|
715
|
+
y,e,b.h,c,g))&&(a.h.hls.ignoreManifestProgramDateTime&&null!=a.M&&l<a.M||n.push(v))}if(a=n.some(function(D){return null!=D.g}))for(b={},c=0;c<n.length;b={Pb:b.Pb,Ob:b.Ob,xc:b.xc,Ta:b.Ta,Nb:b.Nb},c++)if(b.Ta=n[c],null==b.Ta.g)for(b.Ob=0,b.Pb=c,d=function(D){return function(){var B=n[D.Pb];if(B){if(null!=B.g)return B.g+D.Ob;D.Ob-=B.endTime-B.startTime;D.Pb+=1}return null}}(b),b.Nb=0,b.xc=c,e=function(D){return function(){var B=n[D.xc];if(B){B!=D.Ta&&(D.Nb+=B.endTime-B.startTime);if(null!=B.g)return B.g+
|
|
716
|
+
D.Nb;--D.xc}return null}}(b);null==b.Ta.g;)b.Ta.g=e(),null==b.Ta.g&&(b.Ta.g=d());if(a)for(a=t(n),b=a.next();!b.done;b=a.next())for(c=b.value,b=c.g,c=t(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return n}function Uq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
|
|
717
|
+
function Xq(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){if(1==w.g){f=kc;g=lf;h=Math.trunc((d.segments.length-1)/2);k=Uq(d.segments[h].i,e);l=new Nb(k);m=l.ta.split(".").pop();n=gr[b];if(p=n[m])return w["return"](p);if(b==f.X){if("vtt"==c||"wvtt"==c)return w["return"]("text/vtt");if(c&&""!==c)return w["return"]("application/mp4")}if(b==f.Ub&&(!c||"jpeg"==c))return w["return"]("image/jpeg");q=ef([k],a.h.retryParameters);q.method="HEAD";return u(w,$q(a,q,g),2)}v=w.h;y=v.headers["content-type"];
|
|
718
|
+
if(!y){if(b==f.X)return w["return"]("text/vtt");x=n.mp4;return w["return"](x)}return w["return"](y.split(";")[0])})}function uq(a,b){var c=ef([b],a.h.retryParameters);a.j.modifyManifestRequest(c,{format:"h"});return $q(a,c,0)}function sq(a){var b,c;K(function(d){if(1==d.g){if(!a.j)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ia,a.B.R(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.B.R(.1);z(d)})}
|
|
720
719
|
function Aq(a,b){a.m=b;a.i&&a.i.vc(a.m==tq);a.m!=tq||a.B.stop()}function $q(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);$e(a.D,b);return b.promise}M("shaka.hls.HlsParser",rq);
|
|
721
720
|
var gr={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",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},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"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"},
|
|
722
|
-
image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Yq={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return
|
|
723
|
-
|
|
724
|
-
Re:ar};
|
|
721
|
+
image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Yq={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return fc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Yp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Yp(a,"URI");b=qq(b);b=Fb(b.data);b=
|
|
722
|
+
fc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Yp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Yp(a,"URI");a=qq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Kn(a,b,new Set,0);return fc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},tq="VOD",br="EVENT",ar="LIVE",xq={Se:tq,yg:br,
|
|
723
|
+
Re:ar};sc("Tizen 3")||sc("Tizen 2")||uc()||(pg.m3u8=function(){return new rq},ng["application/x-mpegurl"]=function(){return new rq},ng["application/vnd.apple.mpegurl"]=function(){return new rq});function hr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Ce:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ec(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function ir(){}function jr(a,b,c,d,e){var f=new kr;vf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new lr,h={le:!1,Oe:!1};a=mr(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 Ne(a,function(){h.le=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Oe=!0;g.abort()});k.R(b/1E3);a["finally"](function(){k.stop()})}return a}
|
|
725
724
|
function mr(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,B;return K(function(A){switch(A.g){case 1:return h=nr,k=or,p=n=0,q=Date.now(),C(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(pr(l.headers)),v=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=function(G){function E(){var H,J;return K(function(I){switch(I.g){case 1:return C(I,2),u(I,v.read(),4);case 4:H=I.h;va(I,3);break;case 2:return F(I),I["return"]();case 3:if(H.done){I.A(5);break}n+=H.value.byteLength;if(!g){I.A(5);
|
|
726
725
|
break}return u(I,g(H.value),5);case 5:J=Date.now();if(100<J-q||H.done)e(J-q,n-p,x-n),p=n,q=J;H.done?G.close():(G.enqueue(H.value),E());z(I)}})}E()},new k({start:w}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=F(A);if(d.le)throw new N(1,1,7001,a,b);if(d.Oe)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return B=pr(l.headers),A["return"](hr(B,m,l.status,a,l.url,b))}})}function pr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
727
726
|
function qr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",ir);ir.isSupported=qr;ir.parse=jr;var nr=window.fetch,lr=window.AbortController,or=window.ReadableStream,kr=window.Headers;qr()&&(bf("http",jr,2,!0),bf("https",jr,2,!0),bf("blob",jr,2,!0));function rr(){}
|
|
@@ -729,7 +728,7 @@ function sr(a,b,c,d,e){var f=new tr,g=Date.now(),h=0,k=new Promise(function(l,m)
|
|
|
729
728
|
c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Ne(k,function(){f.abort();return Promise.resolve()})}
|
|
730
729
|
function ur(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}M("shaka.net.HttpXHRPlugin",rr);rr.parse=sr;var tr=window.XMLHttpRequest;bf("http",sr,1,!0);bf("https",sr,1,!0);bf("blob",sr,1,!0);function vr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function wr(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.la}function xr(a,b){return lj(a.g.ya(),a.g.Ba,a.g.la,b.streaming.retryParameters)};function yr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function zr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}yr.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 Ar(a){var b=this;this.o=a;this.j=new Map;this.i=new mf(function(){return Br(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new yr}Ar.prototype.destroy=function(){return this.i.destroy()};function Cr(a,b,c){a.m=b;a.l=c}function Br(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
731
730
|
function Dr(a,b,c,d,e,f){nf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return u(v,Er(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new Jn(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function Fr(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
|
|
732
|
-
function Er(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=lf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g["return"](f.data)})};function Gr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new
|
|
731
|
+
function Er(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=lf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g["return"](f.data)})};function Gr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Gr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);z(b)})};
|
|
733
732
|
function Hr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}Gr.prototype.store=function(){return this.h};Gr.prototype.promise=function(){return this.g};function Ir(a){this.h=a;this.g=[]}Ir.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Jr(a,b){return Kr(a,b,"readwrite")}function Kr(a,b,c){c=a.h.transaction([b],c);var d=new Gr(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function Lr(a,b,c){this.h=new Ir(a);this.i=b;this.g=c}r=Lr.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Mr(this.i)};r.removeSegments=function(a,b){return Nr(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Or(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.me(e)}))})};r.addManifests=function(){return Mr(this.g)};
|
|
734
733
|
r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function Pr(a,b,c){a=Jr(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Jr(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Nr(this,this.g,a,b)};
|
|
735
734
|
r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Or(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.bc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Kr(a.h,a.g,"readonly"),c=new Map,u(d,Hr(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.bc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.me=function(a){return a};r.bc=function(a){return Promise.resolve(a)};
|
|
@@ -739,7 +738,7 @@ function Or(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Kr(a.h,b,
|
|
|
739
738
|
Qr.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Jr(b.g,"session-ids"),u(d,Hr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Rr(){this.g=new Map}Rr.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)};Rr.prototype.init=function(){var a=this;Sr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});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)};
|
|
740
739
|
function Tr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Aa:d,ka:f},ka:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Ur(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,ka:f},e)})})}
|
|
741
740
|
function Vr(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function Wr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Xr(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
742
|
-
function Yr(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Sr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Zr(a,b){Sr.set(a,b)}M("shaka.offline.StorageMuxer",Rr);Rr.unregister=function(a){Sr["delete"](a)};Rr.register=Zr;Rr.prototype.destroy=Rr.prototype.destroy;var Sr=new Map;function $r(){Lr.apply(this,arguments)}pa($r,Lr);$r.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Jr(c.h,c.g);e=d.store();f=new
|
|
741
|
+
function Yr(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Sr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Zr(a,b){Sr.set(a,b)}M("shaka.offline.StorageMuxer",Rr);Rr.unregister=function(a){Sr["delete"](a)};Rr.register=Zr;Rr.prototype.destroy=Rr.prototype.destroy;var Sr=new Map;function $r(){Lr.apply(this,arguments)}pa($r,Lr);$r.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Jr(c.h,c.g);e=d.store();f=new lc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
|
|
743
742
|
$r.prototype.bc=function(a){var b,c,d,e,f,g;return K(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=as(a.periods[c],e),b.push(f);return u(h,ip(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})})};
|
|
744
743
|
function as(a,b){bs(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return cs(e,a.startTime,b)})}
|
|
745
744
|
function cs(a,b,c){var d=a.initSegmentUri?ds(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,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=ds(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
@@ -750,14 +749,14 @@ es.prototype.bc=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[]
|
|
|
750
749
|
a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
751
750
|
function fs(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,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,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
752
751
|
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function gs(){Lr.apply(this,arguments)}pa(gs,Lr);r=gs.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Pr(this,a,b)};r.bc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function hs(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=hs.prototype;
|
|
753
|
-
r.init=function(){var a=this,b=new
|
|
752
|
+
r.init=function(){var a=this,b=new lc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new $r(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new es(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new es(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
|
|
754
753
|
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new gs(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Qr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
|
|
755
754
|
r.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
|
|
756
755
|
r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
|
|
757
756
|
r.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,is(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
758
|
-
function is(){var a=new
|
|
757
|
+
function is(){var a=new lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}Zr("idb",function(){return sc("CrKey")||rc()||!window.indexedDB?null:new hs});function js(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}js.prototype.Aa=function(){return this.i};js.prototype.ka=function(){return this.h};js.prototype.key=function(){return this.l};js.prototype.toString=function(){return this.j};
|
|
759
758
|
function ks(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 js(b,c,d,Number(a[4])):null};function ls(a,b){this.h=a;this.g=b}
|
|
760
|
-
function ms(a,b){var c=new T(null,0);c.
|
|
759
|
+
function ms(a,b){var c=new T(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ns(a,d,e,c);e=b.streams.filter(function(l){return l.type==jc}).map(function(l){return os(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return os(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=
|
|
761
760
|
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}}
|
|
762
761
|
function ns(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
763
762
|
b.next())for(e=e.value,g=os(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=os(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
@@ -768,22 +767,22 @@ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){
|
|
|
768
767
|
r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new Rr,C(m,2,3),u(m,e.init(),5);case 5:return u(m,Vr(e,d.Aa(),d.ka()),6);case 6:return f=m.h,u(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.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
|
|
769
768
|
ng["application/x-offline-manifest"]=function(){return new rs};function ss(){}function ts(a){var b=ks(a);b&&"manifest"==b.g?(a={uri:a,Ce:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Qe(a)):a=b&&"segment"==b.g?us(b.key(),b):Oe(new N(2,1,9004,a));return a}
|
|
770
769
|
function us(a,b){var c=new Rr;return Qe(void 0).Z(function(){return c.init()}).Z(function(){return Vr(c,b.Aa(),b.ka())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",ss);ss.plugin=ts;bf("offline",ts);function vs(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,ws(y.info,p)){y.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=xs(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l["return"](d)}})}
|
|
771
|
-
function xs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new yf({
|
|
770
|
+
function xs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new yf({jb:b,onError:function(){},Wc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,If(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,Tf(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
|
|
772
771
|
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return C(h,2),u(h,Uf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
773
772
|
function ws(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fb(a.audioCapabilities,b.audioCapabilities,c)&&fb(a.videoCapabilities,b.videoCapabilities,c)};function ys(a,b,c){var d=b.presentationTimeline.getDuration();b=zs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function As(a,b){var c=ms(new ls(a.Aa(),a.ka()),b),d=b.appMetadata||{};c=zs(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}}
|
|
774
|
-
function zs(a){var b=[],c=ke(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(
|
|
775
|
-
case 4:b.h=null,b.g=null,z(k)}})})}function Gs(){if(
|
|
773
|
+
function zs(a){var b=[],c=ke(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(be(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ce(c.value));return b};function Bs(){this.g={}}function Cs(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 Ds(a,b){a.g[b.id]=b.bandwidth||2048}function Es(a,b){var c=a.g[b];null==c&&(c=0);return c};function Fs(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.fc()):(this.h=Ik(),this.g=new af);this.i=[];this.j=[];var c=!a;this.l=new mf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Br(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 u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),4);
|
|
774
|
+
case 4:b.h=null,b.g=null,z(k)}})})}function Gs(){if(oc())a:{var a=t(Sr.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Fs.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Fk(a,b));return Kk(this.h,a)};r.getConfiguration=function(){var a=Ik();Kk(a,this.h,Ik());return a};r.fc=function(){return this.g};
|
|
776
775
|
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Ar(this.g);this.j.push(f);b=Hs(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return u(h,mg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new Ne(b,function(){return Br(f)});b["finally"](function(){eb(d.j,f)});return Is(this,b)};
|
|
777
|
-
function Hs(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,D,B;return K(function(A){switch(A.g){case 1:return Js(),h=g=null,k=new Rr,n=m=l=null,C(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,Ks(a,b,g,e),6);case 6:p=A.h;Ls(a);q=!p.presentationTimeline.V()&&!p.presentationTimeline.
|
|
776
|
+
function Hs(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,D,B;return K(function(A){switch(A.g){case 1:return Js(),h=g=null,k=new Rr,n=m=l=null,C(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,Ks(a,b,g,e),6);case 6:p=A.h;Ls(a);q=!p.presentationTimeline.V()&&!p.presentationTimeline.ib();if(!q)throw new N(2,9,9005,b);return u(A,Ms(a,p,function(G){n=n||G},e),7);case 7:h=A.h;Ls(a);if(n)throw n;return u(A,Ns(p,e),8);case 8:return u(A,k.init(),9);case 9:return Ls(a),u(A,Tr(k),10);case 10:return l=A.h,Ls(a),v=Os(h,
|
|
778
777
|
p,b,c,e,f),y=v.Kf,x=v.ee,u(A,l.ka.addManifests([y]),11);case 11:w=A.h;Ls(a);m=w[0];Ls(a);if(n)throw n;return u(A,Ps(a,x,m,y,f,e,l.ka,p,h),12);case 12:return Ls(a),D=new js("manifest",l.path.Aa,l.path.ka,m),A["return"](As(D,y));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.A(14);break}return u(A,g.stop(),14);case 14:if(!h){A.A(16);break}return u(A,h.destroy(),16);case 16:xa(A,0);break;case 2:B=F(A);if(null==m){A.A(18);break}return u(A,Qs(m),18);case 18:throw n||B;}})}
|
|
779
|
-
function Ps(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x,w,D;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,G){var E,H,J,I,L,P,S;return K(function(Y){if(1==Y.g){E={};H=t(A);for(J=H.next();!J.done;E={
|
|
778
|
+
function Ps(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x,w,D;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,G){var E,H,J,I,L,P,S;return K(function(Y){if(1==Y.g){E={};H=t(A);for(J=H.next();!J.done;E={ab:E.ab},J=H.next())E.ab=J.value,I=xr(E.ab,f),L=E.ab.i,P=E.ab.h,S=function(ea){return function(ta){var Ca,Da,Ga;return K(function(Ha){if(1==Ha.g)return u(Ha,g.addSegments([{data:ta}]),2);Ca=Ha.h;Ls(a);Da=ea.ab.g;Ga=wr(Da);l[Ga]=Ca[0];m+=ta.byteLength;z(Ha)})}}(E),Dr(e,E.ab.groupId,I,L,P,S);return u(Y,
|
|
780
779
|
Fr(e),2)}if(!G)return Y.A(0);Ls(a);Rs(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};p=!1;C(B,2);if(!Ss(h)||!p||Ts(h)){B.A(4);break}return u(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return Ls(a),b=b.filter(function(A){return!A.h}),q=l,v=m,l={},m=0,u(B,Us(g,c,d,q,v,function(){return Ls(a)}),6);case 6:Ls(a);case 4:if(p){B.A(7);break}return u(B,n(b,!1),8);case 8:return Ls(a),y=l,x=m,l={},m=0,u(B,Us(g,c,d,y,x,function(){return Ls(a)}),9);case 9:Ls(a);case 7:va(B,0);break;case 2:return w=F(B),
|
|
781
780
|
D=Object.values(l),u(B,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function Qs(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Rr,u(f,b.init(),2);case 2:return u(f,Tr(b),3);case 3:return c=f.h,d=new js("manifest",c.path.Aa,c.path.ka,a),u(f,b.destroy(),4);case 4:return e=new Fs,u(f,e.remove(d.toString()),0)}})}
|
|
782
781
|
function Us(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w.g){case 1:g=!1;C(w,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
|
|
783
782
|
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return y=F(w),u(w,Qs(b),5);case 5:if(g){w.A(6);break}x=Object.values(d);return u(w,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
|
|
784
|
-
function Ns(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P,S,Y,ea;return K(function(
|
|
785
|
-
d.push(
|
|
786
|
-
Y.next();!G.done;G=Y.next())ea=G.value,"variant"==ea.type&&L.add(ea.id),"text"==ea.type&&P.add(ea.id),"image"==ea.type&&S.add(ea.id);a.variants=a.variants.filter(function(
|
|
783
|
+
function Ns(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,B,A,G,E,H,J,I,L,P,S,Y,ea;return K(function(ta){switch(ta.g){case 1:return c={width:Infinity,height:Infinity},Ld(a,b.restrictions,c),u(ta,Pd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;zd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(be(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
|
|
784
|
+
d.push(ce(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(de(x));return u(ta,b.offline.trackSelectionCallback(d),3);case 3:w=ta.h;D=a.presentationTimeline.getDuration();B=0;A=t(w);for(G=A.next();!G.done;G=A.next())E=G.value,H=E.bandwidth*D/8,B+=H;C(ta,4);return u(ta,b.offline.downloadSizeCallback(B),6);case 6:J=ta.h;if(!J)throw new N(2,9,9014);va(ta,5);break;case 4:I=F(ta);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:L=new Set;P=new Set;S=new Set;Y=t(w);for(G=
|
|
785
|
+
Y.next();!G.done;G=Y.next())ea=G.value,"variant"==ea.type&&L.add(ea.id),"text"==ea.type&&P.add(ea.id),"image"==ea.type&&S.add(ea.id);a.variants=a.variants.filter(function(Ca){return L.has(Ca.id)});a.textStreams=a.textStreams.filter(function(Ca){return P.has(Ca.id)});a.imageStreams=a.imageStreams.filter(function(Ca){return S.has(Ca.id)});Vs(a);z(ta)}})}
|
|
787
786
|
function Os(a,b,c,d,e,f){var g=ys(c,b,d),h=e.offline.progressCallback;Cr(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&Qf(a,"cenc",q)});var k=Ss(b)&&!Ts(b),l=null;k&&(l=Ws.get(a.g.keySystem));for(var m=new Bs,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())Ds(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Cs(m,n.value);m=Xs(f,m,b,e);f=m.streams;m=m.ee;p=a.g;n=e.offline.usePersistentLicense;
|
|
788
787
|
p&&n&&(p.initData=[]);return{Kf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ec(),streams:f,sessionIds:n?Yf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},ee:m}}function Ss(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
789
788
|
function Ts(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 Rs(a,b,c,d){b.expiration=c.ec();c=Yf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ss(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return Ys(this,Zs(this,a))};
|
|
@@ -793,10 +792,10 @@ function at(a,b,c){function d(){}var e=dt(c);As(b,c);return Promise.all([a.remov
|
|
|
793
792
|
function et(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return Js(),b=a.g,c=a.h.drm,d=new Rr,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],Wr(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,vs(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
|
|
794
793
|
r.list=function(){return Ys(this,ft())};function ft(){var a,b,c;return K(function(d){switch(d.g){case 1:return Js(),a=[],b=new Rr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Ur(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=As(new js("manifest",e.Aa,e.ka,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
|
|
795
794
|
function Ks(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},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(){}},c.configure(d.manifest),Ls(a),u(l,c.start(b,
|
|
796
|
-
g),2);if(3!=l.g)return h=l.h,Ls(a),k=gt(h),u(l,Promise.all(tf(k,function(m){return m.createSegmentIndex()})),3);Ls(a);if(e)throw e;return l["return"](h)})}function Ms(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new yf({
|
|
795
|
+
g),2);if(3!=l.g)return h=l.h,Ls(a),k=gt(h),u(l,Promise.all(tf(k,function(m){return m.createSegmentIndex()})),3);Ls(a);if(e)throw e;return l["return"](h)})}function Ms(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new yf({jb:a.g,onError:c,Wc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Df(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Tf(e),3);case 3:return u(f,Sf(e),4);case 4:return f["return"](e)}})}
|
|
797
796
|
function Xs(a,b,c,d){var e=new Map,f=gt(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=ht(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()),ee:Array.from(e.values())}}
|
|
798
797
|
function ht(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,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,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
|
|
799
|
-
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;it(d,c.presentationTimeline.
|
|
798
|
+
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;it(d,c.presentationTimeline.Pa(),function(l){var m=wr(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Es(b,d.id)*p;p=zr(a.g,p);f.set(m,new vr(l,p,k,!1))}l.i&&(n=wr(l.i),f.has(n)||(p=.5*Es(b,d.id),p=zr(a.g,p),f.set(n,new vr(l.i,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
|
|
800
799
|
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function it(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Ls(a){if(a.l.g)throw new N(2,9,7001);}function Js(){if(!Gs())throw new N(2,9,9E3);}function Ys(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);eb(a.i,b);return xa(c,0)})}
|
|
801
800
|
function Is(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function dt(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
802
801
|
function ct(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Xr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:bt(d,!1),videoCapabilities:bt(d,!0)}});return u(h,vs(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
@@ -807,24 +806,24 @@ var Ws=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("
|
|
|
807
806
|
qm.offline=Gs;function jt(){}function kt(a,b){for(var c={priority:b||0,We:a},d=0;d<lt.length;d++)if(lt[d].priority<c.priority){lt.splice(d,0,c);return}lt.push(c)}M("shaka.polyfill",jt);jt.register=kt;jt.installAll=function(){for(var a=t(lt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.We()}catch(c){Va("Error installing polyfill!",c)}}};var lt=[];function mt(){}function nt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())ot(b.value)}function ot(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)}})}jt.Aria=mt;mt.install=nt;kt(nt);function pt(){}function qt(){rt()}jt.EncryptionScheme=pt;pt.install=qt;kt(qt,-2);function st(){}
|
|
808
807
|
function tt(){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}}),
|
|
809
808
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ut);document.addEventListener("webkitfullscreenerror",ut);document.addEventListener("mozfullscreenchange",ut);document.addEventListener("mozfullscreenerror",ut);document.addEventListener("MSFullscreenChange",ut);document.addEventListener("MSFullscreenError",ut)}}
|
|
810
|
-
function ut(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)}jt.Fullscreen=st;st.install=tt;kt(tt);function vt(){}function wt(){var a=!0;if(
|
|
811
|
-
function yt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!
|
|
812
|
-
l=
|
|
813
|
-
n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);C(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}jt.MediaCapabilities=vt;vt.install=wt;var xt=null;vt.originalMcap=xt;kt(wt,-1);function zt(){}function At(){var a=
|
|
814
|
-
function Ct(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,
|
|
809
|
+
function ut(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)}jt.Fullscreen=st;st.install=tt;kt(tt);function vt(){}function wt(){var a=!0;if(vc()||sc("PlayStation 5")||wc()||sc("Web0S")||tc()||sc("CrKey"))a=!1;sc("CrKey")&&sc("Android")&&(a=!0);a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),xt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=yt)}
|
|
810
|
+
function yt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!oc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=pc(g),!h)||a.audio&&(k=a.audio.contentType,
|
|
811
|
+
l=pc(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(q));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
|
|
812
|
+
n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);C(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}jt.MediaCapabilities=vt;vt.install=wt;var xt=null;vt.originalMcap=xt;kt(wt,-1);function zt(){}function At(){var a=xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Bt():a?12>=a?(Ct(),Dt()):Ct():(sc("Tizen 2")||sc("Tizen 3")||sc("Tizen 4"))&&Et());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Ft()}
|
|
813
|
+
function Ct(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function Dt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Et(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=$c(b)[0]&&a(b)}}
|
|
815
814
|
function Bt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
816
|
-
function Ft(){var a=MediaSource.isTypeSupported;
|
|
815
|
+
function Ft(){var a=MediaSource.isTypeSupported;sc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}jt.MediaSource=zt;zt.install=At;kt(At);function Gt(){}function Ht(){screen.orientation||void 0!=window.orientation&&It()}function It(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Jt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new R("change");b.dispatchEvent(c)})}jt.Orientation=Gt;
|
|
817
816
|
Gt.install=Ht;function Jt(){We.call(this);this.type="";this.angle=0}pa(Jt,We);
|
|
818
817
|
Jt.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
819
|
-
Jt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};kt(Ht);function Kt(){}function Lt(a,b){try{var c=new Mt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Nt(a){var b=this.mediaKeys;b&&b!=a&&Ot(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Ot(a,this):Promise.resolve()}function Pt(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=
|
|
818
|
+
Jt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};kt(Ht);function Kt(){}function Lt(a,b){try{var c=new Mt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Nt(a){var b=this.mediaKeys;b&&b!=a&&Ot(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Ot(a,this):Promise.resolve()}function Pt(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Ic(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}
|
|
820
819
|
jt.PatchedMediaKeysApple=Kt;Kt.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Nt,window.MediaKeys=Qt,window.MediaKeySystemAccess=Mt,navigator.requestMediaKeySystemAccess=Lt,window.shakaMediaKeysPolyfill=!0)};
|
|
821
820
|
function Mt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
822
821
|
k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
823
822
|
Mt.prototype.createMediaKeys=function(){var a=new Qt(this.keySystem);return Promise.resolve(a)};Mt.prototype.getConfiguration=function(){return this.g};function Qt(a){this.h=new WebKitMediaKeys(a);this.g=new of}Qt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Rt(this.h,a)};Qt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
824
|
-
function Ot(a,b){a.g.
|
|
825
|
-
r.generateRequest=function(a,b){var c=this;this.h=new
|
|
823
|
+
function Ot(a,b){a.g.lb();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",Pt);try{return Ei(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Rt(a){We.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new St}pa(Rt,We);r=Rt.prototype;
|
|
824
|
+
r.generateRequest=function(a,b){var c=this;this.h=new lc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Cb()?"license-request":"license-renewal").set("message",Gb(e.message));e=new R("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(Tt(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
|
|
826
825
|
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:Tt(c,"output-not-allowed");break;default:Tt(c,"internal-error")}});Tt(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
827
|
-
r.update=function(a){this.g=new
|
|
826
|
+
r.update=function(a){this.g=new lc;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.lb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Tt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
|
|
828
827
|
function St(){this.size=0;this.g=void 0}r=St.prototype;r.Cb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,kg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=kg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Ut(){}function Vt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Wt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Xt,window.MediaKeys=Yt,window.MediaKeySystemAccess=Zt,window.shakaMediaKeysPolyfill=!0)}function Wt(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
829
828
|
function Xt(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}jt.PatchedMediaKeysNop=Ut;Ut.install=Vt;function Yt(){throw new TypeError("Illegal constructor.");}Yt.prototype.createSession=function(){};Yt.prototype.setServerCertificate=function(){};function Zt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Zt.prototype.getConfiguration=function(){};Zt.prototype.createMediaKeys=function(){};kt(Vt,-10);function $t(){}
|
|
830
829
|
function au(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)bu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=cu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=du;window.MediaKeys=eu;window.MediaKeySystemAccess=fu;window.shakaMediaKeysPolyfill=!0}}
|
|
@@ -832,28 +831,28 @@ function gu(a){var b=bu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}functi
|
|
|
832
831
|
function fu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
|
|
833
832
|
m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
|
|
834
833
|
d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}fu.prototype.createMediaKeys=function(){var a=new eu(this.g);return Promise.resolve(a)};fu.prototype.getConfiguration=function(){return this.h};function eu(a){this.l=a;this.h=null;this.g=new of;this.i=[];this.j=new Map}
|
|
835
|
-
function hu(a,b){a.h=b;a.g.
|
|
834
|
+
function hu(a,b){a.h=b;a.g.lb();var c=bu;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=iu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Cb()?"licenserequest":"licenserenewal").set("message",d.message),d=new R("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=iu(a,d.sessionId))ju(d,"usable"),
|
|
836
835
|
d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=iu(a,d.sessionId);e&&e.handleError(d)}))}eu.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 ku(b,this.l,a);this.i.push(a);return a};eu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
837
|
-
function iu(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 ku(a,b,c){We.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
|
|
836
|
+
function iu(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 ku(a,b,c){We.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 lc;this.keyStatuses=new lu}pa(ku,We);r=ku.prototype;
|
|
838
837
|
r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?ju(this,"output-restricted"):1==b?ju(this,"expired"):ju(this,"internal-error"))};
|
|
839
|
-
function mu(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=Fb(Ic("LOAD_SESSION|"+c));else{var e=Ic("PERSISTENT|");d=Qc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new
|
|
840
|
-
function nu(a,b,c){if(a.g)a.g.then(function(){return nu(a,b,c)})["catch"](function(){return nu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=
|
|
841
|
-
function ju(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return mu(this,b,null)};r.load=function(a){return"persistent-license"==this.l?mu(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new
|
|
838
|
+
function mu(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=Fb(Ic("LOAD_SESSION|"+c));else{var e=Ic("PERSISTENT|");d=Qc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new lc;var f=gu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
|
|
839
|
+
function nu(a,b,c){if(a.g)a.g.then(function(){return nu(a,b,c)})["catch"](function(){return nu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(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=Nc(e.keys[0].k);e=Nc(e.keys[0].kid)}else d=Fb(c),e=null;var f=gu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
840
|
+
function ju(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return mu(this,b,null)};r.load=function(a){return"persistent-license"==this.l?mu(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new lc;nu(this,b,a);return b};
|
|
842
841
|
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=gu("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function lu(){this.size=0;this.g=void 0}r=lu.prototype;r.Cb=function(){return this.g};
|
|
843
842
|
r.forEach=function(a){this.g&&a(this.g,kg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=kg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var bu="";kt(au);function ou(){}function pu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=qu,Object.defineProperty(a,"disablePictureInPicture",{get:ru,set:su,enumerable:!0,configurable:!0}),document.exitPictureInPicture=tu,document.addEventListener("webkitpresentationmodechanged",uu,!0))}}
|
|
844
843
|
function uu(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)}
|
|
845
844
|
function qu(){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 tu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
846
|
-
function ru(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function su(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}jt.PiPWebkit=ou;ou.install=pu;kt(pu);function vu(){}function wu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=xu))}function xu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}jt.RandomUUID=vu;vu.install=wu;kt(wu);function yu(){}function zu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Au)}function Au(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}jt.StorageEstimate=yu;yu.install=zu;kt(zu);function Bu(){}function Cu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Du})}function Du(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}jt.Symbol=Bu;Bu.install=Cu;kt(Cu);function Eu(){}function Fu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}jt.VideoPlayPromise=Eu;Eu.install=Fu;kt(Fu);function Gu(){}function Hu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||
|
|
845
|
+
function ru(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function su(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}jt.PiPWebkit=ou;ou.install=pu;kt(pu);function vu(){}function wu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=xu))}function xu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}jt.RandomUUID=vu;vu.install=wu;kt(wu);function yu(){}function zu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Au)}function Au(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}jt.StorageEstimate=yu;yu.install=zu;kt(zu);function Bu(){}function Cu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Du})}function Du(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}jt.Symbol=Bu;Bu.install=Cu;kt(Cu);function Eu(){}function Fu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}jt.VideoPlayPromise=Eu;Eu.install=Fu;kt(Fu);function Gu(){}function Hu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||uc())&&(a.getVideoPlaybackQuality=Iu)}}function Iu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}jt.VideoPlaybackQuality=Gu;Gu.install=Hu;kt(Hu);function Ju(){}function Ku(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Lu;else if(6==b)a=Mu;else{try{var c=!!Lu(1,2,"")}catch(d){c=!1}c&&(a=Lu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Lu(a,b,c){return new window.TextTrackCue(a,b,c)}function Mu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}jt.VTTCue=Ju;Ju.install=Ku;kt(Ku);function Nu(){}Nu.prototype.parseInit=function(){};Nu.prototype.setSequenceMode=function(){};Nu.prototype.parseMedia=function(a,b){var c=null,d=[],e=Bc(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Ou.exec(f))){var g=Pu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new hb(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",Nu);Nu.prototype.parseMedia=Nu.prototype.parseMedia;
|
|
847
846
|
Nu.prototype.setSequenceMode=Nu.prototype.setSequenceMode;Nu.prototype.parseInit=Nu.prototype.parseInit;var Ou=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Pu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;dd["application/x-subtitle-lrc"]=function(){return new Nu};function Qu(){}Qu.prototype.parseInit=function(){};Qu.prototype.setSequenceMode=function(){};
|
|
848
|
-
Qu.prototype.parseMedia=function(a,b){var c=
|
|
847
|
+
Qu.prototype.parseMedia=function(a,b){var c=Bc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=Rn(g,Ru,"frameRate"),k=Rn(g,Ru,"subFrameRate"),l=Rn(g,Ru,"frameRateMultiplier"),
|
|
849
848
|
m=Rn(g,Ru,"tickRate"),n=Rn(g,Ru,"cellResolution");c=g.getAttribute("xml:space")||"default";e=Rn(g,Su,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Tu(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?Pn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),q=p.next();!q.done;q=
|
|
850
|
-
p.next()){var v=q.value;q=new
|
|
849
|
+
p.next()){var v=q.value;q=new jb;var y=v.getAttribute("xml:id");if(y){q.id=y;var x=null;e&&(x=Uu.exec(e)||Vu.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=Wu(v,l,"extent"))w=(D=Uu.exec(w))||Vu.exec(w),null!=w&&(q.width=Number(w[1]),q.height=Number(w[2]),D||(null!=y&&(q.width=100*q.width/y),null!=x&&(q.height=100*q.height/x)),q.widthUnits=D||null!=y?Ab:0,q.heightUnits=D||null!=x?Ab:0);if(v=Wu(v,l,"origin"))w=(D=Uu.exec(v))||Vu.exec(v),null!=w&&(q.viewportAnchorX=Number(w[1]),q.viewportAnchorY=
|
|
851
850
|
Number(w[2]),D||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=y&&(q.viewportAnchorX=100*q.viewportAnchorX/y)),q.viewportAnchorUnits=D||null!=y?Ab:0)}else q=null;q&&m.push(q)}if(Mn(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Mn(f,"div"));for(p=e.next();!p.done;p=e.next())if(Mn(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Xu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
|
|
852
851
|
function Xu(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var q=null,v=t(Yu),y=v.next();!y.done&&!(q=Zu(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
|
|
853
852
|
a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=Xu(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=$u(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=av(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(x=Infinity,w=0,b=t(a),
|
|
854
853
|
c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new hb(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Zu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
|
|
855
854
|
(g=Zu(l,"region",f,"")[0]);bv(b,p,g,q,e,v,0==a.length);return b}
|
|
856
|
-
function bv(a,b,c,d,e,f,g){f=f||g;"rtl"==cv(b,c,e,"direction",f)&&(a.direction="rtl");g=cv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=
|
|
855
|
+
function bv(a,b,c,d,e,f,g){f=f||g;"rtl"==cv(b,c,e,"direction",f)&&(a.direction="rtl");g=cv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=ib);(g=cv(b,c,e,"textAlign",!0))?(a.positionAlign=dv[g],a.lineAlign=ev[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=lb;if(g=cv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=cv(b,c,e,"color",f))a.color=g;if(g=cv(b,c,e,"backgroundColor",
|
|
857
856
|
f))a.backgroundColor=g;if(g=cv(b,c,e,"border",f))a.border=g;if(g=cv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=cv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=cv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=cv(b,c,e,"lineHeight",f))&&g.match(fv)&&(a.lineHeight=g);(g=cv(b,c,e,"fontSize",f))&&(g.match(fv)||g.match(gv))&&(a.fontSize=g);if(g=cv(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
|
|
858
857
|
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=cv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(fv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(fv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=cv(b,c,e,"letterSpacing",f))&&d.match(fv)&&(a.letterSpacing=d);(d=cv(b,c,e,"linePadding",f))&&d.match(fv)&&(a.linePadding=d);if(f=cv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Wu(c,e,"textDecoration"))&&hv(a,c);(b=
|
|
859
858
|
iv(b,e,"textDecoration"))&&hv(a,b)}
|
|
@@ -865,11 +864,11 @@ function $u(a,b){var c=kv(a.getAttribute("begin"),b),d=kv(a.getAttribute("end"),
|
|
|
865
864
|
function kv(a,b){var c=null;if(lv.test(a)){c=lv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(mv.test(a))c=nv(mv,a);else if(ov.test(a))c=nv(ov,a);else if(pv.test(a))c=pv.exec(a),c=Number(c[1])/b.frameRate;else if(qv.test(a))c=qv.exec(a),c=Number(c[1])/b.g;else if(rv.test(a))c=nv(rv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
866
865
|
function nv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",Qu);Qu.prototype.parseMedia=Qu.prototype.parseMedia;Qu.prototype.setSequenceMode=Qu.prototype.setSequenceMode;Qu.prototype.parseInit=Qu.prototype.parseInit;
|
|
867
866
|
function Tu(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]))}
|
|
868
|
-
var Uu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,gv=/^(\d{1,2}(?:\.\d+)?|100)%$/,fv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Vu=/^(\d+)px (\d+)px$/,lv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ov=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,pv=/^(\d*(?:\.\d*)?)f$/,qv=/^(\d*(?:\.\d*)?)t$/,rv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ev={left:
|
|
867
|
+
var Uu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,gv=/^(\d{1,2}(?:\.\d+)?|100)%$/,fv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Vu=/^(\d+)px (\d+)px$/,lv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ov=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,pv=/^(\d*(?:\.\d*)?)f$/,qv=/^(\d*(?:\.\d*)?)t$/,rv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ev={left:ob,center:"center",right:"end",start:ob,
|
|
869
868
|
end:"end"},dv={left:"line-left",center:"center",right:"line-right"},Ru=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Su=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Yu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];dd["application/ttml+xml"]=function(){return new Qu};function sv(){this.g=new Qu}sv.prototype.parseInit=function(a){var b=!1;(new ug).box("moov",yg).box("trak",yg).box("mdia",yg).box("minf",yg).box("stbl",yg).U("stsd",Ag).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};sv.prototype.setSequenceMode=function(){};sv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new ug).box("mdat",Bg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};
|
|
870
869
|
M("shaka.text.Mp4TtmlParser",sv);sv.prototype.parseMedia=sv.prototype.parseMedia;sv.prototype.setSequenceMode=sv.prototype.setSequenceMode;sv.prototype.parseInit=sv.prototype.parseInit;dd['application/mp4; codecs="stpp"']=function(){return new sv};dd['application/mp4; codecs="stpp.ttml"']=function(){return new sv};dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new sv};dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new sv};function tv(){this.g=!1}tv.prototype.parseInit=function(){};tv.prototype.setSequenceMode=function(a){this.g=a};
|
|
871
|
-
tv.prototype.parseMedia=function(a,b){var c=
|
|
872
|
-
c}}f=[];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new fq(g);var h=new
|
|
870
|
+
tv.prototype.parseMedia=function(a,b){var c=Bc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=uv(new fq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-
|
|
871
|
+
c}}f=[];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new fq(g);var h=new jb;iq(g);gq(g);for(var k=iq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
|
|
873
872
|
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");gq(g);k=iq(g)}f.push(h)}e=new Map;vv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new hb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var q=
|
|
874
873
|
/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=sb;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
|
|
875
874
|
!0;m.opacity=parseFloat(v);break;case "text-shadow":n=!0;m.textShadow=v;break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new fq(h[0]);m=uv(k);q=hq(k,/[ \t]+--\x3e[ \t]+/g);n=uv(k);if(null==m||null==q||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),
|
|
@@ -878,24 +877,24 @@ function wv(a,b,c){0===c.size&&vv(c);a=yv(a);for(var d=[],e=-1,f=0;f<a.length;f+
|
|
|
878
877
|
d}else b.payload=a}function yv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Bv(a,b){return a&&0<a.length?a:b}
|
|
879
878
|
function Av(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Bv(h.backgroundColor,e.backgroundColor),e.color=Bv(h.color,e.color),e.fontFamily=Bv(h.fontFamily,e.fontFamily),e.fontSize=Bv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
|
|
880
879
|
"italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=uv(new fq(g)))e.startTime=g}}if(Tn(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Av(a.value,e,c,d)}
|
|
881
|
-
function xv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=
|
|
882
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Cv(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=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=
|
|
880
|
+
function xv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lb:a.textAlign=ub[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|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
|
|
881
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Cv(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=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=nb,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function Cv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
883
882
|
function uv(a){a=hq(a,zv);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)}M("shaka.text.VttTextParser",tv);tv.prototype.parseMedia=tv.prototype.parseMedia;tv.prototype.setSequenceMode=tv.prototype.setSequenceMode;tv.prototype.parseInit=tv.prototype.parseInit;var zv=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;dd["text/vtt"]=function(){return new tv};dd['text/vtt; codecs="vtt"']=function(){return new tv};
|
|
884
883
|
dd['text/vtt; codecs="wvtt"']=function(){return new tv};function Dv(){this.g=null}Dv.prototype.parseInit=function(a){var b=this,c=!1;(new ug).box("moov",yg).box("trak",yg).box("mdia",yg).U("mdhd",function(d){d=Lh(d.reader,d.version);b.g=d.timescale}).box("minf",yg).box("stbl",yg).U("stsd",Ag).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};Dv.prototype.setSequenceMode=function(){};
|
|
885
884
|
Dv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new ug).box("moof",yg).box("traf",yg).U("tfdt",function(A){g=!0;c=Kh(A.reader,A.version).ke}).U("tfhd",function(A){l=Jh(A.reader,A.flags).pe}).U("trun",function(A){h=!0;d=Mh(A.reader,A.version,A.flags).He}).box("mdat",Bg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new rg(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Vd||l,y=q.$c?
|
|
886
|
-
c+q.$c:m;m=y+(v||0);var x=0;do{var w=n.N();x+=w;var D=n.N(),B=null;"vttc"==Cg(D)?8<w&&(B=n
|
|
887
|
-
function Fv(a,b,c,d,e){d=new hb(d,e,"");wv(a,d,new Map);b&&(d.id=b);if(c)for(a=new fq(c),b=iq(a);b;)xv(d,b,[]),gq(a),b=iq(a);return d}M("shaka.text.Mp4VttParser",Dv);Dv.prototype.parseMedia=Dv.prototype.parseMedia;Dv.prototype.setSequenceMode=Dv.prototype.setSequenceMode;Dv.prototype.parseInit=Dv.prototype.parseInit;dd['application/mp4; codecs="wvtt"']=function(){return new Dv};function Gv(){}Gv.prototype.parseInit=function(){};Gv.prototype.setSequenceMode=function(){};Gv.prototype.parseMedia=function(a){var b=
|
|
888
|
-
function Hv(a){a=hq(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)}M("shaka.text.SbvTextParser",Gv);Gv.prototype.parseMedia=Gv.prototype.parseMedia;Gv.prototype.setSequenceMode=Gv.prototype.setSequenceMode;Gv.prototype.parseInit=Gv.prototype.parseInit;dd["text/x-subviewer"]=function(){return new Gv};function Iv(){this.g=new tv}Iv.prototype.parseInit=function(){};Iv.prototype.setSequenceMode=function(){};Iv.prototype.parseMedia=function(a,b){var c=
|
|
885
|
+
c+q.$c:m;m=y+(v||0);var x=0;do{var w=n.N();x+=w;var D=n.N(),B=null;"vttc"==Cg(D)?8<w&&(B=n.Za(w-8)):n.skip(w-8);v&&B&&(w=Ev(B,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(dc)};function Ev(a,b,c){var d,e,f;(new ug).box("payl",Bg(function(g){d=Bc(g)})).box("iden",Bg(function(g){e=Bc(g)})).box("sttg",Bg(function(g){f=Bc(g)})).parse(a);return d?Fv(d,e,f,b,c):null}
|
|
886
|
+
function Fv(a,b,c,d,e){d=new hb(d,e,"");wv(a,d,new Map);b&&(d.id=b);if(c)for(a=new fq(c),b=iq(a);b;)xv(d,b,[]),gq(a),b=iq(a);return d}M("shaka.text.Mp4VttParser",Dv);Dv.prototype.parseMedia=Dv.prototype.parseMedia;Dv.prototype.setSequenceMode=Dv.prototype.setSequenceMode;Dv.prototype.parseInit=Dv.prototype.parseInit;dd['application/mp4; codecs="wvtt"']=function(){return new Dv};function Gv(){}Gv.prototype.parseInit=function(){};Gv.prototype.setSequenceMode=function(){};Gv.prototype.parseMedia=function(a){var b=Bc(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 fq(c[0]),e=Hv(d),f=hq(d,/,/g);d=Hv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
887
|
+
function Hv(a){a=hq(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)}M("shaka.text.SbvTextParser",Gv);Gv.prototype.parseMedia=Gv.prototype.parseMedia;Gv.prototype.setSequenceMode=Gv.prototype.setSequenceMode;Gv.prototype.parseInit=Gv.prototype.parseInit;dd["text/x-subviewer"]=function(){return new Gv};function Iv(){this.g=new tv}Iv.prototype.parseInit=function(){};Iv.prototype.setSequenceMode=function(){};Iv.prototype.parseMedia=function(a,b){var c=Bc(a);c=Jv(c);c=Fb(Ic(c));return this.g.parseMedia(c,b)};function Jv(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")+"\n\n";return b}M("shaka.text.SrtTextParser",Iv);
|
|
889
888
|
Iv.srt2webvtt=Jv;Iv.prototype.parseMedia=Iv.prototype.parseMedia;Iv.prototype.setSequenceMode=Iv.prototype.setSequenceMode;Iv.prototype.parseInit=Iv.prototype.parseInit;dd["text/srt"]=function(){return new Iv};function Kv(){}Kv.prototype.parseInit=function(){};Kv.prototype.setSequenceMode=function(){};
|
|
890
|
-
Kv.prototype.parseMedia=function(a){var b="",c="";a=
|
|
889
|
+
Kv.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Lv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Mv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Nv);else if("Style"==e){e=f.split(Nv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
891
890
|
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={rd:e.rd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Mv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Nv);else if("Dialogue"==f){g=g.split(Nv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Ov(f.Start);var k=Ov(f.End);g=new hb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.rd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.rd}}(e)))&&Pv(g,f);d.push(g)}return d};
|
|
892
|
-
function Pv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Qv(c))a.color=c;if(c=b.BackColour)if(c=Qv(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=
|
|
893
|
-
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=
|
|
891
|
+
function Pv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Qv(c))a.color=c;if(c=b.BackColour)if(c=Qv(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=pb;a.textAlign="start";break;case 2:a.displayAlign=pb;a.textAlign=lb;break;case 3:a.displayAlign=pb;a.textAlign="end";
|
|
892
|
+
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=lb;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=lb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
|
|
894
893
|
function Qv(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 Ov(a){a=Rv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Kv);Kv.prototype.parseMedia=Kv.prototype.parseMedia;Kv.prototype.setSequenceMode=Kv.prototype.setSequenceMode;Kv.prototype.parseInit=Kv.prototype.parseInit;
|
|
895
|
-
var Lv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Mv=/^\s*([^:]+):\s*(.*)/,Nv=/\s*,\s*/,Rv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;dd["text/x-ssa"]=function(){return new Kv};function Sv(){}function Tv(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Jc(b,!0):e=b;a=
|
|
896
|
-
Sv.commonFairPlayResponse=function(a,b){if(2===a){try{var c=
|
|
897
|
-
Sv.verimatrixFairPlayRequest=function(a,b){if(2===a){var c=Fb(b.body);c=Mc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Ic("spc="+c)}};Sv.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=
|
|
898
|
-
Sv.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=
|
|
894
|
+
var Lv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Mv=/^\s*([^:]+):\s*(.*)/,Nv=/\s*,\s*/,Rv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;dd["text/x-ssa"]=function(){return new Kv};function Sv(){}function Tv(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Jc(b,!0):e=b;a=Ec(a);a=Jc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",Sv);
|
|
895
|
+
Sv.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Bc(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Gb(Nc(c)))}};Sv.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Sv.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
|
|
896
|
+
Sv.verimatrixFairPlayRequest=function(a,b){if(2===a){var c=Fb(b.body);c=Mc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Ic("spc="+c)}};Sv.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Tv(a,d,b)};
|
|
897
|
+
Sv.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split(";").pop();return Tv(a,c,b)};Sv.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop();return Tv(a,c,b)};Sv.initDataTransform=Tv;Sv.defaultGetContentId=function(a){a=Ec(a);return(new Nb(a)).Fa};
|
|
899
898
|
Sv.isFairPlaySupported=function(){var a;return K(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},C(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);F(b);return b["return"](!1)})};/*
|
|
900
899
|
@license
|
|
901
900
|
EME Encryption Scheme Polyfill
|