shaka-player 4.7.7 → 4.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/CONTRIBUTORS +1 -0
- package/dist/locales.js +33 -33
- package/dist/shaka-player.compiled.debug.js +76 -76
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +773 -769
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +242 -241
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +904 -900
- package/dist/shaka-player.ui.map +3 -3
- package/lib/hls/hls_parser.js +14 -6
- package/lib/mss/mss_parser.js +2 -0
- package/lib/player.js +2 -1
- package/lib/polyfill/media_capabilities.js +14 -1
- package/lib/transmuxer/aac_transmuxer.js +2 -0
- package/lib/transmuxer/ac3_transmuxer.js +2 -0
- package/lib/transmuxer/ec3_transmuxer.js +2 -0
- package/lib/transmuxer/h264.js +28 -1
- package/lib/transmuxer/h265.js +25 -5
- package/lib/transmuxer/mp3_transmuxer.js +2 -0
- package/lib/transmuxer/ts_transmuxer.js +12 -0
- package/lib/util/cmcd_manager.js +13 -0
- package/lib/util/manifest_parser_utils.js +2 -0
- package/lib/util/mp4_generator.js +31 -2
- package/lib/util/stream_utils.js +2 -10
- package/package.json +1 -1
|
@@ -9,36 +9,36 @@
|
|
|
9
9
|
Copyright The Closure Library Authors.
|
|
10
10
|
SPDX-License-Identifier: Apache-2.0
|
|
11
11
|
*/
|
|
12
|
-
var r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var
|
|
13
|
-
function
|
|
14
|
-
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;
|
|
15
|
-
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&
|
|
12
|
+
var r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
13
|
+
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}
|
|
14
|
+
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
|
|
15
|
+
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return 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 w(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 ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={a:!0},ma={};try{ma.__proto__=la;ka=ma.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var na=ja;
|
|
18
|
-
function oa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(na)na(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.
|
|
19
|
-
function ra(a,b){a.i={
|
|
20
|
-
function ya(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.
|
|
21
|
-
function Ba(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,ra(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}function Ca(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,ra(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.
|
|
18
|
+
function oa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(na)na(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.ej=b.prototype}function pa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function qa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}pa.prototype.s=function(a){this.h=a};
|
|
19
|
+
function ra(a,b){a.i={Mf:b,Xf:!0};a.g=a.m||a.j}pa.prototype.return=function(a){this.i={return:a};this.g=this.j};function C(a,b,c){a.g=c;return{value:b}}pa.prototype.B=function(a){this.g=a};function E(a){a.g=0}function sa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a,b){a.m=0;a.j=b||0}function ua(a,b,c){a.g=b;a.m=c||0}function va(a,b){a.m=b||0;b=a.i.Mf;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function ya(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Xf?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new pa;this.h=a}function Aa(a,b){qa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ca(a)}
|
|
21
|
+
function Ba(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,ra(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}function Ca(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,ra(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Xf)throw b.Mf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Da(a){this.next=function(b){qa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ca(a));return b};this.throw=function(b){qa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.s):(ra(a.g,b),b=Ca(a));return b};this.return=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}function Ea(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
23
23
|
function K(a){return Ea(new Da(new za(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
24
|
fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
25
25
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.C(g):this.m(g)}};
|
|
26
26
|
b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.I(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.A()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.A=
|
|
27
27
|
function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.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;
|
|
28
|
-
b.prototype.H=function(g){var h=this.j();g.
|
|
29
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).
|
|
28
|
+
b.prototype.H=function(g){var h=this.j();g.rd(h.resolve,h.reject)};b.prototype.I=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,p){return"function"==typeof q?function(u){try{l(q(u))}catch(v){m(v)}}:p}var l,m,n=new b(function(q,p){l=q;m=p});this.rd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.rd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
29
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).rd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){q[u]=v;p--;0==p&&l(q)}}var q=[],p=0;do q.push(void 0),p++,d(k.value).rd(n(q.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
31
|
-
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ga(k,g)){var l=new c;
|
|
31
|
+
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ga(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ga(k,
|
|
33
33
|
g)&&Ga(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ga(k,g)&&Ga(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
34
|
-
fa("Map",function(a){function b(){var h={};return h.
|
|
34
|
+
fa("Map",function(a){function b(){var h={};return h.rb=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.rb;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&&Ga(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
|
|
35
35
|
list:m,index:-1,entry:void 0}}function e(h){this.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||
|
|
36
|
-
"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.entry?l.entry.value=k:(l.entry={next:this.g,
|
|
37
|
-
h.entry.next.
|
|
36
|
+
"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.entry?l.entry.value=k:(l.entry={next:this.g,rb:this.g.rb,head:this.g,key:h,value:k},l.list.push(l.entry),this.g.rb.next=l.entry,this.g.rb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.entry.rb.next=h.entry.next,
|
|
37
|
+
h.entry.next.rb=h.entry.rb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.rb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
|
|
38
38
|
function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
39
39
|
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
40
40
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
|
|
41
|
-
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 Ha(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{
|
|
41
|
+
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ha(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{Uf:e,v:f}}return{Uf:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ha(this,b,c).Uf}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
|
|
42
42
|
fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Ia(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+""}
|
|
43
43
|
fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ia(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ha(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ia(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
|
|
44
44
|
function Ja(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 Ja(this,function(b){return b})}});
|
|
@@ -47,22 +47,22 @@ fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){r
|
|
|
47
47
|
fa("Object.assign",function(a){return a||Ka});fa("Array.prototype.values",function(a){return a?a:function(){return Ja(this,function(b,c){return c})}});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 Ja(this,function(b,c){return[b,c]})}});
|
|
48
48
|
fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ia(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("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});
|
|
49
49
|
fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});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}});
|
|
50
|
-
fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push([d,b[d]]);return c}});var La=this||self;function
|
|
50
|
+
fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push([d,b[d]]);return c}});var La=this||self;function N(a,b){a=a.split(".");var c=La;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
|
|
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 Ma(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ma.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Na(a){return a.h/(1-Math.pow(a.g,a.i))};function
|
|
56
|
+
function Ma(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ma.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Na(a){return a.h/(1-Math.pow(a.g,a.i))};function Pa(){this.h=new Ma(2);this.j=new Ma(5);this.g=0;this.i=128E3;this.l=16E3}Pa.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)};Pa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Pa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Na(this.h),Na(this.j))};function Qa(){}function Ra(){}function Sa(){}function Ta(a){var b=Fa.apply(1,arguments);Ua.has(a)||(Ua.add(a),Sa.apply(Qa,w(b)))}function Va(){}function Wa(){}function Xa(){}function Ya(){}var Ua=new Set;window.console&&(Sa=function(){return console.warn.apply(console,w(Fa.apply(0,arguments)))},Ra=function(){console.error.apply(console,w(Fa.apply(0,arguments)))});function Za(a){if($a.has(a))return $a.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);$a.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),$a.set(a,b),b):!1}function bb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var $a=new Map;function cb(){}cb.prototype.extract=function(){};cb.prototype.decode=function(){return[]};cb.prototype.clear=function(){};cb.prototype.getStreams=function(){return[]};function db(){}db.prototype.init=function(){};db.prototype.parse=function(){return[]};function eb(){}function fb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(gb(a)==gb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=hb(a);b=hb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function gb(a){return a instanceof ArrayBuffer?a:a.buffer}function kb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
57
57
|
function hb(a,b,c){c=void 0===c?Infinity:c;return lb(a,void 0===b?0:b,c,Uint8Array)}function mb(a,b,c){c=void 0===c?Infinity:c;return lb(a,void 0===b?0:b,c,Uint16Array)}function nb(a,b,c){c=void 0===c?Infinity:c;return lb(a,void 0===b?0:b,c,DataView)}function lb(a,b,c,d){var e=gb(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
|
|
58
|
-
|
|
59
|
-
pb.prototype.h=function(){this.g.clear()};pb.prototype.j=function(){return this.g.getStreams()};
|
|
58
|
+
N("shaka.util.BufferUtils",eb);eb.toDataView=nb;eb.toUint16=mb;eb.toUint8=hb;eb.toArrayBuffer=kb;eb.equal=fb;function ob(){}ob.prototype.init=function(){};ob.prototype.i=function(){};ob.prototype.h=function(){};ob.prototype.j=function(){};N("shaka.media.IClosedCaptionParser",ob);function pb(a){this.l=new db;if(a=qb[a.toLowerCase()])this.l=a();this.g=new cb;if(a=rb)this.g=a()}pb.prototype.init=function(a){this.l.init(a)};pb.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=hb(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};
|
|
59
|
+
pb.prototype.h=function(){this.g.clear()};pb.prototype.j=function(){return this.g.getStreams()};N("shaka.media.ClosedCaptionParser",pb);pb.findDecoder=function(){return rb};pb.unregisterDecoder=function(){rb=null};pb.registerDecoder=function(a){rb=a};pb.findParser=function(a){return qb[a]};pb.unregisterParser=function(a){delete qb[a]};pb.registerParser=function(a,b){qb[a]=b};var qb={},rb=null;function sb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function tb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function ub(a,b,c){c||(c=sb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={$d:d.$d},e=a.next()){d.$d=e.value;e=b.findIndex(function(f){return function(g){return c(f.$d,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
60
60
|
function xb(a,b,c){c||(c=sb);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 yb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new zb;this.position=null;this.positionAlign=Ab;this.size=0;this.textAlign=Cb;this.direction=Db;this.writingMode=Eb;this.lineInterpretation=Fb;this.line=null;this.lineHeight="";this.lineAlign=Gb;this.displayAlign=Hb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ib;this.fontStyle=Jb;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
61
|
-
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={
|
|
62
|
-
function Lb(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(!xb(a.nestedCues,b.nestedCues,Lb))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(!xb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
|
|
61
|
+
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Jb:32,rows:15}}function Kb(a,b){a=new yb(a,b,"");a.lineBreak=!0;return a}yb.prototype.clone=function(){var a=new yb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
62
|
+
function Lb(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(!xb(a.nestedCues,b.nestedCues,Lb))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(!xb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",yb);yb.equal=Lb;yb.prototype.clone=yb.prototype.clone;var Ab="auto";
|
|
63
63
|
yb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ab};var Cb="center",Mb={LEFT:"left",RIGHT:"right",CENTER:Cb,START:"start",END:"end"};yb.textAlign=Mb;var Hb="after",Nb={BEFORE:"before",CENTER:"center",AFTER:Hb};yb.displayAlign=Nb;var Db="ltr";yb.direction={HORIZONTAL_LEFT_TO_RIGHT:Db,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Eb="horizontal-tb";yb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Eb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Fb=0;
|
|
64
64
|
yb.lineInterpretation={LINE_NUMBER:Fb,PERCENTAGE:1};var Gb="start",Ob={CENTER:"center",START:Gb,END:"end"};yb.lineAlign=Ob;var Pb={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};yb.defaultTextColor=Pb;var Qb={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};yb.defaultTextBackgroundColor=Qb;var Ib=400;yb.fontWeight={NORMAL:Ib,BOLD:700};
|
|
65
|
-
var Jb="normal",Rb={NORMAL:Jb,ITALIC:"italic",OBLIQUE:"oblique"};yb.fontStyle=Rb;yb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function zb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sb;this.scroll=Wb}
|
|
65
|
+
var Jb="normal",Rb={NORMAL:Jb,ITALIC:"italic",OBLIQUE:"oblique"};yb.fontStyle=Rb;yb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function zb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sb;this.scroll=Wb}N("shaka.text.CueRegion",zb);var Sb=1;zb.units={PX:0,PERCENTAGE:Sb,LINES:2};var Wb="";zb.scrollMode={NONE:Wb,UP:"up"};function Xb(){}Xb.prototype.destroy=function(){};function Yb(a,b,c){Zb[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,Ud:b}}function $b(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([ac,bc,cc,dc]),e=d.next();!e.done;e=d.next())if(e=Zb[c+"-"+e.value]){var f=e.Ud(),g=f.isSupported(a,b);f.destroy();if(g)return e.Ud}return null}N("shaka.transmuxer.TransmuxerEngine",Xb);Xb.findTransmuxer=$b;Xb.unregisterTransmuxer=function(a,b){delete Zb[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
66
66
|
Xb.registerTransmuxer=Yb;Xb.prototype.destroy=Xb.prototype.destroy;var Zb={},dc=1,cc=2,bc=3,ac=4;Xb.PluginPriority={FALLBACK:dc,PREFERRED_SECONDARY:cc,PREFERRED:bc,APPLICATION:ac};/*
|
|
67
67
|
@license
|
|
68
68
|
Copyright 2008 The Closure Library Authors
|
|
@@ -73,14 +73,14 @@ var ec=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
73
73
|
Copyright 2006 The Closure Library Authors
|
|
74
74
|
SPDX-License-Identifier: Apache-2.0
|
|
75
75
|
*/
|
|
76
|
-
function fc(a){var b;a instanceof fc?(gc(this,a
|
|
77
|
-
r.toString=function(){var a=[],b=this
|
|
78
|
-
r.resolve=function(a){var b=this.clone();"data"===b
|
|
79
|
-
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.
|
|
76
|
+
function fc(a){var b;a instanceof fc?(gc(this,a.$a),this.Wb=a.Wb,hc(this,a.nb),ic(this,a.lc),this.Ga=a.Ga,jc(this,a.g.clone()),this.Kb=a.Kb):a&&(b=String(a).match(ec))?(gc(this,b[1]||"",!0),this.Wb=kc(b[2]||""),hc(this,b[3]||"",!0),ic(this,b[4]),this.Ga=kc(b[5]||"",!0),jc(this,b[6]||"",!0),this.Kb=kc(b[7]||"")):this.g=new lc(null)}r=fc.prototype;r.$a="";r.Wb="";r.nb="";r.lc=null;r.Ga="";r.Kb="";
|
|
77
|
+
r.toString=function(){var a=[],b=this.$a;b&&a.push(mc(b,nc,!0),":");if(b=this.nb){a.push("//");var c=this.Wb;c&&a.push(mc(c,nc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.lc;null!=b&&a.push(":",String(b))}if(b=this.Ga)this.nb&&"/"!=b.charAt(0)&&a.push("/"),a.push(mc(b,"/"==b.charAt(0)?oc:pc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Kb)&&a.push("#",mc(b,qc));return a.join("")};
|
|
78
|
+
r.resolve=function(a){var b=this.clone();"data"===b.$a&&(b=new fc);var c=!!a.$a;c?gc(b,a.$a):c=!!a.Wb;c?b.Wb=a.Wb:c=!!a.nb;c?hc(b,a.nb):c=null!=a.lc;var d=a.Ga;if(c)ic(b,a.lc);else if(c=!!a.Ga){if("/"!=d.charAt(0))if(this.nb&&!this.Ga)d="/"+d;else{var e=b.Ga.lastIndexOf("/");-1!=e&&(d=b.Ga.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(""):".."==
|
|
79
|
+
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.Ga=d:c=""!==a.g.toString();c?jc(b,a.g.clone()):c=!!a.Kb;c&&(b.Kb=a.Kb);return b};r.clone=function(){return new fc(this)};function gc(a,b,c){a.$a=c?kc(b,!0):b;a.$a&&(a.$a=a.$a.replace(/:$/,""))}function hc(a,b,c){a.nb=c?kc(b,!0):b}function ic(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.lc=b}else a.lc=null}
|
|
80
80
|
function jc(a,b,c){b instanceof lc?a.g=b:(c||(b=mc(b,rc)),a.g=new lc(b))}function kc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function mc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,sc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function sc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var nc=/[#\/\?@]/g,pc=/[#\?:]/g,oc=/[#\?]/g,rc=/[#\?@]/g,qc=/#/g;function lc(a){this.g=a||null}
|
|
81
|
-
function uc(a){if(!a.
|
|
82
|
-
r.set=function(a,b){uc(this);this.g=null;this.
|
|
83
|
-
r.clone=function(){var a=new lc;a.g=this.g;if(this.
|
|
81
|
+
function uc(a){if(!a.xa&&(a.xa={},a.Lc=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=lc.prototype;r.xa=null;r.Lc=null;function vc(a){uc(a);return a.Lc}r.add=function(a,b){uc(this);this.g=null;var c=this.xa.hasOwnProperty(a)?this.xa[a]:null;c||(this.xa[a]=c=[]);c.push(b);this.Lc++;return this};
|
|
82
|
+
r.set=function(a,b){uc(this);this.g=null;this.xa.hasOwnProperty(a)?this.xa[a]=[b]:this.add(a,b);return this};r.get=function(a){uc(this);return this.xa[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.xa)return"";var a=[],b;for(b in this.xa)for(var c=encodeURIComponent(b),d=this.xa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
83
|
+
r.clone=function(){var a=new lc;a.g=this.g;if(this.xa){var b={},c;for(c in this.xa)b[c]=this.xa[c].concat();a.xa=b;a.Lc=this.Lc}return a};function O(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(wc)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",O);var wc=!0;O.Severity={RECOVERABLE:1,CRITICAL:2};O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
84
84
|
O.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,
|
|
85
85
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
|
|
86
86
|
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_CODEC_UNKNOWN:3021,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,
|
|
@@ -91,49 +91,49 @@ NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CE
|
|
|
91
91
|
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,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,
|
|
92
92
|
CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function xc(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new fc(a[0]);b=new fc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new fc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new fc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
93
93
|
function yc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}function zc(a,b){if(1==b.length)return b[0];a=Bc(a,b);if(null!=a)return a;throw new O(2,4,4025,b);}
|
|
94
|
-
function Bc(a,b){for(var c=t(Cc[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==Dc?"":null}var Dc="text",Ec={$:"video",O:"audio",na:Dc,
|
|
94
|
+
function Bc(a,b){for(var c=t(Cc[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==Dc?"":null}var Dc="text",Ec={$:"video",O:"audio",na:Dc,ge:"image",fi:"application"},Cc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Fc(){}function Gc(a,b){var c=a;b&&!Hc.includes(a)&&(c+='; codecs="'+b+'"');return c}function Ic(a,b){b&&(a+='; codecs="'+b+'"');return a}function Jc(a,b,c){var d=Gc(a,b);b=Ic(a,b);$b(b)?(a=$b(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
95
95
|
function Kc(a){var b=Lc(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
96
96
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Mc(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Lc(c.value),b.push(c[0]);return b.sort().join(",")}function Nc(a){return a.split(";")[0]}
|
|
97
|
-
function Oc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Lc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
|
|
97
|
+
function Oc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Lc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}N("shaka.util.MimeUtils",Fc);Fc.getFullTypeWithAllCodecs=Ic;Fc.getFullType=Gc;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");
|
|
98
98
|
var Hc=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Pc(a){this.i=null;this.j=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.A="";this.o=new Map}function Qc(a){return Rc[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!rb:!1}Pc.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
99
99
|
function Sc(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return C(l,Promise.resolve(),2);if(!a.i||!a.j)return l.return();if(null==c||null==d)return a.i.parseInit(hb(b)),l.return();f=a.u?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(hb(b),g,e);k=h.filter(function(m){return m.startTime>=a.l&&m.startTime<a.m});a.j.append(k);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);E(l)})}
|
|
100
100
|
Pc.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)return C(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));E(d)})};function Tc(a,b,c){a.l=b;a.m=c}function Uc(a,b,c){a.A=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
101
101
|
function Vc(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Vc(a,d.value,c)}
|
|
102
102
|
function Yc(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,[]);Vc(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.A&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
103
|
-
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}
|
|
103
|
+
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",Pc);Pc.prototype.destroy=Pc.prototype.destroy;Pc.findParser=function(a){return Rc[a]};Pc.unregisterParser=function(a){delete Rc[a]};Pc.registerParser=function(a,b){Rc[a]=b};var Rc={};function Zc(a,b){return a.concat(b)}function $c(){}function ad(a){return null!=a};function bd(){}function cd(a,b){a=dd(a);b=dd(b);return a.split("-")[0]==b.split("-")[0]}function ed(a,b){a=dd(a);b=dd(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function fd(a,b){a=dd(a);b=dd(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
|
|
104
104
|
function dd(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=gd.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function id(a,b){a=dd(a);b=dd(b);return b==a?4:ed(b,a)?3:fd(b,a)?2:ed(a,b)?1:0}function jd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=gd.get(a)||a}
|
|
105
105
|
function kd(a){return a.language?dd(a.language):a.audio&&a.audio.language?dd(a.audio.language):a.video&&a.video.language?dd(a.video.language):"und"}
|
|
106
|
-
function ld(a,b){a=dd(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(dd(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,ed(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,fd(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,ed(a,b))return b;return null}
|
|
106
|
+
function ld(a,b){a=dd(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(dd(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,ed(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,fd(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,ed(a,b))return b;return null}N("shaka.util.LanguageUtils",bd);bd.findClosestLocale=ld;bd.getLocaleForVariant=kd;
|
|
107
107
|
bd.getLocaleForText=function(a){return dd(a.language||"und")};bd.getBase=jd;bd.relatedness=id;bd.areSiblings=function(a,b){var c=jd(a),d=jd(b);return a!=c&&b!=d&&c==d};bd.normalize=dd;bd.isSiblingOf=fd;bd.isParentOf=ed;bd.areLanguageCompatible=cd;bd.areLocaleCompatible=function(a,b){a=dd(a);b=dd(b);return a==b};
|
|
108
108
|
var gd=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",
|
|
109
109
|
"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",
|
|
110
110
|
"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",
|
|
111
111
|
"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",
|
|
112
112
|
"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",
|
|
113
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function md(){this.g={}}r=md.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function nd(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 WeakSet;return b(a)}function od(a){var b={},c;for(c in a)b[c]=a[c];return b};function pd(a){this.h=a;this.g=null}pd.prototype.U=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};pd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function qd(a){this.h=a;this.g=null}qd.prototype.
|
|
114
|
-
qd.prototype.tickAfter=qd.prototype.U;qd.prototype.tickNow=qd.prototype.
|
|
113
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function md(){this.g={}}r=md.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function nd(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 WeakSet;return b(a)}function od(a){var b={},c;for(c in a)b[c]=a[c];return b};function pd(a){this.h=a;this.g=null}pd.prototype.U=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};pd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function qd(a){this.h=a;this.g=null}qd.prototype.oc=function(){this.stop();this.h();return this};qd.prototype.U=function(a){var b=this;this.stop();this.g=(new pd(function(){b.h()})).U(a);return this};qd.prototype.Za=function(a){var b=this;this.stop();this.g=(new pd(function(){b.g.U(a);b.h()})).U(a);return this};qd.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",qd);qd.prototype.stop=qd.prototype.stop;qd.prototype.tickEvery=qd.prototype.Za;
|
|
114
|
+
qd.prototype.tickAfter=qd.prototype.U;qd.prototype.tickNow=qd.prototype.oc;function rd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function sd(a){return""!=td().canPlayType(a)}function ud(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function vd(){return wd("Xbox One")}function xd(){return wd("Tizen")}function yd(){return wd("Tizen 3")}function zd(){return wd("Tizen 2")}function Ad(){return wd("Web0S")&&wd("Chrome/38.0.2125.122 Safari/537.36")}function Bd(){return wd("CrKey")}
|
|
115
115
|
function Cd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!xd()&&!wd("PC=EOS")&&!wd("PC=APL")&&!wd("VirginMedia")&&!wd("SOPOpenBrowser")&&!Dd()&&!wd("AFT")&&!wd("WPE")}function Dd(){return wd("PlayStation 4")}function Id(){if(!Cd())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 wd(a){return(navigator.userAgent||"").includes(a)}
|
|
116
116
|
function td(){if(Jd)return Jd;Kd||(Kd=new qd(function(){Jd=null}));(Jd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Jd=document.createElement("video"));Kd.U(1);return Jd}var Kd=null,Jd=null;function Ld(){}
|
|
117
|
-
function Md(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Nd(e,b,c);if(d.length){b=new md;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var
|
|
117
|
+
function Md(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Nd(e,b,c);if(d.length){b=new md;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var x=[],z={};v=t(v);for(var y=v.next();!y.done;z={Ec:z.Ec},y=v.next())z.Ec=y.value,y=d.filter(function(B){return function(A){return B.Ec.decodingInfos[0][A]}}(z)).length,y>u?(u=y,x=[z.Ec]):y==u&&x.push(z.Ec);f.push.apply(f,w(x))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
|
|
118
118
|
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Kc(m.codecs),q=Kc(g.codecs);n==q&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(u,
|
|
119
|
-
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=bb();var p=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Kc(m.codecs),q=Kc(g.codecs),n!==q))continue;g.width>m.width||g.height>m.height?(l.push(g),p.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Kc(m.codecs),q=Kc(g.codecs),n==q&&g.bandwidth
|
|
119
|
+
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=bb();var p=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Kc(m.codecs),q=Kc(g.codecs),n!==q))continue;g.width>m.width||g.height>m.height?(l.push(g),p.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Kc(m.codecs),q=Kc(g.codecs),n==q&&g.bandwidth>m.bandwidth&&(l.push(g),p.push(g.id)))}else l.push(g),
|
|
120
120
|
p.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!p.includes(u.id)?!1:!0})}
|
|
121
|
-
function Nd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={
|
|
121
|
+
function Nd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={fe:d.fe},e=b.next())if(d.fe=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.fe)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Zd:d.Zd},b=c.next())if(d.Zd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Zd)}}(d)),b.length){a=b;break}return a}function Od(a,b,c){a.variants=a.variants.filter(function(d){return Pd(d,b,c)})}
|
|
122
122
|
function Pd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;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}
|
|
123
123
|
function Qd(a,b){return K(function(c){if(1==c.g)return C(c,Rd(a,b,0<b.offlineSessionIds.length),2);Sd(b);return C(c,Td(b),0)})}
|
|
124
124
|
function Rd(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g)return C(k,Ud(b.variants,c,!1,[]),2);d=null;a&&(e=a.g)&&(d=e.keySystem);f=Ec;g=vd();h=wd("Firefox")&&wd("Android");b.variants=b.variants.filter(function(l){var m=l.video,n=m&&m.width||0,q=m&&m.height||0;if(g&&m&&(1920<n||1080<q)&&(m.codecs.includes("avc1.")||m.codecs.includes("avc3.")))return Wa(Vd(l)),!1;if(m){n=Wd(m.codecs);if(m.codecs.includes(",")){q=m.codecs.split(",");n=zc(f.$,q);n=Wd(n);q=zc(f.O,q);q=Xd(q);var p=Jc(m.mimeType,
|
|
125
125
|
q,f.O);if(!Za(p))return!1;n=[n,q].join()}q=Jc(m.mimeType,n,f.$);if(!Za(q))return!1;m.codecs=n}m=l.audio;if(h&&m&&m.encrypted&&m.codecs.toLowerCase().includes("opus"))return Wa(Vd(l)),!1;if(m){n=Xd(m.codecs);q=Jc(m.mimeType,n,f.O);if(!Za(q))return!1;m.codecs=n}(m=l.decodingInfos.some(function(u){return!u.supported||d&&(u=u.keySystemAccess)&&u.keySystem!=d?!1:!0}))||Wa(Vd(l));return m});E(k)})}
|
|
126
126
|
function Yd(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=Yd(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
127
127
|
function Zd(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=Yd(b),d=$d,d[c]?(a.decodingInfos.push(d[c]),l.B(0)):C(l,ae(b),3);if((e=l.h)&&e.length){f=null;g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,f?(f.supported=f.supported&&k.supported,f.powerEfficient=f.powerEfficient&&k.powerEfficient,f.smooth=f.smooth&&k.smooth,k.keySystemAccess||(f.keySystemAccess=null)):f=k;f&&(d[c]=f,a.decodingInfos.push(f))}E(l)})}
|
|
128
|
-
function ae(a){var b=[""];a.video&&(b=Oc(a.video.contentType).split(","));var c=[""];a.audio&&(c=Oc(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={
|
|
128
|
+
function ae(a){var b=[""];a.video&&(b=Oc(a.video.contentType).split(","));var c=[""];a.audio&&(c=Oc(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={Fb:f.Fb},h=g.next())h=h.value,f.Fb=nd(a),a.video&&(f.Fb.video.contentType=Gc(Nc(f.Fb.video.contentType),e)),a.audio&&(f.Fb.audio.contentType=Gc(Nc(f.Fb.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Fb).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
129
129
|
return null})}
|
|
130
|
-
function Ud(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,
|
|
131
|
-
Zd(n,v),9);case 9:u=p.next();D.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();D.B(5);break;case 7:if(k)return D.return();f={
|
|
130
|
+
function Ud(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){switch(D.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return D.return();f={};g=t(d);h=g.next();case 2:if(h.done){D.B(4);break}f.ae=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){D.B(7);break}n=m.value;q=be(n,b,c).filter(function(F){return function(J){return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.ae}}(f));p=t(q);u=p.next();case 8:if(u.done){D.B(10);break}v=u.value;return C(D,
|
|
131
|
+
Zd(n,v),9);case 9:u=p.next();D.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();D.B(5);break;case 7:if(k)return D.return();f={ae:f.ae};h=g.next();D.B(2);break;case 4:x=t(a),m=x.next();case 12:if(m.done){D.B(0);break}z=m.value;y=be(z,b,c).filter(function(F){F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});B=t(y);u=B.next();case 15:if(u.done){m=x.next();D.B(12);break}A=u.value;return C(D,Zd(z,A),16);case 16:u=B.next(),D.B(15)}})}
|
|
132
132
|
function be(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=zc("video",g);f=Wd(f);g=zc("audio",g);g=Xd(g);g=Jc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Wd(f);f=Jc(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=
|
|
133
|
-
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
133
|
+
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Jc(d.mimeType,Xd(d.codecs),"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,
|
|
134
134
|
[]);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 q=new Set,p=t(h.initData),u=p.next();!u.done;u=p.next())q.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
135
135
|
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
|
|
136
|
-
function Xd(a){return"fLaC"===a?"flac":"Opus"===a?"opus":
|
|
136
|
+
function Xd(a){return"fLaC"===a?"flac":"Opus"===a?"opus":a}function Wd(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Sd(a){a.textStreams=a.textStreams.filter(function(b){b=Gc(b.mimeType,b.codecs);return Qc(b)})}
|
|
137
137
|
function Td(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.B(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(ce.has(f)){l.B(5);break}g=de.get(f);if(!g){ce.set(f,!1);l.B(5);break}return C(l,ee(g),7);case 7:h=l.h,ce.set(f,h);case 5:(k=ce.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,E(l)}})}
|
|
138
138
|
function ee(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)}})}
|
|
139
139
|
function fe(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),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=t(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
@@ -149,17 +149,17 @@ function le(a){var b=a.language;return{id:ie(a),active:!1,type:"",bandwidth:0,la
|
|
|
149
149
|
originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function ne(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function oe(a){return a.filter(function(b){return ne(b)})}
|
|
150
150
|
function pe(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=ld(dd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return dd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=qe(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(Zc,[]);return a.length?
|
|
151
151
|
qe(e,a[0]):e}function qe(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Vd(a){var b=[];a.audio&&b.push(re(a.audio));a.video&&b.push(re(a.video));return b.join(", ")}
|
|
152
|
-
function re(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"}
|
|
153
|
-
var $d={},je=0,ce=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),de=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function se(){var a=this;this.s=null;this.o=!1;this.i=new
|
|
152
|
+
function re(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"}N("shaka.util.StreamUtils",Ld);Ld.meetsRestrictions=Pd;
|
|
153
|
+
var $d={},je=0,ce=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),de=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function se(){var a=this;this.s=null;this.o=!1;this.i=new Pa;this.A=null;navigator.connection&&navigator.connection.addEventListener&&(this.A=function(){if(a.o&&a.g.useNetworkInformation){a.i=new Pa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}},navigator.connection.addEventListener("change",this.A));this.m=[];this.C=1;this.G=!1;this.h=this.l=this.g=this.u=null;this.F=new qd(function(){if(a.g.restrictToElementSize){var b=
|
|
154
154
|
a.chooseVariant();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}r=se.prototype;r.stop=function(){this.s=null;this.o=!1;this.m=[];this.C=1;this.l=this.u=null;this.h&&(this.h.disconnect(),this.h=null);this.F.stop();this.j=null};r.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.A),this.A=null);this.F=null};r.init=function(a){this.s=a};
|
|
155
155
|
r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.l.clientHeight*d);c=Math.min(c,this.l.clientWidth*d)}var e=this.m.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
|
|
156
156
|
this.m);d=e;a&&e.length!=this.m.length&&(d=this.m.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=te(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=ue(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=te(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=te(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
157
157
|
a[d];for(var f=isNaN(this.C)?1:Math.abs(this.C),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.u=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};r.segmentDownloaded=function(a,b,c){this.i.sample(a,b);c&&null!=this.u&&this.o&&ve(this)};
|
|
158
158
|
r.trySuggestStreams=function(){null!=this.u&&this.o&&ve(this)};r.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.C=a};
|
|
159
159
|
r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.F.U(we)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
160
|
-
function ve(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.u<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function te(a,b,c,d,e){if(a.j){var f=a.j.
|
|
161
|
-
function ue(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}
|
|
162
|
-
se.prototype.getBandwidthEstimate=se.prototype.getBandwidthEstimate;se.prototype.trySuggestStreams=se.prototype.trySuggestStreams;se.prototype.segmentDownloaded=se.prototype.segmentDownloaded;se.prototype.disable=se.prototype.disable;se.prototype.enable=se.prototype.enable;se.prototype.chooseVariant=se.prototype.chooseVariant;se.prototype.init=se.prototype.init;se.prototype.release=se.prototype.release;se.prototype.stop=se.prototype.stop;var we=1;function xe(a,b){this.g=a;this.h=b}xe.prototype.toString=function(){return"v"+this.g+"."+this.h};function ye(a,b){var c=new xe(5,0),d=ze,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Ae(a,b,c,d){
|
|
160
|
+
function ve(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.u<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function te(a,b,c,d,e){if(a.j){var f=a.j.Rf();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Pd(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
161
|
+
function ue(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}N("shaka.abr.SimpleAbrManager",se);se.prototype.configure=se.prototype.configure;se.prototype.setCmsdManager=se.prototype.setCmsdManager;se.prototype.setMediaElement=se.prototype.setMediaElement;se.prototype.playbackRateChanged=se.prototype.playbackRateChanged;se.prototype.setVariants=se.prototype.setVariants;
|
|
162
|
+
se.prototype.getBandwidthEstimate=se.prototype.getBandwidthEstimate;se.prototype.trySuggestStreams=se.prototype.trySuggestStreams;se.prototype.segmentDownloaded=se.prototype.segmentDownloaded;se.prototype.disable=se.prototype.disable;se.prototype.enable=se.prototype.enable;se.prototype.chooseVariant=se.prototype.chooseVariant;se.prototype.init=se.prototype.init;se.prototype.release=se.prototype.release;se.prototype.stop=se.prototype.stop;var we=1;function xe(a,b){this.g=a;this.h=b}xe.prototype.toString=function(){return"v"+this.g+"."+this.h};function ye(a,b){var c=new xe(5,0),d=ze,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Ae(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Be(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var ze=null;N("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});N("shaka.config.CodecSwitchingStrategy",{Hi:"reload",yg:"smooth"});function Ce(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Ce.prototype.add=function(a,b,c){return De(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
163
163
|
function De(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!Fe(e,f)||!Ge(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Fe(a,b))&&Ge(a.roles,b.roles)));return d?!1:!0}Ce.prototype.values=function(){return this.g.values()};
|
|
164
164
|
function Fe(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Mc(d)});b=b.codecs.split(",").map(function(d){return Mc(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Ge(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function He(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Ie(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}He.prototype.create=function(a){var b=this,c="smooth"==this.h&&bb(),d=a.filter(function(e){return De(b.i,e,!c,b.g)});return d.length?new Ce(d[0],d,!c,this.g):this.j.create(a)};
|
|
165
165
|
function Ie(a,b,c,d,e,f,g,h,k,l){this.s=a;this.u=b;this.h=c;this.i=d;this.A=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.o=void 0===l?!1:l}
|
|
@@ -169,38 +169,38 @@ function Ne(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCou
|
|
|
169
169
|
function Xe(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 O(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 C(d,new Promise(function(e){(new qd(e)).U(c/1E3)}),2)}a.h*=a.m;E(d)})}function We(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ye(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ye.prototype.resolve=function(){};Ye.prototype.reject=function(){};function Ze(a,b){this.promise=a;this.i=b;this.g=!1}function $e(a){return new Ze(Promise.reject(a),function(){return Promise.resolve()})}function af(){var a=Promise.reject(new O(2,7,7001));a.catch(function(){});return new Ze(a,function(){return Promise.resolve()})}function bf(a){return new Ze(Promise.resolve(a),function(){return Promise.resolve()})}function cf(a){return new Ze(a,function(){return a.catch(function(){})})}Ze.prototype.abort=function(){this.g=!0;return this.i()};
|
|
170
170
|
function df(a){return new Ze(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ze.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
171
171
|
Ze.prototype.pa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=ef(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ye,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new Ze(f,function(){return d()})};
|
|
172
|
-
function ef(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()}}}
|
|
173
|
-
function ff(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};
|
|
174
|
-
var gf={
|
|
175
|
-
|
|
176
|
-
hf.prototype.release=function(){this.ka=null};function jf(){this.g=[]}function kf(a,b){a.g.push(b.finally(function(){tb(a.g,b)}))}jf.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 lf(a,b,c,d,e){hf.call(this);this.i=!1;this.m=new jf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.u=d||null;this.A=e||null;this.o=!1}oa(lf,hf);r=lf.prototype;r.
|
|
177
|
-
r.
|
|
172
|
+
function ef(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()}}}N("shaka.util.AbortableOperation",Ze);Ze.prototype.chain=Ze.prototype.pa;Ze.prototype["finally"]=Ze.prototype.finally;Ze.all=df;Ze.prototype.abort=Ze.prototype.abort;Ze.notAbortable=cf;Ze.completed=bf;Ze.aborted=af;Ze.failed=$e;function Q(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}
|
|
173
|
+
function ff(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};N("shaka.util.FakeEvent",Q);
|
|
174
|
+
var gf={hi:"abrstatuschanged",ii:"adaptation",ji:"buffering",ki:"complete",li:"downloadfailed",mi:"downloadheadersreceived",ni:"drmsessionupdate",pi:"emsg",Gi:"prft",Error:"error",ri:"expirationupdated",si:"firstquartile",ti:"gapjumped",wi:"keystatuschanged",yi:"loaded",zi:"loading",Bi:"manifestparsed",Ci:"manifestupdated",Di:"mediaqualitychanged",Metadata:"metadata",Ei:"midpoint",Fi:"onstatechange",Ii:"ratechange",Ji:"segmentappended",Ki:"sessiondata",Li:"stalldetected",Mi:"started",Ni:"statechanged",
|
|
175
|
+
Oi:"streaming",Pi:"textchanged",Qi:"texttrackvisibility",Ri:"thirdquartile",Si:"timelineregionadded",Ti:"timelineregionenter",Ui:"timelineregionexit",Vi:"trackschanged",Xi:"unloading",Zi:"variantchanged"};function hf(){this.ka=new md;this.zd=this}hf.prototype.addEventListener=function(a,b){this.ka&&this.ka.push(a,b)};hf.prototype.removeEventListener=function(a,b){this.ka&&this.ka.remove(a,b)};hf.prototype.dispatchEvent=function(a){if(!this.ka)return!0;var b=this.ka.get(a.type)||[],c=this.ka.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.zd;a.currentTarget=this.zd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
176
|
+
hf.prototype.release=function(){this.ka=null};function jf(){this.g=[]}function kf(a,b){a.g.push(b.finally(function(){tb(a.g,b)}))}jf.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 lf(a,b,c,d,e){hf.call(this);this.i=!1;this.m=new jf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.u=d||null;this.A=e||null;this.o=!1}oa(lf,hf);r=lf.prototype;r.nf=function(a){this.o=a};function mf(a,b,c,d){c=c||nf;var e=of[a];if(!e||c>=e.priority)of[a]={priority:c,Ud:b,Ih:void 0===d?!1:d}}r.Jh=function(a){this.g.add(a)};r.bi=function(a){this.g.delete(a)};r.Hg=function(){this.g.clear()};r.Kh=function(a){this.h.add(a)};r.ci=function(a){this.h.delete(a)};
|
|
177
|
+
r.Ig=function(){this.h.clear()};function pf(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();hf.prototype.release.call(this);return this.m.destroy()};
|
|
178
178
|
r.request=function(a,b,c){var d=this,e=new qf;if(this.i){var f=Promise.reject(new O(2,7,7001));f.catch(function(){});return new rf(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?nd(b.retryParameters):We();b.uris=nd(b.uris);f=sf(this,a,b,c);var g=f.pa(function(){return tf(d,a,b,c,new Ve(b.retryParameters,!1),0,null,e)}),h=g.pa(function(q){return uf(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
179
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.pa(function(q){var p=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=p;q.
|
|
179
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.pa(function(q){var p=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=p;q.qh||!d.l||u.fromCache||"HEAD"==b.method||a!=vf||d.l(u.timeMs,u.data.byteLength,wf(c));return u},function(q){q&&(q.severity=2);throw q;});f=new rf(n.promise,function(){return n.abort()},e);kf(this.m,f);return f};
|
|
180
180
|
function sf(a,b,c,d){function e(h){f=f.pa(function(){c.body&&(c.body=kb(c.body));return h(b,c,d)})}var f=bf(void 0);a.u&&e(a.u);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.pa(void 0,function(h){if(h instanceof O&&7001==h.code)throw h;throw new O(2,1,1006,h);})}
|
|
181
|
-
function tf(a,b,c,d,e,f,g,h){a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.A&&a.A(b,d,c.uris[f],c.uris[f-1]);var k=new fc(c.uris[f]),l=k
|
|
182
|
-
m=!0,h.g=J)},function(D){a.j&&a.j(D,c,b);
|
|
183
|
-
B,A,v)}if(a.i)return af();v&&(
|
|
184
|
-
function uf(a,b,c,d){var e=bf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={
|
|
185
|
-
lf.prototype.request=lf.prototype.request;lf.prototype.destroy=lf.prototype.destroy;lf.makeRequest=pf;lf.defaultRetryParameters=function(){return We()};lf.prototype.clearAllResponseFilters=lf.prototype.
|
|
186
|
-
lf.registerScheme=mf;lf.prototype.setForceHTTPS=lf.prototype.
|
|
187
|
-
r.
|
|
188
|
-
Af.prototype.
|
|
181
|
+
function tf(a,b,c,d,e,f,g,h){a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.A&&a.A(b,d,c.uris[f],c.uris[f-1]);var k=new fc(c.uris[f]),l=k.$a,m=!1;l||(l=location.protocol,l=l.slice(0,-1),gc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=of[l])?l.Ud:null;if(!n)return $e(new O(2,1,1E3,k));var q=l.Ih,p=null,u=null,v=!1,x=!1,z;return cf(Xe(e)).pa(function(){if(a.i)return af();z=Date.now();var y=n(c.uris[f],c,b,function(D,F,J){p&&p.stop();u&&u.U(A/1E3);a.l&&b==vf&&(a.l(D,F,wf(d)),
|
|
182
|
+
m=!0,h.g=J)},function(D){a.j&&a.j(D,c,b);x=!0});if(!q)return y;var B=c.retryParameters.connectionTimeout;B&&(p=new qd(function(){v=!0;y.abort()}),p.U(B/1E3));var A=c.retryParameters.stallTimeout;A&&(u=new qd(function(){v=!0;y.abort()}));return y}).pa(function(y){p&&p.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-z);var B={response:y,qh:m};!x&&a.j&&a.j(y.headers,c,b);return B},function(y){p&&p.stop();u&&u.stop();if(a.s){var B=null,A=0;y instanceof O&&(B=y,1001==y.code&&(A=y.data[1]));a.s(c,
|
|
183
|
+
B,A,v)}if(a.i)return af();v&&(y=new O(1,1,1003,c.uris[f],b));if(y instanceof O){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return B=(new Map).set("error",y),B=new Q("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,tf(a,b,c,d,e,f,y,h)}throw y;})}
|
|
184
|
+
function uf(a,b,c,d){var e=bf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={ce:f.ce},g=a.next())f.ce=g.value,e=e.pa(function(h){return function(){var k=c.response;k.data&&(k.data=kb(k.data));return h.ce(b,k,d)}}(f));return e.pa(function(){return c},function(h){var k=2;if(h instanceof O){if(7001==h.code)throw h;k=h.severity}throw new O(k,1,1007,h);})}function wf(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Zc)return!1}return!0}N("shaka.net.NetworkingEngine",lf);
|
|
185
|
+
lf.prototype.request=lf.prototype.request;lf.prototype.destroy=lf.prototype.destroy;lf.makeRequest=pf;lf.defaultRetryParameters=function(){return We()};lf.prototype.clearAllResponseFilters=lf.prototype.Ig;lf.prototype.unregisterResponseFilter=lf.prototype.ci;lf.prototype.registerResponseFilter=lf.prototype.Kh;lf.prototype.clearAllRequestFilters=lf.prototype.Hg;lf.prototype.unregisterRequestFilter=lf.prototype.bi;lf.prototype.registerRequestFilter=lf.prototype.Jh;lf.unregisterScheme=function(a){delete of[a]};
|
|
186
|
+
lf.registerScheme=mf;lf.prototype.setForceHTTPS=lf.prototype.nf;function qf(){this.g=0}lf.NumBytesRemainingClass=qf;function rf(a,b,c){Ze.call(this,a,b);this.h=c}oa(rf,Ze);lf.PendingRequest=rf;var vf=1;lf.RequestType={MANIFEST:0,SEGMENT:vf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};lf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var nf=3;lf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:nf};var of={};function xf(a){this.g=!1;this.h=new Ye;this.i=a}xf.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 yf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function zf(){this.g=new md}r=zf.prototype;r.release=function(){this.Ya();this.g=null};r.D=function(a,b,c,d){this.g&&(a=new Af(a,b,c,d),this.g.push(b,a))};r.ja=function(a,b,c,d){function e(g){f.Vb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};r.Vb=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.Vb(),this.g.remove(b,e))}};
|
|
187
|
+
r.Ya=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Vb();this.g.g={}}};N("shaka.util.EventManager",zf);zf.prototype.removeAll=zf.prototype.Ya;zf.prototype.unlisten=zf.prototype.Vb;zf.prototype.listenOnce=zf.prototype.ja;zf.prototype.listen=zf.prototype.D;zf.prototype.release=zf.prototype.release;function Af(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Bf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
188
|
+
Af.prototype.Vb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Bf(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 Cf(a)?b:b.capture||!1}
|
|
189
189
|
function Cf(a){var b=Df;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}Df=b}return b||!1}var Df=void 0;function Ef(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Ff(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Gf(a){this.h=a;this.g=void 0}Gf.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Hf(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 If(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Jf(){}
|
|
190
|
-
function Kf(a){if(!a)return"";a=hb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Dd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&
|
|
190
|
+
function Kf(a){if(!a)return"";a=hb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Dd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ra('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==
|
|
191
191
|
(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}
|
|
192
192
|
function Nf(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=nb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Of.value()(d)}
|
|
193
193
|
function Pf(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=hb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Kf(c);if(254==c[0]&&255==c[1])return Nf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Nf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Nf(a,!1);if(0==c[1]&&0==c[3])return Nf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Kf(a);throw new O(2,2,2003);}
|
|
194
|
-
function Qf(a){if(window.TextEncoder&&!Dd()){var b=new TextEncoder;return kb(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 kb(b)}function Rf(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}
|
|
195
|
-
Jf.fromUTF8=Kf;var Of=new Gf(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={
|
|
196
|
-
r.
|
|
197
|
-
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Uf();this.g+=a};r.
|
|
198
|
-
Sf.prototype.skip=Sf.prototype.skip;Sf.prototype.readBytes=Sf.prototype.
|
|
199
|
-
r.
|
|
200
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.qa(),b.getLength()-b.qa()))}};function $f(a){for(var b=ag(a);a.reader.ia()&&!a.parser.g;)a.parser.
|
|
201
|
-
function dg(a){return function(b){a(b.reader.
|
|
194
|
+
function Qf(a){if(window.TextEncoder&&!Dd()){var b=new TextEncoder;return kb(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 kb(b)}function Rf(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}N("shaka.util.StringUtils",Jf);Jf.resetFromCharCode=function(){Of.g=void 0};Jf.toUTF16=Rf;Jf.toUTF8=Qf;Jf.fromBytesAutoDetect=Pf;Jf.fromUTF16=Nf;
|
|
195
|
+
Jf.fromUTF8=Kf;var Of=new Gf(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={xb:65536};0<b.xb;b={xb:b.xb},b.xb/=2)if(a(b.xb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.xb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.xb));return e}}(b);return null});function Sf(a,b){this.h=nb(a);this.i=b==Tf;this.g=0}r=Sf.prototype;r.ia=function(){return this.g<this.h.byteLength};r.qa=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.ga=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Uf();}};r.Ea=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Uf();}};r.L=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Uf();}};
|
|
196
|
+
r.fg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Uf();}};r.mc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Uf();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.sb=function(a){if(this.g+a>this.h.byteLength)throw Uf();var b=hb(this.h,this.g,a);this.g+=a;return b};
|
|
197
|
+
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Uf();this.g+=a};r.Rh=function(a){if(this.g<a)throw Uf();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Uf();this.g=a};r.ad=function(){for(var a=this.g;this.ia()&&0!=this.h.getUint8(this.g);)this.g+=1;a=hb(this.h,a,this.g-a);this.g+=1;return Kf(a)};function Uf(){return new O(2,3,3E3)}N("shaka.util.DataViewReader",Sf);Sf.prototype.readTerminatedString=Sf.prototype.ad;Sf.prototype.seek=Sf.prototype.seek;Sf.prototype.rewind=Sf.prototype.Rh;
|
|
198
|
+
Sf.prototype.skip=Sf.prototype.skip;Sf.prototype.readBytes=Sf.prototype.sb;Sf.prototype.readUint64=Sf.prototype.mc;Sf.prototype.readInt32=Sf.prototype.fg;Sf.prototype.readUint32=Sf.prototype.L;Sf.prototype.readUint16=Sf.prototype.Ea;Sf.prototype.readUint8=Sf.prototype.ga;Sf.prototype.getLength=Sf.prototype.getLength;Sf.prototype.getPosition=Sf.prototype.qa;Sf.prototype.hasMoreData=Sf.prototype.ia;var Tf=1;Sf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Tf};function Vf(){this.i=[];this.h=[];this.g=!1}r=Vf.prototype;r.box=function(a,b){a=Wf(a);this.i[a]=Xf;this.h[a]=b;return this};r.P=function(a,b){a=Wf(a);this.i[a]=Yf;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Sf(a,0);for(this.g=!1;a.ia()&&!this.g;)this.Yc(0,a,b,c)};
|
|
199
|
+
r.Yc=function(a,b,c,d){var e=b.qa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.L(),g=b.L(),h=Zf(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.qa()+8>b.getLength()){this.g=!0;return}f=b.mc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Yf){if(d&&b.qa()+4>b.getLength()){this.g=!0;return}n=b.L();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.qa(),b=0<d?b.sb(d):new Uint8Array(0),b=new Sf(b,0),l({name:h,parser:this,
|
|
200
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.qa(),b.getLength()-b.qa()))}};function $f(a){for(var b=ag(a);a.reader.ia()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}function bg(a){for(var b=ag(a),c=a.reader.L(),d=0;d<c&&(a.parser.Yc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function cg(a){var b=ag(a);for(a.reader.skip(78);a.reader.ia()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}
|
|
201
|
+
function dg(a){return function(b){a(b.reader.sb(b.reader.getLength()-b.reader.qa()))}}function Wf(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 Zf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function ag(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",Vf);Vf.headerSize=ag;Vf.typeToString=Zf;Vf.allData=dg;Vf.visualSampleEntry=cg;Vf.sampleDescription=bg;Vf.children=$f;Vf.prototype.parseNext=Vf.prototype.Yc;
|
|
202
202
|
Vf.prototype.parse=Vf.prototype.parse;Vf.prototype.stop=Vf.prototype.stop;Vf.prototype.fullBox=Vf.prototype.P;Vf.prototype.box=Vf.prototype.box;var Xf=0,Yf=1;function eg(){}function fg(a){a=hb(a);a=Of.value()(a);return btoa(a)}function gg(a,b){b=void 0==b?!0:b;a=fg(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function hg(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 ig(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}
|
|
203
|
-
function jg(a){var b=hb(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 kg(){for(var a=Fa.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(hb(e),c);c+=e.byteLength}return b}
|
|
203
|
+
function jg(a){var b=hb(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 kg(){for(var a=Fa.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(hb(e),c);c+=e.byteLength}return b}N("shaka.util.Uint8ArrayUtils",eg);eg.concat=kg;eg.toHex=jg;eg.fromHex=ig;eg.fromBase64=hg;eg.toBase64=gg;eg.toStandardBase64=fg;function lg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Vf).box("moov",$f).box("moof",$f).P("pssh",function(c){if(!(1<c.version)){var d=hb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(jg(c.reader.sb(16)));if(0<c.version){d=c.reader.L();for(var e=0;e<d;e++){var f=jg(c.reader.sb(16));b.h.push(f)}}}}).parse(a)}
|
|
204
204
|
function mg(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=nb(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=ig(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function ng(a,b){a=og(a,b);return 1!=a.length?null:a[0]}function pg(a,b,c){a=qg(a,b,c);return 1!=a.length?null:a[0]}function og(a,b){var c=[];a=t(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function rg(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
205
205
|
function qg(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 sg(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function tg(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 ug(a){return Array.from(a.childNodes).every(vg)?a.textContent.trim():null}
|
|
206
206
|
function vg(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function wg(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 xg(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}
|
|
@@ -208,62 +208,62 @@ function yg(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-
|
|
|
208
208
|
function zg(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 Ag(a){a=Number(a);return 0===a%1?a:null}function Bg(a){a=Number(a);return 0===a%1&&0<a?a:null}function Cg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Dg(a){a=Number(a);return isNaN(a)?null:a}function Eg(a){return a?"true"===a.toLowerCase():!1}
|
|
209
209
|
function Fg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
210
210
|
function Gg(a,b){var c=new DOMParser,d=Hg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Ig(a,b){try{var c=Pf(a);return Gg(c,b)}catch(d){return null}}
|
|
211
|
-
var Hg=new Gf(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Jg(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.H=new Set;this.m=this.s=null;this.ma=this.da=!1;this.I=0;this.g=null;this.A=new zf;this.i=new Map;this.u=new Map;this.l=new Ye;this.h=null;this.o=function(d){2==d.severity&&c.l.reject(d);a.onError(d)};this.V=new Map;this.ea=new Map;this.W=new qd(function(){return Kg(c)});this.K=!1;this.J=[];this.N=!1;this.ka=(new qd(function(){Lg(c)})).
|
|
211
|
+
var Hg=new Gf(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Jg(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.H=new Set;this.m=this.s=null;this.ma=this.da=!1;this.I=0;this.g=null;this.A=new zf;this.i=new Map;this.u=new Map;this.l=new Ye;this.h=null;this.o=function(d){2==d.severity&&c.l.reject(d);a.onError(d)};this.V=new Map;this.ea=new Map;this.W=new qd(function(){return Kg(c)});this.K=!1;this.J=[];this.N=!1;this.ka=(new qd(function(){Lg(c)})).Za(b);this.l.catch(function(){});this.j=new xf(function(){return Mg(c)});this.Y=!1;this.F=this.G=null}
|
|
212
212
|
r=Jg.prototype;r.destroy=function(){return this.j.destroy()};function Mg(a){return K(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.l.reject(),a.ka.stop(),a.ka=null,a.W.stop(),a.W=null,C(b,Ng(a),2);case 2:if(!a.m){b.B(3);break}sa(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:va(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.u=new Map,a.h=null,a.o=function(){},a.C=null,a.Y=!1,a.G=null,E(b)}})}r.configure=function(a){this.h=a};
|
|
213
213
|
function Og(a,b,c){a.ma=!0;a.u=new Map;a.K=c;return Pg(a,b)}function Qg(a,b,c){a.u=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.u.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.u.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.K=0<a.u.size;return Pg(a,b)}
|
|
214
214
|
function Rg(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 Sg(a,g,[])}
|
|
215
|
-
function Pg(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
216
|
-
v.next())
|
|
215
|
+
function Pg(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y;return K(function(B){if(1==B.g){if(c=Tg(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(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});g||(h=Hf(a.h.servers),Ug(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Vg(m),q=t(n),p=q.next();!p.done;p=q.next())u=p.value,k.add(u);v=t(k);for(p=v.next();!p.done;p=
|
|
216
|
+
v.next())x=p.value,Wg(x,Hf(a.h.servers),Hf(a.h.advanced||{}),a.h.keySystemsMapping);return C(B,Ud(b,a.K,a.Y,a.h.preferredKeySystems),2)}z=g||Object.keys(a.h.servers).length;if(!z)return a.da=!0,B.return(Promise.resolve());y=Sg(a,void 0,b);return B.return(g?y:y.catch(function(){}))})}
|
|
217
217
|
function Xg(a){var b;return K(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.B(2);break}return C(c,a.G,3);case 3:return yf(a.j),c.return();case 2:return sa(c,4),a.G=a.m.setMediaKeys(a.s),C(c,a.G,6);case 6:ua(c,5);break;case 4:b=va(c),a.o(new O(2,6,6003,b.message));case 5:yf(a.j),E(c)}})}function Yg(a,b){return K(function(c){if(1==c.g)return C(c,Xg(a),2);Zg(a,b.initDataType,hb(b.initData));E(c)})}
|
|
218
|
-
r.
|
|
218
|
+
r.Gc=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.s)return b.A.ja(a,"encrypted",function(){b.o(new O(2,6,6010))}),c.return();b.m=a;b.A.ja(b.m,"play",function(){for(var d=t(b.J),e=d.next();!e.done;e=d.next())$g(b,e.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.A.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ng(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
|
|
219
219
|
b.u.size?C(c,Xg(b),2):c.B(2)}ah(b).catch(function(){});b.F||b.u.size||b.h.parseInbandPsshEnabled||b.A.D(b.m,"encrypted",function(d){return Yg(b,d)});E(c)})};
|
|
220
|
-
function bh(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.B(2);break}b=pf([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.C.
|
|
221
|
-
sa(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=va(g),new O(2,6,6004,f.message);}})}function ch(a,b){var c,d,e;return K(function(f){if(1==f.g)return C(f,dh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.
|
|
220
|
+
function bh(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.B(2);break}b=pf([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.C.Tb.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=hb(d.data);ua(g,4);break;case 3:throw e=va(g),new O(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();
|
|
221
|
+
sa(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=va(g),new O(2,6,6004,f.message);}})}function ch(a,b){var c,d,e;return K(function(f){if(1==f.g)return C(f,dh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.gb=new Ye,d.push(e.gb);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);E(f)})}
|
|
222
222
|
function ah(a){var b,c,d,e,f;return K(function(g){if(1==g.g){if(!a.u.size)return g.B(2);a.u.forEach(function(h,k){dh(a,k,h)});return C(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&eh(a))return g.return(a.l);a.l=new Ye;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Zg(a,f.initDataType,f.initData);c.length||a.l.resolve();return g.return(a.l)})}
|
|
223
223
|
function Zg(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(fb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&fh(a)&&(a.l.resolve(),a.l=new Ye,a.l.catch(function(){}));gh(a,b,c,a.g.sessionType)}}function hh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function ih(a){a=a.i.keys();a=Ef(a,function(b){return b.sessionId});return Array.from(a)}
|
|
224
|
-
r.
|
|
225
|
-
function Sg(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
224
|
+
r.Ee=function(){var a=this,b=this.i.keys();b=Ef(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.Pc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Bd=function(){return If(this.ea)};
|
|
225
|
+
function Sg(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z;return K(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=jh(a,c,d);y.B(2);break}return C(y,kh(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new O(2,6,6001);yf(a.j);sa(y,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());q=t(k);for(m=q.next();!m.done;m=q.next())p=m.value,a.H.add(p.contentType.toLowerCase());if(c.length){var B=
|
|
226
226
|
f.keySystem;var A=d.get(f.keySystem);var D=[],F=[],J=[],G=[],H=new Set;lh(A,D,J,F,G,H);var I=a.K?"persistent-license":"temporary";B={keySystem:B,licenseServerUri:D[0],distinctiveIdentifierRequired:A[0].distinctiveIdentifierRequired,persistentStateRequired:A[0].persistentStateRequired,sessionType:A[0].sessionType||I,audioRobustness:A[0].audioRobustness||"",videoRobustness:A[0].videoRobustness||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:G,keyIds:H};A=t(A);for(D=A.next();!D.done;D=
|
|
227
227
|
A.next())D=D.value,D.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(B.persistentStateRequired=D.persistentStateRequired);A=B}else A=f.keySystem,B=b.get(f.keySystem),D=[],F=[],J=[],G=[],H=new Set,lh(B.drmInfos,D,J,F,G,H),A={keySystem:A,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?
|
|
228
|
-
B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:G,keyIds:H};a.g=A;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return C(
|
|
229
|
-
6,6018);yf(a.j);ua(
|
|
230
|
-
function jh(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Vg(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new O(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={
|
|
231
|
-
l
|
|
232
|
-
function kh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
233
|
-
z.h,z.return(c);case 6:va(z);case 7:yf(a.j);case 3:h=g.next();z.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.B(11);break}q=n.value;p=t(b.keys());h=p.next();case 12:if(h.done){n=m.next();z.B(9);break}u=h.value;v=b.get(u);
|
|
228
|
+
B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:G,keyIds:H};a.g=A;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return C(y,f.createMediaKeys(),6);case 6:u=y.h;yf(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){y.B(7);break}sa(y,8);return C(y,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:v=y.h;if("usable"!=v)throw new O(2,
|
|
229
|
+
6,6018);yf(a.j);ua(y,7,4);break;case 8:x=va(y,4);if(x instanceof O)throw x;throw new O(2,6,6019,x.message);case 7:return a.da=!0,C(y,bh(a),11);case 11:yf(a.j);ua(y,0);break;case 4:z=va(y);yf(a.j,z);a.g=null;a.H.clear();if(z instanceof O)throw z;throw new O(2,6,6002,z.message);}})}
|
|
230
|
+
function jh(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Vg(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new O(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={be:d.be},e=a.next())for(d.be=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
231
|
+
l.be}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
232
|
+
function kh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x;return K(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){z.B(4);break}k=h.value;if(!b.has(k)){z.B(3);break}l=b.get(k);sa(z,6);return C(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
233
|
+
z.h,z.return(c);case 6:va(z);case 7:yf(a.j);case 3:h=g.next();z.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.B(11);break}q=n.value;p=t(b.keys());h=p.next();case 12:if(h.done){n=m.next();z.B(9);break}u=h.value;v=b.get(u);x=v.drmInfos.some(function(y){return!!y.licenseServerUri});if(x!=q){z.B(13);break}sa(z,15);return C(z,navigator.requestMediaKeySystemAccess(u,[v]),17);case 17:return c=z.h,z.return(c);case 15:va(z);case 16:yf(a.j);case 13:h=p.next();z.B(12);break;case 11:return z.return(c)}})}
|
|
234
234
|
function Tg(a){a=Hf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=gg(ig(f),!1));f=e;22!=f.length&&(f=gg(ig(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:hb(Qf(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
|
|
235
235
|
videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}function mh(a){fh(a)&&a.l.resolve()}function nh(a,b){(new qd(function(){b.loaded=!0;mh(a)})).U(oh)}
|
|
236
|
-
function dh(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new O(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.A.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.J.push(n):$g(a,n)});a.A.D(d,"keystatuseschange",function(n){return ph(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1
|
|
236
|
+
function dh(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new O(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.A.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.J.push(n):$g(a,n)});a.A.D(d,"keystatuseschange",function(n){return ph(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,$e:Infinity,gb:null,type:"persistent-license"};a.i.set(d,f);sa(m,2);return C(m,
|
|
237
237
|
d.load(b),4);case 4:return g=m.h,yf(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new O(h,6,6013)),f.loaded=!0),nh(a,f),mh(a),m.return(d);case 2:k=va(m),yf(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new O(l,6,6005,k.message)),f.loaded=!0,mh(a);case 3:return m.return(Promise.resolve())}})}
|
|
238
|
-
function gh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new O(2,6,6005,f.message));return}a.A.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.J.push(f):$g(a,f)});a.A.D(e,"keystatuseschange",function(f){return ph(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1
|
|
238
|
+
function gh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new O(2,6,6005,f.message));return}a.A.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.J.push(f):$g(a,f)});a.A.D(e,"keystatuseschange",function(f){return ph(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,$e:Infinity,gb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&gg(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
239
239
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new O(2,6,6006,f.message,f,h))}})}
|
|
240
|
-
function $g(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u;K(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&gg(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=pf([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(hh(a.g.keySystem)){var
|
|
241
|
-
Nf(g.body,!0,!0);if(
|
|
242
|
-
va(v),n=new O(2,6,6007,m),a.o(n),d&&d.
|
|
243
|
-
function ph(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(hh(a.g.keySystem)&&16==g.byteLength&&(ud()||Dd())){h=nb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=jg(g).slice(0,32);a.V.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.
|
|
244
|
-
fh(a)&&(a.l.resolve(),a.W.U(qh))}function Kg(a){var b=a.V,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new O(2,6,6014));a.C.
|
|
240
|
+
function $g(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u;K(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&gg(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=pf([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(hh(a.g.keySystem)){var x=
|
|
241
|
+
Nf(g.body,!0,!0);if(x.includes("PlayReadyKeyMessage")){x=Gg(x,"PlayReadyKeyMessage");for(var z=t(x.getElementsByTagName("HttpHeader")),y=z.next();!y.done;y=z.next())y=y.value,g.headers[y.getElementsByTagName("name")[0].textContent]=y.getElementsByTagName("value")[0].textContent;g.body=hg(x.getElementsByTagName("Challenge")[0].textContent)}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();sa(v,2);l=a.C.Tb.request(2,g);return C(v,l.promise,4);case 4:k=v.h;ua(v,3);break;case 2:return m=
|
|
242
|
+
va(v),n=new O(2,6,6007,m),a.o(n),d&&d.gb&&d.gb.reject(n),v.return();case 3:if(a.j.g)return v.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&gg(k.data);sa(v,5);return C(v,c.update(k.data),7);case 7:ua(v,6);break;case 5:return q=va(v),p=new O(2,6,6008,q.message),a.o(p),d&&d.gb&&d.gb.reject(p),v.return();case 6:if(a.j.g)return v.return();u=new Q("drmsessionupdate");a.C.onEvent(u);d&&(d.gb&&d.gb.resolve(),nh(a,d));E(v)}})}
|
|
243
|
+
function ph(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(hh(a.g.keySystem)&&16==g.byteLength&&(ud()||Dd())){h=nb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=jg(g).slice(0,32);a.V.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.gb&&(a.i.delete(b),b.close().catch(function(){}));
|
|
244
|
+
fh(a)&&(a.l.resolve(),a.W.U(qh))}function Kg(a){var b=a.V,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new O(2,6,6014));a.C.Td(If(c))}
|
|
245
245
|
function rh(){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,
|
|
246
246
|
q;return K(function(p){switch(p.g){case 1:sa(p,2);if("org.w3.clearkey"===l&&Id())throw Error("Unsupported keySystem");return C(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,q=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,yd()&&(q=!1),f.set(l,{persistentState:q}),C(p,m.createMediaKeys(),5);case 5:ua(p,0);break;case 2:va(p),f.set(l,null),E(p)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(If(f))})}
|
|
247
247
|
function sh(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new qd(e)).U(th)}),sa(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);va(c);E(c)})}
|
|
248
248
|
function Ng(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return C(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 sa(g,2),a.ma||a.u.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,sh(e),5):C(g,e.remove(),5);if(2!=g.g)return ua(g,0);va(g);E(g)})})),0)})}function uh(a,b){return a.length&&b.length&&a!==b?0<vh(a,b).length:!0}
|
|
249
249
|
function vh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(w(d.keyIds),w(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
250
250
|
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
|
|
251
|
-
function Vg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Lg(a){a.i.forEach(function(b,c){var d=b
|
|
251
|
+
function Vg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Lg(a){a.i.forEach(function(b,c){var d=b.$e,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.$e=e)})}function fh(a){a=a.i.values();return Ff(a,function(b){return b.loaded})}function eh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.V.get(c.value))return!1;return!0}
|
|
252
252
|
function Ug(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
253
|
-
function lh(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={
|
|
254
|
-
m.
|
|
253
|
+
function lh(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={Fa:g.Fa},h=a.next()){g.Fa=h.value;b.includes(g.Fa.licenseServerUri)||b.push(g.Fa.licenseServerUri);d.includes(g.Fa.serverCertificateUri)||d.push(g.Fa.serverCertificateUri);g.Fa.serverCertificate&&(c.some(function(m){return function(n){return fb(n,m.Fa.serverCertificate)}}(g))||c.push(g.Fa.serverCertificate));if(g.Fa.initData){h={};for(var k=t(g.Fa.initData),l=k.next();!l.done;h={kd:h.kd},l=k.next())h.kd=l.value,e.some(function(m){return function(n){var q=
|
|
254
|
+
m.kd;return n.keyId&&n.keyId==q.keyId?!0:n.initDataType==q.initDataType&&fb(n.initData,q.initData)}}(h))||e.push(h.kd)}if(g.Fa.keyIds)for(h=t(g.Fa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
255
255
|
function Wg(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=
|
|
256
|
-
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 th=1,oh=5,qh=.5,wh=new Gf(function(){return kb(new Uint8Array([0]))});function
|
|
257
|
-
function(l){g.push({box:l,
|
|
256
|
+
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 th=1,oh=5,qh=.5,wh=new Gf(function(){return kb(new Uint8Array([0]))});function xh(){}function zh(a,b){if(b&&(b=Ah[b.toLowerCase()]))return b;throw new O(2,4,4E3,a);}N("shaka.media.ManifestParser",xh);xh.unregisterParserByMime=function(a){delete Ah[a]};xh.registerParserByMime=function(a,b){Ah[a]=b};xh.registerParserByExtension=function(){ye("ManifestParser","Please use an ManifestParser with registerParserByMime function.")};xh.AccessibilityPurpose={Yi:"visually impaired",ui:"hard of hearing"};var Ah={};function Bh(a){function b(){d=!0}function c(l){f.push(l);$f(l)}a=hb(a);var d=!1,e,f=[],g=[];(new Vf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).P("stsd",function(l){e=l;f.push(l);bg(l)}).P("encv",b).P("enca",b).P("hev1",function(l){g.push({box:l,Cb:1701733238})}).P("hvc1",function(l){g.push({box:l,Cb:1701733238})}).P("avc1",function(l){g.push({box:l,Cb:1701733238})}).P("avc3",function(l){g.push({box:l,Cb:1701733238})}).P("ac-3",function(l){g.push({box:l,Cb:1701733217})}).P("ec-3",
|
|
257
|
+
function(l){g.push({box:l,Cb:1701733217})}).P("ac-4",function(l){g.push({box:l,Cb:1701733217})}).P("mp4a",function(l){g.push({box:l,Cb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw Ya(jg(a)),new O(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Ch(a,e,k.box,f,k.Cb);return a}
|
|
258
258
|
function Ch(a,b,c,d,e){var f=Dh.value(),g=a.subarray(c.start,c.start+c.size),h=nb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=nb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Eh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=vd()?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,Eh(e,d.start,d.size+k.byteLength);k=nb(e,b.start);b=ag(b);a=k.getUint32(b);
|
|
259
|
-
k.setUint32(b,a+1);return e}function Eh(a,b,c){a=nb(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 Dh=new Gf(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 Fh(a,b,c,d,e,f,g){this.Z=a;this.
|
|
260
|
-
Fh.prototype.getStartByte=Fh.prototype.
|
|
261
|
-
function S(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v){l=void 0===l?[]:l;p=void 0===p?Hh:p;this.startTime=a;this.h=this.endTime=b;this.A=c;this.
|
|
262
|
-
this.o&&this.g.length&&this.g[this.g.length-1]
|
|
263
|
-
r.
|
|
264
|
-
r.
|
|
265
|
-
S.prototype.markAsLastPartial=S.prototype
|
|
266
|
-
S.prototype.getStartByte=S.prototype.
|
|
259
|
+
k.setUint32(b,a+1);return e}function Eh(a,b,c){a=nb(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 Dh=new Gf(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 Fh(a,b,c,d,e,f,g){this.Z=a;this.Pa=b;this.wa=c;this.Ve=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Fh.prototype.Rc=function(){return this.Pa};Fh.prototype.Oc=function(){return this.wa};function Gh(a,b){return a&&b?a.Rc()==b.Rc()&&a.Oc()==b.Oc()&&xb(a.Z().sort(),b.Z().sort())&&fb(a.g,b.g):a==b}N("shaka.media.InitSegmentReference",Fh);Fh.prototype.getEndByte=Fh.prototype.Oc;
|
|
260
|
+
Fh.prototype.getStartByte=Fh.prototype.Rc;
|
|
261
|
+
function S(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v){l=void 0===l?[]:l;p=void 0===p?Hh:p;this.startTime=a;this.h=this.endTime=b;this.A=c;this.Pa=d;this.wa=e;this.aa=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.u=void 0===n?null:n;this.ca=void 0===q?null:q;this.status=p;this.l=!1;this.j=!0;this.m=!1;this.aes128Key=void 0===u?null:u;this.s=null;this.i=0;this.o=void 0===v?!1:v;this.Ld=this.Zc=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.ag();
|
|
262
|
+
this.o&&this.g.length&&this.g[this.g.length-1].$f();this.mimeType=this.codecs=null}r=S.prototype;r.Z=function(){return this.A()};r.getStartTime=function(){return this.startTime};r.Ug=function(){return this.endTime};r.Rc=function(){return this.Pa};r.Oc=function(){return this.wa};r.lh=function(){return this.tilesLayout};r.kh=function(){return this.u};r.Pb=function(){return this.status};r.Bh=function(){this.status=Ih};r.Ue=function(){this.l=!0};r.xh=function(){return this.l};r.Nd=function(){this.j=!1};
|
|
263
|
+
r.uh=function(){return this.j};r.ag=function(){this.Zc=!0};r.wh=function(){return this.Zc};r.$f=function(){this.Ld=!0};r.vh=function(){return this.Ld};r.Zf=function(){this.m=!0};r.rh=function(){return this.m};r.pg=function(a){this.s=a};r.jh=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.h+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.h+=a};
|
|
264
|
+
r.tf=function(a){null==this.ca?Ra("Sync attempted without sync time!"):(a=this.ca-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};N("shaka.media.SegmentReference",S);S.prototype.syncAgainst=S.prototype.tf;S.prototype.offset=S.prototype.offset;S.prototype.getThumbnailSprite=S.prototype.jh;S.prototype.setThumbnailSprite=S.prototype.pg;S.prototype.hasByterangeOptimization=S.prototype.rh;S.prototype.markAsByterangeOptimization=S.prototype.Zf;S.prototype.isLastPartial=S.prototype.vh;
|
|
265
|
+
S.prototype.markAsLastPartial=S.prototype.$f;S.prototype.isPartial=S.prototype.wh;S.prototype.markAsPartial=S.prototype.ag;S.prototype.isIndependent=S.prototype.uh;S.prototype.markAsNonIndependent=S.prototype.Nd;S.prototype.isPreload=S.prototype.xh;S.prototype.markAsPreload=S.prototype.Ue;S.prototype.markAsUnavailable=S.prototype.Bh;S.prototype.getStatus=S.prototype.Pb;S.prototype.getTileDuration=S.prototype.kh;S.prototype.getTilesLayout=S.prototype.lh;S.prototype.getEndByte=S.prototype.Oc;
|
|
266
|
+
S.prototype.getStartByte=S.prototype.Rc;S.prototype.getEndTime=S.prototype.Ug;S.prototype.getStartTime=S.prototype.getStartTime;S.prototype.getUris=S.prototype.Z;var Hh=0,Ih=1;S.Status={gi:Hh,Wi:Ih,Ai:2};function Jh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Kh(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)}function Lh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Mh(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
267
267
|
function Nh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Mh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Mh(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};/*
|
|
268
268
|
@license
|
|
269
269
|
Shaka Player
|
|
@@ -274,11 +274,11 @@ function Oh(){}function Ph(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&5
|
|
|
274
274
|
function Sh(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Kf(hb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Kf(hb(a.data,3+c,f)),h;"--\x3e"===d?h=Kf(hb(a.data,4+c+f)):h=kb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
|
|
275
275
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Kf(hb(a.data,1,d));a=Kf(hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Kf(hb(a.data,1,d));a=Kf(hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Kf(hb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
276
276
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=kb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Kf(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Kf(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=kb(a.data),b):null}
|
|
277
|
-
function Th(a){for(var b=0,c=[];Ph(a,b);){var d=Rh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Rh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Sh(e))&&c.push(f);b+=e.size+10}Qh(a,b)&&(b+=10)}return c}function Uh(a,b){for(var c=b=void 0===b?0:b,d=0;Ph(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Rh(a,b+6),Qh(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}
|
|
278
|
-
Oh.getID3Frames=Th;function Vh(a,b){var c=null,d=null,e=null,f=a.L();b&1&&(e=a.
|
|
279
|
-
function Yh(a,b,c){var d=a.L(),e=[],f=null;c&1&&(f=a.L());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={
|
|
280
|
-
function Zh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.L();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.
|
|
281
|
-
function $h(a){for(var b="mp4a",c,d;a.ia();){c=a.ga();for(var e=a.ga();e&128;)e=a.ga();if(3==c)a.
|
|
277
|
+
function Th(a){for(var b=0,c=[];Ph(a,b);){var d=Rh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Rh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Sh(e))&&c.push(f);b+=e.size+10}Qh(a,b)&&(b+=10)}return c}function Uh(a,b){for(var c=b=void 0===b?0:b,d=0;Ph(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Rh(a,b+6),Qh(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}N("shaka.util.Id3Utils",Oh);Oh.getID3Data=Uh;
|
|
278
|
+
Oh.getID3Frames=Th;function Vh(a,b){var c=null,d=null,e=null,f=a.L();b&1&&(e=a.mc());b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:f,Kf:c,Mg:d,$i:e}}function Wh(a,b){return 1==b?(b=a.L(),a=a.L(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.L()}}function Xh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.L();a.skip(4);a=a.Ea();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
279
|
+
function Yh(a,b,c){var d=a.L(),e=[],f=null;c&1&&(f=a.L());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={hf:null,sampleSize:null,Vd:null};c&256&&(h.hf=a.L());c&512&&(h.sampleSize=a.L());c&1024&&a.skip(4);c&2048&&(h.Vd=0==b?a.L():a.fg());e.push(h)}return{dj:d,ig:e,Lg:f}}
|
|
280
|
+
function Zh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.L();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ea()+a.Ea()/16;a=a.Ea()+a.Ea()/16;return{trackId:c,width:b,height:a}}
|
|
281
|
+
function $h(a){for(var b="mp4a",c,d;a.ia();){c=a.ga();for(var e=a.ga();e&128;)e=a.ga();if(3==c)a.Ea(),e=a.ga(),e&128&&a.Ea(),e&64&&a.skip(a.ga()),e&32&&a.Ea();else if(4==c)d=a.ga(),a.skip(12);else if(5==c)break}d&&(b+="."+this.g(d),5==c&&a.ia()&&(c=a.ga(),d=(c&248)>>3,31===d&&a.ia()&&(d=32+((c&7)<<3)+((a.ga()&224)>>5)),b+="."+d));return{ha:b}}function ai(a,b){a.skip(87);return{ha:b+"."+this.g(a.ga())+this.g(a.ga())+this.g(a.ga())}}function bi(a){a=a.L();return{ha:Zf(a)}};/*
|
|
282
282
|
|
|
283
283
|
Copyright Brightcove, Inc.
|
|
284
284
|
|
|
@@ -296,169 +296,170 @@ function $h(a){for(var b="mp4a",c,d;a.ia();){c=a.ga();for(var e=a.ga();e&128;)e=
|
|
|
296
296
|
*/
|
|
297
297
|
function ci(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=hb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function di(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Sf(c,0)).L(),a.g=8*d,a.i-=d)}function ei(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;di(a)}a.h<<=b;a.g-=b}
|
|
298
298
|
function fi(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&di(a);c=b-c;return 0<c?d<<c|fi(a,c):d}function gi(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;di(a);return b+gi(a)}function hi(a){ei(a,1+gi(a))}function T(a){var b=gi(a);return fi(a,b+1)-1}function ii(a){a=T(a);return 1&a?1+a>>>1:-1*(a>>>1)}function U(a){return 1===fi(a,1)}function ji(a){return fi(a,8)}
|
|
299
|
-
function ki(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=ii(a),d=(c+d+256)%256),c=0===d?c:d}function li(a){ji(a);T(a);return T(a)}
|
|
300
|
-
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,ni(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.A=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.A:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,
|
|
301
|
-
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-1==g.audio&&0<m)for(var n=h+5,q=m;2<q;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var p=f[n+1]+2;n+=p;q-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.
|
|
302
|
-
"hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.F=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.s=f.audio,this.o=f.audioCodec);-1!=f.
|
|
299
|
+
function ki(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=ii(a),d=(c+d+256)%256),c=0===d?c:d}function li(a){ji(a);T(a);return T(a)}N("shaka.util.ExpGolomb",ci);function mi(){this.A=null;this.C=!1;this.m=this.F=null;this.j=[];this.g=[];this.o=this.s=null;this.i=[];this.h=[];this.u=null;this.l=[]}r=mi.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
300
|
+
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,ni(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.A=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.A:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Jd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
301
|
+
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-1==g.audio&&0<m)for(var n=h+5,q=m;2<q;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var p=f[n+1]+2;n+=p;q-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.Jd&&(g.Jd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec=
|
|
302
|
+
"hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.F=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.s=f.audio,this.o=f.audioCodec);-1!=f.Jd&&(this.u=f.Jd);d&&!this.C&&(d=!1,e=b-188);this.C=!0;break;case this.F:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.s:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&
|
|
303
303
|
this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);break;case this.u:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
304
304
|
function oi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),packetLength:a[4]<<8|a[5],pts:null,dts:null,nalus:[]};if(b.packetLength&&b.packetLength>a.byteLength-6)return null;var c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));c=a[8]+9;if(a.byteLength<=c)return null;b.data=a.subarray(c);return b}
|
|
305
|
-
r.
|
|
306
|
-
r.
|
|
305
|
+
r.Hh=function(a){ye("TsParser","Please use parseNalus function instead.");return this.cf(a)};
|
|
306
|
+
r.cf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var q=a[n];if(q){if(2<=g&&1==q){b&&!h.length&&-1==k&&(q=n-(3<g?3:g),c&&0!=q&&(q=a.subarray(0,q),b.data=kg(b.data,q),b.fullData=kg(b.fullData,q)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=kg(b.data,k),b.fullData=kg(b.fullData,k)));if(n>=e-f)return h;
|
|
307
307
|
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=kg(b.data,a),b.fullData=kg(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=kg.apply(eg,w(c.value)),(c=oi(c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Th(c.data),dts:c.dts,pts:c.pts});return a};
|
|
308
|
-
r.
|
|
309
|
-
r.
|
|
310
|
-
d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.
|
|
311
|
-
r.
|
|
312
|
-
function qi(a){var b={height:null,width:null,ha:null};a=a.
|
|
308
|
+
r.Lb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=kg.apply(eg,w(c.value)),e=oi(d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=kg(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
309
|
+
r.ic=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=kg.apply(eg,w(d.value)),f=oi(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=kg(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.cf(d,g,void 0),
|
|
310
|
+
d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Lb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.ic(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.Nc=function(){return{audio:this.o,video:this.m}};
|
|
311
|
+
r.Fd=function(){for(var a=[],b=t(this.ic()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};r.oh=function(){ye("TsParser","Please use getVideoInfo function instead.");var a=this.Ie();return{height:a.height,width:a.width}};r.Ie=function(){return"hvc"==this.m?pi(this):qi(this)};
|
|
312
|
+
function qi(a){var b={height:null,width:null,ha:null};a=a.Fd();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new ci(a.data);var c=ji(a),d=ji(a),e=ji(a);hi(a);if(ri.includes(c)){var f=T(a);3===f&&ei(a,1);hi(a);hi(a);ei(a,1);if(U(a)){f=3!==f?8:12;for(var g=0;g<f;g++)U(a)&&(6>g?ki(a,16):ki(a,64))}}hi(a);f=T(a);if(0===f)T(a);else if(1===f)for(ei(a,1),hi(a),hi(a),f=T(a),g=0;g<f;g++)hi(a);hi(a);ei(a,1);f=T(a);g=T(a);var h=fi(a,1);0===h&&ei(a,1);ei(a,1);var k=0,l=0,m=0,n=
|
|
313
313
|
0;U(a)&&(k=T(a),l=T(a),m=T(a),n=T(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.ha="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
314
|
-
function pi(a){var b={height:null,width:null,ha:null};a=a.
|
|
315
|
-
(
|
|
316
|
-
a.toString(16).toUpperCase());b.ha=e;return b}function si(a){return 0>ni(a)?!1:!0}function ni(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}
|
|
317
|
-
mi.prototype.getVideoData=mi.prototype.
|
|
318
|
-
a=!1):(this.h.SupportObject.SupportStatus||
|
|
319
|
-
ti.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function vi(a,b,c){var d=wi,e=xi;switch(b.mimeType){case "video/webm":d=yi;break;case "video/mp4":d=zi}switch(c){case "DASH":e=Ai;break;case "HLS":e=Bi}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}
|
|
314
|
+
function pi(a){var b={height:null,width:null,ha:null};a=a.Fd();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new ci(a.fullData,!0);ji(c);ji(c);fi(c,4);var d=fi(c,3);U(c);var e=fi(c,2),f=fi(c,1),g=fi(c,5),h=fi(c,32);a=ji(c);for(var k=ji(c),l=ji(c),m=ji(c),n=ji(c),q=ji(c),p=ji(c),u=[],v=[],x=0;x<d;x++)u.push(U(c)),v.push(U(c));if(0<d)for(x=d;8>x;x++)fi(c,2);for(x=0;x<d;x++)u[x]&&fi(c,88),v[x]&&ji(c);T(c);d=T(c);3==d&&fi(c,1);u=T(c);v=T(c);var z=x=0,y=0,B=0;U(c)&&
|
|
315
|
+
(x+=T(c),z+=T(c),y+=T(c),B+=T(c));b.width=String(u-(x+z)*(1===d||2===d?2:1));b.height=String(v-(y+B)*(1===d?2:1));c=function(A){for(var D=0,F=0;32>F;F++)D|=(A>>F&1)<<31-F;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;q&&(e+="."+q.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
316
|
+
a.toString(16).toUpperCase());b.ha=e;return b}function si(a){return 0>ni(a)?!1:!0}function ni(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}N("shaka.util.TsParser",mi);mi.syncOffset=ni;mi.probe=si;mi.prototype.getVideoInfo=mi.prototype.Ie;mi.prototype.getVideoResolution=mi.prototype.oh;mi.prototype.getVideoNalus=mi.prototype.Fd;mi.prototype.getCodecs=mi.prototype.Nc;mi.prototype.getStartTime=mi.prototype.getStartTime;
|
|
317
|
+
mi.prototype.getVideoData=mi.prototype.ic;mi.prototype.getAudioData=mi.prototype.Lb;mi.prototype.getMetadata=mi.prototype.getMetadata;mi.prototype.parseNalus=mi.prototype.cf;mi.prototype.parseAvcNalus=mi.prototype.Hh;mi.prototype.parse=mi.prototype.parse;mi.prototype.clearData=mi.prototype.clearData;mi.Timescale=9E4;var ri=[100,110,122,244,44,83,86,118,128,138,139,134];function ti(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Sa("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,ye("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Sa("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Sa("Could not find LCEVC Library on this page"),
|
|
318
|
+
a=!1):(this.h.SupportObject.SupportStatus||Sa(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function ui(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
319
|
+
ti.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function vi(a,b,c){var d=wi,e=xi;switch(b.mimeType){case "video/webm":d=yi;break;case "video/mp4":d=zi}switch(c){case "DASH":e=Ai;break;case "HLS":e=Bi}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}N("shaka.lcevc.Dec",ti);ti.prototype.release=ti.prototype.release;var wi=0,yi=1,zi=2,Bi=0,Ai=1,xi=-1;function Ci(a,b,c,d){var e=this;this.i=a;this.C=null;this.F=b;this.g={};this.G={};this.ma={};this.h=null;this.Y=!1;this.Aa=c||function(){};this.N=d||null;this.j={};this.s=new zf;this.m={};this.H=null;this.J=new Ye;this.K="";this.da=!1;this.l=Di(this,this.J);this.A=!1;this.I=new xf(function(){return Ei(e)});this.u=!1;this.W="UNKNOWN";this.ka=this.za=!1;this.Ba=new Ye;this.o=!1;this.ea=!0;this.V=null}
|
|
320
320
|
function Di(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.ea=!0});a.s.D(c,"endstreaming",function(){a.ea=!1});a.s.ja(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ja(a.i,"playing",function(){a.da=!0});a.K=Fi(c);a.i.src=a.K;return c}c=new MediaSource;a.s.ja(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ja(a.i,"playing",function(){a.da=!0});a.K=Fi(c);a.i.src=a.K;return c}
|
|
321
321
|
r=Ci.prototype;r.destroy=function(){return this.I.destroy()};
|
|
322
322
|
function Ei(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch($c)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.h&&b.push(a.h.destroy());a.F&&b.push(a.F.destroy());for(k in a.m)b.push(a.m[k].destroy());return C(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.C=null;a.l=null;a.h=null;a.F=null;a.g={};a.m={};a.H=null;
|
|
323
|
-
a.j={};a.N=null;E(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return K(function(m){if(1==m.g)return f=Ec,C(m,e.J,2);e.u=b;e.W=c;e.
|
|
323
|
+
a.j={};a.N=null;E(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return K(function(m){if(1==m.g)return f=Ec,C(m,e.J,2);e.u=b;e.W=c;e.za=d;e.ka=!e.u&&"HLS"==e.W&&!e.za;g=t(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),Gi(e,k,l,l.codecs),e.o?(e.j[f.O]=[],e.j[f.$]=[]):e.j[k]=[];E(m)})};
|
|
324
324
|
function Gi(a,b,c,d,e){e=void 0===e?!1:e;var f=Gc(c.mimeType,d);if(b==Dc)Hi(a,f,a.u,c.external);else{var g=a.C.forceTransmux||e;if(!Za(f)||!a.u&&Hc.includes(f))g=!0;e=Ic(c.mimeType,d);if(g){g=Bc("audio",(d||"").split(","));d=Bc("video",(d||"").split(","));if(g&&d){a.o=!0;Gi(a,"audio",c,g,!0);Gi(a,"video",c,d,!0);return}if(d=$b(e))f=d(),a.m[b]=f,f=f.convertCodecs(b,e)}e=f+a.C.sourceBufferExtraFeatures;yf(a.I);try{var h=a.l.addSourceBuffer(e)}catch(k){throw new O(2,3,3015,k,"The mediaSource_ status was "+
|
|
325
325
|
a.l.readyState+" expected 'open'");}a.u&&(h.mode=Ii);a.s.D(h,"error",function(){a.j[b][0].p.reject(new O(2,3,3014,a.i.error?a.i.error.code:0))});a.s.D(h,"updateend",function(){return Ji(a,b)});a.g[b]=h;a.G[b]=f;a.ma[b]=!!c.drmInfos.length}}r.configure=function(a){this.C=a};
|
|
326
|
-
function Hi(a,b,c,d){a.h||(a.h=new Pc(a.F));var e=a.h;d=d||a.Y;a=a.W;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Rc[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):
|
|
326
|
+
function Hi(a,b,c,d){a.h||(a.h=new Pc(a.F));var e=a.h;d=d||a.Y;a=a.W;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Rc[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Sa('Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Sa('Text parsers should have a "setManifestType" method!'),e.u=d)}function Ki(a){return a.A?!1:a.l?"ended"==a.l.readyState:!0}
|
|
327
327
|
function Li(a,b){a.A||!Object.keys(a.g).length?a=null:b==Dc?a=a.h.g:(a=Mi(a,b),a=!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);return a}function Ni(a,b){return a.A?null:b==Dc?a.h.h:Jh(Mi(a,b))}function Oi(a,b,c){if(a.A)return 0;if(b==Dc)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Mi(a,b);return Lh(a,c)}
|
|
328
|
-
r.
|
|
329
|
-
function Pi(a,b,c,d,e,f){var g=null,h=hb(c);if(Hc.includes(e))f=Th(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.
|
|
330
|
-
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!si(h)||(h=(new mi).parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.
|
|
331
|
-
function Qi(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,q,p,u,v,
|
|
332
|
-
case 6:if(!a.g[b])return D.return();q=a.g[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(u=Pi(a,b,c,d,p,q),null!=u&&(v=d.startTime-u,
|
|
328
|
+
r.ob=function(){var a={total:this.A?[]:Mh(this.i.buffered),audio:this.A?[]:Mh(Mi(this,"audio")),video:this.A?[]:Mh(Mi(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Mi(a,b){try{return a.g[b].buffered}catch(c){return null}}
|
|
329
|
+
function Pi(a,b,c,d,e,f){var g=null,h=hb(c);if(Hc.includes(e))f=Th(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.Aa([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.aa&&d.aa.timescale){var k=d.aa.timescale;if(!isNaN(k)){var l=0,m=!1;(new Vf).box("moof",$f).box("traf",$f).P("tfdt",function(n){l=Wh(n.reader,
|
|
330
|
+
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!si(h)||(h=(new mi).parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.Aa(h,f,d?d.endTime:null));return g}
|
|
331
|
+
function Qi(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,q,p,u,v,x,z,y,B,A;return K(function(D){switch(D.g){case 1:m=Ec;if(b!=m.na){D.B(2);break}if(!a.u){D.B(3);break}return C(D,a.Ba,4);case 4:n=D.h,a.h.s=n;case 3:return C(D,Sc(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.Z()[0]:null),5);case 5:return D.return();case 2:if(l||!a.o){D.B(6);break}return C(D,Qi(a,m.O,c,d,e,f,g,h,k,!0),7);case 7:return C(D,Qi(a,m.$,c,d,e,f,g,h,k,!0),8);case 8:return D.return();
|
|
332
|
+
case 6:if(!a.g[b])return D.return();q=a.g[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(u=Pi(a,b,c,d,p,q),null!=u&&(v=d.startTime-u,x=Math.abs(q-v),(.001<=x||g||h)&&(!k||0<v||!q)&&(q=v,a.ka&&(Ri(a,b,function(){return Si(a,b)}),Ri(a,b,function(){return Ti(a,b,q)}))),z=b==m.$||!(m.$ in a.g),a.u&&z&&a.Ba.resolve(q)));f&&b==m.$&&(a.h||Hi(a,"application/cea-608",a.u,!1),a.H||(y=p.split(";",1)[0],a.H=new pb(y)),d?(B=a.H.i(c),B.length&&Yc(a.h,B,d.startTime,d.endTime,q)):a.H.init(c));
|
|
333
333
|
if(!a.m[b]){D.B(9);break}return C(D,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=D.h;case 9:return c=Ui(a,c,d?d.startTime:null,b),d&&a.u&&b!=m.na&&(g||h)&&(A=d.startTime,Ri(a,b,function(){return Si(a,b)}),Ri(a,b,function(){return Ti(a,b,A)})),C(D,Ri(a,b,function(){var F=c;if("video"==b&&a.N){var J=a.N;J.g&&J.g.appendBuffer(F,"video",J.o,-q)}a.g[b].appendBuffer(F)}),11);case 11:E(D)}})}function Vi(a,b){var c=Ni(a,"video")||0;Uc(a.h,b,c)}function Wi(a){a.h&&Uc(a.h,"",0)}
|
|
334
334
|
r.remove=function(a,b,c){var d=this,e;return K(function(f){return 1==f.g?(e=Ec,a==e.na?C(f,d.h.remove(b,c),0):C(f,Ri(d,a,function(){return Xi(d,a,b,c)}),4)):d.o?C(f,Ri(d,e.O,function(){return Xi(d,e.O,b,c)}),0):f.B(0)})};function Yi(a,b){var c;return K(function(d){return 1==d.g?(c=Ec,b==c.na?a.h?C(d,a.h.remove(0,Infinity),0):d.return():C(d,Ri(a,b,function(){return Xi(a,b,0,a.l.duration)}),4)):a.o?C(d,Ri(a,c.O,function(){return Xi(a,c.O,0,a.l.duration)}),0):d.B(0)})}
|
|
335
335
|
r.flush=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Ec,a==c.na?d.return():C(d,Ri(b,a,function(){b.i.currentTime-=.001;Ji(b,a)}),2)):b.o?C(d,Ri(b,c.O,function(){var e=c.O;b.i.currentTime-=.001;Ji(b,e)}),0):d.B(0)})};
|
|
336
336
|
function Zi(a,b,c,d,e,f,g,h,k){var l,m,n;return K(function(q){if(1==q.g){l=Ec;if(b==l.na)return f||(a.h.s=c),Tc(a.h,d,e),q.return();m=[];return C(q,$i(a,b,g,h,k),2)}n=q.h;n||(m.push(Ri(a,b,function(){return Si(a,b)})),a.o&&m.push(Ri(a,l.O,function(){return Si(a,l.O)})));f||(m.push(Ri(a,b,function(){return Ti(a,b,c)})),a.o&&m.push(Ri(a,l.O,function(){return Ti(a,l.O,c)})));m.push(Ri(a,b,function(){a.g[b].appendWindowStart=0;a.g[b].appendWindowEnd=e;a.g[b].appendWindowStart=d;Ji(a,b)}));a.o&&m.push(Ri(a,
|
|
337
337
|
l.O,function(){var p=l.O;a.g[p].appendWindowStart=0;a.g[p].appendWindowEnd=e;a.g[p].appendWindowStart=d;Ji(a,p)}));return C(q,Promise.all(m),0)})}function aj(a,b,c){var d;return K(function(e){if(1==e.g){d=Ec;if(b==d.na)return e.return();Ri(a,b,function(){return Si(a,b)});a.o&&Ri(a,d.O,function(){return Si(a,d.O)});return C(e,Ri(a,b,function(){return Ti(a,b,c)}),2)}return a.o?C(e,Ri(a,d.O,function(){return Ti(a,d.O,c)}),0):e.B(0)})}
|
|
338
|
-
r.endOfStream=function(a){var b=this;return K(function(c){return C(c,bj(b,function(){Ki(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.
|
|
338
|
+
r.endOfStream=function(a){var b=this;return K(function(c){return C(c,bj(b,function(){Ki(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Oa=function(a){var b=this;return K(function(c){return C(c,bj(b,function(){if(a<b.l.duration)for(var d in b.g){var e={start:function(){},p:new Ye};b.j[d].unshift(e)}b.l.duration=a;b.V=a}),0)})};r.getDuration=function(){return this.l.duration};function Xi(a,b,c,d){d<=c?Ji(a,b):a.g[b].remove(c,d)}
|
|
339
339
|
function Si(a,b){var c=a.g[b].appendWindowStart,d=a.g[b].appendWindowEnd;a.g[b].abort();a.g[b].appendWindowStart=c;a.g[b].appendWindowEnd=d;Ji(a,b)}function Ti(a,b,c){0>c&&(c+=.001);a.g[b].timestampOffset=c;Ji(a,b)}function Ji(a,b){if(!a.A){var c=a.j[b][0];c&&(c.p.resolve(),cj(a,b))}}function Ri(a,b,c){yf(a.I);c={start:c,p:new Ye};a.j[b].push(c);1==a.j[b].length&&dj(a,b);return c.p}
|
|
340
|
-
function bj(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:yf(a.I);c=[];d={};for(e in a.g)d.
|
|
340
|
+
function bj(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:yf(a.I);c=[];d={};for(e in a.g)d.wc=new Ye,f={start:function(m){return function(){return m.wc.resolve()}}(d),p:d.wc},a.j[e].push(f),c.push(d.wc),1==a.j[e].length&&f.start(),d={wc:d.wc};sa(l,2);return C(l,Promise.all(c),4);case 4:ua(l,3);break;case 2:throw g=va(l),g;case 3:return sa(l,5,6),C(l,b(),6);case 6:wa(l);for(h in a.g)cj(a,h);ya(l,0);break;case 5:throw k=va(l),new O(2,3,3015,k,a.i.error||"No error in the media element");
|
|
341
341
|
}})}function cj(a,b){a.j[b].shift();dj(a,b)}function dj(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d,a.i.error||"No error in the media element")),cj(a,b)}}function Ui(a,b,c,d){var e=a.ma[d];a.C.insertFakeEncryptionInInit&&null==c&&e&&(xd()||vd()||wd("SOPOpenBrowser"))&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=Bh(b));return b}
|
|
342
342
|
function ej(a,b,c,d){return Ri(a,b,function(){b!==Dc&&(bb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.g[b].changeType(c+a.C.sourceBufferExtraFeatures),a.G[b]=c),Ji(a,b))})}
|
|
343
|
-
function fj(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
344
|
-
4);case 4:return a.m={},a.g={},
|
|
343
|
+
function fj(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G;return K(function(H){switch(H.g){case 1:c=Ec;a.A=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);ta(H,2);a.s.Ya();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch($c)),n=t(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new O(2,7,7003,void 0));for(u in a.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(I){}}return C(H,Promise.all(g),
|
|
344
|
+
4);case 4:return a.m={},a.g={},x=a.l.duration,a.J=new Ye,a.l=Di(a,a.J),C(H,a.J,5);case 5:!isNaN(x)&&x?a.l.duration=x:!isNaN(a.V)&&a.V&&(a.l.duration=a.V);z=new Ye;y=a.l.sourceBuffers;B=b.size;A=0;a.s.D(y,"addsourcebuffer",function(){A++;A===B&&z.resolve()});D=t(b.keys());for(F=D.next();!F.done;F=D.next())J=F.value,G=b.get(J),Gi(a,J,G,G.codecs),a.o?(a.j[c.O]=[],a.j[c.$]=[]):a.j[J]=[];a.i.currentTime=d;return C(H,z,2);case 2:wa(H),a.A=!1,yf(a.I),a.s.ja(a.i,"canplaythrough",function(){yf(a.I);a.i.autoplay=
|
|
345
345
|
e;f||a.i.play()}),ya(H,0)}})}function gj(a,b){return bj(a,function(){return fj(a,b)})}
|
|
346
|
-
function $i(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,
|
|
346
|
+
function $i(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){if(1==A.g){f=Ec;if(b==f.na)return A.return(!1);g=Mc(Oc(a.G[b]));h=Nc(a.G[b]);l=!1;m=Gc(c,d);n=a.C.forceTransmux;if(!Za(m)||!a.u&&Hc.includes(m)||d.includes(","))n=!0;n&&(q=Ic(c,d),p=$b(q))&&(k=p(),u=Bc(f.O,(d||"").split(",")),v=Bc(f.$,(d||"").split(",")),u&&v?(l=!0,x=v,b==f.O&&(x=u),m=k.convertCodecs(b,Ic(c,x))):m=k.convertCodecs(b,q));z=Mc(Oc(m));y=Nc(m);if(g===z&&h===y)return A.return(!1);B=!0;if(a.o||l&&k&&!a.m[b])B=
|
|
347
347
|
!1;if(B&&"smooth"===a.C.codecSwitchingStrategy&&bb())return C(A,ej(a,b,m,k),3);k&&k.destroy();return C(A,gj(a,e),3)}return A.return(!0)})}
|
|
348
|
-
function hj(a,b,c){if(b==Dc)var d=!1;else{d=Mc(Oc(a.G[b]));var e=Nc(a.G[b]),f=Gc(c.mimeType,c.codecs),g=a.C.forceTransmux;if(!Za(f)||!a.u&&Hc.includes(f)||c.codecs.includes(","))g=!0;c=Ic(c.mimeType,c.codecs);g&&(g=$b(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=Mc(Oc(f));f=Nc(f);d=d!==b||e!==f}return d?"smooth"!==a.C.codecSwitchingStrategy||!bb()||a.o:!1}var Fi=window.URL.createObjectURL,Ii="sequence";function ij(a,b,c){this.i=a;this.o=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.C=!0;this.F=0;this.A=void 0===c?!0:c;this.G=0;this.m=!1}r=ij.prototype;r.getDuration=function(){return this.j};r
|
|
349
|
-
r.
|
|
350
|
-
r.
|
|
351
|
-
r.
|
|
352
|
-
r.
|
|
353
|
-
ij.prototype.getSeekRangeEnd=ij.prototype.
|
|
354
|
-
ij.prototype.notifyMinSegmentStartTime=ij.prototype.
|
|
355
|
-
ij.prototype.setDuration=ij.prototype.
|
|
348
|
+
function hj(a,b,c){if(b==Dc)var d=!1;else{d=Mc(Oc(a.G[b]));var e=Nc(a.G[b]),f=Gc(c.mimeType,c.codecs),g=a.C.forceTransmux;if(!Za(f)||!a.u&&Hc.includes(f)||c.codecs.includes(","))g=!0;c=Ic(c.mimeType,c.codecs);g&&(g=$b(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=Mc(Oc(f));f=Nc(f);d=d!==b||e!==f}return d?"smooth"!==a.C.codecSwitchingStrategy||!bb()||a.o:!1}var Fi=window.URL.createObjectURL,Ii="sequence";function ij(a,b,c){this.i=a;this.o=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.C=!0;this.F=0;this.A=void 0===c?!0:c;this.G=0;this.m=!1}r=ij.prototype;r.getDuration=function(){return this.j};r.$g=function(){return this.g};r.qf=function(a){this.i=a};r.Oa=function(a){this.j=a};r.eh=function(){return this.i};r.mg=function(a){this.s=a};r.nc=function(a){this.C=a};r.Wd=function(a){this.u=a};r.ng=function(a){this.o=a};r.Tg=function(){return this.o};
|
|
349
|
+
r.dg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Rd(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.A&&!this.m&&(this.i=(Date.now()+this.s)/1E3-this.h-this.g)}};
|
|
350
|
+
r.Xc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.s)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Rd(b);this.h=Math.max(this.h,c);null!=this.i&&this.A&&!this.m&&(this.i=d-this.h-this.g)}};r.Md=function(){this.m=!0};r.yh=function(){return this.m};r.Rd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};
|
|
351
|
+
r.Ye=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.R=function(){return Infinity==this.j&&!this.C};r.Rb=function(){return Infinity!=this.j&&!this.C};r.cb=function(){return Math.max(this.F,this.zb()-this.u)};r.qg=function(a){this.F=a};r.zb=function(){return this.R()||this.Rb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
|
|
352
|
+
r.Qc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.u?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.zb()-this.u+a,this.pb()))};r.fc=function(){return this.Qc(0)};r.pb=function(){return Math.max(0,this.zb()-(this.R()||this.Rb()?this.o:0))};r.ug=function(){return null==this.i||null!=this.h&&this.A?!1:!0};r.lg=function(a){this.G=a};N("shaka.media.PresentationTimeline",ij);ij.prototype.setAvailabilityTimeOffset=ij.prototype.lg;ij.prototype.usingPresentationStartTime=ij.prototype.ug;
|
|
353
|
+
ij.prototype.getSeekRangeEnd=ij.prototype.pb;ij.prototype.getSeekRangeStart=ij.prototype.fc;ij.prototype.getSafeSeekRangeStart=ij.prototype.Qc;ij.prototype.getSegmentAvailabilityEnd=ij.prototype.zb;ij.prototype.setUserSeekStart=ij.prototype.qg;ij.prototype.getSegmentAvailabilityStart=ij.prototype.cb;ij.prototype.isInProgress=ij.prototype.Rb;ij.prototype.isLive=ij.prototype.R;ij.prototype.offset=ij.prototype.offset;ij.prototype.notifyMaxSegmentDuration=ij.prototype.Ye;
|
|
354
|
+
ij.prototype.notifyMinSegmentStartTime=ij.prototype.Rd;ij.prototype.isStartTimeLocked=ij.prototype.yh;ij.prototype.lockStartTime=ij.prototype.Md;ij.prototype.notifySegments=ij.prototype.Xc;ij.prototype.notifyTimeRange=ij.prototype.dg;ij.prototype.getDelay=ij.prototype.Tg;ij.prototype.setDelay=ij.prototype.ng;ij.prototype.setSegmentAvailabilityDuration=ij.prototype.Wd;ij.prototype.setStatic=ij.prototype.nc;ij.prototype.setClockOffset=ij.prototype.mg;ij.prototype.getPresentationStartTime=ij.prototype.eh;
|
|
355
|
+
ij.prototype.setDuration=ij.prototype.Oa;ij.prototype.setPresentationStartTime=ij.prototype.qf;ij.prototype.getMaxSegmentDuration=ij.prototype.$g;ij.prototype.getDuration=ij.prototype.getDuration;function jj(a,b,c){this.j=c;this.l=a;this.s=kj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}jj.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function lj(a,b){a.i=b}function mj(a){this.g=a}function kj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Mh(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 nj(a,b,c,d,e){var f=this;this.u=e;this.g=a;this.A=b;this.s=c;this.l=new zf;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return oj(f)});this.m=(new qd(function(){oj(f)})).Za(this.s.gapJumpTimerTime)}nj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.A=this.u=null};nj.prototype.af=function(){this.o=!0;oj(this)};
|
|
356
356
|
function oj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=kj(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.j(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Nh(c,b,a.s.gapDetectionThreshold),null==
|
|
357
|
-
d||0==d&&!a.o||(e=c.start(d),e>=a.A.
|
|
357
|
+
d||0==d&&!a.o||(e=c.start(d),e>=a.A.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.u(new Q("gapjumped")))))}}};function pj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=qj.value().get(b),c.ja(a,b,d))}var qj=new Gf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function rj(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new zf;this.i=new sj(a);pj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){tj(e,e.j())})}rj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function uj(a){return a.o?a.g.currentTime:a.j()}
|
|
358
358
|
function vj(a,b){0<a.g.readyState?wj(a.i,b):pj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){tj(a,a.j())})}function tj(a,b){.001>Math.abs(a.g.currentTime-b)?xj(a):(a.h.ja(a.g,"seeking",function(){xj(a)}),wj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function xj(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
359
|
-
function sj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new qd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}sj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function wj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.
|
|
360
|
-
r.
|
|
359
|
+
function sj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new qd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}sj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function wj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Za(.1)};function yj(a){this.g=a;this.j=!1;this.h=null;this.i=new zf}r=yj.prototype;r.he=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ja(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;pj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.ie=function(a){this.h=this.j?this.h:a};r.qd=function(){return(this.j?this.g.currentTime:this.h)||0};r.Bf=function(){return 0};
|
|
360
|
+
r.Af=function(){return 0};r.cg=function(){};
|
|
361
361
|
function zj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=Aj(a,c,f);this.j=new nj(a,b.presentationTimeline,c,this.o,f);this.h=new rj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=uj(g.h);h=Bj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;vj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
362
|
-
g.g.
|
|
363
|
-
r.
|
|
364
|
-
function Bj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.
|
|
365
|
-
function Aj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new jj(new mj(a),b.stallThreshold,c);lj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ej(a){this.g=a;this.l=null;this.j=0;this.o=!1}r=Ej.prototype;r.
|
|
366
|
-
r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};r.
|
|
367
|
-
r.
|
|
368
|
-
r
|
|
369
|
-
r.
|
|
370
|
-
Ej.prototype.
|
|
371
|
-
Ej.prototype.getIteratorForTime=Ej.prototype.
|
|
372
|
-
Gj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.g.length&&a.o&&this.h>=a.g.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.g.length?a.g[this.h]:a};Gj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.g.length?(this.h++,a.o&&this.h==a.g.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};
|
|
373
|
-
Gj.prototype.currentPosition=Gj.prototype.
|
|
374
|
-
r.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.
|
|
375
|
-
Ij.prototype.get=Ij.prototype.get;Ij.prototype.find=Ij.prototype.find;Ij.prototype.release=Ij.prototype.release;function Jj(a){var b=this;this.g=a;this.h=this.g.
|
|
376
|
-
Mj.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
|
|
377
|
-
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.
|
|
378
|
-
"regionremove",function(d){c.g.delete(d.region)})}oa(Rj,hf);Rj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;hf.prototype.release.call(this)};Rj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Uj:a>d.endTime?Vj:Sj;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.
|
|
379
|
-
function Tj(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Uj=1,Sj=2,Vj=3;function Wj(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function Xj(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.
|
|
362
|
+
g.g.fc():g.g.pb():0>h&&(h=g.g.pb()+h);return Cj(g,Dj(g,h))});this.m=new qd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=uj(g.h),k=g.g.fc(),l=g.g.pb();3>l-k&&(k=l-3);h<k&&(h=Bj(g,h),g.i.currentTime=h)}})}r=zj.prototype;r.he=function(){this.m.Za(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};r.ie=function(a){vj(this.h,a)};
|
|
363
|
+
r.qd=function(){var a=uj(this.h);return 0<this.i.readyState&&!this.i.paused?Dj(this,a):a};r.Bf=function(){return this.o?this.o.o:0};r.Af=function(){return this.j.C};r.cg=function(){this.j.af()};function Cj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
364
|
+
function Bj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.fc(),f=a.g.pb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Qc(c),k=a.g.Qc(d);c=a.g.Qc(c+d);return b>=g?Cj(a,b):b>f?f:b<e?Kh(a.i.buffered,k)?k:c:b>=h||Kh(a.i.buffered,b)?b:c}function Dj(a,b){var c=a.g.fc();if(b<c)return c;a=a.g.pb();return b>a?a:b}
|
|
365
|
+
function Aj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new jj(new mj(a),b.stallThreshold,c);lj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ej(a){this.g=a;this.l=null;this.j=0;this.o=!1}r=Ej.prototype;r.Ob=function(){return this.g.length};r.release=function(){this.o||(this.g=[],this.l&&this.l.stop(),this.l=null)};r.Ch=function(){this.o=!0};function Fj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};
|
|
366
|
+
r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};r.Pd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,w(a))}};
|
|
367
|
+
r.Wc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Pd(a);this.ab(b)};r.ab=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
368
|
+
r.bc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new S(a.startTime,b,a.A,a.Pa,a.wa,a.aa,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.u,a.ca,a.status,a.aes128Key),this.g[this.g.length-1].i=a.i)}};
|
|
369
|
+
r.Xd=function(a,b){var c=this;this.o||(this.l&&this.l.stop(),this.l=new qd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.l.stop(),c.l=null)}),this.l.Za(a))};Ej.prototype[Symbol.iterator]=function(){return this.Mb(0)};
|
|
370
|
+
Ej.prototype.Mb=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.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.j;)e--,f=c.g[e];if(!f.j)return Ra("No independent partial segment found!"),null;b++;d=e-1;break}}return new Gj(this,b,d)};function Hj(a,b,c){a=new S(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Ej([a])}N("shaka.media.SegmentIndex",Ej);Ej.forSingleSegment=Hj;
|
|
371
|
+
Ej.prototype.getIteratorForTime=Ej.prototype.Mb;Ej.prototype.updateEvery=Ej.prototype.Xd;Ej.prototype.fit=Ej.prototype.bc;Ej.prototype.evict=Ej.prototype.ab;Ej.prototype.mergeAndEvict=Ej.prototype.Wc;Ej.prototype.offset=Ej.prototype.offset;Ej.prototype.get=Ej.prototype.get;Ej.prototype.find=Ej.prototype.find;Ej.prototype.markImmutable=Ej.prototype.Ch;Ej.prototype.release=Ej.prototype.release;function Gj(a,b,c){this.i=a;this.g=b;this.h=c}Gj.prototype.Kg=function(){return this.g};
|
|
372
|
+
Gj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.g.length&&a.o&&this.h>=a.g.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.g.length?a.g[this.h]:a};Gj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.g.length?(this.h++,a.o&&this.h==a.g.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Gj);Gj.prototype.next=Gj.prototype.next;Gj.prototype.current=Gj.prototype.current;
|
|
373
|
+
Gj.prototype.currentPosition=Gj.prototype.Kg;function Ij(){Ej.call(this,[]);this.h=[]}oa(Ij,Ej);r=Ij.prototype;r.clone=function(){var a=new Ij;a.h=this.h.slice();return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.j+d.Ob()}return null};
|
|
374
|
+
r.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.Ob()}return null};r.offset=function(){};r.Pd=function(){};r.ab=function(){};r.Wc=function(){};r.bc=function(){};r.Xd=function(){};N("shaka.media.MetaSegmentIndex",Ij);Ij.prototype.updateEvery=Ij.prototype.Xd;Ij.prototype.fit=Ij.prototype.bc;Ij.prototype.mergeAndEvict=Ij.prototype.Wc;Ij.prototype.evict=Ij.prototype.ab;Ij.prototype.merge=Ij.prototype.Pd;Ij.prototype.offset=Ij.prototype.offset;
|
|
375
|
+
Ij.prototype.get=Ij.prototype.get;Ij.prototype.find=Ij.prototype.find;Ij.prototype.release=Ij.prototype.release;function Jj(a){var b=this;this.g=a;this.h=this.g.Ed();this.i=new qd(function(){b.g.bg(.25*b.h)})}Jj.prototype.release=function(){this.set(this.ec());this.i&&(this.i.stop(),this.i=null);this.g=null};Jj.prototype.set=function(a){if(this.h!=a)a:{this.h=a,this.i.stop();if(0<=this.h)try{var b=this.h;this.g.Ed()!=b&&this.g.rf(b);break a}catch(c){}this.i.Za(.25);0!=this.g.Ed()&&this.g.rf(0)}};Jj.prototype.ec=function(){return this.g.ec()};function Kj(a){var b=this;this.h=a;this.g=new Set;this.i=(new qd(function(){Lj(b,!1)})).Za(.25)}Kj.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 Lj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Mj(a){hf.call(this);this.g=new Map;this.h=a}oa(Mj,hf);Mj.prototype.release=function(){this.g.clear();hf.prototype.release.call(this)};function Nj(a,b){var c=a.g.get(b);c||(c={$c:[],If:null,contentType:b},a.g.set(b,c));return c}function Oj(a,b,c){var d=Nj(a,b.contentType);Pj(a,d);a={Ve:b,position:c};d=d.$c;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
376
|
+
Mj.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.$c;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Ve;break a}}d=null}if(e=d)e=c.If,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);
|
|
377
|
+
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.If=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Pj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.$c;b.$c=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.$c=[]};function Qj(a){hf.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new qd(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 Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Za(2)}oa(Qj,hf);Qj.prototype.release=function(){this.g.clear();this.h.stop();hf.prototype.release.call(this)};function Rj(a,b){hf.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Yb:null,Xb:Sj,Qb:function(d,e){return Tj(c,"enter",d,e)}},{Yb:Uj,Xb:Sj,Qb:function(d,e){return Tj(c,"enter",d,e)}},{Yb:Vj,Xb:Sj,Qb:function(d,e){return Tj(c,"enter",d,e)}},{Yb:Sj,Xb:Uj,Qb:function(d,e){return Tj(c,"exit",d,e)}},{Yb:Sj,Xb:Vj,Qb:function(d,e){return Tj(c,"exit",d,e)}},{Yb:Uj,Xb:Vj,Qb:function(d,e){return Tj(c,"skip",d,e)}},{Yb:Vj,Xb:Uj,Qb:function(d,e){return Tj(c,"skip",d,e)}}];this.h=new zf;this.h.D(this.i,
|
|
378
|
+
"regionremove",function(d){c.g.delete(d.region)})}oa(Rj,hf);Rj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;hf.prototype.release.call(this)};Rj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Uj:a>d.endTime?Vj:Sj;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Yb==e&&h.Xb==f&&h.Qb(d,b)}}};
|
|
379
|
+
function Tj(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Uj=1,Sj=2,Vj=3;function Wj(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function Xj(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.Mb(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.size<a.i&&null!=e;){b=!0;e.l&&null!=e.wa&&(b=!1);2==e.Pb()&&(b=!1);b&&!a.g.has(e)&&(b=new Yj(a.l),Zj(b,e,a.h),a.g.set(e,b));a.j=e.startTime;if(a.h.fastSwitching&&e.Zc&&e.Ld)break;e=d.next().value}}}}
|
|
380
380
|
function ak(a,b){if(a.h.segmentIndex&&a.g.size<a.i&&!a.g.has(b)){var c=new Yj(a.l);Zj(c,b,a.h);a.g.set(b,c)}}function bk(a){if(0!==a.g.size){for(var b=t(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&ck(a,c);a.j=0}}function dk(a,b){b&&b!==a.h&&(bk(a),a.h=b)}function ck(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function Yj(a){this.i=a;this.g=this.h=null}
|
|
381
381
|
function Zj(a,b,c){var d=new Uint8Array(0);a.g=a.i(b,c,function(e){return K(function(f){if(1==f.g)return 0<d.byteLength?d=kg(d,e):d=e,a.h?C(f,a.h(d),3):f.B(0);d=new Uint8Array(0);E(f)})})}Yj.prototype.abort=function(){this.g&&this.g.abort()};function ek(a,b,c,d,e){a=pf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function fk(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.u=1;this.o=this.j=null;this.F=0;this.C=!1;this.i=new Map;this.A=!1;this.G=null;this.s=!1;this.l=new xf(function(){return gk(c)});this.H=Date.now()/1E3}r=fk.prototype;r.destroy=function(){return this.l.destroy()};function gk(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,hk(e),b.push(ik(e));return C(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;E(f)})}
|
|
382
382
|
r.configure=function(a){this.h=a;this.G=new Ve({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);for(var b=t(this.i.keys()),c=b.next();!c.done;c=b.next())if(c=this.i.get(c.value),c.ra){var d=c.ra,e=a.segmentPrefetchLimit;d.i=e;for(var f=Array.from(d.g.keys());f.length>e;){var g=f.pop();g&&ck(d,g)}0<a.segmentPrefetchLimit||
|
|
383
383
|
(c.ra=null)}else 0<a.segmentPrefetchLimit&&(c.ra=jk(this,c.stream))};r.start=function(){var a=this;return K(function(b){if(1==b.g)return C(b,kk(a),2);yf(a.l);a.A=!0;E(b)})};
|
|
384
384
|
function lk(a,b){var c,d,e,f,g,h,k;K(function(l){switch(l.g){case 1:return c=Ec,a.F++,d=a.F,sa(l,2),C(l,Yi(a.g.T,c.na),4);case 4:ua(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Gc(b.mimeType,b.codecs),Hi(a.g.T,f,a.m.sequenceMode,b.external),g=a.g.T.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.F==d&&(k=mk(a,b),a.i.set(c.na,k),nk(a,k,0)),E(l)}})}function ok(a){var b=a.i.get(Dc);b&&(hk(b),ik(b).catch(function(){}),a.i.delete(Dc));a.o=null}
|
|
385
|
-
function pk(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.
|
|
386
|
-
function qk(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Dc?g&&(g.
|
|
387
|
-
function uk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.
|
|
388
|
-
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.
|
|
389
|
-
r.
|
|
390
|
-
function vk(a,b){b.
|
|
385
|
+
function pk(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Ub&&(qk(a,b,!1,0,!1),c.Ub=d);else if(d=c.Ub)c.Ub=null,qk(a,d,!0,0,!1)}}function rk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.A&&(b.video&&qk(a,b.video,c,d,e,f),b.audio&&qk(a,b.audio,c,d,e,f))}function sk(a,b){K(function(c){if(1==c.g)return a.o=b,a.A?b.segmentIndex?c.B(2):C(c,b.createSegmentIndex(),2):c.return();qk(a,b,!0,0,!1);E(c)})}
|
|
386
|
+
function qk(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Dc?g&&(g.Ub&&(b.trickModeVideo?(g.Ub=b,b=b.trickModeVideo):g.Ub=null),g.stream!=b||e)&&(g.ra&&dk(g.ra,b),b.type==Dc&&(e=Gc(b.mimeType,b.codecs),Hi(a.g.T,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.X=null,g.Cf=!!f,c&&(g.Jc?g.Yd=!0:g.Da?(g.vb=!0,g.vd=d,g.Yd=!0):(hk(g),tk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),uk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):lk(a,b)}
|
|
387
|
+
function uk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.Ma)return e.return();c=b.stream;d=b.Ma;return c.segmentIndex?e.B(2):C(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e.return();var f=a.g.Dd();var g=Ni(a.g.T,b.type),h=b.stream.segmentIndex.find(b.Ca?b.Ca.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Pa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.aa)&&(h+=(k.wa?k.wa-k.Pa:null)||0),k=a.g.getBandwidthEstimate(),
|
|
388
|
+
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();E(e)})}
|
|
389
|
+
r.dd=function(){if(this.g)for(var a=this.g.Dd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.X&&(e=c.X.current());if(!e||e.startTime>a||e.endTime<a)c.X=null;e=this.g.T;e.A?e=!1:d==Dc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Mi(e,d),e=Kh(e,a));e||((null!=Ni(this.g.T,d)||c.Da)&&vk(this,c),c.Ma&&(c.Ma.abort(),c.Ma=null),d===Dc&&(d=this.g.T,d.H&&d.H.h()),c.dd=!0)}};
|
|
390
|
+
function vk(a,b){b.Jc||b.vb||(b.Da?(b.vb=!0,b.vd=0):null==Li(a.g.T,b.type)?null==b.hb&&nk(a,b,0):(hk(b),tk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
391
391
|
function kk(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Ec;if(!a.j)throw new O(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.O,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.$,a.j.video),d.add(a.j.video));a.o&&(c.set(b.na,a.o),d.add(a.o));e=a.g.T;return C(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}yf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.i.has(h)||(l=mk(a,k),a.i.set(h,l),nk(a,l,0));
|
|
392
|
-
E(m)})}function mk(a,b){return{stream:b,type:b.type,X:null,ra:jk(a,b),
|
|
393
|
-
function xk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:yf(a.l);if(b.
|
|
394
|
-
va(h),C(h,zk(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return C(h,a.g.T.endOfStream(),10);case 10:yf(a.l),g=a.g.T.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.
|
|
395
|
-
function yk(a,b){if(Ak(b))return Vi(a.g.T,b.stream.originalId||""),null;b.type==Dc&&Wi(a.g.T);if(!a.g.T.ea&&b.type!=Dc)return a.h.updateIntervalSeconds/2;var c=a.g.
|
|
396
|
-
2;e=Ck(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Ak(h)||h.X&&!h.X.current()||(f=Math.min(f,h.
|
|
397
|
-
function Ck(a,b,c,d){if(b.X)return b.X.current();if(b.
|
|
398
|
-
function Dk(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,
|
|
399
|
-
sa(I,2);n=Fk(n,D);F=!1;J=0;(new Vf).box("mdat",function(L){J=L.size+L.start;F=!0}).parse(n,!1,!0);if(!F){I.B(4);break}G=n.subarray(0,J);n=n.subarray(J);return C(I,Gk(a,b,c,f,d,G,!0),5);case 5:b.ra&&b.X&&Xj(b.ra,d,!0);case 4:ua(I,0);break;case 2:u=H=va(I),E(I)}})},C(A,Hk(a,b,d,v),9);l=Hk(a,b,d);return C(A,l,7);case 7:m=A.h;yf(a.l);if(a.s)return A.return();yf(a.l);return b.
|
|
400
|
-
A.return():b.
|
|
392
|
+
E(m)})}function mk(a,b){return{stream:b,type:b.type,X:null,ra:jk(a,b),Ca:null,Bb:null,Re:null,Pe:null,Oe:null,Ub:null,endOfStream:!1,Da:!1,hb:null,vb:!1,vd:0,Yd:!1,Jc:!1,dd:!0,Xe:!1,ff:!1,Tc:!1,Ma:null}}function jk(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.h.segmentPrefetchLimit?new Wj(a.h.segmentPrefetchLimit,b,function(c,d,e){return wk(a,c,d,e)}):null}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.T.Oa(a):this.g.T.Oa(Math.pow(2,32))};
|
|
393
|
+
function xk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:yf(a.l);if(b.Da||null==b.hb||b.Jc)return h.return();b.hb=null;if(!b.vb){h.B(2);break}return C(h,tk(a,b,b.Yd,b.vd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Da||b.hb||nk(a,b,0),h.return();case 4:sa(h,6);d=yk(a,b);null!=d&&(nk(a,b,d),b.Tc=!1);ua(h,7);break;case 6:return e=
|
|
394
|
+
va(h),C(h,zk(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return C(h,a.g.T.endOfStream(),10);case 10:yf(a.l),g=a.g.T.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Oa(g),E(h)}})}
|
|
395
|
+
function yk(a,b){if(Ak(b))return Vi(a.g.T,b.stream.originalId||""),null;b.type==Dc&&Wi(a.g.T);if(!a.g.T.ea&&b.type!=Dc)return a.h.updateIntervalSeconds/2;var c=a.g.Dd(),d=b.Ca?b.Ca.endTime:c,e=Oi(a.g.T,b.type,c),f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u),g=a.m.presentationTimeline.getDuration()-d,h=Ni(a.g.T,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Dc))&&Ak(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/
|
|
396
|
+
2;e=Ck(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Ak(h)||h.X&&!h.X.current()||(f=Math.min(f,h.Ca?h.Ca.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ra&&b.X&&(d=e.aa,!d||b.Ca&&Gh(d,b.Bb)||ak(b.ra,d),Xj(b.ra,e));Dk(a,b,c,e).catch(function(){});return null}
|
|
397
|
+
function Ck(a,b,c,d){if(b.X)return b.X.current();if(b.Ca||d)return c=b.Ca?b.Ca.endTime:d,b.Xe=!0,b.X=b.stream.segmentIndex.Mb(c),b.X&&b.X.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.X=b.stream.segmentIndex.Mb(d),e=b.X&&b.X.next().value);e||(b.X=b.stream.segmentIndex.Mb(c),e=b.X&&b.X.next().value);return e}
|
|
398
|
+
function Dk(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:e=Ec;f=b.stream;g=b.X;b.Da=!0;sa(A,2);if(2==d.Pb())throw new O(1,1,1011);return C(A,Ek(a,b,d),4);case 4:yf(a.l);if(a.s)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=q=!1,v=function(D){var F,J,G,H;return K(function(I){switch(I.g){case 1:if(q)return I.return();p=!0;yf(a.l);if(a.s)return I.return();
|
|
399
|
+
sa(I,2);n=Fk(n,D);F=!1;J=0;(new Vf).box("mdat",function(L){J=L.size+L.start;F=!0}).parse(n,!1,!0);if(!F){I.B(4);break}G=n.subarray(0,J);n=n.subarray(J);return C(I,Gk(a,b,c,f,d,G,!0),5);case 5:b.ra&&b.X&&Xj(b.ra,d,!0);case 4:ua(I,0);break;case 2:u=H=va(I),E(I)}})},C(A,Hk(a,b,d,v),9);l=Hk(a,b,d);return C(A,l,7);case 7:m=A.h;yf(a.l);if(a.s)return A.return();yf(a.l);return b.vb?(b.Da=!1,nk(a,b,0),A.return()):C(A,Gk(a,b,c,f,d,m),6);case 9:x=A.h;if(u)throw u;if(p){A.B(10);break}q=!0;yf(a.l);return a.s?
|
|
400
|
+
A.return():b.vb?(b.Da=!1,nk(a,b,0),A.return()):C(A,Gk(a,b,c,f,d,x),10);case 10:b.ra&&b.X&&Xj(b.ra,d,!0);case 6:yf(a.l);if(a.s)return A.return();b.Ca=d;g.next();b.Da=!1;b.ff=!1;z=a.g.T.ob();y=z[b.type];Xa(JSON.stringify(y));b.vb||a.g.af(d,b.stream);nk(a,b,0);ua(A,0);break;case 2:B=va(A);yf(a.l,B);if(a.s)return A.return();b.Da=!1;if(7001==B.code)b.Da=!1,hk(b),nk(a,b,0),A.B(0);else if(b.type==e.na&&a.h.ignoreTextStreamFailures)a.i.delete(e.na),A.B(0);else if(3017==B.code)Ik(a,b,B),A.B(0);else return b.Tc=
|
|
401
401
|
!0,B.severity=2,C(A,zk(a,b,B),0)}})}function Jk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.B(2):C(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=hb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,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 Fk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
402
|
-
function Ik(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.
|
|
403
|
-
function Ek(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v;return K(function(
|
|
404
|
-
new Map,a.j.audio&&z.set(d.O,a.j.audio),a.j.video&&z.set(d.$,a.j.video),sa(D,2),b.
|
|
405
|
-
|
|
406
|
-
c.aa.timescale=B.get(b.type):null!=
|
|
407
|
-
function Gk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return K(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.C;if(l||m)k=new Vf;l&&k.P("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
a.C=!0}});(l||m)&&k.parse(f);return C(p,Kk(a,b,c),2);case 2:return yf(a.l),n=b.
|
|
402
|
+
function Ik(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.ff})){if(0<a.h.maxDisabledTime&&a.g.wd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.Tc=!0;a.s=!0;a.g.onError(c);return}b.ff=!0}nk(a,b,4)}
|
|
403
|
+
function Ek(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v;return K(function(x){if(1==x.g){d=Ec;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Mc(b.stream.codecs);k=Nc(b.stream.mimeType);l=c.timestampOffset;if(l==b.Re&&f==b.Pe&&g==b.Oe&&h==b.Qe&&k==b.Yf)return x.B(2);if(m=b.Qe&&b.Yf&&hj(a.g.T,b.type,b.stream))n=null,b.type===d.$?n=a.i.get(d.O):b.type===d.O&&(n=a.i.get(d.$)),n&&(n.Bb=null,vk(a,n),ik(n).catch(function(){}));q=function(){var z,y,B,A;return K(function(D){if(1==D.g)return z=
|
|
404
|
+
new Map,a.j.audio&&z.set(d.O,a.j.audio),a.j.video&&z.set(d.$,a.j.video),sa(D,2),b.Pe=f,b.Oe=g,b.Qe=h,b.Yf=k,b.Re=l,y=a.m.sequenceMode||"HLS"==a.m.type,C(D,Zi(a.g.T,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=D.g)return m&&(B=null,b.type===d.$?B=a.i.get(d.O):b.type===d.O&&(B=a.i.get(d.$)),B&&(B.vb=!1,B.Da=!1,vk(a,B))),ua(D,0);A=va(D);b.Pe=null;b.Oe=null;b.Qe=null;b.Re=null;throw A;})};return C(x,q(),2)}Gh(c.aa,b.Bb)||(b.Bb=c.aa,c.j&&c.aa&&(p=Hk(a,b,c.aa),u=function(){var z,
|
|
405
|
+
y,B,A,D,F;return K(function(J){switch(J.g){case 1:return sa(J,2),C(J,p,4);case 4:return z=J.h,yf(a.l),y=null,B=new Map,A=new Vf,A.box("moov",$f).box("trak",$f).box("mdia",$f).P("mdhd",function(G){y=Xh(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.sb(4);var H=String.fromCharCode(G[0]);H+=String.fromCharCode(G[1]);H+=String.fromCharCode(G[2]);H+=String.fromCharCode(G[3]);switch(H){case "soun":B.set(d.O,y);break;case "vide":B.set(d.$,y)}y=null}).parse(z),B.has(b.type)?
|
|
406
|
+
c.aa.timescale=B.get(b.type):null!=y&&(c.aa.timescale=y),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(J,a.g.Ef(b.type,z),5);case 5:return C(J,Qi(a.g.T,b.type,z,null,b.stream,D),6);case 6:ua(J,0);break;case 2:throw F=va(J),b.Bb=null,F;}})},a.g.Eh(c.startTime,c.aa),e.push(u())));a.m.sequenceMode&&(v=b.Ca?b.Ca.i:null,c.i!=v||b.Xe)&&(b.Xe=!1,e.push(aj(a.g.T,b.type,c.startTime)));return C(x,Promise.all(e),0)})}
|
|
407
|
+
function Gk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return K(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.C;if(l||m)k=new Vf;l&&k.P("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var x=u.reader.ad();var z=u.reader.ad();var y=u.reader.L();var B=u.reader.L();var A=u.reader.L();var D=u.reader.L();var F=e.startTime+B/y}else y=u.reader.L(),F=u.reader.mc()/
|
|
408
|
+
y+e.timestampOffset,B=F-e.startTime,A=u.reader.L(),D=u.reader.L(),x=u.reader.ad(),z=u.reader.ad();u=u.reader.sb(u.reader.getLength()-u.reader.qa());if(v&&v.includes(x)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.Fh():(v=(new Map).set("detail",{startTime:F,endTime:F+A/y,schemeIdUri:x,value:z,timescale:y,presentationTimeDelta:B,eventDuration:A,id:D,messageData:u}),v=new Q("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
409
|
+
x||(x=Th(u),x.length&&e&&a.g.Gh([{cueTime:e.startTime,data:u,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.P("prft",function(u){if(!a.C&&e.aa.timescale){var v=u.reader,x=u.version;v.L();u=v.L();var z=v.L();u=1E3*u+z/Math.pow(2,32)*1E3;0===x?v=v.L():(x=v.L(),v=v.L(),v=x*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.aa.timescale*1E3)});v=new Q("prft",v);a.g.onEvent(v);
|
|
410
|
+
a.C=!0}});(l||m)&&k.parse(f);return C(p,Kk(a,b,c),2);case 2:return yf(a.l),n=b.dd,b.dd=!1,q=b.Cf,b.Cf=!1,C(p,a.g.Ef(b.type,f),3);case 3:return C(p,Qi(a.g.T,b.type,f,e,d,h,n,q,g),4);case 4:yf(a.l),E(p)}})}function Kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Li(a.g.T,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():C(h,a.g.T.remove(b.type,e,e+g),2)}yf(a.l);E(h)})}
|
|
411
411
|
function Ak(a){return a&&a.type==Dc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
412
|
-
function Hk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Fh&&(e=c.g))return l.return(e);f=null;if(b.ra){var m=b.ra;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=wk(a,c,b.stream,d));g=0;b.X&&(g=b.X.g);b.
|
|
413
|
-
function wk(a,b,c,d){var e=b instanceof S?b:void 0,f=e?1:0;b=ek(b.Z(),b.
|
|
414
|
-
function tk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.
|
|
415
|
-
function nk(a,b,c){var d=b.type;if(d!=Dc||a.i.has(d))b.
|
|
416
|
-
function zk(a,b,c){var d;return K(function(e){if(1==e.g)return C(e,Xe(a.G),2);yf(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.
|
|
417
|
-
function Lk(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.H<c)return h.return(!1);a.H=b;d=Ec;if(e=a.i.get(d.O))e.
|
|
412
|
+
function Hk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Fh&&(e=c.g))return l.return(e);f=null;if(b.ra){var m=b.ra;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=wk(a,c,b.stream,d));g=0;b.X&&(g=b.X.g);b.Ma=f;return C(l,f.promise,2);case 2:h=l.h;b.Ma=null;k=h.data;if(!c.aes128Key){l.B(3);break}return C(l,Jk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
413
|
+
function wk(a,b,c,d){var e=b instanceof S?b:void 0,f=e?1:0;b=ek(b.Z(),b.Pa,b.wa,a.h.retryParameters,d);return a.g.Tb.request(vf,b,{type:f,stream:c,segment:e})}
|
|
414
|
+
function tk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.vb=!1,b.Yd=!1,b.vd=0,b.Jc=!0,b.Ca=null,b.Bb=null,b.X=null,b.ra&&bk(b.ra),d?(e=a.g.Dd(),f=a.g.T.getDuration(),C(g,a.g.T.remove(b.type,e+d,f),3)):C(g,Yi(a.g.T,b.type),4);if(3!=g.g)return yf(a.l),c?C(g,a.g.T.flush(b.type),3):g.B(3);yf(a.l);b.Jc=!1;b.endOfStream=!1;b.Da||b.hb||nk(a,b,0);E(g)})}
|
|
415
|
+
function nk(a,b,c){var d=b.type;if(d!=Dc||a.i.has(d))b.hb=(new pd(function(){var e;return K(function(f){if(1==f.g)return sa(f,2),C(f,xk(a,b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);E(f)})})).U(c)}function hk(a){null!=a.hb&&(a.hb.stop(),a.hb=null)}function ik(a){return K(function(b){return a.Ma?C(b,a.Ma.abort(),0):b.B(0)})}
|
|
416
|
+
function zk(a,b,c){var d;return K(function(e){if(1==e.g)return C(e,Xe(a.G),2);yf(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.wd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);E(e)})}
|
|
417
|
+
function Lk(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.H<c)return h.return(!1);a.H=b;d=Ec;if(e=a.i.get(d.O))e.Bb=null,vk(a,e),ik(e).catch(function(){});if(f=a.i.get(d.$))f.Bb=null,vk(a,f),ik(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.O,a.j.audio);a.j.video&&g.set(d.$,a.j.video);return C(h,gj(a.g.T,g),2)}return h.return(!0)})};function Mk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new fc(a)).Ga.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Nk[d])return m.return(e);f=0;g=pf([a],c);sa(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ua(m,3);break;case 2:k=va(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
418
418
|
e.toLowerCase().split(";").shift():"")}})}
|
|
419
419
|
var Nk={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Ok(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Ok(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Pk(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Pk(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;k=k.next().value;
|
|
420
420
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
421
421
|
function Pk(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
422
422
|
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Qk(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,w(Qk(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Ok(d,b);c.push(e)}return c};function Rk(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=Rk.prototype;r.remove=function(a,b){if(!this.g)return!1;Sk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
423
|
-
r.append=function(a){var b=Qk(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={
|
|
423
|
+
r.append=function(a){var b=Qk(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={Zb:d.Zb},e=b.next())d.Zb=e.value,a.some(function(f){return function(g){return g.startTime==f.Zb.startTime&&g.endTime==f.Zb.endTime&&g.text==f.Zb.payload?!0:!1}}(d))||(e=Tk(d.Zb))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
|
|
424
424
|
c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(Sk(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"};
|
|
425
425
|
function Tk(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}
|
|
426
|
-
function Sk(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}
|
|
426
|
+
function Sk(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}N("shaka.text.SimpleTextDisplayer",Rk);Rk.prototype.setTextVisibility=Rk.prototype.setTextVisibility;Rk.prototype.isTextVisible=Rk.prototype.isTextVisible;Rk.prototype.destroy=Rk.prototype.destroy;Rk.prototype.append=Rk.prototype.append;Rk.prototype.remove=Rk.prototype.remove;/*
|
|
427
427
|
@license
|
|
428
428
|
Shaka Player
|
|
429
429
|
Copyright 2023 Google LLC
|
|
430
430
|
SPDX-License-Identifier: Apache-2.0
|
|
431
431
|
*/
|
|
432
|
-
function Uk(){}r=Uk.prototype;r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};
|
|
433
|
-
"resize",function(){var d=c.A,e=d.videoWidth;d=d.videoHeight;e&&d?c.j=e/d:c.j=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Yk(c,!0)}),this.o.observe(this.g));this.u=new Map}r=Xk.prototype;r.append=function(a){var b=[].concat(w(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={
|
|
432
|
+
function Uk(){}r=Uk.prototype;r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};N("shaka.text.StubTextDisplayer",Uk);Uk.prototype.setTextVisibility=Uk.prototype.setTextVisibility;Uk.prototype.isTextVisible=Uk.prototype.isTextVisible;Uk.prototype.destroy=Uk.prototype.destroy;Uk.prototype.append=Uk.prototype.append;Uk.prototype.remove=Uk.prototype.remove;function Vk(){}function Wk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",Vk);Vk.removeAllChildren=Wk;function Xk(a,b){var c=this;this.m=!1;this.i=[];this.A=a;this.s=b;this.j=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);this.C=(new qd(function(){Yk(c)})).Za(.25);this.h=new Map;this.l=new zf;this.l.D(document,"fullscreenchange",function(){Yk(c,!0)});this.l.D(this.A,
|
|
433
|
+
"resize",function(){var d=c.A,e=d.videoWidth;d=d.videoHeight;e&&d?c.j=e/d:c.j=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Yk(c,!0)}),this.o.observe(this.g));this.u=new Map}r=Xk.prototype;r.append=function(a){var b=[].concat(w(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={jd:c.jd},d=a.next())c.jd=d.value,b.some(function(e){return function(f){return Lb(f,e.jd)}}(c))||this.i.push(c.jd);Yk(this)};
|
|
434
434
|
r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.l&&(this.l.release(),this.l=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Yk(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.m};
|
|
435
435
|
r.setTextVisibility=function(a){this.m=a};function Zk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
436
|
-
function $k(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.
|
|
437
|
-
p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d
|
|
436
|
+
function $k(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.wg:null;l&&(g.push(l.oe),l.bd&&g.push(l.bd),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Zk(a,n)||(f=!0):(al(a,k,e),l=a.h.get(k),n=l.wg,f=!0));0<k.nestedCues.length&&n&&$k(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,p){return q.startTime!=
|
|
437
|
+
p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.bd?(c.appendChild(d.bd),d.bd.appendChild(d.oe)):c.appendChild(d.oe)}}function Yk(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.u.values());for(var d=b.next();!d.done;d=b.next())Wk(d.value);Wk(a.g);a.h.clear();a.u.clear()}if(a.m){b=new Map;d=t(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));$k(a,a.i,a.g,c,[])}}}
|
|
438
438
|
function al(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&bl(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.j===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Sb?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Sb?"%":"px");if(a.u.has(g))c=a.u.get(g);else{var h=document.createElement("span"),k=c.heightUnits==Sb?"%":"px",l=c.widthUnits==
|
|
439
439
|
Sb?"%":"px",m=c.viewportAnchorUnits==Sb?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.j===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):
|
|
440
440
|
(h.style.top=c.viewportAnchorY-c.regionAnchorY*c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.u.set(g,h);c=h}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,
|
|
441
|
-
{
|
|
441
|
+
{oe:f,wg:e,bd:c})}function cl(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Ab?c:"left"===a||"start"===a&&b===Db||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Db?"line-right":"center"}
|
|
442
442
|
function bl(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=dl(c.linePadding,c,a.s);f.paddingRight=dl(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
443
443
|
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=el(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=el(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-
|
|
444
444
|
1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=dl(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Fb&&(g=1,h=16,a.j&&1>a.j&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",
|
|
445
445
|
c.writingMode==Eb?(f.width="100%",c.lineAlign==Gb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Gb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Gb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Eb?f.paddingLeft=c.position:f.paddingTop=c.position);a=cl(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");
|
|
446
446
|
f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Eb?f.width=c.size+"%":f.height=c.size+"%")}
|
|
447
|
-
function dl(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function el(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
|
|
447
|
+
function dl(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function el(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}N("shaka.text.UITextDisplayer",Xk);Xk.prototype.setTextVisibility=Xk.prototype.setTextVisibility;
|
|
448
448
|
Xk.prototype.isTextVisible=Xk.prototype.isTextVisible;Xk.prototype.remove=Xk.prototype.remove;Xk.prototype.destroy=Xk.prototype.destroy;Xk.prototype.append=Xk.prototype.append;function fl(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Qk(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
449
|
-
break;case "right":g.push("align:right");break;case Cb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}
|
|
450
|
-
function hl(a,b,c){try{if(!a.g.enabled)return b;var d=il(a);a:{switch(c.toLowerCase()){case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":
|
|
451
|
-
function il(a){a.
|
|
452
|
-
function
|
|
453
|
-
function
|
|
454
|
-
function
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
function
|
|
449
|
+
break;case "right":g.push("align:right");break;case Cb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}N("shaka.text.WebVttGenerator",function(){});function gl(a,b){this.h=a;this.g=b;this.i="";this.o=void 0;this.j=!1;this.m=!0;this.l=!1}gl.prototype.configure=function(a){this.g=a;this.g.sessionId&&this.g.sessionId!=this.i&&(this.i="")};
|
|
450
|
+
function hl(a,b,c){try{if(!a.g.enabled)return b;var d=il(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=jl;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=kl;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=ll;break a}e=void 0}d.ot=e;d.su=
|
|
451
|
+
!0;var f=ml(d);return nl(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function il(a){a.i||(a.i=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.i,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
452
|
+
function ol(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,il(a));c.pr=a.h.Cd();var e=c.ot===pl||c.ot===kl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=ql(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=ml(c);f&&(b.uris=b.uris.map(function(g){return nl(g,f)}))}}}
|
|
453
|
+
function rl(a){if(0===a.type)return sl;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?kl:pl;if("audio"==b)return jl;if("text"==b)return"application/mp4"===a.mimeType?tl:ul}}function vl(a,b){b=a.h.ob()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
454
|
+
function wl(a,b){var c=a.h.Ab();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case pl:return a.videoBandwidth||NaN;case jl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
455
|
+
function ml(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"===
|
|
456
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function ql(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=ml(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
457
|
+
function nl(a,b){if(!b||a.includes("offline:"))return a;a=new fc(a);a.g.set("CMCD",b);return a.toString()}var ll="m",jl="a",pl="v",kl="av",sl="i",ul="c",tl="tt";N("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",yg:"s",OTHER:"o"});function xl(a){this.h=a;this.g=null}r=xl.prototype;r.configure=function(a){this.h=a};r.Rf=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(yl)?1E3*this.g.get(yl):null};r.Qf=function(){return this.h.enabled&&this.g&&this.g.has(zl)?1E3*this.g.get(zl):null};r.fh=function(){return this.h.enabled&&this.g&&this.g.has(Al)?this.g.get(Al):null};r.gh=function(){return this.h.enabled&&this.g&&this.g.has(Bl)?this.g.get(Bl):null};
|
|
458
|
+
r.getBandwidthEstimate=function(a){var b=this.Qf();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Cl(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}N("shaka.util.CmsdManager",xl);xl.prototype.getBandwidthEstimate=xl.prototype.getBandwidthEstimate;xl.prototype.getRoundTripTime=xl.prototype.gh;xl.prototype.getResponseDelay=xl.prototype.fh;xl.prototype.getEstimatedThroughput=xl.prototype.Qf;
|
|
459
|
+
xl.prototype.getMaxBitrate=xl.prototype.Rf;var zl="etp",yl="mb",Al="rd",Bl="rtt";function Dl(){}
|
|
460
|
+
function El(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=nd(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=nd(l)),k=El(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ra("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ra("Invalid config, unrecognized key "+
|
|
461
|
+
k),g=!1)}return g}function Fl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Gl(a,b){return a&&b}N("shaka.util.ConfigUtils",Dl);Dl.convertToConfigObject=Fl;Dl.mergeConfigObjects=El;function Hl(){this.g=null;this.h=[]}function Il(a,b){return K(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;E(c)})}Hl.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function Jl(){}function Kl(a){a=Pf(a);return(new fc(a)).nb}function Ll(a,b,c){function d(h){nb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(hb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=Rf(b,!0):e=b;a=Pf(a);a=Rf(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Ml(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Pf(a).split("skd://").pop();return Ll(a,c,b)}
|
|
462
|
+
function Nl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}N("shaka.util.FairPlayUtils",Jl);Jl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Kf(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=kb(hg(c)))}};Jl.expressplayFairPlayRequest=function(a,b){Nl(a,b)};
|
|
462
463
|
Jl.conaxFairPlayRequest=function(a,b){Nl(a,b)};Jl.ezdrmFairPlayRequest=function(a,b){Nl(a,b)};Jl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=hb(b.body),a=gg(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Qf("spc="+a))};Jl.expressplayInitDataTransform=function(a,b,c){return Ml(a,b,c)};
|
|
463
464
|
Jl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Pf(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=mb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Ll(a,d,b)};Jl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Pf(a).split(";").pop();return Ll(a,c,b)};Jl.verimatrixInitDataTransform=function(a,b,c){return Ml(a,b,c)};Jl.initDataTransform=Ll;
|
|
464
465
|
Jl.defaultGetContentId=Kl;Jl.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"'}]},sa(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);va(b);return b.return(!1)})};function Ol(){}
|
|
@@ -475,142 +476,142 @@ preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restric
|
|
|
475
476
|
logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};f.trackSelectionCallback=function(h){return K(function(k){return k.return(Ql(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return g}
|
|
476
477
|
function Rl(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 El(a,b,c||Pl(),d,"")}
|
|
477
478
|
function Ql(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=ld(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return dd(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
478
|
-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Dc&&"image"!=c.type||b.push(c);return b}
|
|
479
|
-
this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.
|
|
480
|
-
this.
|
|
481
|
-
function fm(a,b){if(b.lcevc.enabled){var c=a.
|
|
482
|
-
r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==hm)return c.return();em(a);b=a.detach();a.l=hm;return C(c,b,2);case 2:a.
|
|
479
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Dc&&"image"!=c.type||b.push(c);return b}N("shaka.util.PlayerConfiguration",Ol);Ol.mergeConfigObjects=Rl;Ol.createDefault=Pl;function Sl(){this.g=null;this.h=[]}function Tl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Ul(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 Vl(){this.i=this.h=null;this.g=[]}function Wl(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 Xl(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.N=this.H=this.I=this.J=this.l=this.o=NaN;this.g=new Sl;this.h=new Vl};function W(a,b){hf.call(this);var c=this;this.l=Yl;this.xd=this.g=null;this.da=!1;this.Gd=new zf;this.qc=new zf;this.o=new zf;this.Ba=new zf;this.C=this.G=this.m=this.H=null;this.Id=0;this.W=new Hl;this.ma=this.ea=this.i=this.Kd=this.F=this.j=this.za=this.J=this.eg=this.Y=this.V=this.Aa=this.K=this.I=this.$b=null;this.lb=!1;this.Me=this.s=null;this.We=1E9;this.Mc=[];this.N=NaN;this.h=Zl(this);this.Te={width:Infinity,height:Infinity};this.u=null;this.jb=new Ie(this.h.preferredAudioLanguage,this.h.preferredVariantRole,
|
|
480
|
+
this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.kb=this.h.preferredTextLanguage;this.Ic=this.h.preferredTextRole;this.Hc=this.h.preferForcedSubs;this.Fc=[];b&&b(this);this.V=$l(this);this.Y=new xl(this.h.cmsd);this.H=am(this);this.H.nf(this.h.streaming.forceHTTPS);this.A=null;bm&&(this.A=bm(),
|
|
481
|
+
this.A.configure(this.h.ads));this.Gd.D(window,"online",function(){cm(c);c.gf()});this.yd=new qd(function(){return dm(c)});a&&(ye("Player","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Gc(a,!0))}oa(W,hf);function em(a){null!=a.J&&(ui(a.J),a.J.release(),a.J=null)}
|
|
482
|
+
function fm(a,b){if(b.lcevc.enabled){var c=a.Ab();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(ud()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Sa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));em(a);null==a.J&&(a.J=new ti(a.g,a.eg,b.lcevc),a.G&&(a.G.N=a.J))}else em(a)}function gm(a,b){return new Q(a,b)}r=W.prototype;
|
|
483
|
+
r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==hm)return c.return();em(a);b=a.detach();a.l=hm;return C(c,b,2);case 2:a.Gd&&(a.Gd.release(),a.Gd=null);a.qc&&(a.qc.release(),a.qc=null);a.o&&(a.o.release(),a.o=null);a.Ba&&(a.Ba.release(),a.Ba=null);a.Me=null;a.h=null;a.u=null;a.xd=null;a.V=null;a.Y=null;if(!a.H){c.B(3);break}return C(c,a.H.destroy(),4);case 4:a.H=null;case 3:a.s&&(a.s.release(),a.s=null),hf.prototype.release.call(a),E(c)}})};
|
|
483
484
|
function im(a,b){a.dispatchEvent(gm("onstatechange",(new Map).set("state",b)))}
|
|
484
|
-
r.
|
|
485
|
-
r.
|
|
486
|
-
r.
|
|
487
|
-
c.F.stop(),7);case 7:c.F=null,c.
|
|
488
|
-
c.g.load();case 14:if(!c.m){q.B(16);break}return C(q,c.m.destroy(),17);case 17:c.m=null;case 16:c.ea=null;c.K=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new Xl;c.
|
|
489
|
-
rd()&&!c.G)return C(q,mm(c),0);q.B(0)}})};r.
|
|
490
|
-
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:if(d.l==hm)throw new O(2,7,7E3);return C(m,Il(d.W,"load"),2);case 2:d.W.release();if(!d.g)throw new O(2,7,7002);if(!d.ea){m.B(3);break}return C(m,d.
|
|
491
|
-
d.ma=b;d.
|
|
492
|
-
rm(d,c),0)})},"parseManifestInner_"),13);case 13:return C(m,g(function(){return K(function(n){return C(n,sm(d),0)})},"initializeDrmInner_"),14);case 14:return C(m,g(function(){return K(function(n){return C(n,tm(d,h),0)})},"loadInner_"),10);case 16:return C(m,g(function(){return K(function(n){return C(n,um(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(gm("loaded"));ua(m,0);break;case 5:l=va(m);if(7E3==l.code){m.B(18);break}return C(m,d.
|
|
485
|
+
r.Gc=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return K(function(f){switch(f.g){case 1:if(c.l==hm)throw new O(2,7,7E3);if(!c.g||c.g==a){f.B(2);break}return C(f,c.detach(),2);case 2:return C(f,jm(c,"attach"),4);case 4:if(f.h)return f.return();sa(f,5,6);im(c,"attach");d=function(){var g=km(c);g&&lm(c,g)};c.qc.D(a,"error",d);c.g=a;if(!b||!rd()||c.G){f.B(6);break}return C(f,mm(c),6);case 6:wa(f);c.W.release();ya(f,0);break;case 5:return e=va(f),C(f,c.detach(),10);case 10:throw e;}})};
|
|
486
|
+
r.Eg=function(a){this.eg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return K(function(c){if(1==c.g){if(b.l==hm)throw new O(2,7,7E3);return C(c,b.pc(!1,a),2)}if(3!=c.g)return C(c,jm(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.qc.Ya(),b.g=null),im(b,"detach"),b.A&&!a&&b.A.release()}finally{b.W.release()}E(c)})};function jm(a,b){var c;return K(function(d){return 1==d.g?(c=++a.Id,C(d,Il(a.W,b),2)):c!=a.Id?(a.W.release(),d.return(!0)):d.return(!1)})}
|
|
487
|
+
r.pc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return K(function(q){switch(q.g){case 1:return c.l!=hm&&(c.l=Yl),C(q,jm(c,"unload"),2);case 2:if(q.h)return q.return();ta(q,3);c.lb=!1;im(c,"unload");a&&!rd()&&(a=!1);em(c);d=c.Fc.map(function(p){return p()});c.Fc=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(gm("unloading"));c.Aa&&(c.Aa.release(),c.Aa=null);c.g&&(c.o.Ya(),c.Ba.Ya());c.yd.stop();c.$b&&(c.$b.release(),c.$b=null);if(!c.F){q.B(6);break}return C(q,
|
|
488
|
+
c.F.stop(),7);case 7:c.F=null,c.Kd=null;case 6:if(!c.s){q.B(8);break}return C(q,c.s.stop(),8);case 8:if(!c.j){q.B(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.C&&(c.C.release(),c.C=null);if(!c.G){q.B(12);break}return C(q,c.G.destroy(),13);case 13:c.G=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.Y&&(c.Y.g=null);c.g&&Wk(c.g);if(!c.g||!c.g.src){q.B(14);break}return C(q,new Promise(function(p){return(new qd(p)).U(.1)}),15);case 15:c.g.removeAttribute("src"),
|
|
489
|
+
c.g.load();case 14:if(!c.m){q.B(16);break}return C(q,c.m.destroy(),17);case 17:c.m=null;case 16:c.ea=null;c.K=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new Xl;c.Ne=null;c.Mc=[];c.N=NaN;nm(c);case 3:wa(q);c.W.release();ya(q,4);break;case 4:if(a&&
|
|
490
|
+
rd()&&!c.G)return C(q,mm(c),0);q.B(0)}})};r.ei=function(a){this.ma=a};
|
|
491
|
+
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:if(d.l==hm)throw new O(2,7,7E3);return C(m,Il(d.W,"load"),2);case 2:d.W.release();if(!d.g)throw new O(2,7,7002);if(!d.ea){m.B(3);break}return C(m,d.pc(!1),3);case 3:e=++d.Id;f=function(){if(d.Id!=e)throw new O(2,7,7E3);};g=function(n,q){return K(function(p){switch(p.g){case 1:return ta(p,2),C(p,Il(d.W,q),4);case 4:return f(),C(p,n(),5);case 5:f();case 2:wa(p),d.W.release(),ya(p,0)}})};sa(m,5);
|
|
492
|
+
d.ma=b;d.lb=!1;d.dispatchEvent(gm("loading"));h=Date.now()/1E3;d.u=new Xl;d.ea=a;if(c){m.B(7);break}return C(m,g(function(){return K(function(n){if(1==n.g)return C(n,om(d),2);c=n.h;E(n)})},"guessMimeType_"),7);case 7:if(k=pm(d,c))return C(m,g(function(){return K(function(n){return C(n,qm(d,c),0)})},"initializeSrcEqualsDrmInner_"),16);if(d.G){m.B(11);break}return C(m,g(function(){return K(function(n){return C(n,mm(d),0)})},"initializeMediaSourceEngineInner_"),11);case 11:return C(m,g(function(){return K(function(n){return C(n,
|
|
493
|
+
rm(d,c),0)})},"parseManifestInner_"),13);case 13:return C(m,g(function(){return K(function(n){return C(n,sm(d),0)})},"initializeDrmInner_"),14);case 14:return C(m,g(function(){return K(function(n){return C(n,tm(d,h),0)})},"loadInner_"),10);case 16:return C(m,g(function(){return K(function(n){return C(n,um(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(gm("loaded"));ua(m,0);break;case 5:l=va(m);if(7E3==l.code){m.B(18);break}return C(m,d.pc(!1),18);case 18:throw l;}})};
|
|
493
494
|
function om(a){var b,c;return K(function(d){if(1==d.g)return b=a.h.manifest.retryParameters,C(d,Mk(a.ea,a.H,b),2);c=d.h;"application/x-mpegurl"==c&&Cd()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function pm(a,b){if(!rd())return!0;if(b){if(""==(a.g||td()).canPlayType(b))return!1;if(!(rd()&&b in Ah))return!0;if("application/x-mpegurl"===b||"application/vnd.apple.mpegurl"===b){if(a.h.streaming.preferNativeHls)return!0;if(Cd())return a.h.streaming.useNativeHlsOnSafari}}return!1}
|
|
494
|
-
function mm(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return im(a,"media-source"),b=a.h.textDisplayFactory,c=b(),a.
|
|
495
|
-
function rm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,im(a,"manifest-parser"),a.
|
|
495
|
+
function mm(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return im(a,"media-source"),b=a.h.textDisplayFactory,c=b(),a.Ne=b,d=vm(a.g,c,function(h,k,l){wm(a,h,k,l)},a.J),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.Y=f,C(g,d.J,2);a.G=d;E(g)})}
|
|
496
|
+
function rm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,im(a,"manifest-parser"),a.Kd=zh(a.ea,b||null),a.F=a.Kd(),d=nd(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.F.configure(d),a.Aa=new Qj(function(){return a.Db()}),a.Aa.addEventListener("regionadd",function(n){n=n.region;xm(a,"timelineregionadded",n);if(a.A)a.A.onDashTimedMetadata(n)}),a.za=null,a.h.streaming.observeQualityChanges&&(a.za=new Mj(function(){return a.ob()}),a.za.addEventListener("qualitychange",
|
|
496
497
|
function(n){var q=n.quality;n=n.position;q=(new Map).set("mediaQuality",{bandwidth:q.bandwidth,audioSamplingRate:q.audioSamplingRate,codecs:q.codecs,contentType:q.contentType,frameRate:q.frameRate,height:q.height,mimeType:q.mimeType,channelsCount:q.channelsCount,pixelAspectRatio:q.pixelAspectRatio,width:q.width}).set("position",n);a.dispatchEvent(gm("mediaqualitychanged",q))})),e={networkingEngine:c,filter:function(n){return ym(a,n)},makeTextStreamsForClosedCaptions:function(n){return zm(a,n)},onTimelineRegionAdded:function(n){var q=
|
|
497
|
-
a.
|
|
498
|
+
a.Aa;a:{var p=t(q.g);for(var u=p.next();!u.done;u=p.next())if(u=u.value,u.schemeIdUri==n.schemeIdUri&&u.id==n.id&&u.startTime==n.startTime&&u.endTime==n.endTime){p=u;break a}p=null}null==p&&(q.g.add(n),n=new Q("regionadd",new Map([["region",n]])),q.dispatchEvent(n))},onEvent:function(n){return a.dispatchEvent(n)},onError:function(n){return lm(a,n)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",
|
|
498
499
|
!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(n){var q=a.m?a.m.g:null;q&&a.m.s&&Am(a,q.keySystem,n)},onManifestUpdated:function(){var n=(new Map).set("isLive",a.R());a.dispatchEvent(gm("manifestupdated",n));if(a.A)a.A.onManifestUpdated(a.R())},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}},f=Date.now()/1E3,im(a,"manifest"),g=a,C(m,a.F.start(a.ea,e),2);g.i=m.h;h=gm("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);
|
|
499
|
-
Bm(a.i);k=Date.now()/1E3;l=k-f;a.u.F=l;E(m)})}function sm(a){var b,c;return K(function(d){return 1==d.g?(im(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.m=Cm(a,{
|
|
500
|
-
function tm(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
501
|
-
(ye("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),"function"!=typeof a.s.setCmsdManager&&(ye("AbrManager","Please use an AbrManager with setCmsdManager function."),a.s.setCmsdManager=function(){}),"function"!=typeof a.s.trySuggestStreams&&(ye("AbrManager","Please use an AbrManager with trySuggestStreams function."),a.s.trySuggestStreams=function(){}),a.s.configure(a.h.abr));a.
|
|
502
|
-
a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferSpatialAudio,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.preferredVideoLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.
|
|
500
|
+
Bm(a.i);k=Date.now()/1E3;l=k-f;a.u.F=l;E(m)})}function sm(a){var b,c;return K(function(d){return 1==d.g?(im(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.m=Cm(a,{Tb:a.H,onError:function(e){lm(a,e)},Td:function(e){Dm(a,e)},onExpirationUpdated:function(e,f){Em(a,e,f)},onEvent:function(e){a.dispatchEvent(e);"drmsessionupdate"==e.type&&c&&(c=!1,a.u.j=Date.now()/1E3-b,a.J&&ui(a.J))}}),a.m.configure(a.h.drm),C(d,Qg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=d.g?C(d,a.m.Gc(a.g),3):C(d,ym(a,a.i),0)})}
|
|
501
|
+
function tm(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){switch(D.g){case 1:im(a,"load");c=a.g;a.I=new Jj({Ed:function(){return c.playbackRate},ec:function(){return c.defaultPlaybackRate},rf:function(F){c.playbackRate=F},bg:function(F){c.currentTime+=F}});d=function(){return Fm(a)};e=function(){return Gm(a)};a.o.D(c,"playing",d);a.o.D(c,"pause",d);a.o.D(c,"ended",d);a.o.D(c,"ratechange",e);fm(a,a.h);f=a.h.abrFactory;a.s&&a.Me==f||(a.Me=f,a.s=f(),"function"!=typeof a.s.setMediaElement&&
|
|
502
|
+
(ye("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),"function"!=typeof a.s.setCmsdManager&&(ye("AbrManager","Please use an AbrManager with setCmsdManager function."),a.s.setCmsdManager=function(){}),"function"!=typeof a.s.trySuggestStreams&&(ye("AbrManager","Please use an AbrManager with trySuggestStreams function."),a.s.trySuggestStreams=function(){}),a.s.configure(a.h.abr));a.jb=new Ie(a.h.preferredAudioLanguage,a.h.preferredVariantRole,
|
|
503
|
+
a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferSpatialAudio,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.preferredVideoLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.kb=a.h.preferredTextLanguage;a.Ic=a.h.preferredTextRole;a.Hc=a.h.preferForcedSubs;Hm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(F,J,G){a.j&&F!=a.j.j&&Im(a,F,!0,void 0===J?!1:J,void 0===G?0:G)});a.s.setMediaElement(c);a.s.setCmsdManager(a.Y);
|
|
503
504
|
Md(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);a.j=Jm(a);a.j.configure(a.h.streaming);a.l=Km;c.textTracks&&a.o.D(c.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":Lm(a,F)}});a.dispatchEvent(gm("streaming"));g=null;(h=a.j.j)||(g=Mm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(q=n.value)&&!q.segmentIndex&&k.push(q.createSegmentIndex());if(!(0<k.length)){D.B(2);break}return C(D,Promise.all(k),
|
|
504
|
-
2);case 2:if(a.F&&a.F.onInitialVariantChosen)a.F.onInitialVariantChosen(l);Hm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C=Nm(a,a.ma);a
|
|
505
|
-
null)&&Wl(a.u.h,z,!0),g&&(z?(g.audio&&Rm(a,g.audio,z)&&(a.da=!0),a.da&&a.G.F.setTextVisibility(!0),Sm(a)):a.da=!1),z&&(a.h.streaming.alwaysStreamText||a.
|
|
506
|
-
a.
|
|
507
|
-
function qm(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Ec,d=Date.now()/1E3,e=!0,a.m=Cm(a,{
|
|
508
|
-
mimeType:b?Nc(b):"",codecs:b?Oc(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.$,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Y=!0,C(g,Qg(a.m,[f],[]),2)):C(g,a.m.
|
|
509
|
-
function um(a,b,c){var d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g)return im(a,"src-equals"),d=a.g,a.C=new yj(d),e=!1,a.
|
|
505
|
+
2);case 2:if(a.F&&a.F.onInitialVariantChosen)a.F.onInitialVariantChosen(l);Hm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C=Nm(a,a.ma);a.$b=Om(a,b);p=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Pm(a,c,p);if(h){D.B(4);break}Im(a,g,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){D.B(4);break}u=a.C;v=u.ie;return C(D,Qm(g,a.C.qd()),6);case 6:v.call(u,D.h);case 4:return a.C.he(),x=a.hc().find(function(F){return F.active}),x||((z=pe(a.i.textStreams,a.kb,a.Ic,a.Hc)[0]||
|
|
506
|
+
null)&&Wl(a.u.h,z,!0),g&&(z?(g.audio&&Rm(a,g.audio,z)&&(a.da=!0),a.da&&a.G.F.setTextVisibility(!0),Sm(a)):a.da=!1),z&&(a.h.streaming.alwaysStreamText||a.Le())&&sk(a.j,z)),C(D,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Tm(a));Um(a);Vm(a);a.i.variants.some(function(F){return F.primary});(y=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription)?(B=function(){return Wm(a)},a.o.D(c,"timeupdate",B)):y||(A=function(){return Xm(a)},a.o.D(c,"timeupdate",A),Xm(a));if(a.A)a.A.onManifestUpdated(y);
|
|
507
|
+
a.lb=!0;a.o.ja(c,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});E(D)}})}
|
|
508
|
+
function qm(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Ec,d=Date.now()/1E3,e=!0,a.m=Cm(a,{Tb:a.H,onError:function(h){lm(a,h)},Td:function(h){Dm(a,h)},onExpirationUpdated:function(h,k){Em(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.u.j=Date.now()/1E3-d)}}),a.m.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
|
|
509
|
+
mimeType:b?Nc(b):"",codecs:b?Oc(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.$,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Y=!0,C(g,Qg(a.m,[f],[]),2)):C(g,a.m.Gc(a.g),0)})}
|
|
510
|
+
function um(a,b,c){var d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g)return im(a,"src-equals"),d=a.g,a.C=new yj(d),e=!1,a.Fc.push(function(){e=!0}),null!=a.ma&&a.C.ie(a.ma),a.I=new Jj({Ed:function(){return d.playbackRate},ec:function(){return d.defaultPlaybackRate},rf:function(u){d.playbackRate=u},bg:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,Pm(a,d,f),g=function(){return Fm(a)},h=function(){return Gm(a)},a.o.D(d,"playing",g),a.o.D(d,"pause",g),a.o.D(d,"ended",g),a.o.D(d,
|
|
510
511
|
"ratechange",h),"none"!=d.preload&&a.o.ja(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.o.D(d.audioTracks,"addtrack",function(){return Um(a)}),a.o.D(d.audioTracks,"removetrack",function(){return Um(a)}),a.o.D(d.audioTracks,"change",function(){return Um(a)})),d.textTracks&&(a.o.D(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Ym(a,u);break;case "chapters":Lm(a,u);break;default:Um(a)}}),a.o.D(d.textTracks,"removetrack",function(){return Um(a)}),
|
|
511
|
-
a.o.D(d.textTracks,"change",function(){return Um(a)})),d.src=hl(a.V,a.ea,c),(xd()||wd("Web0S"))&&d.load(),a.l=Zm,a.dispatchEvent(gm("streaming")),k=new Ye,pj(d,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.C.
|
|
512
|
-
if(e)return v.return();bn(a);E(v)})}),d.error?k.reject(km(a)):"none"==d.preload&&(
|
|
513
|
-
a.o.D(d,"timeupdate",n),Xm(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.
|
|
514
|
-
function Ym(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,cn(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new qd(function(){var d=dn(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).
|
|
512
|
+
a.o.D(d.textTracks,"change",function(){return Um(a)})),d.src=hl(a.V,a.ea,c),(xd()||wd("Web0S"))&&d.load(),a.l=Zm,a.dispatchEvent(gm("streaming")),k=new Ye,pj(d,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.C.he();k.resolve()}),pj(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var u;return K(function(v){if(1==v.g)return $m(a),u=an(a),u.find(function(x){return"disabled"!=x.mode})?(0<u.length&&(a.da=!0),v.B(2)):C(v,new Promise(function(x){a.o.ja(d.textTracks,"change",x);(new qd(x)).U(1)}),2);
|
|
513
|
+
if(e)return v.return();bn(a);E(v)})}),d.error?k.reject(km(a)):"none"==d.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.o.ja(d,"error",function(){k.reject(km(a))}),C(p,k,2);(l=a.R())&&a.h.streaming.liveSync?(m=function(){return Wm(a)},a.o.D(d,"timeupdate",m)):l||(n=function(){return Xm(a)},
|
|
514
|
+
a.o.D(d,"timeupdate",n),Xm(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.Db().end,a.o.D(d,"progress",function(){var u=a.Db().end;q!=u&&(a.A.onManifestUpdated(a.R()),q=u)})));a.lb=!0;E(p)})}function $m(a){var b=a.h.preferredAudioLanguage;""!=b&&a.jg(b,a.h.preferredVariantRole)}function bn(a){var b=a.h.preferredTextLanguage;""!=b&&a.kf(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
|
|
515
|
+
function Ym(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,cn(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new qd(function(){var d=dn(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).oc().U(.5);a.Fc.push(function(){c.stop()})}}
|
|
515
516
|
function wm(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())cn(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function cn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(gm("metadata",b))}
|
|
516
|
-
function Lm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new qd(function(){b.mode="hidden"})).
|
|
517
|
+
function Lm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new qd(function(){b.mode="hidden"})).oc().U(.5);a.Fc.push(function(){c.stop()})}}function Bm(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))}r.Mh=function(){for(var a=this.W;a.g;)a.release()};function Cm(a,b){return new Jg(b,a.h.drm.updateExpirationTime)}
|
|
517
518
|
function am(a){return new lf(function(b,c,d){a.s&&a.s.segmentDownloaded(b,c,d)},function(b,c,d){c=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(gm("downloadheadersreceived",c));if(a.Y&&(c=a.Y,c.h.enabled)){if(d=b["cmsd-static"])try{var e=new Map,f=d.split(",");for(d=0;d<f.length;d++){var g=f[d].split("=");e.set(g[0],Cl(g[1]))}}catch(n){}if(b=b["cmsd-dynamic"]){try{var h=new Map,k=b.split(";");for(b=1;b<k.length;b++){var l=k[b].split("=");h.set(l[0],Cl(l[1]))}var m=
|
|
518
|
-
h}catch(n){m=null}m&&(c.g=m)}}},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(gm("downloadfailed",b))},function(b,c,d){var e=a.V;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)
|
|
519
|
-
m)}break;case vf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.R()?"l":"v"};h.ot=
|
|
520
|
-
function Nm(a,b){return new zj(a.g,a.i,a.h.streaming,b,function(){a
|
|
521
|
-
function Om(a,b){b=new Rj(a.
|
|
519
|
+
h}catch(n){m=null}m&&(c.g=m)}}},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(gm("downloadfailed",b))},function(b,c,d){var e=a.V;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)ol(e,c);else switch(b){case 0:try{if(e.g.enabled){if(d.type){a:{switch(d.type){case 4:var f="d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.o=f}ol(e,c,{ot:ll,su:!e.j})}}catch(m){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",
|
|
520
|
+
m)}break;case vf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.R()?"l":"v"};h.ot=rl(b);var k=h.ot===pl||h.ot===jl||h.ot===kl||h.ot===tl,l=b.stream;l&&(k&&(h.bl=vl(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==tl&&(h.tb=wl(e,h.ot)/1E3);ol(e,c,h)}}catch(m){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:ol(e,c,{ot:"k"});break;case 4:ol(e,c,{ot:"o"})}},function(b,c,d,e){a.F&&a.F.banLocation&&a.F.banLocation(e)})}
|
|
521
|
+
function Nm(a,b){return new zj(a.g,a.i,a.h.streaming,b,function(){a.$b&&Lj(a.$b,!0);a.j&&a.j.dd();a.K&&en(a)},function(c){return a.dispatchEvent(c)})}
|
|
522
|
+
function Om(a,b){b=new Rj(a.Aa,a.R()||0<b);b.addEventListener("enter",function(d){xm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){xm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(xm(a,"timelineregionenter",e),xm(a,"timelineregionexit",e))});var c=new Kj(a.g);c.g.add(b);a.za&&c.g.add(a.za);return c}
|
|
522
523
|
function Pm(a,b,c){a.K=new Re;a.K.g=Te;Ue(a.K,c,Math.min(.5,c/2));nm(a);a.o.D(b,"waiting",function(){return en(a)});a.o.D(b,"stalled",function(){return en(a)});a.o.D(b,"canplaythrough",function(){return en(a)});a.o.D(b,"progress",function(){return en(a)})}
|
|
523
|
-
function en(a){switch(a.l){case Zm:if(a.g.ended)var b=!0;else{var c=Jh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Km:a:if(a.g.ended||Ki(a.G))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.
|
|
524
|
-
function $l(a){return new gl({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},
|
|
525
|
-
function Jm(a){return new fk(a.i,{
|
|
526
|
-
|
|
524
|
+
function en(a){switch(a.l){case Zm:if(a.g.ended)var b=!0;else{var c=Jh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Km:a:if(a.g.ended||Ki(a.G))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.zb();var d=Jh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Lh(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Se:Te;c.g=d;b!=d&&nm(a)}function vm(a,b,c,d){return new Ci(a,b,c,d)}
|
|
525
|
+
function $l(a){return new gl({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},ob:function(){return a.ob()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Cd:function(){return a.Cd()},Nb:function(){return a.Nb()},Ab:function(){return a.Ab()},R:function(){return a.R()}},a.h.cmcd)}
|
|
526
|
+
function Jm(a){return new fk(a.i,{Dd:function(){return a.C?a.C.qd():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},T:a.G,Tb:a.H,onError:function(b){return lm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Fh:function(){a.F&&a.F.update&&a.F.update()},af:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;a.C&&a.C.cg();en(a);d=(new Map).set("start",d).set("end",e).set("contentType",f);a.dispatchEvent(gm("segmentappended",d));a.s&&c.fastSwitching&&b.Zc&&b.Ld&&a.s.trySuggestStreams()},
|
|
527
|
+
Eh:function(b,c){(c=c.Ve)&&a.za&&Oj(a.za,c,b)},Ef:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new lg(hb(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Zg(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Gh:function(b,c,d){wm(a,b,c,d)},wd:function(b,c){return a.wd(b,c)}})}
|
|
527
528
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Fl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(ye("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(ye("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
528
529
|
a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.retryParameters&&
|
|
529
530
|
(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));var c=Rl(this.h,a,Zl(this));fn(this);return c};
|
|
530
|
-
function fn(a){if(a.F){var b=nd(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.F.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{gn(a,a.i)}catch(f){lm(a,f)}a.s&&Vm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||hn(a)}a.H&&a.H.
|
|
531
|
-
e.destroy());d.h&&(d.h.j=c);a.
|
|
532
|
-
r.
|
|
533
|
-
r.
|
|
534
|
-
r.
|
|
535
|
-
r.
|
|
536
|
-
r.
|
|
537
|
-
r.
|
|
538
|
-
r.
|
|
539
|
-
r.
|
|
540
|
-
function jn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{
|
|
541
|
-
r.
|
|
542
|
-
u=g.u||p/q;v=g.startTime;z=
|
|
543
|
-
r.
|
|
544
|
-
r.
|
|
545
|
-
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,ie(c)==a.id){ln(this,c);break}};r.
|
|
546
|
-
r.
|
|
547
|
-
b))c=f;c?(a=fe(c),this.
|
|
548
|
-
r.
|
|
549
|
-
r.
|
|
550
|
-
r.
|
|
531
|
+
function fn(a){if(a.F){var b=nd(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.F.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{gn(a,a.i)}catch(f){lm(a,f)}a.s&&Vm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||hn(a)}a.H&&a.H.nf(a.h.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.h.mediaSource),a.G.Y=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Ne!=b)){var c=b(),d=a.G,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),
|
|
532
|
+
e.destroy());d.h&&(d.h.j=c);a.Ne=b;a.j&&(b=a.j,(c=b.i.get(Dc))&&qk(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Tm(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ue(a.K,b,Math.min(.5,b/2)));a.i&&Hm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.V&&a.V.configure(a.h.cmcd);a.Y&&a.Y.configure(a.h.cmsd)}r.getConfiguration=function(){var a=Zl(this);Rl(a,this.h,Zl(this));return a};
|
|
533
|
+
r.Qg=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.Db().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.Qh=function(){for(var a in this.h)delete this.h[a];Rl(this.h,Zl(this),Zl(this));fn(this)};r.Xg=function(){return this.l};r.Ge=function(){return this.i?this.i.type:null};r.ah=function(){return this.g};
|
|
534
|
+
r.Nb=function(){return this.H};r.Fe=function(){return this.ea};r.Of=function(){return this.A?this.A:null};r.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};r.Rb=function(){return this.i?this.i.presentationTimeline.Rb():!1};r.sh=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};
|
|
535
|
+
r.Db=function(){if(this.i){if(!this.lb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.fc(),end:a.pb()}}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.ph=function(){this.R()&&(this.g.currentTime=this.Db().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.Pc=function(){return this.m?this.m.Pc():Infinity};
|
|
536
|
+
r.Ee=function(){return this.m?this.m.Ee():[]};r.Bd=function(){return this.m?this.m.Bd():{}};r.Je=function(){return this.K?this.K.g==Te:!1};r.Cd=function(){return this.g?this.I?this.I.h:1:0};
|
|
537
|
+
r.xf=function(a){var b=this;0==a?Sa("A trick play rate of 0 is unsupported!"):(this.Ba.Ya(),this.g.paused&&this.g.play(),this.I.set(a),this.l==Km&&(this.s.playbackRateChanged(a),pk(this.j,1<Math.abs(a))),this.R()&&this.Ba.D(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Db(),e=b.h.streaming.safeSeekOffset;0<a?c>=d.end&&b.ud():c<=d.start+e&&b.ud()}))};r.ud=function(){var a=this.I.ec();this.l==Zm&&this.I.set(a);this.l==Km&&(this.I.set(a),this.s.playbackRateChanged(a),pk(this.j,!1));this.Ba.Ya()};
|
|
538
|
+
r.Ab=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ne(e)){var f=fe(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 me(g)}):[]};
|
|
539
|
+
r.hc=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=ge(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?an(this).map(function(f){return ke(f)}):[]};r.Wg=function(){var a=this.Mc;this.i&&(a=this.i.imageStreams);return a.map(function(b){return he(b)})};
|
|
540
|
+
r.Ng=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Km&&b.l!=Zm)return g.return(null);c=b.Mc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Fj(d.segmentIndex,function(h){var k=jn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Jb;for(var l=h.h-h.startTime,m=0;m<k;m++)e.push(b.Tf(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
541
|
+
function jn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Jb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
542
|
+
r.Tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){if(1==D.g){if(c.l!=Km&&c.l!=Zm)return D.return(null);d=c.Mc;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.B(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=jn(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Jb;n=l/h.rows;q=h.Jb*h.rows;p=g.h-g.startTime;
|
|
543
|
+
u=g.u||p/q;v=g.startTime;z=x=0;1<q&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.Jb*m,z=Math.floor(y/h.Jb)*n);B=!1;if(A=g.s)B=!0,n=A.height,x=A.positionX,z=A.positionY,m=A.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:v,duration:u,uris:g.Z(),width:m,sprite:B})})};
|
|
544
|
+
r.kg=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&&(Wl(this.u.h,b,!1),sk(this.j,b),kn(this),this.kb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=an(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ie(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";kn(this)}};
|
|
545
|
+
r.lf=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&&Sa("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&&ne(d)&&(Im(this,d,!1,b,c),this.jb=new He(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),Vm(this))}else if(this.g&&this.g.audioTracks)for(b=
|
|
546
|
+
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,ie(c)==a.id){ln(this,c);break}};r.Pg=function(){return mn(this.Ab())};r.ih=function(){return mn(this.hc())};r.Og=function(){return Array.from(nn(this.Ab()))};r.hh=function(){return Array.from(nn(this.hc()))};
|
|
547
|
+
r.jg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.jb=new Ie(a,b||"",c,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.jb.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
548
|
+
b))c=f;c?(a=fe(c),this.lf(a,!0,d)):hn(this)}else this.g&&this.g.audioTracks&&(d=pe(this.Ab(),a,b||"",!1)[0])&&this.lf(d)};r.kf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.kb=a,this.Ic=b||"",this.Hc=c,(a=pe(this.i.textStreams,this.kb,this.Ic,this.Hc)[0]||null)&&a!=this.j.o&&(Wl(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.Le()))sk(this.j,a),kn(this)}else(a=pe(this.hc(),a,b||"",c)[0])&&this.kg(a)};
|
|
549
|
+
r.Wh=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.jb=new Ie(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),hn(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&ln(this,b)}};
|
|
550
|
+
r.Le=function(){var a=this.da;return this.G&&this.l==Km?this.G.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?an(this).some(function(b){return"showing"==b.mode}):a};r.Pf=function(){return this.g&&this.g.src&&this.g.textTracks?on(this).map(function(a){return ke(a)}):[]};
|
|
551
|
+
r.Rg=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=dd(a),c=on(this).filter(function(h){return dd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
551
552
|
function an(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function dn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function on(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
552
|
-
r.
|
|
553
|
-
r.
|
|
554
|
-
r.
|
|
553
|
+
r.og=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Km)this.G.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=pe(this.i.textStreams,this.kb,this.Ic,this.Hc),0<a.length&&(sk(this.j,a[0]),kn(this))):ok(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=an(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")}Sm(this)}};
|
|
554
|
+
r.dh=function(){if(!this.R())return null;if(this.C)var a=this.C.qd();else{if(null==this.ma)return new Date;a=this.ma}if(this.i)return new Date(1E3*(this.i.presentationTimeline.i+a));if(this.g&&this.g.getStartDate){var b=this.g.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)}return null};
|
|
555
|
+
r.Sf=function(){if(!this.R())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.ob=function(){if(this.l==Km)return this.G.ob();var a={total:[],audio:[],video:[],text:[]};this.l==Zm&&(a.total=Mh(this.g.buffered));return a};
|
|
555
556
|
r.getStats=function(){if(this.l!=Km&&this.l!=Zm)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:[]};Fm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=
|
|
556
|
-
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.u.K=this.C.
|
|
557
|
-
NaN,b.o=c.video.width||NaN,b.l=d);this.R()&&(c=this.
|
|
558
|
-
for(var F=f.next();!F.done;F=f.next())F=F.value,D.push({timestamp:F.timestamp,id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:p,playTime:u,pauseTime:v,bufferingTime:
|
|
559
|
-
r.
|
|
560
|
-
l&&D.label==(f||"")&&D.kind==c}))return Um(h),A.return(n);throw new O(1,2,2012);case 4:q=Ec;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new O(1,4,4033);if(!k.length){A.B(6);break}return C(A,rn(h,a,h.H,h.h.streaming.retryParameters),7);case 7:u=A.h,v=sn(h,u,d,k),
|
|
561
|
-
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};
|
|
562
|
-
r.
|
|
563
|
-
vttOffset:0};l=hb(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={
|
|
564
|
-
n.push(
|
|
565
|
-
c.i.imageStreams.push(
|
|
566
|
-
r.
|
|
557
|
+
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.u.K=this.C.Af(),this.u.N=this.C.Bf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.J=Number(c.droppedVideoFrames);b.I=d;this.u.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.u.s=c;if(this.l==Km){c=this.j.j;b=this.j.o;if(c){d=this.I?this.I.h:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.u.A=e}c&&c.video&&(b=this.u,d=c.video.height||
|
|
558
|
+
NaN,b.o=c.video.width||NaN,b.l=d);this.R()&&(c=this.Sf().valueOf()+1E3*a.currentTime,this.u.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.u.u=c}this.l==Zm&&(c=this.u,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.u;a=f.o;c=f.l;b=f.A;d=f.I;e=f.J;var g=f.H,h=f.N,k=f.K,l=f.u,m=f.i,n=f.m,q=f.F,p=f.j,u=Tl(f.g,"playing"),v=Tl(f.g,"paused"),x=Tl(f.g,"buffering"),z=f.s,y=f.C,B=f.G,A=Ul(f.g),D=[];f=t(f.h.g);
|
|
559
|
+
for(var F=f.next();!F.done;F=f.next())F=F.value,D.push({timestamp:F.timestamp,id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:p,playTime:u,pauseTime:v,bufferingTime:x,licenseTime:z,liveLatency:y,maxSegmentDuration:B,stateHistory:A,switchHistory:D}};
|
|
560
|
+
r.Bg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:if(h.l!=Km&&h.l!=Zm)throw new O(1,7,7004);"subtitles"!=c&&"captions"!=c&&Sa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.B(2);break}return C(A,pn(h,a),3);case 3:d=A.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Zm){A.B(4);break}g&&(c="forced");return C(A,qn(h,a,b,c,d,f||"",k),5);case 5:l=dd(b);m=h.hc();if(n=m.find(function(D){return dd(D.language)==
|
|
561
|
+
l&&D.label==(f||"")&&D.kind==c}))return Um(h),A.return(n);throw new O(1,2,2012);case 4:q=Ec;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new O(1,4,4033);if(!k.length){A.B(6);break}return C(A,rn(h,a,h.H,h.h.streaming.retryParameters),7);case 7:u=A.h,v=sn(h,u,d,k),x=new Blob([v],{type:"text/vtt"}),a=Fi(x),d="text/vtt";case 6:z={id:h.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Hj(0,p,[a]),mimeType:d||"",
|
|
562
|
+
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};y=Gc(z.mimeType,z.codecs);B=Qc(y);if(!B)throw new O(2,2,2014,d);h.i.textStreams.push(z);Um(h);return A.return(ge(z))}})};
|
|
563
|
+
r.Cg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y;return K(function(B){switch(B.g){case 1:if(c.l!=Km&&c.l!=Zm)throw new O(1,7,7004);if(b){B.B(2);break}return C(B,pn(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new O(1,2,2017,a);d=Ec;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new O(1,4,4045);return C(B,rn(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=B.h;g=Rc[b];if(!g)throw new O(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
564
|
+
vttOffset:0};l=hb(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={Bc:q.Bc,Gb:q.Gb},u=p.next())q.Gb=u.value,q.Bc=null,v=function(A){return function(){null==A.Bc&&(A.Bc=xc([a],[A.Gb.payload]));return A.Bc||[]}}(q),x=new S(q.Gb.startTime,q.Gb.endTime,v,0,null,null,0,0,Infinity),q.Gb.payload.includes("#xywh")&&(z=q.Gb.payload.split("#xywh=")[1].split(","),4===z.length&&x.pg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
|
|
565
|
+
n.push(x);y={id:c.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ej(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.ge,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==Zm?c.Mc.push(y):
|
|
566
|
+
c.i.imageStreams.push(y);Um(c);return B.return(he(y))}})};
|
|
567
|
+
r.Ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Km&&d.l!=Zm)throw new O(1,7,7004);if(c){k.B(2);break}return C(k,pn(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,qn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Pf();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return C(k,new Promise(function(l,m){d.o.ja(f,"load",l);d.o.ja(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return Um(d),k.return(h);case 5:throw new O(1,
|
|
567
568
|
2,2012);}})};function pn(a,b){var c;return K(function(d){switch(d.g){case 1:return sa(d,2),C(d,Mk(b,a.H,a.h.streaming.retryParameters),4);case 4:c=d.h;ua(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new O(1,2,2011,b);}})}
|
|
568
|
-
function qn(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?C(n,rn(a,b,a.H,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=sn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Fi(l),e="text/vtt");m=document.createElement("track");var q=a.V,p=b;try{if(q.g.enabled){var u=il(q);u.ot=ul;u.su=!0;var v=
|
|
569
|
-
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function rn(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=vf;f=pf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&
|
|
570
|
-
function sn(a,b,c,d){var e=Rc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=hb(b),b=c.parseMedia(b,a,null),fl(b,d);throw new O(2,2,2014,c);}r.
|
|
571
|
-
r.
|
|
572
|
-
function Zl(a){var b=Pl();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.
|
|
573
|
-
function zm(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 Ij,l=e.closedCaptions.get(g);h={id:a.
|
|
569
|
+
function qn(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?C(n,rn(a,b,a.H,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=sn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Fi(l),e="text/vtt");m=document.createElement("track");var q=a.V,p=b;try{if(q.g.enabled){var u=il(q);u.ot=ul;u.su=!0;var v=ml(u);var x=nl(p,v)}else x=p}catch(z){Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),x=p}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
570
|
+
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function rn(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=vf;f=pf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&ol(k,f,{ot:ul,su:!0})}catch(l){Ta("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
571
|
+
function sn(a,b,c,d){var e=Rc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=hb(b),b=c.parseMedia(b,a,null),fl(b,d);throw new O(2,2,2014,c);}r.pf=function(a,b){this.Te.width=a;this.Te.height=b};r.gf=function(a){if(this.l==Km){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Tc||d.Da||d.hb||(d.Tc=!1,nk(b,d,a));b=!0}}else b=!1;return b};
|
|
572
|
+
r.Yg=function(){Sa("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.Zg=function(){return this.Kd};
|
|
573
|
+
function Zl(a){var b=Pl();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.gf(d))}};b.textDisplayFactory=function(){return a.xd?new Xk(a.g,a.xd):HTMLMediaElement.prototype.addTextTrack?new Rk(a.g,"Shaka Player TextTrack"):new Uk};return b}r.rg=function(a){this.xd=a};
|
|
574
|
+
function zm(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 Ij,l=e.closedCaptions.get(g);h={id:a.We++,originalId:g,groupId:null,
|
|
574
575
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Dc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1};b.textStreams.push(h);c.add(g)}}
|
|
575
576
|
function ym(a,b){return K(function(c){if(1==c.g)return C(c,tn(a,b),2);gn(a,b);E(c)})}function tn(a,b){return K(function(c){if(1==c.g)return C(c,Qd(a.m,b),2);if(!b.variants.some(ne))throw new O(2,4,4032);E(c)})}
|
|
576
|
-
function gn(a,b){if(a.l!=hm){for(var c=a.h.restrictions,d=a.
|
|
577
|
+
function gn(a,b){if(a.l!=hm){for(var c=a.h.restrictions,d=a.Te,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Pd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Um(a);if((c=a.m?a.m.g:null)&&a.m.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Am(a,c.keySystem,e.video),Am(a,c.keySystem,e.audio);un(a,b)}}
|
|
577
578
|
function Am(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Zg(a.m,e.initDataType,e.initData)}}}
|
|
578
|
-
function Qm(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,q;return K(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.
|
|
579
|
-
function nm(a){var b=a.
|
|
579
|
+
function Qm(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,q;return K(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.Mb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(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)})}
|
|
580
|
+
function nm(a){var b=a.Je();if(a.u&&a.K&&a.C){if(a.V){var c=a.V;b||c.j||(c.j=!0);c.j&&b&&(c.l=!0);c.m=b}Fm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(gm("buffering",b))}function Gm(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=gm("ratechange"),a.dispatchEvent(b))}
|
|
580
581
|
function Fm(a){if(a.u&&a.K){var b=a.u.g,c="playing";a.K.g==Te?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(gm("statechanged",c)))}}
|
|
581
|
-
function Wm(a){if(a.R()){var b=a.
|
|
582
|
-
a.i.serviceDescription&&(e=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,f=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);var g=a.g.playbackRate,h=b.end-a.g.currentTime,k=0;if(a.l==Zm){var l=a.g.buffered;0<l.length&&(k=l.end(l.length-1),k=Math.max(d,k-b.end))}c&&d&&h-k>c?g!=d&&a.
|
|
583
|
-
function Xm(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=gm("started"):25==a.N?d=gm("firstquartile"):50==a.N?d=gm("midpoint"):75==a.N?d=gm("thirdquartile"):100==a.N&&(d=gm("complete"));d&&a.dispatchEvent(d)}}}function Vm(a){try{un(a,a.i)}catch(c){return lm(a,c),!1}var b=oe(a.i.variants);b=a.
|
|
582
|
+
function Wm(a){if(a.R()){var b=a.Db();if(Number.isFinite(b.end)&&!(a.g.currentTime<b.start)){if(a.h.streaming.liveSync){var c=a.h.streaming.liveSyncMaxLatency;var d=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var e=a.h.streaming.liveSyncMinLatency;var f=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&
|
|
583
|
+
a.i.serviceDescription&&(e=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,f=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);var g=a.g.playbackRate,h=b.end-a.g.currentTime,k=0;if(a.l==Zm){var l=a.g.buffered;0<l.length&&(k=l.end(l.length-1),k=Math.max(d,k-b.end))}c&&d&&h-k>c?g!=d&&a.xf(d):e&&f&&h-k<e?g!=f&&a.xf(f):g!==a.I.ec()&&a.ud()}}}
|
|
584
|
+
function Xm(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=gm("started"):25==a.N?d=gm("firstquartile"):50==a.N?d=gm("midpoint"):75==a.N?d=gm("thirdquartile"):100==a.N&&(d=gm("complete"));d&&a.dispatchEvent(d)}}}function Vm(a){try{un(a,a.i)}catch(c){return lm(a,c),!1}var b=oe(a.i.variants);b=a.jb.create(b);a.s.setVariants(Array.from(b.values()));return!0}
|
|
584
585
|
function Mm(a,b){b=void 0===b?!1:b;return Vm(a)?a.s.chooseVariant(b):null}
|
|
585
|
-
function dm(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,Ya("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.
|
|
586
|
-
function hn(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=Mm(a);f&&Im(a,f,e,b,c,d)}function Im(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&rk(a.j,b,d,e,!0);else{var h=a.u.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));rk(a.j,b,d,e,f,c);d=null;g&&(d=fe(g));b=fe(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.J&&vi(a.J,b,a.
|
|
587
|
-
function ln(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=me(c);b=me(b);wn(a,c,b)}function Rm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=dd(a.h.preferredTextLanguage);c=dd(c.language);if(2==a.h.autoShowText)return cd(c,d);if(3==a.h.autoShowText)return a=dd(b.language),cd(c,d)&&!cd(a,c);
|
|
588
|
-
function wn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.J&&vi(a.J,c,a.
|
|
589
|
-
r.
|
|
590
|
-
function lm(a,b){var c,d,e;return K(function(f){switch(f.g){case 1:if(a.l==hm)return f.return();c=!0;if(!(a.
|
|
586
|
+
function dm(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,Ya("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.yd.stop();d&&hn(a,!0,void 0,!1,!1)}
|
|
587
|
+
function hn(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=Mm(a);f&&Im(a,f,e,b,c,d)}function Im(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&rk(a.j,b,d,e,!0);else{var h=a.u.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));rk(a.j,b,d,e,f,c);d=null;g&&(d=fe(g));b=fe(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.J&&vi(a.J,b,a.Ge()),c=gm("adaptation",c),vn(a,c)):wn(a,d,b)}}
|
|
588
|
+
function ln(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=me(c);b=me(b);wn(a,c,b)}function Rm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=dd(a.h.preferredTextLanguage);c=dd(c.language);if(2==a.h.autoShowText)return cd(c,d);if(3==a.h.autoShowText)return a=dd(b.language),cd(c,d)&&!cd(a,c);Sa("Invalid autoShowText setting!");return!1}function Um(a){var b=gm("trackschanged");vn(a,b)}
|
|
589
|
+
function wn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.J&&vi(a.J,c,a.Ge());c=gm("variantchanged",b);vn(a,c)}function kn(a){var b=gm("textchanged");vn(a,b)}function Sm(a){var b=gm("texttrackvisibility");vn(a,b)}function Tm(a){a.h.abr.enabled||cm(a);var b=(new Map).set("newStatus",a.h.abr.enabled);vn(a,gm("abrstatuschanged",b))}function cm(a,b){b=void 0===b?!0:b;if(a.l==Km){a.yd.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Vm(a)}}
|
|
590
|
+
r.wd=function(a,b){if(!this.h.abr.enabled||this.l===hm||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.yd.Za(1);b=this.ob().video.reduce(function(f,g){return f+g.end-g.start},0);hn(this,!0,b,!0,!1);return!0}return!1};
|
|
591
|
+
function lm(a,b){var c,d,e;return K(function(f){switch(f.g){case 1:if(a.l==hm)return f.return();c=!0;if(!(a.lb&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.B(2);break}sa(f,3);return C(f,Lk(a.j),5);case 5:d=f.h;c=!d;ua(f,2);break;case 3:va(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&cm(a,!1);e=gm("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);E(f)}})}
|
|
591
592
|
function xm(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(gm(b,c))}function km(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 O(2,3,3016,b,c,a.g.error.message)}
|
|
592
593
|
function Dm(a,b){if(a.j){var c=gm("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);c=1==d.length&&"00"==d[0];var e=!1;if(d.length){d=t(a.i.variants);for(var f=d.next();!f.done;f=d.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())if(l=l.value,(l=b[c?"00":l])||a.m.F)f.allowedByKeySystem=
|
|
593
|
-
f.allowedByKeySystem&&!!l&&!xn.includes(l)}h!=f.allowedByKeySystem&&(e=!0)}}}if(e&&(Um(a),!Vm(a)))return;(b=a.j.j)&&!b.allowedByKeySystem&&hn(a)}}function Em(a,b,c){if(a.F&&a.F.onExpirationUpdated)a.F.onExpirationUpdated(b,c);b=gm("expirationupdated");a.dispatchEvent(b)}function Hm(a,b,c){0<b&&(a.R()||a.
|
|
594
|
-
function un(a,b){a=a.m?a.m.
|
|
594
|
+
f.allowedByKeySystem&&!!l&&!xn.includes(l)}h!=f.allowedByKeySystem&&(e=!0)}}}if(e&&(Um(a),!Vm(a)))return;(b=a.j.j)&&!b.allowedByKeySystem&&hn(a)}}function Em(a,b,c){if(a.F&&a.F.onExpirationUpdated)a.F.onExpirationUpdated(b,c);b=gm("expirationupdated");a.dispatchEvent(b)}function Hm(a,b,c){0<b&&(a.R()||a.qg(b));b=a.getDuration();c<b&&(a.R()||a.Oa(c))}
|
|
595
|
+
function un(a,b){a=a.m?a.m.Bd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?xn.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
595
596
|
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new O(2,4,4012,a);}function vn(a,b){K(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=hm&&a.dispatchEvent(b);E(c)})}function nn(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(dd(c.language)):b.add("und");return b}
|
|
596
597
|
function mn(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=dd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
597
|
-
h.push({language:l,role:m,label:n})}});return h}
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
598
|
+
h.push({language:l,role:m,label:n})}});return h}N("shaka.Player",W);W.prototype.setVideoContainer=W.prototype.rg;W.prototype.getManifestParserFactory=W.prototype.Zg;W.prototype.getManifest=W.prototype.Yg;W.prototype.retryStreaming=W.prototype.gf;W.prototype.setMaxHardwareResolution=W.prototype.pf;W.prototype.addChaptersTrack=W.prototype.Ag;W.prototype.addThumbnailsTrack=W.prototype.Cg;W.prototype.addTextTrackAsync=W.prototype.Bg;W.prototype.getStats=W.prototype.getStats;
|
|
599
|
+
W.prototype.getBufferedInfo=W.prototype.ob;W.prototype.getPresentationStartTimeAsDate=W.prototype.Sf;W.prototype.getPlayheadTimeAsDate=W.prototype.dh;W.prototype.setTextTrackVisibility=W.prototype.og;W.prototype.getChapters=W.prototype.Rg;W.prototype.getChaptersTracks=W.prototype.Pf;W.prototype.isTextTrackVisible=W.prototype.Le;W.prototype.selectVariantsByLabel=W.prototype.Wh;W.prototype.selectTextLanguage=W.prototype.kf;W.prototype.selectAudioLanguage=W.prototype.jg;
|
|
600
|
+
W.prototype.getTextLanguages=W.prototype.hh;W.prototype.getAudioLanguages=W.prototype.Og;W.prototype.getTextLanguagesAndRoles=W.prototype.ih;W.prototype.getAudioLanguagesAndRoles=W.prototype.Pg;W.prototype.selectVariantTrack=W.prototype.lf;W.prototype.selectTextTrack=W.prototype.kg;W.prototype.getThumbnails=W.prototype.Tf;W.prototype.getAllThumbnails=W.prototype.Ng;W.prototype.getImageTracks=W.prototype.Wg;W.prototype.getTextTracks=W.prototype.hc;W.prototype.getVariantTracks=W.prototype.Ab;
|
|
601
|
+
W.prototype.cancelTrickPlay=W.prototype.ud;W.prototype.trickPlay=W.prototype.xf;W.prototype.getPlaybackRate=W.prototype.Cd;W.prototype.isBuffering=W.prototype.Je;W.prototype.getKeyStatuses=W.prototype.Bd;W.prototype.getActiveSessionsMetadata=W.prototype.Ee;W.prototype.getExpiration=W.prototype.Pc;W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.keySystem=W.prototype.keySystem;W.prototype.goToLive=W.prototype.ph;W.prototype.seekRange=W.prototype.Db;W.prototype.isAudioOnly=W.prototype.sh;
|
|
602
|
+
W.prototype.isInProgress=W.prototype.Rb;W.prototype.isLive=W.prototype.R;W.prototype.getAdManager=W.prototype.Of;W.prototype.getAssetUri=W.prototype.Fe;W.prototype.getNetworkingEngine=W.prototype.Nb;W.prototype.getMediaElement=W.prototype.ah;W.prototype.getManifestType=W.prototype.Ge;W.prototype.getLoadMode=W.prototype.Xg;W.prototype.resetConfiguration=W.prototype.Qh;W.prototype.getBufferFullness=W.prototype.Qg;W.prototype.getConfiguration=W.prototype.getConfiguration;W.prototype.configure=W.prototype.configure;
|
|
603
|
+
W.prototype.releaseAllMutexes=W.prototype.Mh;W.prototype.load=W.prototype.load;W.prototype.updateStartTime=W.prototype.ei;W.prototype.unload=W.prototype.pc;W.prototype.detach=W.prototype.detach;W.prototype.attachCanvas=W.prototype.Eg;W.prototype.attach=W.prototype.Gc;
|
|
604
|
+
W.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?C(h,rh(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(rd())for(var l in Ah)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=rd()?!!Ah[m]:sd(m);c=k;l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(w(Hc));
|
|
604
605
|
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=rd()?Qc(m)?!0:Za(m)||($b(m)?!0:!1):sd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=yn;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
605
|
-
|
|
606
|
-
|
|
606
|
+
W.isBrowserSupported=function(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||wd("Trident/"))return!1;var a=Id();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:rd()?!0:sd("application/x-mpegurl")};W.setAdManagerFactory=function(a){bm=a};
|
|
607
|
+
W.registerSupportPlugin=function(a,b){yn[a]=b};W.prototype.destroy=W.prototype.destroy;var hm=0,Yl=1,Km=2,Zm=3;W.LoadMode={DESTROYED:hm,NOT_LOADED:Yl,MEDIA_SOURCE:Km,SRC_EQUALS:Zm};W.version="v4.7.8";var zn=["4","7"];ze=new function(a){this.g=a;this.i=Ae;this.h=Be}(new xe(Number(zn[0]),Number(zn[1])));var xn=["output-restricted","internal-error"],yn={},bm=null;function An(){this.h=[];this.j=this.i=this.g=0};function Bn(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new zf;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=Bn.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
607
608
|
r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
608
609
|
r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
609
610
|
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
610
|
-
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};
|
|
611
|
+
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};N("shaka.ads.ClientSideAd",Bn);Bn.prototype.release=Bn.prototype.release;
|
|
611
612
|
Bn.prototype.getPodIndex=Bn.prototype.getPodIndex;Bn.prototype.getTimeOffset=Bn.prototype.getTimeOffset;Bn.prototype.getMediaUrl=Bn.prototype.getMediaUrl;Bn.prototype.getAdvertiserName=Bn.prototype.getAdvertiserName;Bn.prototype.getCreativeAdId=Bn.prototype.getCreativeAdId;Bn.prototype.getAdId=Bn.prototype.getAdId;Bn.prototype.getVastMediaWidth=Bn.prototype.getVastMediaWidth;Bn.prototype.getVastMediaHeight=Bn.prototype.getVastMediaHeight;Bn.prototype.getVastMediaBitrate=Bn.prototype.getVastMediaBitrate;
|
|
612
613
|
Bn.prototype.getDescription=Bn.prototype.getDescription;Bn.prototype.getTitle=Bn.prototype.getTitle;Bn.prototype.getPositionInSequence=Bn.prototype.getPositionInSequence;Bn.prototype.getSequenceLength=Bn.prototype.getSequenceLength;Bn.prototype.setMuted=Bn.prototype.setMuted;Bn.prototype.resize=Bn.prototype.resize;Bn.prototype.isLinear=Bn.prototype.isLinear;Bn.prototype.isMuted=Bn.prototype.isMuted;Bn.prototype.setVolume=Bn.prototype.setVolume;Bn.prototype.getVolume=Bn.prototype.getVolume;
|
|
613
|
-
Bn.prototype.play=Bn.prototype.play;Bn.prototype.pause=Bn.prototype.pause;Bn.prototype.skip=Bn.prototype.skip;Bn.prototype.canSkipNow=Bn.prototype.canSkipNow;Bn.prototype.getTimeUntilSkippable=Bn.prototype.getTimeUntilSkippable;Bn.prototype.isSkippable=Bn.prototype.isSkippable;Bn.prototype.isPaused=Bn.prototype.isPaused;Bn.prototype.getRemainingTime=Bn.prototype.getRemainingTime;Bn.prototype.getMinSuggestedDuration=Bn.prototype.getMinSuggestedDuration;Bn.prototype.getDuration=Bn.prototype.getDuration;function Cn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new zf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.
|
|
614
|
+
Bn.prototype.play=Bn.prototype.play;Bn.prototype.pause=Bn.prototype.pause;Bn.prototype.skip=Bn.prototype.skip;Bn.prototype.canSkipNow=Bn.prototype.canSkipNow;Bn.prototype.getTimeUntilSkippable=Bn.prototype.getTimeUntilSkippable;Bn.prototype.isSkippable=Bn.prototype.isSkippable;Bn.prototype.isPaused=Bn.prototype.isPaused;Bn.prototype.getRemainingTime=Bn.prototype.getRemainingTime;Bn.prototype.getMinSuggestedDuration=Bn.prototype.getMinSuggestedDuration;Bn.prototype.getDuration=Bn.prototype.getDuration;function Cn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new zf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.8");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
614
615
|
function(g){Dn(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){En(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.ja(this.i,"play",function(){f.A=!0})}Cn.prototype.configure=function(a){this.C=a};Cn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Wk(this.o)};Cn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
615
616
|
function En(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new Q("ad-error",b));Fn(a,null);a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
616
617
|
function Dn(a,b){a.m(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.C.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.u);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.u);a.m(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -621,19 +622,19 @@ function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLET
|
|
|
621
622
|
a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
622
623
|
a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
|
|
623
624
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
624
|
-
function In(a,b){var c=b.getAd();c?(a.j=new Bn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new Q("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):
|
|
625
|
+
function In(a,b){var c=b.getAd();c?(a.j=new Bn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new Q("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Sa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
625
626
|
function Fn(a,b){a.m(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function Jn(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.l=d}r=Jn.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h.skipOffset?!0:!1};
|
|
626
627
|
r.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var a=this.getRemainingTime()-this.h.skipOffset;return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};
|
|
627
628
|
r.isLinear=function(){return this.l};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.j?this.j:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};
|
|
628
|
-
r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};
|
|
629
|
+
r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};N("shaka.ads.MediaTailorAd",Jn);Jn.prototype.release=Jn.prototype.release;Jn.prototype.getPodIndex=Jn.prototype.getPodIndex;Jn.prototype.getTimeOffset=Jn.prototype.getTimeOffset;Jn.prototype.getMediaUrl=Jn.prototype.getMediaUrl;Jn.prototype.getAdvertiserName=Jn.prototype.getAdvertiserName;
|
|
629
630
|
Jn.prototype.getCreativeAdId=Jn.prototype.getCreativeAdId;Jn.prototype.getAdId=Jn.prototype.getAdId;Jn.prototype.getVastMediaWidth=Jn.prototype.getVastMediaWidth;Jn.prototype.getVastMediaHeight=Jn.prototype.getVastMediaHeight;Jn.prototype.getVastMediaBitrate=Jn.prototype.getVastMediaBitrate;Jn.prototype.getDescription=Jn.prototype.getDescription;Jn.prototype.getTitle=Jn.prototype.getTitle;Jn.prototype.getPositionInSequence=Jn.prototype.getPositionInSequence;Jn.prototype.getSequenceLength=Jn.prototype.getSequenceLength;
|
|
630
631
|
Jn.prototype.setMuted=Jn.prototype.setMuted;Jn.prototype.resize=Jn.prototype.resize;Jn.prototype.isLinear=Jn.prototype.isLinear;Jn.prototype.isMuted=Jn.prototype.isMuted;Jn.prototype.setVolume=Jn.prototype.setVolume;Jn.prototype.getVolume=Jn.prototype.getVolume;Jn.prototype.play=Jn.prototype.play;Jn.prototype.pause=Jn.prototype.pause;Jn.prototype.skip=Jn.prototype.skip;Jn.prototype.canSkipNow=Jn.prototype.canSkipNow;Jn.prototype.getTimeUntilSkippable=Jn.prototype.getTimeUntilSkippable;
|
|
631
|
-
Jn.prototype.isSkippable=Jn.prototype.isSkippable;Jn.prototype.isPaused=Jn.prototype.isPaused;Jn.prototype.getRemainingTime=Jn.prototype.getRemainingTime;Jn.prototype.getMinSuggestedDuration=Jn.prototype.getMinSuggestedDuration;Jn.prototype.getDuration=Jn.prototype.getDuration;function Kn(a,b,c,d){this.A=a;this.I=b;this.g=c;this.l=null;this.W=NaN;this.i=d;this.H=!1;this.u=null;this.j=[];this.K=[];this.J=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.N="";this.V=!0;this.G="";this.o=new zf}Kn.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.
|
|
632
|
+
Jn.prototype.isSkippable=Jn.prototype.isSkippable;Jn.prototype.isPaused=Jn.prototype.isPaused;Jn.prototype.getRemainingTime=Jn.prototype.getRemainingTime;Jn.prototype.getMinSuggestedDuration=Jn.prototype.getMinSuggestedDuration;Jn.prototype.getDuration=Jn.prototype.getDuration;function Kn(a,b,c,d){this.A=a;this.I=b;this.g=c;this.l=null;this.W=NaN;this.i=d;this.H=!1;this.u=null;this.j=[];this.K=[];this.J=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.N="";this.V=!0;this.G="";this.o=new zf}Kn.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Vb(b.target,b.type,b.listener);Ln(this);this.m=[];this.s=[];this.N="";this.V=!0;this.G="";this.u=null;this.j=[];this.K=[];this.F.clear()};
|
|
632
633
|
Kn.prototype.release=function(){this.stop();this.o&&this.o.release()};Kn.prototype.onManifestUpdated=function(a){this.H=a;""!=this.N&&(Mn(this,this.N,this.V),this.V=!1)};Kn.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
633
634
|
function Nn(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;K(function(u){if(1==u.g)return d=pf([b],We()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Qf(e)),f=a.I.request(7,d),sa(u,2),C(u,f.promise,4);if(2!=u.g){g=u.h;h=Kf(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new fc(b),m=new fc(k.trackingUrl),a.N=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.W,a.i(new Q("ads-loaded",(new Map).set("loadTime",q))),p=new fc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
634
635
|
return ua(u,0)}va(u);if(!a.G.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.G);a.l=null;E(u)})}
|
|
635
|
-
function Mn(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
636
|
-
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",g))),Ln(a),a.j=[];c&&(a.H||0<g.length)&&Pn(a);return ua(
|
|
636
|
+
function Mn(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z;K(function(y){if(1==y.g)return d=pf([b],We()),e=a.I.request(7,d),sa(y,2),C(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=Kf(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=t(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(u=p.value,v=t(u.nonLinearAdList),x=v.next();!x.done;x=v.next())z=x.value,On(a,z);g=a.getCuePoints();a.i(new Q("ad-cue-points-changed",
|
|
637
|
+
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",g))),Ln(a),a.j=[];c&&(a.H||0<g.length)&&Pn(a);return ua(y,0)}va(y);E(y)})}
|
|
637
638
|
function On(a,b){var c,d,e,f,g,h,k,l;K(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Qn(b);if(d=a.F.get(c))return m.return();e=pf([b.staticResource],We());f=a.I.request(7,e);sa(m,2);a.F.set(c,[]);return C(m,f.promise,4)}if(2!=m.g)return g=m.h,h=Kf(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ua(m,0);va(m);a.F.delete(c);E(m)})}
|
|
638
639
|
function Qn(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Pn(a){Rn(a);a.H||(Sn(a),a.o.D(a.g,"seeked",function(){Sn(a)}),a.o.D(a.g,"ended",function(){Ln(a)}));a.o.D(a.g,"timeupdate",function(){Rn(a)})}
|
|
639
640
|
function Sn(a){var b=a.g.currentTime;if(0!=b&&null==a.u){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.K.includes(d.adId)&&(a.u=b,a.g.currentTime=c.startTimeInSeconds)}}
|
|
@@ -641,14 +642,14 @@ function Rn(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if
|
|
|
641
642
|
e=a.h.getDuration();0<e&&(0>=d||d>e)&&Ln(a)}if(!a.h||!a.h.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.K.includes(g.adId)){if(a.g.ended)continue;a.g.currentTime=h;break a}Ln(a);a.J=e;a.h=new Jn(g,f+1,e.ads.length,!0,a.g);a.C=g;0===f&&Tn(a,"breakStart");Un(a);break}}}if(!a.h)for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
|
|
642
643
|
if(a.h)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(Qn(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Ln(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||0)+"%";m.style.maxWidth=100-(l.placeholder.left||
|
|
643
644
|
0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.A.appendChild(m)}a.J=e;a.h=new Jn(g,f+1,e.ads.length,!1,a.g);a.C=g;0===f&&Tn(a,"breakStart");Un(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.u&&a.u>b&&(a.g.currentTime=a.u),a.u=null)}}}
|
|
644
|
-
function Ln(a){if(a.h){for(;a.A.lastChild;)a.A.removeChild(a.A.firstChild);a.H||a.K.push(a.C.adId);Tn(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.o.
|
|
645
|
+
function Ln(a){if(a.h){for(;a.A.lastChild;)a.A.removeChild(a.A.firstChild);a.H||a.K.push(a.C.adId);Tn(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.o.Vb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&Tn(a,"breakEnd");a.h=null;a.C=null;a.J=null}}
|
|
645
646
|
function Un(a){var b=!1;a.g.paused?b=!0:(Tn(a,"impression"),Tn(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&Tn(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||Tn(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(Tn(a,"impression"),Tn(a,"start"),b=!1):Tn(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){Tn(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
|
|
646
647
|
d.type,d.listener)}
|
|
647
648
|
function Tn(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.J.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=pf([d],We()),d.method="POST",a.I.request(7,d))}switch(b){case "impression":a.i(new Q("ad-impression"));break;case "start":a.i(new Q("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new Q("ad-muted"));break;case "unmute":a.i(new Q("ad-volume-changed"));break;
|
|
648
649
|
case "resume":a.i(new Q("ad-resumed"));break;case "pause":a.i(new Q("ad-paused"));break;case "firstQuartile":a.i(new Q("ad-first-quartile"));break;case "midpoint":a.i(new Q("ad-midpoint"));break;case "thirdQuartile":a.i(new Q("ad-third-quartile"));break;case "complete":a.i(new Q("ad-complete"));a.i(new Q("ad-stopped"));break;case "breakStart":a.A.setAttribute("ad-active","true");break;case "breakEnd":a.A.removeAttribute("ad-active")}};function Vn(a,b){this.g=a;this.i=null;this.h=b}r=Vn.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
649
650
|
r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.h.muted=a};
|
|
650
651
|
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};r.getAdId=function(){return this.g.getAdId()};
|
|
651
|
-
r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};
|
|
652
|
+
r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};N("shaka.ads.ServerSideAd",Vn);Vn.prototype.release=Vn.prototype.release;Vn.prototype.getPodIndex=Vn.prototype.getPodIndex;
|
|
652
653
|
Vn.prototype.getTimeOffset=Vn.prototype.getTimeOffset;Vn.prototype.getMediaUrl=Vn.prototype.getMediaUrl;Vn.prototype.getAdvertiserName=Vn.prototype.getAdvertiserName;Vn.prototype.getCreativeAdId=Vn.prototype.getCreativeAdId;Vn.prototype.getAdId=Vn.prototype.getAdId;Vn.prototype.getVastMediaWidth=Vn.prototype.getVastMediaWidth;Vn.prototype.getVastMediaHeight=Vn.prototype.getVastMediaHeight;Vn.prototype.getVastMediaBitrate=Vn.prototype.getVastMediaBitrate;Vn.prototype.getDescription=Vn.prototype.getDescription;
|
|
653
654
|
Vn.prototype.getTitle=Vn.prototype.getTitle;Vn.prototype.getPositionInSequence=Vn.prototype.getPositionInSequence;Vn.prototype.getSequenceLength=Vn.prototype.getSequenceLength;Vn.prototype.setMuted=Vn.prototype.setMuted;Vn.prototype.resize=Vn.prototype.resize;Vn.prototype.isLinear=Vn.prototype.isLinear;Vn.prototype.isMuted=Vn.prototype.isMuted;Vn.prototype.setVolume=Vn.prototype.setVolume;Vn.prototype.getVolume=Vn.prototype.getVolume;Vn.prototype.play=Vn.prototype.play;Vn.prototype.pause=Vn.prototype.pause;
|
|
654
655
|
Vn.prototype.skip=Vn.prototype.skip;Vn.prototype.canSkipNow=Vn.prototype.canSkipNow;Vn.prototype.getTimeUntilSkippable=Vn.prototype.getTimeUntilSkippable;Vn.prototype.isSkippable=Vn.prototype.isSkippable;Vn.prototype.isPaused=Vn.prototype.isPaused;Vn.prototype.getRemainingTime=Vn.prototype.getRemainingTime;Vn.prototype.getMinSuggestedDuration=Vn.prototype.getMinSuggestedDuration;Vn.prototype.getDuration=Vn.prototype.getDuration;function Wn(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.u=this.m=this.o=null;this.A="";this.C=[];this.h=new zf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new Q("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Xn(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.A.length?
|
|
@@ -660,11 +661,11 @@ function Xn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
660
661
|
r.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);hf.prototype.release.call(this)};r.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new An};r.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};
|
|
661
662
|
r.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.u=a;b.g&&b.g.updateAdsRenderingSettings(b.u)};r.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Kn(a,b,c,function(e){return Yn(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new O(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new O(1,10,10004)):(d.l=new Ye,Nn(d,a,b),d.G=c||"",d.W=Date.now()/1E3,a=d.l);return a};
|
|
662
663
|
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new Wn(a,b,this.m,function(d){return Yn(c,d)});this.g.configure(this.l)};
|
|
663
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&
|
|
664
|
-
(c.G=!0),c.j=new Ye,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&
|
|
664
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('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.7.8";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
665
|
+
(c.G=!0),c.j=new Ye,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Sa('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.7.8";this.g.g.replaceAdTagParameters(a)};
|
|
665
666
|
r.getServerSideCuePoints=function(){ye("AdManager","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
666
667
|
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)};
|
|
667
|
-
function Yn(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}
|
|
668
|
+
function Yn(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}N("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
|
|
668
669
|
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;
|
|
669
670
|
Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";
|
|
670
671
|
Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";
|
|
@@ -675,47 +676,47 @@ function ao(a){return{length:a.length,start:function(b){return a.start[b]},end:f
|
|
|
675
676
|
var bo="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),co="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),eo=["loop","playbackRate"],fo=["pause","play"],go={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
676
677
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},ho={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},io={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},jo=[["getConfiguration","configure"]],ko=[["isTextTrackVisible","setTextTrackVisibility"]],lo="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
677
678
|
mo=["attach","attachCanvas","detach","load","unload"];function no(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.j=new qd(b);this.N=c;this.u=!1;this.s=d;this.F=e;this.I=f;this.h=this.m=!1;this.J="";this.o=null;this.A=function(){return oo(h)};this.C=function(k,l){k=$n(l);switch(k.type){case "event":var m=k.targetName,n=ff(k.event);h.s(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.N(),h.u=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new O(q.severity,q.category,
|
|
678
|
-
q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;po.add(this)}r=no.prototype;r.destroy=function(){po.delete(this);qo(this);ro&&so(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.C=this.A=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.
|
|
679
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.
|
|
680
|
-
to(this,a):ro=null}else window.__onGCastApiAvailable!==wo&&(xo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=wo)};r.
|
|
681
|
-
function Bo(a){if(a.h){var b=a.I();chrome.cast.requestSession(function(c){return zo(a,b,c)},function(c){return Ao(a,c)})}}r.
|
|
682
|
-
r.get=function(a,b){var c=this;if("video"==a){if(fo.includes(b))return function(){return c.
|
|
679
|
+
q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;po.add(this)}r=no.prototype;r.destroy=function(){po.delete(this);qo(this);ro&&so(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.C=this.A=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.Ka=function(){return this.h};r.ef=function(){return this.J};
|
|
680
|
+
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.oc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(po),d=c.next();!d.done;d=c.next())to(d.value,b)},function(b){for(var c=t(po),d=c.next();!d.done;d=c.next())d=d.value,uo="available"==b,d.j.oc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});uo&&this.j.U(vo);(a=ro)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
681
|
+
to(this,a):ro=null}else window.__onGCastApiAvailable!==wo&&(xo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=wo)};r.mf=function(a){this.o=a;this.h&&yo(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new O(1,8,8E3);if(!uo)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Ye;chrome.cast.requestSession(function(d){return zo(b,a,d)},function(d){return Ao(b,d)});return C(c,b.l,0)})};
|
|
682
|
+
function Bo(a){if(a.h){var b=a.I();chrome.cast.requestSession(function(c){return zo(a,b,c)},function(c){return Ao(a,c)})}}r.cc=function(){if(this.h){qo(this);if(ro){so(this);try{ro.stop(function(){},function(){})}catch(a){}ro=null}oo(this)}};
|
|
683
|
+
r.get=function(a,b){var c=this;if("video"==a){if(fo.includes(b))return function(){return c.hg.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))}}else if("player"==a){if(io[b]&&!this.get("player","isLive")())return function(){};if(lo.includes(b))return function(){return c.hg.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))};if(mo.includes(b))return function(){return c.Nh.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))};if(go[b]||ho[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
683
684
|
r.set=function(a,b,c){this.g[a][b]=c;yo(this,{type:"set",targetName:a,property:b,value:c})};function zo(a,b,c){ro=c;c.addUpdateListener(a.A);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);oo(a);yo(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Ao(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 O(2,8,c,b))}
|
|
684
|
-
r.
|
|
685
|
-
function oo(a){var b=ro?"connected"==ro.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};qo(a)}a.h=b;a.J=b?ro.receiver.friendlyName:"";a.j.
|
|
685
|
+
r.hg=function(a,b){yo(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};r.Nh=function(a,b){var c=Fa.apply(2,arguments),d=new Ye,e=this.H.toString();this.H++;this.i[e]=d;try{yo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function to(a,b){var c=a.I();a.l=new Ye;a.u=!0;zo(a,c,b)}function so(a){var b=ro;b.removeUpdateListener(a.A);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
686
|
+
function oo(a){var b=ro?"connected"==ro.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};qo(a)}a.h=b;a.J=b?ro.receiver.friendlyName:"";a.j.oc()}function qo(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function yo(a,b){b=Zn(b);var c=ro;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Va)}catch(d){throw b=new O(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.s("player",c),a.cc(),b;}}var vo=.02,uo=!1,ro=null,xo=null,po=new Set;
|
|
686
687
|
function wo(a){xo?window.__onGCastApiAvailable=xo:delete window.__onGCastApiAvailable;xo=null;if(a)for(var b=t(po),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Co(a,b,c,d){d=void 0===d?!1:d;hf.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.A=d;this.u=new Map;this.g=new no(c,function(){return Do(e)},function(){return Eo(e)},function(f,g){return Fo(e,f,g)},function(){return Go(e)},function(){return Ho(e)},d);Io(this)}oa(Co,hf);r=Co.prototype;
|
|
687
|
-
r.destroy=function(a){a&&this.g.
|
|
688
|
-
r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Ho(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.
|
|
689
|
-
r.
|
|
690
|
-
function Io(a){a.g.init();a.m=new zf;for(var b=t(bo),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.
|
|
691
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Lo(a,f)}})});Mo(a);a.j=new hf;a.j.
|
|
688
|
+
r.destroy=function(a){a&&this.g.cc();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;hf.prototype.release.call(this);return Promise.all(a)};r.nh=function(){return this.l};r.bh=function(){return this.s};r.Fg=function(){return this.g.m&&uo};r.Ka=function(){return this.g.Ka()};r.ef=function(){return this.g.ef()};
|
|
689
|
+
r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Ho(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.pc(),0):c.return()})};r.mf=function(a){this.g.mf(a)};r.ai=function(){Bo(this.g)};r.cc=function(){this.g.cc()};
|
|
690
|
+
r.Gg=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.C&&b==c.A)return d.return();c.C=a;c.A=b;c.g.cc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new no(a,function(){return Do(c)},function(){return Eo(c)},function(e,f){return Fo(c,e,f)},function(){return Go(c)},function(){return Ho(c)},b);c.g.init();E(d)})};
|
|
691
|
+
function Io(a){a.g.init();a.m=new zf;for(var b=t(bo),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Ka()||(f=ff(f),a.j.dispatchEvent(f))});for(var d in gf)a.m.D(a.h,gf[d],function(f){a.g.Ka()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.uc=e,Object.defineProperty(a.l,b.uc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Jo(a,f.uc)}}(b),set:function(f){return function(g){var h=f.uc;a.g.Ka()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={uc:b.uc};a.s={};Ko(a,
|
|
692
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Lo(a,f)}})});Mo(a);a.j=new hf;a.j.zd=a.l;a.o=new hf;a.o.zd=a.s}function Mo(a){var b=new Map;Ko(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
|
|
692
693
|
function Ko(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
693
|
-
function Ho(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.
|
|
694
|
+
function Ho(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Fe(),startTime:null};a.i.pause();for(var c=t(eo),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(jo);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(ko);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Do(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
|
|
694
695
|
function Eo(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
695
696
|
function Go(a){for(var b=t(jo),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(eo);for(d=c.next();!d.done;d=c.next())d=
|
|
696
|
-
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(eo),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(ko);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.
|
|
697
|
-
function Jo(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.
|
|
698
|
-
function Lo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.
|
|
699
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
700
|
-
function Fo(a,b,c){a.g.
|
|
701
|
-
Co.prototype.getVideo=Co.prototype.
|
|
702
|
-
r
|
|
697
|
+
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(eo),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(ko);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.og(h);g&&a.h.kf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new Q("error",l);a.h.dispatchEvent(l)})}
|
|
698
|
+
function Jo(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Ka()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ka()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
699
|
+
function Lo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Nb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Of()};
|
|
700
|
+
if("setVideoContainer"==b)return function(c){return a.h.rg(c)};if(a.g.Ka()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ka()&&0==Object.keys(a.g.g.video).length&&(go[b]||ho[b])||!a.g.Ka()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
701
|
+
function Fo(a,b,c){a.g.Ka()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}N("shaka.cast.CastProxy",Co);Co.prototype.changeReceiverId=Co.prototype.Gg;Co.prototype.forceDisconnect=Co.prototype.cc;Co.prototype.suggestDisconnect=Co.prototype.ai;Co.prototype.setAppData=Co.prototype.mf;Co.prototype.cast=Co.prototype.cast;Co.prototype.receiverName=Co.prototype.ef;Co.prototype.isCasting=Co.prototype.Ka;Co.prototype.canCast=Co.prototype.Fg;Co.prototype.getPlayer=Co.prototype.bh;
|
|
702
|
+
Co.prototype.getVideo=Co.prototype.nh;Co.prototype.destroy=Co.prototype.destroy;function No(a,b,c,d){hf.call(this);var e=this;this.g=a;this.h=b;this.j=new zf;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.A=!1;this.u=!0;this.s=this.l=null;this.G=new qd(function(){Oo(e)});Po(this)}oa(No,hf);r=No.prototype;r.isConnected=function(){return this.F};r.th=function(){return this.o};r.Zh=function(a){this.i=a};r.Jg=function(){this.i=null};
|
|
703
|
+
r.$h=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Yh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Xh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
703
704
|
r.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,hf.prototype.release.call(a),C(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();E(d)})};
|
|
704
705
|
function Po(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Qo(a)};b.onSenderDisconnected=function(){return Qo(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Ro(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Ro(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return So(a,
|
|
705
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return To(a,e)};b.start();b=t(bo);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Uo(a,"video",e)});for(var d in gf)a.j.D(a.h,gf[d],function(e){return Uo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.
|
|
706
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return To(a,e)};b.start();b=t(bo);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Uo(a,"video",e)});for(var d in gf)a.j.D(a.h,gf[d],function(e){return Uo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.pf(3840,2160):a.h.pf(1920,1080);a.j.D(a.g,"loadeddata",function(){a.A=!0});a.j.D(a.h,"loading",function(){a.o=
|
|
706
707
|
!1;Vo(a)});a.j.D(a.g,"playing",function(){a.o=!1;Vo(a)});a.j.D(a.g,"pause",function(){Vo(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Vo(a)});a.j.D(a.g,"ended",function(){(new qd(function(){a.g&&a.g.ended&&(a.o=!0,Vo(a))})).U(Wo)})}function Qo(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Vo(a)}
|
|
707
708
|
function Vo(a){var b;K(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new Q("caststatuschanged");a.dispatchEvent(b);Xo(a)||Yo(a);E(c)})}
|
|
708
709
|
function Zo(a,b,c){var d,e,f,g,h,k,l,m,n,q;K(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,sa(p,5),C(p,a.h.load(b.manifest,b.startTime),7)):C(p,Promise.resolve(),3);case 7:ua(p,3);break;case 5:return g=va(p),h=(new Map).set("detail",g),k=new Q("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
|
|
709
710
|
a.g.autoplay=f;b.manifest&&(a.g.play(),Yo(a));E(p)}})}function Uo(a,b,c){a.h&&(Oo(a),Ro(a,{type:"event",targetName:b,event:c},a.l))}
|
|
710
711
|
function Oo(a){a.G.U($o);for(var b={video:{},player:{}},c=t(co),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in io)0==a.m%io[e]&&(b.player[e]=a.h[e]());for(var f in go)0==a.m%go[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Ro(a,{type:"update",update:b},a.l);for(var g in ho)0==a.m%ho[g]&&(b={player:{}},b.player[g]=a.h[g](),Ro(a,{type:"update",update:b},a.l));a.A&&(a.m+=
|
|
711
|
-
1);Xo(a)}function Xo(a){return a.u&&(a.g.duration||a.h.R())?(ap(a),a.u=!1,!0):!1}function ap(a,b){var c={contentId:a.h.
|
|
712
|
+
1);Xo(a)}function Xo(a){return a.u&&(a.g.duration||a.h.R())?(ap(a),a.u=!1,!0):!1}function ap(a,b){var c={contentId:a.h.Fe(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Yo(a,void 0===b?0:b,c)}
|
|
712
713
|
function To(a,b){var c=$n(b.data);switch(c.type){case "init":a.m=0;a.A=!1;a.u=!0;Zo(a,c.initState,c.appData);Oo(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
713
714
|
"player"==d&&"load"==e&&(a.m=0,a.A=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return bp(a,g,f,null)},function(h){return bp(a,g,f,h)})}}
|
|
714
|
-
function So(a,b){var c=$n(b.data);switch(c.type){case "PLAY":a.g.play();Yo(a);break;case "PAUSE":a.g.pause();Yo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Yo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Yo(a));break;case "STOP":a.h.
|
|
715
|
+
function So(a,b){var c=$n(b.data);switch(c.type){case "PLAY":a.g.play();Yo(a);break;case "PAUSE":a.g.pause();Yo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Yo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Yo(a));break;case "STOP":a.h.pc().then(function(){a.h&&Yo(a)});break;case "GET_STATUS":ap(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
715
716
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Yo(a);break;case "LOAD":a.m=0;a.A=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&ap(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Ro(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Ro(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
716
|
-
function bp(a,b,c,d){a.h&&Ro(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Ro(a,b,c,d){a.F&&(a=Zn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Yo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?cp:a.h.
|
|
717
|
-
|
|
718
|
-
p||-1===u)q=ip(d,e),a.nestedCues.push(q);else{for(;p<=u;p++)if(v=q[p]){var
|
|
717
|
+
function bp(a,b,c,d){a.h&&Ro(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Ro(a,b,c,d){a.F&&(a=Zn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Yo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?cp:a.h.Je()?dp:a.g.paused?ep:fp,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Ro(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
718
|
+
N("shaka.cast.CastReceiver",No);No.prototype.destroy=No.prototype.destroy;No.prototype.setContentArtist=No.prototype.Xh;No.prototype.setContentImage=No.prototype.Yh;No.prototype.setContentTitle=No.prototype.$h;No.prototype.clearContentMetadata=No.prototype.Jg;No.prototype.setContentMetadata=No.prototype.Zh;No.prototype.isIdle=No.prototype.th;No.prototype.isConnected=No.prototype.isConnected;var $o=.5,Wo=5,cp="IDLE",fp="PLAYING",dp="BUFFERING",ep="PAUSED";function gp(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=hp(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,u=-1,v=0;v<q.length;v++)if(null!=q[v]&&""!==q[v].g.trim()){p=v;break}for(v=q.length-1;0<=v;v--)if(null!=q[v]&&""!==q[v].g.trim()){u=v;break}if(-1===
|
|
719
|
+
p||-1===u)q=ip(d,e),a.nestedCues.push(q);else{for(;p<=u;p++)if(v=q[p]){var x=v.l,z=v.i,y=v.j,B=v.h;if(x!=h||z!=k||y!=l||B!=m)n.payload&&a.nestedCues.push(n),n=hp(d,e,x,z,y,B),h=x,k=z,l=y,m=B;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=ip(d,e),a.nestedCues.push(n));n=hp(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
719
720
|
function hp(a,b,c,d,e,f){a=new yb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function ip(a,b){a=new yb(a,b,"");a.lineBreak=!0;return a}function jp(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function kp(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";lp(this)}function mp(a,b,c){var d="CC"+((a.u<<1|a.s)+1),e=new yb(b,c,"");e.lineInterpretation=1;var f=np.get(a.g);f&&(e.line=f);return gp(e,d,a.i,b,c)}function lp(a){op(a,0,15);a.g=1}
|
|
720
721
|
function pp(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case qp:d=rp.has(c)?rp.get(c):String.fromCharCode(c);break;case sp:d=tp.get(c);break;case up:a.i[a.g].pop();d=vp.get(c);break;case wp:a.i[a.g].pop(),d=xp.get(c)}d&&a.i[a.g].push(new jp(d,a.m,a.j,a.o,a.l))}}function yp(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function op(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
721
722
|
var qp=0,sp=1,up=2,wp=3,rp=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),tp=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),vp=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
|
|
@@ -730,80 +731,80 @@ b.skip(1),d=fq(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&
|
|
|
730
731
|
function iq(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function jq(a,b,c){var d=null;b=t(iq(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Pp(f,c,a.i));a.h[e]=null}return d}function kq(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function lq(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return mq[a<<2|b<<1|c]}
|
|
731
732
|
var nq=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"]]),mq="black blue green cyan red magenta yellow white".split(" ");function oq(){this.h=[];this.g=[];this.i=new cq;this.l=0;this.m=new Map([["CC1",new zp(0,0)],["CC2",new zp(0,1)],["CC3",new zp(1,0)],["CC4",new zp(1,1)]]);this.s=this.o=0;this.j=new Map;this.A=!0;this.u=new Set;pq(this)}oq.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;pq(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())kq(b.value)};
|
|
732
733
|
function pq(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Ap,c.g=c.j,c.m=null,lp(c.i),lp(c.j),lp(c.o);a.A=!0}
|
|
733
|
-
oq.prototype.extract=function(a,b){if(this.A){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.A=!1}a=new Sf(a,0);if(!(8>a.getLength())&&181===a.ga()&&49===a.
|
|
734
|
+
oq.prototype.extract=function(a,b){if(this.A){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.A=!1}a=new Sf(a,0);if(!(8>a.getLength())&&181===a.ga()&&49===a.Ea()&&1195456820===a.L()&&3===a.ga()&&(c=a.ga(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.ga(),f=(e&4)>>2,g=a.ga(),h=a.ga();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ra:g,mb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
734
735
|
oq.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=qq(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())dq(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=rq(this,d.value),b.push.apply(b,w(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
735
|
-
function qq(a,b){var c=b.type;if(16===(b.
|
|
736
|
+
function qq(a,b){var c=b.type;if(16===(b.Ra&112)){var d=b.Ra>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Ra&&255===b.mb||!b.Ra&&!b.mb||!sq(b.Ra)||!sq(b.mb))return 45<=++a.l&&pq(a),null;a.l=0;b.Ra&=127;b.mb&=127;if(!b.Ra&&!b.mb)return null;a.u.add(d);a=null;if(16===(b.Ra&112))a:{d=b.Ra;a=b.mb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=
|
|
736
737
|
Ip[e]:7===e&&(f=!0);a=1===(a&1);c.h!==Dp&&(e=c.g,c.h===Cp&&b!==e.g&&(c=1+b-e.h,yp(e,c,1+e.g-e.h,e.h),op(e,0,c-1),op(e,b+1,15-b)),e.g=b,e.m=a,e.j=f,e.l=d,e.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",pp(c.g,qp,32),d=!1,b=Ip[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Hp[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))pp(c.g,sp,a);else if(18===
|
|
737
|
-
(d&246)&&32===(a&224))pp(c.g,d&1?wp:up,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.
|
|
738
|
-
f-1),op(b,b.g,15-b.g),c.l=a);break;case 46:op(c.j,0,15);break;case 47:b=null,c.h!==Dp&&(b=mp(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ep(c),c.l=a,d=b}a=d;break a}a=null}else d=b.
|
|
738
|
+
(d&246)&&32===(a&224))pp(c.g,d&1?wp:up,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.mb){case 32:Ep(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Bp(c,2,a);break;case 38:d=Bp(c,3,a);break;case 39:d=Bp(c,4,a);break;case 40:pp(c.g,qp,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:lp(c.o);Gp(c);break;case 43:Gp(c);break;case 44:b=c.i;d=null;c.h!==Dp&&(d=mp(b,c.l,a));op(b,0,15);break;case 45:b=c.g;c.h!==Cp?d=null:(d=mp(b,c.l,a),f=b.g-b.h+1,yp(b,f-1,f,b.h),op(b,0,
|
|
739
|
+
f-1),op(b,b.g,15-b.g),c.l=a);break;case 46:op(c.j,0,15);break;case 47:b=null,c.h!==Dp&&(b=mp(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ep(c),c.l=a,d=b}a=d;break a}a=null}else d=b.mb,pp(c.g,qp,b.Ra),pp(c.g,qp,d);return a}
|
|
739
740
|
function rq(a,b){var c=[];try{for(;b.ia();){var d=fq(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=fq(b).value&63);if(0!=e){a.u.add("svc"+e);a.j.has(e)||a.j.set(e,new gq(e));for(var g=a.j.get(e),h=b.qa();b.qa()-h<f;){e=b;var k=fq(e),l=k.value,m=k.pts;if(16===l){var n=fq(e);l=l<<16|n.value}if(0<=l&&31>=l){var q=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!Op(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=Pp(p,q,g.i));if(p.h+1>=p.o){q=p;for(var u=
|
|
740
|
-
0,v=1;16>v;v++,u++)q.i[u]=q.i[v];for(v=0;1>v;v++,u++)q.i[u]=Mp()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=Pp(p,q,g.i));p.i[p.h]=Mp();p.g=0;break;case 12:p.isVisible()&&(e=Pp(p,q,g.i)),Lp(p),q=p,q.h=0,q.g=0}var
|
|
741
|
-
"\u266a"):Np(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Np(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(nq.has(e)){var z=nq.get(e);Np(g.g,z)}else Np(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Np(g.g,"_"):Np(g.g,"[CC]"));
|
|
742
|
-
oq.prototype.getStreams=function(){return Array.from(this.u)};
|
|
741
|
+
0,v=1;16>v;v++,u++)q.i[u]=q.i[v];for(v=0;1>v;v++,u++)q.i[u]=Mp()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=Pp(p,q,g.i));p.i[p.h]=Mp();p.g=0;break;case 12:p.isVisible()&&(e=Pp(p,q,g.i)),Lp(p),q=p,q.h=0,q.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=hq(g,e,l,m);else{if(4096<=l&&4127>=l)q=l&255,8<=q&&15>=q?e.skip(1):16<=q&&23>=q?e.skip(2):24<=q&&31>=q&&e.skip(3);else if(4224<=l&&4255>=l)q=l&255,128<=q&&135>=q?e.skip(4):136<=q&&143>=q&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Np(g.g,
|
|
742
|
+
"\u266a"):Np(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Np(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(nq.has(e)){var z=nq.get(e);Np(g.g,z)}else Np(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Np(g.g,"_"):Np(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(y){if(y instanceof O&&3E3===y.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}function sq(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
743
|
+
oq.prototype.getStreams=function(){return Array.from(this.u)};N("shaka.cea.CeaDecoder",oq);rb=function(){return new oq};function tq(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(w(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function uq(){this.j=new Map;this.i=this.h=0;this.g=vq}
|
|
743
744
|
uq.prototype.init=function(a){function b(f){f=f.name;f in wq&&(c.g=wq[f])}var c=this,d=[],e=[];(new Vf).box("moov",$f).box("mvex",$f).P("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.L();g=g.L();c.h=f;c.i=g}).box("trak",$f).P("tkhd",function(f){f=Zh(f.reader,f.version);d.push(f.trackId)}).box("mdia",$f).P("mdhd",function(f){f=Xh(f.reader,f.version);e.push(f.timescale)}).box("minf",$f).box("stbl",$f).P("stsd",bg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",
|
|
744
|
-
b).box("encv",cg).box("sinf",$f).box("frma",function(f){f=bi(f.reader).ha;f in wq&&(c.g=wq[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new O(2,2,2010);this.g==vq&&
|
|
745
|
-
uq.prototype.parse=function(a){var b=this;if(this.g==vq)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Vf).box("moof",function(l){f=l.start;g=[];$f(l)}).box("traf",$f).P("trun",function(l){l=Yh(l.reader,l.version,l.flags);g.push(l)}).P("tfhd",function(l){l=Vh(l.reader,l.flags);d=l.
|
|
745
|
+
b).box("encv",cg).box("sinf",$f).box("frma",function(f){f=bi(f.reader).ha;f in wq&&(c.g=wq[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new O(2,2,2010);this.g==vq&&Sa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
746
|
+
uq.prototype.parse=function(a){var b=this;if(this.g==vq)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Vf).box("moof",function(l){f=l.start;g=[];$f(l)}).box("traf",$f).P("trun",function(l){l=Yh(l.reader,l.version,l.flags);g.push(l)}).P("tfhd",function(l){l=Vh(l.reader,l.flags);d=l.Kf||b.h;e=l.Mg||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).P("tfdt",function(l){h=Wh(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Sa("Unable to find base media decode time for CEA captions!"),
|
|
746
747
|
new O(2,2,2010);xq(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
747
|
-
function xq(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.
|
|
748
|
-
c+(n[l].
|
|
749
|
-
c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(yc(c,e));if(h=Array.from(h)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{
|
|
750
|
-
function Fq(a,b,c,d){var e=Bq(a,c,d);if(b.
|
|
748
|
+
function xq(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.ig});n=[].concat.apply([],w(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Lg);b.ia();){g=b.L();var q=b.ga(),p=null;p=!1;h=1;switch(a.g){case yq:p=q&31;p=6==p;break;case zq:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].Vd||0),q=(c+q)/d,h=t(tq(b.sb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
749
|
+
c+(n[l].hf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}N("shaka.cea.Mp4CeaParser",uq);var vq=0,yq=1,zq=2,wq={avc1:yq,avc3:yq,hev1:zq,hvc1:zq,dvh1:zq,dvhe:zq};qb["video/mp4"]=function(){return new uq};function Aq(){}Aq.prototype.init=function(){};Aq.prototype.parse=function(a){var b=[];a=hb(a);if(!si(a))return b;a=(new mi).parse(a);var c=a.Nc(),d=a.Fd();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(tq(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};N("shaka.cea.TsCeaParser",Aq);qb["video/mp2t"]=function(){return new Aq};function Bq(a,b,c){var d=Cq(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(k){return k.keyId}));h.delete(null);if(1<h.size)throw new O(2,4,4010);if(!b){f=d.filter(function(k){return"urn:mpeg:dash:sea:2012"==k.cd});if(1<f.length)throw new O(2,4,4050);f.length&&(g=Dq(f[0]));f=d.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.cd?(e=k.init||e,!1):"urn:mpeg:dash:sea:2012"!=k.cd});f.length&&(a=Eq(e,f,c,h),0==a.length&&(a=[yc("",e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),
|
|
750
|
+
c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(yc(c,e));if(h=Array.from(h)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Jf:h,aj:e,drmInfos:a,je:g,Nf:!0}}
|
|
751
|
+
function Fq(a,b,c,d){var e=Bq(a,c,d);if(b.Nf){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.Nf=!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 O(2,4,4008);return e.Jf||b.Jf}
|
|
751
752
|
function Gq(a){var b=0,c=nb(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=hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
752
753
|
function Hq(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""}
|
|
753
754
|
function Iq(a){var b=pg(a.node,"https://dashif.org/CPS","Laurl");if(b&&b.textContent)return b.textContent;a=pg(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=hg(a.textContent);a=Gq(a).filter(function(c){return c.type===Jq})[0];if(!a)return"";a=Nf(a.value,!0);return(a=Gg(a,"WRMHEADER"))?Hq(a):""}
|
|
754
|
-
function Eq(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.
|
|
755
|
+
function Eq(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.cd];if(g){var h;if(h=pg(f.node,"urn:microsoft:playready","pro")){h=hg(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:mg(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.cd)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,
|
|
755
756
|
226,251,75]),m=new Uint8Array([]);k=[{initData:mg(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=yc(g,f.init||a||h||k);if(g=Kq.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Cq(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Lq(c.value))&&b.push(c);return b}
|
|
756
|
-
function Lq(a){var b=a.getAttribute("schemeIdUri"),c=sg(a,"urn:mpeg:cenc:2013","default_KID"),d=qg(a,"urn:mpeg:cenc:2013","pssh").map(ug);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:hg(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,
|
|
757
|
-
function Dq(a){if(!window.crypto||!window.crypto.subtle)throw
|
|
758
|
-
if(!a||!b)throw new O(2,4,4051);a=ig(a.substr(2));if(16!=a.byteLength)throw new O(2,4,4048);return{
|
|
757
|
+
function Lq(a){var b=a.getAttribute("schemeIdUri"),c=sg(a,"urn:mpeg:cenc:2013","default_KID"),d=qg(a,"urn:mpeg:cenc:2013","pssh").map(ug);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:hg(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,cd:b,keyId:c,init:0<e.length?e:null}}
|
|
758
|
+
function Dq(a){if(!window.crypto||!window.crypto.subtle)throw Sa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var b=pg(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new O(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.getAttribute("schemeIdUri"))throw new O(2,4,4051);b=pg(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new O(2,4,4051);a=b.getAttribute("IV");b=b.getAttribute("keyUriTemplate");
|
|
759
|
+
if(!a||!b)throw new O(2,4,4051);a=ig(a.substr(2));if(16!=a.byteLength)throw new O(2,4,4048);return{zh:b,iv:a}}
|
|
759
760
|
var Jq=1,Kq=(new Map).set("com.widevine.alpha",function(a){var b=pg(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?b.textContent:(a=pg(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Iq).set("com.microsoft.playready.recommendation",Iq).set("com.microsoft.playready.software",Iq).set("com.microsoft.playready.hardware",Iq).set("org.w3.clearkey",function(a){var b=pg(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?
|
|
760
|
-
b.textContent:(a=pg(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Mq(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&
|
|
761
|
+
b.textContent:(a=pg(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Mq(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Sa("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
761
762
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
762
763
|
function Nq(a,b){var c=Oq(a,b,"timescale"),d=1;c&&(d=Bg(c)||1);var e=Oq(a,b,"duration");c=Bg(e||"");"image"==a.M.contentType&&(c=Dg(e||""));c&&(c/=d);var f=Oq(a,b,"startNumber");e=Number(Oq(a,b,"presentationTimeOffset"))||0;var g=Cg(f||"");if(null==f||null==g)g=1;var h=Pq(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ba.duration||Infinity;f=g;h=og(h,"S");for(var k=[],l=-e,m=0;m<h.length;++m){var n=h[m],q=h[m+1],p=wg(n,"t",Cg),u=wg(n,"d",Cg),v=wg(n,"r",Ag);n=wg(n,"k",Ag)||0;null!=p&&(p-=e);if(!u)break;
|
|
763
|
-
p=null!=p?p:l;v=v||0;if(0>v)if(q){q=wg(q,"t",Cg);if(null==q)break;else if(p>=q)break;v=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;v=Math.ceil((a*b-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=v;++q)l=p+u,k.push({start:p/b,end:l/b,
|
|
764
|
+
p=null!=p?p:l;v=v||0;if(0>v)if(q){q=wg(q,"t",Cg);if(null==q)break;else if(p>=q)break;v=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;v=Math.ceil((a*b-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=v;++q)l=p+u,k.push({start:p/b,end:l/b,zf:p,eb:n,Vh:k.length+f}),p=l}b=k}return{timescale:d,ya:c,gd:g,ub:e/d||0,yf:e,timeline:b}}function Qq(a,b){return[b(a.M),b(a.oa),b(a.ta)].filter(ad)}
|
|
764
765
|
function Oq(a,b,c){b=Qq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.getAttribute(c));d=b.next());return a}function Pq(a,b,c){b=Qq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=ng(d.value,c));d=b.next());return a}
|
|
765
766
|
function Rq(a,b,c,d,e,f){for(var g=sg(a,"http://www.w3.org/1999/xlink","href"),h=sg(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 $e(new O(2,4,4028));if("onLoad"!=h)return $e(new O(2,4,4027));var m=xc([d],[g]);return e.request(0,pf(m,b)).pa(function(n){n=Ig(n.data,a.tagName);if(!n)return $e(new O(2,4,4001,g));
|
|
766
767
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var q=n.childNodes[0];n.removeChild(q);a.appendChild(q)}n=t(Array.from(n.attributes));for(q=n.next();!q.done;q=n.next())a.setAttributeNode(q.value.cloneNode(!1));return Sq(a,b,c,m[0],e,f+1)})}
|
|
767
768
|
function Sq(a,b,c,d,e,f){f=void 0===f?0:f;if(sg(a,"http://www.w3.org/1999/xlink","href")){var g=Rq(a,b,c,d,e,f);c&&(g=g.pa(void 0,function(){return Sq(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"==sg(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Sq(k,b,c,d,e,f)));return df(g).pa(function(){return a})};function Tq(a,b,c,d,e,f,g){var h,k=(new Vf).P("sidx",function(l){h=Uq(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
|
|
768
|
-
function Uq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.
|
|
769
|
+
function Uq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.mc(),m=g.reader.mc();g.reader.skip(2);var n=g.reader.Ea();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.L(),p=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.L();g.reader.skip(4);if(1==p)throw new O(2,3,3006);h.push(new S(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function Vq(a){this.h=nb(a);this.g=new Sf(this.h,0)}Vq.prototype.ia=function(){return this.g.ia()};
|
|
769
770
|
function Wq(a){var b=Xq(a);if(7<b.length)throw new O(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=Xq(a);a:{d=t(Yq);for(var e=d.next();!e.done;e=d.next())if(fb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.qa();else{if(8==b.length&&b[1]&224)throw new O(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.qa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.qa();d=nb(a.h,a.g.qa(),b);a.g.skip(b);return new Zq(c,
|
|
770
771
|
d)}function Xq(a){var b=a.g.qa(),c=a.g.ga();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return hb(a.h,b,c)}var Yq=[[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 Zq(a,b){this.id=a;this.g=b}
|
|
771
|
-
function $q(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(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 ar(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Vq(a.g);for(var n=null,q=null;a.ia();){var p=Wq(a);if(187==p.id){var u=br(p);u&&(p=c*u
|
|
772
|
-
function br(a){var b=new Vq(a.g);a=Wq(b);if(179!=a.id)throw new O(2,3,3013);a=$q(a);b=Wq(b);if(183!=b.id)throw new O(2,3,3012);b=new Vq(b.g);for(var c=0;b.ia();){var d=Wq(b);if(241==d.id){c=$q(d);break}}return{
|
|
773
|
-
function er(a,b,c){var d=Number(Oq(a,fr,"presentationTimeOffset"))||0,e=Oq(a,fr,"timescale"),f=1;e&&(f=Bg(e)||1);var g=d/f||0,h=cr(a,fr,c);gr(a,h);var k=od(a);return{
|
|
774
|
-
function ir(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,
|
|
775
|
-
J=G.g.byteOffset;G=new Vq(G.g);for(var H=null;G.ia();){var I=Wq(G);if(357149030==I.id){H=I;break}}if(!H)throw new O(2,3,3010);H=new Vq(H.g);I=1E6;for(G=null;H.ia();){var L=Wq(H);if(2807729==L.id)I=$q(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new O(2,3,3003);}if(null==G)throw new O(2,3,3011);H=I/1E9;G*=H;I=Wq(new Vq(
|
|
776
|
-
!0);return F.return(p)})}function fr(a){return a.
|
|
777
|
-
function dr(a){var b=a.M;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.
|
|
778
|
-
a.ba.duration:Infinity,b);g&&(g.segmentIndex=f);return{
|
|
779
|
-
function nr(a,b,c,d,e,f){var g=d.
|
|
780
|
-
function or(a){return[a.M.
|
|
781
|
-
Infinity,p=!(a.
|
|
782
|
-
function rr(a){var b=Nq(a,wr),c=Oq(a,wr,"media");a=Oq(a,wr,"index");return{
|
|
783
|
-
function tr(a,b,c,d,e,f){function g(I){var L=(I-u)*p,
|
|
784
|
-
m+I:Infinity}var l=a.presentationTimeline,m=a.ba.start,n=a.
|
|
785
|
-
function qr(a,b){var c=Oq(a,wr,"initialization");if(!c)return null;var d=a.M.id,e=a.bandwidth||null,f=a.M
|
|
786
|
-
r.
|
|
787
|
-
function xr(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.m)b.pop();else break;a.
|
|
772
|
+
function $q(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(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 ar(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Vq(a.g);for(var n=null,q=null;a.ia();){var p=Wq(a);if(187==p.id){var u=br(p);u&&(p=c*u.di,u=b+u.Lh,null!=n&&m.push(new S(n+g,p+g,l,q,u-1,f,g,h,k)),n=p,q=u)}}null!=n&&m.push(new S(n+g,d+g,l,q,null,f,g,h,k));return m}
|
|
773
|
+
function br(a){var b=new Vq(a.g);a=Wq(b);if(179!=a.id)throw new O(2,3,3013);a=$q(a);b=Wq(b);if(183!=b.id)throw new O(2,3,3012);b=new Vq(b.g);for(var c=0;b.ia();){var d=Wq(b);if(241==d.id){c=$q(d);break}}return{di:a,Lh:c}};function cr(a,b,c){b=Pq(a,b,"Initialization");if(!b)return null;var d=a.M.bb(),e=b.getAttribute("sourceURL");e&&(d=xc(d,[e]));e=0;var f=null;if(b=wg(b,"range",zg))e=b.start,f=b.end;return new Fh(function(){return d},e,f,dr(a),null,null,c)}
|
|
774
|
+
function er(a,b,c){var d=Number(Oq(a,fr,"presentationTimeOffset"))||0,e=Oq(a,fr,"timescale"),f=1;e&&(f=Bg(e)||1);var g=d/f||0,h=cr(a,fr,c);gr(a,h);var k=od(a);return{dc:function(){var l=Pq(k,fr,"RepresentationIndex");var m=k.M.bb();l&&(l=l.getAttribute("sourceURL"))&&(m=xc(m,[l]));l=hr(k);return ir(k,b,h,m,l.start,l.end,g)}}}
|
|
775
|
+
function ir(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,x,z,y,B,A,D;return K(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.yb||!a.ba.Ke,l=a.ba.start,m=a.ba.duration,n=a.M.mimeType.split("/")[1],q=b,p=null,u=[q(d,e,f,!1),"webm"==n?q(c.Z(),c.Pa,c.wa,!0):null],q=null,C(F,Promise.all(u),2);v=F.h;x=v[0];z=v[1]||null;y=null;B=l-g;A=l;D=m?l+m:Infinity;if("mp4"==n)var J=Tq(x,e,d,c,B,A,D);else{J=new Vq(z);if(440786851!=Wq(J).id)throw new O(2,3,3008);var G=Wq(J);if(408125543!=G.id)throw new O(2,3,3009);
|
|
776
|
+
J=G.g.byteOffset;G=new Vq(G.g);for(var H=null;G.ia();){var I=Wq(G);if(357149030==I.id){H=I;break}}if(!H)throw new O(2,3,3010);H=new Vq(H.g);I=1E6;for(G=null;H.ia();){var L=Wq(H);if(2807729==L.id)I=$q(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new O(2,3,3003);}if(null==G)throw new O(2,3,3011);H=I/1E9;G*=H;I=Wq(new Vq(x));if(475249515!=I.id)throw new O(2,3,3007);J=ar(I,J,H,G,d,c,B,A,D)}y=J;h.Xc(y);p=new Ej(y);k&&p.bc(A,D,
|
|
777
|
+
!0);return F.return(p)})}function fr(a){return a.ed}function hr(a){var b=Pq(a,fr,"RepresentationIndex");a=Oq(a,fr,"indexRange");a=zg(a||"");b&&(a=wg(b,"range",zg,a));return a}function gr(a,b){jr(a,b);if(!hr(a))throw new O(2,4,4002);}function jr(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Dc&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
|
|
778
|
+
function dr(a){var b=a.M;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.Sd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function kr(a,b,c){var d=cr(a,lr,c),e=mr(a);if(!e.ya&&!e.timeline&&1<e.jc.length)throw new O(2,4,4002);if(!e.ya&&!a.ba.duration&&!e.timeline&&1==e.jc.length)throw new O(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new O(2,4,4002);var f=null,g=null;a.ta.id&&a.M.id&&(g=b[a.ta.id+","+a.M.id])&&(f=g.segmentIndex);var h=nr(a.ba.start,a.ba.duration,a.M.bb,e,d,c);b=!f;f?f.Wc(h,a.presentationTimeline.cb()):f=new Ej(h);a.presentationTimeline.Xc(h);a.yb&&a.ba.Ke||f.bc(a.ba.start,a.ba.duration?a.ba.start+
|
|
779
|
+
a.ba.duration:Infinity,b);g&&(g.segmentIndex=f);return{dc:function(){f&&0!=f.Ob()||f.Pd(h);return Promise.resolve(f)}}}function lr(a){return a.Eb}function mr(a){var b=or(a);a=Nq(a,lr);var c=a.gd;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,gd:c,ub:a.ub,timeline:a.timeline,jc:b}}
|
|
780
|
+
function nr(a,b,c,d,e,f){var g=d.jc.length;d.timeline&&d.timeline.length!=d.jc.length&&(g=Math.min(d.timeline.length,d.jc.length));for(var h=a-d.ub,k=b?a+b:Infinity,l=[],m=d.startTime,n={},q=0;q<g;n={Cc:n.Cc,yc:n.yc},q++){n.yc=d.jc[q];var p=void 0;p=null!=d.ya?m+d.ya:d.timeline?d.timeline[q].end:m+b;n.Cc=null;l.push(new S(a+m,a+p,function(u){return function(){null==u.Cc&&(u.Cc=xc(c(),[u.yc.Dh]));return u.Cc}}(n),n.yc.start,n.yc.end,e,h,a,k,[],"",null,null,Hh,f));m=p}return l}
|
|
781
|
+
function or(a){return[a.M.Eb,a.oa.Eb,a.ta.Eb].filter(ad).map(function(b){return og(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Wf&&(a.Wf=!0);var c=b.getAttribute("media");b=wg(b,"mediaRange",zg,{start:0,end:null});return{Dh:c,start:b.start,end:b.end}})};function pr(a,b,c,d,e,f,g){var h=qr(a,g),k=rr(a);sr(k);var l=od(a);if(k.Uc)return jr(a,h),{dc:function(){var u=Mq(k.Uc,l.M.id,null,null,l.bandwidth||null,null);u=xc(l.M.bb(),[u]);return ir(l,b,h,u,0,null,k.ub)}};if(k.ya)return d||"image"===a.oa.contentType||(a.presentationTimeline.Ye(k.ya),a.presentationTimeline.Rd(a.ba.start)),{dc:function(){return tr(l,k,e,h,f,g)}};var m=null;d=d=null;a.ta.id&&a.M.id&&(d=a.ta.id+","+a.M.id,d=c[d])&&(m=d.segmentIndex);var n=a.ba.start,q=a.ba.duration?n+a.ba.duration:
|
|
782
|
+
Infinity,p=!(a.yb&&a.ba.Ke);m?(c=m,ur(c,k,n,q,p,h),c.ab(a.presentationTimeline.cb())):m=new vr(k,a.M.id,a.bandwidth,a.M.bb,n,q,h,p,g,a.M.jf);k.timeline&&"image"!==a.oa.contentType&&a.presentationTimeline.dg(k.timeline,n);d&&a.yb&&(d.segmentIndex=m);return{dc:function(){m instanceof vr&&0==m.Ob()&&ur(m,k,n,q,p,h);return Promise.resolve(m)}}}function wr(a){return a.fd}
|
|
783
|
+
function rr(a){var b=Nq(a,wr),c=Oq(a,wr,"media");a=Oq(a,wr,"index");return{ya:b.ya,timescale:b.timescale,gd:b.gd,ub:b.ub,yf:b.yf,timeline:b.timeline,kc:c,Uc:a}}function sr(a){var b=a.Uc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Uc&&(a.timeline=null),a.ya=null);if(!a.Uc&&!a.kc)throw new O(2,4,4002);}
|
|
784
|
+
function tr(a,b,c,d,e,f){function g(I){var L=(I-u)*p,M=L+b.ub,P=L+m;L=P+p;var V=Math.min(L,k());P=new S(P,V,function(){var X=M*v;"BigInt"in window&&X>Number.MAX_SAFE_INTEGER&&(X=BigInt(M)*BigInt(v));X=Mq(x,y,I,null,z,X);return xc(B(),[X])},0,null,d,A,m,k(),[],"",null,null,Hh,f);P.h=L;return P}function h(){var I=[Math.max(l.cb(),m),Math.min(l.zb(),k())].map(function(L){return L-m});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(L){return L+u})}function k(){var I=null!=n&&e[n]||q;return I?
|
|
785
|
+
m+I:Infinity}var l=a.presentationTimeline,m=a.ba.start,n=a.ta.id,q=a.ba.duration,p=b.ya,u=b.gd,v=b.timescale,x=b.kc,z=a.bandwidth||null,y=a.M.id,B=a.M.bb,A=m-b.ub,D=h();a=a.yb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var F=a;F<=D;++F){var J=g(F);c.push(J)}var G=new Ej(c);c=l.zb()<k();F=l.R();if(c||F){var H=Math.max(a,D+1);G.Xd(p,function(){var I=l.cb();G.ab(I);var L=t(h());L.next();L=L.next().value;for(var M=[];H<=L;){var P=g(H);M.push(P);H++}return I>k()&&!M.length?null:M})}return Promise.resolve(G)}
|
|
786
|
+
function qr(a,b){var c=Oq(a,wr,"initialization");if(!c)return null;var d=a.M.id,e=a.bandwidth||null,f=a.M.bb;return new Fh(function(){var g=Mq(c,d,null,null,e,null);return xc(f(),[g])},0,null,dr(a),null,null,b)}function vr(a,b,c,d,e,f,g,h,k,l){Ej.call(this,[]);this.h=a;this.F=b;this.A=c;this.C=d;this.i=e;this.m=f;this.s=g;this.u=k;this.G=l;h&&xr(this)}oa(vr,Ej);r=vr.prototype;r.Ob=function(){return this.h?this.h.timeline.length:0};r.release=function(){Ej.prototype.release.call(this);this.h=null};
|
|
787
|
+
r.ab=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.Ob()&&this.release())}};function ur(a,b,c,d,e,f){a.s=f;if(a.h){c=a.h.timeline;a.h.kc=b.kc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,w(b));a.m!==d&&(a.m=d)}else a.h=b,a.i=c,a.m=d;e&&xr(a)}
|
|
788
|
+
function xr(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.m)b.pop();else break;a.ab(a.i);0!==b.length&&Infinity!==a.m&&(b[b.length-1].end=a.m-a.i)}}
|
|
788
789
|
r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>this.m)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=e.end+this.i;d<c&&(e=b[d+1].start+this.i);if(a>=f&&a<e)return d+this.j}return null};
|
|
789
|
-
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.
|
|
790
|
-
0==this.G?0<m&&n.
|
|
790
|
+
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Ob()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.kc,e=this.h.timeline[a],f=e.Vh,g=this.h.yf+e.zf;c=this.i-this.h.ub;for(var h=[],k=(e.end-e.start)/e.eb,l={},m=0;m<e.eb;l={Dc:l.Dc,ee:l.ee},m++){var n=e.start+k*m,q=n+k;l.ee=m+1;l.Dc=null;n=new S(this.i+n,this.i+q,function(p){return function(){if(!b.h)return[];null==p.Dc&&(p.Dc=yr(b.h.kc,b.F,f,b.A,g,p.ee,b.C));return p.Dc}}(l),0,null,this.s,c,this.i,this.m,[],"",null,null,Hh,this.u);
|
|
791
|
+
0==this.G?0<m&&n.Nd():0!=m%this.G&&n.Nd();h.push(n)}c=new S(this.i+e.start,this.i+e.end,function(){return 0<e.eb?[]:yr(d,b.F,f,b.A,g,null,b.C)},0,null,this.s,c,this.i,this.m,h,"",null,null,Hh,this.u,0<e.eb);this.g[a]=c}return c};function yr(a,b,c,d,e,f,g){a=Mq(a,b,c,f,d||null,e);return xc(g(),[a]).map(function(h){return h.toString()})};function zr(a){this.o=null;this.u=a;this.G=new jf;this.j=[];this.h=null;this.m=[];this.A=null;this.F=[];this.C=300;this.l=new Map;this.i=new Map;this.g=null;this.s="UNKNOWN"}zr.prototype.configure=function(a){this.o=a};zr.prototype.destroy=function(){this.u=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};zr.prototype.setManifestType=function(a){this.s=a};
|
|
791
792
|
function Ar(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=xc(a.j,[Br(a,b)]),d=pf(c,a.o.retryParameters),e=a.u.networkingEngine.request(8,d),kf(a.G,e),sa(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=Kf(f.data),h=JSON.parse(g),1==h.VERSION&&Cr(a,h,f.uri),ua(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new qd(function(){Ar(a,b)});a.g.U(a.C);E(l)})}
|
|
792
793
|
function Br(a,b){if(!a.m.length)return b;b=new fc(b);var c=a.A||a.m[0],d=Math.round(a.u.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));vc(e)&&jc(b,e);return b.toString()}function Cr(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new qd(function(){Ar(a,d)});if(c=b.TTL)a.C=c;a.g.U(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
793
794
|
function Dr(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
|
|
794
|
-
function Er(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={
|
|
795
|
-
h=a.i.get(g),e>h&&a.i.delete(g);d=d.filter(function(k){for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new fc(k.location)).
|
|
796
|
-
function Gr(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Hr(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Ir(n),n]})),l=new Map(h.textStreams.map(function(n){return[Jr(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Kr(n),n]}));if(b){var m=Lr(Dc);l.set(Jr(m),m);m=Lr("image");h.set(Kr(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{
|
|
797
|
-
r.
|
|
798
|
-
l,Nr,Or),Mr(c,c.g,u,l,Nr,Or),Mr(c,c.l,v,l,Nr,Or),Mr(c,c.i,
|
|
799
|
-
else for(B=c.g.length?c.g:c.h,A=t(B),D=A.next();!D.done;D=A.next())F=D.value,J=z++,
|
|
800
|
-
function Pr(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
801
|
-
|
|
802
|
-
t(v),H=G.next();!H.done;H=G.next())for(I=H.value,L=t(
|
|
803
|
-
function Mr(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,
|
|
804
|
-
A.next();!u.done;u=A.next())for(D=u.value,F={},J=t(D),z=J.next();!z.done;F={
|
|
805
|
-
function Yr(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 C(l,Promise.all(c),2)}if(a.segmentIndex instanceof Ij)for(h={},k=b;k<d.length;h={
|
|
806
|
-
(n.aa.codecs=m.
|
|
795
|
+
function Er(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={Ib:e.Ib},g=f.next())if(e.Ib=g.value,g=b.get(e.Ib))d.push({df:e.Ib,location:g});else if(g=a.F.find(function(k){return function(l){return l.vi==k.Ib}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].xg?(h=new fc(h),hc(h,g["URI-REPLACEMENT"].xg),d.push({df:e.Ib,location:h.toString()})):d.push({df:e.Ib,location:h}))}e=Date.now();f=t(a.i.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
796
|
+
h=a.i.get(g),e>h&&a.i.delete(g);d=d.filter(function(k){for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new fc(k.location)).nb))return!1;return!0});d.length&&(a.A=d[0].df);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.A=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:xc(a.j,d)};function Fr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=!1;this.o=new Set}r=Fr.prototype;r.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.mh=function(){return this.j};r.He=function(){return this.l.slice()};r.Vg=function(){return this.i};
|
|
797
|
+
function Gr(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Hr(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Ir(n),n]})),l=new Map(h.textStreams.map(function(n){return[Jr(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Kr(n),n]}));if(b){var m=Lr(Dc);l.set(Jr(m),m);m=Lr("image");h.set(Kr(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Df:c,vg:d,sg:e,Vf:f}}
|
|
798
|
+
r.Gf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X;return K(function(ba){if(1==ba.g){d=Ec;if(!b&&1==a.length)return e=Gr(a,!1),f=e.Df,g=e.vg,h=e.sg,k=e.Vf,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),ba.B(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.o.has(n.id)||(c.o.add(n.id),-1==l&&(l=m));if(-1==l)return ba.return();q=Gr(a,!0);p=q.Df;u=q.vg;v=q.sg;x=q.Vf;return C(ba,Promise.all([Mr(c,c.h,p,
|
|
799
|
+
l,Nr,Or),Mr(c,c.g,u,l,Nr,Or),Mr(c,c.l,v,l,Nr,Or),Mr(c,c.i,x,l,Nr,Or)]),2)}z=0;y=[];if(c.g.length&&c.h.length)for(G=t(c.h),H=G.next();!H.done;H=G.next())for(I=H.value,L=t(c.g),M=L.next();!M.done;M=L.next())P=M.value,V=vh(I.drmInfos,P.drmInfos),I.drmInfos.length&&P.drmInfos.length&&!V.length||(X=z++,y.push({id:X,language:I.language,disabledUntilTime:0,primary:I.primary,audio:I,video:P,bandwidth:(I.bandwidth||0)+(P.bandwidth||0),drmInfos:V,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
|
|
800
|
+
else for(B=c.g.length?c.g:c.h,A=t(B),D=A.next();!D.done;D=A.next())F=D.value,J=z++,y.push({id:J,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==d.O?F:null,video:F.type==d.$?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=y;E(ba)})};
|
|
801
|
+
function Pr(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V;return K(function(X){switch(X.g){case 1:b=Ec;if(1==a.length)return X.return(a[0]);c=a.map(function(ba){return new Map(ba.filter(function(R){return R.type===b.O}).map(function(R){return[Hr(R),R]}))});d=a.map(function(ba){return new Map(ba.filter(function(R){return R.type===b.$}).map(function(R){return[Ir(R),R]}))});e=a.map(function(ba){return new Map(ba.filter(function(R){return R.type===b.na}).map(function(R){return[Jr(R),
|
|
802
|
+
R]}))});f=a.map(function(ba){return new Map(ba.filter(function(R){return R.type===b.ge}).map(function(R){return[Kr(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Qr(b.na),k.set(Jr(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,p=Qr(b.ge),q.set(Kr(p),p);u=new Fr;return C(X,Mr(u,[],c,0,Rr,Sr),2);case 2:return v=X.h,C(X,Mr(u,[],d,0,Rr,Sr),3);case 3:return x=X.h,C(X,Mr(u,[],e,0,Rr,Sr),4);case 4:return z=X.h,C(X,Mr(u,[],f,0,Rr,Sr),5);case 5:y=X.h;B=0;if(x.length&&v.length)for(G=
|
|
803
|
+
t(v),H=G.next();!H.done;H=G.next())for(I=H.value,L=t(x),M=L.next();!M.done;M=L.next())P=M.value,V=B++,P.variantIds.push(V),I.variantIds.push(V);else for(A=x.concat(v),D=t(A),F=D.next();!F.done;F=D.next())J=F.value,J.variantIds=[B++];return X.return(x.concat(v).concat(z).concat(y))}})}
|
|
804
|
+
function Mr(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G;return K(function(H){switch(H.g){case 1:g=[];for(h=0;h<d;h++)g.push(new Set);for(k=d;k<c.length;k++)g.push(new Set(c[k].values()));l=t(b);m=l.next();case 2:if(m.done){H.B(4);break}n=m.value;return C(H,Tr(a,n,c,d,f,g),5);case 5:q=H.h;if(!q)throw new O(2,4,4037);m=l.next();H.B(2);break;case 4:p=t(g);for(u=p.next();!u.done;u=p.next())for(v=u.value,x=t(v),z=x.next();!z.done;z=x.next())y=z.value,(B=Ur(a,y,c,e,f,g))&&b.push(B);A=t(g);for(u=
|
|
805
|
+
A.next();!u.done;u=A.next())for(D=u.value,F={},J=t(D),z=J.next();!z.done;F={od:F.od},z=J.next())if(F.od=z.value,!Vr(F.od)&&(G=b.some(function(I){return function(L){return Wr(a,I.od,L)}}(F))))throw new O(2,4,4037);return H.return(b)}})}function Tr(a,b,c,d,e,f){return K(function(g){if(1==g.g)return Xr(a,c,b),b.matchedStreams?b.segmentIndex?C(g,Yr(b,d),2):g.B(2):g.return(!1);Zr(b,d,e,f);return g.return(!0)})}
|
|
806
|
+
function Yr(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 C(l,Promise.all(c),2)}if(a.segmentIndex instanceof Ij)for(h={},k=b;k<d.length;h={ib:h.ib},k++)h.ib=d[k],h.ib.segmentIndex&&(Fj(h.ib.segmentIndex,function(m){return function(n){n.codecs=m.ib.codecs;n.mimeType=m.ib.mimeType;n.aa&&
|
|
807
|
+
(n.aa.codecs=m.ib.codecs,n.aa.mimeType=m.ib.mimeType)}}(h)),a.segmentIndex.h.push(h.ib.segmentIndex));E(l)})}function Ur(a,b,c,d,e,f){if(Vr(b))return null;var g=d(b);Xr(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return K(function(h){if(g.segmentIndex)return h.B(0);g.segmentIndex=new Ij;return C(h,Yr(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Zr(g,0,e,f);return g}
|
|
807
808
|
function Zr(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==id(a.language,f.language)&&(g=!1);if(g){d[b].delete(f);g=new Set(a.codecs.split(","));f=t(f.codecs.split(","));for(var h=f.next();!h.done;h=f.next())(h=h.value)&&g.add(h);h=Array.from(g);g=new Set;f=[];h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=Mc(k);g.has(l)||(f.push(k),g.add(l))}a.codecs=f.join(",")}}}
|
|
808
809
|
function Nr(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
809
810
|
function Rr(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
@@ -821,80 +822,80 @@ a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function fs(a,b,c){re
|
|
|
821
822
|
function Lr(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ej([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1}}
|
|
822
823
|
function is(a,b,c){if(b==a&&a!=c)return ks;if(c==a&&a!=b)return js;if(b>a){if(c<=a||c-a<b-a)return js;if(c-a>b-a)return ks}else{if(c>a)return ks;if(a-c<a-b)return js;if(a-c>a-b)return ks}return ms}function ls(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?js:b<a?ks:ms}function Vr(a){switch(a.type){case Dc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
823
824
|
function Ir(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Hr(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Jr(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
824
|
-
function Kr(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}
|
|
825
|
+
function Kr(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}N("shaka.util.PeriodCombiner",Fr);Fr.prototype.combinePeriods=Fr.prototype.Gf;Fr.prototype.getImageStreams=Fr.prototype.Vg;Fr.prototype.getTextStreams=Fr.prototype.He;Fr.prototype.getVariants=Fr.prototype.mh;var js=1,ms=0,ks=-1,hs=new Map;function ns(){var a=this;this.i=this.h=null;this.o=[];this.j=null;this.I=1;this.m={};this.K={};this.l=new Fr;this.F=0;this.H=new Ma(5);this.G=new qd(function(){os(a)});this.C=new jf;this.u=null;this.J=[];this.A=Infinity;this.s=!1;this.g=null}r=ns.prototype;r.configure=function(a){this.h=a;this.g&&this.g.configure(this.h);this.l&&(this.l.m=this.h.dash.multiTypeVariantsAllowed&&bb())};
|
|
825
826
|
r.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,ps(c),2);d=e.h;c.i&&qs(c,d);if(!c.i)throw new O(2,7,7001);return e.return(c.j)})};r.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.h=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.G&&(this.G.stop(),this.G=null);this.g&&this.g.destroy();return this.C.destroy()};
|
|
826
|
-
r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return sa(c,2),C(c,ps(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);E(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.
|
|
827
|
+
r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return sa(c,2),C(c,ps(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);E(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.zb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,qs(this,0))}}};
|
|
827
828
|
r.banLocation=function(a){this.g&&this.g.i.set(a,Date.now()+6E4)};function ps(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.g&&(c=Er(a.g,"Location",!0),c.length&&(b=c)),d=pf(b,a.h.retryParameters),e=Date.now(),C(k,rs(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return C(k,ss(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
|
|
828
829
|
function ss(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Ig(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.h.dash.disableXlinkProcessing)return k.return(ts(a,d,c));f=a.h.dash.xlinkFailGracefully;g=Sq(d,a.h.retryParameters,f,c,a.i.networkingEngine);kf(a.C,g);return C(k,g.promise,2)}h=k.h;return k.return(ts(a,h,c))})}
|
|
829
|
-
function ts(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
830
|
-
u.length&&(e=a.o=u)):f.length&&(e=a.o=f);v=Promise.resolve();if((
|
|
831
|
-
|
|
832
|
-
Ub=null;wb||(Ub=wg(b,"maxSegmentDuration",yg));Vb=b.getAttribute("type")||"static";if(a.j)for(jb=a.j.presentationTimeline,Ed=t(Object.values(a.m)),hd=Ed.next();!hd.done;hd=Ed.next())Fd=hd.value,Fd.segmentIndex&&Fd.segmentIndex.
|
|
833
|
-
"";Hd={
|
|
834
|
-
jb.
|
|
835
|
-
return C(Xc,ws(a,
|
|
830
|
+
function ts(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X,ba,R,Oa,ab,vb,Tb,Bb,xa,ib,wb,Ub,Vb,jb,Ed,hd,Fd,tc,Gd,yh,Ee,Hd,Ac,Wc,Lf,Mf,Bk,Xp,Yp;return K(function(Xc){switch(Xc.g){case 1:(d=a.h.dash.manifestPreprocessor)&&d(b);a.g&&a.g.l.clear();e=[c];f=[];g=new Map;h=og(b,"Location");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=m.getAttribute("serviceLocation"),q=ug(m))p=xc(e,[q])[0],n&&(a.g?Dr(a.g,"Location",n,p):g.set(n,p)),f.push(p);a.g?(u=Er(a.g,"Location",!0),0<
|
|
831
|
+
u.length&&(e=a.o=u)):f.length&&(e=a.o=f);v=Promise.resolve();if((x=ng(b,"ContentSteering"))&&a.i){z=x.getAttribute("defaultServiceLocation");if(a.g)a.g.j=e,a.g.h=z;else if(a.g=new zr(a.i),a.g.configure(a.h),a.g.setManifestType("DASH"),a.g.j=e,a.g.h=z,y=ug(x))(B=wg(x,"queryBeforeStart",Eg,!1))?v=Ar(a.g,y):Ar(a.g,y);A=t(g.keys());for(D=A.next();!D.done;D=A.next())F=D.value,J=g.get(F),Dr(a.g,"Location",F,J)}G=og(b,"BaseURL");I=!1;if(a.g)for(L=t(G),M=L.next();!M.done;M=L.next())P=M.value,V=P.getAttribute("serviceLocation"),
|
|
832
|
+
X=ug(P),V&&X&&(Dr(a.g,"BaseURL",V,X),I=!0);I&&a.g||(ba=G.map(ug),H=xc(e,ba));R=function(){return a.g&&I?Er(a.g,"BaseURL"):H?H:[]};Oa=0;G&&G.length&&(Oa=wg(G[0],"availabilityTimeOffset",Dg)||0);ab=a.h.dash.ignoreMinBufferTime;vb=0;ab||(vb=wg(b,"minBufferTime",yg)||0);a.F=wg(b,"minimumUpdatePeriod",yg,-1);Tb=wg(b,"availabilityStartTime",xg);Bb=wg(b,"timeShiftBufferDepth",yg);xa=a.h.dash.ignoreSuggestedPresentationDelay;ib=null;xa||(ib=wg(b,"suggestedPresentationDelay",yg));wb=a.h.dash.ignoreMaxSegmentDuration;
|
|
833
|
+
Ub=null;wb||(Ub=wg(b,"maxSegmentDuration",yg));Vb=b.getAttribute("type")||"static";if(a.j)for(jb=a.j.presentationTimeline,Ed=t(Object.values(a.m)),hd=Ed.next();!hd.done;hd=Ed.next())Fd=hd.value,Fd.segmentIndex&&Fd.segmentIndex.ab(jb.cb());else tc=a.h.defaultPresentationDelay||1.5*vb,Gd=null!=ib?ib:tc,jb=new ij(Tb,Gd,a.h.dash.autoCorrectDrift);jb.nc("static"==Vb);(yh=jb.R())&&!isNaN(a.h.availabilityWindowOverride)&&(Bb=a.h.availabilityWindowOverride);null==Bb&&(Bb=Infinity);jb.Wd(Bb);Ee=b.getAttribute("profiles")||
|
|
834
|
+
"";Hd={yb:"static"!=Vb,presentationTimeline:jb,ta:null,ba:null,oa:null,M:null,bandwidth:0,Wf:!1,ac:Oa,profiles:Ee.split(",")};Ac=us(a,Hd,R,b);Wc=Ac.duration;Lf=Ac.periods;"static"!=Vb&&Ac.Lf||jb.Oa(Wc||Infinity);a.A&&!a.s&&(Mf=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?jb.lg(a.A):a.A&&Sa("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.");
|
|
835
|
+
jb.Ye(Ub||1);return C(Xc,a.l.Gf(Lf,Hd.yb),2);case 2:return C(Xc,v,3);case 3:a.s&&(vb=0);if(a.j){a.j.variants=a.l.j;Bk=a.l.He();0<Bk.length&&(a.j.textStreams=Bk);a.j.imageStreams=a.l.i;a.i.filter(a.j);Xc.B(4);break}a.j={presentationTimeline:jb,variants:a.l.j,textStreams:a.l.He(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:vb||0,sequenceMode:a.h.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:vs(b)};if(!jb.ug()){Xc.B(5);break}Xp=og(b,"UTCTiming");
|
|
836
|
+
return C(Xc,ws(a,R,Xp),6);case 6:Yp=Xc.h;if(!a.i)return Xc.return();jb.mg(Yp);case 5:jb.Md();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),E(Xc)}})}
|
|
836
837
|
function vs(a){a=ng(a,"ServiceDescription");if(!a)return null;var b=ng(a,"Latency"),c=ng(a,"PlaybackRate");if(b&&b.getAttribute("max")||c){a=b&&b.getAttribute("max")?parseInt(b.getAttribute("max"),10)/1E3:null;var d=c?parseFloat(c.getAttribute("max")):null;b=b&&b.getAttribute("min")?parseInt(b.getAttribute("min"),10)/1E3:null;c=c?parseFloat(c.getAttribute("min")):null;return{maxLatency:a,maxPlaybackRate:d,minLatency:b,minPlaybackRate:c}}return null}
|
|
837
|
-
function us(a,b,c,d){var e=wg(d,"mediaPresentationDuration",yg),f=[],g=0;d=og(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=wg(k,"start",yg,g),n=k.id,q=wg(k,"duration",yg),p=null;if(l){var u=wg(l,"start",yg);null!=u&&(p=u-m)}else null!=e&&(p=e-m);null==p&&(p=q);if(!(null!==a.u&&null!==n&&null!==m&&m<a.u)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.u||m>a.u)&&(a.u=m);g=xs(a,b,c,{start:m,duration:p,node:k,
|
|
838
|
-
null;break}g=m+p}}a.J=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,
|
|
839
|
-
function xs(a,b,c,d){b.
|
|
840
|
-
}d=c.filter(function(m){return!m.
|
|
841
|
-
d,Dc);d=Bs(a.h.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new O(2,4,4004);return{id:b.
|
|
842
|
-
function As(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.oa=ys(a,c,b.
|
|
838
|
+
function us(a,b,c,d){var e=wg(d,"mediaPresentationDuration",yg),f=[],g=0;d=og(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=wg(k,"start",yg,g),n=k.id,q=wg(k,"duration",yg),p=null;if(l){var u=wg(l,"start",yg);null!=u&&(p=u-m)}else null!=e&&(p=e-m);null==p&&(p=q);if(!(null!==a.u&&null!==n&&null!==m&&m<a.u)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.u||m>a.u)&&(a.u=m);g=xs(a,b,c,{start:m,duration:p,node:k,Ke:null==p||!l});f.push(g);b.ta.id&&p&&(a.K[b.ta.id]=p);if(null==p){g=
|
|
839
|
+
null;break}g=m+p}}a.J=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Lf:!1}:{periods:f,duration:g,Lf:!0}}
|
|
840
|
+
function xs(a,b,c,d){b.ta=ys(a,d.node,null,c);b.ba=d;b.ta.ac=b.ac;b.ta.id||(b.ta.id="__shaka_period_"+d.start);var e=og(d.node,"EventStream");c=b.presentationTimeline.cb();e=t(e);for(var f=e.next();!f.done;f=e.next())zs(a,d.start,d.duration,f.value,c);c=og(d.node,"AdaptationSet").map(function(m){return As(a,b,m)}).filter(ad);if(b.yb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ph);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);
|
|
841
|
+
}d=c.filter(function(m){return!m.wf});c=c.filter(function(m){return m.wf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.wf.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={pd:h.pd},l=k.next())h.pd=l.value,h.pd.trickModeVideo=e.streams.find(function(m){return function(n){return Kc(m.pd.codecs)==Kc(n.codecs)}}(h))}}}c=Bs(a.h.disableAudio,d,"audio");e=Bs(a.h.disableVideo,d,"video");f=Bs(a.h.disableText,
|
|
842
|
+
d,Dc);d=Bs(a.h.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new O(2,4,4004);return{id:b.ta.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Bs(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,w(e.streams));return d},[])}
|
|
843
|
+
function As(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.oa=ys(a,c,b.ta,null);var e=!1,f=og(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(ad),h=void 0,k=b.oa.contentType==Dc;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=
|
|
843
844
|
l}}var n;m=og(c,"EssentialProperty");f=null;var q=!1;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var u=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==u?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==u?n=d(parseInt(p.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=u&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=u&&("urn:mpeg:dash:ssr:2023"==u?q=!0:l=!0)}m=og(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=
|
|
844
|
-
m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),10)));m=og(c,"Accessibility");var v=new Map,
|
|
845
|
-
A=B[1]||"und"):(
|
|
846
|
-
u?
|
|
845
|
+
m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),10)));m=og(c,"Accessibility");var v=new Map,x;m=t(m);for(p=m.next();!p.done;p=m.next())if(u=p.value,p=u.getAttribute("schemeIdUri"),u=u.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=u){u=u.split(";");for(var z=t(u),y=z.next();!y.done;y=z.next()){var B=y.value,A=y=void 0;B.includes("=")?(B=B.split("="),y=B[0].startsWith("CC")?B[0]:"CC"+B[0],
|
|
846
|
+
A=B[1]||"und"):(y="CC"+p,2==u.length?p+=2:p++,A=B);v.set(y,dd(A))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=u)for(u=t(u.split(";")),y=u.next();!y.done;y=u.next())y=y.value,B=z=void 0,y.includes("=")?(y=y.split("="),z="svc"+y[0],B=y[1].split(",")[0].split(":").pop()):(z="svc"+p,p++,B=y),v.set(z,dd(B));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=u&&(g.push(u),"captions"==u&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==
|
|
847
|
+
u?x="visually impaired":"2"==u&&(x="hard of hearing"));if(l)return null;l=og(c,"ContentProtection");var D=Bq(l,a.h.dash.ignoreDrmInfo,a.h.dash.keySystemsByURI),F=dd(b.oa.language||"und"),J=c.getAttribute("label");(l=og(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(J=l.textContent));l=og(c,"Representation");c=l.map(function(G){if(G=Cs(a,b,D,h,F,J,e,g,v,G,x))G.hdr=G.hdr||n,G.fastSwitching=q;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.oa.contentType;if(a.h.dash.ignoreEmptyAdaptationSet||
|
|
847
848
|
k||f)return null;throw new O(2,4,4003);}if(!b.oa.contentType||"application"==b.oa.contentType)for(b.oa.contentType=Ds(c[0].mimeType,c[0].codecs),k=t(c),p=k.next();!p.done;p=k.next())p.value.type=b.oa.contentType;k=b.oa.id||"__fake__"+a.I++;m=t(c);for(p=m.next();!p.done;p=m.next()){p=p.value;u=t(D.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&p.keyIds?new Set([].concat(w(z.keyIds),w(p.keyIds))):z.keyIds||p.keyIds;a.h.dash.enableAudioGroups&&(p.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(ad);
|
|
848
|
-
return{id:k,contentType:b.oa.contentType,language:F,
|
|
849
|
-
function Cs(a,b,c,d,e,f,g,h,k,l,m){b.M=ys(a,l,b.oa,null);a.A=Math.min(a.A,b.M.
|
|
850
|
-
4,4049);I={name:"AES-CBC"};L=u;return C(
|
|
851
|
-
a.h.dash.ignoreDrmInfo,a.h.dash.keySystemsByURI);v=new Set(v?[v]:[]);
|
|
852
|
-
(F=l.getAttribute("value")),!F))return null;var J;l=b.M.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");l=b.M.id?b.
|
|
853
|
-
codecs:b.M.codecs,frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.oa.language,label:f,type:b.oa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.M.
|
|
854
|
-
external:!1,fastSwitching:!1};G.createSegmentIndex=function(){var H;return K(function(I){if(1==I.g){if(G.segmentIndex)return I.B(0);H=G;return C(I,
|
|
849
|
+
return{id:k,contentType:b.oa.contentType,language:F,bj:e,streams:c,drmInfos:D.drmInfos,wf:f,Ph:l}}
|
|
850
|
+
function Cs(a,b,c,d,e,f,g,h,k,l,m){b.M=ys(a,l,b.oa,null);a.A=Math.min(a.A,b.M.ac);if(!Es(b.M))return null;var n=b.ba.start;b.bandwidth=wg(l,"bandwidth",Bg)||0;var q=b.M.contentType,p=q==Dc||"application"==q;q="image"==q;try{var u=void 0;if(c.je){var v=b.M.bb,x=xc(v(),[c.je.zh]),z=pf(x,a.h.retryParameters);u={method:"AES-128",iv:c.je.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,I,L;return K(function(M){if(1==M.g)return C(M,rs(a,z,6),2);if(3!=M.g){H=M.h;if(!H.data||16!=H.data.byteLength)throw new O(2,
|
|
851
|
+
4,4049);I={name:"AES-CBC"};L=u;return C(M,window.crypto.subtle.importKey("raw",H.data,I,!0,["decrypt"]),3)}L.cryptoKey=M.h;u.fetchKey=void 0;E(M)})}}}v=function(H,I,L,M){return Fs(a,H,I,L,M)};if(b.M.ed)var y=er(b,v,u);else if(b.M.Eb)y=kr(b,a.m,u);else if(b.M.fd)y=pr(b,v,a.m,!!a.j,a.h.dash.initialSegmentLimit,a.K,u);else{var B=b.ba.duration||0,A=b.M.bb;y={dc:function(){return Promise.resolve(Hj(n,B,A()))}}}}catch(H){if((p||q)&&4002==H.code)return null;throw H;}v=og(l,"ContentProtection");v=Fq(v,c,
|
|
852
|
+
a.h.dash.ignoreDrmInfo,a.h.dash.keySystemsByURI);v=new Set(v?[v]:[]);x=!1;og(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var F;if(q&&((l=og(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
853
|
+
(F=l.getAttribute("value")),!F))return null;var J;l=b.M.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");l=b.M.id?b.ta.id+","+b.M.id:"";var G=l&&a.m[l]?a.m[l]:{id:a.I++,originalId:b.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,
|
|
854
|
+
codecs:b.M.codecs,frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.oa.language,label:f,type:b.oa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.M.Sd,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:F,accessibilityPurpose:m,
|
|
855
|
+
external:!1,fastSwitching:!1};G.createSegmentIndex=function(){var H;return K(function(I){if(1==I.g){if(G.segmentIndex)return I.B(0);H=G;return C(I,y.dc(),3)}H.segmentIndex=I.h;E(I)})};l&&b.yb&&!a.m[l]&&(a.m[l]=G);return G}
|
|
855
856
|
function os(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,sa(d,2),C(d,ps(a),4);case 4:b=d.h;ua(d,3);break;case 2:if(c=va(d),a.i){if(a.h.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();qs(a,b);E(d)}})}function qs(a,b){0>=a.F||a.G.U(Math.max(a.F-b,Na(a.H)))}
|
|
856
|
-
function ys(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,
|
|
857
|
-
c.codecs;var n=wg(b,"frameRate",Fg)||c.frameRate,q=b.getAttribute("sar")||c.pixelAspectRatio,p=Gs(og(b,"InbandEventStream"),c.emsgSchemeIdUris),u=og(b,"AudioChannelConfiguration");u=Hs(u)||c.
|
|
858
|
-
(A=ng(A,"SAP"))&&(B=wg(A,"cadence",Ag));return{
|
|
857
|
+
function ys(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Sd:null,audioSamplingRate:null,ac:0,jf:0};d=d||c.bb;var e=b.getAttribute("id"),f=og(b,"BaseURL"),g,h=!1;if(a.g)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.getAttribute("serviceLocation");m=ug(m);l&&m&&(Dr(a.g,e,l,m),h=!0)}h&&a.g||(g=f.map(ug));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")||
|
|
858
|
+
c.codecs;var n=wg(b,"frameRate",Fg)||c.frameRate,q=b.getAttribute("sar")||c.pixelAspectRatio,p=Gs(og(b,"InbandEventStream"),c.emsgSchemeIdUris),u=og(b,"AudioChannelConfiguration");u=Hs(u)||c.Sd;var v=wg(b,"audioSamplingRate",Cg)||c.audioSamplingRate;k||(k=Ds(l,m));var x=ng(b,"SegmentBase"),z=ng(b,"SegmentTemplate"),y=x?wg(x,"availabilityTimeOffset",Dg)||0:0,B=z?wg(z,"availabilityTimeOffset",Dg)||0:0,A=f&&f.length?wg(f[0],"availabilityTimeOffset",Dg)||0:0;y=c.ac+A+y+B;B=null;(A=ng(b,"SegmentSequenceProperties"))&&
|
|
859
|
+
(A=ng(A,"SAP"))&&(B=wg(A,"cadence",Ag));return{bb:function(){return xc(d(),f.length?a.g&&h?Er(a.g,e):g?g:[]:[])},ed:x||c.ed,Eb:ng(b,"SegmentList")||c.Eb,fd:z||c.fd,width:wg(b,"width",Cg)||c.width,height:wg(b,"height",Cg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.getAttribute("lang"),Sd:u,audioSamplingRate:v,ac:y,jf:B||c.jf}}
|
|
859
860
|
function Gs(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.getAttribute("schemeIdUri"),b.includes(c)||b.push(c);return b}
|
|
860
861
|
function Hs(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=
|
|
861
|
-
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 Es(a){var b=a.
|
|
862
|
+
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 Es(a){var b=a.ed?1:0;b+=a.Eb?1:0;b+=a.fd?1:0;if(0==b)return a.contentType==Dc||"application"==a.contentType?!0:!1;1!=b&&(a.ed&&(a.Eb=null),a.fd=null);return!0}
|
|
862
863
|
function Is(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=xc(b(),[c]),f=pf(e,a.h.retryParameters),f.method=d,g=a.i.networkingEngine.request(4,f),kf(a.C,g),C(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=Kf(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
|
|
863
864
|
function ws(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(q){return{scheme:q.getAttribute("schemeIdUri"),value:q.getAttribute("value")}}),e=a.h.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.B(4);break}h=g.value;sa(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.B(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.B(8);
|
|
864
|
-
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":
|
|
865
|
-
3);break;case 5:va(n);case 3:g=f.next();n.B(2);break;case 4:return
|
|
865
|
+
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":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return C(n,Is(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,Is(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ua(n,
|
|
866
|
+
3);break;case 5:va(n);case 3:g=f.next();n.B(2);break;case 4:return Sa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
866
867
|
function zs(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=wg(d,"timescale",Cg)||1;d=t(og(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=wg(k,"presentationTime",Cg)||0,m=wg(k,"duration",Cg)||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.i.onTimelineRegionAdded(k))}}
|
|
867
|
-
function Fs(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return f=vf,g=e?0:1,h=ek(b,c,d,a.h.retryParameters),C(l,rs(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Ds(a,b){b=Gc(a,b);return Qc(b)?Dc:a.split("/")[0]}function rs(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);kf(a.C,b);return b.promise}
|
|
868
|
-
function Ps(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}Os.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 Qs(a,b){a=a.getAttribute(b);if(!a)throw new O(2,4,4023,b);return a.value}function Rs(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.
|
|
868
|
+
function Fs(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return f=vf,g=e?0:1,h=ek(b,c,d,a.h.retryParameters),C(l,rs(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Ds(a,b){b=Gc(a,b);return Qc(b)?Dc:a.split("/")[0]}function rs(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);kf(a.C,b);return b.promise}N("shaka.dash.DashParser",ns);Ah["application/dash+xml"]=function(){return new ns};Ah["video/vnd.mpeg.dash.mpd"]=function(){return new ns};function Js(){}N("shaka.dependencies",Js);Js.has=function(a){return Ks.has(a)};Js.add=function(a,b){if(!Ls[a])throw Error(a+" is not supported");a==Ms?ye("mux.js","mux.js is no longer used in Shaka Player."):Ks.set(a,function(){return b})};var Ms="muxjs",Ls={cj:Ms,ISOBoxer:"ISOBoxer"};Js.Allowed=Ls;var Ks=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Ns(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Os(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Os.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.g?this.g.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
869
|
+
function Ps(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}Os.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 Qs(a,b){a=a.getAttribute(b);if(!a)throw new O(2,4,4023,b);return a.value}function Rs(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.eb=c}
|
|
869
870
|
function Ss(a,b){this.name=a;this.value=b};function Ts(a,b){return a.filter(function(c){return c.name==b})}function Us(a,b){return a.filter(function(c){return Qs(c,"TYPE")==b})}function Vs(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Ws(a,b,c){c=void 0===c?0:c;return(a=Vs(a,b))?Number(a.value):c}function Xs(a,b,c){return b?Ys(a,[b],c):[]}
|
|
870
871
|
function Ys(a,b,c){if(!b.length)return[];b=xc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new O(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Zs(a){this.h=a||"";this.g=0}function $s(a){at(a,/[ \t]+/gm)}function at(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function bt(a){return a.g==a.h.length?null:(a=at(a,/[^ \t\n]*/gm))?a[0]:null};function ct(){this.g=0}
|
|
871
872
|
function dt(a,b){b=Kf(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new O(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=et(a,f),--a.g,ft.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=et(a,g);if(gt.includes(g.name)){if(1!=b)throw new O(2,4,4017);g=
|
|
872
873
|
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=et(a,k),ft.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Rs(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Rs("",d,f)));return new Ns(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
873
874
|
g.name&&(g.g.push(new Ss("URI",h)),d=!0)}}return new Ns(b,e)}function et(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Zs(d);var f;(f=at(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=at(d,g);)c.push(new Ss(f[1],f[2]||f[3])),$s(d)}return new Os(a,b,c,e)}
|
|
874
875
|
var ft="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),gt="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function ht(){}function it(a){try{var b=jt(a);return bf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return $e(c)}}
|
|
875
|
-
function jt(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(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=hg(a):e=Qf(a);return{data:e,contentType:c}}
|
|
876
|
+
function jt(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(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=hg(a):e=Qf(a);return{data:e,contentType:c}}N("shaka.net.DataUriPlugin",ht);ht.parse=it;mf("data",it);function kt(a){var b=Nc(a),c=b.split("/")[0];a=Oc(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map}}
|
|
876
877
|
function lt(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":e.push(v+".42E01E");g=!0;break;case "hev1":case "hvc1":e.push(v+".1.6.L93.90");g=!0;break;case "dvh1":case "dvhe":e.push(v+".05.04");g=!0;break;case "vp09":e.push(v+".00.10.08");g=!0;break;case "av01":e.push(v+".0.01M.08");g=!0;break;case "mp4a":e.push("mp4a.40.2");f=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),f=!0}}var e=[],f=!1,g=!1,h=null,k=null,l=null,m=null,
|
|
877
|
-
n=null;(new Vf).box("moov",$f).box("trak",$f).P("tkhd",function(v){v=Zh(v.reader,v.version);k=String(v.height);l=String(v.width)}).box("mdia",$f).P("mdhd",function(v){h=Xh(v.reader,v.version).language}).box("minf",$f).box("stbl",$f).P("stsd",bg).box("mp4a",function(v){var
|
|
878
|
+
n=null;(new Vf).box("moov",$f).box("trak",$f).P("tkhd",function(v){v=Zh(v.reader,v.version);k=String(v.height);l=String(v.width)}).box("mdia",$f).P("mdhd",function(v){h=Xh(v.reader,v.version).language}).box("minf",$f).box("stbl",$f).P("stsd",bg).box("mp4a",function(v){var x=v.reader;x.skip(6);x.skip(2);x.skip(8);var z=x.Ea();x.skip(2);x.skip(2);x.skip(2);x=x.Ea()+x.Ea()/65536;m=z;n=x;v.reader.ia()?$f(v):c(v)}).box("esds",function(v){v=$h(v.reader);e.push(v.ha);f=!0}).box("ac-3",c).box("ec-3",c).box("opus",
|
|
878
879
|
c).box("Opus",c).box("fLaC",c).box("avc1",function(v){v=ai(v.reader,v.name);e.push(v.ha);g=!0}).box("avc3",function(v){v=ai(v.reader,v.name);e.push(v.ha);g=!0}).box("hev1",c).box("hvc1",c).box("dvh1",c).box("dvhe",c).box("vp09",c).box("av01",c).box("enca",cg).box("encv",cg).box("sinf",$f).box("frma",function(v){v=bi(v.reader).ha;d(v)}).parse(a||b,!0);if(!e.length)return null;var q=f&&!g,p=new Map;if(g){var u=new pb("video/mp4");a&&u.init(a);u.i(b);a=t(u.j());for(b=a.next();!b.done;b=a.next())b=b.value,
|
|
879
|
-
p.set(b,b);u.h()}return{type:q?"audio":"video",mimeType:q?"audio/mp4":"video/mp4",codecs:mt(e).join(", "),language:h,height:k,width:l,channelCount:m,sampleRate:n,closedCaptions:p}}function mt(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Mc(d);b.has(e)||(c.push(d),b.add(e))}return c};function nt(){var a=this;this.g=this.i=null;this.u=1;this.o=new Map;this.H=new Map;this.J=new Map;this.J.set("video",new Map);this.J.set("audio",new Map);this.J.set(Dc,new Map);this.J.set("image",new Map);this.
|
|
880
|
-
this.
|
|
881
|
-
r.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.
|
|
882
|
-
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){if(!st(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(tt(a,g));return C(m,Promise.all(b),2)}ut(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.
|
|
883
|
-
h&&xt(a);E(m)})};function yt(a,b){return st(a)?a.J.get(b.type):b.
|
|
884
|
-
function tt(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
885
|
-
b.Z().includes(m)||b.
|
|
886
|
-
L=H.
|
|
887
|
-
function Et(a,b){for(var c=-1==a.I,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=yt(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.
|
|
888
|
-
function Gt(a,b){if(Infinity==a.V){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.ca&&(a.V=Math.min(a.V,d.ca))}}b=a.V;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.ca)
|
|
889
|
-
function Ft(a,b,c){b.
|
|
890
|
-
function rt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
891
|
-
l),Mt(a,k),f=Nt(a,l,q,k),g=Ot(a,k),C(
|
|
892
|
-
0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.l=new ij(null,0);a.l.
|
|
893
|
-
break}P=[];
|
|
894
|
-
function Ht(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
895
|
-
a.g.retryParameters),C(D,Wt(a,
|
|
896
|
-
H.push(J.ha):H.push("hvc1.1.6.L93.90"),L=!0}if(H.length){G=I&&!L;I=new Map;if(L){L=new pb("video/mp2t");L.i(F);F=t(L.j());for(var
|
|
897
|
-
return D.return(d)}})}function xt(a){if(st(a)){if(a.ea==Xt){var b=Yt(a);a.g.hls.useSafariBehaviorForLive&&(b=a.l.o);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.
|
|
880
|
+
p.set(b,b);u.h()}return{type:q?"audio":"video",mimeType:q?"audio/mp4":"video/mp4",codecs:mt(e).join(", "),language:h,height:k,width:l,channelCount:m,sampleRate:n,closedCaptions:p}}function mt(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Mc(d);b.has(e)||(c.push(d),b.add(e))}return c};function nt(){var a=this;this.g=this.i=null;this.u=1;this.o=new Map;this.H=new Map;this.J=new Map;this.J.set("video",new Map);this.J.set("audio",new Map);this.J.set(Dc,new Map);this.J.set("image",new Map);this.Ba=new Set;this.h=new Map;this.l=null;this.Y="";this.za=new ct;this.I=-1;this.V=Infinity;this.da=this.lb=!1;this.s=new qd(function(){ot(a)});this.ea=pt;this.C=null;this.Aa=0;this.m=Infinity;this.ma=this.ka=this.K=0;this.N=new jf;this.F=new Map;this.G=new Map;this.W=new Map;this.kb=this.A=!1;
|
|
881
|
+
this.jb=new Ma(5);this.j=null}r=nt.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return K(function(e){return 1==e.g?(c.i=b,c.A=b.isLowLatencyMode(),C(e,qt(c,[a]),2)):3!=e.g?(d=e.h,c.Y=d.uri,C(e,rt(c,d.data,a),3)):e.return(c.C)})};
|
|
882
|
+
r.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.Ba.clear();this.C=null;this.h.clear();this.H.clear();this.G.clear();this.o.clear();this.W.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
883
|
+
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){if(!st(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(tt(a,g));return C(m,Promise.all(b),2)}ut(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Sc});d.length&&!h&&(k=vt,wt(a,k.zg),l=d.map(function(n){return n.qb}),a.l.Oa(Math.min.apply(Math,w(l))),a.i.updateDuration());
|
|
884
|
+
h&&xt(a);E(m)})};function yt(a,b){return st(a)?a.J.get(b.type):b.Od}
|
|
885
|
+
function tt(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X;return K(function(ba){if(1==ba.g){c=[];d=t(b.Z());for(e=d.next();!e.done;e=d.next())f=e.value,g=new fc(f),h=g.g,b.sd&&(0<=b.Wa&&h.add("_HLS_msn",String(b.Wa)),0<=b.Xa&&h.add("_HLS_part",String(b.Xa))),b.td&&h.add("_HLS_skip","YES"),vc(h)&&jc(g,h),c.push(g.toString());return C(ba,qt(a,c,!0),2)}k=ba.h;if(!b.stream.segmentIndex)return ba.return();l=dt(a.za,k.data);if(1!=l.type)throw new O(2,4,4017);m=k.uri;m==k.originalUri||
|
|
886
|
+
b.Z().includes(m)||b.gg.push(m);n=Ts(l.g,"EXT-X-DEFINE");q=zt(a,n,m);p=b.stream;u=yt(a,b);v=At(l,p.mimeType);x=v.keyIds;z=v.drmInfos;y=function(R,Oa){return R.size===Oa.size&&[].concat(w(R)).every(function(ab){return Oa.has(ab)})};y(p.keyIds,x)||(p.keyIds=x,p.drmInfos=z,a.i.newDrmInfo(p));B=Bt(a,l,p,u,q,b.Z);A=B.segments;if(D=B.bandwidth)p.bandwidth=D;p.segmentIndex.Wc(A,a.l.cb());A.length&&(F=Ws(l.g,"EXT-X-MEDIA-SEQUENCE",0),G=(J=Vs(l.g,"EXT-X-SKIP"))?Number(Z(J,"SKIPPED-SEGMENTS")):0,H=Ct(F,A),
|
|
887
|
+
I=H.Wa,L=H.Xa,b.Wa=I+G,b.Xa=L,M=u.get(F),p.segmentIndex.ab(M));P=A[0];b.Sb=P.startTime;V=A[A.length-1];b.qb=V.endTime;if(X=Vs(l.g,"EXT-X-ENDLIST"))b.Sc=!0;Dt(a,l);E(ba)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.i.set(a,Date.now()+6E4)};
|
|
888
|
+
function Et(a,b){for(var c=-1==a.I,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=yt(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.pe=k;break}}}}if(!(0>a.I))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.I-c.pe),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),Ft(a,c,d)}
|
|
889
|
+
function Gt(a,b){if(Infinity==a.V){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.ca&&(a.V=Math.min(a.V,d.ca))}}b=a.V;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.ca)Ra("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Z(),"Expect AV sync issues!");else for(Ft(a,c,f.ca-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.tf(b)}}}
|
|
890
|
+
function Ft(a,b,c){b.Sb+=c;b.qb+=c;a=yt(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.Z()}
|
|
891
|
+
function rt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X,ba;return K(function(R){switch(R.g){case 1:d=dt(a.za,b);e=Ts(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},C(R,Ht(a,d,v),6);It(a,e);k=Ts(d.g,"EXT-X-MEDIA");l=Ts(d.g,"EXT-X-STREAM-INF");m=Ts(d.g,"EXT-X-IMAGE-STREAM-INF");n=Ts(d.g,"EXT-X-I-FRAME-STREAM-INF");q=Ts(d.g,"EXT-X-SESSION-KEY");p=Ts(d.g,"EXT-X-SESSION-DATA");u=Ts(d.g,"EXT-X-CONTENT-STEERING");Jt(a,p);return C(R,Kt(a,u),4);case 4:return Lt(a,
|
|
892
|
+
l),Mt(a,k),f=Nt(a,l,q,k),g=Ot(a,k),C(R,Pt(a,m,n),5);case 5:h=R.h;R.B(3);break;case 6:return x=R.h,z=x.type,y=x.mimeType,B=x.codecs,A=x.language,D=x.height,F=x.width,J=x.channelCount,G=x.sampleRate,H=x.closedCaptions,C(R,Qt(a,a.u++,d,v,c,B,z,A,!0,"Media Playlist",J,H,null,!1,G,!1,y),7);case 7:I=R.h,a.h.set(c,I),"video"==z&&Rt(I.stream,F,D,null,null,null),f.push({id:0,language:dd(A||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==z?I.stream:null,video:"video"==z?I.stream:null,bandwidth:I.stream.bandwidth||
|
|
893
|
+
0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.l=new ij(null,0);a.l.nc(!0);1==d.type&&(st(a)&&(St(a,d),L=a.m,a.s.U(L)),M=Array.from(a.h.values()),Tt(a,M),xt(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};if(a.da||!a.g.hls.disableCodecGuessing){R.B(8);
|
|
894
|
+
break}P=[];V=t(a.C.variants);for(X=V.next();!X.done;X=V.next())ba=X.value,ba.audio&&""===ba.audio.codecs&&P.push(ba.audio.createSegmentIndex()),ba.video&&""===ba.video.codecs&&P.push(ba.video.createSegmentIndex());return C(R,Promise.all(P),8);case 8:a.i.makeTextStreamsForClosedCaptions(a.C),E(R)}})}
|
|
895
|
+
function Ht(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){switch(D.g){case 1:d=kt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Xs(c(),b.segments[0].h);h=g[0];k=new fc(h);l=k.Ga.split(".").pop();if(m=Ut[l])return D.return(kt(m));n=vf;q=null;p=Vt(a,b,f.g,c);a.W.clear();if(!p){D.B(2);break}u=pf(p.Z(),a.g.retryParameters);return C(D,Wt(a,u,n,{type:0}),3);case 3:v=D.h,q=v.data;case 2:return x=pf(g,
|
|
896
|
+
a.g.retryParameters),C(D,Wt(a,x,n,{type:1}),4);case 4:z=D.h;(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==y){var F=z.data;var J=hb(F);J=(new mi).parse(J);var G=J.Nc();J=J.Ie();var H=[],I=!1,L=!1;switch(G.audio){case "aac":H.push("mp4a.40.2");I=!0;break;case "mp3":H.push("mp4a.40.34");I=!0;break;case "ac3":H.push("ac-3");I=!0;break;case "ec3":H.push("ec-3"),I=!0}switch(G.video){case "avc":J.ha?H.push(J.ha):H.push("avc1.42E01E");L=!0;break;case "hvc":J.ha?
|
|
897
|
+
H.push(J.ha):H.push("hvc1.1.6.L93.90"),L=!0}if(H.length){G=I&&!L;I=new Map;if(L){L=new pb("video/mp2t");L.i(F);F=t(L.j());for(var M=F.next();!M.done;M=F.next())M=M.value,I.set(M,M);L.h()}J={type:G?"audio":"video",mimeType:"video/mp2t",codecs:H.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:I}}else J=null;if(B=J)return D.return(B)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"video/mp4"==y||"audio/mp4"==y||"video/iso.segment"==y)if(A=lt(q,z.data))return D.return(A);
|
|
898
|
+
return D.return(d)}})}function xt(a){if(st(a)){if(a.ea==Xt){var b=Yt(a);a.g.hls.useSafariBehaviorForLive&&(b=a.l.o);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Wd(b)}if(!a.l.m){b=Array.from(a.h.values()).filter(function(d){return d.stream.segmentIndex});b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,("audio"==c.type||"video"==c.type)&&(c=c.stream.segmentIndex.get(0))&&c.ca&&a.l.qf(c.ca)}}else a.l.Oa(Zt(a));a.l.Md()}
|
|
898
899
|
function It(a,b){var c=(new fc(a.Y)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
|
|
899
900
|
function zt(a,b,c){c=(new fc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d}
|
|
900
901
|
function Lt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=$t(a,d);if(f){var g=Bc(Dc,d);a.G.set(f,g);tb(d,g)}e&&(f=Bc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Bc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
@@ -902,362 +903,365 @@ function Jt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z
|
|
|
902
903
|
function Kt(a,b){var c,d,e,f,g,h;return K(function(k){if(!a.i||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new zr(a.i);a.j.configure(a.g);a.j.j=[a.Y];a.j.setManifestType("HLS");a.j.h=g;c=Ar(a.j,h);break}return C(k,c,0)})}
|
|
903
904
|
function Ot(a,b){var c=Us(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return au(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Qs(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=bu(Dc,d)||cu(Dc)}}return b.filter(function(g){return g})}
|
|
904
905
|
function Pt(a,b,c){var d,e;return K(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return K(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);sa(m,2);return C(m,du(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Qs(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
|
|
905
|
-
q=Z(g,"CHARACTERISTICS"),p=eu(a,a.u++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),
|
|
906
|
+
q=Z(g,"CHARACTERISTICS"),p=eu(a,a.u++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),x=v.next().value,z=v.next().value;p.stream.width=Number(x)||void 0;p.stream.height=Number(z)||void 0;var y=Z(g,"BANDWIDTH");y&&(p.stream.bandwidth=Number(y));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
906
907
|
function fu(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Ps(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)au(a,d[g],c)}
|
|
907
908
|
function Nt(a,b,c,d){var e=[],f=new Set;if(0<c.length){c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Qs(g,"METHOD");if("NONE"!=h&&"AES-128"!=h&&(h=Z(g,"KEYFORMAT")||"identity",g=(h=gu[h])?h(g,""):null)){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}}c={};b=t(b);for(g=b.next();!g.done;g=b.next())g=g.value,h=Ps(g),c[h]?c[h].push(g):c[h]=[g];b=[];for(var l in c){k=c[l];var m=k[0];g=Z(m,"FRAME-RATE");h=Number(Z(m,"AVERAGE-BANDWIDTH"))||Number(Qs(m,
|
|
908
|
-
"BANDWIDTH"));var n=Z(m,"RESOLUTION"),q=t(n?n.split("x"):[null,null]);n=q.next().value;q=q.next().value;var p=Z(m,"VIDEO-RANGE");(m=Z(m,"REQ-VIDEO-LAYOUT"))&&m.includes(",")&&(m=m.split(",").filter(function(u){return"CH-STEREO"==u||"CH-MONO"==u})[0]);m=m||"CH-MONO";k=hu(a,k,d);b.push.apply(b,w(iu(a,k.audio,k.video,h,n,q,g,p,m,e,f)))}return b.filter(function(u){return null!=u})}
|
|
909
|
-
function hu(a,b,c){for(var
|
|
910
|
-
"URI")});
|
|
911
|
-
|
|
912
|
-
function
|
|
909
|
+
"BANDWIDTH"));var n=Z(m,"RESOLUTION"),q=t(n?n.split("x"):[null,null]);n=q.next().value;q=q.next().value;var p=Z(m,"VIDEO-RANGE");(m=Z(m,"REQ-VIDEO-LAYOUT"))&&m.includes(",")&&(m=m.split(",").filter(function(u){return"CH-STEREO"==u||"CH-MONO"==u})[0]);m=m||"CH-MONO";k=hu(a,k,d,h);b.push.apply(b,w(iu(a,k.audio,k.video,h,n,q,g,p,m,e,f)))}return b.filter(function(u){return null!=u})}
|
|
910
|
+
function hu(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=t(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Z(n,"AUDIO");var q=Z(n,"VIDEO"),p=m||q;p&&(g.includes(p)||g.push(p),(n=Z(n,"PATHWAY-ID"))&&f.set(p,n),m?h=!0:q&&(k=!0))}g.length&&c.length&&(l=c.filter(function(x){return g.includes(Qs(x,"GROUP-ID"))}),fu(a,l,f));l=(f=g.sort().join(","))&&a.H.has(f)?a.H.get(f):[];h?e.audio.push.apply(e.audio,w(l)):k&&e.video.push.apply(e.video,w(l));m=!1;var u=b.map(function(x){return Qs(x,
|
|
911
|
+
"URI")});k=e.audio.find(function(x){return x&&x.Z().find(function(z){return u.includes(z)})});h=$t(a,b[0]);q=Bc("video",h);(p=Bc("audio",h))&&!q?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&p&&q?(k="video",h=[[q,p].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var v=n=p=q=m=null;!l.length&&(c=c.find(function(x){var z=Z(x,"URI")||"",y=Z(x,"TYPE");x=Qs(x,"GROUP-ID");return"SUBTITLES"!=y&&""==z&&g.includes(x)}))&&(m=Z(c,"LANGUAGE"),
|
|
912
|
+
q=Z(c,"NAME"),p=ju(c),ku(c),n=Z(c,"CHARACTERISTICS"),v=lu(c));a=mu(a,b,h,k,m,q,p,n,v);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
|
|
913
|
+
function $t(a,b){var c=Z(b,"CODECS")||"";a.da=0<c.length;a.da||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),c=b.join(","));a=new Set;b=[];c=t(c.split(/\s*,\s*/));for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=Mc(d);a.has(e)||(b.push(d),a.add(e))}return b}function ju(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function lu(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}
|
|
914
|
+
function ku(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
913
915
|
function iu(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),q=n.next();!q.done;q=n.next())Rt(q.value.stream,e,f,g,h,k);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;q=p?p.stream.drmInfos:null;p=p?p.Z().sort().join(","):"";var u=f?f.Z().sort().join(","):
|
|
914
|
-
"";p=p+" - "+u;h&&k&&!uh(n,q)||a.
|
|
916
|
+
"";p=p+" - "+u;h&&k&&!uh(n,q)||a.Ba.has(p)||(h={id:a.u++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ba.add(p))}return e}
|
|
915
917
|
function Mt(a,b){b=Us(b,"CLOSED-CAPTIONS");b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=dd(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Qs(d,"GROUP-ID");d=Qs(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
|
|
916
918
|
function au(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Qs(k,"URI");k=Qs(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Qs(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Dc);if(k==Dc)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.h.has(e))return a.h.get(e);l=a.u++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
917
919
|
m=n.next().value;n=n.next().value;(m=c.get(m))&&Dr(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?ju(h):null;var q="audio"==k?ku(h):!1,p=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?lu(h):null;d=eu(a,l,d,b,k,c,m,f,n,null,p,u,h,q);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.h.set(e,d);return d}
|
|
918
920
|
function du(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(q){if(1==q.g){c=Qs(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return q.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=eu(a,a.u++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(q,h.stream.createSegmentIndex(),3):q.B(2)}2!=q.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
919
921
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return q.return(h)})}
|
|
920
922
|
function mu(a,b,c,d,e,f,g,h,k){for(var l=a.u++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Qs(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&Dr(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=zc(d,c);d=eu(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
|
|
921
|
-
function eu(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(D){var F,J,G,H,I,L,
|
|
922
|
-
if(D.aborted)return xa.return();
|
|
923
|
-
(ab=
|
|
924
|
-
A=new AbortController;return B=new Promise(function(D){D(u(A.signal))})};
|
|
925
|
-
function Yt(a){var b=Infinity,c=Infinity;a=t(a.h.values());for(var d=a.next();!d.done;d=a.next())d=d.value,d.stream.segmentIndex&&"text"!=d.stream.type&&(b=Math.min(b,d.
|
|
926
|
-
function Tt(a,b){if(!st(a))for(var c=Zt(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex
|
|
927
|
-
function Qt(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,
|
|
928
|
-
if(F&&!A.length&&!J)throw new O(2,4,4026);G=ou(a,f,g,h,k,l,m,n,q,p,u,v);G.encrypted=F;G.drmInfos=A;G.keyIds=D;G.mimeType=
|
|
929
|
-
type:g,
|
|
923
|
+
function eu(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(D){var F,J,G,H,I,L,M,P,V,X,ba,R,Oa,ab,vb,Tb,Bb;return K(function(xa){switch(xa.g){case 1:return F=y.Z(),C(xa,qt(a,y.Z(),!0),2);case 2:J=xa.h;if(D.aborted)return xa.return();G=J.uri;G==J.originalUri||F.includes(G)||z.push(G);H=dt(a.za,J.data);I=void 0;if(a.da||!a.g.hls.disableCodecGuessing){xa.B(3);break}return C(xa,Ht(a,H,v),4);case 4:L=xa.h,I=L.mimeType,d=L.codecs;case 3:return M=st(a),C(xa,Qt(a,0,H,v,G,d,e,f,g,h,k,l,m,n,q,p,I),5);case 5:P=xa.h;
|
|
924
|
+
if(D.aborted)return xa.return();V=P.stream;st(a)&&!M&&St(a,H);y.Sb=P.Sb;y.qb=P.qb;y.td=P.td;y.sd=P.sd;y.Sc=P.Sc;y.Od=P.Od;y.Wa=P.Wa;y.Xa=P.Xa;y.Se=!0;x.segmentIndex=V.segmentIndex;x.encrypted=V.encrypted;x.drmInfos=V.drmInfos;x.keyIds=V.keyIds;x.mimeType=V.mimeType;x.bandwidth=x.bandwidth||V.bandwidth;x.codecs=x.codecs||V.codecs;x.drmInfos.length&&a.i.newDrmInfo(x);X=Ec;if(e==X.$||e==X.O)for(ba=t(a.h.values()),R=ba.next();!R.done;R=ba.next())Oa=R.value,Oa.Se||Oa.type!=e||(Oa.stream.mimeType=V.mimeType);
|
|
925
|
+
e==X.na&&(ab=V.segmentIndex.get(0))&&ab.aa&&(x.mimeType="application/mp4");nu(a)&&(a.lb?Tt(a,[y]):(a.lb=!0,vb=Array.from(a.h.values()),Tb=vb.filter(function(ib){return ib.stream.segmentIndex}),Tt(a,Tb),xt(a),Bb=a.m,0<Bb&&a.s.U(Bb)));E(xa)}})}function v(){return a.j&&1<c.length?Er(a.j,b):z.concat(Ys([a.Y],c,a.o))}var x=ou(a,d,e,f,g,h,k,l,m,n,q,p),z=[],y={stream:x,type:e,gg:z,Z:v,Sb:0,qb:0,Od:new Map,td:!1,sd:!1,Sc:!1,pe:-1,Wa:-1,Xa:-1,Se:!1},B=null,A=new AbortController;x.createSegmentIndex=function(){if(B)return B;
|
|
926
|
+
A=new AbortController;return B=new Promise(function(D){D(u(A.signal))})};x.closeSegmentIndex=function(){B&&!x.segmentIndex&&A.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);B=null};return y}function Zt(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.qb));return b}
|
|
927
|
+
function Yt(a){var b=Infinity,c=Infinity;a=t(a.h.values());for(var d=a.next();!d.done;d=a.next())d=d.value,d.stream.segmentIndex&&"text"!=d.stream.type&&(b=Math.min(b,d.qb),c=Math.min(c,d.Sb));return b-c}function ut(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Fj(d.segmentIndex,function(e){c.push(e)});a.l.Xc(c)}
|
|
928
|
+
function Tt(a,b){if(!st(a))for(var c=Zt(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.bc(0,c);ut(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Et(a,b):Gt(a,b)}function nu(a){if(!a.C)return!1;var b=[],c=[];a=t(a.C.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
929
|
+
function Qt(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,x){var z,y,B,A,D,F,J,G,H,I,L,M,P,V,X,ba,R,Oa,ab,vb,Tb,Bb,xa;return K(function(ib){if(1==ib.g){if(1!=c.type)throw new O(2,4,4017);z=Ts(c.g,"EXT-X-DEFINE");y=zt(a,z,e);var wb=Vs(c.g,"EXT-X-PLAYLIST-TYPE"),Ub=Vs(c.g,"EXT-X-ENDLIST");Ub=wb&&"VOD"==wb.value||Ub;wb=wb&&"EVENT"==wb.value&&!Ub;wb=!Ub&&!wb;Ub?wt(a,pt):wb?wt(a,Xt):wt(a,pu);st(a)&&Dt(a,c);return x?ib.B(2):C(ib,qu(a,g,f,c,y,d),3)}2!=ib.g&&(x=ib.h);B=At(c,x);A=B.drmInfos;D=B.keyIds;F=B.encrypted;J=B.Dg;
|
|
930
|
+
if(F&&!A.length&&!J)throw new O(2,4,4026);G=ou(a,f,g,h,k,l,m,n,q,p,u,v);G.encrypted=F;G.drmInfos=A;G.keyIds=D;G.mimeType=x;H=st(a)?a.J.get(g):new Map;I=Bt(a,c,G,H,y,d);L=I.segments;if(M=I.bandwidth)G.bandwidth=M;st(a)&&Dt(a,c);P=L[0].startTime;V=L[L.length-1];X=V.endTime;ba=new Ej(L);G.segmentIndex=ba;Oa=(R=Vs(c.g,"EXT-X-SERVER-CONTROL"))?null!=R.getAttribute("CAN-SKIP-UNTIL"):!1;ab=R?null!=R.getAttribute("CAN-BLOCK-RELOAD"):!1;vb=Ws(c.g,"EXT-X-MEDIA-SEQUENCE",0);Tb=Ct(vb,L);Bb=Tb.Wa;xa=Tb.Xa;return ib.return({stream:G,
|
|
931
|
+
type:g,gg:[],Z:d,Sb:P,qb:X,td:Oa,sd:ab,Sc:!1,pe:-1,Wa:Bb,Xa:xa,Od:H,Se:!1})})}function Ct(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Wa:a,Xa:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Wa:a,Xa:c};c=d.length-1;d[d.length-1].l||(a++,c=0);return{Wa:a,Xa:c}}
|
|
930
932
|
function ou(a,b,c,d,e,f,g,h,k,l,m,n){var q=bu(c,b)||cu(c),p=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())p.push(u.value)}k=void 0;u=null;c==Dc?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");return{id:a.u++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
931
933
|
segmentIndex:null,mimeType:q,codecs:b,kind:c==Dc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:dd(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:p,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1}}
|
|
932
|
-
function At(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=Ts(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Qs(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=gu[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,
|
|
933
|
-
function ru(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw
|
|
934
|
+
function At(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=Ts(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Qs(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=gu[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,Dg:d}}
|
|
935
|
+
function ru(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Sa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=ig(g.substr(2));if(16!=h.byteLength)throw new O(2,4,4048);}else f=Ws(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,q,p;return K(function(u){if(1==u.g)return l=Xs(d(),Qs(b,"URI"),e),m=pf([l],a.g.retryParameters),
|
|
934
936
|
C(u,Wt(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new O(2,4,4049);q={name:"AES-CBC"};p=k;return C(u,window.crypto.subtle.importKey("raw",n.data,q,!0,["decrypt"]),3)}p.cryptoKey=u.h;k.fetchKey=void 0;E(u)})}};return k}
|
|
935
|
-
function Dt(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Vs(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Vs(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Vs(b.g,"EXT-X-PART-INF"))a.K=Number(Qs(e,"PART-TARGET"));b=Vs(b.g,"EXT-X-SERVER-CONTROL");a.A&&a.K?(a.m=a.
|
|
936
|
-
b.getAttribute("HOLD-BACK"):null,a.ka=c?Number(c.value):0);a.
|
|
937
|
+
function Dt(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Vs(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Vs(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Vs(b.g,"EXT-X-PART-INF"))a.K=Number(Qs(e,"PART-TARGET"));b=Vs(b.g,"EXT-X-SERVER-CONTROL");a.A&&a.K?(a.m=a.kb?5*a.K<=c?Math.min(a.K,a.m):Math.min(c,a.m):Math.min(a.K,a.m),a.ma=b?Number(Qs(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
938
|
+
b.getAttribute("HOLD-BACK"):null,a.ka=c?Number(c.value):0);a.Aa=Math.max(d,a.Aa)}function St(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ma)b=a.ma;else if(a.ka)b=a.ka;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Aa*c}a.l.qf(0);a.l.ng(b);a.l.nc(!1)}
|
|
937
939
|
function Vt(a,b,c,d,e){var f=Vs(c,"EXT-X-MAP");if(!f)return null;var g=Qs(f,"URI"),h=Xs(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.W.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?"AES-128"==Qs(m,"METHOD")&&m.id<f.id&&(k=ru(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=su(h,f,l,k);a.W.set(g,b)}return a.W.get(g)}
|
|
938
940
|
function su(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Fh(function(){return a},e,f,null,null,null,d)}
|
|
939
|
-
function tu(a,b,c,d,e,f,g,h,k){var l=d.g,m=Vs(l,"EXTINF"),n=0,q=0,p=null;d.
|
|
940
|
-
if(!a.A)return null}var z=[];v=!1;var
|
|
941
|
-
(P=Z(G,"BYTERANGE"),
|
|
942
|
-
1].endTime;else return null;v&&(B||0!=z[0].
|
|
943
|
-
function uu(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.
|
|
944
|
-
function Bt(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Ws(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Ws(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Vs(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,q=l+n,p=0;st(a)&&d.has(q)&&(p=d.get(q));0===p&&a.ea==Xt&&0<d.size&&!d.has(q)&&(p=a.l.
|
|
945
|
-
"METHOD")?h=ru(a,A,b,f,e):h=void 0);d.set(q,
|
|
946
|
-
F){return D+F.bitrate*F.duration},0)/b*1E3));if(m=u.some(function(D){return null!=D.ca}))for(c={},d=0;d<u.length;c={
|
|
947
|
-
c.
|
|
941
|
+
function tu(a,b,c,d,e,f,g,h,k){var l=d.g,m=Vs(l,"EXTINF"),n=0,q=0,p=null;d.eb.length&&!a.A&&Sa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=Vs(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=xg(v.value))}var x=Hh;Vs(l,"EXT-X-GAP")&&(x=2);if(!m){if(0==d.eb.length)throw new O(2,4,4024,"EXTINF");
|
|
942
|
+
if(!a.A)return null}var z=[];v=!1;var y=null,B=!1,A=!1;if(a.A&&d.eb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,F={},J=0;J<d.eb.length;F={Ac:F.Ac,md:F.md},J++){var G=d.eb[J],H=0==J?c:z[z.length-1],I=0==J?e:H.endTime,L=Number(Z(G,"DURATION"))||a.K;if(L){var M=I+L,P=0,V=null;"EXT-X-PRELOAD-HINT"==G.name?(P=(P=Z(G,"BYTERANGE-START"))?Number(P):0,(H=Z(G,"BYTERANGE-LENGTH"))?V=P+Number(H)-1:P&&(V=Number.MAX_SAFE_INTEGER)):
|
|
943
|
+
(P=Z(G,"BYTERANGE"),V=t(uu(H,P)),P=V.next().value,V=V.next().value);F.md=Z(G,"URI");if(F.md){H=Hh;"YES"==Z(G,"GAP")&&(H=2,B=!0);F.Ac=null;var X=function(R){return function(){null==R.Ac&&(R.Ac=Xs(h(),R.md,f));return R.Ac}}(F);n&&0<=P&&null!=V&&(y=X,v=!0);I=new S(I,M,X,P,V,b,0,0,Infinity,[],"",null,D,H,k);"EXT-X-PRELOAD-HINT"==G.name&&(I.Ue(),A=!0);"YES"!=Z(G,"INDEPENDENT")&&0<J&&I.Nd();z.push(I);D&&(D+=L)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
|
|
944
|
+
1].endTime;else return null;v&&(B||0!=z[0].Pa?(v=!1,y=null):z=[]);(m=Vs(l,"EXT-X-BYTERANGE"))?(p=t(uu(c,m.value)),q=p.next().value,p=p.next().value):z.length&&(q=z[0].Pa,p=z[z.length-1].wa);c="";m=null;"image"==g.type&&(c="1x1",g=Vs(l,"EXT-X-TILES"))&&(c=Qs(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var ba=null;b=new S(e,n,function(){if(y)return y();null==ba&&(ba=Xs(h(),d.h,f));return ba||[]},q,p,b,0,0,Infinity,z,c,m,u,x,k,0<z.length&&!!d.h);v&&(a.kb=!0,b.Zf(),A&&b.Ue());return b}
|
|
945
|
+
function uu(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+b-1);return[c,d]}
|
|
946
|
+
function Bt(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Ws(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Ws(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Vs(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,q=l+n,p=0;st(a)&&d.has(q)&&(p=d.get(q));0===p&&a.ea==Xt&&0<d.size&&!d.has(q)&&(p=a.l.cb());var u=[],v=null;m=[];for(var x=0;x<g.length;x++){var z=g[x],y=0==x?p:v.endTime;q=l+n+x;Vs(z.g,"EXT-X-DISCONTINUITY")&&k++;var B=t(z.g);for(var A=B.next();!A.done;A=B.next())A=A.value,"EXT-X-KEY"==A.name&&("AES-128"==Qs(A,
|
|
947
|
+
"METHOD")?h=ru(a,A,b,f,e):h=void 0);d.set(q,y);B=Vt(a,b,z.g,f,e);!a.A&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.A=a.i.isLowLatencyMode());if(y=tu(a,B,v,z,y,e,c,f,h))(v=Ws(z.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.i=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.I&&q<a.I||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(D,F){return D+F.duration},0),b=Math.round(m.reduce(function(D,
|
|
948
|
+
F){return D+F.bitrate*F.duration},0)/b*1E3));if(m=u.some(function(D){return null!=D.ca}))for(c={},d=0;d<u.length;c={tc:c.tc,sc:c.sc,hd:c.hd,wb:c.wb,rc:c.rc},d++)if(c.wb=u[d],null==c.wb.ca)for(c.sc=0,c.tc=d,e=function(D){return function(){var F=u[D.tc];if(F){if(null!=F.ca)return F.ca+D.sc;D.sc-=F.endTime-F.startTime;D.tc+=1}return null}}(c),c.rc=0,c.hd=d,f=function(D){return function(){var F=u[D.hd];if(F){F!=D.wb&&(D.rc+=F.endTime-F.startTime);if(null!=F.ca)return F.ca+D.rc;--D.hd}return null}}(c);null==
|
|
949
|
+
c.wb.ca;)c.wb.ca=f(),null==c.wb.ca&&(c.wb.ca=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.ca,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.ca=d,d+=f.endTime-f.startTime;a=a.V;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.tf(a);return{segments:u,bandwidth:b}}
|
|
948
950
|
function bu(a,b){if(a==Dc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function cu(a){return a==Dc?"text/vtt":vu[a].mp4}
|
|
949
|
-
function qu(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,
|
|
950
|
-
Wt(a,v,g,{type:u}),6);case 6:
|
|
951
|
-
function ot(a){var b,c,d,e,f,g;K(function(h){switch(h.g){case 1:if(!a.i)return h.return();sa(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();st(a)&&(d=(c-b)/1E3,a.
|
|
952
|
-
function st(a){return a.ea!=pt}function wt(a,b){a.ea=b;a.l&&a.l.
|
|
951
|
+
function qu(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,x,z,y;return K(function(B){switch(B.g){case 1:g=vf;h=Math.trunc((d.segments.length-1)/2);k=Xs(f(),d.segments[h].h,e);l=new fc(k[0]);m=l.Ga.split(".").pop();n=vu[b];if((q=n[m])||(q=Ut[m])||(q=bu(b,c)))return B.return(q);u=1;v=pf(k,a.g.retryParameters);sa(B,2);v.method="HEAD";return C(B,Wt(a,v,g,{type:u}),4);case 4:x=B.h;p=x.headers["content-type"];ua(B,3);break;case 2:z=va(B);if(!z||1002!=z.code&&1001!=z.code){B.B(3);break}v.method="GET";return C(B,
|
|
952
|
+
Wt(a,v,g,{type:u}),6);case 6:y=B.h,p=y.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(cu(b))}})}function Rt(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function qt(a,b,c){return Wt(a,pf(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
953
|
+
function ot(a){var b,c,d,e,f,g;K(function(h){switch(h.g){case 1:if(!a.i)return h.return();sa(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();st(a)&&(d=(c-b)/1E3,a.jb.sample(1,d),e=a.m,f=Math.max(0,e-Na(a.jb)),a.s.U(f));ua(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.U(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();E(h)}})}
|
|
954
|
+
function st(a){return a.ea!=pt}function wt(a,b){a.ea=b;a.l&&a.l.nc(!st(a));st(a)||a.s.stop()}function Wt(a,b,c,d){if(!a.N)throw new O(2,7,7001);b=a.i.networkingEngine.request(c,b,d);kf(a.N,b);return b.promise}N("shaka.hls.HlsParser",nt);
|
|
953
955
|
var Ut={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},vu={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
954
956
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},gu={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new O(2,4,4041);return yc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Qs(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
955
957
|
b=Qs(a,"URI");b=jt(b);b=hb(b.data);b=yc("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=Qs(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Qs(a,"URI");a=jt(a);a=hb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=mg(a,b,new Set,0);return yc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
|
|
956
|
-
Qs(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?yc("org.w3.clearkey",null):null}},pt="VOD",pu="EVENT",Xt="LIVE",vt={
|
|
958
|
+
Qs(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?yc("org.w3.clearkey",null):null}},pt="VOD",pu="EVENT",Xt="LIVE",vt={zg:pt,oi:pu,xi:Xt};Ah["application/x-mpegurl"]=function(){return new nt};Ah["application/vnd.apple.mpegurl"]=function(){return new nt};function wu(a){var b=0,c=nb(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=hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function xu(a){if(a=yu(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=ng(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
|
|
957
959
|
function yu(a){a=hg(a.textContent);a=wu(a).filter(function(b){return b.type===zu})[0];if(!a)return null;a=Nf(a.value,!0);return(a=Gg(a,"WRMHEADER"))?a:null}var zu=1,Au=(new Map).set("com.microsoft.playready",xu).set("com.microsoft.playready.recommendation",xu).set("com.microsoft.playready.software",xu).set("com.microsoft.playready.hardware",xu);function Bu(a){if(!Cu){Cu=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Du=Eu("ftyp",b,d,b,c);b=Eu("dref",Fu);Gu=Eu("dinf",b)}this.g=a}
|
|
958
960
|
function Hu(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Eu;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Iu+1));m=Math.floor(m%(Iu+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Ju(h,4)),[0,0,0,0],w(Ju(n,4)),w(Ju(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],w(Ju(k,2)),[0,0],w(Ju(l,
|
|
959
961
|
2)),[0,0]));h=Eu("tkhd",h);k=Eu;n=g.duration*g.timescale;l=Math.floor(n/(Iu+1));n=Math.floor(n%(Iu+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Ju(g.timescale,4)),w(Ju(l,4)),w(Ju(n,4)),w(Ju(m,2)),[0,0]));l=Eu("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Ku;break;case "audio":m=Lu}n=Eu("hdlr",m);a:{switch(g.type){case "video":g=Eu("minf",Eu("vmhd",Mu),Gu,Nu(g));break a;
|
|
960
962
|
case "audio":g=Eu("minf",Eu("smhd",Ou),Gu,Nu(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=kg.apply(eg,w(b));f=a.g[0];c=Eu;d=f.duration*f.timescale;e=Math.floor(d/(Iu+1));d=Math.floor(d%(Iu+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Ju(f.timescale,4)),w(Ju(e,4)),w(Ju(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
961
963
|
255]));e=Eu("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(w(Ju(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Eu("trex",k),h.call(g,k);a=kg.apply(eg,w(d));a=Eu("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=kg.apply(eg,w(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Du.byteLength+
|
|
962
964
|
a.byteLength);b.set(Du);b.set(a,Du.byteLength);return b}
|
|
963
|
-
function Nu(a){var b=Eu,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.la.byteLength)var e=Eu("avcC",a.la);else{e=Eu;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.
|
|
964
|
-
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(w(Ju(c,2)),w(Ju(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=new Uint8Array([]);
|
|
965
|
-
a.encrypted&&(
|
|
966
|
-
case "audio":if(a.codecs.includes("mp3"))a=Eu(".mp3",
|
|
967
|
-
64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(w(Ju(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=
|
|
968
|
-
function
|
|
969
|
-
function
|
|
965
|
+
function Nu(a){var b=Eu,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.la.byteLength)var e=Eu("avcC",a.la);else{e=Eu;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Qa.length;n++){var q=Pu(a.Qa[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
966
|
+
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(w(Ju(c,2)),w(Ju(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Qu(a);g=new Uint8Array([]);
|
|
967
|
+
a.encrypted&&(g=Ru(a),d="encv");c=Eu(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.la.byteLength&&(c=Eu("hvcC",a.la)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(w(Ju(d,2)),w(Ju(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Qu(a),g=new Uint8Array([]),a.encrypted&&(g=Ru(a),e="encv"),c=Eu(e,d,
|
|
968
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Eu(".mp3",Su(a));else if(a.codecs.includes("ac-3"))c=Eu("dac3",a.fa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Ru(a),d="enca"),a=Eu(d,Su(a),c,e);else if(a.codecs.includes("ec-3"))c=Eu("dec3",a.fa),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Ru(a),d="enca"),a=Eu(d,Su(a),c,e);else{if(0<a.fa.byteLength)c=Eu("esds",a.fa);else{c=Eu;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=zc("audio",a.codecs.split(","));l=
|
|
969
|
+
{96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(w(Ju(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Ru(a),d="enca");a=Eu(d,Su(a),c,e)}c=a}a=Eu("stsd",Tu,c);return b("stbl",a,Eu("stts",Uu),Eu("stsc",Vu),Eu("stsz",Wu),Eu("stco",Xu))}
|
|
970
|
+
function Qu(a){if(!a.sa&&!a.ua)return new Uint8Array([]);var b=a.ua;a=new Uint8Array([].concat(w(Ju(a.sa,4)),w(Ju(b,4))));return Eu("pasp",a)}function Su(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(w(Ju(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
971
|
+
function Ru(a){var b=Eu;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(w(Ju(d,4))));c=Eu("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Eu("schm",d);e=Eu;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Pu(h.value)}a=new Uint8Array([0,
|
|
970
972
|
0,0,0,0,0,1,8]);f=Eu("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
971
|
-
function
|
|
972
|
-
0;var q=Math.floor(m%(Iu+1));m=new Uint8Array([1,0,0,0].concat(w(Ju(Math.floor(m/(Iu+1)),4)),w(Ju(q,4))));m=Eu("tfdt",m);var p=n;n=c.data?c.data.
|
|
973
|
-
g,k);e.call(d,b,[f,
|
|
974
|
-
function Eu(a){var b=Fa.apply(1,arguments),c
|
|
975
|
-
var Cu=!1,Iu=Math.pow(2,32)-1
|
|
976
|
-
0,0,0,0,0,0,0]),
|
|
977
|
-
function
|
|
978
|
-
r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return sa(c,2),C(c,
|
|
979
|
-
function
|
|
980
|
-
q=wg(m,"DVRWindowLength",Cg);l&&(0===q||isNaN(q))&&(q=Infinity);var p=wg(m,"CanSeek",Eg,!1);0===q&&p&&(q=Infinity);p=null;q&&0<q&&(p=q/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.
|
|
981
|
-
[];for(u=0;u<q.length;u++){var v=q[u],
|
|
982
|
-
z(v);p.push(
|
|
983
|
-
A.push({start:H/
|
|
984
|
-
language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!
|
|
985
|
-
type:"MSS",serviceDescription:null},a.i.
|
|
986
|
-
function
|
|
973
|
+
function Yu(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Eu;var g=new Uint8Array([0,0,0,0].concat(w(Ju(c.data?c.data.fb:0,4))));g=Eu("mfhd",g);var h;var k=c.data?c.data.Na:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ia<<4|m.La<<2|m.Ja}k=Eu("sdtp",l);var n=k.length+92;l=Eu;h=new Uint8Array([0,0,0,58].concat(w(Ju(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Eu("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
974
|
+
0;var q=Math.floor(m%(Iu+1));m=new Uint8Array([1,0,0,0].concat(w(Ju(Math.floor(m/(Iu+1)),4)),w(Ju(q,4))));m=Eu("tfdt",m);var p=n;n=c.data?c.data.Na:[];q=n.length;var u=12+16*q,v=new Uint8Array(u);p+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(w(Ju(q,4)),w(Ju(p,4))),0);for(p=0;p<q;p++){var x=n[p];u=Ju(x.duration,4);var z=Ju(x.size,4),y=x.flags;x=Ju(x.Sa,4);v.set([].concat(w(u),w(z),[y.Ta<<2|y.Ia,y.La<<6|y.Ja<<4|y.Ua,y.Ha&61440,y.Ha&15],w(x)),12+16*p)}n=Eu("trun",v);k=l("traf",h,m,n,k);f=f("moof",
|
|
975
|
+
g,k);e.call(d,b,[f,Zu(c)])}return kg.apply(eg,w(b))}function Zu(a){a=(a.data?a.data.Na:[]).map(function(b){return b.data});a=kg.apply(eg,w(a));return Eu("mdat",a)}function Ju(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Pu(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
976
|
+
function Eu(a){var b=Fa.apply(1,arguments),c=$u[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],$u[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
977
|
+
var Cu=!1,Iu=Math.pow(2,32)-1,$u={},Ku=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Lu=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Uu=new Uint8Array([0,0,0,0,0,0,0,0]),Vu=new Uint8Array([0,0,0,0,0,0,0,0]),Xu=new Uint8Array([0,0,0,0,0,0,0,0]),Wu=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Mu=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ou=new Uint8Array([0,
|
|
978
|
+
0,0,0,0,0,0,0]),Tu=new Uint8Array([0,0,0,0,0,0,0,1]),Du=new Uint8Array([]),Fu=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Gu=new Uint8Array([]);function av(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.A=new Ma(5);this.o=new qd(function(){bv(a)});this.u=new jf;this.m=new Map}r=av.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return K(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,cv(c),2);if(!c.h)throw new O(2,7,7001);return d.return(c.j)})};
|
|
979
|
+
function bv(a){var b;K(function(c){switch(c.g){case 1:return sa(c,2),C(c,cv(a),4);case 4:ua(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();E(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.u.destroy()};
|
|
980
|
+
r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return sa(c,2),C(c,cv(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);E(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
|
|
981
|
+
function cv(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=pf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),kf(a.u,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=Ig(f.data,"SmoothStreamingMedia");if(!m)throw new O(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new ij(null,0));if(l=wg(m,"IsLive",Eg,!1))throw new O(2,4,4047);a.i.nc(!l);var n=wg(m,"TimeScale",Cg,1E7),
|
|
982
|
+
q=wg(m,"DVRWindowLength",Cg);l&&(0===q||isNaN(q))&&(q=Infinity);var p=wg(m,"CanSeek",Eg,!1);0===q&&p&&(q=Infinity);p=null;q&&0<q&&(p=q/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.Wd(p);q=wg(m,"Duration",Cg,Infinity);l||a.i.Oa(q/n);l={variants:[],textStreams:[],timescale:n,duration:q/n};p=og(m,"Protection");var u;n=a.g.mss.keySystemsBySystemId;q=[];p=t(p);for(u=p.next();!u.done;u=p.next())q=q.concat(og(u.value,"ProtectionHeader"));if(q.length){p=
|
|
983
|
+
[];for(u=0;u<q.length;u++){var v=q[u],x=v.getAttribute("SystemID").toLowerCase(),z=n[x];if(z){var y=yu(v);if(y)a:{y=t(y.getElementsByTagName("DATA"));for(var B=y.next();!B.done;B=y.next())if(B=ng(B.value,"KID")){y=hg(B.textContent);y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],y[4],y[7],y[6]].concat(w(y.slice(8))));y=jg(y);break a}y=null}else y=null;B=hg(v.textContent);x=ig(x.replace(/-/g,""));x=[{initData:mg(B,x,new Set,0),initDataType:"cenc",keyId:y}];x=yc(z,x);y&&x.keyIds.add(y);if(z=Au.get(z))x.licenseServerUri=
|
|
984
|
+
z(v);p.push(x)}}n=p}else n=[];u=n;p=[];n=[];q=[];m=og(m,"StreamIndex");m=t(m);for(v=m.next();!v.done;v=m.next()){v=v.value;z=og(v,"QualityLevel");x=l.timescale;y=l.duration;B=og(v,"c");for(var A=[],D=0,F=0;F<B.length;++F){var J=B[F],G=B[F+1],H=wg(J,"t",Cg),I=wg(J,"d",Cg);J=wg(J,"r",Ag);if(!I)break;H=null!=H?H:D;J=J||0;if(0>J)if(G){G=wg(G,"t",Cg);if(null==G)break;else if(H>=G)break;J=Math.ceil((G-H)/I)-1}else{if(Infinity==y)break;else if(H/x>=y)break;J=Math.ceil((y*x-H)/I)-1}for(G=0;G<=J;++G)D=H+I,
|
|
985
|
+
A.push({start:H/x,end:D/x,zf:H}),H=D}x=A;z=t(z);for(y=z.next();!y.done;y=z.next())(y=dv(a,v,y.value,x,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Dc||a.g.disableText||q.push(y):n.push(y):p.push(y))}m=[];p=t(0<p.length?p:[null]);for(u=p.next();!u.done;u=p.next())for(u=u.value,v=t(0<n.length?n:[null]),y=v.next();!y.done;y=v.next())z=m,x=z.push,y=y.value,B=0,u&&u.bandwidth&&0<u.bandwidth&&(B+=u.bandwidth),y&&y.bandwidth&&0<y.bandwidth&&(B+=y.bandwidth),y={id:a.s++,
|
|
986
|
+
language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!y&&y.primary,audio:u,video:y,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},x.call(z,y);l.variants=m;l.textStreams=q;a.j?(a.j.variants=l.variants,a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,
|
|
987
|
+
type:"MSS",serviceDescription:null},a.i.Md());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.A.sample(1,h);E(k)})}
|
|
988
|
+
function dv(a,b,c,d,e,f){var g=b.getAttribute("Type");if("audio"!==g&&"video"!==g&&"text"!==g)return Sa("Ignoring unrecognized type:",g),null;var h=b.getAttribute("Language"),k=a.s++,l=wg(c,"Bitrate",Bg),m=wg(c,"MaxWidth",Bg),n=wg(c,"MaxHeight",Bg),q=wg(c,"Channels",Bg),p=wg(c,"SamplingRate",Bg),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Oa(Math.min(u,v));var x={id:k,originalId:b.getAttribute("Name")||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
987
989
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:dd(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],
|
|
988
|
-
mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1};if(e=b.getAttribute("Subtype"))(e=
|
|
989
|
-
e),null;c=
|
|
990
|
-
if(a.m.has(
|
|
991
|
-
(
|
|
992
|
-
function
|
|
993
|
-
b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function
|
|
994
|
-
function
|
|
995
|
-
Ah["application/vnd.ms-sstr+xml"]=function(){return new
|
|
996
|
-
function
|
|
997
|
-
J.value.byteLength;if(!g){H.B(5);break}return C(H,g(J.value),5);case 5:G=Date.now();if(100<G-p||J.done)e(G-p,n-q,
|
|
998
|
-
function
|
|
999
|
-
|
|
1000
|
-
function
|
|
990
|
+
mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1};if(e=b.getAttribute("Subtype"))(e=ev[e])&&x.roles.push(e),"main"===e&&(x.primary=!0);e=c.getAttribute("FourCC");if(null===e||""===e)e=b.getAttribute("FourCC");if(!e)if("audio"===g)e="AAC";else if("video"===g)return Sa('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!fv.includes(e.toUpperCase()))return Sa("Codec not supported:",
|
|
991
|
+
e),null;c=gv(c,g,e,x);x.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Sa("Quality unsupported without CodecPrivateData",g),null;x.type="audio";x.mimeType="mss/audio/mp4";x.codecs=hv(e,c);break;case "video":if(!c)return Sa("Quality unsupported without CodecPrivateData",g),null;x.type="video";x.mimeType="mss/video/mp4";x.codecs=iv(c);break;case "text":if(x.type=Dc,x.mimeType="application/mp4","TTML"===e||"DFXP"===e)x.codecs="stpp"}x.createSegmentIndex=function(){if(x.segmentIndex)return Promise.resolve();
|
|
992
|
+
if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:x.id,type:x.type,codecs:x.codecs,encrypted:x.encrypted,timescale:x.mssPrivateData.timescale,duration:x.mssPrivateData.duration,Qa:z,fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:null,stream:x},z=Hu(new Bu([z])),a.m.set(x.id,z);z=jv(a,new Fh(function(){return[]},0,null,null,void 0,z),x,b,d);x.segmentIndex=new Ej(z);return Promise.resolve()};x.closeSegmentIndex=
|
|
993
|
+
function(){x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null)};return x}
|
|
994
|
+
function gv(a,b,c,d){if(a=a.getAttribute("CodecPrivateData"))return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|
|
|
995
|
+
b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function hv(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function iv(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
996
|
+
function jv(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={zc:g.zc},h=e.next())g.zc=h.value,d.push(new S(g.zc.start,g.zc.end,function(k){return function(){return xc(a.l,[f.replace("{start time}",String(k.zc.zf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}N("shaka.mss.MssParser",av);var fv="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),ev={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
997
|
+
Ah["application/vnd.ms-sstr+xml"]=function(){return new av};function kv(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Pf(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function lv(){}function mv(a,b,c,d,e){var f=new nv;Hf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ov,h={Ff:!1,tg:!1};a=pv(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 Ze(a,function(){h.Ff=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new qd(function(){h.tg=!0;g.abort()});k.U(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
998
|
+
function pv(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:return h=qv,k=rv,q=n=0,p=Date.now(),sa(A,2),C(A,h(a,c),4);case 4:l=A.h;f(sv(l.headers));if("HEAD"==c.method){A.B(5);break}u=l.clone().body.getReader();x=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;z=function(D){function F(){var J,G;return K(function(H){switch(H.g){case 1:return sa(H,2),C(H,u.read(),4);case 4:J=H.h;ua(H,3);break;case 2:return va(H),H.return();case 3:if(J.done){H.B(5);break}n+=
|
|
999
|
+
J.value.byteLength;if(!g){H.B(5);break}return C(H,g(J.value),5);case 5:G=Date.now();if(100<G-p||J.done)e(G-p,n-q,x-n),q=n,p=G;J.done?D.close():(D.enqueue(J.value),F());E(H)}})}F()};new k({start:z});return C(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ua(A,3);break;case 2:y=va(A);if(d.Ff)throw new O(1,1,7001,a,b);if(d.tg)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,y,b);case 3:return B=sv(l.headers),A.return(kv(B,m,l.status,a,l.url,b))}})}
|
|
1000
|
+
function sv(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function tv(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",lv);lv.isSupported=tv;lv.parse=mv;var qv=window.fetch,ov=window.AbortController,rv=window.ReadableStream,nv=window.Headers;
|
|
1001
|
+
tv()&&(mf("http",mv,2,!0),mf("https",mv,2,!0),mf("blob",mv,2,!0));function uv(){}
|
|
1002
|
+
function vv(a,b,c,d,e){var f=new wv,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new O(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=xv(f);e(p);n=!0}};f.onload=function(){var p=xv(f),u=f.response;try{var v=kv(p,u,f.status,a,f.responseURL,c);l(v)}catch(x){m(x)}};f.onerror=function(p){m(new O(1,1,1002,a,p,
|
|
1001
1003
|
c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(p){var u=Date.now();if(100<u-g||p.lengthComputable&&p.loaded==p.total)d(u-g,p.loaded-h,p.total-p.loaded),h=p.loaded,g=u};for(var q in b.headers)f.setRequestHeader(q.toLowerCase(),b.headers[q]);f.send(b.body)});return new Ze(k,function(){f.abort();return Promise.resolve()})}
|
|
1002
|
-
function
|
|
1003
|
-
function
|
|
1004
|
-
function
|
|
1005
|
-
function
|
|
1006
|
-
r.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
1007
|
-
r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return C(d,
|
|
1008
|
-
function
|
|
1009
|
-
function
|
|
1010
|
-
function
|
|
1011
|
-
|
|
1012
|
-
function
|
|
1013
|
-
function
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1016
|
-
function
|
|
1017
|
-
function
|
|
1018
|
-
|
|
1019
|
-
function
|
|
1020
|
-
function
|
|
1021
|
-
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function
|
|
1022
|
-
|
|
1004
|
+
function xv(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}N("shaka.net.HttpXHRPlugin",uv);uv.parse=vv;var wv=window.XMLHttpRequest;mf("http",vv,1,!0);mf("https",vv,1,!0);mf("blob",vv,1,!0);function yv(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function zv(a){return a.Z().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Pa+":"+a.wa}function Av(a,b){return ek(a.g.Z(),a.g.Pa,a.g.wa,b.streaming.retryParameters)};function Bv(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Cv(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Bv.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 Dv(a){var b=this;this.o=a;this.j=new Map;this.i=new xf(function(){return Ev(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Bv}Dv.prototype.destroy=function(){return this.i.destroy()};function Fv(a,b,c){a.m=b;a.l=c}function Ev(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1005
|
+
function Gv(a,b,c,d,e,f){yf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,p;return K(function(u){if(1==u.g)return C(u,Hv(a,c),2);h=u.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=hb(h),l=new lg(k),l.data)n=Number(m),q=l.data[n],p=l.g[n],a.l(q,p);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Iv(a){return K(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1006
|
+
function Hv(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=vf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;tb(a.h,e);return g.return(f.data)})};function Jv(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Ye;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Jv.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}sa(b,2);return C(b,a.g,4)}if(2!=b.g)return ua(b,0);va(b);E(b)})};
|
|
1007
|
+
function Kv(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 C(g,b(f.key,f.value,f),2)}f.continue();E(g)})}})}Jv.prototype.store=function(){return this.h};Jv.prototype.promise=function(){return this.g};function Lv(a){this.h=a;this.g=[]}Lv.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Mv(a,b){return Nv(a,b,"readwrite")}function Nv(a,b,c){c=a.h.transaction([b],c);var d=new Jv(c,b);a.g.push(d);d.promise().then(function(){tb(a.g,d)},function(){tb(a.g,d)});return d};function Ov(a,b,c){this.h=new Lv(a);this.i=b;this.g=c}r=Ov.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Pv(this.i)};r.removeSegments=function(a,b){return Qv(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return C(d,Rv(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Hf(e)}))})};r.addManifests=function(){return Pv(this.g)};
|
|
1008
|
+
r.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function Sv(a,b,c){a=Mv(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=Mv(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 Qv(this,this.g,a,b)};
|
|
1009
|
+
r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return C(d,Rv(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Kc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Nv(a.h,a.g,"readonly"),c=new Map,C(d,Kv(b,function(e,f){var g;return K(function(h){if(1==h.g)return C(h,a.Kc(f),2);g=h.h;c.set(e,g);E(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};r.Hf=function(a){return a};r.Kc=function(a){return Promise.resolve(a)};
|
|
1010
|
+
function Pv(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Mv(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={nd:g.nd},k=h.next())l=k.value,g.nd=e.add(l),g.nd.onsuccess=function(n){return function(){f.push(n.nd.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
|
|
1011
|
+
function Qv(a,b,c,d){a=Mv(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={ld:e.ld},f=c.next())e.ld=f.value,b.delete(e.ld).onsuccess=function(g){return function(){return d(g.ld)}}(e);return a.promise()}
|
|
1012
|
+
function Rv(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Nv(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={xc:h.xc,vc:h.vc},l=k.next())h.vc=l.value,h.xc=e.get(h.vc),h.xc.onsuccess=function(n){return function(){void 0==n.xc.result&&g.push(n.vc);f[n.vc]=n.xc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Tv(a){this.g=new Lv(a)}Tv.prototype.destroy=function(){return this.g.destroy()};Tv.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Nv(a.g,"session-ids","readonly"),c=[],C(d,Kv(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};Tv.prototype.add=function(a){var b=Mv(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
1013
|
+
Tv.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Mv(b.g,"session-ids"),C(d,Kv(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function Uv(){this.g=new Map}Uv.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)};Uv.prototype.init=function(){var a=this;Vv.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
1014
|
+
function Wv(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Va:d,va:f},va:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function Xv(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Va:d,va:f},e)})})}
|
|
1015
|
+
function Yv(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function Zv(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function $v(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1016
|
+
function aw(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=Vv,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function bw(a,b){Vv.set(a,b)}N("shaka.offline.StorageMuxer",Uv);Uv.unregister=function(a){Vv.delete(a)};Uv.register=bw;Uv.prototype.destroy=Uv.prototype.destroy;var Vv=new Map;function cw(){Ov.apply(this,arguments)}oa(cw,Ov);cw.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Mv(c.h,c.g);e=d.store();f=new Ye;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return C(g,Promise.all([d.promise(),f]),0)})};
|
|
1017
|
+
cw.prototype.Kc=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=dw(a.periods[c],e),b.push(f);return C(h,Pr(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})})};
|
|
1018
|
+
function dw(a,b){ew(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return fw(e,a.startTime,b)})}
|
|
1019
|
+
function fw(a,b,c){var d=a.initSegmentUri?gw(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1020
|
+
gw(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}cw.prototype.Hf=function(a){return{data:a.data}};
|
|
1021
|
+
function gw(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new O(2,9,9004,"Could not parse uri "+a);}
|
|
1022
|
+
function ew(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
1023
|
+
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function hw(){Ov.apply(this,arguments)}oa(hw,Ov);
|
|
1024
|
+
hw.prototype.Kc=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;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(iw(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,Pr(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1023
1025
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1024
|
-
function
|
|
1025
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function
|
|
1026
|
-
r.init=function(){var a=this,b=new Ye,c=!1,d=new qd(function(){c=!0;b.reject(new O(2,9,9017))});d.U(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new
|
|
1027
|
-
new
|
|
1026
|
+
function iw(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1027
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function jw(){Ov.apply(this,arguments)}oa(jw,Ov);r=jw.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 Sv(this,a,b)};r.Kc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function kw(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=kw.prototype;
|
|
1028
|
+
r.init=function(){var a=this,b=new Ye,c=!1,d=new qd(function(){c=!0;b.reject(new O(2,9,9017))});d.U(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new cw(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new hw(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1029
|
+
new hw(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new jw(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Tv(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new O(2,
|
|
1028
1030
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),E(b)}})};
|
|
1029
1031
|
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};
|
|
1030
|
-
r.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,
|
|
1031
|
-
function
|
|
1032
|
-
function
|
|
1033
|
-
function
|
|
1032
|
+
r.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,lw(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
|
|
1033
|
+
function lw(){var a=new Ye,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}bw("idb",function(){return Bd()||vd()||!window.indexedDB?null:new kw});function mw(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}mw.prototype.Va=function(){return this.i};mw.prototype.va=function(){return this.h};mw.prototype.key=function(){return this.l};mw.prototype.toString=function(){return this.j};
|
|
1034
|
+
function nw(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 mw(b,c,d,Number(a[4])):null};function ow(a,b){this.h=a;this.g=b}
|
|
1035
|
+
function pw(a,b){var c=new ij(null,0);c.Oa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=qw(a,d,e,c);e=b.streams.filter(function(l){return l.type==Dc}).map(function(l){return rw(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return rw(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=
|
|
1034
1036
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null}}
|
|
1035
|
-
function
|
|
1036
|
-
b.next())for(e=e.value,g=
|
|
1037
|
-
function
|
|
1037
|
+
function qw(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=
|
|
1038
|
+
b.next())for(e=e.value,g=rw(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=rw(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}
|
|
1039
|
+
function rw(a,b,c){var d=b.segments.map(function(e){return sw(a,e)});c.Xc(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ej(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1038
1040
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching}}
|
|
1039
|
-
function
|
|
1040
|
-
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=
|
|
1041
|
+
function sw(a,b){var c=new mw("segment",a.h,a.g,b.dataKey);return new S(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?tw(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}function tw(a,b){var c=new mw("segment",a.h,a.g,b);return new Fh(function(){return[c.toString()]},0,null)};function uw(){this.g=null}r=uw.prototype;r.configure=function(){};
|
|
1042
|
+
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=nw(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new Uv;ta(m,2);return C(m,e.init(),4);case 4:return C(m,Yv(e,d.Va(),d.va()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new ow(d.Va(),d.va()),l=pw(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),C(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
1041
1043
|
r.update=function(){};
|
|
1042
|
-
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
|
|
1043
|
-
r.onInitialVariantChosen=function(){};r.banLocation=function(){};Ah["application/x-offline-manifest"]=function(){return new
|
|
1044
|
-
function
|
|
1045
|
-
function
|
|
1046
|
-
h.g)return sa(h,2),C(h,ch(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);E(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function
|
|
1047
|
-
function
|
|
1048
|
-
case 4:b.h=null,b.g=null,E(k)}})})}function
|
|
1049
|
-
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
1050
|
-
function
|
|
1051
|
-
q,b,c,e,f),v=u.
|
|
1052
|
-
|
|
1053
|
-
function
|
|
1054
|
-
|
|
1055
|
-
va(B),
|
|
1056
|
-
function
|
|
1057
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(z,a.updateManifest(b,c),4);case 4:g=!0;f();ua(z,0);break;case 2:return v=va(z),C(z,
|
|
1058
|
-
function
|
|
1059
|
-
for(v=u.next();!v.done;v=u.next())
|
|
1060
|
-
|
|
1061
|
-
function
|
|
1062
|
-
q&&n&&(q.initData=[]);return{
|
|
1063
|
-
function
|
|
1064
|
-
function
|
|
1065
|
-
function
|
|
1066
|
-
function
|
|
1067
|
-
function
|
|
1068
|
-
r.list=function(){return
|
|
1069
|
-
function
|
|
1070
|
-
c.configure(d.manifest),
|
|
1071
|
-
function
|
|
1072
|
-
function
|
|
1073
|
-
spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;
|
|
1074
|
-
endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function
|
|
1075
|
-
function
|
|
1076
|
-
function
|
|
1077
|
-
function
|
|
1078
|
-
function
|
|
1079
|
-
|
|
1080
|
-
var
|
|
1081
|
-
yn.offline=
|
|
1082
|
-
function
|
|
1083
|
-
function
|
|
1084
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
1085
|
-
function
|
|
1086
|
-
function
|
|
1044
|
+
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 Uv,sa(m,2,3),C(m,e.init(),5);case 5:return C(m,Yv(e,d.Va(),d.va()),6);case 6:return f=m.h,C(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.B(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),C(m,e.destroy(),10);case 10:ya(m,0);break;case 2:va(m),m.B(3)}})};
|
|
1045
|
+
r.onInitialVariantChosen=function(){};r.banLocation=function(){};Ah["application/x-offline-manifest"]=function(){return new uw};function vw(){}function ww(a){var b=nw(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=bf(a)):a=b&&"segment"==b.g?xw(b.key(),b):$e(new O(2,1,9004,a));return a}
|
|
1046
|
+
function xw(a,b){var c=new Uv;return bf(void 0).pa(function(){return c.init()}).pa(function(){return Yv(c,b.Va(),b.va())}).pa(function(d){return d.getSegments([b.key()])}).pa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}N("shaka.offline.OfflineScheme",vw);vw.plugin=ww;mf("offline",ww);function yw(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),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,zw(v.info,q)){v.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Aw(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
|
|
1047
|
+
function Aw(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new Jg({Tb:b,onError:function(){},Td:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),sa(f,2),d.configure(a),C(f,Rg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==
|
|
1048
|
+
h.g)return sa(h,2),C(h,ch(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);E(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function zw(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ub(a.audioCapabilities,b.audioCapabilities,c)&&ub(a.videoCapabilities,b.videoCapabilities,c)};function Bw(a,b,c){var d=b.presentationTimeline.getDuration();b=Cw(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Dw(a,b){var c=pw(new ow(a.Va(),a.va()),b),d=b.appMetadata||{};c=Cw(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}}
|
|
1049
|
+
function Cw(a){var b=[],c=oe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(fe(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ge(c.value));return b};function Ew(){this.g={}}function Fw(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 Gw(a,b){a.g[b.id]=b.bandwidth||2048}function Hw(a,b){a=a.g[b];null==a&&(a=0);return a};function Iw(a){var b=this;if(a&&a.constructor!=W)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Nb()):(this.h=Pl(),this.g=new lf);this.i=[];this.j=[];var c=!a;this.l=new xf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return Ev(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 C(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return C(k,b.g.destroy(),4);
|
|
1050
|
+
case 4:b.h=null,b.g=null,E(k)}})})}function Jw(){if(rd())a:{var a=t(Vv.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=Iw.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Fl(a,b));return Rl(this.h,a)};r.getConfiguration=function(){var a=Pl();Rl(a,this.h,Pl());return a};r.Nb=function(){return this.g};
|
|
1051
|
+
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Dv(this.g);this.j.push(f);b=Kw(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.B(2):C(h,Mk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=zh(a,c||null);return h.return(g())})},e,f);b=new Ze(b,function(){return Ev(f)});b.finally(function(){tb(d.j,f)});return Lw(this,b)};
|
|
1052
|
+
function Kw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:return Mw(),h=g=null,k=new Uv,n=m=l=null,sa(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Nw(a,b,g,e),6);case 6:q=A.h;Ow(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.Rb();if(!p)throw new O(2,9,9005,b);return C(A,Pw(a,q,function(D){n=n||D},e),7);case 7:h=A.h;Ow(a);if(n)throw n;return C(A,Qw(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Ow(a),C(A,Wv(k),10);case 10:return l=A.h,Ow(a),u=Rw(h,
|
|
1053
|
+
q,b,c,e,f),v=u.Ah,x=u.vf,C(A,l.va.addManifests([v]),11);case 11:z=A.h;Ow(a);m=z[0];Ow(a);if(n)throw n;return C(A,Sw(a,x,m,v,f,e,l.va,q,h),12);case 12:return Ow(a),Tw(q,v,h,e),C(A,l.va.updateManifest(m,v),13);case 13:return Ow(a),y=new mw("manifest",l.path.Va,l.path.va,m),A.return(Dw(y,v));case 3:return wa(A),C(A,k.destroy(),14);case 14:if(!g){A.B(15);break}return C(A,g.stop(),15);case 15:if(!h){A.B(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.B(19);break}return C(A,
|
|
1054
|
+
Uw(m),19);case 19:throw n||B;}})}
|
|
1055
|
+
function Sw(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,v,x,z,y;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var F,J,G,H,I,L,M;return K(function(P){if(1==P.g){F={};J=t(A);for(G=J.next();!G.done;F={Hb:F.Hb},G=J.next())F.Hb=G.value,H=Av(F.Hb,f),I=F.Hb.i,L=F.Hb.h,M=function(V){return function(X){var ba,R,Oa;return K(function(ab){if(1==ab.g)return C(ab,g.addSegments([{data:X}]),2);ba=ab.h;Ow(a);R=V.Hb.g;Oa=zv(R);l[Oa]=ba[0];m+=X.byteLength;E(ab)})}}(F),Gv(e,F.Hb.groupId,H,I,L,M);return C(P,
|
|
1056
|
+
Iv(e),2)}if(!D)return P.B(0);Ow(a);Tw(h,d,k,f);return C(P,g.updateManifest(c,d),0)})};q=!1;sa(B,2);if(!Vw(h)||!q||Ww(h)){B.B(4);break}return C(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return Ow(a),b=b.filter(function(A){return!A.h}),p=l,u=m,l={},m=0,C(B,Xw(g,c,d,p,u,function(){return Ow(a)}),6);case 6:Ow(a);case 4:if(q){B.B(7);break}return C(B,n(b,!1),8);case 8:return Ow(a),v=l,x=m,l={},m=0,C(B,Xw(g,c,d,v,x,function(){return Ow(a)}),9);case 9:Ow(a);case 7:ua(B,0);break;case 2:return z=
|
|
1057
|
+
va(B),y=Object.values(l),C(B,g.removeSegments(y,function(){}),10);case 10:throw z;}})}function Uw(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Uv,C(f,b.init(),2);case 2:return C(f,Wv(b),3);case 3:return c=f.h,d=new mw("manifest",c.path.Va,c.path.va,a),C(f,b.destroy(),4);case 4:return e=new Iw,C(f,e.remove(d.toString()),0)}})}
|
|
1058
|
+
function Xw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,x;return K(function(z){switch(z.g){case 1:g=!1;sa(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())p=q.value,u=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=u&&(p.dataKey=u,p.pendingSegmentRefId=void 0),u=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=u&&(p.initSegmentKey=u,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
|
|
1059
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(z,a.updateManifest(b,c),4);case 4:g=!0;f();ua(z,0);break;case 2:return v=va(z),C(z,Uw(b),5);case 5:if(g){z.B(6);break}x=Object.values(d);return C(z,a.removeSegments(x,function(){}),6);case 6:throw v;}})}
|
|
1060
|
+
function Qw(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V;return K(function(X){switch(X.g){case 1:return d={width:Infinity,height:Infinity},Od(a,c.restrictions,d),C(X,Rd(b,a,c.offline.usePersistentLicense),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Md(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(fe(m));n=t(a.textStreams);for(q=n.next();!q.done;q=n.next())p=q.value,e.push(ge(p));u=t(a.imageStreams);
|
|
1061
|
+
for(v=u.next();!v.done;v=u.next())x=v.value,e.push(he(x));return C(X,c.offline.trackSelectionCallback(e),3);case 3:z=X.h;y=a.presentationTimeline.getDuration();B=0;A=t(z);for(D=A.next();!D.done;D=A.next())F=D.value,J=F.bandwidth*y/8,B+=J;sa(X,4);return C(X,c.offline.downloadSizeCallback(B),6);case 6:G=X.h;if(!G)throw new O(2,9,9014);ua(X,5);break;case 4:H=va(X);if(H instanceof O)throw H;throw new O(2,9,9015);case 5:I=new Set;L=new Set;M=new Set;P=t(z);for(D=P.next();!D.done;D=P.next())V=D.value,"variant"==
|
|
1062
|
+
V.type&&I.add(V.id),"text"==V.type&&L.add(V.id),"image"==V.type&&M.add(V.id);a.variants=a.variants.filter(function(ba){return I.has(ba.id)});a.textStreams=a.textStreams.filter(function(ba){return L.has(ba.id)});a.imageStreams=a.imageStreams.filter(function(ba){return M.has(ba.id)});Yw(a);E(X)}})}
|
|
1063
|
+
function Rw(a,b,c,d,e,f){var g=Bw(c,b,d),h=e.offline.progressCallback;Fv(f,function(p,u){g.size=u;h(g,p)},function(p,u){k&&e.offline.usePersistentLicense&&l==u&&Zg(a,"cenc",p)});var k=Vw(b)&&!Ww(b),l=null;k&&(l=Zw.get(a.g.keySystem));for(var m=new Ew,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())Gw(m,q.value);q=t(b.variants);for(n=q.next();!n.done;n=q.next())Fw(m,n.value);m=$w(f,m,b,e);f=m.streams;m=m.vf;q=a.g;n=e.offline.usePersistentLicense;
|
|
1064
|
+
q&&n&&(q.initData=[]);return{Ah:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Pc(),streams:f,sessionIds:n?ih(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},vf:m}}function Vw(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1065
|
+
function Ww(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 Tw(a,b,c,d){b.expiration=c.Pc();c=ih(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Vw(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}r.remove=function(a){return ax(this,bx(this,a))};
|
|
1066
|
+
function bx(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Mw();c=nw(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new Uv;ta(k,2);return C(k,e.init(),4);case 4:return C(k,Yv(e,d.Va(),d.va()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([cx(a,h,e),dx(f,d,h)]),2);case 2:return wa(k),C(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
1067
|
+
function ex(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Gc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Gc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function cx(a,b,c){return K(function(d){return C(d,fx(a.g,a.h.drm,c,b),0)})}
|
|
1068
|
+
function dx(a,b,c){function d(){}var e=gx(c);Dw(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Oh=function(){return ax(this,hx(this))};
|
|
1069
|
+
function hx(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return Mw(),b=a.g,c=a.h.drm,d=new Uv,e=!1,ta(n,2),C(n,d.init(),4);case 4:f=[],Zv(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,yw(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return wa(n),C(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
|
|
1070
|
+
r.list=function(){return ax(this,ix())};function ix(){var a,b,c;return K(function(d){switch(d.g){case 1:return Mw(),a=[],b=new Uv,ta(d,2),C(d,b.init(),4);case 4:return c=Promise.resolve(),Xv(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Dw(new mw("manifest",e.Va,e.va,l),k);a.push(k)});E(h)})})}),C(d,c,2);case 2:return wa(d),C(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
|
|
1071
|
+
function Nw(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,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
|
|
1072
|
+
c.configure(d.manifest),Ow(a),C(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ow(a),k=jx(h),C(l,Promise.all(Ef(k,function(m){return m.createSegmentIndex()})),3);Ow(a);if(e)throw e;return l.return(h)})}function Pw(a,b,c,d){var e;return K(function(f){return 1==f.g?(e=new Jg({Tb:a.g,onError:c,Td:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),C(f,Og(e,b.variants,d.offline.usePersistentLicense),2)):3!=f.g?C(f,ah(e),3):f.return(e)})}
|
|
1073
|
+
function $w(a,b,c,d){var e=new Map,f=jx(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=kx(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()),vf:Array.from(e.values())}}
|
|
1074
|
+
function kx(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,
|
|
1075
|
+
spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;lx(d,c.presentationTimeline.cb(),function(l){var m=zv(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=Hw(b,d.id)*q;q=Cv(a.g,q);f.set(m,new yv(l,q,k,!1))}l.aa&&(n=zv(l.aa),f.has(n)||(q=.5*Hw(b,d.id),q=Cv(a.g,q),f.set(n,new yv(l.aa,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
|
|
1076
|
+
endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function lx(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 Ow(a){if(a.l.g)throw new O(2,9,7001);}function Mw(){if(!Jw())throw new O(2,9,9E3);}
|
|
1077
|
+
function ax(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ta(c,2),C(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);tb(a.i,b);return ya(c,0)})}function Lw(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){tb(a.i,c)})}function gx(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)}
|
|
1078
|
+
function fx(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=$v(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:ex(d,!1),videoCapabilities:ex(d,!0)}});return C(h,yw(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1079
|
+
function jx(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
1080
|
+
function Yw(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}N("shaka.offline.Storage",Iw);Iw.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new Uv,ta(b,2),C(b,aw(a),2)):5!=b.g?(wa(b),C(b,a.destroy(),5)):ya(b,0)})};
|
|
1081
|
+
Iw.prototype.list=Iw.prototype.list;Iw.prototype.removeEmeSessions=Iw.prototype.Oh;Iw.prototype.remove=Iw.prototype.remove;Iw.prototype.store=Iw.prototype.store;Iw.prototype.getNetworkingEngine=Iw.prototype.Nb;Iw.prototype.getConfiguration=Iw.prototype.getConfiguration;Iw.prototype.configure=Iw.prototype.configure;Iw.prototype.destroy=Iw.prototype.destroy;Iw.support=Jw;
|
|
1082
|
+
var Zw=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
1083
|
+
yn.offline=Jw;function mx(){}function nx(a,b){a={priority:b||0,callback:a};for(b=0;b<ox.length;b++)if(ox[b].priority<a.priority){ox.splice(b,0,a);return}ox.push(a)}N("shaka.polyfill",mx);mx.register=nx;mx.installAll=function(){for(var a=t(ox),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Sa("Error installing polyfill!",c)}}};var ox=[];function px(){this.g=new qx}function rx(){window.AbortController||(window.AbortController=px,window.AbortSignal=qx)}px.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new Q("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};ea.Object.defineProperties(px.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});mx.AbortController=px;px.install=rx;
|
|
1084
|
+
function qx(){hf.call(this);this.h=!1;this.g=void 0;this.onabort=null}oa(qx,hf);ea.Object.defineProperties(qx.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});nx(rx);function sx(){}function tx(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())ux(b.value)}function ux(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)}})}mx.Aria=sx;sx.install=tx;nx(tx);function vx(){}function wx(){xx()}mx.EncryptionScheme=vx;vx.install=wx;nx(wx,-2);function yx(){}
|
|
1085
|
+
function zx(){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}}),
|
|
1086
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ax);document.addEventListener("webkitfullscreenerror",Ax);document.addEventListener("mozfullscreenchange",Ax);document.addEventListener("mozfullscreenerror",Ax);document.addEventListener("MSFullscreenChange",Ax);document.addEventListener("MSFullscreenError",Ax)}}
|
|
1087
|
+
function Ax(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)}mx.Fullscreen=yx;yx.install=zx;nx(zx);function Bx(){}function Cx(){var a=!0;if(Cd()||wd("PlayStation 5")||Dd()||wd("Web0S")||xd()||Bd()||wd("PC=EOS")||wd("Hisense")||wd("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Dx=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Ex)}
|
|
1088
|
+
function Ex(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!rd())return A.return(b);if(c){if(Bd())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var D=c.contentType;c.width&&c.height&&(D+="; width="+c.width+"; height="+c.height);c.framerate&&(D+="; framerate="+c.framerate);"pq"===c.transferFunction&&
|
|
1087
1089
|
(D+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(D)}else e=Za(c.contentType);else xd()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=Za(f)):e=Za(c.contentType);if(!e)return A.return(b)}if(d&&(Bd()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=Za(h)):g=Za(d.contentType),!g))return A.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=sd(k),
|
|
1088
|
-
!l)||d&&(m=d.contentType,n=sd(m),!n))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));q=a.keySystemConfiguration;p=[];u=[];q.audio&&(v={robustness:q.audio.robustness||"",contentType:a.audio.contentType},p.push(v));q.video&&(
|
|
1089
|
-
p.length&&(z.audioCapabilities=p);u.length&&(z.videoCapabilities=u);
|
|
1090
|
-
|
|
1091
|
-
function
|
|
1092
|
-
function
|
|
1093
|
-
function
|
|
1094
|
-
function
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
function
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
function
|
|
1090
|
+
!l)||d&&(m=d.contentType,n=sd(m),!n))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));q=a.keySystemConfiguration;p=[];u=[];q.audio&&(v={robustness:q.audio.robustness||"",contentType:a.audio.contentType},xd()&&a.audio.contentType.includes('codecs="ac-3"')&&(v={robustness:v.robustness,contentType:'audio/mp4; codecs="ec-3"'}),p.push(v));q.video&&(x={robustness:q.video.robustness||"",contentType:a.video.contentType},u.push(x));
|
|
1091
|
+
z={initDataTypes:[q.initDataType],distinctiveIdentifier:q.distinctiveIdentifier,persistentState:q.persistentState,sessionTypes:q.sessionTypes};p.length&&(z.audioCapabilities=p);u.length&&(z.videoCapabilities=u);y=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;sa(A,3);if(y in Fx){B=Fx[y];A.B(5);break}return C(A,navigator.requestMediaKeySystemAccess(q.keySystem,[z]),6);case 6:B=A.h,Fx[y]=B;case 5:ua(A,4);break;case 3:va(A);case 4:B&&(b.supported=
|
|
1092
|
+
!0,b.keySystemAccess=B);case 2:return A.return(b)}})}mx.MediaCapabilities=Bx;Bx.install=Cx;var Dx=null;Bx.originalMcap=Dx;var Fx={};Bx.memoizedMediaKeySystemAccessRequests_=Fx;nx(Cx,-1);function Gx(){}function Hx(){var a=Id();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Ix():a?10>=a?window.MediaSource=null:12>=a?(Jx(),Kx()):15>=a&&Jx():ud()?Lx():(zd()||yd()||wd("Tizen 4"))&&Mx());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Nx()}
|
|
1093
|
+
function Jx(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function Kx(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Lx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
|
|
1094
|
+
function Mx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Mc(b)&&a(b)}}function Ix(){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)}}
|
|
1095
|
+
function Nx(){var a=MediaSource.isTypeSupported;wd("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)})}mx.MediaSource=Gx;Gx.install=Hx;nx(Hx);function Ox(){}function Px(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Qx():void 0!=window.orientation&&Rx())}function Qx(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1096
|
+
function Rx(){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 Sx;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}mx.Orientation=Ox;Ox.install=Px;function Sx(){hf.call(this);this.type="";this.angle=0}oa(Sx,hf);
|
|
1097
|
+
Sx.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)};
|
|
1098
|
+
Sx.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};nx(Px);function Tx(){}var Ux,Vx,Wx,Xx,Yx,Zx;function $x(a,b){try{var c=new ay(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function by(a){var b=this.mediaKeys;b&&b!=a&&cy(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?cy(a,this):Promise.resolve()}
|
|
1099
|
+
function dy(a){a=hb(a.initData);if(nb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Nf(a.subarray(4),!0);a=Qf(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=kb(a);this.dispatchEvent(b)}mx.PatchedMediaKeysApple=Tx;
|
|
1100
|
+
Tx.uninstall=function(){Ux&&(Ux=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Vx),HTMLMediaElement.prototype.setMediaKeys=Wx,window.MediaKeys=Xx,window.MediaKeySystemAccess=Yx,navigator.requestMediaKeySystemAccess=Zx,Vx=Zx=Wx=Yx=Xx=null,window.shakaMediaKeysPolyfill=!1)};
|
|
1101
|
+
Tx.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Ux=!0,Vx=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Wx=HTMLMediaElement.prototype.setMediaKeys,Xx=window.MediaKeys,Yx=window.MediaKeySystemAccess,Zx=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=by;window.MediaKeys=ey;window.MediaKeySystemAccess=ay;navigator.requestMediaKeySystemAccess=
|
|
1102
|
+
$x;window.shakaMediaKeysPolyfill=!0}};
|
|
1103
|
+
function ay(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1102
1104
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1103
|
-
|
|
1104
|
-
function
|
|
1105
|
-
r.generateRequest=function(a,b){var c=this;this.h=new Ye;try{var d=this.l.createSession("video/mp4",hb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.
|
|
1106
|
-
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:
|
|
1107
|
-
r.update=function(a){this.g=new Ye;try{this.i.update(hb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.
|
|
1108
|
-
function
|
|
1109
|
-
function
|
|
1110
|
-
|
|
1111
|
-
function
|
|
1112
|
-
function
|
|
1113
|
-
function
|
|
1105
|
+
ay.prototype.createMediaKeys=function(){var a=new ey(this.keySystem);return Promise.resolve(a)};ay.prototype.getConfiguration=function(){return this.g};function ey(a){this.h=new WebKitMediaKeys(a);this.g=new zf}ey.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new fy(this.h,a)};ey.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1106
|
+
function cy(a,b){a.g.Ya();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",dy);try{return pj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}ey.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function fy(a){hf.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new zf;this.sessionId="";this.expiration=NaN;this.closed=new Ye;this.keyStatuses=new gy}oa(fy,hf);r=fy.prototype;
|
|
1107
|
+
r.generateRequest=function(a,b){var c=this;this.h=new Ye;try{var d=this.l.createSession("video/mp4",hb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Pb()?"license-request":"license-renewal").set("message",kb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(hy(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1108
|
+
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:hy(c,"output-not-allowed");break;default:hy(c,"internal-error")}});hy(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1109
|
+
r.update=function(a){this.g=new Ye;try{this.i.update(hb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ya()}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 hy(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
|
|
1110
|
+
function gy(){this.size=0;this.g=void 0}r=gy.prototype;r.Pb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,wh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=wh.value();return this.g&&fb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function iy(){}function jy(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=ky,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ly,window.MediaKeys=my,window.MediaKeySystemAccess=ny,window.shakaMediaKeysPolyfill=!0)}function ky(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1111
|
+
function ly(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}mx.PatchedMediaKeysNop=iy;iy.install=jy;function my(){throw new TypeError("Illegal constructor.");}my.prototype.createSession=function(){};my.prototype.setServerCertificate=function(){};my.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function ny(){this.keySystem="";throw new TypeError("Illegal constructor.");}ny.prototype.getConfiguration=function(){};
|
|
1112
|
+
ny.prototype.createMediaKeys=function(){};nx(jy,-10);function oy(){}
|
|
1113
|
+
function py(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)qy="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=ry;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=sy;window.MediaKeys=ty;window.MediaKeySystemAccess=uy;window.shakaMediaKeysPolyfill=!0}}
|
|
1114
|
+
function vy(a){var b=qy;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function ry(a,b){try{var c=new uy(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function sy(a){var b=this.mediaKeys;b&&b!=a&&wy(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&wy(a,this);return Promise.resolve()}mx.PatchedMediaKeysWebkit=oy;oy.install=py;
|
|
1115
|
+
function uy(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
1114
1116
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1115
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1116
|
-
function
|
|
1117
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=
|
|
1118
|
-
|
|
1119
|
-
function
|
|
1120
|
-
function
|
|
1121
|
-
function
|
|
1122
|
-
function
|
|
1123
|
-
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=
|
|
1124
|
-
r.forEach=function(a){this.g&&a(this.g,wh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=wh.value();return this.g&&fb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var
|
|
1125
|
-
function
|
|
1126
|
-
function
|
|
1127
|
-
function
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{
|
|
1131
|
-
null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=v&&(p.width=100*p.width/v),null!=
|
|
1132
|
-
v)),p.viewportAnchorUnits=z||null!=v?Sb:0}else p=null;p&&k.push(p)}if(og(d,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");n=t(og(d,"div"));for(q=n.next();!q.done;q=n.next())if(og(q.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
1133
|
-
function
|
|
1134
|
-
(h?"default":"preserve"));z=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var
|
|
1135
|
-
|
|
1136
|
-
if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var A=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==A})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=
|
|
1137
|
-
function
|
|
1138
|
-
g))a.backgroundColor=h;if(h=
|
|
1139
|
-
"bold"==h&&(a.fontWeight=700);h=
|
|
1140
|
-
c,f,"textOutline",g))d=d.split(" "),d[0].match(
|
|
1117
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}uy.prototype.createMediaKeys=function(){var a=new ty(this.g);return Promise.resolve(a)};uy.prototype.getConfiguration=function(){return this.h};function ty(a){this.l=a;this.h=null;this.g=new zf;this.i=[];this.j=new Map}
|
|
1118
|
+
function wy(a,b){a.h=b;a.g.Ya();var c=qy;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=kb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=xy(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Pb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=xy(a,d.sessionId))yy(d,"usable"),
|
|
1119
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=xy(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?yy(e,"output-restricted"):1==f?yy(e,"expired"):yy(e,"internal-error"))}}))}
|
|
1120
|
+
ty.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 zy(b,this.l,a);this.i.push(a);return a};ty.prototype.setServerCertificate=function(){return Promise.resolve(!1)};ty.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1121
|
+
function xy(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 zy(a,b,c){hf.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 Ye;this.keyStatuses=new Ay}oa(zy,hf);
|
|
1122
|
+
function By(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=hb(Qf("LOAD_SESSION|"+c));else{var e=Qf("PERSISTENT|");d=kg(e,b)}else d=hb(b)}catch(g){return Promise.reject(g)}a.h=new Ye;var f=vy("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new qd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
|
|
1123
|
+
function Cy(a,b,c){if(a.g)a.g.then(function(){return Cy(a,b,c)}).catch(function(){return Cy(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Kf(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=hg(e.keys[0].k);e=hg(e.keys[0].kid)}else d=hb(c),e=null;var f=vy("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1124
|
+
function yy(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}r=zy.prototype;r.generateRequest=function(a,b){return By(this,b,null)};r.load=function(a){return"persistent-license"==this.l?By(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Ye;Cy(this,b,a);return b};
|
|
1125
|
+
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=vy("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 Ay(){this.size=0;this.g=void 0}r=Ay.prototype;r.Pb=function(){return this.g};
|
|
1126
|
+
r.forEach=function(a){this.g&&a(this.g,wh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=wh.value();return this.g&&fb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var qy="";nx(py);function Dy(){}function Ey(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Fy,Object.defineProperty(a,"disablePictureInPicture",{get:Gy,set:Hy,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Iy,document.addEventListener("webkitpresentationmodechanged",Jy,!0))}}
|
|
1127
|
+
function Jy(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)}
|
|
1128
|
+
function Fy(){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 Iy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1129
|
+
function Gy(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Hy(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}mx.PiPWebkit=Dy;Dy.install=Ey;nx(Ey);function Ky(){}function Ly(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=My))}function My(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}mx.RandomUUID=Ky;Ky.install=Ly;nx(Ly);function Ny(){}function Oy(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Py)}function Py(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}mx.StorageEstimate=Ny;Ny.install=Oy;nx(Oy);function Qy(){}function Ry(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Sy})}function Sy(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}mx.Symbol=Qy;Qy.install=Ry;nx(Ry);function Ty(){}function Uy(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}mx.VideoPlayPromise=Ty;Ty.install=Uy;nx(Uy);function Vy(){}function Wy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Ad())&&(a.getVideoPlaybackQuality=Xy)}}function Xy(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}mx.VideoPlaybackQuality=Vy;Vy.install=Wy;nx(Wy);function Yy(){}function Zy(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=$y;else if(6==b)a=az;else{try{var c=!!$y(1,2,"")}catch(d){c=!1}c&&(a=$y)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function $y(a,b,c){return new window.TextTrackCue(a,b,c)}function az(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}mx.VTTCue=Yy;Yy.install=Zy;nx(Zy);function bz(){}bz.prototype.parseInit=function(){};bz.prototype.setSequenceMode=function(){};bz.prototype.setManifestType=function(){};bz.prototype.parseMedia=function(a,b){var c=null,d=[];a=Kf(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=cz.exec(e))){var f=dz.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new yb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1130
|
+
N("shaka.text.LrcTextParser",bz);bz.prototype.parseMedia=bz.prototype.parseMedia;bz.prototype.setManifestType=bz.prototype.setManifestType;bz.prototype.setSequenceMode=bz.prototype.setSequenceMode;bz.prototype.parseInit=bz.prototype.parseInit;var cz=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,dz=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Rc["application/x-subtitle-lrc"]=function(){return new bz};function ez(){}ez.prototype.parseInit=function(){};ez.prototype.setSequenceMode=function(){};ez.prototype.setManifestType=function(){};
|
|
1131
|
+
ez.prototype.parseMedia=function(a,b,c){var d=Kf(a);a=[];if(""==d)return a;var e=Gg(d,"tt");if(!e)throw new O(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=tg(e,fz,"frameRate"),g=tg(e,fz,"subFrameRate"),h=tg(e,fz,"frameRateMultiplier"),k=tg(e,fz,"tickRate"),l=tg(e,fz,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=tg(e,gz,"extent");if("default"!=m&&"preserve"!=m)throw new O(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new hz(f,
|
|
1132
|
+
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{Jb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?rg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new zb;var v=u.getAttribute("xml:id");if(v){p.id=v;var x=null;n&&(x=iz.exec(n)||jz.exec(n));v=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,y=kz(u,h,"extent");if(y){var B=(z=iz.exec(y))||jz.exec(y);
|
|
1133
|
+
null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=v&&(p.width=100*p.width/v),null!=x&&(p.height=100*p.height/x)),p.widthUnits=z||null!=v?Sb:0,p.heightUnits=z||null!=x?Sb:0)}if(u=kz(u,h,"origin"))if(B=(z=iz.exec(u))||jz.exec(u),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?y||(p.width=100-p.viewportAnchorX,p.widthUnits=Sb,p.height=100-p.viewportAnchorY,p.heightUnits=Sb):(null!=x&&(p.viewportAnchorY=100*p.viewportAnchorY/x),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/
|
|
1134
|
+
v)),p.viewportAnchorUnits=z||null!=v?Sb:0}else p=null;p&&k.push(p)}if(og(d,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");n=t(og(d,"div"));for(q=n.next();!q.done;q=n.next())if(og(q.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(b=lz(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1135
|
+
function lz(a,b,c,d,e,f,g,h,k,l,m,n){var q=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 u=null,v=t(mz),x=v.next();!x.done&&!(u=nz(p,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;var z=tg(p,mz,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new fc(n),z=new fc(z),(x=x.resolve(z).toString())&&(v=x));if("p"==a.nodeName||u||v)m=!0;a=m;x="default"==(p.getAttribute("xml:space")||
|
|
1136
|
+
(h?"default":"preserve"));z=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var y=t(p.childNodes),B=y.next();!B.done;B=y.next())(B=lz(B.value,b,c,d,e,f,g,x,k,p,m,n))&&h.push(B);d=null!=l;n=/\S/.test(p.textContent);B=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(B||n||"br"==p.tagName||0!=h.length||d&&!x))return null;y=oz(p,c);n=y.start;for(y=y.end;q&&q.nodeType==Node.ELEMENT_NODE&&"tt"!=q.tagName;)y=pz(q,c,n,y),n=y.start,y=
|
|
1137
|
+
y.end,q=q.parentNode;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==p.tagName)return e=new yb(n,y,""),e.lineBreak=!0,e;b="";z&&(b=p.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new yb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=nz(p,"region",f,"")[0];
|
|
1138
|
+
if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var A=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==A})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=nz(l,"region",f,"")[0]);qz(b,p,g,u,v,e,a,0==h.length);return b}
|
|
1139
|
+
function qz(a,b,c,d,e,f,g,h){g=g||h;"rtl"==rz(b,c,f,"direction",g)&&(a.direction="rtl");h=rz(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Db);(h=rz(b,c,f,"textAlign",!0))?(a.positionAlign=sz[h],a.lineAlign=tz[h],a.textAlign=Mb[h.toUpperCase()]):a.textAlign=Cb;if(h=rz(b,c,f,"displayAlign",!0))a.displayAlign=Nb[h.toUpperCase()];if(h=rz(b,c,f,"color",g))a.color=h;if(h=rz(b,c,f,"backgroundColor",
|
|
1140
|
+
g))a.backgroundColor=h;if(h=rz(b,c,f,"border",g))a.border=h;if(h=rz(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=rz(b,c,f,"fontWeight",g))&&
|
|
1141
|
+
"bold"==h&&(a.fontWeight=700);h=rz(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=rz(b,c,f,"lineHeight",g))&&h.match(uz)&&(a.lineHeight=h);(h=rz(b,c,f,"fontSize",g))&&(h.match(uz)||h.match(vz))&&(a.fontSize=h);if(h=rz(b,c,f,"fontStyle",g))a.fontStyle=Rb[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=rz(b,
|
|
1142
|
+
c,f,"textOutline",g))d=d.split(" "),d[0].match(uz)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(uz)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=rz(b,c,f,"letterSpacing",g))&&d.match(uz)&&(a.letterSpacing=d);(d=rz(b,c,f,"linePadding",g))&&d.match(uz)&&(a.linePadding=d);if(d=rz(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=kz(c,f,"textDecoration"))&&wz(a,d);(d=xz(b,f,"textDecoration"))&&wz(a,d);if(d=rz(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(rz(b,c,f,
|
|
1141
1143
|
"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
1142
|
-
function
|
|
1143
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&tb(a.textDecoration,"overline")}}function
|
|
1144
|
-
function
|
|
1145
|
-
function
|
|
1146
|
-
function
|
|
1147
|
-
function
|
|
1148
|
-
function
|
|
1149
|
-
function
|
|
1150
|
-
var
|
|
1151
|
-
end:"end"},
|
|
1152
|
-
|
|
1153
|
-
Rc['application/mp4; codecs="stpp.ttml"']=function(){return new
|
|
1154
|
-
|
|
1144
|
+
function wz(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&tb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&tb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1145
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&tb(a.textDecoration,"overline")}}function rz(a,b,c,d,e){e=void 0===e?!0:e;return(a=xz(a,c,d))?a:e?kz(b,c,d):null}function kz(a,b,c){if(!a)return null;var d=tg(a,gz,c);return d?d:yz(a,b,c)}function xz(a,b,c){var d=tg(a,gz,c);return d?d:yz(a,b,c)}
|
|
1146
|
+
function yz(a,b,c){a=nz(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=sg(a[e],"urn:ebu:tt:style",c);f||(f=tg(a[e],gz,c));f||(f=xz(a[e],b,c));f&&(d=f)}return d}
|
|
1147
|
+
function nz(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?sg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function pz(a,b,c,d){a=oz(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
|
|
1148
|
+
function oz(a,b){var c=zz(a.getAttribute("begin"),b),d=zz(a.getAttribute("end"),b);a=zz(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1149
|
+
function zz(a,b){var c=null;if(Az.test(a)){a=Az.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Bz.test(a))c=Cz(Bz,a);else if(Dz.test(a))c=Cz(Dz,a);else if(Ez.test(a))a=Ez.exec(a),c=Number(a[1])/b.frameRate;else if(Fz.test(a))a=Fz.exec(a),c=Number(a[1])/b.g;else if(Gz.test(a))c=Cz(Gz,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1150
|
+
function Cz(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}N("shaka.text.TtmlTextParser",ez);ez.prototype.parseMedia=ez.prototype.parseMedia;ez.prototype.setManifestType=ez.prototype.setManifestType;ez.prototype.setSequenceMode=ez.prototype.setSequenceMode;ez.prototype.parseInit=ez.prototype.parseInit;
|
|
1151
|
+
function hz(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]))}
|
|
1152
|
+
var iz=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vz=/^(\d{1,2}(?:\.\d+)?|100)%$/,uz=/^(\d+px|\d+em|\d*\.?\d+c)$/,jz=/^(\d+)px (\d+)px$/,Az=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Bz=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Dz=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Ez=/^(\d*(?:\.\d*)?)f$/,Fz=/^(\d*(?:\.\d*)?)t$/,Gz=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),tz={left:Gb,center:"center",right:"end",start:Gb,
|
|
1153
|
+
end:"end"},sz={left:"line-left",center:"center",right:"line-right"},fz=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],gz=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],mz=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Rc["application/ttml+xml"]=function(){return new ez};function Hz(){this.g=new ez}Hz.prototype.parseInit=function(a){var b=!1;(new Vf).box("moov",$f).box("trak",$f).box("mdia",$f).box("minf",$f).box("stbl",$f).P("stsd",bg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};Hz.prototype.setSequenceMode=function(){};Hz.prototype.setManifestType=function(){};
|
|
1154
|
+
Hz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Vf).box("mdat",dg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new O(2,2,2007);return f};N("shaka.text.Mp4TtmlParser",Hz);Hz.prototype.parseMedia=Hz.prototype.parseMedia;Hz.prototype.setManifestType=Hz.prototype.setManifestType;Hz.prototype.setSequenceMode=Hz.prototype.setSequenceMode;Hz.prototype.parseInit=Hz.prototype.parseInit;Rc['application/mp4; codecs="stpp"']=function(){return new Hz};
|
|
1155
|
+
Rc['application/mp4; codecs="stpp.ttml"']=function(){return new Hz};Rc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Hz};Rc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Hz};function Iz(){this.h=!1;this.g="UNKNOWN"}Iz.prototype.parseInit=function(){};Iz.prototype.setSequenceMode=function(a){this.h=a};Iz.prototype.setManifestType=function(a){this.g=a};
|
|
1156
|
+
Iz.prototype.parseMedia=function(a,b){a=Kf(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new O(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Jz(new Zs(d[1]));if(null==a)throw new O(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
|
|
1155
1157
|
e/9E4-a}}else c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(a=b.segmentStart);b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Zs(d);var f=new zb;bt(d);$s(d);for(var g=bt(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=
|
|
1156
|
-
Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");$s(d);g=bt(d)}b.push(f)}e=new Map;
|
|
1158
|
+
Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");$s(d);g=bt(d)}b.push(f)}e=new Map;Kz(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
|
|
1157
1159
|
t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new yb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var p=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=p;break;case "color":m=!0;l.color=p;break;case "font-family":m=!0;l.fontFamily=p;break;
|
|
1158
1160
|
case "font-size":m=!0;l.fontSize=p;break;case "font-weight":if(700<=parseInt(p,10)||"bold"==p)m=!0,l.fontWeight=700;break;case "font-style":switch(p){case "normal":m=!0;l.fontStyle=Jb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(p);break;case "text-combine-upright":m=!0;l.textCombineUpright=p;break;case "text-shadow":m=!0;l.textShadow=p;break;case "white-space":m=!0,l.wrapLine="noWrap"!=p}}}m&&e.set(g,
|
|
1159
|
-
l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Zs(f[0]),k=
|
|
1160
|
-
m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function
|
|
1161
|
-
function
|
|
1162
|
-
0<f&&(f=d.substr(f,e-f),f.match(
|
|
1163
|
-
e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=Gg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=
|
|
1164
|
-
function
|
|
1165
|
-
function
|
|
1166
|
-
d.fontFamily),d.fontSize=
|
|
1167
|
-
if(!f)break;if(f=
|
|
1168
|
-
function
|
|
1169
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Ab);else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
1170
|
-
function
|
|
1171
|
-
function
|
|
1172
|
-
var
|
|
1173
|
-
|
|
1174
|
-
q.value;var p=q.
|
|
1175
|
-
function
|
|
1176
|
-
function
|
|
1177
|
-
function
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={
|
|
1181
|
-
function
|
|
1161
|
+
l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Zs(f[0]),k=Jz(g),n=at(g,/[ \t]+--\x3e[ \t]+/g),l=Jz(g),null==k||null==n||null==l)Sa("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new yb(k,l,"");$s(g);for(k=bt(g);k;)Lz(m,k,b),$s(g),k=bt(g);Mz(f,
|
|
1162
|
+
m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function Kz(a){for(var b=t(Object.entries(Pb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new yb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Qb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new yb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1163
|
+
function Mz(a,b,c){if(a.includes("<")){0===c.size&&Kz(c);a:{for(var d=[],e=-1,f="",g=0;g<a.length;g++)if("/"===a[g]&&0<g&&"<"===a[g-1]){var h=a.indexOf(">",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0<e&&(d.push(a.substr(e,g-e)),e=-1),f+=a[g];a=f}d=a;a=[];f=-1;for(e=0;e<d.length;e++)"<"===d[e]?f=e+1:">"===d[e]&&
|
|
1164
|
+
0<f&&(f=d.substr(f,e-f),f.match(Nz)&&a.push(f),f=-1);a=t(a);for(e=a.next();!e.done;e=a.next())e=e.value,d=d.replace("<"+e+">",'<div time="'+e+'">'),d+="</div>";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!=
|
|
1165
|
+
e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=Gg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Oz(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())Pz(d.value,b,c)}else b.payload=Oz(a)}else b.payload=Oz(a)}
|
|
1166
|
+
function Qz(a,b){return a&&0<a.length?a:b}
|
|
1167
|
+
function Pz(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new zb;d.position=null;d.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var e=t(a.nodeName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=Qz(g.backgroundColor,d.backgroundColor),d.color=Qz(g.color,d.color),d.fontFamily=Qz(g.fontFamily,
|
|
1168
|
+
d.fontFamily),d.fontSize=Qz(g.fontSize,d.fontSize),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.textShadow=g.textShadow,d.wrapLine=g.wrapLine);switch(f){case "br":d=Kb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.getAttribute("color"))d.color=f;break;case "div":f=a.getAttribute("time");
|
|
1169
|
+
if(!f)break;if(f=Jz(new Zs(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(vg(a)||1==e.length&&vg(e[0]))for(e=!0,c=t(a.textContent.split("\n")),a=c.next();!a.done;a=c.next())a=a.value,e||(e=Kb(d.startTime,d.endTime),b.nestedCues.push(e)),0<a.length&&(e=d.clone(),e.payload=Oz(a),b.nestedCues.push(e)),e=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Pz(a.value,d,c)}
|
|
1170
|
+
function Lz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Cb:a.textAlign=Mb[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1171
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Ab);else if(d=/^region:(.*)$/.exec(b)){if(b=Rz(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=Ob[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Fb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Ob[c[2].toUpperCase()])}
|
|
1172
|
+
function Rz(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function Jz(a){a=at(a,Nz);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)}
|
|
1173
|
+
function Oz(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}N("shaka.text.VttTextParser",Iz);Iz.prototype.parseMedia=Iz.prototype.parseMedia;Iz.prototype.setManifestType=Iz.prototype.setManifestType;Iz.prototype.setSequenceMode=Iz.prototype.setSequenceMode;Iz.prototype.parseInit=Iz.prototype.parseInit;
|
|
1174
|
+
var Nz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Rc["text/vtt"]=function(){return new Iz};Rc['text/vtt; codecs="vtt"']=function(){return new Iz};Rc['text/vtt; codecs="wvtt"']=function(){return new Iz};function Sz(){this.g=null}Sz.prototype.parseInit=function(a){var b=this,c=!1;(new Vf).box("moov",$f).box("trak",$f).box("mdia",$f).P("mdhd",function(d){d=Xh(d.reader,d.version);b.g=d.timescale}).box("minf",$f).box("stbl",$f).P("stsd",bg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};Sz.prototype.setSequenceMode=function(){};Sz.prototype.setManifestType=function(){};
|
|
1175
|
+
Sz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Vf).box("moof",$f).box("traf",$f).P("tfdt",function(B){g=!0;c=Wh(B.reader,B.version).baseMediaDecodeTime}).P("tfhd",function(B){l=Vh(B.reader,B.flags).Kf}).P("trun",function(B){h=!0;d=Yh(B.reader,B.version,B.flags).ig}).box("mdat",dg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);a=c;for(var m=new Sf(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
|
|
1176
|
+
q.value;var p=q.hf||l,u=q.Vd?c+q.Vd:a;a=u+(p||0);var v=0;do{var x=m.L();v+=x;var z=m.L(),y=null;"vttc"==Zf(z)?8<x&&(y=m.sb(x-8)):m.skip(x-8);p&&y&&(x=Tz(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(x))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(ad)};function Tz(a,b,c){var d,e,f;(new Vf).box("payl",dg(function(g){d=Kf(g)})).box("iden",dg(function(g){e=Kf(g)})).box("sttg",dg(function(g){f=Kf(g)})).parse(a);return d?Uz(d,e,f,b,c):null}
|
|
1177
|
+
function Uz(a,b,c,d,e){d=new yb(d,e,"");Mz(a,d,new Map);b&&(d.id=b);if(c)for(a=new Zs(c),b=bt(a);b;)Lz(d,b,[]),$s(a),b=bt(a);return d}N("shaka.text.Mp4VttParser",Sz);Sz.prototype.parseMedia=Sz.prototype.parseMedia;Sz.prototype.setManifestType=Sz.prototype.setManifestType;Sz.prototype.setSequenceMode=Sz.prototype.setSequenceMode;Sz.prototype.parseInit=Sz.prototype.parseInit;Rc['application/mp4; codecs="wvtt"']=function(){return new Sz};function Vz(){}Vz.prototype.parseInit=function(){};Vz.prototype.setSequenceMode=function(){};Vz.prototype.setManifestType=function(){};Vz.prototype.parseMedia=function(a){var b=Kf(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 Zs(c[0]),e=Wz(d),f=at(d,/,/g);d=Wz(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new yb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1178
|
+
function Wz(a){a=at(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)}N("shaka.text.SbvTextParser",Vz);Vz.prototype.parseMedia=Vz.prototype.parseMedia;Vz.prototype.setManifestType=Vz.prototype.setManifestType;Vz.prototype.setSequenceMode=Vz.prototype.setSequenceMode;Vz.prototype.parseInit=Vz.prototype.parseInit;Rc["text/x-subviewer"]=function(){return new Vz};function Xz(){this.g=new Iz}Xz.prototype.parseInit=function(){};Xz.prototype.setSequenceMode=function(){};Xz.prototype.setManifestType=function(){};Xz.prototype.parseMedia=function(a,b,c){a=Kf(a);a=Yz(a);a=hb(Qf(a));return this.g.parseMedia(a,b,c)};
|
|
1179
|
+
function Yz(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}N("shaka.text.SrtTextParser",Xz);Xz.srt2webvtt=Yz;Xz.prototype.parseMedia=Xz.prototype.parseMedia;
|
|
1180
|
+
Xz.prototype.setManifestType=Xz.prototype.setManifestType;Xz.prototype.setSequenceMode=Xz.prototype.setSequenceMode;Xz.prototype.parseInit=Xz.prototype.parseInit;Rc["text/srt"]=function(){return new Xz};function Zz(){}Zz.prototype.parseInit=function(){};Zz.prototype.setSequenceMode=function(){};Zz.prototype.setManifestType=function(){};
|
|
1181
|
+
Zz.prototype.parseMedia=function(a){var b="",c="";a=Kf(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=$z.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=aA.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(bA);else if("Style"==e){e=f.split(bA);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
1182
|
+
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={de:e.de},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=aA.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(bA);else if("Dialogue"==f){g=g.split(bA);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=cA(f.Start);var k=cA(f.End);g=new yb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.de=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.de}}(e)))&&dA(g,f);d.push(g)}return d};
|
|
1183
|
+
function dA(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=eA(c))a.color=c;if(c=b.BackColour)if(c=eA(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=Hb;a.textAlign="start";break;case 2:a.displayAlign=Hb;a.textAlign=Cb;break;case 3:a.displayAlign=Hb;a.textAlign="end";
|
|
1182
1184
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Cb;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=Cb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1183
|
-
function
|
|
1184
|
-
var
|
|
1185
|
-
function
|
|
1186
|
-
function
|
|
1187
|
-
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function
|
|
1188
|
-
r.transmux=function(a,b,c,d){for(var e=hb(a),f=Uh(e),g=f.length;g<e.length&&!
|
|
1189
|
-
duration:1024,
|
|
1190
|
-
|
|
1185
|
+
function eA(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 cA(a){a=fA.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",Zz);Zz.prototype.parseMedia=Zz.prototype.parseMedia;Zz.prototype.setManifestType=Zz.prototype.setManifestType;Zz.prototype.setSequenceMode=Zz.prototype.setSequenceMode;Zz.prototype.parseInit=Zz.prototype.parseInit;
|
|
1186
|
+
var $z=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,aA=/^\s*([^:]+):\s*(.*)/,bA=/\s*,\s*/,fA=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Rc["text/x-ssa"]=function(){return new Zz};function gA(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Hd:c,S:a}:null}function hA(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,ha:"mp4a.40."+e}}
|
|
1187
|
+
function iA(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1188
|
+
function jA(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1189
|
+
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function kA(a){this.i=a;this.h=0;this.g=new Map}r=kA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Oc(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1190
|
+
r.transmux=function(a,b,c,d){for(var e=hb(a),f=Uh(e),g=f.length;g<e.length&&!iA(e,g);g++);a=1E3*c.endTime;f=Th(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=hA(e,g);if(!c)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=gA(e,g);if(!h)return Promise.reject(new O(2,3,3018));var k=h.Hd+h.S;g+k<=e.length&&f.push({data:e.subarray(g+h.Hd,g+k),size:h.S,
|
|
1191
|
+
duration:1024,Sa:0,flags:{Ta:0,La:0,Ja:0,Ha:0,Ia:2,Ua:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ha,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Qa:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{fb:this.h,baseMediaDecodeTime:a,Na:f},stream:b};a=new Bu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Hu(a),this.g.set(b.id,d));b=Yu(a);this.h++;b=kg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.AacTransmuxer",kA);
|
|
1192
|
+
kA.prototype.transmux=kA.prototype.transmux;kA.prototype.getOriginalMimeType=kA.prototype.getOriginalMimeType;kA.prototype.convertCodecs=kA.prototype.convertCodecs;kA.prototype.isSupported=kA.prototype.isSupported;kA.prototype.destroy=kA.prototype.destroy;Yb("audio/aac",function(){return new kA("audio/aac")},dc);function lA(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1191
1193
|
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,fa:a,S:e}}
|
|
1192
|
-
function
|
|
1193
|
-
r.transmux=function(a,b,c,d){a=hb(a);for(var e=Uh(a),f=e.length;f<a.length&&!
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
r.transmux=function(a,b,c,d){a=hb(a);for(var e=Uh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Th(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
(
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
function uA(a){
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
function
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
EA.prototype.convertCodecs=EA.prototype.convertCodecs;EA.prototype.isSupported=EA.prototype.isSupported;EA.prototype.destroy=EA.prototype.destroy;Yb("
|
|
1194
|
+
function mA(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function nA(a){this.i=a;this.h=0;this.g=new Map}r=nA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1195
|
+
r.transmux=function(a,b,c,d){a=hb(a);for(var e=Uh(a),f=e.length;f<a.length&&!mA(a,f);f++);var g=1E3*c.endTime;e=Th(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=lA(a,f);if(!k)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.fa;h.push({data:a.subarray(f,f+k.S),size:k.S,duration:1536,Sa:0,flags:{Ta:0,
|
|
1196
|
+
La:0,Ja:0,Ha:0,Ia:2,Ua:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],fa:e,la:new Uint8Array([]),sa:0,ua:0,data:{fb:this.h,baseMediaDecodeTime:a,Na:h},stream:b};a=new Bu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Hu(a),this.g.set(b.id,d));b=Yu(a);this.h++;b=kg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ac3Transmuxer",nA);nA.prototype.transmux=nA.prototype.transmux;
|
|
1197
|
+
nA.prototype.getOriginalMimeType=nA.prototype.getOriginalMimeType;nA.prototype.convertCodecs=nA.prototype.convertCodecs;nA.prototype.isSupported=nA.prototype.isSupported;nA.prototype.destroy=nA.prototype.destroy;Yb("audio/ac3",function(){return new nA("audio/ac3")},dc);function oA(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new ci(a.subarray(b+2));ei(c,2);ei(c,3);var d=fi(c,11)+1<<1,e=fi(c,2);if(3==e){e=fi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=fi(c,2);var g=fi(c,3),h=fi(c,1);c=fi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,fa:a,S:d}};function pA(a){this.i=a;this.h=0;this.g=new Map}r=pA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1198
|
+
r.transmux=function(a,b,c,d){a=hb(a);for(var e=Uh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Th(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=oA(a,f);if(!k)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.fa;h.push({data:a.subarray(f,f+k.S),size:k.S,duration:1536,
|
|
1199
|
+
Sa:0,flags:{Ta:0,La:0,Ja:0,Ha:0,Ia:2,Ua:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],fa:e,la:new Uint8Array([]),sa:0,ua:0,data:{fb:this.h,baseMediaDecodeTime:a,Na:h},stream:b};a=new Bu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Hu(a),this.g.set(b.id,d));b=Yu(a);this.h++;b=kg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ec3Transmuxer",pA);pA.prototype.transmux=pA.prototype.transmux;
|
|
1200
|
+
pA.prototype.getOriginalMimeType=pA.prototype.getOriginalMimeType;pA.prototype.convertCodecs=pA.prototype.convertCodecs;pA.prototype.isSupported=pA.prototype.isSupported;pA.prototype.destroy=pA.prototype.destroy;Yb("audio/ec3",function(){return new pA("audio/ec3")},dc);function qA(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new ci(b.data),d=ji(c);ji(c);ji(c);hi(c);if(rA.includes(d)&&(d=T(c),3===d&&ei(c,1),hi(c),hi(c),ei(c,1),U(c))){d=3!==d?8:12;for(var e=0;e<d;e++)U(c)&&(6>e?ki(c,16):ki(c,64))}hi(c);d=T(c);if(0===d)T(c);else if(1===d)for(ei(c,1),hi(c),hi(c),d=T(c),e=0;e<d;e++)hi(c);hi(c);ei(c,1);var f=T(c),g=T(c),h=fi(c,1);0===h&&ei(c,1);ei(c,1);var k=0,l=0,m=0,n=0;U(c)&&
|
|
1201
|
+
(k=T(c),l=T(c),m=T(c),n=T(c));e=d=1;if(U(c)&&U(c)){var q=ji(c),p=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<q&&16>q?(d=p[q-1],e=u[q-1]):255===q&&(d=fi(c,16),e=fi(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,w(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,k[3],k[4],k[5],255,225].concat(k,
|
|
1202
|
+
[1],b));return{height:c,width:f,la:a,sa:d,ua:e}}
|
|
1203
|
+
function sA(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=li(new ci(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(kg(h,
|
|
1204
|
+
f.fullData)))}return c.length?{data:kg.apply(eg,w(c)),Vc:b}:null}var rA=[100,110,122,244,44,83,86,118,128,138,139,134];function tA(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=uA(b.fullData);a=vA(c.fullData);var f=wA(d.fullData);b=xA(b.fullData,c.fullData,d.fullData,{Ze:e.Ze,uf:e.uf,Ce:a.Ce,De:a.De,we:a.we,Be:a.Be,xe:a.xe,ye:a.ye,ze:a.ze,Ae:a.Ae,qe:a.qe,re:a.re,se:a.se,te:a.te,ue:a.ue,ve:a.ve,ne:a.ne,Qd:a.Qd,me:a.me,le:a.le,ke:a.ke,bf:f.bf});return{height:a.height,width:a.width,
|
|
1205
|
+
la:b,sa:a.Uh,ua:a.Th}}function uA(a){var b=new ci(a,!0);ji(b);ji(b);fi(b,4);fi(b,2);fi(b,6);a=fi(b,3);b=U(b);return{Ze:a+1,uf:b}}
|
|
1206
|
+
function vA(a){a=new ci(a,!0);ji(a);ji(a);var b=0,c=0,d=0,e=0;fi(a,4);var f=fi(a,3);U(a);for(var g=fi(a,2),h=fi(a,1),k=fi(a,5),l=ji(a),m=ji(a),n=ji(a),q=ji(a),p=ji(a),u=ji(a),v=ji(a),x=ji(a),z=ji(a),y=ji(a),B=ji(a),A=[],D=[],F=0;F<f;F++)A.push(U(a)),D.push(U(a));if(0<f)for(F=f;8>F;F++)fi(a,2);for(F=0;F<f;F++)A[F]&&fi(a,88),D[F]&&ji(a);T(a);A=T(a);3==A&&fi(a,1);D=T(a);F=T(a);U(a)&&(b+=T(a),c+=T(a),d+=T(a),e+=T(a));var J=T(a),G=T(a),H=T(a);if(U(a))for(var I=0;I<=f;I++)T(a),T(a),T(a);else T(a),T(a),
|
|
1207
|
+
T(a);T(a);T(a);T(a);T(a);T(a);T(a);if(U(a)&&U(a))for(I=0;4>I;I++)for(var L=0;L<(3===I?2:6);L++)if(U(a)){var M=Math.min(64,1<<4+(I<<1));1<I&&ii(a);for(var P=0;P<M;P++)ii(a)}else T(a);U(a);U(a);U(a)&&(ji(a),T(a),T(a),U(a));I=T(a);for(M=L=0;M<I;M++)if(P=!1,0!==M&&(P=U(a)),P){M===I&&T(a);U(a);T(a);for(var V=P=0;V<=L;V++){var X=U(a),ba=!1;X||(ba=U(a));(X||ba)&&P++}L=P}else{V=T(a);P=T(a);L=V+P;for(X=0;X<V;X++)T(a),U(a);for(V=0;V<P;V++)T(a),U(a)}if(U(a))for(I=T(a),L=0;L<I;L++){for(M=0;M<H+4;M++)fi(a,1);
|
|
1208
|
+
fi(a,1)}I=H=1;L=0;U(a);U(a);if(U(a)){U(a)&&(M=ji(a),P=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],V=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>M?(H=P[M-1],I=V[M-1]):255===M&&(H=fi(a,16),I=fi(a,16)));U(a)&&U(a);U(a)&&(fi(a,3),U(a),U(a)&&(ji(a),ji(a),ji(a)));U(a)&&(T(a),T(a));U(a);U(a);U(a);if(M=U(a))T(a),T(a),T(a),T(a);if(U(a)&&(fi(a,32),fi(a,32),U(a)&&T(a),U(a))){V=!1;M=U(a);P=U(a);if(M||P){if(V=U(a))ji(a),fi(a,5),U(a),fi(a,5);fi(a,4);fi(a,4);V&&fi(a,4);fi(a,5);fi(a,5);fi(a,5)}for(X=
|
|
1209
|
+
0;X<=f;X++){var R=!0;ba=1;U(a)||(R=U(a));var Oa=!1;R?T(a):Oa=U(a);Oa||(ba=T(a)+1);if(M){for(R=0;R<ba;R++)T(a),T(a),V&&(T(a),T(a));U(a)}if(P){for(R=0;R<ba;R++)T(a),T(a),V&&(T(a),T(a));U(a)}}}U(a)&&(U(a),U(a),U(a),L=T(a),T(a),T(a),T(a),T(a))}return{we:B,Ce:g,De:h,Be:k,xe:l,ye:m,ze:n,Ae:q,qe:p,re:u,se:v,te:x,ue:z,ve:y,Qd:L,ne:0,me:A,le:J,ke:G,width:D-(b+c)*(1===A||2===A?2:1),height:F-(d+e)*(1===A?2:1),Uh:H,Th:I}}
|
|
1210
|
+
function wA(a){var b=new ci(a,!0);ji(b);ji(b);T(b);T(b);U(b);U(b);fi(b,3);U(b);U(b);T(b);T(b);ii(b);U(b);U(b);U(b)&&T(b);ii(b);ii(b);U(b);U(b);U(b);U(b);a=U(b);b=U(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{bf:c}}
|
|
1211
|
+
function xA(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Ce&3)<<6|(d.De?1:0)<<5|d.Be&31;e[2]=d.xe;e[3]=d.ye;e[4]=d.ze;e[5]=d.Ae;e[6]=d.qe;e[7]=d.re;e[8]=d.se;e[9]=d.te;e[10]=d.ue;e[11]=d.ve;e[12]=d.we;e[13]=240|(d.Qd&3840)>>8;e[14]=d.Qd&255;e[15]=252|d.bf&3;e[16]=252|d.me&3;e[17]=248|d.le&7;e[18]=248|d.ke&7;e[19]=0;e[20]=0;e[21]=(d.ne&3)<<6|(d.Ze&7)<<3|(d.uf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1212
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function yA(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*zA[14*(3===c?3-d:3===d?3:4)+e-1];f=AA[3*(3===c?0:2===c?1:2)+f];c=BA[c][d];var h=CA[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,S:k,Sh:8*c*h}}return null}
|
|
1213
|
+
function DA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var zA=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],AA=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],BA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],CA=[0,1,1,4];function EA(a){this.i=a;this.h=0;this.g=new Map}r=EA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1214
|
+
r.transmux=function(a,b,c,d){a=hb(a);for(c=Uh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&DA(a,e)){var f=yA(a,e),g=4;f&&f.S&&(g=f.S);e+=g;e=e===a.length||e+1<a.length&&DA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=yA(a,c);if(!f)return Promise.reject(new O(2,3,3018));h||(h=f);c+f.S<=a.length&&e.push({data:a.subarray(c,c+f.S),size:f.S,duration:1152,Sa:0,flags:{Ta:0,La:0,Ja:0,Ha:0,Ia:2,Ua:0}});c+=f.S}if(!h)return Promise.reject(new O(2,3,3018));a=9E4*h.Sh/h.sampleRate*this.h;d={id:b.id,
|
|
1215
|
+
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,Qa:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{fb:this.h,baseMediaDecodeTime:a,Na:e},stream:b};h=new Bu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Hu(h),this.g.set(b.id,d));b=Yu(h);this.h++;b=kg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Mp3Transmuxer",EA);EA.prototype.transmux=EA.prototype.transmux;EA.prototype.getOriginalMimeType=EA.prototype.getOriginalMimeType;
|
|
1216
|
+
EA.prototype.convertCodecs=EA.prototype.convertCodecs;EA.prototype.isSupported=EA.prototype.isSupported;EA.prototype.destroy=EA.prototype.destroy;Yb("audio/mpeg",function(){return new EA("audio/mpeg")},dc);function FA(a){this.h=a;this.g=null}r=FA.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Oc(a).split(","),c=Bc("audio",b);b=Bc("video",b);return!c||b||"mp3"!=Kc(c)?!1:Za(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
|
|
1217
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new mi;a=hb(a);a=this.g.parse(a);if("mp3"!=a.Nc().audio||"audio"!=e)return Promise.reject(new O(2,3,3018));e=new Uint8Array([]);a=t(a.Lb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=yA(b,c))?(c+d.S<=b.length&&(e=kg(e,b.subarray(c,c+d.S))),c+=d.S):c++;return Promise.resolve(e)};N("shaka.transmuxer.MpegTsTransmuxer",FA);FA.prototype.transmux=FA.prototype.transmux;FA.prototype.getOriginalMimeType=FA.prototype.getOriginalMimeType;
|
|
1218
|
+
FA.prototype.convertCodecs=FA.prototype.convertCodecs;FA.prototype.isSupported=FA.prototype.isSupported;FA.prototype.destroy=FA.prototype.destroy;Yb("video/mp2t",function(){return new FA("video/mp2t")},cc);/*
|
|
1215
1219
|
@license
|
|
1216
1220
|
MSS Transmuxer
|
|
1217
1221
|
Copyright 2015 Dash Industry Forum
|
|
1218
1222
|
SPDX-License-Identifier: BSD-3-Clause
|
|
1219
1223
|
*/
|
|
1220
|
-
function
|
|
1221
|
-
function
|
|
1224
|
+
function GA(a){this.h=a;(this.g=Ks.get("ISOBoxer")())&&HA(this)}
|
|
1225
|
+
function HA(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1222
1226
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1223
|
-
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==
|
|
1227
|
+
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==IA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=GA.prototype;r.destroy=function(){};
|
|
1224
1228
|
r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return Za(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Za(b)||Za(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
|
|
1225
1229
|
r.transmux=function(a,b,c){if(!c)return Promise.resolve(hb(a));if(!b.mssPrivateData)return Promise.reject(new O(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
|
|
1226
1230
|
1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)p.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else p.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
|
|
1227
|
-
1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=
|
|
1228
|
-
|
|
1229
|
-
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Oc(b).replace("mp4a.40.34","mp3").split(",").map(this.
|
|
1230
|
-
r.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new mi;a=hb(a);var f=this.i.parse(a);a=[];var g=f.
|
|
1231
|
-
duration:
|
|
1232
|
-
u.push.apply(u,w(m));z=!1;var
|
|
1233
|
-
l.dts&&(p=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,
|
|
1234
|
-
data:{
|
|
1235
|
-
flags:{
|
|
1236
|
-
|
|
1237
|
-
Vb.sampleRate,b.channelsCount=Vb.channelCount,xa=Vb.sampleRate,I=Vb.fa,L.push({data:Ub.subarray(f,f+Vb.S),size:Vb.S,duration:1536,
|
|
1238
|
-
for(var jb=t(f.
|
|
1239
|
-
b.drmInfos.length,timescale:xa,duration:d,
|
|
1240
|
-
3,3018);var Lf=Gd.sampleRate;f=xa/9E4*Lf;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Lf,duration:d,
|
|
1241
|
-
kg(d,b);return Promise.resolve(b)};
|
|
1231
|
+
1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=JA(u,"traf")+JA(h,"senc")+16);var x=hb(e.write());return Promise.resolve(x)}catch(z){return z instanceof O?Promise.reject(z):Promise.reject(new O(2,3,3022))}};function JA(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}N("shaka.transmuxer.MssTransmuxer",GA);GA.prototype.transmux=GA.prototype.transmux;GA.prototype.getOriginalMimeType=GA.prototype.getOriginalMimeType;
|
|
1232
|
+
GA.prototype.convertCodecs=GA.prototype.convertCodecs;GA.prototype.isSupported=GA.prototype.isSupported;GA.prototype.destroy=GA.prototype.destroy;var IA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Yb("mss/audio/mp4",function(){return new GA("mss/audio/mp4")},dc);Yb("mss/video/mp4",function(){return new GA("mss/video/mp4")},dc);function KA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}r=KA.prototype;r.destroy=function(){this.h.clear()};r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Oc(c).split(",");c=Bc("audio",d);d=Bc("video",d);if(c&&(c=Kc(c),!LA.includes(c))||d&&(c=Kc(d),!MA.includes(c)))return!1;if(b)return Za(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Za(b)||Za(a)};
|
|
1233
|
+
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Oc(b).replace("mp4a.40.34","mp3").split(",").map(this.Sg).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.Sg=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};r.getOriginalMimeType=function(){return this.j};
|
|
1234
|
+
r.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new mi;a=hb(a);var f=this.i.parse(a);a=[];var g=f.Nc();try{var h=null;if("video"==e){switch(g.video){case "avc":var k=[],l=null,m=[],n=f.ic();if(!n.length)throw new O(2,3,3023);for(var q=0;q<n.length;q++){var p=n[q],u=p.nalus;m.push.apply(m,w(u));var v=sA(u);if(v){null==l&&(l=p.dts);var x=void 0;x=q+1<n.length?(n[q+1].dts||0)-(p.dts||0):1<n.length?(p.dts||0)-(n[q-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,
|
|
1235
|
+
duration:x,Sa:Math.round((p.pts||0)-(p.dts||0)),flags:{Ta:0,La:0,Ja:0,Ha:0,Ia:v.Vc?2:1,Ua:v.Vc?0:1}})}}var z=qA(m);if(!z||null==l)throw new O(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Qa:[],fa:new Uint8Array([]),la:z.la,sa:z.sa,ua:z.ua,data:{fb:this.g,baseMediaDecodeTime:l,Na:k},stream:b};break;case "hvc":n=[];p=null;u=[];k=f.ic();if(!k.length)throw new O(2,3,3023);for(v=0;v<k.length;v++){l=
|
|
1236
|
+
k[v];m=l.nalus;u.push.apply(u,w(m));z=!1;var y=[],B=!1;q=t(m);for(x=q.next();!x.done;x=q.next()){var A=x.value;switch(A.type){case 1:case 0:var D=B=!0;break;case 19:case 20:case 21:z=D=B=!0;break;case 32:D=!0;break;case 33:D=!0;break;case 34:D=!0;break;case 35:B=D=!0;break;case 39:case 40:D=!0;break;default:D=!1}if(B&&D){var F=A.fullData.byteLength,J=new Uint8Array(4);J[0]=F>>24&255;J[1]=F>>16&255;J[2]=F>>8&255;J[3]=F&255;y.push(kg(J,A.fullData))}}var G=y.length?{data:kg.apply(eg,w(y)),Vc:z}:null;
|
|
1237
|
+
G&&(null==p&&null!=l.dts&&(p=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,Sa:Math.round((l.pts||0)-(l.dts||0)),flags:{Ta:0,La:0,Ja:0,Ha:0,Ia:G.Vc?2:1,Ua:G.Vc?0:1}}))}var H=tA(u);if(!H||null==p)throw new O(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Qa:[],fa:new Uint8Array([]),
|
|
1238
|
+
la:H.la,sa:H.sa,ua:H.ua,data:{fb:this.g,baseMediaDecodeTime:p,Na:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=[],L,M=null,P=t(f.Lb()),V=P.next();!V.done;V=P.next()){var X=V.value,ba=X.data;if(ba){var R=0;L=hA(ba,R);if(!L)throw new O(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==M&&null!==X.pts&&(M=X.pts);for(;R<ba.length;){var Oa=gA(ba,R);if(Oa){var ab=Oa.Hd+Oa.S;R+ab<=ba.length&&I.push({data:ba.subarray(R+Oa.Hd,R+ab),size:Oa.S,
|
|
1239
|
+
duration:1024,Sa:0,flags:{Ta:0,La:0,Ja:0,Ha:0,Ia:2,Ua:0}});R+=ab}else R++}}}if(!L||null==M){if(!f.ic().length)throw new O(2,3,3018);M=9E4*c.startTime;var vb=Bc("audio",b.codecs.split(","));if(!vb||!b.channelsCount||!b.audioSamplingRate)throw new O(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ha:vb};var Tb=jA(vb,b.channelsCount);if(!Tb)throw new O(2,3,3018);var Bb=M+9E4*(c.endTime-c.startTime);for(f=M;f<Bb;)I.push({data:Tb,size:Tb.byteLength,duration:1024,Sa:0,flags:{Ta:0,
|
|
1240
|
+
La:0,Ja:0,Ha:0,Ia:2,Ua:0}}),f+=1024/L.sampleRate*9E4}var xa=L.sampleRate;f=M/9E4*xa;h={id:b.id,type:"audio",codecs:L.ha,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Qa:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{fb:this.g,baseMediaDecodeTime:f,Na:I},stream:b};break;case "ac3":L=[];xa=0;I=new Uint8Array([]);M=null;R=t(f.Lb());for(var ib=R.next();!ib.done;ib=R.next()){var wb=ib.value,Ub=wb.data;null==M&&null!==wb.pts&&(M=wb.pts);for(f=0;f<Ub.length;){var Vb=
|
|
1241
|
+
lA(Ub,f);Vb?(b.audioSamplingRate=Vb.sampleRate,b.channelsCount=Vb.channelCount,xa=Vb.sampleRate,I=Vb.fa,L.push({data:Ub.subarray(f,f+Vb.S),size:Vb.S,duration:1536,Sa:0,flags:{Ta:0,La:0,Ja:0,Ha:0,Ia:2,Ua:0}}),f+=Vb.S):f++}}if(0==xa||0==I.byteLength||null==M)throw new O(2,3,3018);f=M/9E4*xa;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Qa:[],fa:I,la:new Uint8Array([]),sa:0,ua:0,data:{fb:this.g,baseMediaDecodeTime:f,Na:L},stream:b};break;case "ec3":L=
|
|
1242
|
+
[];xa=0;M=new Uint8Array([]);I=null;for(var jb=t(f.Lb()),Ed=jb.next();!Ed.done;Ed=jb.next()){var hd=Ed.value,Fd=hd.data;null==I&&null!==hd.pts&&(I=hd.pts);for(f=0;f<Fd.length;){var tc=oA(Fd,f);tc?(b.audioSamplingRate=tc.sampleRate,b.channelsCount=tc.channelCount,xa=tc.sampleRate,M=tc.fa,L.push({data:Fd.subarray(f,f+tc.S),size:tc.S,duration:1536,Sa:0,flags:{Ta:0,La:0,Ja:0,Ha:0,Ia:2,Ua:0}}),f+=tc.S):f++}}if(0==xa||0==M.byteLength||null==I)throw new O(2,3,3018);f=I/9E4*xa;h={id:b.id,type:"audio",codecs:"ec-3",
|
|
1243
|
+
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Qa:[],fa:M,la:new Uint8Array([]),sa:0,ua:0,data:{fb:this.g,baseMediaDecodeTime:f,Na:L},stream:b};break;case "mp3":L=[];var Gd;xa=null;for(var yh=t(f.Lb()),Ee=yh.next();!Ee.done;Ee=yh.next()){var Hd=Ee.value,Ac=Hd.data;if(Ac)for(null==xa&&null!==Hd.pts&&(xa=Hd.pts),f=0;f<Ac.length;){var Wc=yA(Ac,f);Wc?(Gd||(Gd=Wc),f+Wc.S<=Ac.length&&L.push({data:Ac.subarray(f,f+Wc.S),size:Wc.S,duration:1152,Sa:0,flags:{Ta:0,La:0,Ja:0,Ha:0,Ia:2,Ua:0}}),
|
|
1244
|
+
f+=Wc.S):f++}}if(!Gd||null==xa)throw new O(2,3,3018);var Lf=Gd.sampleRate;f=xa/9E4*Lf;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Lf,duration:d,Qa:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{fb:this.g,baseMediaDecodeTime:f,Na:L},stream:b}}h&&a.push(h)}}catch(Mf){return Mf&&3023==Mf.code?Promise.resolve(new Uint8Array([])):Promise.reject(Mf)}if(!a.length)return Promise.reject(new O(2,3,3018));a=new Bu(a);this.h.has(b.id)?d=this.h.get(b.id):
|
|
1245
|
+
(d=Hu(a),this.h.set(b.id,d));b=Yu(a);this.g++;b=kg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.TsTransmuxer",KA);KA.prototype.transmux=KA.prototype.transmux;KA.prototype.getOriginalMimeType=KA.prototype.getOriginalMimeType;KA.prototype.convertCodecs=KA.prototype.convertCodecs;KA.prototype.isSupported=KA.prototype.isSupported;KA.prototype.destroy=KA.prototype.destroy;var LA=["aac","ac-3","ec-3","mp3"],MA=["avc","hevc"];Yb("video/mp2t",function(){return new KA("video/mp2t")},bc);/*
|
|
1242
1246
|
@license
|
|
1243
1247
|
EME Encryption Scheme Polyfill
|
|
1244
1248
|
Copyright 2019 Google LLC
|
|
1245
1249
|
SPDX-License-Identifier: Apache-2.0
|
|
1246
1250
|
*/
|
|
1247
|
-
function
|
|
1248
|
-
function
|
|
1251
|
+
function NA(){}var OA;function PA(){OA?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(OA=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=QA):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1252
|
+
function QA(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,OA.call(c,a,b),2);d=e.h;if(RA(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=OA,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=SA;return e.return(SA.call(c,
|
|
1249
1253
|
a,b))})}
|
|
1250
|
-
function
|
|
1251
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,
|
|
1252
|
-
function
|
|
1253
|
-
function
|
|
1254
|
-
navigator.mediaCapabilities.decodingInfo
|
|
1255
|
-
function
|
|
1256
|
-
new
|
|
1257
|
-
function
|
|
1258
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}
|
|
1259
|
-
|
|
1260
|
-
function
|
|
1261
|
-
function
|
|
1254
|
+
function SA(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=TA(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=UA(h.videoCapabilities,d),l=UA(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1255
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,OA.call(c,a,e),2)}q=p.h;return p.return(new VA(q,d))})}function UA(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",NA);NA.install=PA;function WA(){}var XA;
|
|
1256
|
+
function YA(){XA?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(XA=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=ZA):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1257
|
+
function ZA(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,XA.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&RA(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=XA,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1258
|
+
navigator.mediaCapabilities.decodingInfo=$A;if(d){f.B(3);break}e=c;return C(f,aB(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return($A.call(b,a))}})}
|
|
1259
|
+
function $A(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=TA(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,XA.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1260
|
+
new VA(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return C(m,aB(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1261
|
+
function aB(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,
|
|
1262
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}N("McEncryptionSchemePolyfill",WA);WA.install=YA;function VA(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
1263
|
+
VA.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};VA.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
1264
|
+
function TA(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function RA(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
1265
|
+
function bB(){}function xx(){PA();YA()}N("EncryptionSchemePolyfills",bB);bB.install=xx;"undefined"!==typeof module&&module.exports&&(module.exports=bB);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1262
1266
|
|
|
1263
1267
|
//# sourceMappingURL=shaka-player.compiled.map
|