shaka-player 4.9.18 → 4.9.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales.js +35 -35
- package/dist/shaka-player.compiled.debug.js +172 -166
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.js +954 -951
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.debug.js +302 -297
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.js +1081 -1078
- package/dist/shaka-player.ui.map +4 -4
- package/lib/hls/hls_parser.js +52 -1
- package/lib/media/media_source_engine.js +16 -0
- package/lib/media/streaming_engine.js +4 -2
- package/lib/player.js +1 -1
- package/lib/polyfill/mediasource.js +10 -8
- package/lib/transmuxer/aac_transmuxer.js +5 -4
- package/lib/transmuxer/ac3_transmuxer.js +5 -4
- package/lib/transmuxer/ec3_transmuxer.js +5 -4
- package/lib/transmuxer/mp3_transmuxer.js +5 -4
- package/lib/transmuxer/ts_transmuxer.js +5 -4
- package/lib/util/periods.js +6 -1
- package/lib/util/string_utils.js +19 -2
- package/package.json +1 -1
- package/ui/resolution_selection.js +4 -6
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
var r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
13
13
|
function ca(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 da=ca(this);function ea(a,b){if(b)a:{var c=da;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&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
|
|
14
14
|
ea("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;ba(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
|
-
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return
|
|
16
|
-
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var
|
|
17
|
-
if("function"==typeof Object.setPrototypeOf)
|
|
18
|
-
function pa(a,b){a.prototype=
|
|
15
|
+
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
|
+
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
|
|
17
|
+
if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ja=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ja;
|
|
18
|
+
function pa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Xj=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
|
|
19
19
|
function sa(a,b){a.i={pg:b,Ag:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function E(a,b,c){a.g=c;return{value:b}}qa.prototype.u=function(a){this.g=a};function H(a){a.g=0}function ta(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a,b){a.m=0;a.j=b||0}function va(a,b,c){a.g=b;a.m=c||0}function za(a,b){a.m=b||0;b=a.i.pg;a.i=null;return b}function Aa(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function Da(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Ag?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Ea(a){this.g=new qa;this.h=a}function Fa(a,b){ra(a.g);var c=a.g.l;if(c)return Ga(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ha(a)}
|
|
21
21
|
function Ga(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ha(a)}a.g.l=null;d.call(a.g,f);return Ha(a)}function Ha(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Ag)throw b.pg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
@@ -25,13 +25,13 @@ ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!
|
|
|
25
25
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.C(g):this.m(g)}};
|
|
26
26
|
b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.A()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
|
|
27
27
|
function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.A=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
28
|
-
b.prototype.H=function(g){var h=this.j();g.Sd(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(u){try{l(p(u))}catch(
|
|
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).Sd(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(
|
|
28
|
+
b.prototype.H=function(g){var h=this.j();g.Sd(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(u){try{l(p(u))}catch(w){m(w)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Sd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Sd=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).Sd(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(w){p[u]=w;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Sd(n(p.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ma(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
31
31
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ma(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ma(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ma(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ma(k,
|
|
33
33
|
g)&&Ma(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ma(k,g)&&Ma(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
34
|
-
ea("Map",function(a){function b(){var h={};return h.Eb=h.next=h.head=h}function c(h,k){var l=h.g;return
|
|
34
|
+
ea("Map",function(a){function b(){var h={};return h.Eb=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.Eb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ma(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
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,Eb:this.g.Eb,head:this.g,key:h,value:k},l.list.push(l.entry),this.g.Eb.next=l.entry,this.g.Eb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.entry.Eb.next=h.entry.next,
|
|
37
37
|
h.entry.next.Eb=h.entry.Eb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Eb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
|
|
@@ -42,7 +42,8 @@ b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(f
|
|
|
42
42
|
function Oa(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{yg:e,v:f}}return{yg:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Oa(this,b,c).yg}});
|
|
43
43
|
ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ea("Array.prototype.values",function(a){return a?a:function(){return Na(this,function(b,c){return c})}});
|
|
44
44
|
ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
|
|
45
|
-
function Pa(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+""}ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Pa(this,b,"includes").indexOf(b,c||0)}});
|
|
45
|
+
function Pa(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+""}ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Pa(this,b,"includes").indexOf(b,c||0)}});
|
|
46
|
+
ea("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(0>e||1114111<e||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);65535>=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Oa(this,b,c).v}});
|
|
46
47
|
ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Pa(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}});
|
|
47
48
|
ea("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
|
|
48
49
|
var Qa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ma(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Qa});ea("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;})})}});
|
|
@@ -78,14 +79,14 @@ var rc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
78
79
|
Copyright 2006 The Closure Library Authors
|
|
79
80
|
SPDX-License-Identifier: Apache-2.0
|
|
80
81
|
*/
|
|
81
|
-
function sc(a){var b;a instanceof sc?(tc(this,a.xb),this.
|
|
82
|
-
r.toString=function(){var a=[],b=this.xb;b&&a.push(zc(b,Ac,!0),":");if(b=this.zb){a.push("//");var c=this.
|
|
83
|
-
r.resolve=function(a){var b=this.clone();"data"===b.xb&&(b=new sc);var c=!!a.xb;c?tc(b,a.xb):c=!!a.
|
|
84
|
-
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.
|
|
82
|
+
function sc(a){var b;a instanceof sc?(tc(this,a.xb),this.pc=a.pc,uc(this,a.zb),vc(this,a.Gc),this.Na=a.Na,wc(this,a.g.clone()),this.Yb=a.Yb):a&&(b=String(a).match(rc))?(tc(this,b[1]||"",!0),this.pc=xc(b[2]||""),uc(this,b[3]||"",!0),vc(this,b[4]),this.Na=xc(b[5]||"",!0),wc(this,b[6]||"",!0),this.Yb=xc(b[7]||"")):this.g=new yc(null)}r=sc.prototype;r.xb="";r.pc="";r.zb="";r.Gc=null;r.Na="";r.Yb="";
|
|
83
|
+
r.toString=function(){var a=[],b=this.xb;b&&a.push(zc(b,Ac,!0),":");if(b=this.zb){a.push("//");var c=this.pc;c&&a.push(zc(c,Ac,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Gc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.zb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zc(b,"/"==b.charAt(0)?Bc:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Yb)&&a.push("#",zc(b,Dc));return a.join("")};
|
|
84
|
+
r.resolve=function(a){var b=this.clone();"data"===b.xb&&(b=new sc);var c=!!a.xb;c?tc(b,a.xb):c=!!a.pc;c?b.pc=a.pc:c=!!a.zb;c?uc(b,a.zb):c=null!=a.Gc;var d=a.Na;if(c)vc(b,a.Gc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.zb&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
85
|
+
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?wc(b,a.g.clone()):c=!!a.Yb;c&&(b.Yb=a.Yb);return b};r.clone=function(){return new sc(this)};function tc(a,b,c){a.xb=c?xc(b,!0):b;a.xb&&(a.xb=a.xb.replace(/:$/,""))}function uc(a,b,c){a.zb=c?xc(b,!0):b}function vc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Gc=b}else a.Gc=null}
|
|
85
86
|
function wc(a,b,c){b instanceof yc?a.g=b:(c||(b=zc(b,Ec)),a.g=new yc(b))}function xc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function zc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ac=/[#\/\?@]/g,Cc=/[#\?:]/g,Bc=/[#\?]/g,Ec=/[#\?@]/g,Dc=/#/g;function yc(a){this.g=a||null}
|
|
86
|
-
function Gc(a){if(!a.Ia&&(a.Ia={},a.
|
|
87
|
+
function Gc(a){if(!a.Ia&&(a.Ia={},a.ed=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=yc.prototype;r.Ia=null;r.ed=null;function Ic(a){Gc(a);return a.ed}r.add=function(a,b){Gc(this);this.g=null;var c=this.Ia.hasOwnProperty(a)?this.Ia[a]:null;c||(this.Ia[a]=c=[]);c.push(b);this.ed++;return this};
|
|
87
88
|
r.set=function(a,b){Gc(this);this.g=null;this.Ia.hasOwnProperty(a)?this.Ia[a]=[b]:this.add(a,b);return this};r.get=function(a){Gc(this);return this.Ia[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ia)return"";var a=[],b;for(b in this.Ia)for(var c=encodeURIComponent(b),d=this.Ia[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
88
|
-
r.clone=function(){var a=new yc;a.g=this.g;if(this.Ia){var b={},c;for(c in this.Ia)b[c]=this.Ia[c].concat();a.Ia=b;a.
|
|
89
|
+
r.clone=function(){var a=new yc;a.g=this.g;if(this.Ia){var b={},c;for(c in this.Ia)b[c]=this.Ia[c].concat();a.Ia=b;a.ed=this.ed}return a};function T(a,b,c){var d=La.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Jc)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}T.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",T);var Jc=!0;T.Severity={RECOVERABLE:1,CRITICAL:2};T.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
89
90
|
T.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
90
91
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
|
|
91
92
|
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
|
|
@@ -97,15 +98,15 @@ CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:90
|
|
|
97
98
|
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 Kc(a){this.h=a;this.g=void 0}Kc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a,b){return a.length&&b.length&&a!==b?0<Mc(a,b).length:!0}
|
|
98
99
|
function Mc(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(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
99
100
|
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}
|
|
100
|
-
function Nc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Oc=new Kc(function(){return Cb(new Uint8Array([0]))}),Qc=new Map;function Sc(a){this.h=a;this.g=null}Sc.prototype.X=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};Sc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Tc(a){this.h=a;this.g=null}Tc.prototype.
|
|
101
|
-
Tc.prototype.tickAfter=Tc.prototype.X;Tc.prototype.tickNow=Tc.prototype.
|
|
101
|
+
function Nc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Oc=new Kc(function(){return Cb(new Uint8Array([0]))}),Qc=new Map;function Sc(a){this.h=a;this.g=null}Sc.prototype.X=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};Sc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Tc(a){this.h=a;this.g=null}Tc.prototype.nc=function(){this.stop();this.h();return this};Tc.prototype.X=function(a){var b=this;this.stop();this.g=(new Sc(function(){b.h()})).X(a);return this};Tc.prototype.Xa=function(a){var b=this;this.stop();this.g=(new Sc(function(){b.g.X(a);b.h()})).X(a);return this};Tc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Tc);Tc.prototype.stop=Tc.prototype.stop;Tc.prototype.tickEvery=Tc.prototype.Xa;
|
|
102
|
+
Tc.prototype.tickAfter=Tc.prototype.X;Tc.prototype.tickNow=Tc.prototype.nc;function Uc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Vc(a){return""!=Wc().canPlayType(a)}function Xc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Yc(){return Zc("Xbox One")}function $c(){return Zc("Tizen")}function ad(){return Zc("Tizen 3")}function bd(){return Zc("Tizen 2")}function cd(){return Zc("Web0S")}function dd(){return cd()&&38===ed()}function fd(){return Zc("CrKey")}
|
|
102
103
|
function ed(){if(!Zc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function gd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!$c()&&!Zc("PC=EOS")&&!Zc("PC=APL")&&!Zc("VirginMedia")&&!hd()&&!id()&&!Zc("AFT")&&!Zc("WPE")&&!Zc("DT_STB_BCM")}function jd(){return Zc("PlayStation 5")}function id(){return Zc("PlayStation 4")}function kd(){return Zc("Hisense")||Zc("VIDAA")}
|
|
103
104
|
function hd(){return Zc("SOPOpenBrowser")}function ld(){if(!gd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function md(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1}function nd(){return Zc("Android")}
|
|
104
105
|
function Zc(a){return(navigator.userAgent||"").includes(a)}function Wc(){if(od)return od;pd||(pd=new Tc(function(){od=null}));(od=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(od=document.createElement("video"));pd.X(1);return od}function qd(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
|
|
105
106
|
function td(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q;return O(function(u){switch(u.g){case 1:a={width:Infinity,height:Infinity};if(fd()){m=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;ta(u,15);if(!(n=m)){u.u(17);break}return E(u,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if($c()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
106
|
-
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(
|
|
107
|
-
null;do e=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(e===d.maybe);e===d.probably&&(a.width=3840,a.height=2160)}catch(
|
|
108
|
-
Math.max(1080,f.screenHeight)}catch(
|
|
107
|
+
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(w){ab("Tizen: Error detecting screen size, default screen size 1920x1080.")}u.u(3);break}if(Yc()){a.width=1920;a.height=1080;try{c=new Windows.Media.Protection.ProtectionCapabilities;d=Windows.Media.Protection.ProtectionCapabilityResult;e=
|
|
108
|
+
null;do e=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(e===d.maybe);e===d.probably&&(a.width=3840,a.height=2160)}catch(w){ab("Xbox: Error detecting screen size, default screen size 1920x1080.")}u.u(3);break}if(cd()){try{f=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,f.screenWidth),a.height=
|
|
109
|
+
Math.max(1080,f.screenHeight)}catch(w){ab("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}u.u(3);break}if(kd()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);u.u(3);break}if(!id()&&!jd()){u.u(3);break}g=!1;ta(u,9);return E(u,window.msdk.device.getDisplayInfo(),11);case 11:h=u.h;g="4K"===h.resolution;va(u,10);break;case 9:return za(u),ta(u,12),E(u,window.msdk.device.getDisplayInfoImmediate(),
|
|
109
110
|
14);case 14:k=u.h;g="4K"===k.resolution;va(u,10);break;case 12:l=za(u),ab("PlayStation: Failed to get the display info:",l);case 10:g?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);u.u(3);break;case 18:n=u.h;case 17:if(n){a.width=3840;a.height=2160;u.u(19);break}if(!(p=m)){u.u(20);break}return E(u,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),21);case 21:p=u.h;case 20:p&&(a.width=1920,a.height=1080);case 19:va(u,3);break;case 15:q=za(u),$a("Failed to check canDisplayType:",
|
|
110
111
|
q);case 3:return u.return(a)}})}var pd=null,od=null;function vd(){}
|
|
111
112
|
function wd(a){if(!a)return"";a=Bb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!id())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&$a('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
@@ -113,13 +114,13 @@ function wd(a){if(!a)return"";a=Bb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.suba
|
|
|
113
114
|
function xd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Fb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return yd(d)}
|
|
114
115
|
function zd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Bb(a);if(239==c[0]&&187==c[1]&&191==c[2])return wd(c);if(254==c[0]&&255==c[1])return xd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return xd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return xd(a,!1);if(0==c[1]&&0==c[3])return xd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return wd(a);throw new T(2,2,2003);}
|
|
115
116
|
function Ad(a){if(window.TextEncoder&&!id()){var b=new TextEncoder;return Cb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Cb(b)}function Bd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function yd(a){return Cd.value()(a)}
|
|
116
|
-
function Dd(a){var b={"&":"&","<":"<",">":">",""":'"',"
|
|
117
|
-
var Cd=new Kc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Jb:65536};0<b.Jb;b={Jb:b.Jb},b.Jb/=2)if(a(b.Jb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Jb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Jb));return e}}(b);return null});function Ed(){}function Fd(a){a=yd(Bb(a));return btoa(a)}function Gd(a,b){b=void 0==b?!0:b;a=Fd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Hd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function
|
|
118
|
-
function Ld(a){var b=Bb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Md(){for(var a=La.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(Bb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Ed);Ed.concat=Md;Ed.toHex=Ld;Ed.fromHex=
|
|
117
|
+
function Dd(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",vd);vd.resetFromCharCode=function(){Cd.g=void 0};
|
|
118
|
+
vd.toUTF16=Bd;vd.toUTF8=Ad;vd.fromBytesAutoDetect=zd;vd.fromUTF16=xd;vd.fromUTF8=wd;var Cd=new Kc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Jb:65536};0<b.Jb;b={Jb:b.Jb},b.Jb/=2)if(a(b.Jb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Jb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Jb));return e}}(b);return null});function Ed(){}function Fd(a){a=yd(Bb(a));return btoa(a)}function Gd(a,b){b=void 0==b?!0:b;a=Fd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Hd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Id(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
119
|
+
function Ld(a){var b=Bb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Md(){for(var a=La.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(Bb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Ed);Ed.concat=Md;Ed.toHex=Ld;Ed.fromHex=Id;Ed.fromBase64=Hd;Ed.toBase64=Gd;Ed.toStandardBase64=Fd;function Nd(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new sc(a[0]);b=new sc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new sc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new sc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
119
120
|
function Od(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
|
|
120
|
-
function Pd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Gd(
|
|
121
|
+
function Pd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Gd(Id(h),!1));var l=g;22!=l.length&&(l=Gd(Id(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Bb(Ad(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
121
122
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Qd(a,b){if(1==b.length)return b[0];a=Rd(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Rd(a,b){for(var c=t(Sd[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Td?"":null}
|
|
122
|
-
function Ud(a,b){var c=[];a=t(Sd[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Td="text",Vd={
|
|
123
|
+
function Ud(a,b){var c=[];a=t(Sd[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Td="text",Vd={ea:"video",V:"audio",pa:Td,Je:"image",Xi:"application"},Sd={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Wd(){}function Xd(a,b){var c=a;b&&!Yd.includes(a)&&(c+='; codecs="'+b+'"');return c}function Zd(a,b){b&&(a+='; codecs="'+b+'"');return a}function $d(a,b,c){var d=Xd(a,b);b=Zd(a,b);mc(b)?(a=mc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
123
124
|
function ae(a,b,c){var d=[b];be.forEach(function(e,f){var g=a[f];"codecs"==f?Yd.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function ce(a){return a.split(";")[0].split("/")[1]}
|
|
124
125
|
function de(a){var b=je(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"===
|
|
125
126
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function ke(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=je(c.value),b.push(c[0]);return b.sort().join(",")}function me(a){return a.split(";")[0]}
|
|
@@ -140,10 +141,10 @@ var Fe=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
140
141
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
141
142
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
142
143
|
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ke(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer instanceof ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Le(a){var b={},c;for(c in a)b[c]=a[c];return b};function Me(){}
|
|
143
|
-
function Ne(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Oe(e,b,c);if(d.length){b=new gb;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,
|
|
144
|
-
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,
|
|
145
|
-
e.set(k,l)}c=Array.from(b).sort(function(u,
|
|
146
|
-
m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),q.push(g.id)))}else l.push(g),q.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var
|
|
144
|
+
function Ne(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Oe(e,b,c);if(d.length){b=new gb;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,w){u=0;var v=[],A={};w=t(w);for(var y=w.next();!y.done;A={ad:A.ad},y=w.next())A.ad=y.value,y=d.filter(function(B){return function(z){return B.ad.decodingInfos[0][z]}}(A)).length,y>u?(u=y,v=[A.ad]):y==u&&v.push(A.ad);f.push.apply(f,x(v))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
|
|
145
|
+
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,w){return u.bandwidth-w.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=de(m.codecs),p=de(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);
|
|
146
|
+
e.set(k,l)}c=Array.from(b).sort(function(u,w){return u.bandwidth&&w.bandwidth?u.bandwidth-w.bandwidth:u.width-w.width});b=ob();var q=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=de(m.codecs),p=de(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),q.push(g.id)):g.width==m.width&&g.height==m.height&&(n=de(m.codecs),p=de(g.codecs),n!=p||g.bandwidth&&
|
|
147
|
+
m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),q.push(g.id)))}else l.push(g),q.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var w=u.audio;u=u.video;return w&&!h.includes(w.id)||u&&!q.includes(u.id)?!1:!0})}
|
|
147
148
|
function Oe(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Ie:d.Ie},e=b.next())if(d.Ie=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Ie)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Be:d.Be},b=c.next())if(d.Be=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Be)}}(d)),b.length){a=b;break}return a}function Pe(a,b,c){a.variants=a.variants.filter(function(d){return Qe(d,b,c)})}
|
|
148
149
|
function Qe(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
|
|
149
150
|
!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function Re(a,b,c){var d=!1;a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Qe(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Se(a,b,c){c=void 0===c?[]:c;return O(function(d){if(1==d.g)return E(d,Te(a,b,0<b.offlineSessionIds.length,c),2);Ue(b);return E(d,Ve(b),0)})}
|
|
@@ -154,12 +155,12 @@ function bf(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,
|
|
|
154
155
|
null;n=t(n||[]);for(var q=n.next();!q.done;q=n.next())p=c(p,q.value);p&&(m.Mc[m.Nc]=p,d=c(d,p))}}(f)));return E(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
|
|
155
156
|
function df(a){var b=[""];a.video&&(b=ne(a.video.contentType).split(","));var c=[""];a.audio&&(c=ne(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={Sb:f.Sb},h=g.next())h=h.value,f.Sb=Ke(a),a.video&&(f.Sb.video.contentType=Xd(me(f.Sb.video.contentType),e)),a.audio&&(f.Sb.audio.contentType=Xd(me(f.Sb.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Sb).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
156
157
|
return null})}
|
|
157
|
-
function We(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,
|
|
158
|
-
return E(C,bf(n,
|
|
158
|
+
function We(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z;return O(function(C){switch(C.g){case 1:if(e=a.some(function(D){return D.decodingInfos.length}))return C.return();f={};g=t(d);h=g.next();case 2:if(h.done){C.u(4);break}f.De=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){C.u(7);break}n=m.value;p=ef(n,b,c).filter(function(D){return function(K){K=K[0];return(K.keySystemConfiguration&&K.keySystemConfiguration.keySystem)===D.De}}(f));q=t(p);u=q.next();case 8:if(u.done){C.u(10);break}w=u.value;
|
|
159
|
+
return E(C,bf(n,w),9);case 9:u=q.next();C.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();C.u(5);break;case 7:if(k)return C.return();f={De:f.De};h=g.next();C.u(2);break;case 4:v=t(a),m=v.next();case 12:if(m.done){C.u(0);break}A=m.value;y=ef(A,b,c).filter(function(D){D=D[0];D=D.keySystemConfiguration&&D.keySystemConfiguration.keySystem;return!D||!d.includes(D)});B=t(y);u=B.next();case 15:if(u.done){m=v.next();C.u(12);break}z=u.value;return E(C,bf(A,z),16);case 16:u=B.next(),C.u(15)}})}
|
|
159
160
|
function ef(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=ne(k);if(l.includes(",")&&!d){var m=l.split(","),n=me(k);l=Qd("video",m);m=Qd("audio",m);m=$e(m,n);n=$d(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Ze(l);k={contentType:$d(me(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
|
|
160
161
|
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=me(l),l=$e(ne(l),k),k=$d(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
|
|
161
162
|
k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(var p=g.next();!p.done;p=g.next())f=p.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=
|
|
162
|
-
n.next();!m.done;m=n.next()){m=Object.assign({},m.value);var q=c.get(k),u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};q=t(q);for(p=q.next();!p.done;p=q.next()){p=p.value;if(p.initData&&p.initData.length){for(var
|
|
163
|
+
n.next();!m.done;m=n.next()){m=Object.assign({},m.value);var q=c.get(k),u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};q=t(q);for(p=q.next();!p.done;p=q.next()){p=p.value;if(p.initData&&p.initData.length){for(var w=new Set,v=t(p.initData),A=v.next();!A.done;A=v.next())w.add(A.value.initDataType);u.initDataType=p.initData[0].initDataType}p.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");p.persistentStateRequired&&(u.persistentState=
|
|
163
164
|
"required");p.sessionType&&(u.sessionTypes=[p.sessionType]);d&&(u.audio?(u.audio.encryptionScheme=u.audio.encryptionScheme||p.encryptionScheme,u.audio.robustness=u.audio.robustness||p.audioRobustness):u.audio={encryptionScheme:p.encryptionScheme,robustness:p.audioRobustness},""==u.audio.robustness&&delete u.audio.robustness);e&&(u.video?(u.video.encryptionScheme=u.video.encryptionScheme||p.encryptionScheme,u.video.robustness=u.video.robustness||p.videoRobustness):u.video={encryptionScheme:p.encryptionScheme,
|
|
164
165
|
robustness:p.videoRobustness},""==u.video.robustness&&delete u.video.robustness)}m.keySystemConfiguration=u;l.push(m)}a.push(l)}return a}function $e(a,b){return"flac"==a.toLowerCase()?ld()?"fLaC":"flac":"opus"===a.toLowerCase()?ld()?"mp4"==ce(b)?"Opus":"opus":"opus":a}
|
|
165
166
|
function Ze(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Ue(a){a.textStreams=a.textStreams.filter(function(b){b=Xd(b.mimeType,b.codecs);return qe(b)})}
|
|
@@ -207,21 +208,21 @@ function qg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
|
|
|
207
208
|
r.request=function(a,b,c){var d=this,e=new rg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new sg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ke(b.retryParameters):Xf();b.uris=Ke(b.uris);f=tg(this,a,b,c);var g=f.za(function(){return ug(d,a,b,c,new Wf(b.retryParameters,!1),0,null,e)}),h=g.za(function(p){return vg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
208
209
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.za(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.$h||!d.l||u.fromCache||"HEAD"==b.method||a!=wg||d.l(u.timeMs,u.data.byteLength,zg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new sg(n.promise,function(){return n.abort()},e);kg(this.m,f);return f};
|
|
209
210
|
function tg(a,b,c,d){function e(h){f=f.za(function(){c.body&&(c.body=Cb(c.body));return h(b,c,d)})}var f=cg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.za(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
210
|
-
function ug(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new sc(c.uris[f]),l=k.xb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=og[l])?l.ve:null;if(!n)return ag(new T(2,1,1E3,k));var p=l.ti,q=null,u=null,
|
|
211
|
-
var B=n(c.uris[f],c,b,function(D,K,
|
|
212
|
-
$h:m};!
|
|
213
|
-
function vg(a,b,c,d){var e=cg(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Fe:f.Fe},g=a.next())f.Fe=g.value,e=e.za(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return h.Fe(b,k,d)}}(f));return e.za(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function zg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.
|
|
211
|
+
function ug(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new sc(c.uris[f]),l=k.xb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=og[l])?l.ve:null;if(!n)return ag(new T(2,1,1E3,k));var p=l.ti,q=null,u=null,w=!1,v=!1,A;return dg(Yf(e)).za(function(){if(a.i)return bg();A=Date.now();var y=0;c.requestStartTime=Date.now();
|
|
212
|
+
var B=n(c.uris[f],c,b,function(D,K,G){q&&q.stop();u&&u.X(C/1E3);a.l&&b==wg&&(y++,c.packetNumber=y,a.l(D,K,zg(d),c),m=!0,h.g=G)},function(D){a.j&&a.j(D,c,b);v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return B;var z=c.retryParameters.connectionTimeout;z&&(q=new Tc(function(){w=!0;B.abort()}),q.X(z/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Tc(function(){w=!0;B.abort()}));return B}).za(function(y){q&&q.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var B={response:y,
|
|
213
|
+
$h:m};!v&&a.j&&a.j(y.headers,c,b);return B},function(y){q&&q.stop();u&&u.stop();if(a.A){var B=null,z=0;y instanceof T&&(B=y,1001==y.code&&(z=y.data[1]));a.A(c,B,z,w)}if(a.i)return bg();w&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return B=(new Map).set("error",y),B=new U("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,ug(a,b,c,d,e,f,y,h)}throw y;})}
|
|
214
|
+
function vg(a,b,c,d){var e=cg(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Fe:f.Fe},g=a.next())f.Fe=g.value,e=e.za(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return h.Fe(b,k,d)}}(f));return e.za(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function zg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.zd)return!1}return!0}S("shaka.net.NetworkingEngine",lg);
|
|
214
215
|
lg.prototype.request=lg.prototype.request;lg.prototype.destroy=lg.prototype.destroy;lg.makeRequest=qg;lg.defaultRetryParameters=function(){return Xf()};lg.prototype.clearAllResponseFilters=lg.prototype.th;lg.prototype.unregisterResponseFilter=lg.prototype.Ti;lg.prototype.registerResponseFilter=lg.prototype.xi;lg.prototype.clearAllRequestFilters=lg.prototype.sh;lg.prototype.unregisterRequestFilter=lg.prototype.Si;lg.prototype.registerRequestFilter=lg.prototype.wi;lg.unregisterScheme=function(a){delete og[a]};
|
|
215
216
|
lg.registerScheme=mg;lg.prototype.setForceHTTPS=lg.prototype.Sf;lg.prototype.setForceHTTP=lg.prototype.Rf;function rg(){this.g=0}lg.NumBytesRemainingClass=rg;function sg(a,b,c){$f.call(this,a,b);this.h=c}pa(sg,$f);lg.PendingRequest=sg;var wg=1;lg.RequestType={MANIFEST:0,SEGMENT:wg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};lg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var ng=3;
|
|
216
217
|
lg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ng};var og={};function Ag(a){this.g=!1;this.h=new Zf;this.i=a}Ag.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Bg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Cg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Dg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Eg(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Fg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Gg(a,b){this.h=Fb(a);this.i=b==Hg;this.g=0}r=Gg.prototype;r.ka=function(){return this.g<this.h.byteLength};r.ra=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.R=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ig();}};r.ia=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ig();}};r.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};
|
|
217
218
|
r.Jg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};r.Hc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ig();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.nb=function(a){if(this.g+a>this.h.byteLength)throw Ig();var b=Bb(this.h,this.g,a);this.g+=a;return b};
|
|
218
|
-
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};r.Ei=function(a){if(this.g<a)throw Ig();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Ig();this.g=a};r.
|
|
219
|
+
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};r.Ei=function(a){if(this.g<a)throw Ig();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Ig();this.g=a};r.jc=function(){for(var a=this.g;this.ka()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Bb(this.h,a,this.g-a);this.g+=1;return wd(a)};function Ig(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Gg);Gg.prototype.readTerminatedString=Gg.prototype.jc;Gg.prototype.seek=Gg.prototype.seek;Gg.prototype.rewind=Gg.prototype.Ei;
|
|
219
220
|
Gg.prototype.skip=Gg.prototype.skip;Gg.prototype.readBytes=Gg.prototype.nb;Gg.prototype.readUint64=Gg.prototype.Hc;Gg.prototype.readInt32=Gg.prototype.Jg;Gg.prototype.readUint32=Gg.prototype.O;Gg.prototype.readUint16=Gg.prototype.ia;Gg.prototype.readUint8=Gg.prototype.R;Gg.prototype.getLength=Gg.prototype.getLength;Gg.prototype.getPosition=Gg.prototype.ra;Gg.prototype.hasMoreData=Gg.prototype.ka;var Hg=1;Gg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hg};function Jg(){this.i=[];this.h=[];this.g=!1}r=Jg.prototype;r.box=function(a,b){a=Kg(a);this.i[a]=Ng;this.h[a]=b;return this};r.P=function(a,b){a=Kg(a);this.i[a]=Og;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Gg(a,0);for(this.g=!1;a.ka()&&!this.g;)this.Fc(0,a,b,c)};
|
|
220
221
|
r.Fc=function(a,b,c,d){var e=b.ra();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=Pg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.ra()+8>b.getLength()){this.g=!0;return}f=b.Hc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Og){if(d&&b.ra()+4>b.getLength()){this.g=!0;return}n=b.O();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.ra(),b=0<d?b.nb(d):new Uint8Array(0),b=new Gg(b,0),l({name:h,parser:this,
|
|
221
222
|
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ra(),b.getLength()-b.ra()))}};function Qg(a){for(var b=Rg(a);a.reader.ka()&&!a.parser.g;)a.parser.Fc(a.start+b,a.reader,a.partialOkay)}function Sg(a){for(var b=Rg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Fc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Tg(a){var b=Rg(a);for(a.reader.skip(78);a.reader.ka()&&!a.parser.g;)a.parser.Fc(a.start+b,a.reader,a.partialOkay)}
|
|
222
223
|
function Ug(a){var b=Rg(a);a.reader.skip(8);var c=a.reader.ia();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.ka()&&!a.parser.g;)a.parser.Fc(a.start+b,a.reader,a.partialOkay)}function Vg(a){return function(b){a(b.reader.nb(b.reader.getLength()-b.reader.ra()))}}function Kg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Pg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
223
224
|
function Rg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Jg);Jg.headerSize=Rg;Jg.typeToString=Pg;Jg.allData=Vg;Jg.audioSampleEntry=Ug;Jg.visualSampleEntry=Tg;Jg.sampleDescription=Sg;Jg.children=Qg;Jg.prototype.parseNext=Jg.prototype.Fc;Jg.prototype.parse=Jg.prototype.parse;Jg.prototype.stop=Jg.prototype.stop;Jg.prototype.fullBox=Jg.prototype.P;Jg.prototype.box=Jg.prototype.box;var Ng=0,Og=1;function Wg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Jg).box("moov",Qg).box("moof",Qg).P("pssh",function(c){if(!(1<c.version)){var d=Bb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Ld(c.reader.nb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=Ld(c.reader.nb(16));b.h.push(f)}}}}).parse(a)}
|
|
224
|
-
function Xg(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Fb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=
|
|
225
|
+
function Xg(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Fb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Id(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
225
226
|
@license
|
|
226
227
|
tXml
|
|
227
228
|
Copyright 2015 Tobias Nickel
|
|
@@ -240,52 +241,52 @@ function qh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]
|
|
|
240
241
|
function wh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
241
242
|
function xh(a){var b=[];a=Dd(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,position:f?Number(f[1])-1:null,Kb:c.split("/@")[1]||null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Kb=c.slice(1))}return b}
|
|
242
243
|
function yh(a,b){var c=xh(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Kb)?zh(a[c],e,d,gh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}function zh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
243
|
-
function Ah(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&Ah(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=Ah(b,!1,!0),d.appendChild(c);return d}var bh=new Map([]);function Bh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ga=this.ba=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new Zf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.
|
|
244
|
+
function Ah(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&Ah(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=Ah(b,!1,!0),d.appendChild(c);return d}var bh=new Map([]);function Bh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ga=this.ba=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new Zf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.da=new Map;this.L=new Tc(function(){return Ch(b)});this.T=!1;this.N=[];this.W=!1;this.K=new Tc(function(){Dh(b)});this.l.catch(function(){});this.j=new Ag(function(){return Eh(b)});this.aa=!1;this.F=this.G=null}r=Bh.prototype;r.destroy=function(){return this.j.destroy()};
|
|
244
245
|
function Eh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,E(b,Fh(a),2);case 2:if(!a.m){b.u(3);break}ta(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:va(b,5);break;case 4:za(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.aa=!1,a.G=null,H(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Xa(this.h.updateExpirationTime)};
|
|
245
246
|
function Gh(a,b,c){a.ga=!0;a.A=new Map;a.T=c;return Hh(a,b)}function Ih(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.T=0<a.A.size;return Hh(a,b)}
|
|
246
247
|
function Jh(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 Kh(a,g,[])}
|
|
247
|
-
function Hh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,
|
|
248
|
-
|
|
248
|
+
function Hh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y;return O(function(B){if(1==B.g){if(c=Lh(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(z){return z.video&&z.video.drmInfos.length||z.audio&&z.audio.drmInfos.length?!0:!1});g||(h=Eg(a.h.servers),Mh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Nh(m),p=t(n),q=p.next();!q.done;q=p.next())u=q.value,k.add(u);w=t(k);for(q=w.next();!q.done;q=
|
|
249
|
+
w.next())v=q.value,Oh(v,Eg(a.h.servers),Eg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,We(b,a.T,a.aa,a.h.preferredKeySystems),2)}Bg(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.ba=!0,B.return(Promise.resolve());y=Kh(a,void 0,b);return B.return(g?y:y.catch(function(){}))})}
|
|
249
250
|
function Ph(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return E(c,a.G,3);case 3:return Bg(a.j),c.return();case 2:return ta(c,4),a.G=a.m.setMediaKeys(a.s),E(c,a.G,6);case 6:va(c,5);break;case 4:b=za(c),a.o(new T(2,6,6003,b.message));case 5:Bg(a.j),H(c)}})}function Qh(a,b){return O(function(c){if(1==c.g)return E(c,Ph(a),2);Rh(a,b.initDataType,Bb(b.initData));H(c)})}
|
|
250
|
-
r.
|
|
251
|
+
r.uc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.sa(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.sa(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Sh(b,e.value);b.W=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Fh(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||
|
|
251
252
|
b.A.size?E(c,Ph(b),2):c.u(2)}Th(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Qh(b,d)});H(c)})};
|
|
252
253
|
function Uh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=qg([a.g.serverCertificateUri],a.h.retryParameters);ta(g,3);c=a.C.Db.request(5,b);return E(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Bb(d.data);va(g,4);break;case 3:throw e=za(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
253
254
|
ta(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=za(g),new T(2,6,6004,f.message);}})}function Vh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Wh(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.hb=new Zf,d.push(e.hb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
|
|
254
255
|
function Th(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){Wh(a,k,h)});return E(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Xh(a))return g.return(a.l);a.l=new Zf;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,Rh(a,f.initDataType,f.initData);Yh(a)&&a.l.resolve();return g.return(a.l)})}
|
|
255
256
|
function Rh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(zb(c,e.value.initData))return}0<a.i.size&&Yh(a)&&(a.l.resolve(),a.l=new Zf,a.l.catch(function(){}));Zh(a,b,c,a.g.sessionType)}}function $h(a){a=a.i.keys();a=Cg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
256
|
-
r.hf=function(){var a=this,b=this.i.keys();b=Cg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.
|
|
257
|
-
function Kh(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,
|
|
258
|
-
f.keySystem;var
|
|
259
|
-
for(C=
|
|
260
|
-
sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:
|
|
261
|
-
10);case 10:
|
|
257
|
+
r.hf=function(){var a=this,b=this.i.keys();b=Cg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.md=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.Yd=function(){return Fg(this.da)};
|
|
258
|
+
function Kh(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A;return O(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=ai(a,c,d);y.u(2);break}return E(y,bi(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new T(2,6,6001);Bg(a.j);ta(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());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.H.add(q.contentType.toLowerCase());if(c.length){var B=
|
|
259
|
+
f.keySystem;var z=d.get(f.keySystem);var C=[],D=[],K=[],G=[],J=[],I=new Set;ci(z,C,D,G,K,J,I);var F=a.T?"persistent-license":"temporary";B={keySystem:B,encryptionScheme:C[0],licenseServerUri:D[0],distinctiveIdentifierRequired:z[0].distinctiveIdentifierRequired,persistentStateRequired:z[0].persistentStateRequired,sessionType:z[0].sessionType||F,audioRobustness:z[0].audioRobustness||"",videoRobustness:z[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:K[0],initData:J,keyIds:I};z=t(z);
|
|
260
|
+
for(C=z.next();!C.done;C=z.next())C=C.value,C.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(B.persistentStateRequired=C.persistentStateRequired);z=B}else z=f.keySystem,B=b.get(f.keySystem),C=[],D=[],K=[],G=[],J=[],I=new Set,ci(B.drmInfos,C,D,G,K,J,I),z={keySystem:z,encryptionScheme:C[0],licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,
|
|
261
|
+
sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:K[0],initData:J,keyIds:I};a.g=z;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return E(y,f.createMediaKeys(),6);case 6:u=y.h;Bg(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){y.u(7);break}ta(y,8);return E(y,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
|
|
262
|
+
10);case 10:w=y.h;if("usable"!=w)throw new T(2,6,6018);Bg(a.j);va(y,7,4);break;case 8:v=za(y,4);if(v instanceof T)throw v;throw new T(2,6,6019,v.message);case 7:return a.ba=!0,E(y,Uh(a),11);case 11:Bg(a.j);va(y,0);break;case 4:A=za(y);Bg(a.j,A);a.g=null;a.H.clear();if(A instanceof T)throw A;throw new T(2,6,6002,A.message);}})}
|
|
262
263
|
function ai(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Nh(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 T(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Ee:d.Ee},e=a.next())for(d.Ee=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==
|
|
263
264
|
l.Ee}}(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}
|
|
264
|
-
function bi(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v
|
|
265
|
-
A.h,A.return(c);case 6:za(A);case 7:Bg(a.j);case 3:h=g.next();A.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){A.u(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();A.u(9);break}u=h.value;
|
|
265
|
+
function bi(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v;return O(function(A){switch(A.g){case 1:if(1==b.size&&b.has(""))throw new T(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){A.u(4);break}k=h.value;if(!b.has(k)){A.u(3);break}l=b.get(k);ta(A,6);return E(A,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
266
|
+
A.h,A.return(c);case 6:za(A);case 7:Bg(a.j);case 3:h=g.next();A.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){A.u(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();A.u(9);break}u=h.value;w=b.get(u);v=w.drmInfos.some(function(y){return!!y.licenseServerUri});if(v!=p){A.u(13);break}ta(A,15);return E(A,navigator.requestMediaKeySystemAccess(u,[w]),17);case 17:return c=A.h,A.return(c);case 15:za(A);case 16:Bg(a.j);case 13:h=q.next();A.u(12);break;case 11:return A.return(c)}})}
|
|
266
267
|
function Lh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Pd(a)}function di(a){Yh(a)&&a.l.resolve()}function ei(a,b){(new Tc(function(){b.loaded=!0;di(a)})).X(fi)}
|
|
267
268
|
function Wh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.W?a.N.push(n):Sh(a,n)});a.B.D(d,"keystatuseschange",function(n){return gi(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Bf:Infinity,hb:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return E(m,
|
|
268
269
|
d.load(b),4);case 4:return g=m.h,Bg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),ei(a,f),di(a),m.return(d);case 2:k=za(m),Bg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(l,6,6005,k.message)),f.loaded=!0,di(a);case 3:return m.return(Promise.resolve())}})}
|
|
269
270
|
function Zh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.W?a.N.push(f):Sh(a,f)});a.B.D(e,"keystatuseschange",function(f){return gi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Bf:Infinity,hb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Gd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
270
271
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new T(2,6,6006,f.message,f,h))}})}
|
|
271
|
-
function Sh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,
|
|
272
|
-
f.headers[h];if(Nc(a.g.keySystem)){var A=xd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Zg(A,"PlayReadyKeyMessage");var
|
|
273
|
-
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.hb&&d.hb.reject(p)):(d&&d.hb&&d.hb.reject(p),a.i.delete(c),Yh(a)&&(a.l.resolve(),a.L.X(.1)));return
|
|
274
|
-
ei(a,d));H(
|
|
272
|
+
function Sh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w;O(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&Gd(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=qg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
|
|
273
|
+
f.headers[h];if(Nc(a.g.keySystem)){var A=xd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Zg(A,"PlayReadyKeyMessage");var y=hh(A,"HttpHeader");y=t(y);for(var B=y.next();!B.done;B=y.next()){var z=B.value;B=hh(z,"name")[0];z=hh(z,"value")[0];g.headers[fh(B)]=fh(z)}A=hh(A,"Challenge")[0];g.body=Hd(fh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();ta(v,2);m=a.C.Db.request(2,g);return E(v,m.promise,4);case 4:l=v.h;va(v,3);break;case 2:n=za(v);if(a.j.g)return v.return();
|
|
274
|
+
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.hb&&d.hb.reject(p)):(d&&d.hb&&d.hb.reject(p),a.i.delete(c),Yh(a)&&(a.l.resolve(),a.L.X(.1)));return v.return();case 3:if(a.j.g)return v.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Gd(l.data);ta(v,5);return E(v,c.update(l.data),7);case 7:va(v,6);break;case 5:return q=za(v),u=new T(2,6,6008,q.message),a.o(u),d&&d.hb&&d.hb.reject(u),v.return();case 6:if(a.j.g)return v.return();w=new U("drmsessionupdate");a.C.onEvent(w);d&&(d.hb&&d.hb.resolve(),
|
|
275
|
+
ei(a,d));H(v)}})}
|
|
275
276
|
function gi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Nc(a.g.keySystem)&&16==g.byteLength&&(Xc()||id())){h=Fb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Ld(g).slice(0,32);a.$.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.hb&&(a.i.delete(b),b.close().catch(function(){}));Yh(a)&&
|
|
276
|
-
(a.l.resolve(),a.L.X(hi))}function Ch(a){var b=a.$,c=a.
|
|
277
|
-
function ii(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,
|
|
278
|
-
{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(
|
|
279
|
-
!1,ad()&&(
|
|
280
|
-
H(ya)}})};m=function(
|
|
281
|
-
E(Ca,l(
|
|
282
|
-
|
|
283
|
-
J,"")),
|
|
277
|
+
(a.l.resolve(),a.L.X(hi))}function Ch(a){var b=a.$,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new T(2,6,6014));a.C.re(Fg(c))}
|
|
278
|
+
function ii(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J;return O(function(I){if(1==I.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
|
|
279
|
+
{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(F,M){var N,L,P,R,Q,fa,ka,wa;return O(function(ya){switch(ya.g){case 1:return ta(ya,2),E(ya,M.createMediaKeys(),4);case 4:va(ya,3);break;case 2:return za(ya),ya.return();case 3:L=(N=M.getConfiguration().sessionTypes)?N.includes("persistent-license"):
|
|
280
|
+
!1,ad()&&(L=!1),P=M.getConfiguration().videoCapabilities,R=M.getConfiguration().audioCapabilities,Q={persistentState:L,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(F)&&k.get(F)?Q=k.get(F):k.set(F,Q),(fa=P[0].encryptionScheme)&&!Q.encryptionSchemes.includes(fa)&&Q.encryptionSchemes.push(fa),(ka=P[0].robustness)&&!Q.videoRobustnessLevels.includes(ka)&&Q.videoRobustnessLevels.push(ka),(wa=R[0].robustness)&&!Q.audioRobustnessLevels.includes(wa)&&Q.audioRobustnessLevels.push(wa),
|
|
281
|
+
H(ya)}})};m=function(F,M,N,L){var P,R,Q,fa,ka,wa,ya,Ba,Ka;return O(function(Ca){switch(Ca.g){case 1:ta(Ca,2);P=Ke(g);R=t(P.videoCapabilities);for(Q=R.next();!Q.done;Q=R.next())fa=Q.value,fa.encryptionScheme=M,fa.robustness=N;ka=t(P.audioCapabilities);for(Q=ka.next();!Q.done;Q=ka.next())wa=Q.value,wa.encryptionScheme=M,wa.robustness=L;ya=Ke(P);ya.persistentState="required";ya.sessionTypes=["persistent-license"];Ba=[ya,P];return E(Ca,navigator.requestMediaKeySystemAccess(F,Ba),4);case 4:return Ka=Ca.h,
|
|
282
|
+
E(Ca,l(F,Ka),5);case 5:va(Ca,0);break;case 2:za(Ca),H(Ca)}})};n=function(F,M,N,L){var P,R,Q;return O(function(fa){switch(fa.g){case 1:return ta(fa,2),P={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:F,video:{encryptionScheme:M,robustness:N},audio:{encryptionScheme:M,robustness:L}}},E(fa,navigator.mediaCapabilities.decodingInfo(P),4);case 4:return R=
|
|
283
|
+
fa.h,Q=R.keySystemAccess,E(fa,l(F,Q),5);case 5:va(fa,0);break;case 2:za(fa),H(fa)}})};p=t(a);for(q=p.next();!q.done;q=p.next())u=q.value,k.set(u,null);w=[];v=t(h);for(A=v.next();!A.done;A=v.next())for(y=A.value,B=t(a),q=B.next();!q.done;q=B.next())z=q.value,"org.w3.clearkey"===z&&ld()||(w.push(m(z,y,"","")),w.push(n(z,y,"","")));C=t(a);for(q=C.next();!q.done;q=C.next())for(D=q.value,K=t(d[D]||[]),G=K.next();!G.done;G=K.next())J=G.value,w.push(m(D,null,J,"")),w.push(m(D,null,"",J)),w.push(n(D,null,
|
|
284
|
+
J,"")),w.push(n(D,null,"",J));return E(I,Promise.all(w),2)}return I.return(Fg(k))})}function ji(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Tc(e)).X(ki)}),ta(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);za(c);H(c)})}
|
|
284
285
|
function Fh(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return E(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return ta(g,2),a.ga||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,ji(e),5):E(g,e.remove(),5);if(2!=g.g)return va(g,0);za(g);H(g)})})),0)})}function Nh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
285
286
|
function Dh(a){a.i.forEach(function(b,c){var d=b.Bf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Bf=e)})}function Yh(a){a=a.i.values();return Dg(a,function(b){return b.loaded})}function Xh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.$.get(c.value))return!1;return!0}
|
|
286
287
|
function Mh(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)}
|
|
287
288
|
function ci(a,b,c,d,e,f,g){var h=[],k={};a=t(a);for(var l=a.next();!l.done;k={oa:k.oa},l=a.next()){k.oa=l.value;b.includes(k.oa.encryptionScheme)||b.push(k.oa.encryptionScheme);"org.w3.clearkey"==k.oa.keySystem&&k.oa.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(k.oa.licenseServerUri)||h.push(k.oa.licenseServerUri):c.includes(k.oa.licenseServerUri)||c.push(k.oa.licenseServerUri);e.includes(k.oa.serverCertificateUri)||e.push(k.oa.serverCertificateUri);k.oa.serverCertificate&&
|
|
288
|
-
(d.some(function(p){return function(q){return zb(q,p.oa.serverCertificate)}}(k))||d.push(k.oa.serverCertificate));if(k.oa.initData){l={};for(var m=t(k.oa.initData),n=m.next();!n.done;l={
|
|
289
|
+
(d.some(function(p){return function(q){return zb(q,p.oa.serverCertificate)}}(k))||d.push(k.oa.serverCertificate));if(k.oa.initData){l={};for(var m=t(k.oa.initData),n=m.next();!n.done;l={Kd:l.Kd},n=m.next())l.Kd=n.value,f.some(function(p){return function(q){var u=p.Kd;return q.keyId&&q.keyId==u.keyId?!0:q.initDataType==u.initDataType&&zb(q.initData,u.initData)}}(l))||f.push(l.Kd)}if(k.oa.keyIds)for(l=t(k.oa.keyIds),m=l.next();!m.done;m=l.next())g.add(m.value)}if(1==h.length)c.push(h[0]);else if(0<
|
|
289
290
|
h.length){b=[];h=t(h);for(d=h.next();!d.done;d=h.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));h=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(h))}}
|
|
290
291
|
function Oh(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=
|
|
291
292
|
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 ki=1,fi=5,hi=.5;/*
|
|
@@ -301,14 +302,14 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a)
|
|
|
301
302
|
function(m){k.push({box:m,fb:1701733238})}).P("avc1",function(m){k.push({box:m,fb:1701733238})}).P("avc3",function(m){k.push({box:m,fb:1701733238})}).P("ac-3",function(m){k.push({box:m,fb:1701733217})}).P("ec-3",function(m){k.push({box:m,fb:1701733217})}).P("ac-4",function(m){k.push({box:m,fb:1701733217})}).P("mp4a",function(m){k.push({box:m,fb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Ld(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
|
|
302
303
|
e=vi(e,g,l.box,h,l.fb);return Xc()&&md()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
303
304
|
function vi(a,b,c,d,e){var f=wi.value(),g=a.subarray(c.start,c.start+c.size),h=Fb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Fb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);xi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Yc()||Xc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,xi(e,d.start,d.size+k.byteLength);k=Fb(e,b.start);b=Rg(b);
|
|
304
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function xi(a,b,c){a=Fb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var wi=new Kc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function yi(a,b,c,d,e,f,g){this.M=a;this.Da=b;this.na=c;this.yf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}yi.prototype.
|
|
305
|
-
yi.prototype.getEndByte=yi.prototype
|
|
306
|
-
function Ai(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,
|
|
307
|
-
a.next())b.value.Eg();this.o&&this.g.length&&this.g[this.g.length-1].Dg();this.B=this.mimeType=this.codecs=null}r=Ai.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.Ch=function(){return this.endTime};r.
|
|
308
|
-
r.je=function(){this.l=!1};r.di=function(){return this.l};r.Eg=function(){this.
|
|
309
|
-
r.Vf=function(a){null==this.h?$a("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.Pi=function(a){this.B=a};r.
|
|
305
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function xi(a,b,c){a=Fb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var wi=new Kc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function yi(a,b,c,d,e,f,g){this.M=a;this.Da=b;this.na=c;this.yf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}yi.prototype.cc=function(){return this.Da};yi.prototype.ac=function(){return this.na};yi.prototype.od=function(){return this.g};function zi(a,b){return a===b?!0:a&&b?a.cc()==b.cc()&&a.ac()==b.ac()&&Qb(a.M().sort(),b.M().sort())&&zb(a.od(),b.od()):a==b}S("shaka.media.InitSegmentReference",yi);
|
|
306
|
+
yi.prototype.getEndByte=yi.prototype.ac;yi.prototype.getStartByte=yi.prototype.cc;
|
|
307
|
+
function Ai(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w){l=void 0===l?[]:l;q=void 0===q?Bi:q;this.startTime=a;this.j=this.endTime=b;this.C=c;this.Da=d;this.na=e;this.ca=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===p?null:p;this.status=q;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.s=null;this.i=0;this.o=void 0===w?!1:w;this.ge=this.zd=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
308
|
+
a.next())b.value.Eg();this.o&&this.g.length&&this.g[this.g.length-1].Dg();this.B=this.mimeType=this.codecs=null}r=Ai.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.Ch=function(){return this.endTime};r.cc=function(){return this.Da};r.ac=function(){return this.na};r.Vh=function(){return this.tilesLayout};r.Uh=function(){return this.A};r.dc=function(){return this.status};r.mi=function(){this.status=Ci};r.xf=function(){this.preload=!0};r.gi=function(){return this.preload};
|
|
309
|
+
r.je=function(){this.l=!1};r.di=function(){return this.l};r.Eg=function(){this.zd=!0};r.fi=function(){return this.zd};r.Dg=function(){this.ge=!0};r.ei=function(){return this.ge};r.Cg=function(){this.m=!0};r.ai=function(){return this.m};r.Vg=function(a){this.s=a};r.Th=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
310
|
+
r.Vf=function(a){null==this.h?$a("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.Pi=function(a){this.B=a};r.od=function(){return this.B};function Gi(a,b){a.ca=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Gi(c.value,b)}S("shaka.media.SegmentReference",Ai);Ai.prototype.getSegmentData=Ai.prototype.od;Ai.prototype.setSegmentData=Ai.prototype.Pi;Ai.prototype.syncAgainst=Ai.prototype.Vf;Ai.prototype.offset=Ai.prototype.offset;
|
|
310
311
|
Ai.prototype.getThumbnailSprite=Ai.prototype.Th;Ai.prototype.setThumbnailSprite=Ai.prototype.Vg;Ai.prototype.hasByterangeOptimization=Ai.prototype.ai;Ai.prototype.markAsByterangeOptimization=Ai.prototype.Cg;Ai.prototype.isLastPartial=Ai.prototype.ei;Ai.prototype.markAsLastPartial=Ai.prototype.Dg;Ai.prototype.isPartial=Ai.prototype.fi;Ai.prototype.markAsPartial=Ai.prototype.Eg;Ai.prototype.isIndependent=Ai.prototype.di;Ai.prototype.markAsNonIndependent=Ai.prototype.je;Ai.prototype.isPreload=Ai.prototype.gi;
|
|
311
|
-
Ai.prototype.markAsPreload=Ai.prototype.xf;Ai.prototype.markAsUnavailable=Ai.prototype.mi;Ai.prototype.getStatus=Ai.prototype.
|
|
312
|
+
Ai.prototype.markAsPreload=Ai.prototype.xf;Ai.prototype.markAsUnavailable=Ai.prototype.mi;Ai.prototype.getStatus=Ai.prototype.dc;Ai.prototype.getTileDuration=Ai.prototype.Uh;Ai.prototype.getTilesLayout=Ai.prototype.Vh;Ai.prototype.getEndByte=Ai.prototype.ac;Ai.prototype.getStartByte=Ai.prototype.cc;Ai.prototype.getEndTime=Ai.prototype.Ch;Ai.prototype.getStartTime=Ai.prototype.getStartTime;Ai.prototype.getUris=Ai.prototype.M;var Bi=0,Ci=1;Ai.Status={Yi:Bi,Oj:Ci,qj:2};function Hi(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ii(a){return!a||Hi(a)?null:a.length?a.end(a.length-1):null}function Ji(a,b){return!a||!a.length||Hi(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ki(a,b){if(!a||!a.length||Hi(a))return 0;var c=0;a=t(Li(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}
|
|
312
313
|
function Mi(a,b,c){if(!a||!a.length||Hi(a))return null;a=Li(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Li(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};/*
|
|
313
314
|
@license
|
|
314
315
|
Shaka Player
|
|
@@ -320,9 +321,9 @@ function Ri(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
320
321
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=wd(Bb(a.data,1,d));a=wd(Bb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=wd(Bb(a.data,1,d));a=wd(Bb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=wd(Bb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
321
322
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Cb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=wd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=wd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Cb(a.data),b):null}
|
|
322
323
|
function Si(a){for(var b=0,c=[];Oi(a,b);){var d=Qi(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=Qi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ri(e))&&c.push(f);b+=e.size+10}Pi(a,b)&&(b+=10)}return c}function Ti(a,b){for(var c=b=void 0===b?0:b,d=0;Oi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Qi(a,b+6),Pi(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Ni);Ni.getID3Data=Ti;
|
|
323
|
-
Ni.getID3Frames=Si;function Ui(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Hc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,
|
|
324
|
+
Ni.getID3Frames=Si;function Ui(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Hc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,gd:c,Wd:d,Sj:e}}function Vi(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Wi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ia();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
324
325
|
function Xi(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Lf:null,sampleSize:null,xe:null};c&256&&(h.Lf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.xe=0==b?a.O():a.Jg());e.push(h)}return{Wj:d,Mg:e,wh:f}}function Yi(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ia();a.skip(2);a.skip(2);a.skip(2);a=a.ia()+a.ia()/65536;return{channelCount:b,sampleRate:a}}function Zi(a){a=a.O();return{La:Pg(a)}}
|
|
325
|
-
function $i(a){var b=null,c=null,d=a.nb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.ia()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ia();a.ia();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,
|
|
326
|
+
function $i(a){var b=null,c=null,d=a.nb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.ia()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ia();a.ia();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,Gd:c}}
|
|
326
327
|
function aj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function bj(a){return(10>a?"0":"")+a};/*
|
|
327
328
|
|
|
328
329
|
Copyright Brightcove, Inc.
|
|
@@ -353,55 +354,56 @@ r.Ef=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;
|
|
|
353
354
|
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Md(b.data,a),b.fullData=Md(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Md.apply(Ed,x(c.value)),(c=vj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Si(c.data),dts:c.dts,pts:c.pts});return a};
|
|
354
355
|
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=Md.apply(Ed,x(c.value)),e=vj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Md(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
355
356
|
r.Ac=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Md.apply(Ed,x(d.value)),f=vj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Md(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.Ef(e,
|
|
356
|
-
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Lb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Ac(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.
|
|
357
|
+
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Lb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Ac(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.ld=function(){return{audio:this.A,video:this.m}};
|
|
357
358
|
r.be=function(){for(var a=[],b=t(this.Ac()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.Yh=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.mf();return{height:a.height,width:a.width}};r.mf=function(){return"hvc"==this.m?xj(this):yj(this)};
|
|
358
359
|
function yj(a){var b={height:null,width:null,La:null};a=a.be();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new cj(a.data);var c=jj(a),d=jj(a),e=jj(a);hj(a);if(zj.includes(c)){var f=V(a);3===f&&ej(a,1);hj(a);hj(a);ej(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?kj(a,16):kj(a,64))}}hj(a);f=V(a);if(0===f)V(a);else if(1===f)for(ej(a,1),hj(a),hj(a),f=V(a),g=0;g<f;g++)hj(a);hj(a);ej(a,1);f=V(a);g=V(a);var h=fj(a,1);0===h&&ej(a,1);ej(a,1);var k=0,l=0,m=0,n=
|
|
359
360
|
0;W(a)&&(k=V(a),l=V(a),m=V(a),n=V(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.La="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
360
|
-
function xj(a){var b={height:null,width:null,La:null};a=a.be();if(!a.length)return b;a=a.find(function(
|
|
361
|
-
(
|
|
361
|
+
function xj(a){var b={height:null,width:null,La:null};a=a.be();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new cj(a.fullData,!0);jj(c);jj(c);fj(c,4);var d=fj(c,3);W(c);var e=fj(c,2),f=fj(c,1),g=fj(c,5),h=fj(c,32);a=jj(c);for(var k=jj(c),l=jj(c),m=jj(c),n=jj(c),p=jj(c),q=jj(c),u=[],w=[],v=0;v<d;v++)u.push(W(c)),w.push(W(c));if(0<d)for(v=d;8>v;v++)fj(c,2);for(v=0;v<d;v++)u[v]&&fj(c,88),w[v]&&jj(c);V(c);d=V(c);3==d&&fj(c,1);u=V(c);w=V(c);var A=v=0,y=0,B=0;W(c)&&
|
|
362
|
+
(v+=V(c),A+=V(c),y+=V(c),B+=V(c));b.width=String(u-(v+A)*(1===d||2===d?2:1));b.height=String(w-(y+B)*(1===d?2:1));c=function(z){for(var C=0,D=0;32>D;D++)C|=(z>>D&1)<<31-D;return C>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+q;p&&(e+="."+p.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
362
363
|
a.toString(16).toUpperCase());b.La=e;return b}function wj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Aj(a){return 0>nj(a)?!1:!0}function nj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",mj);mj.syncOffset=nj;mj.probe=Aj;mj.prototype.getVideoInfo=mj.prototype.mf;mj.prototype.getVideoResolution=mj.prototype.Yh;mj.prototype.getVideoNalus=mj.prototype.be;
|
|
363
|
-
mj.prototype.getCodecs=mj.prototype.
|
|
364
|
+
mj.prototype.getCodecs=mj.prototype.ld;mj.prototype.getStartTime=mj.prototype.getStartTime;mj.prototype.getVideoData=mj.prototype.Ac;mj.prototype.getAudioData=mj.prototype.Lb;mj.prototype.getMetadata=mj.prototype.getMetadata;mj.prototype.parseNalus=mj.prototype.Ef;mj.prototype.parseAvcNalus=mj.prototype.si;mj.prototype.parse=mj.prototype.parse;mj.prototype.clearData=mj.prototype.clearData;mj.Timescale=9E4;var zj=[100,110,122,244,44,83,86,118,128,138,139,134];function Bj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&ab("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,rb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ab("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(ab("Could not find LCEVC Library on this page"),
|
|
364
365
|
a=!1):(this.h.SupportObject.SupportStatus||ab(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Cj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
365
|
-
Bj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Dj(a,b,c){var d=Ej,e=Fj;switch(b.mimeType){case "video/webm":d=Gj;break;case "video/mp4":d=Hj}switch(c){case "DASH":e=Ij;break;case "HLS":e=Jj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Bj);Bj.prototype.release=Bj.prototype.release;var Ej=0,Gj=1,Hj=2,Jj=0,Ij=1,Fj=-1;function Kj(a,b,c,d){var e=this;this.i=a;this.ba=c;this.A=null;this.F=b;this.h={};this.G={};this.Ea={};this.g=null;this.ga=!1;this.$=d||null;this.
|
|
366
|
+
Bj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Dj(a,b,c){var d=Ej,e=Fj;switch(b.mimeType){case "video/webm":d=Gj;break;case "video/mp4":d=Hj}switch(c){case "DASH":e=Ij;break;case "HLS":e=Jj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Bj);Bj.prototype.release=Bj.prototype.release;var Ej=0,Gj=1,Hj=2,Jj=0,Ij=1,Fj=-1;function Kj(a,b,c,d){var e=this;this.i=a;this.ba=c;this.A=null;this.F=b;this.h={};this.G={};this.Ea={};this.g=null;this.ga=!1;this.$=d||null;this.l={};this.s=new hb;this.j={};this.H=null;this.L=new Zf;this.N="";this.va=!1;this.m=Lj(this,this.L);this.C=!1;this.J=new Ag(function(){return Mj(e)});this.B=!1;this.aa="UNKNOWN";this.Fa=this.Ka=!1;this.ya=new Zf;this.o=!1;this.xa=!0;this.la=this.T=this.ma=this.W=this.K=this.da=null;this.wa=new Zf}
|
|
366
367
|
function Lj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.xa=!0});a.s.D(c,"endstreaming",function(){a.xa=!1});a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.va=!0});a.N=Nj(c);a.i.src=a.N;return c}c=new MediaSource;a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.va=!0});a.N=Nj(c);a.i.src=a.N;return c}
|
|
367
|
-
function Oj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(q){if(1==q.g)return a.createSegmentIndex?E(q,a.createSegmentIndex(),2):q.u(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=Vd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.pa){if(m=Xd(h,k),!qe(m))return q.return(!1)}else if(b==c.
|
|
368
|
+
function Oj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(q){if(1==q.g)return a.createSegmentIndex?E(q,a.createSegmentIndex(),2):q.u(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=Vd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.pa){if(m=Xd(h,k),!qe(m))return q.return(!1)}else if(b==c.ea?k=Ze(k):b==c.V&&(k=$e(k,h)),n=
|
|
368
369
|
ae(a,h,k),p=Zd(h,k),!mb(n)&&!mc(p))return q.return(!1);return q.return(!0)})}r=Kj.prototype;r.destroy=function(){return this.J.destroy()};
|
|
369
|
-
function Mj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.
|
|
370
|
-
a.
|
|
371
|
-
function Pj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,
|
|
372
|
-
Pj(a,e.
|
|
373
|
-
H(
|
|
370
|
+
function Mj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(ye)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.j)b.push(a.j[k].destroy());return E(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.m=null;a.g=null;a.F=null;a.h={};a.j={};a.H=null;
|
|
371
|
+
a.l={};a.$=null;a.K=null;a.ba=null;H(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Vd,E(m,e.L,2);case 2:e.B=b,e.aa=c,e.Ka=d,e.Fa=!e.B&&"HLS"==e.aa&&!e.Ka,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return E(m,Pj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.V]=[],e.l[f.ea]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
|
|
372
|
+
function Pj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w;return O(function(v){switch(v.g){case 1:return e=Vd,f=Sa,g=Ta,E(v,Oj(c,b),2);case 2:g.call(f,v.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Xd(c.mimeType,d);if(b==e.pa){Qj(a,h,a.B,c.external);v.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&Yd.includes(h))k=!0;l=Zd(c.mimeType,d);if(!k){v.u(4);break}m=Rd(e.V,(d||"").split(","));n=Rd(e.ea,(d||"").split(","));if(!m||!n){v.u(5);break}a.o=!0;return E(v,Pj(a,e.V,c,m),6);case 6:return E(v,
|
|
373
|
+
Pj(a,e.ea,c,n),7);case 7:return v.return();case 5:if(p=mc(l))q=p(),a.j[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Bg(a.J);try{w=a.m.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.m.readyState+" expected 'open'",null);}a.B&&(w.mode=Rj);a.s.D(w,"error",function(){var A=a.l[b][0];A.p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.s.D(w,"updateend",function(){return Sj(a,b)});a.h[b]=w;a.G[b]=h;a.Ea[b]=!!c.drmInfos.length;
|
|
374
|
+
H(v)}})}r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
374
375
|
function Qj(a,b,c,d){a.g||(a.g=new pe(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ga;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,re[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):rb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):rb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
375
|
-
function Tj(a){return a.C?!1:a.
|
|
376
|
+
function Tj(a){return a.C?!1:a.m?"ended"==a.m.readyState:!0}function Uj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Td?a=a.g.g:(a=Vj(a,b),a=!a||Hi(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Wj(a,b){return a.C?null:b==Td?a.g.h:Ii(Vj(a,b))}function Xj(a,b,c){if(a.C)return 0;if(b==Td)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Vj(a,b);return Ki(a,c)}
|
|
376
377
|
r.ub=function(){var a={total:this.C?[]:Li(this.i.buffered),audio:this.C?[]:Li(Vj(this,"audio")),video:this.C?[]:Li(Vj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Vj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
377
|
-
function Yj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Yd.includes(e))f=Si(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.ba.se([{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.
|
|
378
|
+
function Yj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Yd.includes(e))f=Si(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.ba.se([{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.ca&&d.ca.timescale){var k=d.ca.timescale;if(!isNaN(k)){var l=0,m=!1;(new Jg).box("moof",Qg).box("traf",Qg).P("tfdt",function(n){l=Vi(n.reader,
|
|
378
379
|
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Aj(h)||(a.K?a.K.clearData():a.K=new mj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ba.se(h,f,d?d.endTime:null));return g}
|
|
379
|
-
function Zj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,q,u,v,
|
|
380
|
-
case 6:if(!a.h[b])return
|
|
381
|
-
B=b==m.
|
|
382
|
-
a.wa,14);case 14:K=
|
|
383
|
-
r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Vd,a==e.pa?E(f,d.g.remove(b,c),0):E(f,ak(d,a,function(){return gk(d,a,b,c)},null),4)):d.
|
|
384
|
-
r.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Vd,a==c.pa?d.return():E(d,ak(b,a,function(){b.i.currentTime-=.001;Sj(b,a)},null),2)):b.
|
|
385
|
-
function ik(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Vd;if(b==l.pa)return f||(a.g.s=c),te(a.g,d,e),p.return();m=[];return E(p,jk(a,b,g,h,k),2)}n=p.h;n||(m.push(ak(a,b,function(){return bk(a,b)},null)),a.
|
|
386
|
-
b)},null));a.
|
|
387
|
-
function kk(a,b,c){var d;return O(function(e){if(1==e.g){d=Vd;if(b==d.pa)return e.return();b==d.
|
|
388
|
-
r.Wa=function(a){var b=this;return O(function(c){return E(c,lk(b,function(){if(a<b.
|
|
389
|
-
function ck(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Sj(a,b)}function Sj(a,b){if(!a.C){var c=a.
|
|
390
|
-
function lk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.J);c=[];d={};for(e in a.h)d.
|
|
391
|
-
null);}})}function mk(a,b){a.
|
|
392
|
-
function ok(a,b,c,d){return ak(a,b,function(){b!==Td&&(ob()&&(a.
|
|
393
|
-
function pk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,
|
|
394
|
-
Promise.all(g),4);case 4:return a.
|
|
380
|
+
function Zj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,q,u,w,v,A,y,B,z,C,D,K;return O(function(G){switch(G.g){case 1:m=Vd;if(b!=m.pa){G.u(2);break}if(!a.B){G.u(3);break}return E(G,a.ya,4);case 4:n=G.h,a.g.s=n;case 3:return E(G,se(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return G.return();case 2:if(l||!a.o){G.u(6);break}return E(G,Zj(a,m.V,c,d,e,f,g,h,k,!0),7);case 7:return E(G,Zj(a,m.ea,c,d,e,f,g,h,k,!0),8);case 8:return G.return();
|
|
381
|
+
case 6:if(!a.h[b])return G.return();p=a.h[b].timestampOffset;q=a.G[b];a.j[b]&&(q=a.j[b].getOriginalMimeType());d&&(u=Yj(a,b,c,d,q,p),null!=u&&(null==a.W&&b==m.ea&&(a.W=u,a.ma=d.startTime,null!=a.T&&(w=0,a.ma==a.la&&(w=a.W-a.T),a.wa.resolve(w))),null==a.T&&b==m.V&&(a.T=u,a.la=d.startTime,null!=a.W&&(v=0,a.ma==a.la&&(v=a.W-a.T),a.wa.resolve(v))),A=d.startTime-u,y=Math.abs(p-A),(.001<=y||g||h)&&(!k||0<A||!p)&&(p=A,a.Fa&&(ak(a,b,function(){return bk(a,b)},null),ak(a,b,function(){return ck(a,b,p)},null))),
|
|
382
|
+
B=b==m.ea||!(m.ea in a.h),a.B&&B&&a.ya.resolve(p)));f&&b==m.ea&&(a.g||Qj(a,"application/cea-608",a.B,!1),a.H||(z=q.split(";",1)[0],a.H=new Hb(z)),d?(C=a.H.i(c),C.length&&we(a.g,C,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.j[b]){G.u(9);break}return E(G,a.j[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=G.h;case 9:c=dk(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.pa){G.u(11);break}if(!g&&!h){G.u(11);break}D=d.startTime;if("HLS"!=a.aa||a.o||b!=m.V||!a.h[m.ea]){G.u(13);break}return E(G,
|
|
383
|
+
a.wa,14);case 14:K=G.h,.1<Math.abs(K)&&(D-=K);case 13:ak(a,b,function(){return bk(a,b)},null),ak(a,b,function(){return ck(a,b,D)},null);case 11:return E(G,ak(a,b,function(){var J=c;if("video"==b&&a.$){var I=a.$;I.g&&I.g.appendBuffer(J,"video",I.o,-p)}a.h[b].appendBuffer(J)},d?d.M()[0]:null),15);case 15:H(G)}})}function ek(a,b){var c=Wj(a,"video")||0;ue(a.g,b,c)}function fk(a){a.g&&ue(a.g,"",0)}
|
|
384
|
+
r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Vd,a==e.pa?E(f,d.g.remove(b,c),0):E(f,ak(d,a,function(){return gk(d,a,b,c)},null),4)):d.o?E(f,ak(d,e.V,function(){return gk(d,e.V,b,c)},null),0):f.u(0)})};function hk(a,b){var c;return O(function(d){return 1==d.g?(c=Vd,b==c.pa?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,ak(a,b,function(){return gk(a,b,0,a.m.duration)},null),4)):a.o?E(d,ak(a,c.V,function(){return gk(a,c.V,0,a.m.duration)},null),0):d.u(0)})}
|
|
385
|
+
r.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Vd,a==c.pa?d.return():E(d,ak(b,a,function(){b.i.currentTime-=.001;Sj(b,a)},null),2)):b.o?E(d,ak(b,c.V,function(){var e=c.V;b.i.currentTime-=.001;Sj(b,e)},null),0):d.u(0)})};
|
|
386
|
+
function ik(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Vd;if(b==l.pa)return f||(a.g.s=c),te(a.g,d,e),p.return();m=[];return E(p,jk(a,b,g,h,k),2)}n=p.h;n||(m.push(ak(a,b,function(){return bk(a,b)},null)),a.o&&m.push(ak(a,l.V,function(){return bk(a,l.V)},null)));f||(m.push(ak(a,b,function(){return ck(a,b,c)},null)),a.o&&m.push(ak(a,l.V,function(){return ck(a,l.V,c)},null)));m.push(ak(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Sj(a,
|
|
387
|
+
b)},null));a.o&&m.push(ak(a,l.V,function(){var q=l.V;a.h[q].appendWindowStart=0;a.h[q].appendWindowEnd=e;a.h[q].appendWindowStart=d;Sj(a,q)},null));return E(p,Promise.all(m),0)})}
|
|
388
|
+
function kk(a,b,c){var d;return O(function(e){if(1==e.g){d=Vd;if(b==d.pa)return e.return();b==d.ea&&(a.ya=new Zf);ak(a,b,function(){return bk(a,b)},null);a.o&&ak(a,d.V,function(){return bk(a,d.V)},null);return E(e,ak(a,b,function(){return ck(a,b,c)},null),2)}return a.o?E(e,ak(a,d.V,function(){return ck(a,d.V,c)},null),0):e.u(0)})}r.endOfStream=function(a){var b=this;return O(function(c){return E(c,lk(b,function(){Tj(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
|
|
389
|
+
r.Wa=function(a){var b=this;return O(function(c){return E(c,lk(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new Zf,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.da=a}),0)})};r.getDuration=function(){return this.m.duration};function gk(a,b,c,d){d<=c?Sj(a,b):a.h[b].remove(c,d)}function bk(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Sj(a,b)}
|
|
390
|
+
function ck(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Sj(a,b)}function Sj(a,b){if(!a.C){var c=a.l[b][0];c&&(c.p.resolve(),mk(a,b))}}function ak(a,b,c,d){Bg(a.J);c={start:c,p:new Zf,uri:d};a.l[b].push(c);1==a.l[b].length&&nk(a,b);return c.p}
|
|
391
|
+
function lk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.J);c=[];d={};for(e in a.h)d.Tc=new Zf,f={start:function(m){return function(){return m.Tc.resolve()}}(d),p:d.Tc,uri:null},a.l[e].push(f),c.push(d.Tc),1==a.l[e].length&&f.start(),d={Tc:d.Tc};ta(l,2);return E(l,Promise.all(c),4);case 4:va(l,3);break;case 2:throw g=za(l),g;case 3:return ta(l,5,6),E(l,b(),6);case 6:Aa(l);for(h in a.h)mk(a,h);Da(l,0);break;case 5:throw k=za(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
|
|
392
|
+
null);}})}function mk(a,b){a.l[b].shift();nk(a,b)}function nk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),mk(a,b)}}function dk(a,b,c,d,e){var f=null==c,g=a.Ea[d];c=a.ba.Gh();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Nc(c),f=$c()||Yc()||hd()||Xc()&&md()&&c;f&&"mp4"==ce(a.G[d])&&(b=ui(b,e));return b}
|
|
393
|
+
function ok(a,b,c,d){return ak(a,b,function(){b!==Td&&(ob()&&(a.j[b]&&(a.j[b].destroy(),delete a.j[b]),d&&(a.j[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Sj(a,b))},null)}
|
|
394
|
+
function pk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J;return O(function(I){switch(I.g){case 1:c=Vd;a.C=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.va&&(a.i.autoplay=!1);ua(I,2);a.s.ob();g=[];for(h in a.j)g.push(a.j[h].destroy());for(k in a.l)for(l=a.l[k],m=l[0],a.l[k]=l.slice(0,1),m&&g.push(m.p.catch(ye)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())q=p.value,q.p.reject(new T(2,7,7003,void 0));for(u in a.h){w=a.h[u];try{a.m.removeSourceBuffer(w)}catch(F){}}return E(I,
|
|
395
|
+
Promise.all(g),4);case 4:return a.j={},a.h={},v=a.m.duration,a.L=new Zf,a.m=Lj(a,a.L),E(I,a.L,5);case 5:!isNaN(v)&&v?a.m.duration=v:!isNaN(a.da)&&a.da&&(a.m.duration=a.da),A=new Zf,y=a.m.sourceBuffers,B=b.size,z=0,C=function(){z++;z===B&&(A.resolve(),a.s.Hb(y,"addsourcebuffer",C))},a.s.D(y,"addsourcebuffer",C),D=t(b.keys()),K=D.next();case 6:if(K.done)return a.i.currentTime=d,E(I,A,2);G=K.value;J=b.get(G);return E(I,Pj(a,G,J,J.codecs),9);case 9:a.o?(a.l[c.V]=[],a.l[c.ea]=[]):a.l[G]=[];K=D.next();
|
|
395
396
|
I.u(6);break;case 2:Aa(I),a.C=!1,Bg(a.J),a.s.sa(a.i,"canplaythrough",function(){a.J.g||(a.i.autoplay=e,f||a.i.play())}),Da(I,0)}})}function qk(a,b){return lk(a,function(){return pk(a,b)})}
|
|
396
|
-
function jk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,
|
|
397
|
-
a.
|
|
397
|
+
function jk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,A,y,B;return O(function(z){if(1==z.g){f=Vd;if(b==f.pa)return z.return(!1);g=ke(ne(a.G[b]));h=me(a.G[b]);l=!1;m=Xd(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&Yd.includes(m))n=!0;n&&(p=Zd(c,d),q=mc(p))&&(k=q(),u=Rd(f.V,(d||"").split(",")),w=Rd(f.ea,(d||"").split(",")),u&&w?(l=!0,v=w,b==f.V&&(v=u),m=k.convertCodecs(b,Zd(c,v))):m=k.convertCodecs(b,p));A=ke(ne(m));y=me(m);if(g===A&&h===y)return a.j[b]&&!k?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&k?a.j[b]=
|
|
398
|
+
k:k&&(a.j[b]&&a.j[b].transmux!=k.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=k):k.destroy()),z.return(!1);B=!0;if(a.o||l&&k&&!a.j[b])B=!1;if(B&&"smooth"===a.A.codecSwitchingStrategy&&ob())return E(z,ok(a,b,m,k),3);k&&k.destroy();return E(z,qk(a,e),3)}return z.return(!0)})}
|
|
399
|
+
function rk(a,b,c,d){if(b==Td)var e=!1;else{e=ke(ne(a.G[b]));var f=me(a.G[b]),g=Xd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Yd.includes(g))h=!0;c=Zd(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ke(ne(g));g=me(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.o:!1}var Nj=window.URL.createObjectURL,Rj="sequence";function sk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}r=sk.prototype;r.getDuration=function(){return this.j};r.Jh=function(){return this.g};r.Tg=function(a){this.i=a};r.Wa=function(a){this.j=a};r.Oh=function(){return this.i};r.Rg=function(a){this.A=a};r.mc=function(a){this.F=a};r.ye=function(a){this.m=a};r.ae=function(){return this.m};r.Qf=function(a){this.s=a};r.Bh=function(){return this.s};
|
|
398
400
|
r.Hg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.pe(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
399
|
-
r.
|
|
400
|
-
r.pe=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.zf=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.U=function(){return Infinity==this.j&&!this.F};r.
|
|
401
|
-
r.Nb=function(){return this.U()||this.
|
|
402
|
-
r.Qg=function(a){this.H=a};S("shaka.media.PresentationTimeline",sk);sk.prototype.setAvailabilityTimeOffset=sk.prototype.Qg;sk.prototype.usingPresentationStartTime=sk.prototype.ah;sk.prototype.getSeekRangeEnd=sk.prototype.vb;sk.prototype.getSeekRangeStart=sk.prototype.Mb;sk.prototype.getSafeSeekRangeStart=sk.prototype.
|
|
403
|
-
sk.prototype.isInProgress=sk.prototype.
|
|
404
|
-
sk.prototype.getDelay=sk.prototype.Bh;sk.prototype.setDelay=sk.prototype.Qf;sk.prototype.getSegmentAvailabilityDuration=sk.prototype.ae;sk.prototype.setSegmentAvailabilityDuration=sk.prototype.ye;sk.prototype.setStatic=sk.prototype.
|
|
401
|
+
r.yd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.pe(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.he=function(){this.o=!0};r.hi=function(){return this.o};r.Sg=function(a){this.B=a};r.Fh=function(){return this.B};
|
|
402
|
+
r.pe=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.zf=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.U=function(){return Infinity==this.j&&!this.F};r.hc=function(){return Infinity!=this.j&&!this.F};r.jb=function(){return Math.max(this.G,this.Nb()-this.m)};r.Xg=function(a){this.G=a};
|
|
403
|
+
r.Nb=function(){return this.U()||this.hc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};r.nd=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Nb()-this.m+a,this.vb()))};r.Mb=function(){return this.nd(0)};r.vb=function(){return Math.max(0,this.Nb()-(this.U()||this.hc()?this.s:0))};r.ah=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
|
|
404
|
+
r.Qg=function(a){this.H=a};S("shaka.media.PresentationTimeline",sk);sk.prototype.setAvailabilityTimeOffset=sk.prototype.Qg;sk.prototype.usingPresentationStartTime=sk.prototype.ah;sk.prototype.getSeekRangeEnd=sk.prototype.vb;sk.prototype.getSeekRangeStart=sk.prototype.Mb;sk.prototype.getSafeSeekRangeStart=sk.prototype.nd;sk.prototype.getSegmentAvailabilityEnd=sk.prototype.Nb;sk.prototype.setUserSeekStart=sk.prototype.Xg;sk.prototype.getSegmentAvailabilityStart=sk.prototype.jb;
|
|
405
|
+
sk.prototype.isInProgress=sk.prototype.hc;sk.prototype.isLive=sk.prototype.U;sk.prototype.offset=sk.prototype.offset;sk.prototype.notifyMaxSegmentDuration=sk.prototype.zf;sk.prototype.notifyMinSegmentStartTime=sk.prototype.pe;sk.prototype.getInitialProgramDateTime=sk.prototype.Fh;sk.prototype.setInitialProgramDateTime=sk.prototype.Sg;sk.prototype.isStartTimeLocked=sk.prototype.hi;sk.prototype.lockStartTime=sk.prototype.he;sk.prototype.notifySegments=sk.prototype.yd;sk.prototype.notifyTimeRange=sk.prototype.Hg;
|
|
406
|
+
sk.prototype.getDelay=sk.prototype.Bh;sk.prototype.setDelay=sk.prototype.Qf;sk.prototype.getSegmentAvailabilityDuration=sk.prototype.ae;sk.prototype.setSegmentAvailabilityDuration=sk.prototype.ye;sk.prototype.setStatic=sk.prototype.mc;sk.prototype.setClockOffset=sk.prototype.Rg;sk.prototype.getPresentationStartTime=sk.prototype.Oh;sk.prototype.setDuration=sk.prototype.Wa;sk.prototype.setPresentationStartTime=sk.prototype.Tg;sk.prototype.getMaxSegmentDuration=sk.prototype.Jh;
|
|
405
407
|
sk.prototype.getDuration=sk.prototype.getDuration;function tk(a,b,c){this.j=c;this.l=a;this.s=uk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}tk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function vk(a,b){a.i=b}function wk(a){this.g=a}function uk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Li(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 xk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new hb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return yk(f)});this.m=(new Tc(function(){yk(f)})).Xa(this.s.gapJumpTimerTime)}xk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};xk.prototype.Cf=function(){this.o=!0;yk(this)};
|
|
406
408
|
function yk(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=uk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Mi(c,b,a.s.gapDetectionThreshold),
|
|
407
409
|
null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Yc())e=Math.ceil(100*(e+.01))/100;e>=a.B.vb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function zk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ak.value().get(b),c.sa(a,b,d))}var Ak=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new hb;this.i=new Ck(a);zk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Dk(e,e.j())})}Bk.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 Ek(a){return a.o?a.g.currentTime:a.j()}
|
|
@@ -411,68 +413,68 @@ r.Qd=function(){return(this.j?this.h.currentTime:this.g)||0};r.fg=function(){ret
|
|
|
411
413
|
function Jk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Kk(a,c,f);this.j=new xk(a,b.presentationTimeline,c,this.o,f);this.h=new Bk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Ek(g.h);h=Lk(g,k);if(.001<Math.abs(h-k)){k=!1;if(!fd()||fd()&&nd())k=!0;else{var l=Date.now()/1E3;if(!g.s||g.s<l-1)g.s=l,k=!0}if(k){Fk(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},
|
|
412
414
|
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Mb():g.g.vb():0>h&&(h=g.g.vb()+h);return Mk(g,Nk(g,h))});this.m=new Tc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ek(g.h),k=g.g.Mb(),l=g.g.vb();3>l-k&&(k=l-3);h<k&&(h=Lk(g,h),g.i.currentTime=h)}})}r=Jk.prototype;r.Ke=function(){this.m.Xa(.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.A=function(){}};
|
|
413
415
|
r.Le=function(a){Fk(this.h,a)};r.Qd=function(){var a=Ek(this.h);return 0<this.i.readyState&&!this.i.paused?Nk(this,a):a};r.fg=function(){return this.o?this.o.o:0};r.eg=function(){return this.j.C};r.Gg=function(){this.j.Cf()};function Mk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
414
|
-
function Lk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Mb(),f=a.g.vb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.
|
|
415
|
-
function Kk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new tk(new wk(a),b.stallThreshold,c);vk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ok(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Ok.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.ni=function(){this.o=!0};r.
|
|
416
|
+
function Lk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Mb(),f=a.g.vb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.nd(c),k=a.g.nd(d);c=a.g.nd(c+d);return b>=g?Mk(a,b):b>f?f:b<e?Ji(a.i.buffered,k)?k:c:b>=h||Ji(a.i.buffered,b)?b:c}function Nk(a,b){var c=a.g.Mb();if(b<c)return c;a=a.g.vb();return b>a?a:b}
|
|
417
|
+
function Kk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new tk(new wk(a),b.stallThreshold,c);vk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ok(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Ok.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.ni=function(){this.o=!0};r.Xb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
416
418
|
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};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)};
|
|
417
|
-
r.le=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};r.
|
|
418
|
-
r.
|
|
419
|
+
r.le=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};r.xd=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.le(a);this.Ma(b)};r.Ma=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}};
|
|
420
|
+
r.wc=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],b=new Ai(a.startTime,b,a.C,a.Da,a.na,a.ca,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
|
|
419
421
|
r.ze=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Tc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Xa(a))};Ok.prototype[Symbol.iterator]=function(){return this.Ab(0)};
|
|
420
422
|
Ok.prototype.Ab=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return $a("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Pk(this,d,f,c)};function Qk(a,b,c){a=new Ai(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Ok([a])}
|
|
421
|
-
S("shaka.media.SegmentIndex",Ok);Ok.forSingleSegment=Qk;Ok.prototype.getIteratorForTime=Ok.prototype.Ab;Ok.prototype.updateEvery=Ok.prototype.ze;Ok.prototype.fit=Ok.prototype.
|
|
423
|
+
S("shaka.media.SegmentIndex",Ok);Ok.forSingleSegment=Qk;Ok.prototype.getIteratorForTime=Ok.prototype.Ab;Ok.prototype.updateEvery=Ok.prototype.ze;Ok.prototype.fit=Ok.prototype.wc;Ok.prototype.evict=Ok.prototype.Ma;Ok.prototype.mergeAndEvict=Ok.prototype.xd;Ok.prototype.offset=Ok.prototype.offset;Ok.prototype.get=Ok.prototype.get;Ok.prototype.find=Ok.prototype.find;Ok.prototype.markImmutable=Ok.prototype.ni;Ok.prototype.release=Ok.prototype.release;Ok.prototype.getNumEvicted=Ok.prototype.getNumEvicted;
|
|
422
424
|
Ok.prototype.getNumReferences=Ok.prototype.getNumReferences;function Pk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Pk.prototype.Kc=function(a){this.reverse=a};Pk.prototype.vh=function(){return this.h};Pk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
423
425
|
Pk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Pk);Pk.prototype.next=Pk.prototype.next;Pk.prototype.current=Pk.prototype.current;Pk.prototype.currentPosition=Pk.prototype.vh;
|
|
424
|
-
Pk.prototype.setReverse=Pk.prototype.Kc;function Rk(){Ok.call(this,[]);this.h=[]}pa(Rk,Ok);r=Rk.prototype;r.clone=function(){var a=new Rk;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.
|
|
425
|
-
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;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.le=function(){};r.Ma=function(){};r.
|
|
426
|
-
Rk.prototype.offset=Rk.prototype.offset;Rk.prototype.get=Rk.prototype.get;Rk.prototype.find=Rk.prototype.find;Rk.prototype.forEachTopLevelReference=Rk.prototype.
|
|
427
|
-
function dl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ab(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.na&&(c=!1);2==b.
|
|
426
|
+
Pk.prototype.setReverse=Pk.prototype.Kc;function Rk(){Ok.call(this,[]);this.h=[]}pa(Rk,Ok);r=Rk.prototype;r.clone=function(){var a=new Rk;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.Xb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Xb(a)};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.getNumEvicted()+d.getNumReferences()}return null};
|
|
427
|
+
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;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.le=function(){};r.Ma=function(){};r.xd=function(){};r.wc=function(){};r.ze=function(){};S("shaka.media.MetaSegmentIndex",Rk);Rk.prototype.updateEvery=Rk.prototype.ze;Rk.prototype.fit=Rk.prototype.wc;Rk.prototype.mergeAndEvict=Rk.prototype.xd;Rk.prototype.evict=Rk.prototype.Ma;Rk.prototype.merge=Rk.prototype.le;
|
|
428
|
+
Rk.prototype.offset=Rk.prototype.offset;Rk.prototype.get=Rk.prototype.get;Rk.prototype.find=Rk.prototype.find;Rk.prototype.forEachTopLevelReference=Rk.prototype.Xb;Rk.prototype.release=Rk.prototype.release;function Sk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.$d();this.h=new Tc(function(){b.g.Fg(.25*b.i)})}Sk.prototype.release=function(){this.set(this.$b());this.h&&(this.h.stop(),this.h=null);this.g=null};Sk.prototype.set=function(a){this.i=a;Tk(this)};Sk.prototype.$b=function(){return this.g.$b()};function Tk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.$d()!=b&&a.g.Tf(b);return}catch(c){}a.h.Xa(.25);0!=a.g.$d()&&a.g.Tf(0)};function Uk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Tc(function(){Vk(b,!1)})).Xa(.25)}Uk.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 Vk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Wk(){this.g=null;this.h=[]}function Xk(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 Yk(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 Zk(){this.i=this.h=null;this.g=[]}function $k(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 al(){this.Rd=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.J=this.K=this.l=this.o=NaN;this.g=new Wk;this.h=new Zk};function bl(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function cl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
429
|
+
function dl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ab(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.na&&(c=!1);2==b.dc()&&(c=!1);c&&b.ca&&el(a,b.ca);c&&!a.h.has(b)&&(c=new fl(a.l),gl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.zd&&b.ge)break}hl(a)}}function el(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return zi(d,b)})){var c=new fl(a.l);gl(c,b,a.i);a.j.set(b,c)}}
|
|
428
430
|
function il(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&jl(a,c)}function kl(a){il(a,a.h);il(a,a.j);a.g=null}bl.prototype.Ma=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&jl(this,d);b&&hl(this)};bl.prototype.Kc=function(a){this.o=a;this.g&&this.g.Kc(a)};
|
|
429
|
-
function hl(a){for(var b=Array.from(a.h.keys()),c={},d=t(a.j.keys()),e=d.next();!e.done;c={
|
|
430
|
-
function gl(a,b,c){var d=new Uint8Array(0);a.te=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Md(d,e):d=e,a.Uf?E(f,a.Uf(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}fl.prototype.abort=function(){this.te&&this.te.abort()};function nl(a){ig.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Tc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Xa(2)}pa(nl,ig);nl.prototype.release=function(){this.g.clear();this.h.stop();ig.prototype.release.call(this)};function ol(a){ig.call(this);this.g=new Map;this.h=a}pa(ol,ig);ol.prototype.release=function(){this.g.clear();ig.prototype.release.call(this)};function pl(a,b){var c=a.g.get(b);c||(c={
|
|
431
|
-
ol.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.
|
|
432
|
-
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.lg=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function rl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.
|
|
431
|
+
function hl(a){for(var b=Array.from(a.h.keys()),c={},d=t(a.j.keys()),e=d.next();!e.done;c={Ld:c.Ld},e=d.next())c.Ld=e.value,b.some(function(f){return function(g){return zi(g.ca,f.Ld)}}(c))||jl(a,c.Ld)}function ll(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&jl(a,d)}hl(a)}function ml(a,b){b&&b!==a.i&&(kl(a),a.i=b)}function jl(a,b){var c=a.h;b instanceof yi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function fl(a){this.g=a;this.te=this.Uf=null}
|
|
432
|
+
function gl(a,b,c){var d=new Uint8Array(0);a.te=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Md(d,e):d=e,a.Uf?E(f,a.Uf(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}fl.prototype.abort=function(){this.te&&this.te.abort()};function nl(a){ig.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Tc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Xa(2)}pa(nl,ig);nl.prototype.release=function(){this.g.clear();this.h.stop();ig.prototype.release.call(this)};function ol(a){ig.call(this);this.g=new Map;this.h=a}pa(ol,ig);ol.prototype.release=function(){this.g.clear();ig.prototype.release.call(this)};function pl(a,b){var c=a.g.get(b);c||(c={Cd:[],lg:null,contentType:b},a.g.set(b,c));return c}function ql(a,b,c){var d=pl(a,b.contentType);rl(a,d);a={yf:b,position:c};d=d.Cd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
433
|
+
ol.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.Cd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.yf;break a}}d=null}if(e=d)e=c.lg,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);
|
|
434
|
+
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.lg=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function rl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Cd;b.Cd=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.Cd=[]};function sl(a,b,c,d,e){a=qg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function tl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.J=null;this.A=!1;this.l=new Ag(function(){return ul(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null};this.N=0;this.L=Infinity}r=tl.prototype;r.destroy=function(){return this.l.destroy()};
|
|
433
435
|
function ul(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,vl(e),b.push(wl(e)),e.S&&(kl(e.S),e.S=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,kl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;H(k)})}
|
|
434
436
|
r.configure=function(a){this.h=a;this.J=new Wf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.S&&(kl(b.S),b.S=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,kl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Td))&&
|
|
435
437
|
b.S&&(kl(b.S),b.S=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.S&&(kl(b.S),b.S=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.S?(ll(c.S,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(kl(c.S),c.S=null)):0<a.segmentPrefetchLimit&&(c.S=xl(this,c.stream));a.disableAudioPrefetch||yl(this)};function zl(a,b,c){a.m.presentationTimeline.U()||(a.N=b,a.L=c)}
|
|
436
438
|
r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,Al(b,a||new Map),2);Bg(b.l);b.C=!0;H(c)})};function Bl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Vd,a.H++,d=a.H,ta(l,2),E(l,hk(a.g.Z,c.pa),4);case 4:va(l,3);break;case 2:if(e=za(l),a.g)a.g.onError(e);case 3:f=Xd(b.mimeType,b.codecs),Qj(a.g.Z,f,a.m.sequenceMode,b.external),g=a.g.Z.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=Cl(a,b),a.i.set(c.pa,k),Dl(a,k,0)),H(l)}})}
|
|
437
|
-
function El(a){var b=a.i.get(Td);b&&(vl(b),wl(b).catch(function(){}),a.i.delete(Td));a.s=null}function Fl(a,b){for(var c=0>a.g.ab(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.fa&&e.fa.Kc(c),e.S&&e.S.Kc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Kc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.
|
|
439
|
+
function El(a){var b=a.i.get(Td);b&&(vl(b),wl(b).catch(function(){}),a.i.delete(Td));a.s=null}function Fl(a,b){for(var c=0>a.g.ab(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.fa&&e.fa.Kc(c),e.S&&e.S.Kc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Kc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.lc&&(Gl(a,b,!1,0,!1),c.lc=d);else if(b=c.lc)c.lc=null,Gl(a,b,!0,0,!1)}
|
|
438
440
|
function Hl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.C&&(b.video&&Gl(a,b.video,c,d,e,f),b.audio&&Gl(a,b.audio,c,d,e,f))}function Il(a,b){O(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();Gl(a,b,!0,0,!1);H(c)})}
|
|
439
|
-
function Gl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Td?g&&(g.
|
|
441
|
+
function Gl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Td?g&&(g.lc&&(b.trickModeVideo?(g.lc=b,b=b.trickModeVideo):g.lc=null),g.stream!=b||e)&&(a.o.has(b)?g.S=a.o.get(b):g.S&&ml(g.S,b),b.type==Td&&(e=Xd(b.mimeType,b.codecs),Qj(a.g.Z,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.fa=null,g.gg=!!f,c?g.cd?g.Ae=!0:g.Oa?(g.Rb=!0,g.Vd=d,g.Ae=!0):(vl(g),Jl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Oa||g.qb||Dl(a,g,0),
|
|
440
442
|
Kl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Bl(a,b)}
|
|
441
|
-
function Kl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.gb)return e.return();c=b.stream;d=b.gb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.gb!=d||b.stream!=c)return e.return();var f=a.g.Zd();var g=Wj(a.g.Z,b.type),h=b.stream.segmentIndex.find(b.
|
|
443
|
+
function Kl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.gb)return e.return();c=b.stream;d=b.gb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.gb!=d||b.stream!=c)return e.return();var f=a.g.Zd();var g=Wj(a.g.Z,b.type),h=b.stream.segmentIndex.find(b.Ua?b.Ua.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.na?k.na-k.Da:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.na?k.na-k.Da:null)||0),k=a.g.getBandwidthEstimate(),
|
|
442
444
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.gb.h.g>h?!0:!1):f=!1;f&&b.gb.abort();H(e)})}
|
|
443
|
-
r.
|
|
444
|
-
function Ll(a,b){b.
|
|
445
|
-
function Al(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Vd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.V,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.
|
|
446
|
-
b.get(l.id),cl(n,function(q,u,
|
|
445
|
+
r.Dd=function(){if(this.g)for(var a=this.g.Zd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.Z;e.C?e=!1:d==Td?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Vj(e,d),e=Ji(e,a));if(!e){c.S&&(c.S.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.fa=null;(null!=Wj(this.g.Z,d)||c.Oa)&&Ll(this,c);c.gb&&(c.gb.abort(),c.gb=null);d===Td&&(d=this.g.Z,d.H&&d.H.g());c.Dd=!0}}};
|
|
446
|
+
function Ll(a,b){b.cd||b.Rb||(b.Oa?(b.Rb=!0,b.Vd=0):null==Uj(a.g.Z,b.type)?null==b.qb&&Dl(a,b,0):(vl(b),Jl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
447
|
+
function Al(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Vd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.V,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ea,a.j.video),e.add(a.j.video));a.s&&(d.set(c.pa,a.s),e.add(a.s));f=a.g.Z;return E(p,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}Bg(a.l);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Cl(a,l),b.has(l.id)&&(n=
|
|
448
|
+
b.get(l.id),cl(n,function(q,u,w){return Ml(q,u,w||null,a.h.retryParameters,a.g.Db)}),m.S=n),a.i.set(k,m),Dl(a,m,0));H(p)})}function Cl(a,b){return{stream:b,type:b.type,fa:null,S:xl(a,b),Ua:null,Cc:null,vf:null,tf:null,rf:null,lc:null,endOfStream:!1,Oa:!1,qb:null,Rb:!1,Vd:0,Ae:!1,cd:!1,Dd:!0,If:!1,rd:!1,gb:null}}
|
|
447
449
|
function xl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Td&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Td&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.S)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new bl(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ml(d,e,f||null,a.h.retryParameters,a.g.Db)},0>a.g.ab()):null}
|
|
448
|
-
function yl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={
|
|
449
|
-
(d.
|
|
450
|
-
function Nl(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Bg(a.l);if(b.
|
|
450
|
+
function yl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Pa:d.Pa},f=e.next())if(d.Pa=f.value,d.Pa.audio)if(a.o.has(d.Pa.audio)){if(f=a.o.get(d.Pa.audio),ll(f,b),!(0<b&&c.some(function(h){return function(k){return Be(h.Pa.audio.language,k)}}(d)))){var g=a.i.get(d.Pa.audio.type);f!==(g&&g.S)&&kl(f);a.o.delete(d.Pa.audio)}}else 0>=b||!c.some(function(h){return function(k){return Be(h.Pa.audio.language,k)}}(d))||!(f=xl(a,d.Pa.audio))||
|
|
451
|
+
(d.Pa.audio.segmentIndex||d.Pa.audio.createSegmentIndex(),a.o.set(d.Pa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Z.Wa(a):this.g.Z.Wa(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
452
|
+
function Nl(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Bg(a.l);if(b.Oa||null==b.qb||b.cd)return h.return();b.qb=null;if(!b.Rb){h.u(2);break}return E(h,Jl(a,b,b.Ae,b.Vd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return E(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Oa||b.qb||Dl(a,b,0),h.return();case 4:ta(h,6);d=Ol(a,b);null!=d&&(Dl(a,b,d),b.rd=!1);va(h,7);break;case 6:return e=
|
|
451
453
|
za(h),E(h,Pl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.Z.endOfStream(),10);case 10:Bg(a.l),g=a.g.Z.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Wa(g),H(h)}})}
|
|
452
|
-
function Ol(a,b){if(Ql(b))return ek(a.g.Z,b.stream.originalId||""),null;b.type==Td&&fk(a.g.Z);if(!a.g.Z.xa&&b.type!=Td)return a.h.updateIntervalSeconds/2;var c=a.g.Zd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ma(c,!0),dl(e,c);d=b.
|
|
453
|
-
!0,"video"==b.type&&(a=a.i.get(Td))&&Ql(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Rl(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,Ql(h)||h.fa&&!h.fa.current()||(f=Math.min(f,h.
|
|
454
|
-
return null}function Rl(a,b,c,d){if(b.fa)return b.fa.current();if(b.
|
|
455
|
-
function Sl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,
|
|
456
|
-
ta(I,2);n=Ul(n,C);D=!1;K=0;(new Jg).box("mdat",function(
|
|
457
|
-
|
|
458
|
-
!0,1==B.category&&b.S&&jl(b.S,d),B.severity=2,E(
|
|
459
|
-
function Ul(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Xl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.If})){if(0<a.h.maxDisabledTime&&a.g.Xd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.
|
|
460
|
-
function Tl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,
|
|
461
|
-
null,Ll(a,n);case 3:return p=function(){var A,
|
|
462
|
-
|
|
463
|
-
Tg).box("dvav",Tg).box("dva1",Tg).box("dvh1",Tg).box("dvhe",Tg).box("vexu",Qg).box("proj",Qg).P("prji",function(J){J=J.reader.
|
|
464
|
-
c.
|
|
465
|
-
function Vl(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p;return O(function(q){switch(q.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.F;if(l||m)k=new Jg;l&&k.P("emsg",function(u){var
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
a.F=!0}});(l||m)&&k.parse(f);return E(q,$l(a,b,c),2);case 2:return Bg(a.l),n=b.
|
|
454
|
+
function Ol(a,b){if(Ql(b))return ek(a.g.Z,b.stream.originalId||""),null;b.type==Td&&fk(a.g.Z);if(!a.g.Z.xa&&b.type!=Td)return a.h.updateIntervalSeconds/2;var c=a.g.Zd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ma(c,!0),dl(e,c);d=b.Ua?b.Ua.endTime:c;e=Xj(a.g.Z,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Wj(a.g.Z,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
455
|
+
!0,"video"==b.type&&(a=a.i.get(Td))&&Ql(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Rl(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,Ql(h)||h.fa&&!h.fa.current()||(f=Math.min(f,h.Ua?h.Ua.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.S&&b.fa&&!a.o.has(b.stream)&&(b.S.Ma(e.startTime),dl(b.S,e.startTime));Sl(a,b,c,e).catch(function(){});
|
|
456
|
+
return null}function Rl(a,b,c,d){if(b.fa)return b.fa.current();if(b.Ua||d)return b.fa=b.stream.segmentIndex.Ab(b.Ua?b.Ua.endTime:d,!1,0>a.g.ab()),b.fa&&b.fa.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.ab();var f=null;d&&(b.fa=b.stream.segmentIndex.Ab(e,!1,a),f=b.fa&&b.fa.next().value);f||(b.fa=b.stream.segmentIndex.Ab(c,!1,a),f=b.fa&&b.fa.next().value);return f}
|
|
457
|
+
function Sl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B;return O(function(z){switch(z.g){case 1:e=Vd;f=b.stream;g=b.fa;b.Oa=!0;ta(z,2);if(2==d.dc())throw new T(1,1,1011);return E(z,Tl(a,b,d),4);case 4:Bg(a.l);if(a.A)return z.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),q=p=!1,w=function(C){var D,K,G,J;return O(function(I){switch(I.g){case 1:if(p)return I.return();q=!0;Bg(a.l);if(a.A)return I.return();
|
|
458
|
+
ta(I,2);n=Ul(n,C);D=!1;K=0;(new Jg).box("mdat",function(F){K=F.size+F.start;D=!0}).parse(n,!1,!0);if(!D){I.u(4);break}G=n.subarray(0,K);n=n.subarray(K);return E(I,Vl(a,b,c,f,d,G,!0),5);case 5:b.S&&b.fa&&dl(b.S,d.startTime,!0);case 4:va(I,0);break;case 2:u=J=za(I),H(I)}})},E(z,Wl(a,b,d,w),9);l=Wl(a,b,d);return E(z,l,7);case 7:m=z.h;Bg(a.l);if(a.A)return z.return();Bg(a.l);return b.Rb?(b.Oa=!1,Dl(a,b,0),z.return()):E(z,Vl(a,b,c,f,d,m),6);case 9:v=z.h;if(u)throw u;if(q){z.u(10);break}p=!0;Bg(a.l);return a.A?
|
|
459
|
+
z.return():b.Rb?(b.Oa=!1,Dl(a,b,0),z.return()):E(z,Vl(a,b,c,f,d,v),10);case 10:b.S&&b.fa&&dl(b.S,d.startTime,!0);case 6:Bg(a.l);if(a.A)return z.return();b.Ua=d;g.next();b.Oa=!1;b.If=!1;A=a.g.Z.ub();y=A[b.type];eb(JSON.stringify(y));b.Rb||a.g.Cf(d,b.stream);Dl(a,b,0);va(z,0);break;case 2:B=za(z);Bg(a.l,B);if(a.A)return z.return();b.Oa=!1;if(7001==B.code)b.Oa=!1,vl(b),Dl(a,b,0),z.u(0);else if(b.type==e.pa&&a.h.ignoreTextStreamFailures)a.i.delete(e.pa),z.u(0);else if(3017==B.code)Xl(a,b,B),z.u(0);else return b.rd=
|
|
460
|
+
!0,1==B.category&&b.S&&jl(b.S,d),B.severity=2,E(z,Pl(a,b,B),0)}})}function Yl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Bb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
|
|
461
|
+
function Ul(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Xl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.If})){if(0<a.h.maxDisabledTime&&a.g.Xd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.rd=!0;a.A=!0;a.g.onError(c);return}b.If=!0}Dl(a,b,4)}
|
|
462
|
+
function Tl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w;return O(function(v){switch(v.g){case 1:d=Vd;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=ke(c.codecs||b.stream.codecs);k=me(c.mimeType||b.stream.mimeType);l=c.timestampOffset;if(l==b.vf&&f==b.tf&&g==b.rf&&h==b.uf&&k==b.Bg){v.u(2);break}m=b.uf&&b.Bg&&rk(a.g.Z,b.type,k,h);if(!m){v.u(3);break}n=null;b.type===d.ea?n=a.i.get(d.V):b.type===d.V&&(n=a.i.get(d.ea));if(!n){v.u(3);break}return E(v,wl(n).catch(function(){}),
|
|
463
|
+
5);case 5:n.Cc=null,Ll(a,n);case 3:return p=function(){var A,y,B;return O(function(z){if(1==z.g)return A=new Map,a.j.audio&&A.set(d.V,a.j.audio),a.j.video&&A.set(d.ea,a.j.video),ta(z,2),b.tf=f,b.rf=g,b.uf=h,b.Bg=k,b.vf=l,y=a.m.sequenceMode||"HLS"==a.m.type,E(z,ik(a.g.Z,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,A),4);if(2!=z.g)return va(z,0);B=za(z);b.tf=null;b.rf=null;b.uf=null;b.vf=null;throw B;})},E(v,p(),2);case 2:return zi(c.ca,b.Cc)||(b.Cc=c.ca,c.l&&c.ca&&(q=Wl(a,
|
|
464
|
+
b,c.ca),u=function(){var A,y,B,z,C,D,K;return O(function(G){switch(G.g){case 1:return ta(G,2),E(G,q,4);case 4:return A=G.h,Bg(a.l),y=null,B=new Map,z={projection:null,hfov:null},C=new Jg,C.box("moov",Qg).box("trak",Qg).box("mdia",Qg).P("mdhd",function(J){y=Wi(J.reader,J.version).timescale}).box("hdlr",function(J){J=J.reader;J.skip(8);switch(J.jc()){case "soun":B.set(d.V,y);break;case "vide":B.set(d.ea,y)}y=null}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("encv",Tg).box("avc1",Tg).box("avc3",
|
|
465
|
+
Tg).box("hev1",Tg).box("hvc1",Tg).box("dvav",Tg).box("dva1",Tg).box("dvh1",Tg).box("dvhe",Tg).box("vexu",Qg).box("proj",Qg).P("prji",function(J){J=J.reader.jc();z.projection=J}).box("hfov",function(J){J=J.reader.O()/1E3;z.hfov=J}).parse(A),Zl(a,z),B.has(b.type)?c.ca.timescale=B.get(b.type):null!=y&&(c.ca.timescale=y),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(G,a.g.ig(b.type,A),5);case 5:return E(G,Zj(a.g.Z,b.type,A,null,b.stream,D),6);case 6:va(G,0);break;case 2:throw K=za(G),b.Cc=
|
|
466
|
+
null,K;}})},a.g.pi(c.startTime,c.ca),e.push(u()))),a.m.sequenceMode&&(w=b.Ua?b.Ua.i:null,c.i!=w&&e.push(kk(a.g.Z,b.type,c.startTime))),E(v,Promise.all(e),0)}})}
|
|
467
|
+
function Vl(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p;return O(function(q){switch(q.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.F;if(l||m)k=new Jg;l&&k.P("emsg",function(u){var w=d.emsgSchemeIdUris;if(0===u.version){var v=u.reader.jc();var A=u.reader.jc();var y=u.reader.O();var B=u.reader.O();var z=u.reader.O();var C=u.reader.O();var D=e.startTime+B/y}else y=u.reader.O(),D=u.reader.Hc()/
|
|
468
|
+
y+e.timestampOffset,B=D-e.startTime,z=u.reader.O(),C=u.reader.O(),v=u.reader.jc(),A=u.reader.jc();u=u.reader.nb(u.reader.getLength()-u.reader.ra());if(w&&w.includes(v)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==v?a.g.ri():(w=(new Map).set("detail",{startTime:D,endTime:D+z/y,schemeIdUri:v,value:A,timescale:y,presentationTimeDelta:B,eventDuration:z,id:C,messageData:u}),w=new U("emsg",w),w.cancelable=!0,a.g.onEvent(w),w.defaultPrevented||"https://aomedia.org/emsg/ID3"!=v&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
469
|
+
v||(v=Si(u),v.length&&e&&a.g.se([{cueTime:e.startTime,data:u,frames:v,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.P("prft",function(u){if(!a.F&&e.ca.timescale){var w=u.reader,v=u.version;w.O();u=w.O();var A=w.O();u=1E3*u+A/Math.pow(2,32)*1E3;0===v?w=w.O():(v=w.O(),w=w.O(),w=v*Math.pow(2,32)+w);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();w=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-w/e.ca.timescale*1E3)});w=new U("prft",w);a.g.onEvent(w);
|
|
470
|
+
a.F=!0}});(l||m)&&k.parse(f);return E(q,$l(a,b,c),2);case 2:return Bg(a.l),n=b.Dd,b.Dd=!1,p=b.gg,b.gg=!1,E(q,a.g.ig(b.type,f),3);case 3:return E(q,Zj(a.g.Z,b.type,f,e,d,h,n,p,g),4);case 4:Bg(a.l),H(q)}})}function $l(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Uj(a.g.Z,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():E(h,a.g.Z.remove(b.type,e,e+g),2)}Bg(a.l);H(h)})}
|
|
469
471
|
function Ql(a){return a&&a.type==Td&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
470
|
-
function Wl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.
|
|
472
|
+
function Wl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.od())return l.return(e);f=null;if(b.S){var m=b.S,n=m.h;c instanceof yi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Uf=d),f=m.te):f=null}f||(f=Ml(c,b.stream,d||null,a.h.retryParameters,a.g.Db));g=0;b.fa&&(g=b.fa.h);b.gb=f;return E(l,f.promise,2);case 2:h=l.h;b.gb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Yl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
471
473
|
function Ml(a,b,c,d,e){var f=a instanceof Ai?a:void 0,g=f?1:0;a=sl(a.M(),a.Da,a.na,d,c);a.contentType=b.type;return e.request(wg,a,{type:g,stream:b,segment:f})}
|
|
472
|
-
function Jl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Rb=!1,b.Ae=!1,b.Vd=0,b.
|
|
474
|
+
function Jl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Rb=!1,b.Ae=!1,b.Vd=0,b.cd=!0,b.Ua=null,b.fa=null,b.S&&!a.o.has(b.stream)&&kl(b.S),d?(e=a.g.Zd(),f=a.g.Z.getDuration(),E(g,a.g.Z.remove(b.type,e+d,f),3)):E(g,hk(a.g.Z,b.type),4);if(3!=g.g)return Bg(a.l),c?E(g,a.g.Z.flush(b.type),3):g.u(3);Bg(a.l);b.cd=!1;b.endOfStream=!1;b.Oa||b.qb||Dl(a,b,0);H(g)})}
|
|
473
475
|
function Dl(a,b,c){var d=b.type;if(d!=Td||a.i.has(d))b.qb=(new Sc(function(){var e;return O(function(f){if(1==f.g)return ta(f,2),E(f,Nl(a,b),4);if(2!=f.g)return va(f,0);e=za(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function vl(a){null!=a.qb&&(a.qb.stop(),a.qb=null)}function wl(a){return O(function(b){return a.gb?E(b,a.gb.abort(),0):b.u(0)})}
|
|
474
476
|
function Pl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Yf(a.J),2);Bg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Xd(b.stream,d),c.handled&&(c.severity=1));if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
|
|
475
|
-
function am(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Vd;if(e=a.i.get(d.V))e.Cc=null,Ll(a,e),wl(e).catch(function(){});if(f=a.i.get(d.
|
|
477
|
+
function am(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Vd;if(e=a.i.get(d.V))e.Cc=null,Ll(a,e),wl(e).catch(function(){});if(f=a.i.get(d.ea))f.Cc=null,Ll(a,f),wl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.V,a.j.audio);a.j.video&&g.set(d.ea,a.j.video);return E(h,qk(a.g.Z,g),2)}return h.return(!0)})}
|
|
476
478
|
function Zl(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function bm(){}
|
|
477
479
|
function cm(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Ke(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ke(n)),m=cm(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?($a("Invalid config, wrong type for "+m),
|
|
478
480
|
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&ab("Unexpected number of arguments for "+m),a[l]=b[l]):($a("Invalid config, unrecognized key "+m),k=!1)}return k}function dm(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 em(a,b){return a&&b}
|
|
@@ -497,8 +499,8 @@ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth
|
|
|
497
499
|
drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(pm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
498
500
|
function qm(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return cm(a,b,c||mm(),d,"")}
|
|
499
501
|
function pm(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Je(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Ce(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
500
|
-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Td&&"image"!=c.type||b.push(c);return b}function nm(a){return em([a],a)}function om(a){return em([a],a)}S("shaka.util.PlayerConfiguration",lm);lm.mergeConfigObjects=qm;lm.createDefault=mm;function rm(a,b,c,d,e){ig.call(this);this.K=a;this.T=b;this.xa=e.networkingEngine;this.W=d;this.o=null;this.rb=c;this.va=0;this.Ka=e.
|
|
501
|
-
function sm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function tm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function um(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=rm.prototype;r.getStartTime=function(){return this.W};r.yc=function(){return this.K};r.jf=function(){return this.h};function vm(a){a.aa=!0;return a.i}function wm(a){a.
|
|
502
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Td&&"image"!=c.type||b.push(c);return b}function nm(a){return em([a],a)}function om(a){return em([a],a)}S("shaka.util.PlayerConfiguration",lm);lm.mergeConfigObjects=qm;lm.createDefault=mm;function rm(a,b,c,d,e){ig.call(this);this.K=a;this.T=b;this.xa=e.networkingEngine;this.W=d;this.o=null;this.rb=c;this.va=0;this.Ka=e.vc;this.B=e.ki;this.ib=e.li;this.g=e.config;this.j=this.C=this.h=null;this.da=!1;this.F=e.vi;this.la=!1;this.l=null;this.ba=!1;this.i=this.A=null;this.aa=!1;this.J=new Map;this.ma=!1;this.ya=e.ui;this.$=new al;this.m=new Zf;this.L=null;this.s=!1;this.Ea=e.nh;this.ga=null;this.Fa=e.mh;this.N=!1;this.H=[];this.G=[]}pa(rm,ig);
|
|
503
|
+
function sm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function tm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function um(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=rm.prototype;r.getStartTime=function(){return this.W};r.yc=function(){return this.K};r.jf=function(){return this.h};function vm(a){a.aa=!0;return a.i}function wm(a){a.da=!0;return a.j}function xm(a){a.la=!0;return a.F}r.getStats=function(){return this.$};
|
|
502
504
|
function ym(a){a.ba=!0;return a.l}function zm(a){a.ma=!0;return a.J}
|
|
503
505
|
r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return ta(c,3),E(c,Am(a),5);case 5:return Bm(a),E(c,Cm(a),6);case 6:Bm(a);a.o||(a.o=new Jf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
|
|
504
506
|
if(a.Fa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ea){d=a.h.presentationTimeline.U();var e=wf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ga=e,e.video&&Dm(a,e.video,d),e.audio&&Dm(a,e.audio,d)}return E(c,void 0,7);case 7:Bm(a);a.m.resolve();va(c,0);break;case 3:b=za(c),a.m.reject(b),H(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):ig.prototype.dispatchEvent.call(this,a)};
|
|
@@ -506,894 +508,895 @@ r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(n
|
|
|
506
508
|
function Am(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Em(a,"manifest-parser");a.j||(a.C=si(a.K,a.T),a.j=a.C(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Em(a,"manifest");if(a.h)return g.u(2);c=a;return E(g,a.j.start(a.K,a.ib),3)}2!=g.g&&(c.h=g.h);d=new U("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new T(2,4,4036);Fm(a.h);e=Date.now()/1E3;f=e-b;a.$.F=f;H(g)})}
|
|
507
509
|
function Cm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Em(a,"drm-engine");a.va=Date.now()/1E3;a.l=a.Ka();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Re(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return E(g,Promise.resolve(),3);case 3:Bm(a),a.dispatchEvent(c);case 2:return d=wf(a.h.variants),E(g,Ih(a.l,d,a.h.offlineSessionIds),4);case 4:return Bm(a),E(g,mi(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return E(g,
|
|
508
510
|
Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}r.configure=function(a,b){a=dm(a,b);qm(this.g,a)};r.getConfiguration=function(){return Ke(this.g)};
|
|
509
|
-
function Dm(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new bl(d,b,function(l,m,n){return Ml(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.W||0;(h=(g=b.segmentIndex.Ab(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.
|
|
510
|
-
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.
|
|
511
|
-
function Fm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",rm);rm.prototype.destroy=rm.prototype.destroy;rm.prototype.waitForFinish=rm.prototype.Wi;function Gm(a,b){ig.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{
|
|
512
|
-
"regionremove",function(d){c.g.delete(d.region)})}pa(Gm,ig);Gm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ig.prototype.release.call(this)};Gm.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?Jm:a>d.endTime?
|
|
513
|
-
function Im(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Jm=1,Hm=2,
|
|
511
|
+
function Dm(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new bl(d,b,function(l,m,n){return Ml(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.W||0;(h=(g=b.segmentIndex.Ab(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&el(e,h.ca):dl(e,h.startTime));H(k)})}r.Wi=function(){return this.m};
|
|
512
|
+
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.da){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return E(e,a.i.stop(),4);case 4:a.F&&!a.la&&a.F.release();if(!a.l||a.ba){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.ma)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,kl(d);H(e)}})};
|
|
513
|
+
function Fm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",rm);rm.prototype.destroy=rm.prototype.destroy;rm.prototype.waitForFinish=rm.prototype.Wi;function Gm(a,b){ig.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{rc:null,qc:Hm,fc:function(d,e){return Im(c,"enter",d,e)}},{rc:Jm,qc:Hm,fc:function(d,e){return Im(c,"enter",d,e)}},{rc:Km,qc:Hm,fc:function(d,e){return Im(c,"enter",d,e)}},{rc:Hm,qc:Jm,fc:function(d,e){return Im(c,"exit",d,e)}},{rc:Hm,qc:Km,fc:function(d,e){return Im(c,"exit",d,e)}},{rc:Jm,qc:Km,fc:function(d,e){return Im(c,"skip",d,e)}},{rc:Km,qc:Jm,fc:function(d,e){return Im(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
|
|
514
|
+
"regionremove",function(d){c.g.delete(d.region)})}pa(Gm,ig);Gm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ig.prototype.release.call(this)};Gm.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?Jm:a>d.endTime?Km:Hm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.rc==e&&h.qc==f&&h.fc(d,b)}}};
|
|
515
|
+
function Im(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Jm=1,Hm=2,Km=3;function Lm(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new sc(a)).Na.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=$m[d])return m.return(e);f=0;g=qg([a],c);ta(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=za(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
514
516
|
e.toLowerCase().split(";").shift():"")}})}
|
|
515
|
-
var
|
|
517
|
+
var $m={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 an(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return an(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=bn(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=bn(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;
|
|
516
518
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
517
|
-
function
|
|
518
|
-
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
|
|
519
|
-
function
|
|
520
|
-
function
|
|
521
|
-
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function
|
|
522
|
-
r.append=function(a){var b=
|
|
523
|
-
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&&(
|
|
524
|
-
function
|
|
525
|
-
|
|
526
|
-
r.append=function(a){var b=[].concat(x(this.h)),c={};a=t(
|
|
527
|
-
r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});
|
|
528
|
-
function
|
|
529
|
-
q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.
|
|
530
|
-
function
|
|
519
|
+
function bn(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";
|
|
520
|
+
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 cn(a,b){var c=[];a=t(dn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(cn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=an(d,b);c.push(e)}return c}
|
|
521
|
+
function dn(a){var b=[],c={};a=t(a);for(var d=a.next();!d.done;c={Id:c.Id},d=a.next())c.Id=d.value,b.some(function(e){return function(f){return bc(e.Id,f)}}(c))||b.push(c.Id);return b}
|
|
522
|
+
function en(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
|
|
523
|
+
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function fn(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=fn.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;gn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
524
|
+
r.append=function(a){var b=cn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={tc:d.tc},e=b.next())d.tc=e.value,a.some(function(f){return function(g){return g.startTime==f.tc.startTime&&g.endTime==f.tc.endTime&&g.text==f.tc.payload?!0:!1}}(d))||(e=en(d.tc))&&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)-
|
|
525
|
+
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&&(gn(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"};
|
|
526
|
+
function gn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",fn);fn.prototype.setTextVisibility=fn.prototype.setTextVisibility;fn.prototype.isTextVisible=fn.prototype.isTextVisible;fn.prototype.destroy=fn.prototype.destroy;fn.prototype.append=fn.prototype.append;fn.prototype.remove=fn.prototype.remove;fn.prototype.configure=fn.prototype.configure;function hn(){}r=hn.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",hn);hn.prototype.setTextVisibility=hn.prototype.setTextVisibility;hn.prototype.isTextVisible=hn.prototype.isTextVisible;hn.prototype.destroy=hn.prototype.destroy;hn.prototype.append=hn.prototype.append;hn.prototype.remove=hn.prototype.remove;hn.prototype.configure=hn.prototype.configure;function jn(){}function kn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",jn);jn.removeAllChildren=kn;function ln(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Tc(function(){d.A.paused||
|
|
527
|
+
mn(d)})).Xa(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new hb;this.j.D(document,"fullscreenchange",function(){mn(d,!0)});this.j.D(this.A,"seeking",function(){mn(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){mn(d,!0)}),this.o.observe(this.g));this.B=new Map}r=ln.prototype;r.configure=function(a){this.C&&this.C.Xa(a.captionsUpdatePeriod)};
|
|
528
|
+
r.append=function(a){var b=[].concat(x(this.h)),c={};a=t(dn(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 bc(f,e.Jd)}}(c))||this.h.push(c.Jd);mn(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
529
|
+
r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});mn(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function nn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
530
|
+
function on(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.dh:null;l&&(g.push(l.Se),l.kc&&g.push(l.kc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?nn(a,n)||(f=!0):(pn(a,k,e),l=a.i.get(k),n=l.dh,f=!0));0<k.nestedCues.length&&n&&on(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
|
|
531
|
+
q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.kc?(d.kc.contains(c)&&d.kc.removeChild(c),c.appendChild(d.kc),d.kc.appendChild(d.Se)):c.appendChild(d.Se)}}function mn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())kn(d.value);kn(a.g);a.i.clear();a.B.clear()}a.m&&on(a,a.h,a.g,c,[])}}
|
|
532
|
+
function pn(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&&qn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Lb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Lb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Lb?"%":"px",l=g.widthUnits==
|
|
531
533
|
Lb?"%":"px",m=g.viewportAnchorUnits==Lb?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";e.style.height=2===g.heightUnits?5.33*g.height+"%":g.height+k;e.style.width=2===g.widthUnits?g.width*h+"%":g.width+l;2===g.viewportAnchorUnits?(k=g.viewportAnchorY/75*100,l=g.viewportAnchorX/(a.l===4/3?160:210)*100,k-=g.regionAnchorY*g.height*5.33/100,l-=g.regionAnchorX*g.width*h/100,e.style.top=k+"%",e.style.left=l+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*
|
|
532
534
|
g.height/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*g.width/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
|
|
533
|
-
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Se:f,dh:e,
|
|
534
|
-
function
|
|
535
|
-
function
|
|
536
|
-
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=
|
|
537
|
-
(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-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=
|
|
538
|
-
32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Vb?(f.width="100%",c.lineAlign==Xb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Vb?f.paddingLeft=c.position:f.paddingTop=c.position);a=
|
|
535
|
+
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Se:f,dh:e,kc:c})}
|
|
536
|
+
function rn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sb?c:"left"===a||"start"===a&&b===Ub||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ub?"line-right":"center"}
|
|
537
|
+
function qn(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=sn(c.linePadding,c,a.s);f.paddingRight=sn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
538
|
+
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=tn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=tn(d,function(m){return m.fontFamily}))&&
|
|
539
|
+
(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-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=sn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Wb&&(g=1,h=16,a.l&&1>a.l&&(h=
|
|
540
|
+
32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Vb?(f.width="100%",c.lineAlign==Xb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Vb?f.paddingLeft=c.position:f.paddingTop=c.position);a=rn(c);"line-left"==
|
|
539
541
|
a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");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==Vb?f.width=c.size+"%":f.height=c.size+"%")}
|
|
540
|
-
function
|
|
541
|
-
|
|
542
|
-
break;case "right":g.push("align:right");break;case Tb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function
|
|
543
|
-
function
|
|
544
|
-
!0;var f=
|
|
545
|
-
function
|
|
546
|
-
function
|
|
547
|
-
function
|
|
548
|
-
function
|
|
549
|
-
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function
|
|
550
|
-
function
|
|
551
|
-
r.getBandwidthEstimate=function(a){var b=this.ug();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function
|
|
552
|
-
|
|
553
|
-
this.Kf=[];this.s=null;this.xa=new Jf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Ea=this.g.preferredTextLanguage;this.
|
|
554
|
-
this.G
|
|
555
|
-
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.cg.stop();if(c.la)return h.u(0);c.dg=c.h;g=c;return E(h,c.ng(!0),3)}g.la=h.h;H(h)})}),this.
|
|
556
|
-
this.
|
|
557
|
-
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==
|
|
558
|
-
null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),ig.prototype.release.call(a),H(g)}})};function
|
|
559
|
-
r.
|
|
560
|
-
}})};r.oh=function(a){this.eh=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==
|
|
561
|
-
r.
|
|
542
|
+
function sn(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 tn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",ln);ln.prototype.setTextVisibility=ln.prototype.setTextVisibility;
|
|
543
|
+
ln.prototype.isTextVisible=ln.prototype.isTextVisible;ln.prototype.remove=ln.prototype.remove;ln.prototype.destroy=ln.prototype.destroy;ln.prototype.append=ln.prototype.append;ln.prototype.configure=ln.prototype.configure;function un(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=cn(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");
|
|
544
|
+
break;case "right":g.push("align:right");break;case Tb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function vn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}vn.prototype.configure=function(a){this.g=a};function wn(a){a.i=!1;a.l=!0;a.j=!1}
|
|
545
|
+
function xn(a,b,c){try{if(!a.g.enabled)return b;var d=yn(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=zn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=An;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=Bn;break a}e=void 0}d.ot=e;d.su=
|
|
546
|
+
!0;var f=Cn(d);return Dn(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function yn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
547
|
+
function En(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,yn(a));c.pr=a.h.ab();var e=c.ot===Fn||c.ot===An;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Gn(a,c);if(d)d=Hn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=Cn(a);f&&(b.uris=b.uris.map(function(g){return Dn(g,f)}))}}}function Gn(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
|
|
548
|
+
function In(a){if(0===a.type)return Jn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?An:Fn;if("audio"==b)return zn;if("text"==b)return"application/mp4"===a.mimeType?Kn:Ln}}function Mn(a,b){b=a.h.ub()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
549
|
+
function Nn(a,b){b=a.h.ub()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function On(a,b){var c=a.h.ec();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 Fn:return a.videoBandwidth||NaN;case zn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
550
|
+
function Cn(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"===
|
|
551
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Hn(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=Cn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
552
|
+
function Dn(a,b){if(!b||a.includes("offline:"))return a;a=new sc(a);a.g.set("CMCD",b);return a.toString()}var Bn="m",zn="a",Fn="v",An="av",Jn="i",Ln="c",Kn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",gh:"s",OTHER:"o"});function Pn(a){this.h=a;this.g=null}r=Pn.prototype;r.configure=function(a){this.h=a};r.vg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Qn)?1E3*this.g.get(Qn):null};r.ug=function(){return this.h.enabled&&this.g&&this.g.has(Rn)?1E3*this.g.get(Rn):null};r.Ph=function(){return this.h.enabled&&this.g&&this.g.has(Sn)?this.g.get(Sn):null};r.Qh=function(){return this.h.enabled&&this.g&&this.g.has(Tn)?this.g.get(Tn):null};
|
|
553
|
+
r.getBandwidthEstimate=function(a){var b=this.ug();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Un(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Pn);Pn.prototype.getBandwidthEstimate=Pn.prototype.getBandwidthEstimate;Pn.prototype.getRoundTripTime=Pn.prototype.Qh;Pn.prototype.getResponseDelay=Pn.prototype.Ph;Pn.prototype.getEstimatedThroughput=Pn.prototype.ug;
|
|
554
|
+
Pn.prototype.getMaxBitrate=Pn.prototype.vg;var Rn="etp",Qn="mb",Sn="rd",Tn="rtt";function Vn(){this.g=null;this.h=[]}function Wn(a,b){return O(function(c){if(1==c.g)return a.g?E(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}Vn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ig.call(this);var c=this;this.l=Xn;this.fe=this.h=null;this.da=!1;this.ue=new hb;this.jd=new hb;this.m=new hb;this.ya=new hb;this.hd=new hb;this.C=this.F=this.A=this.G=null;this.we=0;this.W=new Vn;this.ga=this.Gf=this.$=this.i=this.Fa=this.J=this.j=this.rb=this.K=this.eh=this.aa=this.N=this.fd=this.L=this.ie=this.H=this.ib=null;this.Ka=!1;this.va=this.o=null;this.$f=1E9;this.wd=[];this.T=NaN;this.g=Yn(this);this.ba={width:Infinity,height:Infinity};this.ee=new li(this.g,this.ba,null);
|
|
555
|
+
this.Kf=[];this.s=null;this.xa=new Jf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Ea=this.g.preferredTextLanguage;this.sd=this.g.preferredTextRole;this.pd=this.g.preferForcedSubs;this.kd=[];b&&b(this);this.N=Zn(this);this.aa=new Pn(this.g.cmsd);
|
|
556
|
+
this.G=$n(this);this.G.Rf(this.g.streaming.forceHTTP);this.G.Sf(this.g.streaming.forceHTTPS);this.dg=this.la=this.B=null;this.cg=new Tc(function(){return O(function(d){if(1==d.g)return c.la?E(d,c.uc(c.dg,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.la),4);c.dg.play();c.la=null;H(d)})});ao&&(this.B=ao(),this.B.configure(this.g.ads),this.hd.D(this.B,"ad-started",function(d){var e,f,g;return O(function(h){if(1==h.g){if(c.g.ads.supportsMultipleMediaElements)return h.return();e=d.originalEvent;if(!e)return h.return();
|
|
557
|
+
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.cg.stop();if(c.la)return h.u(0);c.dg=c.h;g=c;return E(h,c.ng(!0),3)}g.la=h.h;H(h)})}),this.hd.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.cg.X(.1)}));this.ue.D(window,"online",function(){bo(c);c.Jf()});this.oe=new Tc(function(){return co(c)});this.ma=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
|
|
558
|
+
this.uc(a,!0))}pa(X,ig);function eo(a){null!=a.K&&(Cj(a.K),a.K.release(),a.K=null)}function fo(a,b){b.lcevc.enabled?(eo(a),null==a.K&&(a.K=new Bj(a.h,a.eh,b.lcevc),a.F&&(a.F.$=a.K))):eo(a)}function go(a,b){return new U(a,b)}r=X.prototype;
|
|
559
|
+
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==ho)return g.return();eo(a);b=a.detach();a.l=ho;return E(g,b,2);case 2:c=[];d=t(a.Kf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.Kf=[];return E(g,Promise.all(c),3);case 3:a.ue&&(a.ue.release(),a.ue=null);a.jd&&(a.jd.release(),a.jd=null);a.m&&(a.m.release(),a.m=null);a.ya&&(a.ya.release(),a.ya=null);a.hd&&(a.hd.release(),a.hd=null);a.va=null;a.g=null;a.s=null;a.fe=null;a.N=null;a.aa=
|
|
560
|
+
null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),ig.prototype.release.call(a),H(g)}})};function io(a,b){a.dispatchEvent(go("onstatechange",(new Map).set("state",b)))}
|
|
561
|
+
r.uc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==ho)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,jo(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(io(c,"attach"),e=function(){var h=ko(c);h&&lo(c,h)},c.jd.D(a,"error",e),c.h=a);if(!b||!Uc()||c.F){g.u(6);break}return E(g,mo(c),6);case 6:Aa(g);c.W.release();Da(g,0);break;case 5:return f=za(g),E(g,c.detach(),10);case 10:throw f;
|
|
562
|
+
}})};r.oh=function(a){this.eh=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==ho)throw new T(2,7,7E3);return E(c,b.oc(!1,a),2)}if(3!=c.g)return E(c,jo(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.jd.ob(),b.h=null),io(b,"detach"),b.B&&!a&&b.B.release()}finally{b.W.release()}H(c)})};function jo(a,b){var c;return O(function(d){return 1==d.g?(c=++a.we,E(d,Wn(a.W,b),2)):c!=a.we?(a.W.release(),d.return(!0)):d.return(!1)})}
|
|
563
|
+
r.oc=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 O(function(p){switch(p.g){case 1:return c.l!=ho&&(c.l=Xn),E(p,jo(c,"unload"),2);case 2:if(p.h)return p.return();ua(p,3);c.Ka=!1;io(c,"unload");a&&!Uc()&&(a=!1);eo(c);d=c.kd.map(function(q){return q()});c.kd=[];return E(p,Promise.all(d),5);case 5:c.dispatchEvent(go("unloading"));c.fd&&(c.fd.release(),c.fd=null);c.h&&(c.m.ob(),c.ya.ob());c.oe.stop();c.ib&&(c.ib.release(),c.ib=null);c.ie&&(c.ie.stop(),c.ie=null);
|
|
562
564
|
if(!c.J){p.u(6);break}return E(p,c.J.stop(),7);case 7:c.J=null,c.Fa=null;case 6:if(!c.o){p.u(8);break}return E(p,c.o.stop(),8);case 8:if(!c.j){p.u(10);break}return E(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!qd("webkit")||!c.A){p.u(12);break}return E(p,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.F){p.u(14);break}return E(p,c.F.destroy(),15);case 15:c.F=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.la&&!b&&(c.la.destroy(),c.la=
|
|
563
|
-
null);b||c.cg.stop();c.N&&
|
|
564
|
-
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.g.streaming.clearDecodingCache&&(cf={},Qc.clear());c.i=null;c.s=new al;c.Wf=null;c.
|
|
565
|
-
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,u,v
|
|
566
|
-
2),E(
|
|
567
|
-
A.h)?(um(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new al;case 11:m=!e;n=e?e.rb:Date.now()/1E3;d.s=e?e.getStats():new al;d.$=f;d.Gf=c||null;if(m)return E(A,k(function(){return O(function(
|
|
568
|
-
e.getConfiguration();d.ee=e.B;d.Fa=e.C;d.J=wm(e);d.
|
|
569
|
-
function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=zm(e),
|
|
570
|
-
k(function(){return O(function(
|
|
571
|
-
function
|
|
572
|
-
r.ng=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,
|
|
573
|
-
function
|
|
574
|
-
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,
|
|
575
|
-
function
|
|
576
|
-
filter:function(
|
|
577
|
-
new U("regionadd",new Map([["region",
|
|
578
|
-
(new Map).set("isLive",a.U());k.dispatchEvent(
|
|
579
|
-
|
|
580
|
-
var
|
|
581
|
-
!qi.includes(Q)}P!=
|
|
582
|
-
nh:f,mh:h};k=new rm(b,d,e,c,D);a.Kf.push(k);return K.return(k)})}function
|
|
583
|
-
function
|
|
584
|
-
function
|
|
585
|
-
function
|
|
586
|
-
|
|
587
|
-
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){I.u(2);break}return E(I,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);
|
|
588
|
-
break}
|
|
589
|
-
|
|
590
|
-
a.m.Hb(e,"timeupdate",J);
|
|
591
|
-
function
|
|
592
|
-
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?me(b):"",codecs:b?ne(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.
|
|
593
|
-
g.codecs)),b.startsWith("audio/")?(g.type=c.V,f.audio=g):f.video=g,a.A.aa=!0,E(h,Ih(a.A,[f],[]),2)):E(h,a.A.
|
|
594
|
-
function
|
|
595
|
-
"ratechange",h),"none"!=d.preload&&a.m.sa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return
|
|
596
|
-
a.m.D(d.textTracks,"change",function(){return
|
|
597
|
-
"change",A);(new Tc(A)).X(1)}),2);if(e)return
|
|
598
|
-
l]),2);if((m=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return
|
|
599
|
-
function
|
|
600
|
-
function
|
|
601
|
-
function
|
|
602
|
-
function
|
|
603
|
-
function
|
|
604
|
-
|
|
605
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}
|
|
606
|
-
if(q.segmentIndex&&m){var
|
|
607
|
-
500,
|
|
608
|
-
function
|
|
609
|
-
function
|
|
610
|
-
function
|
|
611
|
-
function
|
|
612
|
-
function
|
|
613
|
-
function
|
|
614
|
-
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(
|
|
615
|
-
f),f+=b.length;Rh(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},se:function(b,c,d){
|
|
565
|
+
null);b||c.cg.stop();c.N&&wn(c.N);c.aa&&(c.aa.g=null);c.h&&kn(c.h);if(!c.h||!c.h.src){p.u(16);break}return E(p,new Promise(function(q){return(new Tc(q)).X(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.A){p.u(18);break}return E(p,c.A.destroy(),19);case 19:c.A=null;case 18:c.ma&&c.$!=c.ma.yc()&&(c.ma.s||c.ma.destroy(),c.ma=null);c.$=null;c.Gf=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=
|
|
566
|
+
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.g.streaming.clearDecodingCache&&(cf={},Qc.clear());c.i=null;c.s=new al;c.Wf=null;c.wd=[];c.T=NaN;no(c);case 3:Aa(p);c.W.release();Da(p,4);break;case 4:if(a&&Uc()&&!c.F)return E(p,mo(c),0);p.u(0)}})};r.Vi=function(a){this.ga=a};
|
|
567
|
+
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,u,w,v;return O(function(A){switch(A.g){case 1:if(d.l==ho)throw new T(2,7,7E3);e=null;f="";a instanceof rm?(e=a,f=e.yc()||""):f=a||"";return E(A,Wn(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new T(2,7,7002);if(!d.$){A.u(3);break}d.$=f;return E(A,d.oc(!1),3);case 3:g=++d.we;h=function(){return O(function(y){if(1==y.g)return d.we==g?y.u(0):e?E(y,e.destroy(),3):y.u(3);throw new T(2,7,7E3);})};k=function(y,B){return O(function(z){switch(z.g){case 1:return ua(z,
|
|
568
|
+
2),E(z,Wn(d.W,B),4);case 4:return E(z,h(),5);case 5:return E(z,y(),6);case 6:return E(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Aa(z),d.W.release(),Da(z,0)}})};ta(A,5,6);null==b&&e&&(b=e.getStartTime());d.ga=b;d.Ka=!1;d.dispatchEvent(go("loading"));if(e){c=e.T;A.u(8);break}if(c){A.u(8);break}return E(A,k(function(){return O(function(y){if(1==y.g)return E(y,oo(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){um(e,d);d.s=e.getStats();A.u(11);break}return E(A,po(d,f,b,c,!0),12);case 12:(e=
|
|
569
|
+
A.h)?(um(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new al;case 11:m=!e;n=e?e.rb:Date.now()/1E3;d.s=e?e.getStats():new al;d.$=f;d.Gf=c||null;if(m)return E(A,k(function(){return O(function(y){return E(y,qo(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){A.u(15);break}return E(A,k(function(){return O(function(y){return E(y,mo(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return E(A,k(function(){return O(function(y){return E(y,e.m,0)})},"waitForFinish"),17);case 17:d.g=
|
|
570
|
+
e.getConfiguration();d.ee=e.B;d.Fa=e.C;d.J=wm(e);d.fd=xm(e);d.rb=e.ya;d.i=e.jf();if(p=e.o)d.xa=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(ro(d),d.configure("manifest.disableVideo",!0));d.A=ym(e);return E(A,k(function(){return O(function(y){return E(y,d.A.uc(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(q=e.A)||d.va&&d.va==q||(d.o=vm(e),d.va=e.A,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
|
|
571
|
+
function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=zm(e),w=e.ga,E(A,k(function(){return O(function(y){return E(y,so(d,n,w,u),0)})},"loadInner_"),19);case 19:tm(e);A.u(14);break;case 20:return E(A,
|
|
572
|
+
k(function(){return O(function(y){return E(y,to(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(go("loaded"));case 6:Aa(A);if(!e){A.u(22);break}return E(A,e.destroy(),22);case 22:d.ma=null;Da(A,0);break;case 5:v=za(A);if(7E3==v.code){A.u(24);break}return E(A,d.oc(!1),24);case 24:throw v;}})};
|
|
573
|
+
function ro(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}r.Ri=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?E(e,uo(c),2):3!=e.g?(d=e.h,E(e,c.oc(a,b),3)):e.return(d)})};
|
|
574
|
+
r.ng=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,uo(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
|
|
575
|
+
function uo(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Fa&&a.$))return e.u(2);c=a.h.currentTime;a.U()&&(c=null);d=Date.now()/1E3;return E(e,vo(a,a.$,c,a.Gf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Fa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.va;f.i=a.o;f.A=g;b.o=a.xa;b.start();a.i=null;a.J=null;a.Fa=null;a.o=null;a.va=null}return e.return(b)})}
|
|
576
|
+
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,po(d,a,b,c),2);(e=f.h)?e.start():lo(d,new T(2,7,7005));return f.return(e)})};function po(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):E(l,oo(a,b),3);2!=l.g&&(d=l.h);if(g=wo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.va==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(vo(a,b,c,d||null,f,!e,h,k))})}
|
|
577
|
+
function vo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,p,q,u,w,v,A,y,B,z,C,D;return O(function(K){if(1==K.g)return k=null,l=Ke(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.N&&k.s?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(G,J){m()?k.configure(G,J):a.configure(G,J)},Infinity!=a.ba.width||Infinity!=a.ba.height?K.u(2):E(K,td(),3);2!=K.g&&(q=K.h,a.ba.width=q.width,a.ba.height=q.height);u=new li(l,a.ba,null);w={networkingEngine:a.G,
|
|
578
|
+
filter:function(G){var J,I;return O(function(F){if(1==F.g)return E(F,mi(u,G),2);if(4!=F.g){J=F.h;if(!J)return F.u(0);I=go("trackschanged");return E(F,Promise.resolve(),4)}k.dispatchEvent(I);H(F)})},makeTextStreamsForClosedCaptions:function(G){return xo(a,G)},onTimelineRegionAdded:function(G){var J=k.F;a:{var I=t(J.g);for(var F=I.next();!F.done;F=I.next())if(F=F.value,F.schemeIdUri==G.schemeIdUri&&F.id==G.id&&F.startTime==G.startTime&&F.endTime==G.endTime){I=F;break a}I=null}null==I&&(J.g.add(G),G=
|
|
579
|
+
new U("regionadd",new Map([["region",G]])),J.dispatchEvent(G))},onEvent:function(G){return k.dispatchEvent(G)},onError:function(G){return k.onError(G)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){p("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.N&&a.j.updateDuration()},newDrmInfo:function(G){var J=k.l,I=J?J.g:null;I&&J.s&&oi(u,I.keySystem,G)},onManifestUpdated:function(){var G=
|
|
580
|
+
(new Map).set("isLive",a.U());k.dispatchEvent(go("manifestupdated",G));sm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};v=new nl(function(){return a.Pb()});v.addEventListener("regionadd",function(G){var J=G.region;yo(a,"timelineregionadded",J,k);sm(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(J)})});A=null;l.streaming.observeQualityChanges&&(A=new ol(function(){return a.ub()}),A.addEventListener("qualitychange",function(G){var J=
|
|
581
|
+
G.quality;G=G.position;J=(new Map).set("mediaQuality",{bandwidth:J.bandwidth,audioSamplingRate:J.audioSamplingRate,codecs:J.codecs,contentType:J.contentType,frameRate:J.frameRate,height:J.height,mimeType:J.mimeType,channelsCount:J.channelsCount,pixelAspectRatio:J.pixelAspectRatio,width:J.width}).set("position",G);a.dispatchEvent(go("mediaqualitychanged",J))}));y=!0;B={Db:a.G,onError:function(G){return k.onError(G)},re:function(G){sm(k,!0,function(){a:{var J=G,I=go("keystatuschanged");a.dispatchEvent(I);
|
|
582
|
+
var F=Object.keys(J);1==F.length&&""==F[0]&&(F=["00"],J={"00":J[""]});I=1==F.length&&"00"==F[0];var M=!1;if(F.length){F=t(a.i.variants);for(var N=F.next();!N.done;N=F.next()){N=N.value;var L=[];N.audio&&L.push(N.audio);N.video&&L.push(N.video);L=t(L);for(var P=L.next();!P.done;P=L.next()){var R=P.value;P=N.allowedByKeySystem;if(R.keyIds.size){N.allowedByKeySystem=!0;R=t(R.keyIds);for(var Q=R.next();!Q.done;Q=R.next())if(Q=Q.value,(Q=J[I?"00":Q])||a.A.F)N.allowedByKeySystem=N.allowedByKeySystem&&!!Q&&
|
|
583
|
+
!qi.includes(Q)}P!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(zo(a),!Ao(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&Bo(a)}})},onExpirationUpdated:function(G,J){var I=go("expirationupdated");k.dispatchEvent(I);if((I=k.j)&&I.onExpirationUpdated)I.onExpirationUpdated(G,J)},onEvent:function(G){k.dispatchEvent(G);"drmsessionupdate"==G.type&&y&&(y=!1,G=Date.now()/1E3-k.va,(a.s||k.getStats()).j=G,a.K&&Cj(a.K))}};z=$n(a,m);pg(a.G,z);C=function(){return a.vc(B)};D={config:l,li:w,vi:v,ui:A,vc:C,ki:u,networkingEngine:z,
|
|
584
|
+
nh:f,mh:h};k=new rm(b,d,e,c,D);a.Kf.push(k);return K.return(k)})}function oo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Lm(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&gd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
585
|
+
function wo(a,b){if(!Uc())return!0;if(b){if(""==(a.h||Wc()).canPlayType(b))return!1;if(!(Uc()&&b in ti))return!0;if(oe(b)){if(a.g.streaming.preferNativeHls)return!0;if(gd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(gd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
586
|
+
function mo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return io(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Wf=b,d=Co(a.h,c,{Gh:function(){return a.keySystem()},se:function(h,k,l){Do(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ga=f,E(g,d.L,2);a.F=d;H(g)})}
|
|
587
|
+
function so(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J;return O(function(I){switch(I.g){case 1:io(a,"load");e=a.h;a.H=new Sk({$d:function(){return e.playbackRate},$b:function(){return e.defaultPlaybackRate},Tf:function(F){e.playbackRate=F},Fg:function(F){e.currentTime+=F}});f=function(){return Eo(a)};g=function(){return Fo(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);fo(a,a.g);a.Ea=a.g.preferredTextLanguage;a.sd=a.g.preferredTextRole;a.pd=a.g.preferForcedSubs;
|
|
588
|
+
Go(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(F,M,N){a.i&&a.j&&F!=a.j.j&&Ho(a,F,!0,void 0===M?!1:M,void 0===N?0:N)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=Io(a);a.j.configure(a.g.streaming);a.l=Jo;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":Ko(a,F)}});a.dispatchEvent(go("streaming"));h=c;(k=a.j.j)||h||(h=Lo(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(q=
|
|
589
|
+
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){I.u(2);break}return E(I,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Go(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);zl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(F){a.C=Mo(a,F);a.ib=No(a,F);Oo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ga);if(k){I.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){I.u(5);
|
|
590
|
+
break}w=a.i.presentationTimeline;v=a.ga||a.h.currentTime;A=w.Mb();y=w.vb();v<A?v=A:v>y&&(v=y);return E(I,Po(h,v),6);case 6:B=I.h,u(B);case 5:Ho(a,h,!0,!1,0);case 4:return a.C.Ke(),z=a.zc().find(function(F){return F.active}),z||((C=xf(a.i.textStreams,a.Ea,a.sd,a.pd)[0]||null)&&$k(a.s.h,C,!0),h&&(C?(Qo(a,h.audio,C)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),Ro(a)):a.da=!1),C&&(a.g.streaming.alwaysStreamText||a.qf())&&Il(a.j,C)),E(I,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),So(a));zo(a);
|
|
591
|
+
Ao(a);a.i.variants.some(function(F){return F.primary});if((D=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)K=function(){return To(a)},a.m.D(e,"timeupdate",K);D||(G=function(){return Uo(a)},a.m.D(e,"timeupdate",G),Uo(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(J=function(){var F,M;return O(function(N){if(1==N.g){F=a.h.duration-a.h.currentTime;if(isNaN(F)||!(F<=a.g.streaming.preloadNextUrlWindow))return N.u(0);
|
|
592
|
+
a.m.Hb(e,"timeupdate",J);M=a;return E(N,a.preload(a.i.nextUrl),4)}M.ma=N.h;H(N)})},a.m.D(e,"timeupdate",J)),a.m.D(e,"ended",function(){a.load(a.ma||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(D);a.Ka=!0;a.m.sa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(I)}})}
|
|
593
|
+
function qo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Vd,d=Date.now()/1E3,e=!0,a.A=a.vc({Db:a.G,onError:function(k){lo(a,k)},re:function(){},onExpirationUpdated:function(){var k=go("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
594
|
+
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?me(b):"",codecs:b?ne(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ea,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Xd(g.mimeType,
|
|
595
|
+
g.codecs)),b.startsWith("audio/")?(g.type=c.V,f.audio=g):f.video=g,a.A.aa=!0,E(h,Ih(a.A,[f],[]),2)):E(h,a.A.uc(a.h),0)})}
|
|
596
|
+
function to(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return io(a,"src-equals"),d=a.h,a.C=new Ik(d),e=!1,a.kd.push(function(){e=!0}),null!=a.ga&&a.C.Le(a.ga),a.H=new Sk({$d:function(){return d.playbackRate},$b:function(){return d.defaultPlaybackRate},Tf:function(w){d.playbackRate=w},Fg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,Oo(a,d,f),g=function(){return Eo(a)},h=function(){return Fo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
597
|
+
"ratechange",h),"none"!=d.preload&&a.m.sa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return zo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return zo(a)}),a.m.D(d.audioTracks,"change",function(){return zo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Vo(a,w);break;case "chapters":Ko(a,w);break;default:zo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return zo(a)}),
|
|
598
|
+
a.m.D(d.textTracks,"change",function(){return zo(a)})),d.src=xn(a.N,a.$,c),($c()||cd())&&d.load(),"none"!=d.preload&&!d.autoplay&&oe(c)&&ld()&&d.load(),a.l=Wo,a.dispatchEvent(go("streaming")),k=new Zf,zk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.Ke();k.resolve()}),zk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(v){if(1==v.g)return Xo(a),w=Yo(a),w.find(function(A){return"disabled"!=A.mode})?(0<w.length&&(a.da=!0),v.u(2)):E(v,new Promise(function(A){a.m.sa(d.textTracks,
|
|
599
|
+
"change",A);(new Tc(A)).X(1)}),2);if(e)return v.return();Zo(a);H(v)})}),d.error?k.reject(ko(a)):"none"==d.preload&&(ab('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.sa(d,"error",function(){k.reject(ko(a))}),l=new Promise(function(w,v){(new Tc(v)).X(a.g.streaming.loadTimeout)}),E(u,Promise.race([k,
|
|
600
|
+
l]),2);if((m=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return To(a)},a.m.D(d,"timeupdate",n);m||(p=function(){return Uo(a)},a.m.D(d,"timeupdate",p),Uo(a));a.B&&(a.B.onManifestUpdated(m),m&&(q=a.Pb().end,a.m.D(d,"progress",function(){var w=a.Pb().end;q!=w&&(a.B.onManifestUpdated(a.U()),q=w)})));a.Ka=!0;H(u)})}function Xo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Ng(b,a.g.preferredVariantRole)}
|
|
601
|
+
function Zo(a){var b=a.g.preferredTextLanguage;""!=b&&a.Nf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
602
|
+
function Vo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,$o(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Tc(function(){var d=ap(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).nc().X(.5);a.kd.push(function(){c.stop()})}}
|
|
603
|
+
function Do(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())$o(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function $o(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(go("metadata",b))}
|
|
604
|
+
function Ko(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Tc(function(){b.mode="hidden"})).nc().X(.5);a.kd.push(function(){c.stop()})}}r.zi=function(){for(var a=this.W;a.g;)a.release()};r.vc=function(a){return new Bh(a)};
|
|
605
|
+
function $n(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?sm(b(),!0,e):e()}b||(b=function(){return null});return new lg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(go("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
606
|
+
Un(n[1]))}}catch(v){}if(l=e["cmsd-dynamic"]){try{var p=new Map,q=l.split(";");for(l=1;l<q.length;l++){var u=q[l].split("=");p.set(u[0],Un(u[1]))}var w=p}catch(v){w=null}w&&(h.g=w)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(go("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)En(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
607
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}En(h,f,{ot:Bn,su:!h.i})}}catch(L){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",L)}break;case wg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=In(k);var p=n.ot===Fn||n.ot===zn||n.ot===An||n.ot===Kn,q=k.stream;if(q){var u=h.h.ab();if(p&&(n.bl=Mn(h,q.type),n.ot!==Kn)){var w=Nn(h,q.type);n.dl=u?w/Math.abs(u):w}q.bandwidth&&(n.br=q.bandwidth/1E3);
|
|
608
|
+
if(q.segmentIndex&&m){var v=q.segmentIndex.Ab(m.endTime,!0,0>u);if(v){var A=v.next().value;if(A&&A!=m){if(!Qb(m.M(),A.M())){var y=A.M()[0],B=f.uris[0],z=new URL(y),C=new URL(B);if(z.origin!==C.origin)var D=y;else{for(var K=z.pathname.split("/").slice(1),G=C.pathname.split("/").slice(1,-1);K[0]===G[0];)K.shift(),G.shift();for(;G.length;)G.shift(),K.unshift("..");D=K.join("/")}n.nor=D}if((A.Da||A.na)&&(m.Da!=A.Da||m.na!=A.na)){var J=A.Da+"-";A.na&&(J+=A.na);n.nrr=J}}}var I=h.h.ab()||1,F=Nn(h,q.type)||
|
|
609
|
+
500,M=q.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(F/I/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}p&&n.ot!==Kn&&(n.tb=On(h,n.ot)/1E3);En(h,f,n)}}catch(L){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",L)}break;case 2:case 5:case 6:En(h,f,{ot:"k"});break;case 4:En(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Rd=isNaN(f.Rd)?e:f.Rd+e)})}
|
|
610
|
+
function Mo(a,b){return new Jk(a.h,a.i,a.g.streaming,b,function(){a.ib&&Vk(a.ib,!0);a.j&&a.j.Dd();a.L&&bp(a)},function(c){return a.dispatchEvent(c)})}
|
|
611
|
+
function No(a,b){b=new Gm(a.fd,a.U()||0<b);b.addEventListener("enter",function(d){yo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){yo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(yo(a,"timelineregionenter",e),yo(a,"timelineregionexit",e))});var c=new Uk(a.h);c.g.add(b);a.rb&&c.g.add(a.rb);return c}
|
|
612
|
+
function Oo(a,b,c){a.L=new Sf;a.L.g=Uf;Vf(a.L,c,Math.min(.5,c/2));no(a);a.ie=(new Tc(function(){bp(a)})).Xa(.25);a.m.D(b,"waiting",function(){return bp(a)});a.m.D(b,"stalled",function(){return bp(a)});a.m.D(b,"canplaythrough",function(){return bp(a)});a.m.D(b,"progress",function(){return bp(a)})}
|
|
613
|
+
function bp(a){switch(a.l){case Wo:if(a.h.ended)var b=!0;else{var c=Ii(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Jo:a:if(a.h.ended||Tj(a.F))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Nb();var d=Ii(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ki(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Tf:Uf;c.g=d;(b=b!=d)&&d===Tf&&(c.h=Date.now());b&&no(a)}function Co(a,b,c,d){return new Kj(a,b,c,d)}
|
|
614
|
+
function Zn(a){return new vn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ub:function(){return a.ub()},getCurrentTime:function(){return a.h?a.h.currentTime:0},ab:function(){return a.ab()},bc:function(){return a.bc()},ec:function(){return a.ec()},U:function(){return a.U()}},a.g.cmcd)}
|
|
615
|
+
function Io(a){return new tl(a.i,{Zd:function(){return a.C?a.C.Qd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},ab:function(){return a.ab()},Z:a.F,Db:a.G,onError:function(b){return lo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ri:function(){a.J&&a.J.update&&a.J.update()},Cf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.C){a.C.Gg();var h=Uj(a.F,f);!a.U()&&a.h.paused&&null!=h&&0<h&&a.C.Qd()<h&&a.C.Le(h)}bp(a);d=(new Map).set("start",
|
|
616
|
+
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(go("segmentappended",d));a.o&&c.fastSwitching&&b.zd&&b.ge&&a.o.trySuggestStreams()},pi:function(b,c){(c=c.yf)&&a.rb&&ql(a.rb,c,b)},ig:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Wg(Bb(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,
|
|
617
|
+
f),f+=b.length;Rh(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},se:function(b,c,d){Do(a,b,c,d)},Xd:function(b,c){return a.Xd(b,c)}})}
|
|
616
618
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=dm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(rb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(rb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
617
619
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&rb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){rb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
|
|
618
620
|
a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==
|
|
619
621
|
a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&
|
|
620
|
-
(a.drm.retryParameters.baseDelay=100));var d=qm(this.g,a,
|
|
621
|
-
function
|
|
622
|
-
a.Wf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Wf=b;a.j&&(b=a.j,(c=b.i.get(Td))&&Gl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),
|
|
623
|
-
Vf(a.L,b,Math.min(.5,b/2)));a.i&&
|
|
624
|
-
r.sg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.Di=function(){for(var a in this.g)delete this.g[a];qm(this.g,
|
|
625
|
-
r.
|
|
626
|
-
r.Pb=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Mb(),end:a.vb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Zh=function(){this.U()&&(this.h.currentTime=this.Pb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.
|
|
622
|
+
(a.drm.retryParameters.baseDelay=100));var d=qm(this.g,a,Yn(this));cp(this);return d};
|
|
623
|
+
function cp(a){a.ee=new li(a.g,a.ba,a.A);if(a.J){var b=Ke(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.A&&a.A.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=ho&&ni(a.ee,a.i)&&zo(a)}catch(f){lo(a,f)}a.o&&Ao(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Bo(a)}a.G&&(a.G.Rf(a.g.streaming.forceHTTP),a.G.Sf(a.g.streaming.forceHTTPS));if(a.F)if(a.F.configure(a.g.mediaSource),a.F.ga=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
624
|
+
a.Wf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Wf=b;a.j&&(b=a.j,(c=b.i.get(Td))&&Gl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),So(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
625
|
+
Vf(a.L,b,Math.min(.5,b/2)));a.i&&Go(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.aa&&a.aa.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Yn(this);qm(a,this.g,Yn(this));return a};r.Lh=function(){var a=Yn(this);qm(a,this.g,Yn(this));return fm(this.g,Yn(this))};
|
|
626
|
+
r.sg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.Di=function(){for(var a in this.g)delete this.g[a];qm(this.g,Yn(this),Yn(this));cp(this)};r.Hh=function(){return this.l};r.kf=function(){return this.i?this.i.type:null};r.Kh=function(){return this.h};
|
|
627
|
+
r.bc=function(){return this.G};r.yc=function(){return this.$};r.rg=function(){return this.B?this.B:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};r.hc=function(){return this.i?this.i.presentationTimeline.hc():!1};r.bi=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
|
|
628
|
+
r.Pb=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Mb(),end:a.vb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Zh=function(){this.U()&&(this.h.currentTime=this.Pb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.md=function(){return this.A?this.A.md():Infinity};
|
|
627
629
|
r.hf=function(){return this.A?this.A.hf():[]};r.Yd=function(){return this.A?this.A.Yd():{}};r.pf=function(){return this.L?this.L.g==Uf:!1};r.ab=function(){return this.h?this.H?this.H.i:1:0};
|
|
628
|
-
r.
|
|
629
|
-
r.
|
|
630
|
-
r.
|
|
631
|
-
r.zc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=kf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?
|
|
632
|
-
r.xh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=
|
|
633
|
-
function
|
|
634
|
-
r.xg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,
|
|
635
|
-
u=g.A||q/p;
|
|
636
|
-
r.Og=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&($k(this.s.h,b,!1),Il(this.j,b),
|
|
637
|
-
r.Of=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&vf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");
|
|
638
|
-
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);
|
|
630
|
+
r.Fd=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.ya.ob(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Jo&&(this.o.playbackRateChanged(a),Fl(this.j,1<Math.abs(a))),this.U()&&this.ya.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Pb(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.bd():Math.floor(c)<=Math.floor(d.start+e)&&b.bd()}))};
|
|
631
|
+
r.bd=function(){var a=this.H.$b();this.l==Wo&&this.H.set(a);this.l==Jo&&(this.H.set(a),this.o.playbackRateChanged(a),Fl(this.j,!1));this.ya.ob()};
|
|
632
|
+
r.ec=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,vf(e)){var f=jf(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return uf(g)}):[]};
|
|
633
|
+
r.zc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=kf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Yo(this).map(function(f){return of(f)}):[]};r.Eh=function(){var a=this.wd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return lf(b)})};
|
|
634
|
+
r.xh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Jo&&b.l!=Wo)return g.return(null);c=b.wd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):E(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Xb(function(h){var k=dp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Wb;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.xg(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
635
|
+
function dp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Wb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
636
|
+
r.xg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z;return O(function(C){if(1==C.g){if(c.l!=Jo&&c.l!=Wo)return C.return(null);d=c.wd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?C.u(2):E(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=dp(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.Wb;n=l/h.rows;p=h.Wb*h.rows;q=g.j-g.startTime;
|
|
637
|
+
u=g.A||q/p;w=g.startTime;A=v=0;1<p&&(y=Math.floor((b-g.startTime)/u),w=g.startTime+y*u,v=y%h.Wb*m,A=Math.floor(y/h.Wb)*n);B=!1;if(z=g.s)B=!0,n=z.height,v=z.positionX,A=z.positionY,m=z.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:v,positionY:A,startTime:w,duration:u,uris:g.M(),width:m,sprite:B})})};
|
|
638
|
+
r.Og=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&($k(this.s.h,b,!1),Il(this.j,b),ep(this),this.Ea=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Yo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,mf(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";ep(this)}};
|
|
639
|
+
r.Of=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&vf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Ho(this,d,!1,b,c);this.xa=new If(d,
|
|
640
|
+
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);Ao(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,mf(c)==a.id){fp(this,c);break}};r.zh=function(){return gp(this.ec())};r.Sh=function(){return gp(this.zc())};r.yh=function(){return Array.from(hp(this.ec()))};r.Rh=function(){return Array.from(hp(this.zc()))};
|
|
639
641
|
r.Ng=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.xa=new Jf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.xa.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
640
|
-
b))c=f;c!=b&&(c?(a=jf(c),this.Of(a,!0,d)):
|
|
641
|
-
r.Ji=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.xa=new Jf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),
|
|
642
|
-
r.qf=function(){var a=this.
|
|
643
|
-
r.Ah=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Ce(a),c=
|
|
644
|
-
function
|
|
645
|
-
r.Ug=function(a){a=!!a;if(this.
|
|
642
|
+
b))c=f;c!=b&&(c?(a=jf(c),this.Of(a,!0,d)):Bo(this))}else this.h&&this.h.audioTracks&&(d=xf(this.ec(),a,b||"",!1)[0])&&this.Of(d)};r.Nf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ea=a,this.sd=b||"",this.pd=c,(a=xf(this.i.textStreams,this.Ea,this.sd,this.pd)[0]||null)&&a!=this.j.s&&($k(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.qf()))Il(this.j,a),ep(this)}else(a=xf(this.zc(),a,b||"",c)[0])&&this.Og(a)};
|
|
643
|
+
r.Ji=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.xa=new Jf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Bo(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&fp(this,b)}};
|
|
644
|
+
r.qf=function(){var a=this.da;return this.F&&this.l==Jo?this.F.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Yo(this).some(function(b){return"showing"==b.mode}):a};r.tg=function(){return this.h&&this.h.src&&this.h.textTracks?ip(this).map(function(a){return of(a)}):[]};
|
|
645
|
+
r.Ah=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Ce(a),c=ip(this).filter(function(h){return Ce(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
646
|
+
function Yo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function ap(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function ip(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
647
|
+
r.Ug=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Jo)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=xf(this.i.textStreams,this.Ea,this.sd,this.pd),0<a.length&&(Il(this.j,a[0]),ep(this))):El(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Yo(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")}Ro(this)}};
|
|
646
648
|
r.Nh=function(){if(this.C)var a=this.C.Qd();else{if(null==this.ga)return new Date;a=this.ga}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.wg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
647
|
-
r.ae=function(){return this.U()?this.i?this.i.presentationTimeline.ae():null:null};r.ub=function(){if(this.l==
|
|
648
|
-
r.getStats=function(){if(this.l!=
|
|
649
|
-
!this.U()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.eg(),this.s.N=this.C.fg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==
|
|
650
|
-
this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.wg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==
|
|
651
|
-
f.G,
|
|
649
|
+
r.ae=function(){return this.U()?this.i?this.i.presentationTimeline.ae():null:null};r.ub=function(){if(this.l==Jo)return this.F.ub();var a={total:[],audio:[],video:[],text:[]};this.l==Wo&&(a.total=Li(this.h.buffered));return a};
|
|
650
|
+
r.getStats=function(){if(this.l!=Jo&&this.l!=Wo)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};Eo(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&
|
|
651
|
+
!this.U()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.eg(),this.s.N=this.C.fg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==Jo){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=
|
|
652
|
+
this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.wg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==Wo&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.J;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,p=f.F,q=f.j,u=Xk(f.g,"playing"),w=Xk(f.g,"paused"),v=Xk(f.g,"buffering"),A=f.s,y=f.C,B=
|
|
653
|
+
f.G,z=f.Rd,C=Yk(f.g),D=[];f=t(f.h.g);for(var K=f.next();!K.done;K=f.next())K=K.value,D.push({timestamp:K.timestamp,id:K.id,type:K.type,fromAdaptation:K.fromAdaptation,bandwidth:K.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:u,pauseTime:w,bufferingTime:v,licenseTime:A,liveLatency:y,maxSegmentDuration:B,bytesDownloaded:z,
|
|
652
654
|
stateHistory:C,switchHistory:D}};
|
|
653
|
-
r.jh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,u,v,
|
|
654
|
-
l&&C.label==(f||"")&&C.kind==c}))return
|
|
655
|
-
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.pa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Xd(d||"",e||"")])};
|
|
656
|
-
r.kh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,
|
|
657
|
-
vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p={};q=t(m);for(u=q.next();!u.done;p={
|
|
658
|
-
n.push(
|
|
659
|
-
"","")])};c.l==
|
|
660
|
-
r.ih=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=
|
|
661
|
-
2,2012);}})};function
|
|
662
|
-
function
|
|
663
|
-
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function
|
|
664
|
-
function
|
|
655
|
+
r.jh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,u,w,v,A,y,B;return O(function(z){switch(z.g){case 1:if(h.l!=Jo&&h.l!=Wo)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&ab("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.u(2);break}return E(z,jp(h,a),3);case 3:d=z.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=Wo){z.u(4);break}g&&(c="forced");return E(z,kp(h,a,b,c,d,f||"",k),5);case 5:l=Ce(b);m=h.zc();if(n=m.find(function(C){return Ce(C.language)==
|
|
656
|
+
l&&C.label==(f||"")&&C.kind==c}))return zo(h),z.return(n);throw new T(1,2,2012);case 4:p=Vd;q=h.h.duration;h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new T(1,4,4033);if(!k.length){z.u(6);break}return E(z,lp(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=z.h,w=mp(h,u,d,k),v=new Blob([w],{type:"text/vtt"}),a=Nj(v),d="text/vtt";case 6:A={id:h.$f++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Qk(0,q,[a]),mimeType:d||"",
|
|
657
|
+
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.pa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Xd(d||"",e||"")])};y=Xd(A.mimeType,A.codecs);B=qe(y);if(!B)throw new T(2,2,2014,d);h.i.textStreams.push(A);zo(h);return z.return(kf(A))}})};
|
|
658
|
+
r.kh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y;return O(function(B){switch(B.g){case 1:if(c.l!=Jo&&c.l!=Wo)throw new T(1,7,7004);if(b){B.u(2);break}return E(B,jp(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Vd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return E(B,lp(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=B.h;g=re[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
659
|
+
vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p={};q=t(m);for(u=q.next();!u.done;p={Yc:p.Yc,Tb:p.Tb},u=q.next())p.Tb=u.value,p.Yc=null,w=function(z){return function(){null==z.Yc&&(z.Yc=Nd([a],[z.Tb.payload]));return z.Yc||[]}}(p),v=new Ai(p.Tb.startTime,p.Tb.endTime,w,0,null,null,0,0,Infinity),p.Tb.payload.includes("#xywh")&&(A=p.Tb.payload.split("#xywh=")[1].split(","),4===A.length&&v.Vg({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
660
|
+
n.push(v);y={id:c.$f++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ok(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Je,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Xd(b||
|
|
661
|
+
"","")])};c.l==Wo?c.wd.push(y):c.i.imageStreams.push(y);zo(c);return B.return(lf(y))}})};
|
|
662
|
+
r.ih=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Jo&&d.l!=Wo)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,jp(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),E(k,kp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.tg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return E(k,new Promise(function(l,m){d.m.sa(f,"load",l);d.m.sa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return zo(d),k.return(h);case 5:throw new T(1,
|
|
663
|
+
2,2012);}})};function jp(a,b){var c;return O(function(d){switch(d.g){case 1:return ta(d,2),E(d,Lm(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;va(d,3);break;case 2:za(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
664
|
+
function kp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?E(n,lp(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=mp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Nj(l),e="text/vtt");m=document.createElement("track");var p=a.N,q=b;try{if(p.g.enabled){var u=yn(p);u.ot=Ln;u.su=!0;var w=Cn(u);var v=Dn(q,w)}else v=q}catch(A){bb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),v=q}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
665
|
+
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function lp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=wg;f=qg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&En(k,f,{ot:Ln,su:!0})}catch(l){bb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return E(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
666
|
+
function mp(a,b,c,d){var e=re[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Bb(b),b=c.parseMedia(b,a,null),un(b,d);throw new T(2,2,2014,c);}r.Oi=function(a,b){this.ba.width=a;this.ba.height=b};r.Jf=function(a){if(this.l==Jo){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.rd||d.Oa||d.qb||(d.rd=!1,Dl(b,d,a));b=!0}}else b=!1;return b};
|
|
665
667
|
r.jf=function(){ab("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.Ih=function(){return this.Fa};
|
|
666
|
-
function
|
|
667
|
-
function
|
|
668
|
+
function Yn(a){var b=mm();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Jf(d))}};b.textDisplayFactory=function(){if(a.fe){var c=a.getConfiguration();return new ln(a.h,a.fe,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new fn(a.h,"Shaka Player TextTrack"):new hn};return b}r.Yg=function(a){this.fe=a};
|
|
669
|
+
function xo(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 Rk,l=e.closedCaptions.get(g);h={id:a.$f++,originalId:g,groupId:null,
|
|
668
670
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Td,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Xd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
669
|
-
function
|
|
670
|
-
function
|
|
671
|
-
function
|
|
672
|
-
function
|
|
671
|
+
function Po(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(q){if(1==q.g)return k?E(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.Ab(l))?m.next().value:null;if(!n)return q.return(null);p=n.startTime;return q.return(p)})},E(h,e(c,b),2);if(3!=h.g)return f=h.h,E(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
672
|
+
function no(a){var b=a.pf();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Tk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Eo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(go("buffering",b))}function Fo(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=go("ratechange"),a.dispatchEvent(b))}
|
|
673
|
+
function Eo(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Uf?c="buffering":a.h.paused?c="paused":a.h.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(go("statechanged",c)))}}
|
|
674
|
+
function To(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.sg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Fd(d):1==e&&b!==a.H.$b()&&a.bd()}if(c&&(e=a.Pb(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
|
|
673
675
|
f=a.i.serviceDescription.targetLatency+a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.maxLatency&&(f=a.i.serviceDescription.maxLatency),g=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var h=a.g.streaming.liveSyncMinLatency;var k=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.g.streaming.liveSyncMinLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency-
|
|
674
|
-
a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==
|
|
675
|
-
d>f?b!=g&&a.
|
|
676
|
-
function
|
|
677
|
-
function
|
|
678
|
-
function
|
|
679
|
-
function
|
|
680
|
-
function
|
|
681
|
-
function
|
|
682
|
-
r.Xd=function(a,b){if(!this.g.abr.enabled||this.l===
|
|
683
|
-
function
|
|
684
|
-
function
|
|
685
|
-
function
|
|
686
|
-
function
|
|
676
|
+
a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==Wo){var l=a.h.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.g.streaming.liveSyncPanicMode;l=1E3*a.g.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.Fd(k):f&&g&&c-
|
|
677
|
+
d>f?b!=g&&a.Fd(g):h&&k&&c-d<h?b!=k&&a.Fd(k):b!==a.H.$b()&&a.bd()}}function Uo(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.T)?(a.T=c,b=!0):(c=Math.max(a.T,c),a.T!=c&&(a.T=c,b=!0)));if(b){var d;0==a.T?d=go("started"):25==a.T?d=go("firstquartile"):50==a.T?d=go("midpoint"):75==a.T?d=go("thirdquartile"):100==a.T&&(d=go("complete"));d&&a.dispatchEvent(d)}}}
|
|
678
|
+
function Ao(a){try{pi(a.ee,a.i)}catch(c){return lo(a,c),!1}var b=wf(a.i.variants);b=a.xa.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Lo(a,b){b=void 0===b?!1:b;return Ao(a)?a.o.chooseVariant(b):null}
|
|
679
|
+
function co(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,fb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.oe.stop();d&&Bo(a,!1,void 0,!1,!1)}
|
|
680
|
+
function Bo(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=Lo(a);f&&Ho(a,f,e,b,c,d)}function Ho(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Hl(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Hl(a.j,b,d,e,f,c);d=null;g&&(d=jf(g));b=jf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Dj(a.K,b,a.kf()),c=go("adaptation",c),np(a,c)):op(a,d,b)}}
|
|
681
|
+
function fp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=uf(c),b=uf(b),op(a,c,b))}function Qo(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Ce(a.g.preferredTextLanguage);c=Ce(c.language);if(2==a.g.autoShowText)return Be(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Ce(b.language);return Be(c,d)&&!Be(a,c)}ab("Invalid autoShowText setting!");return!1}
|
|
682
|
+
function zo(a){var b=go("trackschanged");np(a,b)}function op(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Dj(a.K,c,a.kf());c=go("variantchanged",b);np(a,c)}function ep(a){var b=go("textchanged");np(a,b)}function Ro(a){var b=go("texttrackvisibility");np(a,b)}function So(a){a.g.abr.enabled||bo(a);var b=(new Map).set("newStatus",a.g.abr.enabled);np(a,go("abrstatuschanged",b))}
|
|
683
|
+
function bo(a,b){b=void 0===b?!0:b;if(a.l==Jo){a.oe.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Ao(a)}}
|
|
684
|
+
r.Xd=function(a,b){if(!this.g.abr.enabled||this.l===ho||!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.oe.Xa(1);b=this.ub().video.reduce(function(f,g){return f+g.end-g.start},0);Bo(this,!1,b,!0,!1);return!0}return!1};
|
|
685
|
+
function lo(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==ho)return f.return();c=!0;if(!(a.Ka&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ta(f,3);return E(f,am(a.j),5);case 5:d=f.h;c=!d;va(f,2);break;case 3:za(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&bo(a,!1);e=go("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);H(f)}})}
|
|
686
|
+
function yo(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(go(b,a))}function ko(a){if(!a.h.error)return null;var b=a.h.error.code;if(1==b)return null;var c=a.h.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new T(2,3,3016,b,c,a.h.error.message)}
|
|
687
|
+
function Go(a,b,c){0<b&&(a.U()||a.Xg(b));b=a.getDuration();c<b&&(a.U()||a.Wa(c))}function np(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=ho&&a.dispatchEvent(b);H(c)})}function hp(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ce(c.language)):b.add("und");return b}
|
|
688
|
+
function gp(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Ce(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
687
689
|
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Yg;X.prototype.getManifestParserFactory=X.prototype.Ih;X.prototype.getManifest=X.prototype.jf;X.prototype.retryStreaming=X.prototype.Jf;X.prototype.setMaxHardwareResolution=X.prototype.Oi;X.prototype.addChaptersTrack=X.prototype.ih;X.prototype.addThumbnailsTrack=X.prototype.kh;X.prototype.addTextTrackAsync=X.prototype.jh;X.prototype.getStats=X.prototype.getStats;
|
|
688
690
|
X.prototype.getBufferedInfo=X.prototype.ub;X.prototype.getSegmentAvailabilityDuration=X.prototype.ae;X.prototype.getPresentationStartTimeAsDate=X.prototype.wg;X.prototype.getPlayheadTimeAsDate=X.prototype.Nh;X.prototype.setTextTrackVisibility=X.prototype.Ug;X.prototype.getChapters=X.prototype.Ah;X.prototype.getChaptersTracks=X.prototype.tg;X.prototype.isTextTrackVisible=X.prototype.qf;X.prototype.selectVariantsByLabel=X.prototype.Ji;X.prototype.selectTextLanguage=X.prototype.Nf;
|
|
689
691
|
X.prototype.selectAudioLanguage=X.prototype.Ng;X.prototype.getTextLanguages=X.prototype.Rh;X.prototype.getAudioLanguages=X.prototype.yh;X.prototype.getTextLanguagesAndRoles=X.prototype.Sh;X.prototype.getAudioLanguagesAndRoles=X.prototype.zh;X.prototype.selectVariantTrack=X.prototype.Of;X.prototype.selectTextTrack=X.prototype.Og;X.prototype.getThumbnails=X.prototype.xg;X.prototype.getAllThumbnails=X.prototype.xh;X.prototype.getImageTracks=X.prototype.Eh;X.prototype.getTextTracks=X.prototype.zc;
|
|
690
|
-
X.prototype.getVariantTracks=X.prototype.
|
|
691
|
-
X.prototype.isAudioOnly=X.prototype.bi;X.prototype.isInProgress=X.prototype.
|
|
692
|
-
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.zi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.ng;X.prototype.unloadAndSavePreload=X.prototype.Ri;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Vi;X.prototype.unload=X.prototype.
|
|
692
|
+
X.prototype.getVariantTracks=X.prototype.ec;X.prototype.cancelTrickPlay=X.prototype.bd;X.prototype.trickPlay=X.prototype.Fd;X.prototype.getPlaybackRate=X.prototype.ab;X.prototype.isBuffering=X.prototype.pf;X.prototype.getKeyStatuses=X.prototype.Yd;X.prototype.getActiveSessionsMetadata=X.prototype.hf;X.prototype.getExpiration=X.prototype.md;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Zh;X.prototype.seekRange=X.prototype.Pb;
|
|
693
|
+
X.prototype.isAudioOnly=X.prototype.bi;X.prototype.isInProgress=X.prototype.hc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.rg;X.prototype.getAssetUri=X.prototype.yc;X.prototype.getNetworkingEngine=X.prototype.bc;X.prototype.getMediaElement=X.prototype.Kh;X.prototype.getManifestType=X.prototype.kf;X.prototype.getLoadMode=X.prototype.Hh;X.prototype.resetConfiguration=X.prototype.Di;X.prototype.getBufferFullness=X.prototype.sg;X.prototype.getNonDefaultConfiguration=X.prototype.Lh;
|
|
694
|
+
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.zi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.ng;X.prototype.unloadAndSavePreload=X.prototype.Ri;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Vi;X.prototype.unload=X.prototype.oc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.oh;X.prototype.attach=X.prototype.uc;
|
|
693
695
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return E(k,ii(),3);case 3:b=k.h;case 2:var l={};if(Uc())for(var m in ti)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Uc()?!!ti[n]:Vc(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(Yd));
|
|
694
|
-
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=qe(n)?!0:Uc()?mb(n)||(mc(n)?!0:!1):Vc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,td(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=
|
|
695
|
-
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Uc()?!0:Vc("application/x-mpegurl")};X.setAdManagerFactory=function(a){
|
|
696
|
-
X.registerSupportPlugin=function(a,b){
|
|
696
|
+
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=qe(n)?!0:Uc()?mb(n)||(mc(n)?!0:!1):Vc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,td(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=pp;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
697
|
+
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Uc()?!0:Vc("application/x-mpegurl")};X.setAdManagerFactory=function(a){ao=a};
|
|
698
|
+
X.registerSupportPlugin=function(a,b){pp[a]=b};X.prototype.destroy=X.prototype.destroy;var ho=0,Xn=1,Jo=2,Wo=3;X.LoadMode={DESTROYED:ho,NOT_LOADED:Xn,MEDIA_SOURCE:Jo,SRC_EQUALS:Wo};X.version="v4.9.19";var qp=["4","9"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(qp[0]),Number(qp[1])));var pp={},ao=null;function rp(){this.h=[];this.j=this.i=this.g=0};function sp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new hb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=sp.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};
|
|
697
699
|
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)};
|
|
698
700
|
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)};
|
|
699
701
|
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()};
|
|
700
|
-
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){
|
|
705
|
-
|
|
706
|
-
function
|
|
707
|
-
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
|
|
708
|
-
a.i.offsetHeight,
|
|
709
|
-
function
|
|
710
|
-
function
|
|
711
|
-
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
702
|
+
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",sp);sp.prototype.release=sp.prototype.release;
|
|
703
|
+
sp.prototype.getPodIndex=sp.prototype.getPodIndex;sp.prototype.getTimeOffset=sp.prototype.getTimeOffset;sp.prototype.getMediaUrl=sp.prototype.getMediaUrl;sp.prototype.getAdvertiserName=sp.prototype.getAdvertiserName;sp.prototype.getCreativeAdId=sp.prototype.getCreativeAdId;sp.prototype.getAdId=sp.prototype.getAdId;sp.prototype.getVastMediaWidth=sp.prototype.getVastMediaWidth;sp.prototype.getVastMediaHeight=sp.prototype.getVastMediaHeight;sp.prototype.getVastMediaBitrate=sp.prototype.getVastMediaBitrate;
|
|
704
|
+
sp.prototype.getDescription=sp.prototype.getDescription;sp.prototype.getTitle=sp.prototype.getTitle;sp.prototype.getPositionInSequence=sp.prototype.getPositionInSequence;sp.prototype.getSequenceLength=sp.prototype.getSequenceLength;sp.prototype.setMuted=sp.prototype.setMuted;sp.prototype.resize=sp.prototype.resize;sp.prototype.isLinear=sp.prototype.isLinear;sp.prototype.isMuted=sp.prototype.isMuted;sp.prototype.setVolume=sp.prototype.setVolume;sp.prototype.getVolume=sp.prototype.getVolume;
|
|
705
|
+
sp.prototype.play=sp.prototype.play;sp.prototype.pause=sp.prototype.pause;sp.prototype.skip=sp.prototype.skip;sp.prototype.canSkipNow=sp.prototype.canSkipNow;sp.prototype.getTimeUntilSkippable=sp.prototype.getTimeUntilSkippable;sp.prototype.isSkippable=sp.prototype.isSkippable;sp.prototype.isPaused=sp.prototype.isPaused;sp.prototype.getRemainingTime=sp.prototype.getRemainingTime;sp.prototype.getMinSuggestedDuration=sp.prototype.getMinSuggestedDuration;sp.prototype.getDuration=sp.prototype.getDuration;function tp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.19");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
706
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){up(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){vp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.sa(this.i,"play",function(){f.F=!0})}tp.prototype.configure=function(a){this.s=a};tp.prototype.stop=function(){this.g&&this.g.stop();this.o&&kn(this.o)};
|
|
707
|
+
tp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function vp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));wp(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
708
|
+
function up(a,b){a.m(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
709
|
+
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}xp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,yp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,yp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
710
|
+
a.i.offsetHeight,yp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,yp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.sa(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){wp(a,null)}}
|
|
711
|
+
function yp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
712
|
+
function xp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new U(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){vp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){zp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){zp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
713
|
+
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){wp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){wp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
712
714
|
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")});
|
|
713
715
|
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,
|
|
714
716
|
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")})}
|
|
715
|
-
function
|
|
716
|
-
function
|
|
717
|
+
function zp(a,b){var c=b.getAd();c?(a.j=new sp(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new U("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):ab("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
718
|
+
function wp(a,b){a.m(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function Ap(a){this.h=a||"";this.g=0}function Bp(a){Cp(a,/[ \t]+/gm)}function Cp(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 Dp(a){return a.g==a.h.length?null:(a=Cp(a,/[^ \t\n]*/gm))?a[0]:null};function Ep(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Cp(new Ap(a),Fp),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}r=Ep.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};
|
|
717
719
|
r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return"number"==typeof this.j?!0:!1};r.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};
|
|
718
720
|
r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return this.o};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.l?this.l: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};
|
|
719
|
-
r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
function
|
|
721
|
+
r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Ep);Ep.prototype.release=Ep.prototype.release;Ep.prototype.getPodIndex=Ep.prototype.getPodIndex;Ep.prototype.getTimeOffset=Ep.prototype.getTimeOffset;
|
|
722
|
+
Ep.prototype.getMediaUrl=Ep.prototype.getMediaUrl;Ep.prototype.getAdvertiserName=Ep.prototype.getAdvertiserName;Ep.prototype.getCreativeAdId=Ep.prototype.getCreativeAdId;Ep.prototype.getAdId=Ep.prototype.getAdId;Ep.prototype.getVastMediaWidth=Ep.prototype.getVastMediaWidth;Ep.prototype.getVastMediaHeight=Ep.prototype.getVastMediaHeight;Ep.prototype.getVastMediaBitrate=Ep.prototype.getVastMediaBitrate;Ep.prototype.getDescription=Ep.prototype.getDescription;Ep.prototype.getTitle=Ep.prototype.getTitle;
|
|
723
|
+
Ep.prototype.getPositionInSequence=Ep.prototype.getPositionInSequence;Ep.prototype.getSequenceLength=Ep.prototype.getSequenceLength;Ep.prototype.setMuted=Ep.prototype.setMuted;Ep.prototype.resize=Ep.prototype.resize;Ep.prototype.isLinear=Ep.prototype.isLinear;Ep.prototype.isMuted=Ep.prototype.isMuted;Ep.prototype.setVolume=Ep.prototype.setVolume;Ep.prototype.getVolume=Ep.prototype.getVolume;Ep.prototype.play=Ep.prototype.play;Ep.prototype.pause=Ep.prototype.pause;Ep.prototype.skip=Ep.prototype.skip;
|
|
724
|
+
Ep.prototype.canSkipNow=Ep.prototype.canSkipNow;Ep.prototype.getTimeUntilSkippable=Ep.prototype.getTimeUntilSkippable;Ep.prototype.isSkippable=Ep.prototype.isSkippable;Ep.prototype.isPaused=Ep.prototype.isPaused;Ep.prototype.getRemainingTime=Ep.prototype.getRemainingTime;Ep.prototype.getMinSuggestedDuration=Ep.prototype.getMinSuggestedDuration;Ep.prototype.getDuration=Ep.prototype.getDuration;var Fp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Gp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.W=NaN;this.i=d;this.J=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new hb}Gp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Hb(b.target,b.type,b.listener);Hp(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
725
|
+
Gp.prototype.release=function(){this.stop();this.o&&this.o.release()};Gp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(Ip(this,this.G,this.T),this.T=!1)};Gp.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};
|
|
726
|
+
function Jp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=qg([b],Xf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Ad(e)),f=a.K.request(7,d),ta(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=wd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new sc(b),m=new sc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.W,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),q=new sc(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
725
727
|
return va(u,0)}za(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;H(u)})}
|
|
726
|
-
function
|
|
727
|
-
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),
|
|
728
|
-
function
|
|
729
|
-
function
|
|
730
|
-
function
|
|
731
|
-
function
|
|
732
|
-
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&
|
|
733
|
-
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(
|
|
734
|
-
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new
|
|
735
|
-
function
|
|
736
|
-
function
|
|
728
|
+
function Ip(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A;O(function(y){if(1==y.g)return d=qg([b],Xf()),e=a.K.request(7,d),ta(y,2),E(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=wd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),q=p.next();!q.done;q=p.next())for(u=q.value,w=t(u.nonLinearAdList),v=w.next();!v.done;v=w.next())A=v.value,Kp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
|
|
729
|
+
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Hp(a),a.j=[];c&&(a.J||0<g.length)&&Lp(a);return va(y,0)}za(y);H(y)})}
|
|
730
|
+
function Kp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Mp(b);if(d=a.F.get(c))return m.return();e=qg([b.staticResource],Xf());f=a.K.request(7,e);ta(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=wd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),va(m,0);za(m);a.F.delete(c);H(m)})}
|
|
731
|
+
function Mp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Lp(a){Np(a);a.J||(Op(a),a.o.D(a.h,"seeked",function(){Op(a)}),a.o.D(a.h,"ended",function(){Hp(a)}));a.o.D(a.h,"timeupdate",function(){Np(a)})}
|
|
732
|
+
function Op(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
733
|
+
function Np(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),Pp(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),Pp(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),Pp(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
734
|
+
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Pp(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Hp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Hp(a);a.L=e;a.g=new Ep(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&Pp(a,"breakStart");Qp(a);break}}}if(!a.g)for(d=
|
|
735
|
+
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(Mp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Hp(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||
|
|
736
|
+
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new Ep(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&Pp(a,"breakStart");Qp(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
737
|
+
function Hp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?Pp(a,"skip"):Pp(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Hb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Pp(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
|
|
738
|
+
function Qp(a){var b=!1;a.h.paused?b=!0:(Pp(a,"impression"),Pp(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Pp(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Pp(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Pp(a,"impression"),Pp(a,"start"),b=!1):Pp(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Pp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
|
|
737
739
|
d.type,d.listener)}
|
|
738
|
-
function
|
|
740
|
+
function Pp(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=qg([d],Xf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
|
|
739
741
|
case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
|
|
740
|
-
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function
|
|
742
|
+
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function Rp(a,b){this.g=a;this.i=null;this.h=b}r=Rp.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)};
|
|
741
743
|
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};
|
|
742
744
|
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()};
|
|
743
|
-
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};S("shaka.ads.ServerSideAd",
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new
|
|
745
|
+
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};S("shaka.ads.ServerSideAd",Rp);Rp.prototype.release=Rp.prototype.release;Rp.prototype.getPodIndex=Rp.prototype.getPodIndex;
|
|
746
|
+
Rp.prototype.getTimeOffset=Rp.prototype.getTimeOffset;Rp.prototype.getMediaUrl=Rp.prototype.getMediaUrl;Rp.prototype.getAdvertiserName=Rp.prototype.getAdvertiserName;Rp.prototype.getCreativeAdId=Rp.prototype.getCreativeAdId;Rp.prototype.getAdId=Rp.prototype.getAdId;Rp.prototype.getVastMediaWidth=Rp.prototype.getVastMediaWidth;Rp.prototype.getVastMediaHeight=Rp.prototype.getVastMediaHeight;Rp.prototype.getVastMediaBitrate=Rp.prototype.getVastMediaBitrate;Rp.prototype.getDescription=Rp.prototype.getDescription;
|
|
747
|
+
Rp.prototype.getTitle=Rp.prototype.getTitle;Rp.prototype.getPositionInSequence=Rp.prototype.getPositionInSequence;Rp.prototype.getSequenceLength=Rp.prototype.getSequenceLength;Rp.prototype.setMuted=Rp.prototype.setMuted;Rp.prototype.resize=Rp.prototype.resize;Rp.prototype.isLinear=Rp.prototype.isLinear;Rp.prototype.isMuted=Rp.prototype.isMuted;Rp.prototype.setVolume=Rp.prototype.setVolume;Rp.prototype.getVolume=Rp.prototype.getVolume;Rp.prototype.play=Rp.prototype.play;Rp.prototype.pause=Rp.prototype.pause;
|
|
748
|
+
Rp.prototype.skip=Rp.prototype.skip;Rp.prototype.canSkipNow=Rp.prototype.canSkipNow;Rp.prototype.getTimeUntilSkippable=Rp.prototype.getTimeUntilSkippable;Rp.prototype.isSkippable=Rp.prototype.isSkippable;Rp.prototype.isPaused=Rp.prototype.isPaused;Rp.prototype.getRemainingTime=Rp.prototype.getRemainingTime;Rp.prototype.getMinSuggestedDuration=Rp.prototype.getMinSuggestedDuration;Rp.prototype.getDuration=Rp.prototype.getDuration;function Sp(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new hb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Tp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
749
|
+
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Rp(f,e.l);e.A&&(e.m.i=e.A);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
748
750
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
|
|
749
751
|
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
|
|
750
|
-
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=
|
|
751
|
-
function
|
|
752
|
-
r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);ig.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new
|
|
753
|
-
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new
|
|
754
|
-
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new
|
|
755
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.
|
|
756
|
-
(c.G=!0),c.j=new Zf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.
|
|
752
|
+
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=Sp.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
|
|
753
|
+
function Tp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){ig.call(this);this.g=this.h=this.i=null;this.j=new rp;this.m=navigator.language;this.l=null}pa(Y,ig);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new tp(a,b,this.m,c,function(e){return Up(d,e)});this.i.configure(this.l)};
|
|
754
|
+
r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);ig.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new rp};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
|
|
755
|
+
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Gp(a,b,c,function(e){return Up(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Zf,Jp(d,a,b),d.H=c||"",d.W=Date.now()/1E3,a=d.l);return a};
|
|
756
|
+
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Sp(a,b,this.m,function(d){return Up(c,d)});this.g.configure(this.l)};
|
|
757
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.19";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
758
|
+
(c.G=!0),c.j=new Zf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.19";this.g.g.replaceAdTagParameters(a)};
|
|
757
759
|
r.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
758
760
|
r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
759
|
-
function
|
|
761
|
+
function Up(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
|
|
760
762
|
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
|
|
761
763
|
Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";
|
|
762
764
|
Y.AD_FIRST_QUARTILE="ad-first-quartile";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";
|
|
763
|
-
Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction"
|
|
765
|
+
Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";ao=function(){return new Y};function Vp(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
|
|
764
766
|
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Li(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
765
|
-
function
|
|
766
|
-
function
|
|
767
|
-
var
|
|
768
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},
|
|
769
|
-
|
|
770
|
-
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;
|
|
771
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.
|
|
772
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Zf,this.s=!0,
|
|
773
|
-
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!
|
|
774
|
-
r.get=function(a,b){var c=this;if("video"==a){if(
|
|
775
|
-
r.set=function(a,b,c){this.g[a][b]=c;
|
|
776
|
-
r.Lg=function(a,b){
|
|
777
|
-
function
|
|
778
|
-
function
|
|
779
|
-
r.destroy=function(a){a&&this.g.xc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;ig.prototype.release.call(this);return Promise.all(a)};r.Xh=function(){return this.l};r.Mh=function(){return this.s};r.ph=function(){return this.g.m&&
|
|
780
|
-
r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.
|
|
781
|
-
r.qh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.xc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new
|
|
782
|
-
function
|
|
783
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
784
|
-
function
|
|
785
|
-
function
|
|
786
|
-
function
|
|
787
|
-
function
|
|
788
|
-
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(
|
|
789
|
-
function
|
|
790
|
-
function
|
|
791
|
-
if("setVideoContainer"==b)return function(c){return a.h.Yg(c)};if(a.g.bb()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return a.g.bb()&&0==Object.keys(a.g.g.video).length&&(
|
|
792
|
-
function
|
|
793
|
-
|
|
767
|
+
function Wp(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Xp(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
768
|
+
function Xp(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
769
|
+
var Yp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Zp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),$p=["loop","playbackRate"],aq=["pause","play"],bq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
770
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},cq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},dq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},eq=[["getConfiguration","configure"]],fq=[["isTextTrackVisible","setTextTrackVisibility"]],gq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
771
|
+
hq=["attach","attachCanvas","detach","load","unload"];function iq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Tc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.J="";this.o=null;this.B=function(){return jq(h)};this.C=function(k,l){k=Wp(l);switch(k.type){case "event":var m=k.targetName,n=gg(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
|
|
772
|
+
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;kq.add(this)}r=iq.prototype;r.destroy=function(){kq.delete(this);lq(this);mq&&nq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.bb=function(){return this.h};r.Hf=function(){return this.J};
|
|
773
|
+
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.nc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(kq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Zf;d.s=!0;oq(d,e)}},function(b){for(var c=t(kq),d=c.next();!d.done;d=c.next())d=d.value,pq="available"==b,d.l.nc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});pq&&this.l.X(qq);(a=mq)&&
|
|
774
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Zf,this.s=!0,oq(this,a)):mq=null}else window.__onGCastApiAvailable!==rq&&(sq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=rq)};r.Pf=function(a){this.o=a;this.h&&tq(this,{type:"appData",appData:this.o})};
|
|
775
|
+
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!pq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Zf;chrome.cast.requestSession(function(c){return oq(a,c)},function(c){return uq(a,c)});return E(b,a.j,0)})};function vq(a){a.h&&chrome.cast.requestSession(function(b){return oq(a,b)},function(b){return uq(a,b)})}r.xc=function(){if(this.h){lq(this);if(mq){nq(this);try{mq.stop(function(){},function(){})}catch(a){}mq=null}jq(this)}};
|
|
776
|
+
r.get=function(a,b){var c=this;if("video"==a){if(aq.includes(b))return function(){return c.Lg.apply(c,[a,b].concat(x(La.apply(0,arguments))))}}else if("player"==a){if(dq[b]&&!this.get("player","isLive")())return function(){};if(gq.includes(b))return function(){return c.Lg.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(hq.includes(b))return function(){return c.Ai.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(bq[b]||cq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
777
|
+
r.set=function(a,b,c){this.g[a][b]=c;tq(this,{type:"set",targetName:a,property:b,value:c})};function oq(a,b){var c=a.N();mq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);jq(a);tq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function uq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
|
|
778
|
+
r.Lg=function(a,b){tq(this,{type:"call",targetName:a,methodName:b,args:La.apply(2,arguments)})};r.Ai=function(a,b){var c=La.apply(2,arguments),d=new Zf,e=this.H.toString();this.H++;this.i[e]=d;try{tq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function nq(a){var b=mq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
779
|
+
function jq(a){var b=mq?"connected"==mq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};lq(a)}a.h=b;a.J=b?mq.receiver.friendlyName:"";a.l.nc()}function lq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function tq(a,b){b=Vp(b);var c=mq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.xc(),b;}}var qq=.02,pq=!1,mq=null,sq=null,kq=new Set;
|
|
780
|
+
function rq(a){sq?window.__onGCastApiAvailable=sq:delete window.__onGCastApiAvailable;sq=null;if(a)for(var b=t(kq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function wq(a,b,c,d){d=void 0===d?!1:d;ig.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new iq(c,function(){return xq(e)},function(){return yq(e)},function(f,g){return zq(e,f,g)},function(){return Aq(e)},function(){return Bq(e)},d);Cq(this)}pa(wq,ig);r=wq.prototype;
|
|
781
|
+
r.destroy=function(a){a&&this.g.xc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;ig.prototype.release.call(this);return Promise.all(a)};r.Xh=function(){return this.l};r.Mh=function(){return this.s};r.ph=function(){return this.g.m&&pq};r.bb=function(){return this.g.bb()};r.Hf=function(){return this.g.Hf()};
|
|
782
|
+
r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.oc(),0):b.return()})};r.Pf=function(a){this.g.Pf(a)};r.Qi=function(){vq(this.g)};r.xc=function(){this.g.xc()};
|
|
783
|
+
r.qh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.xc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new iq(a,function(){return xq(c)},function(){return yq(c)},function(e,f){return zq(c,e,f)},function(){return Aq(c)},function(){return Bq(c)},b);c.g.init();H(d)})};
|
|
784
|
+
function Cq(a){a.g.init();a.m=new hb;for(var b=t(Yp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.bb()||(f=gg(f),a.j.dispatchEvent(f))});for(var d in hg)a.m.D(a.h,hg[d],function(f){a.g.bb()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Qc=e,Object.defineProperty(a.l,b.Qc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Dq(a,f.Qc)}}(b),set:function(f){return function(g){var h=f.Qc;a.g.bb()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Qc:b.Qc};a.s={};Eq(a,
|
|
785
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Fq(a,f)}})});Gq(a);a.j=new ig;a.j.qe=a.l;a.o=new ig;a.o.qe=a.s}function Gq(a){var b=new Map;Eq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
786
|
+
function Eq(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)}}
|
|
787
|
+
function Bq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.yc(),startTime:null};a.i.pause();for(var c=t($p),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(eq);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(fq);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 xq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
|
|
788
|
+
function yq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
789
|
+
function Aq(a){for(var b=t(eq),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($p);for(d=c.next();!d.done;d=c.next())d=
|
|
790
|
+
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t($p),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(fq);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.Ug(h);g&&a.h.Nf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new U("error",l);a.h.dispatchEvent(l)})}
|
|
791
|
+
function Dq(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.bb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.bb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
792
|
+
function Fq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.bc()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.rg()};
|
|
793
|
+
if("setVideoContainer"==b)return function(c){return a.h.Yg(c)};if(a.g.bb()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return a.g.bb()&&0==Object.keys(a.g.g.video).length&&(bq[b]||cq[b])||!a.g.bb()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
794
|
+
function zq(a,b,c){a.g.bb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",wq);wq.prototype.changeReceiverId=wq.prototype.qh;wq.prototype.forceDisconnect=wq.prototype.xc;wq.prototype.suggestDisconnect=wq.prototype.Qi;wq.prototype.setAppData=wq.prototype.Pf;wq.prototype.cast=wq.prototype.cast;wq.prototype.receiverName=wq.prototype.Hf;wq.prototype.isCasting=wq.prototype.bb;wq.prototype.canCast=wq.prototype.ph;wq.prototype.getPlayer=wq.prototype.Mh;
|
|
795
|
+
wq.prototype.getVideo=wq.prototype.Xh;wq.prototype.destroy=wq.prototype.destroy;function Hq(a,b,c,d){ig.call(this);var e=this;this.g=a;this.h=b;this.j=new hb;this.H={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Tc(function(){Iq(e)});Jq(this)}pa(Hq,ig);r=Hq.prototype;r.isConnected=function(){return this.F};r.ci=function(){return this.o};r.Mi=function(a){this.i=a};r.uh=function(){this.i=null};
|
|
794
796
|
r.Ni=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Li=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Ki=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
795
797
|
r.destroy=function(){var a=this,b,c;return O(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,ig.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
|
|
796
|
-
function
|
|
797
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
798
|
-
a.j.D(a.g,"ended",function(){(new Tc(function(){a.g&&a.g.ended&&(a.o=!0,
|
|
799
|
-
function
|
|
800
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
801
|
-
function
|
|
802
|
-
1);
|
|
803
|
-
function
|
|
804
|
-
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return
|
|
805
|
-
function
|
|
806
|
-
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||
|
|
807
|
-
function
|
|
808
|
-
S("shaka.cast.CastReceiver",
|
|
809
|
-
q||-1===u)p=
|
|
810
|
-
function
|
|
811
|
-
function
|
|
812
|
-
var
|
|
813
|
-
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),
|
|
814
|
-
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),
|
|
815
|
-
var
|
|
816
|
-
function
|
|
817
|
-
50;e.regionAnchorY=50;break;case
|
|
818
|
-
function
|
|
819
|
-
b=null;c=t(
|
|
820
|
-
b.skip(1),d=
|
|
821
|
-
function
|
|
822
|
-
var
|
|
823
|
-
function
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
function
|
|
827
|
-
"white";e=!1;7>f?d=
|
|
828
|
-
|
|
829
|
-
e-1,e,b.h),
|
|
830
|
-
function
|
|
831
|
-
0,
|
|
832
|
-
"\u266a"):
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
function(f){f=Wi(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Tg).box("sinf",Qg).box("frma",function(f){f=Zi(f.reader).La;f in
|
|
836
|
-
|
|
837
|
-
1];f=Vi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);
|
|
838
|
-
function
|
|
839
|
-
c+(n[l].Lf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",
|
|
840
|
-
S("shaka.cea.TsCeaParser",
|
|
841
|
-
l.Ic});f.length&&(a=
|
|
842
|
-
function
|
|
843
|
-
function
|
|
844
|
-
function
|
|
845
|
-
function
|
|
846
|
-
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Xg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Od(h,b,g.init||a||k||l);if(h=
|
|
847
|
-
function
|
|
848
|
-
function
|
|
849
|
-
if(!a||!b)throw new T(2,4,4051);a=
|
|
850
|
-
var
|
|
851
|
-
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=fh(a))?a:""});function
|
|
798
|
+
function Jq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Kq(a)};b.onSenderDisconnected=function(){return Kq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Lq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Lq(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 Mq(a,
|
|
799
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Nq(a,e)};b.start();b=t(Yp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Oq(a,"video",e)});for(var d in hg)a.j.D(a.h,hg[d],function(e){return Oq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;Pq(a)});a.j.D(a.g,"playing",function(){a.o=!1;Pq(a)});a.j.D(a.g,"pause",function(){Pq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Pq(a)});
|
|
800
|
+
a.j.D(a.g,"ended",function(){(new Tc(function(){a.g&&a.g.ended&&(a.o=!0,Pq(a))})).X(Qq)})}function Kq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Pq(a)}function Pq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);Rq(a)||Sq(a);H(c)})}
|
|
801
|
+
function Tq(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(q){switch(q.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ta(q,5),E(q,a.h.load(b.manifest,b.startTime),7)):E(q,Promise.resolve(),3);case 7:va(q,3);break;case 5:return g=za(q),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),q.return();case 3:if(!a.h)return q.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
802
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),Sq(a));H(q)}})}function Oq(a,b,c){a.h&&(Iq(a),Lq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
803
|
+
function Iq(a){a.G.X(Uq);for(var b={video:{},player:{}},c=t(Zp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in dq)0==a.m%dq[e]&&(b.player[e]=a.h[e]());for(var f in bq)0==a.m%bq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Lq(a,{type:"update",update:b},a.l);for(var g in cq)0==a.m%cq[g]&&(b={player:{}},b.player[g]=a.h[g](),Lq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
804
|
+
1);Rq(a)}function Rq(a){return a.A&&(a.g.duration||a.h.U())?(Vq(a),a.A=!1,!0):!1}function Vq(a,b){var c={contentId:a.h.yc(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Sq(a,void 0===b?0:b,c)}
|
|
805
|
+
function Nq(a,b){var c=Wp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Tq(a,c.initState,c.appData);Iq(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;
|
|
806
|
+
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Wq(a,g,f,null)},function(h){return Wq(a,g,f,h)})}}
|
|
807
|
+
function Mq(a,b){var c=Wp(b.data);switch(c.type){case "PLAY":a.g.play();Sq(a);break;case "PAUSE":a.g.pause();Sq(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(),Sq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Sq(a));break;case "STOP":a.h.oc().then(function(){a.h&&Sq(a)});break;case "GET_STATUS":Vq(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));
|
|
808
|
+
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Sq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Vq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Lq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Lq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
809
|
+
function Wq(a,b,c,d){a.h&&Lq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Lq(a,b,c,d){a.F&&(a=Vp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Sq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Xq:a.h.pf()?Yq:a.g.paused?Zq:$q,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Lq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
810
|
+
S("shaka.cast.CastReceiver",Hq);Hq.prototype.destroy=Hq.prototype.destroy;Hq.prototype.setContentArtist=Hq.prototype.Ki;Hq.prototype.setContentImage=Hq.prototype.Li;Hq.prototype.setContentTitle=Hq.prototype.Ni;Hq.prototype.clearContentMetadata=Hq.prototype.uh;Hq.prototype.setContentMetadata=Hq.prototype.Mi;Hq.prototype.isIdle=Hq.prototype.ci;Hq.prototype.isConnected=Hq.prototype.isConnected;var Uq=.5,Qq=5,Xq="IDLE",$q="PLAYING",Yq="BUFFERING",Zq="PAUSED";function ar(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=br(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,u=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){q=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){u=w;break}if(-1===
|
|
811
|
+
q||-1===u)p=cr(d,e),a.nestedCues.push(p);else{for(;q<=u;q++)if(w=p[q]){var v=w.l,A=w.i,y=w.j,B=w.h;if(v!=h||A!=k||y!=l||B!=m)n.payload&&a.nestedCues.push(n),n=br(d,e,v,A,y,B),h=v,k=A,l=y,m=B;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=cr(d,e),a.nestedCues.push(n));n=br(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
812
|
+
function br(a,b,c,d,e,f){a=new Rb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function cr(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}function dr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function er(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";fr(this)}function gr(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Rb(b,c,"");e.lineInterpretation=1;var f=hr.get(a.g);f&&(e.line=f);(b=ar(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=hr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function fr(a){ir(a,0,15);a.g=1}
|
|
813
|
+
function jr(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case kr:d=lr.has(c)?lr.get(c):String.fromCharCode(c);break;case mr:d=nr.get(c);break;case or:a.i[a.g].pop();d=pr.get(c);break;case qr:a.i[a.g].pop(),d=rr.get(c)}d&&a.i[a.g].push(new dr(d,a.m,a.j,a.o,a.l))}}function sr(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 ir(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
814
|
+
var kr=0,mr=1,or=2,qr=3,lr=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"]]),nr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),pr=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
|
|
815
|
+
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),rr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
816
|
+
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),hr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function tr(a,b){this.h=ur;this.o=new er(a,b);this.i=new er(a,b);this.g=this.j=new er(a,b);this.l=0;this.m=null}function vr(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==wr&&a.h!==xr&&(e=gr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,ir(c,0,15),c=a.j,c.g=0<c.h?c.h:0,ir(c,0,15),d.g=15);a.h=wr;d.h=b;return e}function yr(a){a.h=zr;a.g=a.j;a.g.h=0}function Ar(a){bb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=xr}
|
|
817
|
+
var ur=0,zr=1,wr=3,xr=4,Br="black green blue cyan red yellow magenta black".split(" "),Cr="white green blue cyan red yellow magenta white_italics".split(" ");function Dr(a,b){this.J=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=Er;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";Fr(this)}function Fr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Gr())}function Gr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Hr(a,b){Ir(a)&&(a.i[a.h][a.g]=new dr(b,a.C,a.A,a.s,a.B),a.g++)}function Ir(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}Dr.prototype.isVisible=function(){return this.l};
|
|
818
|
+
function Jr(a,b,c){var d=new Rb(a.j,b,"");d.textAlign=a.F===Kr?"left":a.F===Lr?"right":Tb;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Lb:2;switch(a.G){case Mr:e.regionAnchorX=0;e.regionAnchorY=0;break;case Nr:e.regionAnchorX=50;e.regionAnchorY=0;break;case Or:e.regionAnchorX=100;e.regionAnchorY=0;break;case Pr:e.regionAnchorX=0;e.regionAnchorY=50;break;case Qr:e.regionAnchorX=
|
|
819
|
+
50;e.regionAnchorY=50;break;case Rr:e.regionAnchorX=100;e.regionAnchorY=50;break;case Sr:e.regionAnchorX=0;e.regionAnchorY=100;break;case Tr:e.regionAnchorX=50;e.regionAnchorY=100;break;case Ur:e.regionAnchorX=100,e.regionAnchorY=100}if(c=ar(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Kr=0,Lr=1,Er=2,Mr=0,Nr=1,Or=2,Pr=3,Qr=4,Rr=5,Sr=6,Tr=7,Ur=8;function Vr(){this.i=[];this.h=null;this.g=0}function Wr(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Xr(a.h)),a.h=null,a.g=0))}function Xr(a){this.g=0;this.h=a}Xr.prototype.ka=function(){return this.g<this.h.length};Xr.prototype.ra=function(){return this.g};function Yr(a){if(!a.ka())throw new T(2,2,3E3);return a.h[a.g++]}Xr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function Zr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
820
|
+
function $r(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Yr(b).value;b=null;c=t(as(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Jr(e,d,a.i)),Fr(e);return b}if(137===c)for(b=Yr(b).value,b=t(as(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Yr(b).value;b=null;c=t(as(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Jr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Yr(b).value;
|
|
821
|
+
b=null;c=t(as(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Jr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Yr(b).value,bs(a,b,d);if(143===c)return d=bs(a,255,d),cs(a),d;if(144===c)b.skip(1),d=Yr(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Yr(b).value,c=Yr(b).value,b.skip(1),a.g&&(b=ds((c&48)>>4,(c&12)>>2,c&3),a.g.B=ds((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Yr(b).value,b=Yr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
822
|
+
b.skip(1),d=Yr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Dr(c,a.i);f.j=d;a.h[c]=f}d=Yr(b).value;f=Yr(b).value;var g=Yr(b).value,h=Yr(b).value,k=Yr(b).value;b=Yr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
823
|
+
function as(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function bs(a,b,c){var d=null;b=t(as(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Jr(f,c,a.i));a.h[e]=null}return d}function cs(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ds(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return es[a<<2|b<<1|c]}
|
|
824
|
+
var fs=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"]]),es="black blue green cyan red magenta yellow white".split(" ");function gs(){this.h=[];this.g=[];this.i=new Vr;this.l=0;this.m=new Map([["CC1",new tr(0,0)],["CC2",new tr(0,1)],["CC3",new tr(1,0)],["CC4",new tr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;hs(this)}gs.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;hs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())cs(b.value)};
|
|
825
|
+
function hs(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=ur,c.g=c.j,c.m=null,fr(c.i),fr(c.j),fr(c.o);a.B=!0}
|
|
826
|
+
gs.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Gg(a,0);if(!(8>a.getLength())&&181===a.R()&&49===a.ia()&&1195456820===a.O()&&3===a.R()&&(c=a.R(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.R(),f=(e&4)>>2,g=a.R(),h=a.R();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Za:g,yb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
827
|
+
gs.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=is(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Wr(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=js(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
828
|
+
function is(a,b){var c=b.type;if(16===(b.Za&112)){var d=b.Za>>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.Za&&255===b.yb||!b.Za&&!b.yb||!ks(b.Za)||!ks(b.yb))return 45<=++a.l&&hs(a),null;a.l=0;b.Za&=127;b.yb&=127;var e=b.Za;if(1<=e&&15>=e||!b.Za&&!b.yb)return null;e=null;if(16===(b.Za&112))a:{a.A.add(d),d=b.Za;a=b.yb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
829
|
+
"white";e=!1;7>f?d=Cr[f]:7===f&&(e=!0);a=1===(a&1);c.h!==xr&&(f=c.g,c.h===wr&&b!==f.g&&(c=1+b-f.h,sr(f,c,1+f.g-f.h,f.h),ir(f,0,c-1),ir(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",jr(c.g,kr,32),d=!1,b=Cr[(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=Br[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))jr(c.g,
|
|
830
|
+
mr,a);else if(18===(d&246)&&32===(a&224))jr(c.g,d&1?qr:or,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.yb){case 32:yr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=vr(c,2,a);break;case 38:d=vr(c,3,a);break;case 39:d=vr(c,4,a);break;case 40:jr(c.g,kr,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:fr(c.o);Ar(c);break;case 43:Ar(c);break;case 44:b=c.i;d=null;c.h!==xr&&(d=gr(b,c.l,a));ir(b,0,15);break;case 45:b=c.g;c.h!==wr?d=null:(d=gr(b,c.l,a),e=b.g-b.h+1,sr(b,
|
|
831
|
+
e-1,e,b.h),ir(b,0,e-1),ir(b,b.g,15-b.g),c.l=a);break;case 46:ir(c.j,0,15);break;case 47:b=null,c.h!==xr&&(b=gr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,yr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.yb,jr(c.g,kr,b.Za),jr(c.g,kr,a);return e}
|
|
832
|
+
function js(a,b){var c=[];try{for(;b.ka();){var d=Yr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Yr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Zr(e));for(var g=a.j.get(e),h=b.ra();b.ra()-h<f;){e=b;var k=Yr(e),l=k.value,m=k.pts;if(16===l){var n=Yr(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Ir(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.m-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Jr(q,p,g.i));if(q.h+1>=q.o){p=q;for(var u=
|
|
833
|
+
0,w=1;16>w;w++,u++)p.i[u]=p.i[w];for(w=0;1>w;w++,u++)p.i[u]=Gr()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Jr(q,p,g.i));q.i[q.h]=Gr();q.g=0;break;case 12:q.isVisible()&&(e=Jr(q,p,g.i)),Fr(q),p=q,p.h=0,p.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=$r(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Hr(g.g,
|
|
834
|
+
"\u266a"):Hr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Hr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(fs.has(e)){var A=fs.get(e);Hr(g.g,A)}else Hr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Hr(g.g,"_"):Hr(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(y){if(y instanceof T&&3E3===y.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}function ks(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
835
|
+
gs.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",gs);Jb=function(){return new gs};function ls(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function ms(){this.j=new Map;this.i=this.h=0;this.g=ns}
|
|
836
|
+
ms.prototype.init=function(a){function b(f){f=f.name;f in os&&(c.g=os[f])}var c=this,d=[],e=[];(new Jg).box("moov",Qg).box("mvex",Qg).P("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Qg).P("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.O();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.ia();g.ia();g.ia();g.ia();d.push(h)}).box("mdia",Qg).P("mdhd",
|
|
837
|
+
function(f){f=Wi(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Tg).box("sinf",Qg).box("frma",function(f){f=Zi(f.reader).La;f in os&&(c.g=os[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==ns&&ab("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
838
|
+
ms.prototype.parse=function(a){var b=this;if(this.g==ns)return[];var c=[],d=0,e=[];(new Jg).box("moof",function(f){d=f.start;e=[];Qg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,gd:b.h,Wd:b.i,Ig:[],timescale:9E4});Qg(f)}).P("trun",function(f){var g=e[e.length-1];f=Xi(f.reader,f.version,f.flags);g.Ig.push(f)}).P("tfhd",function(f){var g=e[e.length-1];f=Ui(f.reader,f.flags);g.gd=f.gd||b.h;g.Wd=f.Wd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).P("tfdt",function(f){var g=e[e.length-
|
|
839
|
+
1];f=Vi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);ps(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.gd,l.Wd,g,l.Ig,c)}}).parse(a,!1);return c};
|
|
840
|
+
function ps(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Mg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].wh);b.ka();){g=b.O();var p=b.R(),q=null;q=!1;h=1;switch(a.g){case qs:q=p&31;q=6==q;break;case rs:h=2;b.skip(1);q=p>>1&63;q=39==q||40==q;break;default:return}if(q)for(p=0,l<n.length&&(p=n[l].xe||0),p=(c+p)/d,h=t(ls(b.nb(g-h))),q=h.next();!q.done;q=h.next())k.push({packet:q.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
841
|
+
c+(n[l].Lf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",ms);var ns=0,qs=1,rs=2,os={avc1:qs,avc3:qs,hev1:rs,hvc1:rs,dvav:qs,dva1:qs,dvh1:rs,dvhe:rs};Ib["video/mp4"]=function(){return new ms};function ss(){this.g=null}ss.prototype.init=function(){};ss.prototype.parse=function(a){this.g?this.g.clearData():this.g=new mj;var b=[];a=Bb(a);if(!Aj(a))return b;a=this.g.parse(a);var c=a.ld(),d=a.be();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(ls(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
842
|
+
S("shaka.cea.TsCeaParser",ss);Ib["video/mp2t"]=function(){return new ss};function ts(a,b,c){var d=us(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Ic});if(1<f.length)throw new T(2,4,4050);f.length&&(g=vs(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ic}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ic?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
843
|
+
l.Ic});f.length&&(a=ws(e,k,f,c,h),0==a.length&&(a=[Od("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Od(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{mg:h,Tj:e,drmInfos:a,Me:g,qg:!0}}
|
|
844
|
+
function xs(a,b,c,d){var e=ts(a,c,d);if(b.qg){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.qg=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.mg||b.mg}
|
|
845
|
+
function ys(a){var b=0,c=Fb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function zs(a){a=t(hh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return fh(c)}return""}
|
|
846
|
+
function As(a){var b=jh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=fh(b)))return b;a=jh(a.node,"urn:microsoft:playready","pro");if(!a||!fh(a))return"";a=fh(a);a=Hd(a);a=ys(a).filter(function(c){return c.type===Bs})[0];if(!a)return"";a=xd(a.value,!0);return(a=Zg(a,"WRMHEADER"))?zs(a):""}
|
|
847
|
+
function ws(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Ic];if(h){var k;if((k=jh(g.node,"urn:microsoft:playready","pro"))&&fh(k)){k=fh(k);k=Hd(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Xg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Ic)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
|
|
848
|
+
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Xg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Od(h,b,g.init||a||k||l);if(h=Cs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function us(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Ds(c.value))&&b.push(c);return b}
|
|
849
|
+
function Ds(a){var b=a.attributes.schemeIdUri,c=mh(a,"urn:mpeg:cenc:2013","default_KID"),d=kh(a,"urn:mpeg:cenc:2013","pssh").map(gh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Hd(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Ic:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
850
|
+
function vs(a){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=jh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=jh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Dd(b.attributes.keyUriTemplate);
|
|
851
|
+
if(!a||!b)throw new T(2,4,4051);a=Id(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{ii:b,iv:a}}
|
|
852
|
+
var Bs=1,Cs=(new Map).set("com.widevine.alpha",function(a){var b=jh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=fh(b))?b:(a=jh(a.node,"urn:microsoft","laurl"))?Dd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",As).set("com.microsoft.playready.recommendation",As).set("com.microsoft.playready.software",As).set("com.microsoft.playready.hardware",As).set("org.w3.clearkey",function(a){var b=jh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=fh(b))?b:(a=jh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
853
|
+
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=fh(a))?a:""});function Es(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&ab("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
852
854
|
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})}
|
|
853
|
-
function
|
|
854
|
-
p)break;else if(q>=p)break;
|
|
855
|
-
function
|
|
856
|
-
function
|
|
857
|
-
[];q.children.length;){var u=q.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(q.attributes));for(var
|
|
858
|
-
function
|
|
859
|
-
;function
|
|
860
|
-
function
|
|
861
|
-
function
|
|
862
|
-
d)}function
|
|
863
|
-
function
|
|
864
|
-
function
|
|
865
|
-
function
|
|
866
|
-
function
|
|
867
|
-
3,3009);I=
|
|
868
|
-
D.next())
|
|
869
|
-
function
|
|
870
|
-
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{
|
|
871
|
-
function
|
|
872
|
-
function
|
|
873
|
-
(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity,
|
|
874
|
-
function
|
|
875
|
-
function
|
|
876
|
-
|
|
877
|
-
h(I);
|
|
878
|
-
function
|
|
855
|
+
function Fs(a,b){var c=Gs(a,b,"timescale"),d=1;c&&(d=sh(c)||1);c=Gs(a,b,"duration");(c=sh(c||""))&&(c/=d);var e=Gs(a,b,"startNumber"),f=Number(Gs(a,b,"presentationTimeOffset"))||0,g=th(e||"");if(null==e||null==g)g=1;e=null;if(b=Hs(a,b,"SegmentTimeline")){b=eh(b,"S");e=d;a=a.ha.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],q=lh(n,"t",th),u=lh(n,"d",th),w=lh(n,"r",rh);n=lh(n,"k",rh)||0;null!=q&&(q-=f);if(u){q=null!=q?q:l;w=w||0;if(0>w)if(p){p=lh(p,"t",th);if(null==
|
|
856
|
+
p)break;else if(q>=p)break;w=Math.ceil((p-q)/u)-1}else{if(Infinity==a)break;else if(q/e>=a)break;w=Math.ceil((a*e-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/e);for(p=0;p<=w;++p)l=q+u,k.push({start:q/e,end:l/e,bg:q,wb:n,Ii:k.length+h}),q=l}}e=k}return{timescale:d,Ja:c,Ed:g,Fb:f/d||0,ag:f,timeline:e}}function Is(a,b){return[b(a.I),b(a.qa),b(a.ta)].filter(ze)}function Gs(a,b,c){b=Is(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
857
|
+
function Hs(a,b,c){b=Is(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=ih(d.value,c));d=b.next());return a}
|
|
858
|
+
function Js(a,b,c,d,e,f){for(var g=mh(a,"http://www.w3.org/1999/xlink","href"),h=mh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=ah("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return ag(new T(2,4,4028));if("onLoad"!=h)return ag(new T(2,4,4027));var p=Nd([d],[g]);return e.request(0,qg(p,b)).za(function(q){q=Yg(q.data,a.tagName);if(!q)return ag(new T(2,4,4001,g));for(a.children=
|
|
859
|
+
[];q.children.length;){var u=q.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(q.attributes));for(var w=u.next();!w.done;w=u.next())w=w.value,a.attributes[w]=q.attributes[w];return Ks(a,b,c,p[0],e,f+1)})}
|
|
860
|
+
function Ks(a,b,c,d,e,f){f=void 0===f?0:f;if(mh(a,"http://www.w3.org/1999/xlink","href")){var g=Js(a,b,c,d,e,f);c&&(g=g.za(void 0,function(){return Ks(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(dh(a)),l=k.next();!l.done;h={sc:h.sc},l=k.next())h.sc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==mh(h.sc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.sc}}(h)):"SegmentTimeline"!=h.sc.tagName&&g.push(Ks(h.sc,b,c,d,e,f));return eg(g).za(function(){return a})}
|
|
861
|
+
;function Ls(a,b,c,d,e,f,g){var h,k=(new Jg).P("sidx",function(l){h=Ms(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
862
|
+
function Ms(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Hc(),m=g.reader.Hc();g.reader.skip(2);var n=g.reader.ia();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.O(),q=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==q)throw new T(2,3,3006);h.push(new Ai(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Ns(a){this.h=Fb(a);this.g=new Gg(this.h,0)}Ns.prototype.ka=function(){return this.g.ka()};
|
|
863
|
+
function Os(a){var b=Ps(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Ps(a);a:{d=t(Qs);for(var e=d.next();!e.done;e=d.next())if(zb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ra();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ra()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ra();d=Fb(a.h,a.g.ra(),b);a.g.skip(b);return new Rs(c,
|
|
864
|
+
d)}function Ps(a){var b=a.g.ra(),c=a.g.R();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Bb(a.h,b,c)}var Qs=[[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 Rs(a,b){this.id=a;this.g=b}
|
|
865
|
+
function Ss(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ts(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ns(a.g);for(var n=null,p=null;a.ka();){var q=Os(a);if(187==q.id){var u=Us(q);u&&(q=c*u.Ui,u=b+u.yi,null!=n&&m.push(new Ai(n+g,q+g,l,p,u-1,f,g,h,k)),n=q,p=u)}}null!=n&&m.push(new Ai(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
866
|
+
function Us(a){var b=new Ns(a.g);a=Os(b);if(179!=a.id)throw new T(2,3,3013);a=Ss(a);b=Os(b);if(183!=b.id)throw new T(2,3,3012);b=new Ns(b.g);for(var c=0;b.ka();){var d=Os(b);if(241==d.id){c=Ss(d);break}}return{Ui:a,yi:c}};function Vs(a,b,c){b=Hs(a,b,"Initialization");if(!b)return null;var d=a.I.Ca(),e=b.attributes.sourceURL;e&&(d=Nd(d,[Dd(e)]));e=0;var f=null;if(b=lh(b,"range",qh))e=b.start,f=b.end;c=new yi(function(){return d},e,f,Ws(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
|
|
867
|
+
function Xs(a,b,c){var d=Number(Gs(a,Ys,"presentationTimeOffset"))||0,e=Gs(a,Ys,"timescale"),f=1;e&&(f=sh(e)||1);var g=d/f||0,h=Vs(a,Ys,c);Zs(a,h);var k=Le(a);return{Zb:function(){var l=Hs(k,Ys,"RepresentationIndex");var m=k.I.Ca();l&&(l=Dd(l.attributes.sourceURL))&&(m=Nd(m,[l]));l=$s(k);return at(k,b,h,m,l.start,l.end,g)}}}
|
|
868
|
+
function at(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G;return O(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.sb||!a.ha.vd,l=a.ha.start,m=a.ha.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Da,c.na,!0):null],p=null,E(J,Promise.all(u),2);w=J.h;v=w[0];A=w[1]||null;y=null;B=l-g;z=l;C=m?l+m:Infinity;if("mp4"==n)var I=Ls(v,e,d,c,B,z,C);else{I=new Ns(A);if(440786851!=Os(I).id)throw new T(2,3,3008);var F=Os(I);if(408125543!=F.id)throw new T(2,
|
|
869
|
+
3,3009);I=F.g.byteOffset;F=new Ns(F.g);for(var M=null;F.ka();){var N=Os(F);if(357149030==N.id){M=N;break}}if(!M)throw new T(2,3,3010);M=new Ns(M.g);N=1E6;for(F=null;M.ka();){var L=Os(M);if(2807729==L.id)N=Ss(L);else if(17545==L.id)if(4==L.g.byteLength)F=L.g.getFloat32(0);else if(8==L.g.byteLength)F=L.g.getFloat64(0);else throw new T(2,3,3003);}if(null==F)throw new T(2,3,3011);M=N/1E9;F*=M;N=Os(new Ns(v));if(475249515!=N.id)throw new T(2,3,3007);I=Ts(N,I,M,F,d,c,B,z,C)}y=I;D=t(y);for(K=D.next();!K.done;K=
|
|
870
|
+
D.next())G=K.value,G.codecs=a.I.codecs,G.mimeType=a.I.mimeType;h.yd(y);q=new Ok(y);k&&q.wc(z,C,!0);return J.return(q)})}function Ys(a){return a.Jc}function $s(a){var b=Hs(a,Ys,"RepresentationIndex");a=Gs(a,Ys,"indexRange");a=qh(a||"");b&&(a=lh(b,"range",qh,a));return a}function Zs(a,b){bt(a,b);if(!$s(a))throw new T(2,4,4002);}function bt(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Td&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
871
|
+
function Ws(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Ec,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function ct(a,b,c){var d=Vs(a,dt,c),e=et(a);if(!e.Ja&&!e.timeline&&1<e.Dc.length)throw new T(2,4,4002);if(!e.Ja&&!a.ha.duration&&!e.timeline&&1==e.Dc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.ta.id&&a.I.id&&(g=b[a.ta.id+","+a.I.id])&&(f=g.segmentIndex);var h=ft(a.ha.start,a.ha.duration,a.I.Ca,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.xd(h,a.presentationTimeline.jb()):f=new Ok(h);a.presentationTimeline.yd(h);a.sb&&a.ha.vd||f.wc(a.ha.start,
|
|
872
|
+
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{Zb:function(){f&&0!=f.getNumReferences()||f.le(h);return Promise.resolve(f)}}}function dt(a){return a.Gb}function et(a){var b=gt(a);a=Fs(a,dt);var c=a.Ed;0==c&&(c=1);var d=0;a.Ja?d=a.Ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ja:a.Ja,startTime:d,Ed:c,Fb:a.Fb,timeline:a.timeline,Dc:b}}
|
|
873
|
+
function ft(a,b,c,d,e,f,g,h){var k=d.Dc.length;d.timeline&&d.timeline.length!=d.Dc.length&&(k=Math.min(d.timeline.length,d.Dc.length));for(var l=a-d.Fb,m=b?a+b:Infinity,n=[],p=d.startTime,q={},u=0;u<k;q={Zc:q.Zc,Vc:q.Vc},u++){q.Vc=d.Dc[u];var w=p;p=void 0;p=null!=d.Ja?w+d.Ja:d.timeline?d.timeline[u].end:w+b;q.Zc=null;w=new Ai(a+w,a+p,function(v){return function(){null==v.Zc&&(v.Zc=Nd(c(),[v.Vc.oi]));return v.Zc}}(q),q.Vc.start,q.Vc.end,e,l,a,m,[],"",null,null,Bi,f);w.codecs=h;w.mimeType=g;n.push(w)}return n}
|
|
874
|
+
function gt(a){return[a.I.Gb,a.qa.Gb,a.ta.Gb].filter(ze).map(function(b){return eh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.nf&&(a.nf=!0);var c=Dd(b.attributes.media);b=lh(b,"mediaRange",qh,{start:0,end:null});return{oi:c,start:b.start,end:b.end}})};function ht(a,b,c,d,e,f,g,h,k){k||a.I.Bc||(a.I.Bc=Gs(a,it,"initialization"));var l=a.I.Bc?jt(a,g):null,m=kt(a);lt(m);var n=Le(a);if(m.td)return bt(a,l),{Zb:function(){var v=Es(m.td,n.I.id,null,null,n.bandwidth||null,null);v=Nd(n.I.Ca(),[v]);return at(n,b,l,v,0,null,m.Fb)}};if(m.Ja)return d||"image"===a.qa.contentType||(a.presentationTimeline.zf(m.Ja),a.presentationTimeline.pe(a.ha.start)),{Zb:function(){return mt(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.ta.id&&a.I.id&&(d=a.ta.id+","+a.I.id,d=c[d])&&
|
|
875
|
+
(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity,w=!(a.sb&&a.ha.vd);p?(c=p,nt(c,m,q,u,w,l),c.Ma(a.presentationTimeline.jb())):p=new ot(m,a.I.id,a.bandwidth,a.I.Ca,q,u,l,w,g,a.I.Mf);m.timeline&&"image"!==a.qa.contentType&&a.presentationTimeline.Hg(m.timeline,q);d&&a.sb&&(d.segmentIndex=p);return{Zb:function(){p instanceof ot&&0==p.getNumReferences()&&nt(p,m,q,u,w,l);return Promise.resolve(p)}}}function it(a){return a.Qb}
|
|
876
|
+
function kt(a){var b=Fs(a,it),c=Gs(a,it,"media"),d=Gs(a,it,"index");return{Ja:b.Ja,timescale:b.timescale,Ed:b.Ed,Fb:b.Fb,ag:b.ag,timeline:b.timeline,Ob:c&&Dd(c),td:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function lt(a){var b=a.td?1:0;b+=a.timeline?1:0;b+=a.Ja?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.td&&(a.timeline=null),a.Ja=null);if(!a.td&&!a.Ob)throw new T(2,4,4002);}
|
|
877
|
+
function mt(a,b,c,d,e,f,g){function h(F){var M=(F-w)*u,N=M+b.Fb,L=M+n;M=L+u;var P=Math.min(M,l());L=new Ai(L,P,function(){var R=N*v;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(N)*BigInt(v));R=Es(A,B,F,null,y,R);return Nd(z(),[R])},0,null,d,C,n,l(),[],"",null,null,Bi,f);L.codecs=a.I.codecs;L.mimeType=a.I.mimeType;L.j=M;return L}function k(){var F=[Math.max(m.jb(),n),Math.min(m.Nb(),l())].map(function(M){return M-n});F=[Math.ceil(F[0]/u),Math.ceil(F[1]/u)-1];a.I.Ga&&F[1]++;return F.map(function(M){return M+
|
|
878
|
+
w})}function l(){var F=null!=p&&e[p]||q;return F?n+F:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.ta.id,q=a.ha.duration,u=b.Ja,w=b.Ed,v=b.timescale,A=b.Ob,y=a.bandwidth||null,B=a.I.id,z=a.I.Ca,C=n-b.Fb,D=k();c=a.sb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var K=c;K<=g;++K){var G=h(K);D.push(G)}var J=new Ok(D);D=m.Nb()<l();K=m.U();if(D||K){var I=Math.max(c,g+1);c=u;a.I.Ga&&(c=.1);J.ze(c,function(){var F=m.jb();J.Ma(F);var M=t(k());M.next();M=M.next().value;for(var N=[];I<=M;){var L=
|
|
879
|
+
h(I);N.push(L);I++}return F>l()&&!N.length?null:N})}return Promise.resolve(J)}function jt(a,b){var c=a.I.Bc;c||(c=Gs(a,it,"initialization"));if(!c)return null;c=Dd(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.Ca;b=new yi(function(){var g=Es(c,d,null,null,e,null);return Nd(f(),[g])},0,null,Ws(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
|
|
880
|
+
function ot(a,b,c,d,e,f,g,h,k,l){Ok.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&pt(this)}pa(ot,Ok);r=ot.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Ok.prototype.release.call(this);this.h=null};
|
|
879
881
|
r.Ma=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.getNumReferences()&&this.release())}};
|
|
880
|
-
function
|
|
881
|
-
function
|
|
882
|
-
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Ii,f=this.h.ag+d.bg;c=this.i-this.h.Fb;var g=this.i+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=[],n=(d.end-d.start)/d.wb,p={},q=0;q<d.wb;p={
|
|
883
|
-
|
|
884
|
-
function
|
|
885
|
-
function
|
|
886
|
-
k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(
|
|
887
|
-
"mp4a",D,K;
|
|
888
|
-
c).box("av01",c).box("avcC",function(
|
|
889
|
-
aj(
|
|
890
|
-
function(
|
|
891
|
-
|
|
892
|
-
mimeType:A?"audio/mp4":"video/mp4",codecs:
|
|
893
|
-
function
|
|
894
|
-
function
|
|
895
|
-
function
|
|
896
|
-
function
|
|
897
|
-
function
|
|
898
|
-
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new sc(k.location)).zb))return!1;return!0});d.length&&(a.B=d[0].Ff);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.B=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:Nd(a.i,d)};function
|
|
899
|
-
function
|
|
900
|
-
r.Qe=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,
|
|
901
|
-
return E(
|
|
902
|
-
allowedByKeySystem:!0,decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,D=t(C),K=D.next();!K.done;K=D.next())
|
|
903
|
-
function
|
|
904
|
-
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Je}).map(function(Q){return[
|
|
905
|
-
t(
|
|
906
|
-
function
|
|
907
|
-
|
|
908
|
-
function
|
|
909
|
-
function
|
|
910
|
-
function
|
|
911
|
-
function
|
|
912
|
-
function
|
|
913
|
-
function
|
|
914
|
-
d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
915
|
-
|
|
916
|
-
function
|
|
917
|
-
function
|
|
918
|
-
function
|
|
919
|
-
function
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
function bu(a,b,c){var d=
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
function
|
|
926
|
-
function
|
|
927
|
-
function
|
|
928
|
-
function
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
r.
|
|
932
|
-
r.
|
|
882
|
+
function nt(a,b,c,d,e,f){qt(a,f);if(a.h){c=a.h.timeline;a.h.Ob!==b.Ob&&(a.h.Ob=b.Ob);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&pt(a)}function qt(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Gi(c,b)}}
|
|
883
|
+
function pt(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Ma(a.i)}}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.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
|
|
884
|
+
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Ii,f=this.h.ag+d.bg;c=this.i-this.h.Fb;var g=this.i+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=[],n=(d.end-d.start)/d.wb,p={},q=0;q<d.wb;p={$c:p.$c,He:p.He},q++){var u=d.start+n*q,w=u+n;p.He=q+1;p.$c=null;u=new Ai(this.i+u,this.i+w,function(v){return function(){if(!b.h)return[];null==
|
|
885
|
+
v.$c&&(v.$c=rt(b.h.Ob,b.F,e,b.B,f,v.He,b.C));return v.$c}}(p),0,null,this.s,c,this.i,this.l,[],"",null,null,Bi,this.A);u.codecs=k;u.mimeType=l;0==this.G?0<q&&u.je():0!=q%this.G&&u.je();m.push(u)}c=new Ai(this.i+d.start,h,function(){return 0<d.wb||!b.h?[]:rt(b.h.Ob,b.F,e,b.B,f,null,b.C)},0,null,this.s,c,this.i,this.l,m,"",null,null,Bi,this.A,0<d.wb);c.codecs=k;c.mimeType=l;c.j=g;this.g[a]=c}return c};
|
|
886
|
+
function rt(a,b,c,d,e,f,g){a=Es(a,b,c,f,d||null,e);return Nd(g(),[a]).map(function(h){return h.toString()})};function st(a){var b=me(a),c=b.split("/")[0];a=ne(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Gd:null,colorGamut:null}}
|
|
887
|
+
function tt(a,b){function c(z){v=z.name;var C=z.reader;C.skip(24);var D=C.ia(),K=C.ia();C.skip(50);n=String(D);m=String(K);z.reader.ka()&&Qg(z)}function d(z){var C=Yi(z.reader);p=C.channelCount;q=C.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
|
|
888
|
+
k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,q=null,u=null,w=null,v;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).P("mdhd",function(z){l=Wi(z.reader,z.version).language}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("mp4a",function(z){var C=Yi(z.reader);p=C.channelCount;q=C.sampleRate;z.reader.ka()?Qg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var C=
|
|
889
|
+
"mp4a",D,K;z.ka();){D=z.R();for(var G=z.R();G&128;)G=z.R();if(3==D)z.ia(),G=z.R(),G&128&&z.ia(),G&64&&z.skip(z.R()),G&32&&z.ia();else if(4==D)K=z.R(),z.skip(12);else if(5==D)break}K&&(C+="."+aj(K),5==D&&z.ka()&&(D=z.R(),K=(D&248)>>3,31===K&&z.ka()&&(K=32+((D&7)<<3)+((z.R()&224)>>5)),C+="."+K));f.push(C);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
|
|
890
|
+
c).box("av01",c).box("avcC",function(z){var C=v||"";switch(v){case "dvav":C="avc3";break;case "dva1":C="avc1"}z=z.reader;z.skip(1);z=C+"."+aj(z.R())+aj(z.R())+aj(z.R());g.push(z);k=!0}).box("hvcC",function(z){var C=v||"";switch(v){case "dvh1":C="hvc1";break;case "dvhe":C="hev1"}var D=z.reader;D.skip(1);z=D.R();var K=["","A","B","C"][z>>6],G=z&31,J=D.O(),I=(z&32)>>5?"H":"L";z=[D.R(),D.R(),D.R(),D.R(),D.R(),D.R()];D=D.R();for(var F=0,M=0;32>M;M++){F|=J&1;if(31==M)break;F<<=1;J>>=1}C=C+("."+K+G)+("."+
|
|
891
|
+
aj(F,!0));C+="."+I+D;K="";for(G=z.length;G--;)if((I=z[G])||K)K="."+I.toString(16).toUpperCase()+K;C+=K;g.push(C);k=!0}).box("dvcC",function(z){var C=v||"";switch(v){case "hvc1":C="dvh1";break;case "hev1":C="dvhe";break;case "avc1":C="dva1";break;case "avc3":C="dvav"}var D=z.reader;D.skip(2);z=D.R();D=D.R();g.push(C+"."+bj(z>>1&127)+"."+bj(z<<5&32|D>>3&31));k=!0}).P("vpcC",function(z){var C=v||"",D=z.reader;z=D.R();var K=D.R();D=D.R()>>4&15;g.push(C+"."+bj(z)+"."+bj(K)+"."+bj(D));k=!0}).box("av1C",
|
|
892
|
+
function(z){var C=v||"",D=z.reader;D.skip(1);z=D.R();D=D.R();var K=z>>>5,G=(D&64)>>6;g.push(C+"."+K+"."+bj(z&31)+(D>>>7?"H":"M")+"."+bj(2===K&&G?(D&32)>>5?12:10:G?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+bj(1)+"."+bj(1)+"."+bj(1)+".0");k=!0}).box("enca",Ug).box("encv",Tg).box("sinf",Qg).box("frma",function(z){z=Zi(z.reader).La;e(z)}).box("colr",function(z){g=g.map(function(K){if(K.startsWith("av01.")){var G=z.reader,J=G.ra(),I=G.nb(4);var F=String.fromCharCode(I[0]);F+=String.fromCharCode(I[1]);
|
|
893
|
+
F+=String.fromCharCode(I[2]);F+=String.fromCharCode(I[3]);if("nclx"===F){I=G.ia();F=G.ia();var M=G.ia(),N=G.R()>>7,L=K.split(".");10==L.length&&(L[6]=bj(I),L[7]=bj(F),L[8]=bj(M),L[9]=String(N),K=L.join("."))}G.seek(J)}return K});var C=$i(z.reader),D=C.colorGamut;u=C.Gd;w=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var B=new Hb("video/mp4");a&&B.init(a);B.i(b);a=t(B.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);B.g()}return{type:A?"audio":"video",
|
|
894
|
+
mimeType:A?"audio/mp4":"video/mp4",codecs:ut(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:q,closedCaptions:y,Gd:u,colorGamut:w}}function ut(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ke(d);b.has(e)||(c.push(d),b.add(e))}b=Ud("audio",c);d=Ud("video",c);a=Ud(Td,c);d=vt(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
895
|
+
function vt(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?mb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function wt(a){var b=null;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("encv",Tg).box("enca",Ug).box("sinf",Qg).box("schi",Qg).P("tenc",function(c){c=c.reader;c.R();c.R();c.R();c.R();b=Ld(c.nb(16))}).parse(a,!0);return b};function xt(a){this.o=null;this.A=a;this.G=new jg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}xt.prototype.configure=function(a){this.o=a};xt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};xt.prototype.setManifestType=function(a){this.s=a};
|
|
896
|
+
function yt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Nd(a.i,[zt(a,b)]),d=qg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),kg(a.G,e),ta(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=wd(f.data),h=JSON.parse(g),1==h.VERSION&&At(a,h,f.uri),va(l,0);if((k=za(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Tc(function(){yt(a,b)});a.g.X(a.C);H(l)})}
|
|
897
|
+
function zt(a,b){if(!a.m.length)return b;b=new sc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ic(e)&&wc(b,e);return b.toString()}function At(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Tc(function(){yt(a,d)});if(c=b.TTL)a.C=c;a.g.X(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
898
|
+
function Bt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}xt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
899
|
+
function Ct(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={Vb:e.Vb},g=f.next())if(e.Vb=g.value,g=b.get(e.Vb))d.push({Ff:e.Vb,location:g});else if(g=a.F.find(function(k){return function(l){return l.lj==k.Vb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].fh?(h=new sc(h),uc(h,g["URI-REPLACEMENT"].fh),d.push({Ff:e.Vb,location:h.toString()})):d.push({Ff:e.Vb,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
900
|
+
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new sc(k.location)).zb))return!1;return!0});d.length&&(a.B=d[0].Ff);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.B=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:Nd(a.i,d)};function Dt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=Dt.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.Wh=function(){return this.j};r.lf=function(){return this.l.slice()};r.Dh=function(){return this.i};
|
|
901
|
+
function Et(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[Ft(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Gt(n),n]})),l=new Map(h.textStreams.map(function(n){return[Ht(n),n]}));h=new Map(h.imageStreams.map(function(n){return[It(n),n]}));if(b){var m=Jt(Td);l.set(Ht(m),m);m=Jt("image");h.set(It(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{hg:c,bh:d,Zg:e,zg:f}}
|
|
902
|
+
r.Qe=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J,I,F,M,N,L,P,R,Q;return O(function(fa){if(1==fa.g){e=Vd;if(!b&&1==a.length)return f=Et(a,!1),g=f.hg,h=f.bh,k=f.Zg,l=f.zg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.i=Array.from(l[0].values()),fa.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)q=a[p],d.m.has(q.id)||(d.m.add(q.id),-1==n&&(n=p));if(-1==n)return fa.return();u=Et(a,!0);w=u.hg;v=u.bh;A=u.Zg;y=u.zg;
|
|
903
|
+
return E(fa,Promise.all([Kt(d,d.h,w,n,Lt,Mt,m),Kt(d,d.g,v,n,Lt,Mt,m),Kt(d,d.l,A,n,Lt,Mt,m),Kt(d,d.i,y,n,Lt,Mt,m)]),2)}B=0;z=[];if(d.g.length&&d.h.length)for(I=t(d.h),F=I.next();!F.done;F=I.next())for(M=F.value,N=t(d.g),L=N.next();!L.done;L=N.next())P=L.value,R=Mc(M.drmInfos,P.drmInfos),M.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=B++,z.push({id:Q,language:M.language,disabledUntilTime:0,primary:M.primary,audio:M,video:P,bandwidth:(M.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,
|
|
904
|
+
allowedByKeySystem:!0,decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,D=t(C),K=D.next();!K.done;K=D.next())G=K.value,J=B++,z.push({id:J,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G.type==e.V?G:null,video:G.type==e.ea?G:null,bandwidth:G.bandwidth||0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=z;H(fa)})};
|
|
905
|
+
function Nt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J,I,F,M,N,L;return O(function(P){switch(P.g){case 1:b=Vd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.V}).map(function(Q){return[Ft(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ea}).map(function(Q){return[Gt(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.pa}).map(function(Q){return[Ht(Q),Q]}))});
|
|
906
|
+
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Je}).map(function(Q){return[It(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Ot(b.pa),k.set(Ht(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=Ot(b.Je),p.set(It(q),q);u=new Dt;return E(P,Kt(u,[],c,0,Pt,Qt,0),2);case 2:return w=P.h,E(P,Kt(u,[],d,0,Pt,Qt,0),3);case 3:return v=P.h,E(P,Kt(u,[],e,0,Pt,Qt,0),4);case 4:return A=P.h,E(P,Kt(u,[],f,0,Pt,Qt,0),5);case 5:y=P.h;B=0;if(v.length&&w.length)for(G=
|
|
907
|
+
t(w),J=G.next();!J.done;J=G.next())for(I=J.value,F=t(v),M=F.next();!M.done;M=F.next())N=M.value,L=B++,N.variantIds.push(L),I.variantIds.push(L);else for(z=v.concat(w),C=t(z),D=C.next();!D.done;D=C.next())K=D.value,K.variantIds=[B++];return P.return(v.concat(w).concat(A).concat(y))}})}
|
|
908
|
+
function Kt(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G;return O(function(J){switch(J.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){J.u(4);break}n=m.value;return E(J,Rt(a,n,c,d,f,h,g),5);case 5:p=J.h;if(!p)throw new T(2,4,4037);m=l.next();J.u(2);break;case 4:q=t(h);for(u=q.next();!u.done;u=q.next())for(w=u.value,v=t(w),A=v.next();!A.done;A=v.next())y=A.value,(B=St(a,y,c,e,f,h))&&b.push(B);z=t(h);for(u=z.next();!u.done;u=
|
|
909
|
+
z.next())for(C=u.value,D={},K=t(C),A=K.next();!A.done;D={Od:D.Od},A=K.next())if(D.Od=A.value,!Tt(D.Od)&&(G=b.some(function(I){return function(F){return Ut(a,I.Od,F)}}(D))))throw new T(2,4,4037);return J.return(b)}})}function Rt(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return Vt(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,Wt(b,d+g),2):h.u(2):h.return(!1);Xt(b,d,e,f,g);return h.return(!0)})}
|
|
910
|
+
function Wt(a,b){var c,d,e,f,g,h,k;return O(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 E(l,Promise.all(c),2)}if(a.segmentIndex instanceof Rk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);H(l)})}
|
|
911
|
+
function St(a,b,c,d,e,f){if(Tt(b))return null;var g=d(b);Vt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Rk;return E(h,Wt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Xt(g,0,e,f,0);return g}
|
|
912
|
+
function Xt(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==Ge(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
913
|
+
function Lt(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}
|
|
914
|
+
function Pt(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
915
|
+
function Mt(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=Mc(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,4,4038);a.drmInfos=
|
|
916
|
+
d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Lt(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),
|
|
917
|
+
Mt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Mt(a.trickModeVideo,b)}
|
|
918
|
+
function Qt(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
919
|
+
function Vt(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=Yt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
920
|
+
function Yt(a,b,c){var d={audio:Ft,video:Gt,text:Ht,image:It}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return Ut(a,l,m)},video:function(l,m){return Ut(a,l,m)},text:Zt,image:$t}[c.type];for(var g={audio:au,video:bu,text:cu,image:du}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!Tt(e)&&b.delete(d(e));return e}
|
|
921
|
+
function eu(a,b){return a.mimeType!=b.mimeType?!1:fu(a.codecs)===fu(b.codecs)}r.Pg=function(a){this.o=a};r.Wg=function(a){this.s=a};function Ut(a,b,c){return!eu(b,c)&&!a.o||b.drmInfos&&!Lc(b.drmInfos,c.drmInfos)?!1:!0}function Zt(a,b){return b.language?a.forced!==b.forced||0==Ge(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function $t(){return!0}
|
|
922
|
+
function au(a,b,c){var d=eu(a,b),e=eu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Ge(a.language,b.language);e=Ge(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
|
|
923
|
+
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=gu(a.channelsCount,b.channelsCount,c.channelsCount);if(d==hu)return!0;if(d==iu)return!1;d=gu(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==hu?!0:d==iu?!1:a.bandwidth&&ju(a.bandwidth,b.bandwidth,c.bandwidth)==hu?!0:!1}
|
|
924
|
+
function bu(a,b,c){var d=eu(a,b),e=eu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=gu(a.width*a.height,b.width*b.height,c.width*c.height);if(d==hu)return!0;if(d==iu)return!1;if(a.frameRate){d=gu(a.frameRate,b.frameRate,c.frameRate);if(d==hu)return!0;if(d==iu)return!1}return a.bandwidth&&ju(a.bandwidth,b.bandwidth,c.bandwidth)==hu?!0:!1}
|
|
925
|
+
function cu(a,b,c){var d=Ge(a.language,b.language),e=Ge(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
926
|
+
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function du(a,b,c){return gu(a.width*a.height,b.width*b.height,c.width*c.height)==hu?!0:!1}
|
|
927
|
+
function Ot(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
|
|
928
|
+
function Jt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ok([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
|
|
929
|
+
function gu(a,b,c){if(b==a&&a!=c)return iu;if(c==a&&a!=b)return hu;if(b>a){if(c<=a||c-a<b-a)return hu;if(c-a>b-a)return iu}else{if(c>a)return iu;if(a-c<a-b)return hu;if(a-c>a-b)return iu}return ku}function ju(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?hu:b<a?iu:ku}function Tt(a){switch(a.type){case Td:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
930
|
+
function Gt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,fu(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Ft(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,fu(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Ht(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
931
|
+
function It(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function fu(a){if(!lu.has(a)){var b=de(a);lu.set(a,b)}return lu.get(a)}S("shaka.util.PeriodCombiner",Dt);Dt.prototype.setUseStreamOnce=Dt.prototype.Wg;Dt.prototype.setAllowMultiTypeVariants=Dt.prototype.Pg;Dt.prototype.combinePeriods=Dt.prototype.Qe;Dt.prototype.getImageStreams=Dt.prototype.Dh;Dt.prototype.getTextStreams=Dt.prototype.lf;Dt.prototype.getVariants=Dt.prototype.Wh;var hu=1,ku=0,iu=-1,lu=new Map;function mu(a,b){var c=new DOMParser,d=nu.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 ou(a,b){try{var c=zd(a);return mu(c,b)}catch(d){return null}}
|
|
932
|
+
var nu=new Kc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function pu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.W=1;this.B=[];this.l={ne:"",type:"",profiles:[],Cb:null,Ga:0,Ca:null,Bd:0};this.o=new Map;this.s={};this.N={};this.m=new Dt;this.F=0;this.T=new Ua(5);this.G=new Tc(function(){qu(a)});this.K=new jg;this.H=null;this.$=[];this.J=Infinity;this.C=!1;this.h=null;this.L=!1}r=pu.prototype;
|
|
933
|
+
r.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.G.nc();this.h&&this.h.configure(this.g);this.m&&(this.m.Pg(this.g.dash.multiTypeVariantsAllowed&&ob()),this.m.Wg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.A=[a],c.j=b,E(e,ru(c),2);d=e.h;c.j&&su(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
934
|
+
r.stop=function(){for(var a=t(Object.values(this.s)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.s={};this.o.clear();this.l={ne:"",type:"",profiles:[],Cb:null,Ga:0,Ca:null,Bd:0};this.m=null;null!=this.G&&(this.G.stop(),this.G=null);this.h&&this.h.destroy();return this.K.destroy()};
|
|
935
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,ru(a),4);if(2!=c.g)return va(c,0);b=za(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Nb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,su(this,0))}}};
|
|
933
936
|
r.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
934
|
-
function
|
|
935
|
-
function
|
|
936
|
-
p=a.g.dash.xlinkFailGracefully;q=
|
|
937
|
-
function
|
|
938
|
-
b.attributes.id||"";a.l.
|
|
939
|
-
I.next())
|
|
937
|
+
function ru(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=tu(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=Ct(a.h,"Location",!0),e.length&&(d=e)),f=qg(d,a.g.retryParameters),g=Date.now(),E(m,uu(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.j)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,vu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.T.sample(1,l);return m.return(l)})}
|
|
938
|
+
function vu(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u;return O(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=nm;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=ou(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ad(h.outerHTML)}k=Yg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=om;l!=m&&l(k);if("Patch"===d)return w.return(wu(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(xu(a,k,c));
|
|
939
|
+
p=a.g.dash.xlinkFailGracefully;q=Ks(k,a.g.retryParameters,p,c,a.j.networkingEngine);kg(a.K,q);return E(w,q.promise,2)}u=w.h;return w.return(xu(a,u,c))})}
|
|
940
|
+
function xu(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J,I,F,M,N,L,P,R,Q,fa,ka,wa,ya,Ba,Ka,Ca,Za,xa,Va,pb,Pc,ee,rd,Hc,fe,ge,he,sd,Di,xg,Ei,Fi,yg,ie;return O(function(ic){switch(ic.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=eh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=gh(l))p=Nd(d,[n])[0],m&&(a.h?Bt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=Ct(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.l.ne=
|
|
941
|
+
b.attributes.id||"";a.l.Bd=lh(b,"publishTime",oh)||0;a.B=eh(b,"PatchLocation");u=Promise.resolve();if((w=ih(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new xt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,A=gh(w))(y=lh(w,"queryBeforeStart",vh,!1))?u=yt(a.h,A):yt(a.h,A);B=t(f.keys());for(z=B.next();!z.done;z=B.next())C=z.value,D=f.get(C),Bt(a.h,"Location",C,D)}K=eh(b,"BaseURL");J=!1;if(a.h)for(I=t(K),F=I.next();!F.done;F=
|
|
942
|
+
I.next())M=F.value,N=M.attributes.serviceLocation,L=gh(M),N&&L&&(Bt(a.h,"BaseURL",N,L),J=!0);J&&a.h||(P=K.map(gh),G=Nd(d,P));R=function(){return a.h&&J?Ct(a.h,"BaseURL"):G?G:[]};a.l.Ca=R;Q=0;K&&K.length&&(Q=lh(K[0],"availabilityTimeOffset",uh)||0);a.l.Ga=Q;fa=a.g.dash.ignoreMinBufferTime;ka=0;fa||(ka=lh(b,"minBufferTime",ph)||0);a.F=lh(b,"minimumUpdatePeriod",ph,-1);wa=lh(b,"availabilityStartTime",oh);ya=lh(b,"timeShiftBufferDepth",ph);Ba=a.g.dash.ignoreSuggestedPresentationDelay;Ka=null;Ba||(Ka=
|
|
940
943
|
lh(b,"suggestedPresentationDelay",ph));Ca=a.g.dash.ignoreMaxSegmentDuration;Za=null;Ca||(Za=lh(b,"maxSegmentDuration",ph));xa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.L=a.i.presentationTimeline.U()&&"static"==xa);a.l.type=xa;if(a.i)for(Va=a.i.presentationTimeline,pb=t(Object.values(a.s)),Pc=pb.next();!Pc.done;Pc=pb.next())ee=Pc.value,ee.segmentIndex&&ee.segmentIndex.Ma(Va.jb());else rd=a.g.defaultPresentationDelay||1.5*ka,Hc=null!=Ka?Ka:rd,Va=new sk(wa,Hc,a.g.dash.autoCorrectDrift);
|
|
941
|
-
Va.
|
|
942
|
-
a.C?Va.Qg(a.J):a.J&&ab("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");Va.zf(Za||1);return E(ic,u,2);case 2:return a.C&&(ka=0,Fi=null!=Ka?Ka:a.g.defaultPresentationDelay,Va.Qf(Fi)),a.i?E(ic,
|
|
943
|
-
minBufferTime:ka||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:
|
|
944
|
-
function
|
|
945
|
-
function
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
P=eh(
|
|
949
|
-
Infinity));H(
|
|
950
|
-
function
|
|
951
|
-
function
|
|
952
|
-
return c}function
|
|
953
|
-
function
|
|
954
|
-
(a.H=n);h=
|
|
955
|
-
function
|
|
956
|
-
}d=c.filter(function(m){return!m.Zf});c=c.filter(function(m){return m.Zf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Zf.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 de(m.Pd.codecs)==de(n.codecs)}}(h))}}}c=
|
|
957
|
-
d,Td);d=
|
|
958
|
-
function
|
|
959
|
-
n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,q;n=eh(c,"EssentialProperty");g=null;var u=!1;m=!1;n=t(n);for(var
|
|
960
|
-
|
|
961
|
-
n.next();!
|
|
962
|
-
D=
|
|
963
|
-
eh(c,"Label"))&&m.length&&(m=fh(m[0]))&&(I=m);m=eh(c,"Representation");c=m.map(function(
|
|
964
|
-
b.qa.contentType;l=b.qa.id||"__fake__"+a.W++;n=t(c);for(
|
|
965
|
-
function
|
|
966
|
-
16!=I.data.byteLength)throw new T(2,4,4049);
|
|
967
|
-
return Promise.resolve(I)}}}}catch(I){if((
|
|
968
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(I.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var
|
|
969
|
-
(J.segmentIndex.release(),J.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:l,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.qa.language,label:f,type:b.qa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:
|
|
970
|
-
closedCaptions:k,hdr:
|
|
971
|
-
function
|
|
972
|
-
b[d]={start:e.start,duration:e.duration,node:null,
|
|
973
|
-
function
|
|
974
|
-
function
|
|
975
|
-
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=
|
|
976
|
-
uh)||0:0;
|
|
977
|
-
function
|
|
978
|
-
function
|
|
979
|
-
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
|
|
980
|
-
function
|
|
981
|
-
function
|
|
982
|
-
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,
|
|
944
|
+
Va.mc("static"==xa);(fe=Va.U())&&!isNaN(a.g.availabilityWindowOverride)&&(ya=a.g.availabilityWindowOverride);null==ya&&(ya=Infinity);Va.ye(ya);ge=b.attributes.profiles||"";a.l.profiles=ge.split(",");he={sb:"static"!=xa,presentationTimeline:Va,ta:null,ha:null,qa:null,I:null,bandwidth:0,nf:!1,Ga:Q,Cb:null,profiles:ge.split(",")};sd=yu(a,he,R,b);Di=sd.duration;xg=sd.periods;("static"!=xa||a.L)&&sd.og||Va.Wa(Di||Infinity);a.J&&!a.C&&(Ei=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.C=a.j.isLowLatencyMode());
|
|
945
|
+
a.C?Va.Qg(a.J):a.J&&ab("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");Va.zf(Za||1);return E(ic,u,2);case 2:return a.C&&(ka=0,Fi=null!=Ka?Ka:a.g.defaultPresentationDelay,Va.Qf(Fi)),a.i?E(ic,zu(a,sd.periods,!1),4):E(ic,a.m.Qe(xg,he.sb),6);case 6:a.i={presentationTimeline:Va,variants:a.m.j,textStreams:a.m.lf(),imageStreams:a.m.i,offlineSessionIds:[],
|
|
946
|
+
minBufferTime:ka||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Mu(b),nextUrl:Nu(b)};if(!Va.ah()){ic.u(7);break}yg=eh(b,"UTCTiming");return E(ic,Ou(a,R,yg),8);case 8:ie=ic.h;if(!a.j)return ic.return();Va.Rg(ie);case 7:Va.he();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(ic)}})}
|
|
947
|
+
function zu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Qe(b,!0,c),2);a.i.variants=a.m.j;d=a.m.lf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
|
|
948
|
+
function wu(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J,I;return O(function(F){if(1==F.g){c=b.attributes.mpdId;d=lh(b,"originalPublishTime",oh);if(!c||c!==a.l.ne||d!==a.l.Bd)throw a.B=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(dh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=xh(l.attributes.sel||""),n=m[m.length-1],p=gh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Kb){q=gh(l)||"";var M=ph(q);if(null!=M){a.l.Cb=M;for(var N=t(a.o.values()),L=N.next();!L.done;L=N.next())L.value.Cb=
|
|
949
|
+
M}}else if("type"===n.Kb){a.i.presentationTimeline.mc("static"==p);a.l.type=p;M=t(a.o.values());for(N=M.next();!N.done;N=M.next())N.value.sb="dynamic"==p;"static"==p&&(a.F=-1)}else"publishTime"===n.Kb?a.l.Bd=oh(p)||0:null===n.Kb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)yh(a.B,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(M=n.id,N=t(a.o.keys()),L=N.next();!L.done;L=N.next())if(L=L.value,L.startsWith(M)){var P=a.o.get(L);Hs(P,
|
|
950
|
+
it,"SegmentTimeline").children=[];Pu(a,L);a.o.delete(L)}}else if("SegmentTemplate"===n.name){N=xh(l.attributes.sel||"");M=N[N.length-1];if(M.Kb){N=Qu(a,N);L=gh(l)||"";P=t(N);for(var R=P.next();!R.done;R=P.next())R=a.o.get(R.value),zh(R.I.Qb,l.tagName,M.Kb,L);M=N}else M=[];u=M;w=t(u);for(v=w.next();!v.done;v=w.next())A=v.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){M=xh(l.attributes.sel||"");M=Qu(a,M);N=t(M);for(L=N.next();!L.done;L=N.next())L=a.o.get(L.value),L=Hs(L,it,"SegmentTimeline"),
|
|
951
|
+
P=eh(L,"S"),yh(P,l),L.children=P;y=M;B=t(y);for(v=B.next();!v.done;v=B.next())z=v.value,g.add(z)}C=t(g);for(v=C.next();!v.done;v=C.next())D=v.value,Pu(a,D);K=t(f);for(G=K.next();!G.done;G=K.next())J=G.value,e.push.apply(e,x(yu(a,{sb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,ta:null,ha:null,qa:null,I:null,bandwidth:0,nf:!1,Ga:a.l.Ga,profiles:a.l.profiles,Cb:a.l.Cb},a.l.Ca,J).periods));return e.length?E(F,zu(a,e,!0),2):F.u(2)}"static"==a.l.type&&(I=a.l.Cb,a.i.presentationTimeline.Wa(I||
|
|
952
|
+
Infinity));H(F)})}function Qu(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.o.values()),e=a.next();!e.done;e=a.next())e=e.value,e.ta.id===c&&e.qa.id===d&&e.I.id&&b.push(c+","+e.I.id);return b}
|
|
953
|
+
function Pu(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ma(a.i.presentationTimeline.jb());try{var e=ht(c,function(f,g,h,k){return Ru(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.N,c.I.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.u(0);f=d;return E(g,e.Zb(),3)}f.segmentIndex=g.h;H(g)})}}catch(f){if(b=c.I.contentType,b!=Td&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
954
|
+
function Mu(a){var b=ih(a,"ServiceDescription");if(!b)return null;a=ih(b,"Latency");b=ih(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
|
|
955
|
+
return c}function Nu(a){a=eh(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
|
|
956
|
+
function yu(a,b,c,d){var e=b.Cb;e||(e=lh(d,"mediaPresentationDuration",ph),a.l.Cb=e);var f=0;a.i&&a.i.presentationTimeline&&a.L&&(f=a.i.presentationTimeline.Mb());var g=[],h=f;d=eh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=lh(l,"start",ph,h),p=l.attributes.id,q=lh(l,"duration",ph),u=null;if(m){var w=lh(m,"start",ph);null!=w&&(u=w-n)}else null!=e&&(u=e-n+f);null==u&&(u=q);if(!(null!==a.H&&null!==p&&null!==n&&n<a.H)||a.$.includes(p)||k+1==d.length){null!==n&&(null===a.H||n>a.H)&&
|
|
957
|
+
(a.H=n);h=Su(a,b,c,{start:n,duration:u,node:l,vd:null==u||!m});g.push(h);b.ta.id&&u&&(a.N[b.ta.id]=u);if(null==u){h=null;break}h=n+u}}a.$=g.map(function(v){return v.id});return null!=e?{periods:g,duration:e+f,og:!1}:{periods:g,duration:h,og:!0}}
|
|
958
|
+
function Su(a,b,c,d){b.ta=Tu(a,d.node,null,c);b.ha=d;b.ta.Ga=b.Ga;b.ta.id||(b.ta.id="__shaka_period_"+d.start);var e=eh(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Uu(a,d.start,d.duration,f.value,c);c=eh(d.node,"AdaptationSet").map(function(m){return Vu(a,b,m)}).filter(ze);if(b.sb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ci);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);
|
|
959
|
+
}d=c.filter(function(m){return!m.Zf});c=c.filter(function(m){return m.Zf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Zf.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 de(m.Pd.codecs)==de(n.codecs)}}(h))}}}c=Wu(a.g.disableAudio,d,"audio");e=Wu(a.g.disableVideo,d,"video");f=Wu(a.g.disableText,
|
|
960
|
+
d,Td);d=Wu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.ta.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Wu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
961
|
+
function Vu(a,b,c){function d(F){switch(F){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.qa=Tu(a,c,b.ta,null);var f=!1,g=eh(c,"Role"),h=g.map(function(F){return F.attributes.value}).filter(ze),k=void 0,l=b.qa.contentType==Td;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
|
|
962
|
+
n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,q;n=eh(c,"EssentialProperty");g=null;var u=!1;m=!1;n=t(n);for(var w=n.next();!w.done;w=n.next()){w=w.value;var v=w.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==v?g=w.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?p=e(parseInt(w.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v?q=d(parseInt(w.attributes.value,10)):"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=
|
|
963
|
+
v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=eh(c,"SupplementalProperty");n=t(n);for(w=n.next();!w.done;w=n.next())w=w.value,v=w.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==v?A=parseInt(w.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?p=e(parseInt(w.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v&&(q=d(parseInt(w.attributes.value,10)));n=eh(c,"Accessibility");var y=new Map,B;n=t(n);for(w=
|
|
964
|
+
n.next();!w.done;w=n.next())if(v=w.value,w=v.attributes.schemeIdUri,v=v.attributes.value,"urn:scte:dash:cc:cea-608:2015"==w)if(w=1,null!=v){v=v.split(";");for(var z=t(v),C=z.next();!C.done;C=z.next()){var D=C.value,K=C=void 0;D.includes("=")?(D=D.split("="),C=D[0].startsWith("CC")?D[0]:"CC"+D[0],K=D[1]||"und"):(C="CC"+w,2==v.length?w+=2:w++,K=D);y.set(C,Ce(K))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==w)if(w=1,null!=v)for(v=t(v.split(";")),C=v.next();!C.done;C=v.next())C=C.value,
|
|
965
|
+
D=z=void 0,C.includes("=")?(C=C.split("="),z="svc"+C[0],D=C[1].split(",")[0].split(":").pop()):(z="svc"+w,w++,D=C),y.set(z,Ce(D));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==w?null!=v&&(h.push(v),"captions"==v&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==w&&("1"==v?B="visually impaired":"2"==v&&(B="hard of hearing"));if(m)return null;m=eh(c,"ContentProtection");var G=ts(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=Ce(b.qa.language||"und"),I=c.attributes.label;(m=
|
|
966
|
+
eh(c,"Label"))&&m.length&&(m=fh(m[0]))&&(I=m);m=eh(c,"Representation");c=m.map(function(F){if(F=Xu(a,b,G,k,J,I,f,h,y,F,B,A))F.hdr=F.hdr||p,F.colorGamut=F.colorGamut||q,F.fastSwitching=u;return F}).filter(function(F){return!!F});if(0==c.length){g="image"==b.qa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new T(2,4,4003);}if(!b.qa.contentType||"application"==b.qa.contentType)for(b.qa.contentType=Yu(c[0].mimeType,c[0].codecs),l=t(c),w=l.next();!w.done;w=l.next())w.value.type=
|
|
967
|
+
b.qa.contentType;l=b.qa.id||"__fake__"+a.W++;n=t(c);for(w=n.next();!w.done;w=n.next()){w=w.value;v=t(G.drmInfos);for(z=v.next();!z.done;z=v.next())z=z.value,z.keyIds=z.keyIds&&w.keyIds?new Set([].concat(x(z.keyIds),x(w.keyIds))):z.keyIds||w.keyIds;a.g.dash.enableAudioGroups&&(w.groupId=l)}m=m.map(function(F){return F.attributes.id}).filter(ze);return{id:l,contentType:b.qa.contentType,language:J,Uj:f,streams:c,drmInfos:G.drmInfos,Zf:g,Ci:m}}
|
|
968
|
+
function Xu(a,b,c,d,e,f,g,h,k,l,m,n){b.I=Tu(a,l,b.qa,null);var p=b.I.id;a.J=Math.min(a.J,b.I.Ga);if(!Zu(b.I))return null;var q=b.ha.start;b.bandwidth=lh(l,"bandwidth",sh)||0;var u=b.I.contentType,w=u==Td||"application"==u;u="image"==u;try{var v=void 0;if(c.Me){var A=b.I.Ca,y=Nd(A(),[c.Me.ii]),B=qg(y,a.g.retryParameters);v={bitsKey:128,blockCipherMode:"CBC",iv:c.Me.iv,firstMediaSequenceNumber:0,fetchKey:function(){var I,F,M;return O(function(N){if(1==N.g)return E(N,uu(a,B,6),2);if(3!=N.g){I=N.h;if(!I.data||
|
|
969
|
+
16!=I.data.byteLength)throw new T(2,4,4049);F={name:"AES-CBC"};M=v;return E(N,window.crypto.subtle.importKey("raw",I.data,F,!0,["decrypt"]),3)}M.cryptoKey=N.h;v.fetchKey=void 0;H(N)})}}}b.I.aesKey=v;A=function(I,F,M,N){return Ru(a,I,F,M,N)};if(b.I.Jc)var z=Xs(b,A,v);else if(b.I.Gb)z=ct(b,a.s,v);else if(b.I.Qb)z=ht(b,A,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.N,v,n,!1);else{var C=b.ha.duration||0,D=b.I.Ca;z={Zb:function(){var I=Qk(q,C,D());I.Xb(function(F){F.mimeType=b.I.mimeType;F.codecs=b.I.codecs});
|
|
970
|
+
return Promise.resolve(I)}}}}catch(I){if((w||u)&&4002==I.code)return null;throw I;}n=eh(l,"ContentProtection");n=xs(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;eh(l,"SupplementalProperty").some(function(I){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==I.attributes.schemeIdUri&&"JOC"==I.attributes.value})&&(A=!0);y=!1;w&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(u&&((l=eh(l,"EssentialProperty").find(function(I){return["http://dashif.org/thumbnail_tile",
|
|
971
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(I.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var G;l=b.I.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"))&&(G="PQ");w=b.I.id?b.ta.id+","+b.I.id:"";a.B.length&&p&&a.o.set(b.ta.id+","+p,$u(b));var J=w&&a.s[w]?a.s[w]:{id:a.W++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){J.segmentIndex&&
|
|
972
|
+
(J.segmentIndex.release(),J.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:l,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.qa.language,label:f,type:b.qa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.I.Ec,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:A,
|
|
973
|
+
closedCaptions:k,hdr:G,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Xd(b.I.mimeType,b.I.codecs)])};J.createSegmentIndex=function(){var I;return O(function(F){if(1==F.g){if(J.segmentIndex)return F.u(0);I=J;return E(F,z.Zb(),3)}I.segmentIndex=F.h;H(F)})};w&&b.sb&&!a.s[w]&&(a.s[w]=J);return J}
|
|
974
|
+
function $u(a){for(var b={},c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,["period","adaptationSet","representation"].includes(d)){var e=a[d];b[d]={Jc:null,Gb:null,Qb:e.Qb,Ca:e.Ca,width:e.width,height:e.height,contentType:e.contentType,mimeType:e.mimeType,language:e.language,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,emsgSchemeIdUris:e.emsgSchemeIdUris,id:e.id,Ec:e.Ec,audioSamplingRate:e.audioSamplingRate,Ga:e.Ga,Bc:e.Bc}}else"periodInfo"==d?(e=a[d],
|
|
975
|
+
b[d]={start:e.start,duration:e.duration,node:null,vd:e.vd}):b[d]=a[d];return b}function qu(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,ta(d,2),E(d,ru(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=za(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();su(a,b);H(d)}})}
|
|
976
|
+
function su(a,b){if(!(0>a.F)){var c=a.F;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.G.X(Math.max(c-b,Wa(a.T)))}}
|
|
977
|
+
function Tu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ec:null,audioSamplingRate:null,Ga:0,Mf:0};d=d||c.Ca;var e=b.attributes.id,f=eh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=gh(m);l&&m&&(Bt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(gh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=mh(b,
|
|
978
|
+
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=ut(m).join(",");n=lh(b,"frameRate",wh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,q=av(eh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=eh(b,"AudioChannelConfiguration");u=bv(u)||c.Ec;var w=lh(b,"audioSamplingRate",th)||c.audioSamplingRate;k||(k=Yu(l,m));var v=ih(b,"SegmentBase"),A=ih(b,"SegmentTemplate"),y=v?lh(v,"availabilityTimeOffset",uh)||0:0,B=A?lh(A,"availabilityTimeOffset",uh)||0:0,z=f&&f.length?lh(f[0],"availabilityTimeOffset",
|
|
979
|
+
uh)||0:0;y=c.Ga+z+y+B;B=null;(z=ih(b,"SegmentSequenceProperties"))&&(z=ih(z,"SAP"))&&(B=lh(z,"cadence",rh));return{Ca:function(){return Nd(d(),f.length?a.h&&h?Ct(a.h,e):g?g:[]:[])},Jc:v||c.Jc,Gb:ih(b,"SegmentList")||c.Gb,Qb:A||c.Qb,width:lh(b,"width",th)||c.width,height:lh(b,"height",th)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:q,id:e,language:b.attributes.lang,Ec:u,audioSamplingRate:w,Ga:y,Bc:null,Mf:B||c.Mf}}
|
|
980
|
+
function av(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
981
|
+
function bv(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
982
|
+
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 Zu(a){var b=a.Jc?1:0;b+=a.Gb?1:0;b+=a.Qb?1:0;if(0==b)return a.contentType==Td||"application"==a.contentType?!0:!1;1!=b&&(a.Jc&&(a.Gb=null),a.Qb=null);return!0}
|
|
983
|
+
function cv(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=Nd(b(),e),g=qg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),kg(a.K,h),E(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=wd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
984
|
+
function Ou(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ta(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.u(8);
|
|
985
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,cv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return E(n,cv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
|
|
983
986
|
3);break;case 5:za(n);case 3:g=f.next();n.u(2);break;case 4:return ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
984
|
-
function
|
|
985
|
-
function
|
|
986
|
-
function
|
|
987
|
-
function
|
|
988
|
-
function
|
|
989
|
-
function
|
|
990
|
-
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=
|
|
991
|
-
g.name&&(g.attributes.push(new
|
|
992
|
-
var
|
|
993
|
-
function
|
|
994
|
-
this.K=new Map;this.wa=new Map;this.la=new Map;this.ib=this.C=!1;this.Ka=new Ua(5);this.j=null;this.
|
|
987
|
+
function Uu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=lh(d,"timescale",th)||1;d=t(eh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=lh(k,"presentationTime",th)||0,m=lh(k,"duration",th)||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.attributes.id||"",eventElement:Ah(k),eventNode:k},a.j.onTimelineRegionAdded(k))}}
|
|
988
|
+
function Ru(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=wg,g=e?0:1,h=sl(b,c,d,a.g.retryParameters),E(l,uu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Yu(a,b){b=Xd(a,b);return qe(b)?Td:a.split("/")[0]}function uu(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);kg(a.K,b);return b.promise}
|
|
989
|
+
function tu(a){var b=a.l.Bd;if(!a.l.ne||!b||!a.B.length)return[];var c=Date.now()/1E3,d=a.B.filter(function(e){e=th(e.attributes.ttl);return!e||b+e>c}).map(gh).filter(ze);return d.length?Nd(a.A,d):[]}S("shaka.dash.DashParser",pu);ti["application/dash+xml"]=function(){return new pu};ti["video/vnd.mpeg.dash.mpd"]=function(){return new pu};function dv(){}S("shaka.dependencies",dv);dv.has=function(a){return ev.has(a)};dv.add=function(a,b){if(!fv[a])throw Error(a+" is not supported");a==gv?rb("mux.js","mux.js is no longer used in Shaka Player."):ev.set(a,function(){return b})};var gv="muxjs",fv={Vj:gv,ISOBoxer:"ISOBoxer"};dv.Allowed=fv;var ev=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function hv(a,b,c){this.type=a;this.g=b;this.segments=c||null}function iv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}iv.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
990
|
+
function jv(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function kv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=kv(a,b))?a.value:c||null}function lv(a,b){a=kv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function mv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.wb=c}function nv(a,b){this.name=a;this.value=b};function ov(a,b){return a.filter(function(c){return c.name==b})}function pv(a,b){return a.filter(function(c){return lv(c,"TYPE")==b})}function qv(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 rv(a,b,c){c=void 0===c?0:c;return(a=qv(a,b))?Number(a.value):c}function sv(a,b,c){return b?tv(a,[b],c):[]}
|
|
991
|
+
function tv(a,b,c){if(!b.length)return[];b=Nd(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new T(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function uv(){this.g=0}
|
|
992
|
+
function vv(a,b){b=wd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=wv(a,f),--a.g,xv.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=wv(a,g);if(yv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
993
|
+
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=wv(a,k),xv.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 mv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new mv("",d,f)));return new hv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
994
|
+
g.name&&(g.attributes.push(new nv("URI",h)),d=!0)}}return new hv(b,e)}function wv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Ap(d);var f;(f=Cp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Cp(d,g);)c.push(new nv(f[1],f[2]||f[3])),Bp(d)}return new iv(a,b,c,e)}
|
|
995
|
+
var xv="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(" "),yv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function zv(){}function Av(a){try{var b=Bv(a);return cg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return ag(c)}}
|
|
996
|
+
function Bv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",zv);zv.parse=Av;mg("data",Av);function Cv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Td,new Map);this.N.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.L="";this.ya=new uv;this.J=-1;this.aa=Infinity;this.$=this.rb=!1;this.A=new Tc(function(){Dv(a)});this.ma=Ev;this.o=null;this.Fa=0;this.m=Infinity;this.xa=this.va=this.T=0;this.W=new jg;this.F=new Map;this.G=new Map;this.ba=new Map;this.ga=new Map;
|
|
997
|
+
this.K=new Map;this.wa=new Map;this.la=new Map;this.ib=this.C=!1;this.Ka=new Ua(5);this.j=null;this.da=!0}r=Cv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.C=b.isLowLatencyMode(),E(e,Fv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,E(e,Gv(c,d.data,a),3)):e.return(c.o)})};
|
|
995
998
|
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.Ea.clear();this.o=null;this.i.clear();this.H.clear();this.G.clear();this.s.clear();this.ba.clear();this.ga.clear();this.K.clear();this.wa.clear();this.la.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
996
|
-
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!
|
|
997
|
-
h&&
|
|
998
|
-
function
|
|
999
|
-
b.M().includes(m)||b.Kg.push(m);n=
|
|
1000
|
-
0,J=
|
|
1001
|
-
function
|
|
999
|
+
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!Hv(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Iv(a,g));return E(m,Promise.all(b),2)}Jv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.qd});d.length&&!h&&(k=Kv,Lv(a,k.hh),l=d.map(function(n){return n.Bb}),a.l.Wa(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
1000
|
+
h&&Mv(a);H(m)})};function Nv(a,b){return Hv(a)?a.N.get(b.type):b.ke}
|
|
1001
|
+
function Iv(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J,I,F,M,N,L,P;return O(function(R){if(1==R.g){c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new sc(f),h=g.g,b.Td&&(0<=b.lb&&h.add("_HLS_msn",String(b.lb)),0<=b.mb&&h.add("_HLS_part",String(b.mb))),b.Ud&&h.add("_HLS_skip","YES"),Ic(h)&&wc(g,h),c.push(g.toString());return E(R,Fv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=vv(a.ya,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
|
|
1002
|
+
b.M().includes(m)||b.Kg.push(m);n=ov(l.g,"EXT-X-DEFINE");p=Ov(a,n,m);q=b.stream;u=Nv(a,b);return E(R,Pv(a,l,q.mimeType,b.M,p),3)}w=R.h;v=w.keyIds;A=w.drmInfos;y=function(Q,fa){return Q.size===fa.size&&[].concat(x(Q)).every(function(ka){return fa.has(ka)})};y(q.keyIds,v)||(q.keyIds=v,q.drmInfos=A,a.h.newDrmInfo(q));B=Qv(a,l,u,p,b.M,b.type);z=B.segments;if(C=B.bandwidth)q.bandwidth=C;q.segmentIndex.xd(z,a.l.jb());z.length&&(D=rv(l.g,"EXT-X-MEDIA-SEQUENCE",0),G=(K=qv(l.g,"EXT-X-SKIP"))?Number(Z(K,"SKIPPED-SEGMENTS")):
|
|
1003
|
+
0,J=Rv(D,z),I=J.lb,F=J.mb,b.lb=I+G,b.mb=F,M=u.get(D),q.segmentIndex.Ma(M));N=q.segmentIndex.g[0]||null;b.ic=N.startTime;L=z[z.length-1];b.Bb=L.endTime;if(P=qv(l.g,"EXT-X-ENDLIST"))b.qd=!0;Sv(a,l);H(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
1004
|
+
function Tv(a,b){for(var c=-1==a.J,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=Nv(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.J=Math.max(a.J,k));e.Te=k;break}}}}if(!(0>a.J))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,Uv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.Te,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Vv(a,
|
|
1002
1005
|
c,d)}
|
|
1003
|
-
function
|
|
1004
|
-
function
|
|
1005
|
-
function
|
|
1006
|
-
u=
|
|
1007
|
-
|
|
1008
|
-
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){xa.u(9);break}Q=[];
|
|
1006
|
+
function Wv(a,b){if(Infinity==a.aa){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.h&&(a.aa=Math.min(a.aa,d.h))}}b=a.aa;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!Uv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)$a("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.M(),"Expect AV sync issues!");else for(Vv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Vf(b)}}}
|
|
1007
|
+
function Vv(a,b,c){b.ic+=c;b.Bb+=c;a=Nv(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}
|
|
1008
|
+
function Gv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J,I,F,M,N,L,P,R,Q,fa,ka,wa,ya,Ba,Ka,Ca,Za;return O(function(xa){switch(xa.g){case 1:d=vv(a.ya,b);e=ov(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new sk(null,0);a.l.mc(!0);k=function(){return[c]};if(1==d.type)return a.da=!1,v=ov(d.g,"EXT-X-DEFINE"),A=Ov(a,v,a.L),E(xa,Xv(a,d,k,A),7);Yv(a,e);l=ov(d.g,"EXT-X-MEDIA");m=ov(d.g,"EXT-X-STREAM-INF");n=ov(d.g,"EXT-X-IMAGE-STREAM-INF");p=ov(d.g,"EXT-X-I-FRAME-STREAM-INF");q=ov(d.g,"EXT-X-SESSION-KEY");
|
|
1009
|
+
u=ov(d.g,"EXT-X-SESSION-DATA");w=ov(d.g,"EXT-X-CONTENT-STEERING");Zv(a,u);return E(xa,$v(a,w),4);case 4:return aw(a,m),bw(a,l),E(xa,cw(a,m,q,l,k,a.s),5);case 5:return f=xa.h,g=dw(a,l),E(xa,ew(a,n,p),6);case 6:h=xa.h;xa.u(3);break;case 7:return y=xa.h,B=y.type,z=y.mimeType,C=y.codecs,D=y.language,K=y.height,G=y.width,J=y.channelCount,I=y.sampleRate,F=y.closedCaptions,M=y.Gd,N=y.colorGamut,E(xa,fw(a,a.B++,A,d,k,C,B,D,!0,"Media Playlist",J,F,null,!1,I,!1,z),8);case 8:L=xa.h,a.i.set(c,L),"video"==B&&
|
|
1010
|
+
gw(L.stream,G,K,null,M,null,N),f.push({id:0,language:Ce(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==B?L.stream:null,video:"video"==B?L.stream:null,bandwidth:L.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==d.type&&(Hv(a)&&(hw(a,d),P=a.m,a.A.X(P)),R=Array.from(a.i.values()),iw(a,R),Mv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
1011
|
+
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){xa.u(9);break}Q=[];fa=t(a.o.variants);for(ka=fa.next();!ka.done;ka=fa.next())wa=ka.value,wa.audio&&""===wa.audio.codecs&&Q.push(wa.audio.createSegmentIndex()),wa.video&&""===wa.video.codecs&&Q.push(wa.video.createSegmentIndex());return E(xa,Promise.all(Q),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){ya=
|
|
1009
1012
|
[];Ba=f[0];Ka=t([Ba.video,Ba.audio]);for(Ca=Ka.next();!Ca.done;Ca=Ka.next())(Za=Ca.value)&&!Za.segmentIndex&&ya.push(Za.createSegmentIndex());if(0<ya.length)return E(xa,Promise.all(ya),0)}xa.u(0)}})}
|
|
1010
|
-
function
|
|
1011
|
-
t(
|
|
1012
|
-
case "opus":
|
|
1013
|
-
closedCaptions:
|
|
1014
|
-
function
|
|
1015
|
-
c.h&&a.l.Sg(c.h);a.l.he()}function
|
|
1016
|
-
function
|
|
1017
|
-
function
|
|
1018
|
-
function
|
|
1019
|
-
function
|
|
1020
|
-
function
|
|
1021
|
-
function
|
|
1022
|
-
function
|
|
1023
|
-
p=Z(g,"CHARACTERISTICS"),q=
|
|
1024
|
-
function
|
|
1025
|
-
function
|
|
1026
|
-
|
|
1027
|
-
ya=Z(
|
|
1028
|
-
function
|
|
1029
|
-
"URI")});h=d.audio.find(function(
|
|
1030
|
-
n=Z(c,"NAME"),p=
|
|
1031
|
-
function
|
|
1032
|
-
function
|
|
1033
|
-
function
|
|
1013
|
+
function Xv(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G;return O(function(J){switch(J.g){case 1:e=st(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return J.return(e);f=b.segments[0];g=sv(c(),f.h,d);h=g[0];k=new sc(h);l=k.Na.split(".").pop();if(m=jw[l])return J.return(st(m));n=wg;p=null;q=kw(a,b,f.g,c,d);a.ba.clear();if(!q){J.u(2);break}u=sl(q.M(),q.cc(),q.ac(),a.g.retryParameters);return E(J,lw(a,u,n,{type:0}),3);case 3:w=J.h,p=w.data;case 2:v=0;A=null;if(y=qv(f.g,"EXT-X-BYTERANGE"))B=
|
|
1014
|
+
t(mw(null,y.value)),v=B.next().value,A=B.next().value;z=sl(g,v,A,a.g.retryParameters);return E(J,lw(a,z,n,{type:1}),4);case 4:C=J.h;(D=C.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var I=C.data;var F=Bb(I);F=(new mj).parse(F);var M=F.ld();F=F.mf();var N=[],L=!1,P=!1;switch(M.audio){case "aac":case "aac-loas":N.push("mp4a.40.2");L=!0;break;case "mp3":N.push("mp4a.40.34");L=!0;break;case "ac3":N.push("ac-3");L=!0;break;case "ec3":N.push("ec-3");L=!0;break;
|
|
1015
|
+
case "opus":N.push("opus"),L=!0}switch(M.video){case "avc":F.La?N.push(F.La):N.push("avc1.42E01E");P=!0;break;case "hvc":F.La?N.push(F.La):N.push("hvc1.1.6.L93.90");P=!0;break;case "av1":N.push("av01.0.01M.08"),P=!0}if(N.length){M=L&&!P;L=new Map;if(P){P=new Hb("video/mp2t");P.i(I);I=t(P.j());for(var R=I.next();!R.done;R=I.next())R=R.value,L.set(R,R);P.g()}F={type:M?"audio":"video",mimeType:"video/mp2t",codecs:N.join(", "),language:null,height:F.height,width:F.width,channelCount:null,sampleRate:null,
|
|
1016
|
+
closedCaptions:L,Gd:null,colorGamut:null}}else F=null;if(K=F)return J.return(K)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(G=tt(p,C.data))return J.return(G);return J.return(e)}})}
|
|
1017
|
+
function Mv(a){if(Hv(a)){if(a.ma==nw){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Bb),c=Math.min(c,e.ic));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ye(b)}}else a.l.Wa(ow(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1018
|
+
c.h&&a.l.Sg(c.h);a.l.he()}function Yv(a,b){var c=(new sc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
1019
|
+
function Ov(a,b,c){c=(new sc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
|
|
1020
|
+
function aw(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=pw(a,d);if(f){var g=Rd(Td,d);a.G.set(f,g);Ob(d,g)}e&&(f=Rd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Rd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
1021
|
+
function Zv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",sv([a.L],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1022
|
+
function $v(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new xt(a.h);a.j.configure(a.g);a.j.i=[a.L];a.j.setManifestType("HLS");a.j.h=g;c=yt(a.j,h);break}return E(k,c,0)})}
|
|
1023
|
+
function dw(a,b){var c=pv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return qw(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=lv(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=rw(Td,d)||sw(Td),tw(f.stream)}}return b.filter(function(g){return g})}
|
|
1024
|
+
function tw(a){var b=new Set([Xd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Xb(function(c){c.mimeType&&b.add(Xd(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1025
|
+
function ew(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return E(m,uw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=za(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=lv(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
|
|
1026
|
+
p=Z(g,"CHARACTERISTICS"),q=vw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),w=t(u?u.split("x"):[null,null]),v=w.next().value,A=w.next().value;q.stream.width=Number(v)||void 0;q.stream.height=Number(A)||void 0;var y=Z(g,"BANDWIDTH");y&&(q.stream.bandwidth=Number(y));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1027
|
+
function ww(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=jv(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)qw(a,d[g],c)}
|
|
1028
|
+
function cw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J,I,F,M,N,L,P,R,Q,fa,ka,wa,ya,Ba,Ka,Ca;return O(function(Za){switch(Za.g){case 1:g=[];h=new Set;if(!(0<c.length)){Za.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Za.u(2);break}m=l.value;n=lv(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";q=null;if("NONE"==n){Za.u(4);break}if(xw(n)){u=sv(e(),lv(m,"URI"),f);w=u.sort().join("");a.K.has(w)||(v=qg(u,a.g.retryParameters),A=lw(a,v,6),a.K.set(w,A));Za.u(4);break}if("identity"!=p){q=(y=yw[p])?
|
|
1029
|
+
y(m,""):null;Za.u(6);break}return E(Za,zw(a,m,"",e,null,f),9);case 9:q=Za.h;case 6:if(q){if(q.keyIds)for(B=t(q.keyIds),z=B.next();!z.done;z=B.next())C=z.value,h.add(C);g.push(q)}case 4:l=k.next();Za.u(3);break;case 2:D={};K=t(b);for(G=K.next();!G.done;G=K.next())J=G.value,I=jv(J),D[I]?D[I].push(J):D[I]=[J];F=[];for(M in D)N=D[M],L=N[0],P=Z(L,"FRAME-RATE"),R=Number(Z(L,"AVERAGE-BANDWIDTH"))||Number(lv(L,"BANDWIDTH")),Q=Z(L,"RESOLUTION"),fa=t(Q?Q.split("x"):[null,null]),ka=fa.next().value,wa=fa.next().value,
|
|
1030
|
+
ya=Z(L,"VIDEO-RANGE"),(Ba=Z(L,"REQ-VIDEO-LAYOUT"))&&Ba.includes(",")&&(Ka=Ba.split(",").filter(function(xa){return"CH-STEREO"==xa||"CH-MONO"==xa}),Ba=Ka[0]),Ba=Ba||"CH-MONO",Ca=Aw(a,N,d),F.push.apply(F,x(Bw(a,Ca.audio,Ca.video,R,ka,wa,P,ya,Ba,g,h)));return Za.return(F.filter(function(xa){return null!=xa}))}})}
|
|
1031
|
+
function Aw(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Z(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(w){return f.includes(lv(w,"GROUP-ID"))}),ww(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var q=b.map(function(w){return lv(w,
|
|
1032
|
+
"URI")});h=d.audio.find(function(w){return w&&w.M().find(function(v){return q.includes(v)})});g=pw(a,b[0]);n=Rd("video",g);(p=Rd("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(w){var v=Z(w,"URI")||"",A=Z(w,"TYPE");w=lv(w,"GROUP-ID");return"SUBTITLES"!=A&&""==v&&f.includes(w)}))&&(l=Z(c,"LANGUAGE"),
|
|
1033
|
+
n=Z(c,"NAME"),p=Cw(c),Dw(c),m=Z(c,"CHARACTERISTICS"),u=Ew(c));a=Fw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
1034
|
+
function pw(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.$=0<c.length;a.$||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return ut(a)}function Cw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1035
|
+
function Ew(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function Dw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1036
|
+
function Bw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())gw(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var q=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=q?q.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=q?q.stream.drmInfos:null;
|
|
1034
1037
|
q=q?q.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";q=q+" - "+u;h&&k&&!Lc(n,p)||a.Ea.has(q)||(h={id:a.B++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ea.add(q))}return e}
|
|
1035
|
-
function
|
|
1036
|
-
function
|
|
1037
|
-
m=n.next().value;n=n.next().value;(m=c.get(m))&&
|
|
1038
|
-
function
|
|
1038
|
+
function bw(a,b){b=pv(b,"CLOSED-CAPTIONS");a.da=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=Ce(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=lv(d,"GROUP-ID");d=lv(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
|
|
1039
|
+
function qw(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=lv(k,"URI");k=lv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=lv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Td);if(k==Td)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
1040
|
+
m=n.next().value;n=n.next().value;(m=c.get(m))&&Bt(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?Cw(h):null;var p="audio"==k?Dw(h):!1,q=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?Ew(h):null;d=vw(a,l,d,b,k,c,m,f,n,null,q,u,h,p);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.i.set(e,d);return d}
|
|
1041
|
+
function uw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=lv(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=vw(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?E(p,h.stream.createSegmentIndex(),3):p.u(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
1039
1042
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1040
|
-
function
|
|
1041
|
-
function
|
|
1042
|
-
break}if(P=0<I.segments.length)R=I.segments[0],
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
function(){if(B)return B;
|
|
1046
|
-
function
|
|
1047
|
-
function
|
|
1048
|
-
function
|
|
1049
|
-
D=C.drmInfos;K=C.keyIds;
|
|
1050
|
-
Bb:
|
|
1051
|
-
function
|
|
1043
|
+
function Fw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var q=p.value;p=lv(q,"URI");q=Z(q,"PATHWAY-ID");a.j&&q&&Bt(a.j,l,q,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.da=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}b=null}c=Qd(d,c);d=vw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
1044
|
+
function vw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(C){var D,K,G,J,I,F,M,N,L,P,R,Q,fa,ka,wa,ya,Ba,Ka,Ca,Za,xa,Va;return O(function(pb){switch(pb.g){case 1:return D=Vd,K=y.M(),E(pb,Fv(a,y.M(),!0),2);case 2:G=pb.h;if(C.aborted)return pb.return();J=G.uri;J==G.originalUri||K.includes(J)||A.push(J);I=vv(a.ya,G.data);if(1!=I.type)throw new T(2,4,4017);F=ov(I.g,"EXT-X-DEFINE");M=Ov(a,F,J);N=void 0;L=!1;if(!(!a.$&&a.g.hls.disableCodecGuessing||a.da&&e==D.ea&&!a.g.hls.disableClosedCaptionsDetection)){pb.u(3);
|
|
1045
|
+
break}if(P=0<I.segments.length)R=I.segments[0],qv(R.g,"EXT-X-GAP")&&(P=!1);if(!P){pb.u(3);break}a.da=!1;return E(pb,Xv(a,I,w,M),5);case 5:Q=pb.h,!Q.closedCaptions.size||l&&l.size==Q.closedCaptions.size||(l=Q.closedCaptions,L=!0),!a.$&&a.g.hls.disableCodecGuessing&&(N=Q.mimeType,d=Q.codecs);case 3:return fa=Hv(a),E(pb,fw(a,0,M,I,w,d,e,f,g,h,k,l,m,n,p,q,N),6);case 6:ka=pb.h;if(C.aborted)return pb.return();wa=ka.stream;Hv(a)&&!fa&&hw(a,I);y.ic=ka.ic;y.Bb=ka.Bb;y.Ud=ka.Ud;y.Td=ka.Td;y.qd=ka.qd;y.ke=ka.ke;
|
|
1046
|
+
y.lb=ka.lb;y.mb=ka.mb;y.wf=!0;v.segmentIndex=wa.segmentIndex;v.encrypted=wa.encrypted;v.drmInfos=wa.drmInfos;v.keyIds=wa.keyIds;v.mimeType=wa.mimeType;v.bandwidth=v.bandwidth||wa.bandwidth;v.codecs=v.codecs||wa.codecs;v.closedCaptions=v.closedCaptions||wa.closedCaptions;tw(v);v.drmInfos.length&&a.h.newDrmInfo(v);a.o&&L&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.ea||e==D.V)for(ya=t(a.i.values()),Ba=ya.next();!Ba.done;Ba=ya.next())Ka=Ba.value,Ka.wf||Ka.type!=e||(Ka.stream.mimeType=wa.mimeType,
|
|
1047
|
+
tw(Ka.stream));e==D.pa&&(Ca=wa.segmentIndex.get(0))&&Ca.ca&&(v.mimeType="application/mp4",tw(v));Gw(a)&&(a.rb?iw(a,[y]):(a.rb=!0,Za=Array.from(a.i.values()),xa=Za.filter(function(Pc){return Pc.stream.segmentIndex}),iw(a,xa),Mv(a),Va=a.m,0<Va&&a.A.X(Va)));H(pb)}})}function w(){return a.j&&1<c.length?Ct(a.j,b):A.concat(tv([a.L],c,a.s))}var v=Hw(a,d,e,f,g,h,k,l,m,n,p,q),A=[],y={stream:v,type:e,Kg:A,M:w,ic:0,Bb:0,ke:new Map,Ud:!1,Td:!1,qd:!1,Te:-1,lb:-1,mb:-1,wf:!1},B=null,z=new AbortController;v.createSegmentIndex=
|
|
1048
|
+
function(){if(B)return B;z=new AbortController;return B=new Promise(function(C){C(u(z.signal))})};v.closeSegmentIndex=function(){B&&!v.segmentIndex&&z.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);B=null};return y}function ow(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Bb));return b}
|
|
1049
|
+
function Jv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Xb(function(e){c.push(e)});a.l.yd(c)}function iw(a,b){if(!Hv(a))for(var c=ow(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.wc(0,c);Jv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Tv(a,b):(Wv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Tv(a,b))}
|
|
1050
|
+
function Uv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Gw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1051
|
+
function fw(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v){var A,y,B,z,C,D,K,G,J,I,F,M,N,L,P,R,Q,fa,ka,wa,ya;return O(function(Ba){switch(Ba.g){case 1:var Ka=qv(d.g,"EXT-X-PLAYLIST-TYPE"),Ca=qv(d.g,"EXT-X-ENDLIST");Ca=Ka&&"VOD"==Ka.value||Ca;Ka=Ka&&"EVENT"==Ka.value&&!Ca;Ka=!Ca&&!Ka;Ca?Lv(a,Ev):Ka?Lv(a,nw):Lv(a,Iw);Hv(a)&&Sv(a,d);A=Hv(a)?a.N.get(g):new Map;y=Qv(a,d,A,c,e,g);B=y.segments;z=y.bandwidth;if(v){Ba.u(2);break}return E(Ba,Jw(a,g,f,B),3);case 3:v=Ba.h;case 2:return E(Ba,Pv(a,d,v,e,c),4);case 4:C=Ba.h;
|
|
1052
|
+
D=C.drmInfos;K=C.keyIds;G=C.encrypted;J=C.lh;if(G&&!D.length&&!J)throw new T(2,4,4026);I=Hw(a,f,g,h,k,l,m,n,p,q,u,w);I.encrypted=G;I.drmInfos=D;I.keyIds=K;I.mimeType=v;z&&(I.bandwidth=z);tw(I);Hv(a)&&Sv(a,d);F=B[0].startTime;M=B[B.length-1];N=M.endTime;L=new Ok(B);I.segmentIndex=L;R=(P=qv(d.g,"EXT-X-SERVER-CONTROL"))?null!=kv(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=kv(P,"CAN-BLOCK-RELOAD"):!1;fa=rv(d.g,"EXT-X-MEDIA-SEQUENCE",0);ka=Rv(fa,B);wa=ka.lb;ya=ka.mb;return Ba.return({stream:I,type:g,Kg:[],M:e,ic:F,
|
|
1053
|
+
Bb:N,Ud:R,Td:Q,qd:!1,Te:-1,lb:wa,mb:ya,ke:A,wf:!1})}})}function Rv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{lb:a,mb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{lb:a,mb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{lb:a,mb:c}}
|
|
1054
|
+
function Hw(a,b,c,d,e,f,g,h,k,l,m,n){var p=rw(c,b)||sw(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Td?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1052
1055
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Td?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ce(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
1053
|
-
fullMimeTypes:new Set};
|
|
1054
|
-
function
|
|
1055
|
-
!0;
|
|
1056
|
-
function
|
|
1057
|
-
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u,
|
|
1058
|
-
H(
|
|
1059
|
-
function
|
|
1060
|
-
|
|
1061
|
-
function
|
|
1062
|
-
function
|
|
1063
|
-
function
|
|
1064
|
-
if(!a.C)return null}var
|
|
1065
|
-
L=
|
|
1066
|
-
v&&(
|
|
1067
|
-
function
|
|
1068
|
-
function
|
|
1069
|
-
h=
|
|
1070
|
-
b*1E3));if(m=u.some(function(C){return null!=C.h}))for(c={},d=0;d<u.length;c={Pc:c.Pc,Oc:c.Oc,
|
|
1071
|
-
e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.aa;if(m&&Infinity!=c&&!
|
|
1072
|
-
function
|
|
1073
|
-
function
|
|
1074
|
-
1001!=
|
|
1075
|
-
function
|
|
1076
|
-
function
|
|
1077
|
-
function
|
|
1078
|
-
3);case 3:q=C.h,l=Ld(q.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.la.has(e)){
|
|
1079
|
-
var
|
|
1080
|
-
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"}},
|
|
1081
|
-
|
|
1082
|
-
Bb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xg(a,b,new Set,0);return Od("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},
|
|
1083
|
-
function
|
|
1084
|
-
function
|
|
1085
|
-
2)),[0,0]));h=
|
|
1086
|
-
case "audio":g=
|
|
1087
|
-
255]));e=
|
|
1088
|
-
a.byteLength);b.set(
|
|
1089
|
-
function
|
|
1090
|
-
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(
|
|
1091
|
-
a.encrypted&&(g=
|
|
1092
|
-
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=
|
|
1093
|
-
a.ja);else{c=
|
|
1094
|
-
a=
|
|
1095
|
-
function
|
|
1096
|
-
0,0,0,0,0,1,8]);f=
|
|
1097
|
-
function
|
|
1098
|
-
0;var p=Math.floor(m%(
|
|
1099
|
-
g,k);e.call(d,b,[f,
|
|
1100
|
-
function
|
|
1101
|
-
var
|
|
1102
|
-
0,0,0,0,0,0,0]),
|
|
1103
|
-
function
|
|
1104
|
-
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,
|
|
1105
|
-
function
|
|
1106
|
-
l);n(m);m=Ad(m.outerHTML)}var p=Yg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=om&&l(p);a.i||(a.i=new sk(null,0));if(l=lh(p,"IsLive",vh,!1))throw new T(2,4,4047);a.i.
|
|
1107
|
-
"Duration",th,Infinity);l||a.i.Wa(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};q=eh(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];q=t(q);for(u=q.next();!u.done;u=q.next())m=m.concat(eh(u.value,"ProtectionHeader"));if(m.length){q=[];for(u=0;u<m.length;u++){var
|
|
1108
|
-
|
|
1109
|
-
lh(K,"d",th);K=lh(K,"r",rh);if(!I)break;J=null!=J?J:C;K=K||0;if(0>K)if(
|
|
1110
|
-
q:[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,
|
|
1056
|
+
fullMimeTypes:new Set};tw(a);return a}
|
|
1057
|
+
function Pv(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J,I,F,M,N,L,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=ov(k.g,"EXT-X-KEY"),m=null,l.length)for(m=kw(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())q=p.value,f.set(q,m);w=u=!1;v=[];A=new Set;y=t(f);B=y.next();case 2:if(B.done){Q.u(4);break}z=B.value;C=t(z);D=C.next().value;K=C.next().value;G=D;J=K;I=lv(G,"METHOD");if("NONE"==I){Q.u(3);break}u=
|
|
1058
|
+
!0;F=Z(G,"KEYFORMAT")||"identity";M=null;if(xw(I)){w=!0;Q.u(3);break}if("identity"!=F){M=(N=yw[F])?N(G,c):null;Q.u(6);break}return E(Q,zw(a,G,c,d,J,e),8);case 8:M=Q.h;case 6:if(M){if(M.keyIds)for(L=t(M.keyIds),P=L.next();!P.done;P=L.next())R=P.value,A.add(R);v.push(M)}case 3:B=y.next();Q.u(2);break;case 4:return Q.return({drmInfos:v,keyIds:A,encrypted:u,lh:w})}})}
|
|
1059
|
+
function Kw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Id(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=rv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ga.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(lv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1060
|
+
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u,w;return O(function(v){if(1==v.g)return l=sv(d(),lv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=qg(l,a.g.retryParameters),p=lw(a,n,6),a.K.set(m,p)),E(v,a.K.get(m),2);if(3!=v.g){q=v.h;if(!q.data||q.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};w=k;return E(v,window.crypto.subtle.importKey("raw",q.data,u,!0,["decrypt"]),3)}w.cryptoKey=v.h;k.fetchKey=void 0;
|
|
1061
|
+
H(v)})};a.ga.set(c,k)}return a.ga.get(c)}
|
|
1062
|
+
function Sv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=qv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=qv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=qv(b.g,"EXT-X-PART-INF"))a.T=Number(lv(e,"PART-TARGET"));b=qv(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.T?(a.m=a.ib?5*a.T<=c?Math.min(a.T,a.m):Math.min(c,a.m):Math.min(a.T,a.m),a.xa=b?Number(lv(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1063
|
+
kv(b,"HOLD-BACK"):null,a.va=c?Number(c.value):0);a.Fa=Math.max(d,a.Fa)}function hw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.xa)b=a.xa;else if(a.va)b=a.va;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Fa*c}a.l.Tg(0);a.l.Qf(b);a.l.mc(!1)}
|
|
1064
|
+
function kw(a,b,c,d,e){var f=qv(c,"EXT-X-MAP");if(!f)return null;var g=lv(f,"URI"),h=sv(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ba.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?xw(lv(m,"METHOD"))&&m.id<f.id&&(k=Kw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Lw(h,f,l,k);a.ba.set(g,b)}return a.ba.get(g)}
|
|
1065
|
+
function Lw(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 yi(function(){return a},e,f,null,null,null,d)}
|
|
1066
|
+
function Mw(a,b,c,d,e,f,g,h,k){function l(fa){fa=(new sc(fa)).Na.split(".").pop();var ka=Nw[g][fa];ka||(ka=jw[fa]);return ka}var m=d.g,n=qv(m,"EXTINF"),p=0,q=0,u=null;d.wb.length&&!a.C&&ab("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var w=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=qv(m,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(w=oh(v.value))}var A=
|
|
1067
|
+
Bi;qv(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.wb.length)throw new T(2,4,4024,"EXTINF");if(!a.C)return null}var y=[];v=!1;var B=null,z=!1,C=!1;if(a.C&&d.wb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=w,K={},G=0;G<d.wb.length;K={Xc:K.Xc,Sc:K.Sc},G++){var J=d.wb[G],I=0==G?c:y[y.length-1],F=0==G?e:I.endTime,M=Number(Z(J,"DURATION"))||a.T;if(M){var N=F+M,L=0,P=null;"EXT-X-PRELOAD-HINT"==J.name?(L=(L=Z(J,"BYTERANGE-START"))?Number(L):0,(I=Z(J,"BYTERANGE-LENGTH"))?
|
|
1068
|
+
P=L+Number(I)-1:L&&(P=Number.MAX_SAFE_INTEGER)):(L=Z(J,"BYTERANGE"),P=t(mw(I,L)),L=P.next().value,P=P.next().value);K.Sc=Z(J,"URI");if(K.Sc){I=Bi;"YES"==Z(J,"GAP")&&(I=2,z=!0);K.Xc=null;var R=function(fa){return function(){null==fa.Xc&&(fa.Xc=sv(h(),fa.Sc,f));return fa.Xc}}(K);p&&0<=L&&null!=P&&(B=R,v=!0);F=new Ai(F,N,R,L,P,b,0,0,Infinity,[],"",null,D,I,k);"EXT-X-PRELOAD-HINT"==J.name&&(F.xf(),C=!0);"YES"!=Z(J,"INDEPENDENT")&&0<G&&F.je();if(J=l(K.Sc))F.mimeType=J,Ow.has(J)&&(F.ca=null);y.push(F);
|
|
1069
|
+
D&&(D+=M)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;v&&(z||0!=y[0].Da?(v=!1,B=null):y=[]);(n=qv(m,"EXT-X-BYTERANGE"))?(u=t(mw(c,n.value)),q=u.next().value,u=u.next().value):y.length&&(q=y[0].Da,u=y[y.length-1].na);c="";n=null;"image"==g&&(c="1x1",m=qv(m,"EXT-X-TILES"))&&(c=lv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Ai(e,p,function(){if(B)return B();null==Q&&(Q=sv(h(),d.h,f));return Q||[]},q,
|
|
1070
|
+
u,b,0,0,Infinity,y,c,n,w,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,Ow.has(e)&&(b.ca=null);v&&(a.ib=!0,b.Cg(),C&&b.xf());return b}function mw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.na+1,d=c+b-1);return[c,d]}
|
|
1071
|
+
function Qv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=rv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=rv(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=qv(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,q=0;Hv(a)&&c.has(p)&&(q=c.get(p));0===q&&a.ma==nw&&0<c.size&&!c.has(p)&&(q=a.l.jb());var u=[],w=null;m=[];for(var v=0;v<g.length;v++){var A=g[v],y=0==v?q:w.endTime;p=l+n+v;qv(A.g,"EXT-X-DISCONTINUITY")&&k++;var B=t(A.g);for(var z=B.next();!z.done;z=B.next())z=z.value,"EXT-X-KEY"==z.name&&(xw(lv(z,"METHOD"))?
|
|
1072
|
+
h=Kw(a,z,b,e,d):h=void 0);c.set(p,y);B=kw(a,b,A.g,e,d);!a.C&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());if(y=Mw(a,B,w,A,y,d,f,e,h))(w=rv(A.g,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:y.endTime-y.startTime}):m.length&&(w=m.pop(),w.duration+=y.endTime-y.startTime,m.push(w)),w=y,y.i=k,Uv(a,f)&&null!=a.J&&p<a.J||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(C,D){return C+D.duration},0),b=Math.round(m.reduce(function(C,D){return C+D.bitrate*D.duration},0)/
|
|
1073
|
+
b*1E3));if(m=u.some(function(C){return null!=C.h}))for(c={},d=0;d<u.length;c={Pc:c.Pc,Oc:c.Oc,Hd:c.Hd,Ib:c.Ib,Lc:c.Lc},d++)if(c.Ib=u[d],null==c.Ib.h)for(c.Oc=0,c.Pc=d,e=function(C){return function(){var D=u[C.Pc];if(D){if(null!=D.h)return D.h+C.Oc;C.Oc-=D.endTime-D.startTime;C.Pc+=1}return null}}(c),c.Lc=0,c.Hd=d,g=function(C){return function(){var D=u[C.Hd];if(D){D!=C.Ib&&(C.Lc+=D.endTime-D.startTime);if(null!=D.h)return D.h+C.Lc;--C.Hd}return null}}(c);null==c.Ib.h;)c.Ib.h=g(),null==c.Ib.h&&(c.Ib.h=
|
|
1074
|
+
e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.aa;if(m&&Infinity!=c&&!Uv(a,f))for(a=t(u),d=a.next();!d.done;d=a.next())d.value.Vf(c);return{segments:u,bandwidth:b}}function rw(a,b){if(a==Td){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
|
|
1075
|
+
function sw(a){return a==Td?"text/vtt":Nw[a].mp4}
|
|
1076
|
+
function Jw(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A;return O(function(y){switch(y.g){case 1:e=wg;f=Math.trunc((d.length-1)/2);for(g=d[f];2==g.status&&f<d.length;)f++,g=d[f];if(2==g.status)return y.return(sw(b));h=g.M();k=new sc(h[0]);l=k.Na.split(".").pop();m=Nw[b];if((n=m[l])||(n=jw[l])||(n=rw(b,c)))return y.return(n);q=1;u=qg(h,a.g.retryParameters);ta(y,2);u.method="HEAD";return E(y,lw(a,u,e,{type:q}),4);case 4:w=y.h;p=w.headers["content-type"];va(y,3);break;case 2:v=za(y);if(!v||1002!=v.code&&
|
|
1077
|
+
1001!=v.code){y.u(3);break}u.method="GET";return E(y,lw(a,u,e,{type:q}),6);case 6:A=y.h,p=A.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return(sw(b))}})}function gw(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Fv(a,b,c){return lw(a,qg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1078
|
+
function Dv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();Hv(a)&&(d=(c-b)/1E3,a.Ka.sample(1,d),e=a.m,f=Math.max(0,e-Wa(a.Ka)),a.A.X(f));va(h,3);break;case 2:g=za(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
|
|
1079
|
+
function Hv(a){return a.ma!=Ev}function Lv(a,b){a.ma=b;a.l&&a.l.mc(!Hv(a));Hv(a)||a.A.stop()}function lw(a,b,c,d){if(!a.W)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);kg(a.W,b);return b.promise}function xw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1080
|
+
function zw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v,A,y,B,z;return O(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(qd())throw new T(2,4,4041);g=lv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=sv(d(),lv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ld(Hd(k[0].split("data:text/plain;base64,").pop()));C.u(2);break}m=k.sort().join("");a.wa.has(m)||(n=qg(k,a.g.retryParameters),p=lw(a,n,6),a.wa.set(m,p));return E(C,a.wa.get(m),
|
|
1081
|
+
3);case 3:q=C.h,l=Ld(q.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.la.has(e)){w=a.la.get(e);C.u(5);break}v=sl(e.M(),e.cc(),e.ac(),a.g.retryParameters);A=wg;return E(C,lw(a,v,A,{type:0}),6);case 6:y=C.h,w=wt(y.data),a.la.set(e,w);case 5:w&&(u=w);case 4:return B=new Map,B.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),C.return(Pd(B,z))}})}S("shaka.hls.HlsParser",Cv);
|
|
1082
|
+
var jw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Nw={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",
|
|
1083
|
+
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"}},Ow=new Set(["video/mp2t"].concat(x(Yd))),yw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(qd())throw new T(2,4,4041);a=lv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Od("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
1084
|
+
keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=lv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=lv(a,"URI");b=Bv(b.split("?")[0]);b=Bb(b.data);c=Od("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=lv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
1085
|
+
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=lv(a,"URI");a=Bv(a.split("?")[0]);a=Bb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xg(a,b,new Set,0);return Od("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},Ev="VOD",Iw="EVENT",nw="LIVE",Kv={hh:Ev,fj:Iw,nj:nw};ti["application/x-mpegurl"]=function(){return new Cv};ti["application/vnd.apple.mpegurl"]=function(){return new Cv};function Pw(a){var b=0,c=Fb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Qw(a){if(a=Rw(a))a:{a=t(hh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=ih(b.value,"LA_URL")){a=fh(b);break a}a=""}else a="";return a}
|
|
1086
|
+
function Rw(a){a=Hd(fh(a));a=Pw(a).filter(function(b){return b.type===Sw})[0];if(!a)return null;a=xd(a.value,!0);return(a=Zg(a,"WRMHEADER"))?a:null}var Sw=1,Tw=(new Map).set("com.microsoft.playready",Qw).set("com.microsoft.playready.recommendation",Qw).set("com.microsoft.playready.software",Qw).set("com.microsoft.playready.hardware",Qw);function Uw(a){if(!Vw){Vw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Ww=Xw("ftyp",b,d,b,c);b=Xw("dref",Yw);Zw=Xw("dinf",b)}this.g=a}
|
|
1087
|
+
function $w(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=Xw;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/(ax+1));m=Math.floor(m%(ax+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(bx(h,4)),[0,0,0,0],x(bx(n,4)),x(bx(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(bx(k,2)),[0,0],x(bx(l,
|
|
1088
|
+
2)),[0,0]));h=Xw("tkhd",h);k=Xw;n=g.duration*g.timescale;l=Math.floor(n/(ax+1));n=Math.floor(n%(ax+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(bx(g.timescale,4)),x(bx(l,4)),x(bx(n,4)),x(bx(m,2)),[0,0]));l=Xw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=cx;break;case "audio":m=dx}n=Xw("hdlr",m);a:{switch(g.type){case "video":g=Xw("minf",Xw("vmhd",ex),Zw,fx(g));break a;
|
|
1089
|
+
case "audio":g=Xw("minf",Xw("smhd",gx),Zw,fx(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Md.apply(Ed,x(b));f=a.g[0];c=Xw;d=f.duration*f.timescale;e=Math.floor(d/(ax+1));d=Math.floor(d%(ax+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(bx(f.timescale,4)),x(bx(e,4)),x(bx(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,
|
|
1090
|
+
255]));e=Xw("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(bx(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Xw("trex",k),h.call(g,k);a=Md.apply(Ed,x(d));a=Xw("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=Md.apply(Ed,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Ww.byteLength+
|
|
1091
|
+
a.byteLength);b.set(Ww);b.set(a,Ww.byteLength);return b}
|
|
1092
|
+
function fx(a){var b=Xw,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.ua.byteLength)var e=Xw("avcC",a.ua);else{e=Xw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Ya.length;n++){var p=hx(a.Ya[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1093
|
+
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(bx(c,2)),x(bx(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=ix(a);g=new Uint8Array([]);
|
|
1094
|
+
a.encrypted&&(g=jx(a),d="encv");c=Xw(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.ua.byteLength&&(c=Xw("hvcC",a.ua)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(bx(d,2)),x(bx(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=ix(a),g=new Uint8Array([]),a.encrypted&&(g=jx(a),e="encv"),c=Xw(e,d,
|
|
1095
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Xw(".mp3",kx(a));else if(a.codecs.includes("ac-3"))c=Xw("dac3",a.ja),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=jx(a),d="enca"),a=Xw(d,kx(a),c,e);else if(a.codecs.includes("ec-3"))c=Xw("dec3",a.ja),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=jx(a),d="enca"),a=Xw(d,kx(a),c,e);else if(a.codecs.includes("opus"))c=Xw("dOps",a.ja),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=jx(a),d="enca"),a=Xw(d,kx(a),c,e);else{if(0<a.ja.byteLength)c=Xw("esds",
|
|
1096
|
+
a.ja);else{c=Xw;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Qd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x(bx(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=jx(a),d="enca");
|
|
1097
|
+
a=Xw(d,kx(a),c,e)}c=a}a=Xw("stsd",lx,c);return b("stbl",a,Xw("stts",mx),Xw("stsc",nx),Xw("stsz",ox),Xw("stco",px))}function ix(a){if(!a.Aa&&!a.Ba)return new Uint8Array([]);var b=a.Ba;a=new Uint8Array([].concat(x(bx(a.Aa,4)),x(bx(b,4))));return Xw("pasp",a)}function kx(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(bx(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1098
|
+
function jx(a){var b=Xw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(bx(d,4))));c=Xw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Xw("schm",d);e=Xw;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=hx(h.value)}a=new Uint8Array([0,
|
|
1099
|
+
0,0,0,0,0,1,8]);f=Xw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1100
|
+
function qx(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=Xw;var g=new Uint8Array([0,0,0,0].concat(x(bx(c.data?c.data.pb:0,4))));g=Xw("mfhd",g);var h;var k=c.data?c.data.Va:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ra<<4|m.Ta<<2|m.Sa}k=Xw("sdtp",l);var n=k.length+92;l=Xw;h=new Uint8Array([0,0,0,58].concat(x(bx(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Xw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1101
|
+
0;var p=Math.floor(m%(ax+1));m=new Uint8Array([1,0,0,0].concat(x(bx(Math.floor(m/(ax+1)),4)),x(bx(p,4))));m=Xw("tfdt",m);var q=n;n=c.data?c.data.Va:[];p=n.length;var u=12+16*p,w=new Uint8Array(u);q+=8+u;w.set(["video"===c.type?1:0,0,15,1].concat(x(bx(p,4)),x(bx(q,4))),0);for(q=0;q<p;q++){var v=n[q];u=bx(v.duration,4);var A=bx(v.size,4),y=v.flags;v=bx(v.$a,4);w.set([].concat(x(u),x(A),[y.cb<<2|y.Ra,y.Ta<<6|y.Sa<<4|y.eb,y.Qa&61440,y.Qa&15],x(v)),12+16*q)}n=Xw("trun",w);k=l("traf",h,m,n,k);f=f("moof",
|
|
1102
|
+
g,k);e.call(d,b,[f,rx(c)])}return Md.apply(Ed,x(b))}function rx(a){a=(a.data?a.data.Va:[]).map(function(b){return b.data});a=Md.apply(Ed,x(a));return Xw("mdat",a)}function bx(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function hx(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}
|
|
1103
|
+
function Xw(a){var b=La.apply(1,arguments),c=sx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],sx[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}
|
|
1104
|
+
var Vw=!1,ax=Math.pow(2,32)-1,sx={},cx=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]),dx=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]),mx=new Uint8Array([0,0,0,0,0,0,0,0]),nx=new Uint8Array([0,0,0,0,0,0,0,0]),px=new Uint8Array([0,0,0,0,0,0,0,0]),ox=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ex=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),gx=new Uint8Array([0,
|
|
1105
|
+
0,0,0,0,0,0,0]),lx=new Uint8Array([0,0,0,0,0,0,0,1]),Ww=new Uint8Array([]),Yw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Zw=new Uint8Array([]);function tx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Ua(5);this.o=new Tc(function(){ux(a)});this.A=new jg;this.m=new Map}r=tx.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,vx(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
|
|
1106
|
+
function ux(a){var b;O(function(c){switch(c.g){case 1:return ta(c,2),E(c,vx(a),4);case 4:va(c,3);break;case 2:b=za(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
|
|
1107
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,vx(a),4);if(2!=c.g)return va(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
|
|
1108
|
+
function vx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=qg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),kg(a.A,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=nm){rb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=ou(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
|
|
1109
|
+
l);n(m);m=Ad(m.outerHTML)}var p=Yg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=om&&l(p);a.i||(a.i=new sk(null,0));if(l=lh(p,"IsLive",vh,!1))throw new T(2,4,4047);a.i.mc(!l);n=lh(p,"TimeScale",th,1E7);m=lh(p,"DVRWindowLength",th);l&&(0===m||isNaN(m))&&(m=Infinity);var q=lh(p,"CanSeek",vh,!1);0===m&&q&&(m=Infinity);q=null;m&&0<m&&(q=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(q=a.g.availabilityWindowOverride);null==q&&(q=Infinity);a.i.ye(q);m=lh(p,
|
|
1110
|
+
"Duration",th,Infinity);l||a.i.Wa(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};q=eh(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];q=t(q);for(u=q.next();!u.done;u=q.next())m=m.concat(eh(u.value,"ProtectionHeader"));if(m.length){q=[];for(u=0;u<m.length;u++){var w=m[u],v=w.attributes.SystemID.toLowerCase(),A=n[v];if(A){var y=Rw(w);if(y)a:{y=t(hh(y,"DATA"));for(var B=y.next();!B.done;B=y.next())if(B=ih(B.value,"KID")){y=Hd(fh(B));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
|
|
1111
|
+
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Ld(y);break a}y=null}else y=null;B=Hd(fh(w));v=Id(v.replace(/-/g,""));v=[{initData:Xg(B,v,new Set,0),initDataType:"cenc",keyId:y}];v=Od(A,"cenc",v);y&&v.keyIds.add(y);if(A=Tw.get(A))v.licenseServerUri=A(w);q.push(v)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=eh(p,"StreamIndex");p=t(p);for(w=p.next();!w.done;w=p.next()){w=w.value;A=eh(w,"QualityLevel");v=l.timescale;y=l.duration;B=eh(w,"c");for(var z=[],C=0,D=0;D<B.length;++D){var K=B[D],G=B[D+1],J=lh(K,"t",th),I=
|
|
1112
|
+
lh(K,"d",th);K=lh(K,"r",rh);if(!I)break;J=null!=J?J:C;K=K||0;if(0>K)if(G){G=lh(G,"t",th);if(null==G)break;else if(J>=G)break;K=Math.ceil((G-J)/I)-1}else{if(Infinity==y)break;else if(J/v>=y)break;K=Math.ceil((y*v-J)/I)-1}for(G=0;G<=K;++G)C=J+I,z.push({start:J/v,end:C/v,bg:J}),J=C}v=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=wx(a,w,y.value,v,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Td||a.g.disableText||m.push(y):n.push(y):q.push(y))}p=[];q=t(0<q.length?
|
|
1113
|
+
q:[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,w=t(0<n.length?n:[null]),y=w.next();!y.done;y=w.next())A=p,v=A.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++,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:[]},v.call(A,y);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
|
|
1111
1114
|
l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null},a.i.he());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);H(k)})}
|
|
1112
|
-
function
|
|
1115
|
+
function wx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return ab("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=lh(c,"Bitrate",sh),m=lh(c,"MaxWidth",sh),n=lh(c,"MaxHeight",sh),p=lh(c,"Channels",sh),q=lh(c,"SamplingRate",sh),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.Wa(Math.min(u,w));var v={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1113
1116
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Ce(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:q,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1114
|
-
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=
|
|
1115
|
-
e),null;c=
|
|
1116
|
-
|
|
1117
|
-
A),
|
|
1118
|
-
function
|
|
1119
|
-
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function
|
|
1120
|
-
function
|
|
1121
|
-
ti["application/vnd.ms-sstr+xml"]=function(){return new
|
|
1122
|
-
function
|
|
1123
|
-
K.value.byteLength;if(!g){I.u(5);break}return E(I,g(K.value),5);case 5:
|
|
1124
|
-
function
|
|
1125
|
-
|
|
1126
|
-
function
|
|
1117
|
+
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=xx[e])&&v.roles.push(e),"main"===e&&(v.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return ab('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!yx.includes(e.toUpperCase()))return ab("Codec not supported:",
|
|
1118
|
+
e),null;c=zx(c,g,e,v);v.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;v.type="audio";v.mimeType="mss/audio/mp4";v.codecs=Ax(e,c);break;case "video":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;v.type="video";v.mimeType="mss/video/mp4";v.codecs=Bx(c);break;case "text":if(v.type=Td,v.mimeType="application/mp4","TTML"===e||"DFXP"===e)v.codecs="stpp"}v.fullMimeTypes.add(Xd(v.mimeType,v.codecs));
|
|
1119
|
+
v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(a.m.has(v.id))var A=a.m.get(v.id);else A=[],"video"==v.type&&(A=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,Ya:A,ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:v},A=$w(new Uw([A])),a.m.set(v.id,A);A=Cx(a,new yi(function(){return[]},0,null,null,void 0,
|
|
1120
|
+
A),v,b,d);v.segmentIndex=new Ok(A);return Promise.resolve()};v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)};return v}
|
|
1121
|
+
function zx(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1122
|
+
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Ax(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 Bx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1123
|
+
function Cx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Wc:g.Wc},h=e.next())g.Wc=h.value,d.push(new Ai(g.Wc.start,g.Wc.end,function(k){return function(){return Nd(a.l,[f.replace("{start time}",String(k.Wc.bg))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",tx);var yx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),xx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1124
|
+
ti["application/vnd.ms-sstr+xml"]=function(){return new tx};function Dx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=zd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Ex(){}function Fx(a,b,c,d,e){var f=new Gx;Eg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Hx,h={jg:!1,$g:!1};a=Ix(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new $f(a,function(){h.jg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Tc(function(){h.$g=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1125
|
+
function Ix(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,w,v,A,y,B;return O(function(z){switch(z.g){case 1:return h=Jx,k=Kx,p=n=0,q=Date.now(),ta(z,2),E(z,h(a,c),4);case 4:l=z.h;f(Lx(l.headers));if("HEAD"==c.method){z.u(5);break}u=l.clone().body.getReader();v=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;A=function(C){function D(){var K,G,J;return O(function(I){switch(I.g){case 1:return ta(I,2),E(I,u.read(),4);case 4:K=I.h;va(I,3);break;case 2:return za(I),I.return();case 3:if(K.done){I.u(5);break}n+=
|
|
1126
|
+
K.value.byteLength;if(!g){I.u(5);break}return E(I,g(K.value),5);case 5:G=Date.now();if(100<G-q||K.done)J=K.done?0:v-n,e(G-q,n-p,J),p=n,q=G;K.done?C.close():(C.enqueue(K.value),D());H(I)}})}D()};new k({start:A});return E(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:va(z,3);break;case 2:y=za(z);if(d.jg)throw new T(1,1,7001,a,b);if(d.$g)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,y,b);case 3:return B=Lx(l.headers),z.return(Dx(B,m,l.status,a,l.url,b))}})}
|
|
1127
|
+
function Lx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Mx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",Ex);Ex.isSupported=Mx;Ex.parse=Fx;var Jx=window.fetch,Hx=window.AbortController,Kx=window.ReadableStream,Gx=window.Headers;
|
|
1128
|
+
Mx()&&(mg("http",Fx,2,!0),mg("https",Fx,2,!0),mg("blob",Fx,2,!0));function Nx(){}
|
|
1129
|
+
function Ox(a,b,c,d,e){var f=new Px,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=Qx(f);e(q);n=!0}};f.onload=function(q){var u=Qx(f),w=f.response;try{d(Date.now()-g,q.loaded-h,0);var v=Dx(u,w,f.status,a,f.responseURL,c);l(v)}catch(A){m(A)}};f.onerror=function(q){m(new T(1,
|
|
1127
1130
|
1,1002,a,q,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(q){var u=Date.now();if(100<u-g||q.lengthComputable&&q.loaded==q.total)d(u-g,q.loaded-h,4==f.readyState?0:q.total-q.loaded),h=q.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new $f(k,function(){f.abort();return Promise.resolve()})}
|
|
1128
|
-
function
|
|
1129
|
-
function
|
|
1130
|
-
function
|
|
1131
|
-
function
|
|
1132
|
-
r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
1133
|
-
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,
|
|
1134
|
-
function
|
|
1135
|
-
function
|
|
1136
|
-
function
|
|
1137
|
-
|
|
1138
|
-
function
|
|
1139
|
-
function
|
|
1140
|
-
function
|
|
1141
|
-
|
|
1142
|
-
function
|
|
1143
|
-
function
|
|
1144
|
-
|
|
1145
|
-
function
|
|
1146
|
-
function
|
|
1147
|
-
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
|
|
1148
|
-
|
|
1131
|
+
function Qx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Nx);Nx.parse=Ox;var Px=window.XMLHttpRequest;mg("http",Ox,1,!0);mg("https",Ox,1,!0);mg("blob",Ox,1,!0);function Rx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Sx(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Da+":"+a.na}function Tx(a,b){return sl(a.g.M(),a.g.Da,a.g.na,b.streaming.retryParameters)};function Ux(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Vx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Ux.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 Wx(a){var b=this;this.o=a;this.j=new Map;this.i=new Ag(function(){return Xx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Ux}Wx.prototype.destroy=function(){return this.i.destroy()};function Yx(a,b,c){a.m=b;a.l=c}function Xx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1132
|
+
function Zx(a,b,c,d,e,f){Bg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return E(u,$x(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Bb(h),l=new Wg(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function ay(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1133
|
+
function $x(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=wg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Ob(a.h,e);return g.return(f.data)})};function by(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Zf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}by.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return E(b,a.g,4)}if(2!=b.g)return va(b,0);za(b);H(b)})};
|
|
1134
|
+
function cy(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}by.prototype.store=function(){return this.h};by.prototype.promise=function(){return this.g};function dy(a){this.h=a;this.g=[]}dy.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function ey(a,b){return fy(a,b,"readwrite")}function fy(a,b,c){c=a.h.transaction([b],c);var d=new by(c,b);a.g.push(d);d.promise().then(function(){Ob(a.g,d)},function(){Ob(a.g,d)});return d};function gy(a,b,c){this.h=new dy(a);this.i=b;this.g=c}r=gy.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return hy(this.i)};r.removeSegments=function(a,b){return iy(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,jy(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.kg(e)}))})};r.addManifests=function(){return hy(this.g)};
|
|
1135
|
+
r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function ky(a,b,c){a=ey(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=ey(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 iy(this,this.g,a,b)};
|
|
1136
|
+
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,jy(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.dd(e)})))})};r.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=fy(a.h,a.g,"readonly"),c=new Map,E(d,cy(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.dd(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};r.kg=function(a){return a};r.dd=function(a){return Promise.resolve(a)};
|
|
1137
|
+
function hy(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=ey(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 E(m,d.promise(),2)}return m.return(f)})};
|
|
1138
|
+
function iy(a,b,c,d){a=ey(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Md:e.Md},f=c.next())e.Md=f.value,b.delete(e.Md).onsuccess=function(g){return function(){return d(g.Md)}}(e);return a.promise()}
|
|
1139
|
+
function jy(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=fy(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Uc:h.Uc,Rc:h.Rc},l=k.next())h.Rc=l.value,h.Uc=e.get(h.Rc),h.Uc.onsuccess=function(n){return function(){void 0==n.Uc.result&&g.push(n.Rc);f[n.Rc]=n.Uc.result}}(h);return E(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function ly(a){this.g=new dy(a)}ly.prototype.destroy=function(){return this.g.destroy()};ly.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=fy(a.g,"session-ids","readonly"),c=[],E(d,cy(b,function(e,f){c.push(f)}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};ly.prototype.add=function(a){var b=ey(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()};
|
|
1140
|
+
ly.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=ey(b.g,"session-ids"),E(d,cy(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function my(){this.g=new Map}my.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)};my.prototype.init=function(){var a=this;ny.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)};
|
|
1141
|
+
function oy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{kb:d,Ha:f},Ha:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function py(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({kb:d,Ha:f},e)})})}
|
|
1142
|
+
function qy(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function ry(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function sy(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1143
|
+
function ty(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=ny,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function uy(a,b){ny.set(a,b)}S("shaka.offline.StorageMuxer",my);my.unregister=function(a){ny.delete(a)};my.register=uy;my.prototype.destroy=my.prototype.destroy;var ny=new Map;function vy(){gy.apply(this,arguments)}pa(vy,gy);vy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=ey(c.h,c.g);e=d.store();f=new Zf;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return E(g,Promise.all([d.promise(),f]),0)})};
|
|
1144
|
+
vy.prototype.dd=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=wy(a.periods[c],e),b.push(f);return E(h,Nt(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})})};
|
|
1145
|
+
function wy(a,b){xy(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return yy(e,a.startTime,b)})}
|
|
1146
|
+
function yy(a,b,c){var d=a.initSegmentUri?zy(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1147
|
+
zy(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}vy.prototype.kg=function(a){return{data:a.data}};
|
|
1148
|
+
function zy(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new T(2,9,9004,"Could not parse uri "+a);}
|
|
1149
|
+
function xy(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++,
|
|
1150
|
+
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 Ay(){gy.apply(this,arguments)}pa(Ay,gy);
|
|
1151
|
+
Ay.prototype.dd=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(By(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,Nt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1149
1152
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1150
|
-
function
|
|
1151
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function
|
|
1152
|
-
r.init=function(){var a=this,b=new Zf,c=!1,d=new Tc(function(){c=!0;b.reject(new T(2,9,9017))});d.X(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new
|
|
1153
|
-
new
|
|
1153
|
+
function By(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1154
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function Cy(){gy.apply(this,arguments)}pa(Cy,gy);r=Cy.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 ky(this,a,b)};r.dd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Dy(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Dy.prototype;
|
|
1155
|
+
r.init=function(){var a=this,b=new Zf,c=!1,d=new Tc(function(){c=!0;b.reject(new T(2,9,9017))});d.X(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new vy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Ay(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1156
|
+
new Ay(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Cy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ly(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new T(2,
|
|
1154
1157
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})};
|
|
1155
1158
|
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};
|
|
1156
|
-
r.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,
|
|
1157
|
-
function
|
|
1158
|
-
function
|
|
1159
|
-
function
|
|
1159
|
+
r.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,Ey(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
|
|
1160
|
+
function Ey(){var a=new Zf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}uy("idb",function(){return fd()||Yc()||!window.indexedDB?null:new Dy});function Fy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Fy.prototype.kb=function(){return this.i};Fy.prototype.Ha=function(){return this.h};Fy.prototype.key=function(){return this.l};Fy.prototype.toString=function(){return this.j};
|
|
1161
|
+
function Gy(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 Fy(b,c,d,Number(a[4])):null};function Hy(a,b){this.h=a;this.g=b}
|
|
1162
|
+
function Iy(a,b){var c=new sk(null,0);c.Wa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Jy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Td}).map(function(l){return Ky(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ky(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=
|
|
1160
1163
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null}}
|
|
1161
|
-
function
|
|
1162
|
-
b.next())for(e=e.value,g=
|
|
1163
|
-
function
|
|
1164
|
+
function Jy(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=
|
|
1165
|
+
b.next())for(e=e.value,g=Ky(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=Ky(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}
|
|
1166
|
+
function Ky(a,b,c){var d=b.segments.map(function(e){return Ly(a,e,b)});c.yd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ok(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1164
1167
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Xd(b.mimeType,b.codecs)])}}
|
|
1165
|
-
function
|
|
1166
|
-
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=
|
|
1168
|
+
function Ly(a,b,c){var d=new Fy("segment",a.h,a.g,b.dataKey);a=new Ai(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?My(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function My(a,b){var c=new Fy("segment",a.h,a.g,b);return new yi(function(){return[c.toString()]},0,null)};function Ny(){this.g=null}r=Ny.prototype;r.configure=function(){};
|
|
1169
|
+
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=Gy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new my;ua(m,2);return E(m,e.init(),4);case 4:return E(m,qy(e,d.kb(),d.Ha()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Hy(d.kb(),d.Ha()),l=Iy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Aa(m),E(m,e.destroy(),7);case 7:Da(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
1167
1170
|
r.update=function(){};
|
|
1168
|
-
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
1169
|
-
r.onInitialVariantChosen=function(){};r.banLocation=function(){};ti["application/x-offline-manifest"]=function(){return new
|
|
1170
|
-
function
|
|
1171
|
-
function
|
|
1172
|
-
h.g)return ta(h,2),E(h,Vh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);za(h);H(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function
|
|
1173
|
-
function
|
|
1174
|
-
case 4:b.h=null,b.g=null,H(k)}})})}function
|
|
1175
|
-
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
1176
|
-
function
|
|
1177
|
-
p,b,c,e,f),
|
|
1178
|
-
|
|
1179
|
-
function
|
|
1180
|
-
2)}if(!C)return
|
|
1181
|
-
|
|
1182
|
-
function
|
|
1183
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();va(A,0);break;case 2:return
|
|
1184
|
-
function
|
|
1185
|
-
u=t(a.imageStreams);for(
|
|
1186
|
-
|
|
1187
|
-
function
|
|
1188
|
-
p&&n&&(p.initData=[]);return{ji:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.
|
|
1189
|
-
function
|
|
1190
|
-
function
|
|
1191
|
-
function
|
|
1192
|
-
function
|
|
1193
|
-
function
|
|
1194
|
-
r.list=function(){return
|
|
1195
|
-
function
|
|
1196
|
-
c.configure(d.manifest),
|
|
1197
|
-
function
|
|
1198
|
-
function
|
|
1199
|
-
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;
|
|
1200
|
-
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function
|
|
1201
|
-
function
|
|
1202
|
-
function
|
|
1203
|
-
function
|
|
1204
|
-
function
|
|
1205
|
-
|
|
1206
|
-
var
|
|
1207
|
-
function
|
|
1208
|
-
function
|
|
1209
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
1210
|
-
function
|
|
1211
|
-
function
|
|
1212
|
-
(q+="; spatialRendering=true");l=mb(q);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,
|
|
1213
|
-
function
|
|
1214
|
-
function
|
|
1171
|
+
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new my,ta(m,2,3),E(m,e.init(),5);case 5:return E(m,qy(e,d.kb(),d.Ha()),6);case 6:return f=m.h,E(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Aa(m),E(m,e.destroy(),10);case 10:Da(m,0);break;case 2:za(m),m.u(3)}})};
|
|
1172
|
+
r.onInitialVariantChosen=function(){};r.banLocation=function(){};ti["application/x-offline-manifest"]=function(){return new Ny};function Oy(){}function Py(a){var b=Gy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=cg(a)):a=b&&"segment"==b.g?Qy(b.key(),b):ag(new T(2,1,9004,a));return a}
|
|
1173
|
+
function Qy(a,b){var c=new my;return cg(void 0).za(function(){return c.init()}).za(function(){return qy(c,b.kb(),b.Ha())}).za(function(d){return d.getSegments([b.key()])}).za(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",Oy);Oy.plugin=Py;mg("offline",Py);function Ry(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,Sy(w.info,p)){w.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Ty(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1174
|
+
function Ty(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Bh({Db:b,onError:function(){},re:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),E(f,Jh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return za(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1175
|
+
h.g)return ta(h,2),E(h,Vh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);za(h);H(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function Sy(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pb(a.audioCapabilities,b.audioCapabilities,c)&&Pb(a.videoCapabilities,b.videoCapabilities,c)};function Uy(a,b,c){var d=b.presentationTimeline.getDuration();b=Vy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Wy(a,b){var c=Iy(new Hy(a.kb(),a.Ha()),b),d=b.appMetadata||{};c=Vy(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}}
|
|
1176
|
+
function Vy(a){var b=[],c=wf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(jf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(kf(c.value));return b};function Xy(){this.g={}}function Yy(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 Zy(a,b){a.g[b.id]=b.bandwidth||2048}function $y(a,b){a=a.g[b];null==a&&(a=0);return a};function az(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.bc()):(this.h=mm(),this.g=new lg);this.i=[];this.j=[];var c=!a;this.l=new Ag(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return E(k,Promise.all(b.j.map(function(l){return Xx(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return E(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return E(k,b.g.destroy(),4);
|
|
1177
|
+
case 4:b.h=null,b.g=null,H(k)}})})}function bz(){if(Uc())a:{var a=t(ny.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=az.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=dm(a,b));return qm(this.h,a)};r.getConfiguration=function(){var a=mm();qm(a,this.h,mm());return a};r.bc=function(){return this.g};
|
|
1178
|
+
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Wx(this.g);this.j.push(f);b=cz(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):E(h,Lm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=si(a,c||null);return h.return(g())})},e,f);b=new $f(b,function(){return Xx(f)});b.finally(function(){Ob(d.j,f)});return dz(this,b)};
|
|
1179
|
+
function cz(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v,A,y,B;return O(function(z){switch(z.g){case 1:return ez(),h=g=null,k=new my,n=m=l=null,ta(z,2,3),E(z,d(),5);case 5:return g=z.h,E(z,fz(a,b,g,e),6);case 6:p=z.h;gz(a);q=!p.presentationTimeline.U()&&!p.presentationTimeline.hc();if(!q)throw new T(2,9,9005,b);return E(z,a.vc(p,function(C){n=n||C},e),7);case 7:h=z.h;gz(a);if(n)throw n;return E(z,hz(p,h,e),8);case 8:return E(z,k.init(),9);case 9:return gz(a),E(z,oy(k),10);case 10:return l=z.h,gz(a),u=iz(h,
|
|
1180
|
+
p,b,c,e,f),w=u.ji,v=u.Yf,E(z,l.Ha.addManifests([w]),11);case 11:A=z.h;gz(a);m=A[0];gz(a);if(n)throw n;return E(z,jz(a,v,m,w,f,e,l.Ha,p,h),12);case 12:return gz(a),kz(p,w,h,e),E(z,l.Ha.updateManifest(m,w),13);case 13:return gz(a),y=new Fy("manifest",l.path.kb,l.path.Ha,m),z.return(Wy(y,w));case 3:return Aa(z),E(z,k.destroy(),14);case 14:if(!g){z.u(15);break}return E(z,g.stop(),15);case 15:if(!h){z.u(17);break}return E(z,h.destroy(),17);case 17:Da(z,0);break;case 2:B=za(z);if(null==m){z.u(19);break}return E(z,
|
|
1181
|
+
lz(m),19);case 19:throw n||B;}})}
|
|
1182
|
+
function jz(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,w,v,A,y;return O(function(B){switch(B.g){case 1:l={};m=0;n=function(z,C){var D,K,G,J,I,F,M;return O(function(N){if(1==N.g){D={};K=t(z);for(G=K.next();!G.done;D={Ub:D.Ub},G=K.next())D.Ub=G.value,J=Tx(D.Ub,f),I=D.Ub.i,F=D.Ub.h,M=function(L){return function(P){var R,Q,fa;return O(function(ka){if(1==ka.g)return E(ka,g.addSegments([{data:P}]),2);R=ka.h;gz(a);Q=L.Ub.g;fa=Sx(Q);l[fa]=R[0];m+=P.byteLength;H(ka)})}}(D),Zx(e,D.Ub.groupId,J,I,F,M);return E(N,ay(e),
|
|
1183
|
+
2)}if(!C)return N.u(0);gz(a);kz(h,d,k,f);return E(N,g.updateManifest(c,d),0)})};p=!1;ta(B,2);if(!mz(h)||!p||nz(h)){B.u(4);break}return E(B,n(b.filter(function(z){return z.h}),!0),5);case 5:return gz(a),b=b.filter(function(z){return!z.h}),q=l,u=m,l={},m=0,E(B,oz(g,c,d,q,u,function(){return gz(a)}),6);case 6:gz(a);case 4:if(p){B.u(7);break}return E(B,n(b,!1),8);case 8:return gz(a),w=l,v=m,l={},m=0,E(B,oz(g,c,d,w,v,function(){return gz(a)}),9);case 9:gz(a);case 7:va(B,0);break;case 2:return A=za(B),
|
|
1184
|
+
y=Object.values(l),E(B,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function lz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new my,E(f,b.init(),2);case 2:return E(f,oy(b),3);case 3:return c=f.h,d=new Fy("manifest",c.path.kb,c.path.Ha,a),E(f,b.destroy(),4);case 4:return e=new az,E(f,e.remove(d.toString()),0)}})}
|
|
1185
|
+
function oz(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v;return O(function(A){switch(A.g){case 1:g=!1;ta(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
|
|
1186
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();va(A,0);break;case 2:return w=za(A),E(A,lz(b),5);case 5:if(g){A.u(6);break}v=Object.values(d);return E(A,a.removeSegments(v,function(){}),6);case 6:throw w;}})}
|
|
1187
|
+
function hz(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,B,z,C,D,K,G,J,I,F,M,N,L;return O(function(P){switch(P.g){case 1:return d={width:Infinity,height:Infinity},Pe(a,c.restrictions,d),E(P,Te(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ne(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(jf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,e.push(kf(q));
|
|
1188
|
+
u=t(a.imageStreams);for(w=u.next();!w.done;w=u.next())v=w.value,e.push(lf(v));return E(P,c.offline.trackSelectionCallback(e),3);case 3:A=P.h;y=a.presentationTimeline.getDuration();B=0;z=t(A);for(C=z.next();!C.done;C=z.next())D=C.value,K=D.bandwidth*y/8,B+=K;ta(P,4);return E(P,c.offline.downloadSizeCallback(B),6);case 6:G=P.h;if(!G)throw new T(2,9,9014);va(P,5);break;case 4:J=za(P);if(J instanceof T)throw J;throw new T(2,9,9015);case 5:I=new Set;F=new Set;M=new Set;N=t(A);for(C=N.next();!C.done;C=
|
|
1189
|
+
N.next())L=C.value,"variant"==L.type&&I.add(L.id),"text"==L.type&&F.add(L.id),"image"==L.type&&M.add(L.id);a.variants=a.variants.filter(function(R){return I.has(R.id)});a.textStreams=a.textStreams.filter(function(R){return F.has(R.id)});a.imageStreams=a.imageStreams.filter(function(R){return M.has(R.id)});pz(a);H(P)}})}
|
|
1190
|
+
function iz(a,b,c,d,e,f){var g=Uy(c,b,d),h=e.offline.progressCallback;Yx(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Rh(a,"cenc",q)});var k=mz(b)&&!nz(b),l=null;k&&(l=qz.get(a.g.keySystem));for(var m=new Xy,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Zy(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Yy(m,n.value);m=rz(f,m,b,e);f=m.streams;m=m.Yf;p=a.g;n=e.offline.usePersistentLicense;
|
|
1191
|
+
p&&n&&(p.initData=[]);return{ji:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.md(),streams:f,sessionIds:n?$h(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Yf:m}}function mz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1192
|
+
function nz(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 kz(a,b,c,d){b.expiration=c.md();c=$h(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(mz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}r.remove=function(a){return sz(this,tz(this,a))};
|
|
1193
|
+
function tz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:ez();c=Gy(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new my;ua(k,2);return E(k,e.init(),4);case 4:return E(k,qy(e,d.kb(),d.Ha()),5);case 5:return f=k.h,E(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],E(k,Promise.all([uz(a,h,e),vz(f,d,h)]),2);case 2:return Aa(k),E(k,e.destroy(),8);case 8:Da(k,0)}})}
|
|
1194
|
+
function wz(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Xd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function uz(a,b,c){return O(function(d){return E(d,xz(a.g,a.h.drm,c,b),0)})}
|
|
1195
|
+
function vz(a,b,c){function d(){}var e=yz(c);Wy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Bi=function(){return sz(this,zz(this))};
|
|
1196
|
+
function zz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return ez(),b=a.g,c=a.h.drm,d=new my,e=!1,ua(n,2),E(n,d.init(),4);case 4:f=[],ry(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return E(n,k.getAll(),8);case 8:return l=n.h,E(n,Ry(c,b,l),9);case 9:return m=n.h,E(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return Aa(n),E(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})}
|
|
1197
|
+
r.list=function(){return sz(this,Az())};function Az(){var a,b,c;return O(function(d){switch(d.g){case 1:return ez(),a=[],b=new my,ua(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),py(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Wy(new Fy("manifest",e.kb,e.Ha,l),k);a.push(k)});H(h)})})}),E(d,c,2);case 2:return Aa(d),E(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})}
|
|
1198
|
+
function fz(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
|
|
1199
|
+
c.configure(d.manifest),gz(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,gz(a),k=Bz(h),E(l,Promise.all(Cg(k,function(m){return m.createSegmentIndex()})),3);gz(a);if(e)throw e;return l.return(h)})}r.vc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Bh({Db:d.g,onError:b,re:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Gh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Th(e),3):f.return(e)})};
|
|
1200
|
+
function rz(a,b,c,d){var e=new Map,f=Bz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Cz(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()),Yf:Array.from(e.values())}}
|
|
1201
|
+
function Cz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1202
|
+
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;Dz(d,c.presentationTimeline.jb(),function(l){var m=Sx(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=$y(b,d.id)*p;p=Vx(a.g,p);f.set(m,new Rx(l,p,k,!1))}l.ca&&(n=Sx(l.ca),f.has(n)||(p=.5*$y(b,d.id),p=Vx(a.g,p),f.set(n,new Rx(l.ca,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
1203
|
+
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function Dz(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 gz(a){if(a.l.g)throw new T(2,9,7001);}function ez(){if(!bz())throw new T(2,9,9E3);}
|
|
1204
|
+
function sz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),ua(c,2),E(c,b,4);if(2!=c.g)return c.return(c.h);Aa(c);Ob(a.i,b);return Da(c,0)})}function dz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Ob(a.i,c)})}function yz(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)}
|
|
1205
|
+
function xz(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=sy(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:wz(d,!1),videoCapabilities:wz(d,!0)}});return E(h,Ry(b,a,f),2)}return 3!=h.g?(g=h.h,E(h,e.remove(g),3)):E(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1206
|
+
function Bz(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}
|
|
1207
|
+
function pz(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",az);az.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new my,ua(b,2),E(b,ty(a),2)):5!=b.g?(Aa(b),E(b,a.destroy(),5)):Da(b,0)})};
|
|
1208
|
+
az.prototype.list=az.prototype.list;az.prototype.removeEmeSessions=az.prototype.Bi;az.prototype.remove=az.prototype.remove;az.prototype.store=az.prototype.store;az.prototype.getNetworkingEngine=az.prototype.bc;az.prototype.getConfiguration=az.prototype.getConfiguration;az.prototype.configure=az.prototype.configure;az.prototype.destroy=az.prototype.destroy;az.support=bz;
|
|
1209
|
+
var qz=(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");pp.offline=bz;function Ez(){}function Fz(a,b){a={priority:b||0,callback:a};for(b=0;b<Gz.length;b++)if(Gz[b].priority<a.priority){Gz.splice(b,0,a);return}Gz.push(a)}S("shaka.polyfill",Ez);Ez.register=Fz;Ez.installAll=function(){for(var a=t(Gz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){ab("Error installing polyfill!",c)}}};var Gz=[];function Hz(){this.g=new Iz}function Jz(){window.AbortController||(window.AbortController=Hz,window.AbortSignal=Iz)}Hz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(Hz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Ez.AbortController=Hz;Hz.install=Jz;
|
|
1210
|
+
function Iz(){ig.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Iz,ig);da.Object.defineProperties(Iz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Fz(Jz);function Kz(){}function Lz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Mz(b.value)}function Mz(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)}})}Ez.Aria=Kz;Kz.install=Lz;Fz(Lz);function Nz(){}function Oz(){Pz()}Ez.EncryptionScheme=Nz;Nz.install=Oz;Fz(Oz,-2);function Qz(){}
|
|
1211
|
+
function Rz(){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}}),
|
|
1212
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Sz);document.addEventListener("webkitfullscreenerror",Sz);document.addEventListener("mozfullscreenchange",Sz);document.addEventListener("mozfullscreenerror",Sz);document.addEventListener("MSFullscreenChange",Sz);document.addEventListener("MSFullscreenError",Sz)}}
|
|
1213
|
+
function Sz(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)}Ez.Fullscreen=Qz;Qz.install=Rz;Fz(Rz);function Tz(){}function Uz(){var a=!0;!fd()||fd()&&nd()||fd()&&Zc("Fuchsia")||(a=!1);if(gd()||jd()||id()||cd()||$c()||Zc("PC=EOS")||kd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Vz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Wz)}
|
|
1214
|
+
function Wz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Vc(e),!f)||d&&(g=d.contentType,h=Vc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Uc())return p.return(b);if(!c){p.u(3);break}return E(p,Xz(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var q=d.contentType;fd()&&d.spatialRendering&&
|
|
1215
|
+
(q+="; spatialRendering=true");l=mb(q);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,Yz(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
|
|
1216
|
+
function Xz(a){var b,c;return O(function(d){return 1==d.g?fd()?E(d,Zz(a),3):$c()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(mb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(mb(a.contentType))})}
|
|
1217
|
+
function Yz(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},$c()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
|
|
1215
1218
|
distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=c.keySystem;n=null;ta(p,2);if(Qc.has(k+"#"+l+"#"+m)){n=Qc.get(k+"#"+l+"#"+m)||null;p.u(4);break}return E(p,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:n=p.h,Qc.set(k+"#"+l+"#"+m,n);case 4:va(p,3);break;case 2:za(p);case 3:return p.return(n)}})}
|
|
1216
|
-
function
|
|
1217
|
-
var
|
|
1218
|
-
function
|
|
1219
|
-
function
|
|
1220
|
-
function
|
|
1221
|
-
function
|
|
1222
|
-
function
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
function
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
function
|
|
1219
|
+
function Zz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(mb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in $z?(c=$z[b],d.u(2)):E(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,$z[b]=c);return d.return(c)})}Ez.MediaCapabilities=Tz;Tz.install=Uz;
|
|
1220
|
+
var Vz=null;Tz.originalMcap=Vz;var $z={};Tz.memoizedCanDisplayTypeRequests_=$z;Fz(Uz,-1);function aA(){}function bA(){var a=ld();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(cA(),dA()):15>=a&&cA():Zc("DT_STB_BCM")?(cA(),dA()):(bd()||ad()||Zc("Tizen 4"))&&eA();(window.MediaSource||window.ManagedMediaSource)&&fA();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&gA()}
|
|
1221
|
+
function cA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,La.apply(0,arguments));b.abort=function(){};return b}}function dA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1222
|
+
function fA(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ce(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ce(c)&&b(c)}}}
|
|
1223
|
+
function eA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=ke(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=ke(c)&&b(c)}}}
|
|
1224
|
+
function gA(){var a=MediaSource.isTypeSupported;cd()||(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)})}Ez.MediaSource=aA;aA.install=bA;Fz(bA);function hA(){}function iA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?jA():void 0!=window.orientation&&kA())}function jA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1225
|
+
function kA(){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 lA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}Ez.Orientation=hA;hA.install=iA;function lA(){ig.call(this);this.type="";this.angle=0}pa(lA,ig);
|
|
1226
|
+
lA.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)};
|
|
1227
|
+
lA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Fz(iA);function mA(){}var nA,oA,pA,qA,rA,sA;function tA(a,b){try{var c=new uA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function vA(a){var b=this.mediaKeys;b&&b!=a&&wA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?wA(a,this):Promise.resolve()}
|
|
1228
|
+
function xA(a){a=Bb(a.initData);if(Fb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=xd(a.subarray(4),!0);a=Ad(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Cb(a);this.dispatchEvent(b)}Ez.PatchedMediaKeysApple=mA;
|
|
1229
|
+
mA.uninstall=function(){nA&&(nA=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",oA),HTMLMediaElement.prototype.setMediaKeys=pA,window.MediaKeys=qA,window.MediaKeySystemAccess=rA,navigator.requestMediaKeySystemAccess=sA,oA=sA=pA=rA=qA=null,window.shakaMediaKeysPolyfill="")};
|
|
1230
|
+
mA.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)nA=!0,oA=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),pA=HTMLMediaElement.prototype.setMediaKeys,qA=window.MediaKeys,rA=window.MediaKeySystemAccess,sA=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=vA;window.MediaKeys=yA;window.MediaKeySystemAccess=uA;navigator.requestMediaKeySystemAccess=
|
|
1231
|
+
tA;window.shakaMediaKeysPolyfill=zA}};
|
|
1232
|
+
function uA(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,
|
|
1230
1233
|
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;}
|
|
1231
|
-
|
|
1232
|
-
function
|
|
1233
|
-
r.generateRequest=function(a,b){var c=this;this.h=new Zf;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.
|
|
1234
|
-
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:
|
|
1235
|
-
r.update=function(a){this.g=new Zf;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}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
|
|
1236
|
-
function
|
|
1237
|
-
function
|
|
1238
|
-
|
|
1239
|
-
function
|
|
1240
|
-
function
|
|
1241
|
-
function
|
|
1234
|
+
uA.prototype.createMediaKeys=function(){var a=new yA(this.keySystem);return Promise.resolve(a)};uA.prototype.getConfiguration=function(){return this.g};function yA(a){this.h=new WebKitMediaKeys(a);this.g=new hb}yA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new AA(this.h,a)};yA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1235
|
+
function wA(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",xA);try{return zk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}yA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function AA(a){ig.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hb;this.sessionId="";this.expiration=NaN;this.closed=new Zf;this.keyStatuses=new BA}pa(AA,ig);r=AA.prototype;
|
|
1236
|
+
r.generateRequest=function(a,b){var c=this;this.h=new Zf;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.dc()?"license-request":"license-renewal").set("message",Cb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(CA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1237
|
+
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:CA(c,"output-not-allowed");break;default:CA(c,"internal-error")}});CA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1238
|
+
r.update=function(a){this.g=new Zf;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}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 CA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
|
|
1239
|
+
function BA(){this.size=0;this.g=void 0}r=BA.prototype;r.dc=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var zA="apple";function DA(){}function EA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ad()||Zc("Tizen 4")||Zc("Tizen 5.0")||dd())&&(MediaKeys.prototype.setServerCertificate=FA)}function FA(){return Promise.resolve(!1)}Ez.PatchedMediaKeysCert=DA;DA.install=EA;Fz(EA);function GA(){}function HA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=IA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=JA,window.MediaKeys=KA,window.MediaKeySystemAccess=LA,window.shakaMediaKeysPolyfill=MA)}function IA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1240
|
+
function JA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ez.PatchedMediaKeysNop=GA;GA.install=HA;function KA(){throw new TypeError("Illegal constructor.");}KA.prototype.createSession=function(){};KA.prototype.setServerCertificate=function(){};KA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function LA(){this.keySystem="";throw new TypeError("Illegal constructor.");}LA.prototype.getConfiguration=function(){};
|
|
1241
|
+
LA.prototype.createMediaKeys=function(){};var MA="nop";Fz(HA,-10);function NA(){}
|
|
1242
|
+
function OA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)PA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=QA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=RA;window.MediaKeys=SA;window.MediaKeySystemAccess=TA;window.shakaMediaKeysPolyfill=UA}}
|
|
1243
|
+
function VA(a){var b=PA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function QA(a,b){try{var c=new TA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function RA(a){var b=this.mediaKeys;b&&b!=a&&WA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&WA(a,this);return Promise.resolve()}Ez.PatchedMediaKeysWebkit=NA;NA.install=OA;
|
|
1244
|
+
function TA(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),
|
|
1242
1245
|
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"]):
|
|
1243
|
-
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;}
|
|
1244
|
-
function
|
|
1245
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=
|
|
1246
|
-
|
|
1247
|
-
function
|
|
1248
|
-
function
|
|
1249
|
-
function
|
|
1250
|
-
function
|
|
1251
|
-
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=
|
|
1252
|
-
r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var
|
|
1253
|
-
function
|
|
1254
|
-
function
|
|
1255
|
-
function
|
|
1256
|
-
S("shaka.text.LrcTextParser",
|
|
1257
|
-
|
|
1258
|
-
{Wb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=hh(e,"metadata")[0])?g.children:[];h=hh(e,"style");e=hh(e,"region");k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var u=q.value;q=new Kb;var
|
|
1259
|
-
100*q.height/
|
|
1260
|
-
2,2001,"<p> can only be inside <div> in TTML");n=t(eh(d,"div"));for(p=n.next();!p.done;p=n.next())if(eh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
1261
|
-
function
|
|
1262
|
-
[];if(!A)for(var
|
|
1263
|
-
if(!B&&0<h.length)for(n=Infinity,
|
|
1264
|
-
!q.attributes.style&&(g=
|
|
1265
|
-
function
|
|
1266
|
-
g))a.backgroundColor=h;if(h=
|
|
1267
|
-
k}).join(",")}(h=
|
|
1268
|
-
e);if(d=
|
|
1246
|
+
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;}TA.prototype.createMediaKeys=function(){var a=new SA(this.g);return Promise.resolve(a)};TA.prototype.getConfiguration=function(){return this.h};function SA(a){this.l=a;this.h=null;this.g=new hb;this.i=[];this.j=new Map}
|
|
1247
|
+
function WA(a,b){a.h=b;a.g.ob();var c=PA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Cb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=XA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.dc()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=XA(a,d.sessionId))YA(d,"usable"),
|
|
1248
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=XA(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?YA(e,"output-restricted"):1==f?YA(e,"expired"):YA(e,"internal-error"))}}))}
|
|
1249
|
+
SA.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 ZA(b,this.l,a);this.i.push(a);return a};SA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};SA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1250
|
+
function XA(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 ZA(a,b,c){ig.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Zf;this.keyStatuses=new $A}pa(ZA,ig);
|
|
1251
|
+
function aB(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Bb(Ad("LOAD_SESSION|"+c));else{var e=Ad("PERSISTENT|");d=Md(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new Zf;var f=VA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Tc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
|
|
1252
|
+
function bB(a,b,c){if(a.g)a.g.then(function(){return bB(a,b,c)}).catch(function(){return bB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=wd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Hd(e.keys[0].k);e=Hd(e.keys[0].kid)}else d=Bb(c),e=null;var f=VA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1253
|
+
function YA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r=ZA.prototype;r.generateRequest=function(a,b){return aB(this,b,null)};r.load=function(a){return"persistent-license"==this.l?aB(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Zf;bB(this,b,a);return b};
|
|
1254
|
+
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=VA("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 $A(){this.size=0;this.g=void 0}r=$A.prototype;r.dc=function(){return this.g};
|
|
1255
|
+
r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var PA="",UA="webkit";Fz(OA);function cB(){}function dB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=eB,Object.defineProperty(a,"disablePictureInPicture",{get:fB,set:gB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=hB,document.addEventListener("webkitpresentationmodechanged",iB,!0))}}
|
|
1256
|
+
function iB(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)}
|
|
1257
|
+
function eB(){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 hB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1258
|
+
function fB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function gB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ez.PiPWebkit=cB;cB.install=dB;Fz(dB);function jB(){}function kB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=lB))}function lB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Ez.RandomUUID=jB;jB.install=kB;Fz(kB);function mB(){}function nB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:oB})}function oB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Ez.Symbol=mB;mB.install=nB;Fz(nB);function pB(){}function qB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Ez.VideoPlayPromise=pB;pB.install=qB;Fz(qB);function rB(){}function sB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||dd())&&(a.getVideoPlaybackQuality=tB)}}function tB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ez.VideoPlaybackQuality=rB;rB.install=sB;Fz(sB);function uB(){}function vB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=wB;else if(6==b)a=xB;else{try{var c=!!wB(1,2,"")}catch(d){c=!1}c&&(a=wB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function wB(a,b,c){return new window.TextTrackCue(a,b,c)}function xB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ez.VTTCue=uB;uB.install=vB;Fz(vB);function yB(){}yB.prototype.parseInit=function(){};yB.prototype.setSequenceMode=function(){};yB.prototype.setManifestType=function(){};yB.prototype.parseMedia=function(a,b){var c=null,d=[];a=wd(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=zB.exec(e))){var f=AB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Rb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1259
|
+
S("shaka.text.LrcTextParser",yB);yB.prototype.parseMedia=yB.prototype.parseMedia;yB.prototype.setManifestType=yB.prototype.setManifestType;yB.prototype.setSequenceMode=yB.prototype.setSequenceMode;yB.prototype.parseInit=yB.prototype.parseInit;var zB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,AB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;re["application/x-subtitle-lrc"]=function(){return new yB};function BB(){}BB.prototype.parseInit=function(){};BB.prototype.setSequenceMode=function(){};BB.prototype.setManifestType=function(){};
|
|
1260
|
+
BB.prototype.parseMedia=function(a,b,c){var d=wd(a);a=[];if(""==d)return a;var e=Zg(d,"tt");if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=hh(e,"body")[0];if(!d)return[];var f=nh(e,CB,"frameRate"),g=nh(e,CB,"subFrameRate"),h=nh(e,CB,"frameRateMultiplier"),k=nh(e,CB,"tickRate"),l=nh(e,CB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=nh(e,DB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new EB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
|
|
1261
|
+
{Wb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=hh(e,"metadata")[0])?g.children:[];h=hh(e,"style");e=hh(e,"region");k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var u=q.value;q=new Kb;var w=u.attributes["xml:id"];if(w){q.id=w;var v=null;n&&(v=FB.exec(n)||GB.exec(n));w=v?Number(v[1]):null;v=v?Number(v[2]):null;var A,y=HB(u,h,"extent");if(y){var B=(A=FB.exec(y))||GB.exec(y);null!=B&&(q.width=Number(B[1]),q.height=Number(B[2]),A||(null!=w&&(q.width=100*q.width/w),null!=v&&(q.height=
|
|
1262
|
+
100*q.height/v)),q.widthUnits=A||null!=w?Lb:0,q.heightUnits=A||null!=v?Lb:0)}if(u=HB(u,h,"origin"))if(B=(A=FB.exec(u))||GB.exec(u),null!=B)q.viewportAnchorX=Number(B[1]),q.viewportAnchorY=Number(B[2]),A?y||(q.width=100-q.viewportAnchorX,q.widthUnits=Lb,q.height=100-q.viewportAnchorY,q.heightUnits=Lb):(null!=v&&(q.viewportAnchorY=100*q.viewportAnchorY/v),null!=w&&(q.viewportAnchorX=100*q.viewportAnchorX/w)),q.viewportAnchorUnits=A||null!=w?Lb:0}else q=null;q&&k.push(q)}if(eh(d,"p").length)throw new T(2,
|
|
1263
|
+
2,2001,"<p> can only be inside <div> in TTML");n=t(eh(d,"div"));for(p=n.next();!p.done;p=n.next())if(eh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=IB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1264
|
+
function IB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(ch(a)){if(!m)return null;var q={tagName:"span",children:[fh(a)],attributes:{},parent:null}}else q=a;for(var u=null,w=t(JB),v=w.next();!v.done&&!(u=KB(q,"backgroundImage",d,"#",v.value)[0]);v=w.next());w=null;var A=nh(q,JB,"backgroundImage");n&&A&&!A.startsWith("#")&&(v=new sc(n),A=new sc(A),(v=v.resolve(A).toString())&&(w=v));if("p"==a.tagName||u||w)m=!0;a=m;v="default"==(q.attributes["xml:space"]||(h?"default":"preserve"));A=q.children.every(ch);h=
|
|
1265
|
+
[];if(!A)for(var y=t(q.children),B=y.next();!B.done;B=y.next())(B=IB(B.value,b,c,d,e,f,g,v,k,q,m,n))&&h.push(B);d=null!=l;n=fh(q);n=q.children.length&&n&&/\S/.test(n);B=q.attributes.begin||q.attributes.end||q.attributes.dur;if(!(B||n||"br"==q.tagName||0!=h.length||d&&!v))return null;y=LB(q,c);n=y.start;for(y=y.end;p&&p.tagName&&"tt"!=p.tagName;)y=MB(p,c,n,y),n=y.start,y=y.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);
|
|
1266
|
+
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"==q.tagName)return e=new Rb(n,y,""),e.lineBreak=!0,e;b="";A&&(b=Dd(fh(q)||""),v&&(b=b.replace(/\s+/g," ")));b=new Rb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=KB(q,"region",f,"")[0];if(q.attributes.region&&k&&k.attributes["xml:id"]){var z=k.attributes["xml:id"];b.region=g.filter(function(C){return C.id==z})[0]}g=k;l&&d&&!q.attributes.region&&
|
|
1267
|
+
!q.attributes.style&&(g=KB(l,"region",f,"")[0]);NB(b,q,g,u,w,e,a,0==h.length);return b}
|
|
1268
|
+
function NB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==OB(b,c,f,"direction",g)&&(a.direction="rtl");h=OB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Ub);(h=OB(b,c,f,"textAlign",!0))?(a.positionAlign=PB[h],a.lineAlign=QB[h],a.textAlign=cc[h.toUpperCase()]):a.textAlign=Tb;if(h=OB(b,c,f,"displayAlign",!0))a.displayAlign=dc[h.toUpperCase()];if(h=OB(b,c,f,"color",g))a.color=h;if(h=OB(b,c,f,"backgroundColor",
|
|
1269
|
+
g))a.backgroundColor=h;if(h=OB(b,c,f,"border",g))a.border=h;if(h=OB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
|
|
1270
|
+
k}).join(",")}(h=OB(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=OB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=OB(b,c,f,"lineHeight",g))&&h.match(RB)&&(a.lineHeight=h);(h=OB(b,c,f,"fontSize",g))&&(h.match(RB)||h.match(SB))&&(a.fontSize=h);if(h=OB(b,c,f,"fontStyle",g))a.fontStyle=hc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=fh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
|
|
1271
|
+
e);if(d=OB(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(RB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(RB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=OB(b,c,f,"letterSpacing",g))&&d.match(RB)&&(a.letterSpacing=d);(d=OB(b,c,f,"linePadding",g))&&d.match(RB)&&(a.linePadding=d);if(d=OB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=HB(c,f,"textDecoration"))&&TB(a,d);(d=UB(b,f,"textDecoration"))&&TB(a,d);if(d=OB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(OB(b,
|
|
1269
1272
|
c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
1270
|
-
function
|
|
1271
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ob(a.textDecoration,"overline")}}function
|
|
1272
|
-
function
|
|
1273
|
-
function
|
|
1274
|
-
function
|
|
1275
|
-
function
|
|
1276
|
-
function
|
|
1277
|
-
var
|
|
1278
|
-
end:"end"},
|
|
1279
|
-
|
|
1280
|
-
re['application/mp4; codecs="stpp.ttml"']=function(){return new
|
|
1281
|
-
|
|
1282
|
-
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new
|
|
1283
|
-
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");
|
|
1273
|
+
function TB(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Ob(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Ob(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1274
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ob(a.textDecoration,"overline")}}function OB(a,b,c,d,e){e=void 0===e?!0:e;return(a=UB(a,c,d))?a:e?HB(b,c,d):null}function HB(a,b,c){if(!a)return null;var d=nh(a,DB,c);return d?d:VB(a,b,c)}function UB(a,b,c){var d=nh(a,DB,c);return d?d:VB(a,b,c)}
|
|
1275
|
+
function VB(a,b,c){a=KB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=mh(a[e],"urn:ebu:tt:style",c);f||(f=nh(a[e],DB,c));f||(f=UB(a[e],b,c));f&&(d=f)}return d}function KB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?mh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1276
|
+
function MB(a,b,c,d){a=LB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function LB(a,b){var c=WB(a.attributes.begin,b),d=WB(a.attributes.end,b);a=WB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1277
|
+
function WB(a,b){var c=null;if(XB.test(a)){a=XB.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(YB.test(a))c=ZB(YB,a);else if($B.test(a))c=ZB($B,a);else if(aC.test(a))a=aC.exec(a),c=Number(a[1])/b.frameRate;else if(bC.test(a))a=bC.exec(a),c=Number(a[1])/b.g;else if(cC.test(a))c=ZB(cC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1278
|
+
function ZB(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)}S("shaka.text.TtmlTextParser",BB);BB.prototype.parseMedia=BB.prototype.parseMedia;BB.prototype.setManifestType=BB.prototype.setManifestType;BB.prototype.setSequenceMode=BB.prototype.setSequenceMode;BB.prototype.parseInit=BB.prototype.parseInit;
|
|
1279
|
+
function EB(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]))}
|
|
1280
|
+
var FB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,SB=/^(\d{1,4}(?:\.\d+)?|100)%$/,RB=/^(\d+px|\d+em|\d*\.?\d+c)$/,GB=/^(\d+)px (\d+)px$/,XB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,YB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,$B=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,aC=/^(\d*(?:\.\d*)?)f$/,bC=/^(\d*(?:\.\d*)?)t$/,cC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),QB={left:Xb,center:"center",right:"end",start:Xb,
|
|
1281
|
+
end:"end"},PB={left:"line-left",center:"center",right:"line-right"},CB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],DB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],JB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];re["application/ttml+xml"]=function(){return new BB};function dC(){this.g=new BB}dC.prototype.parseInit=function(a){var b=!1;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};dC.prototype.setSequenceMode=function(){};dC.prototype.setManifestType=function(){};
|
|
1282
|
+
dC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Jg).box("mdat",Vg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",dC);dC.prototype.parseMedia=dC.prototype.parseMedia;dC.prototype.setManifestType=dC.prototype.setManifestType;dC.prototype.setSequenceMode=dC.prototype.setSequenceMode;dC.prototype.parseInit=dC.prototype.parseInit;re['application/mp4; codecs="stpp"']=function(){return new dC};
|
|
1283
|
+
re['application/mp4; codecs="stpp.ttml"']=function(){return new dC};re['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new dC};re['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new dC};re['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new dC};re['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new dC};re['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new dC};re['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new dC};function eC(){this.h=!1;this.g="UNKNOWN"}eC.prototype.parseInit=function(){};eC.prototype.setSequenceMode=function(a){this.h=a};eC.prototype.setManifestType=function(a){this.g=a};
|
|
1284
|
+
eC.prototype.parseMedia=function(a,b){a=wd(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=fC(new Ap(a[1]));if(null==a)throw new T(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
|
|
1285
|
+
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Ap(e);var f=new Kb;Dp(e);Bp(e);for(var g=Dp(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
|
|
1286
|
+
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Bp(e);g=Dp(e)}b.push(f)}d=new Map;gC(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=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=
|
|
1284
1287
|
l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Rb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var q=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=q;break;case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==q)m=!0,l.fontWeight=
|
|
1285
1288
|
700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=$b;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-combine-upright":m=!0;l.textCombineUpright=q;break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&d.set(g,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,
|
|
1286
|
-
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new
|
|
1287
|
-
function
|
|
1288
|
-
function
|
|
1289
|
-
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=
|
|
1290
|
-
m.next())
|
|
1291
|
-
function
|
|
1292
|
-
|
|
1293
|
-
if(!f)break;if(f=
|
|
1294
|
-
function
|
|
1295
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sb);else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
1296
|
-
function
|
|
1297
|
-
re["text/vtt"]=function(){return new
|
|
1298
|
-
|
|
1299
|
-
p.value;var q=p.Lf||l,u=p.xe?c+p.xe:a;a=u+(q||0);var
|
|
1300
|
-
function
|
|
1301
|
-
function
|
|
1302
|
-
function
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;a={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;a={Ge:a.Ge},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
1306
|
-
l.Ge}}(a)))&&
|
|
1307
|
-
function
|
|
1289
|
+
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Ap(f[0]),k=fC(g),n=Cp(g,/[ \t]+--\x3e[ \t]+/g),l=fC(g),null==k||null==n||null==l)ab("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Rb(k,l,"");Bp(g);for(k=Dp(g);k;)hC(m,k,b),Bp(g),k=Dp(g);iC(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
|
|
1290
|
+
function gC(a){for(var b=t(Object.entries(fc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Rb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(gc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Rb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1291
|
+
function iC(a,b,c){if(a.includes("<")){0===c.size&&gC(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(jC)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
|
|
1292
|
+
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=kC(a);try{var m=Zg("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
|
|
1293
|
+
m.next())lC(a.value,b,c);else b.payload=Dd(a);else b.payload=Dd(a)}else b.payload=Dd(a)}function kC(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function mC(a,b){return a&&0<a.length?a:b}
|
|
1294
|
+
function lC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Kb;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=mC(g.backgroundColor,d.backgroundColor),d.color=mC(g.color,d.color),d.fontFamily=mC(g.fontFamily,d.fontFamily),d.fontSize=
|
|
1295
|
+
mC(g.fontSize,d.fontSize),d.textShadow=mC(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=ac(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
|
|
1296
|
+
if(!f)break;if(f=fC(new Ap(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(ch(a)||1==e.length&&ch(e[0]))for(c=fh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ac(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())lC(a.value,d,c)}
|
|
1297
|
+
function hC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Tb:a.textAlign=cc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1298
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sb);else if(d=/^region:(.*)$/.exec(b)){if(b=nC(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=ec[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=ec[c[2].toUpperCase()])}
|
|
1299
|
+
function nC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function fC(a){a=Cp(a,jC);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.VttTextParser",eC);eC.prototype.parseMedia=eC.prototype.parseMedia;eC.prototype.setManifestType=eC.prototype.setManifestType;eC.prototype.setSequenceMode=eC.prototype.setSequenceMode;eC.prototype.parseInit=eC.prototype.parseInit;var jC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1300
|
+
re["text/vtt"]=function(){return new eC};re['text/vtt; codecs="vtt"']=function(){return new eC};re['text/vtt; codecs="wvtt"']=function(){return new eC};function oC(){this.g=null}oC.prototype.parseInit=function(a){var b=this,c=!1;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).P("mdhd",function(d){d=Wi(d.reader,d.version);b.g=d.timescale}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};oC.prototype.setSequenceMode=function(){};oC.prototype.setManifestType=function(){};
|
|
1301
|
+
oC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Jg).box("moof",Qg).box("traf",Qg).P("tfdt",function(B){g=!0;c=Vi(B.reader,B.version).baseMediaDecodeTime}).P("tfhd",function(B){l=Ui(B.reader,B.flags).gd}).P("trun",function(B){h=!0;d=Xi(B.reader,B.version,B.flags).Mg}).box("mdat",Vg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Gg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1302
|
+
p.value;var q=p.Lf||l,u=p.xe?c+p.xe:a;a=u+(q||0);var w=0;do{var v=m.O();w+=v;var A=m.O(),y=null;"vttc"==Pg(A)?8<v&&(y=m.nb(v-8)):m.skip(v-8);q&&y&&(v=pC(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(v))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(ze)};function pC(a,b,c){var d,e,f;(new Jg).box("payl",Vg(function(g){d=wd(g)})).box("iden",Vg(function(g){e=wd(g)})).box("sttg",Vg(function(g){f=wd(g)})).parse(a);return d?qC(d,e,f,b,c):null}
|
|
1303
|
+
function qC(a,b,c,d,e){d=new Rb(d,e,"");iC(a,d,new Map);b&&(d.id=b);if(c)for(a=new Ap(c),b=Dp(a);b;)hC(d,b,[]),Bp(a),b=Dp(a);return d}S("shaka.text.Mp4VttParser",oC);oC.prototype.parseMedia=oC.prototype.parseMedia;oC.prototype.setManifestType=oC.prototype.setManifestType;oC.prototype.setSequenceMode=oC.prototype.setSequenceMode;oC.prototype.parseInit=oC.prototype.parseInit;re['application/mp4; codecs="wvtt"']=function(){return new oC};function rC(){}rC.prototype.parseInit=function(){};rC.prototype.setSequenceMode=function(){};rC.prototype.setManifestType=function(){};rC.prototype.parseMedia=function(a){var b=wd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Ap(c[0]),e=sC(d),f=Cp(d,/,/g);d=sC(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Rb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1304
|
+
function sC(a){a=Cp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.SbvTextParser",rC);rC.prototype.parseMedia=rC.prototype.parseMedia;rC.prototype.setManifestType=rC.prototype.setManifestType;rC.prototype.setSequenceMode=rC.prototype.setSequenceMode;rC.prototype.parseInit=rC.prototype.parseInit;re["text/x-subviewer"]=function(){return new rC};function tC(){this.g=new eC}tC.prototype.parseInit=function(){};tC.prototype.setSequenceMode=function(){};tC.prototype.setManifestType=function(){};tC.prototype.parseMedia=function(a,b,c){a=wd(a);a=uC(a);a=Bb(Ad(a));return this.g.parseMedia(a,b,c)};
|
|
1305
|
+
function uC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",tC);tC.srt2webvtt=uC;tC.prototype.parseMedia=tC.prototype.parseMedia;
|
|
1306
|
+
tC.prototype.setManifestType=tC.prototype.setManifestType;tC.prototype.setSequenceMode=tC.prototype.setSequenceMode;tC.prototype.parseInit=tC.prototype.parseInit;re["text/srt"]=function(){return new tC};function vC(){}vC.prototype.parseInit=function(){};vC.prototype.setSequenceMode=function(){};vC.prototype.setManifestType=function(){};
|
|
1307
|
+
vC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=wd(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=wC.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(f=b.next();!f.done;f=b.next())if(a=f.value,!/^\s*;/.test(a)&&(f=xC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(yC);else if("Style"==a){a=f.split(yC);f={};for(var g=0;g<e.length&&
|
|
1308
|
+
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;a={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;a={Ge:a.Ge},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=xC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(yC);else if("Dialogue"==f){g=g.split(yC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=zC(f.Start);var k=zC(f.End);g=new Rb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Ge=f.Style;(f=d.find(function(l){return function(m){return m.Name==
|
|
1309
|
+
l.Ge}}(a)))&&AC(g,f);e.push(g)}return e};
|
|
1310
|
+
function AC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=BC(c))a.color=c;if(c=b.BackColour)if(c=BC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Yb;a.textAlign="start";break;case 2:a.displayAlign=Yb;a.textAlign=Tb;break;case 3:a.displayAlign=Yb;a.textAlign="end";
|
|
1308
1311
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Tb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Tb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1309
|
-
function
|
|
1310
|
-
var
|
|
1311
|
-
function
|
|
1312
|
-
function
|
|
1313
|
-
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
|
|
1314
|
-
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Ti(e),g=f.length;g<e.length&&!
|
|
1315
|
-
k.ce,g+l),size:k.Y,duration:1024,$a:0,flags:{cb:0,
|
|
1316
|
-
S("shaka.transmuxer.AacTransmuxer",
|
|
1312
|
+
function BC(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 zC(a){a=CC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",vC);vC.prototype.parseMedia=vC.prototype.parseMedia;vC.prototype.setManifestType=vC.prototype.setManifestType;vC.prototype.setSequenceMode=vC.prototype.setSequenceMode;vC.prototype.parseInit=vC.prototype.parseInit;
|
|
1313
|
+
var wC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,xC=/^\s*([^:]+):\s*(.*)/,yC=/\s*,\s*/,CC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;re["text/x-ssa"]=function(){return new vC};function DC(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)?{ce:c,Y:a}:null}function EC(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,La:"mp4a.40."+e}}
|
|
1314
|
+
function FC(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}
|
|
1315
|
+
function GC(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,
|
|
1316
|
+
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 HC(a){this.i=a;this.h=0;this.g=new Map}r=HC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(ne(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1317
|
+
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Ti(e),g=f.length;g<e.length&&!FC(e,g);g++);a=1E3*c.endTime;f=Si(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=EC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=DC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.ce+k.Y;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1318
|
+
k.ce,g+l),size:k.Y,duration:1024,$a:0,flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:2,eb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.La,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ya:[],ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.h,baseMediaDecodeTime:a,Va:h},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=$w(d),this.g.set(c,b));c=qx(d);this.h++;b=Md(b,c);return Promise.resolve(b)};
|
|
1319
|
+
S("shaka.transmuxer.AacTransmuxer",HC);HC.prototype.transmux=HC.prototype.transmux;HC.prototype.getOriginalMimeType=HC.prototype.getOriginalMimeType;HC.prototype.convertCodecs=HC.prototype.convertCodecs;HC.prototype.isSupported=HC.prototype.isSupported;HC.prototype.destroy=HC.prototype.destroy;kc("audio/aac",function(){return new HC("audio/aac")},qc);function IC(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,
|
|
1317
1320
|
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,ja:a,Y:e}}
|
|
1318
|
-
function
|
|
1319
|
-
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Ti(a),f=e.length;f<a.length&&!
|
|
1320
|
-
$a:0,flags:{cb:0,
|
|
1321
|
-
|
|
1322
|
-
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Ti(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Si(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=
|
|
1323
|
-
duration:1536,$a:0,flags:{cb:0,
|
|
1324
|
-
|
|
1321
|
+
function JC(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 KC(a){this.i=a;this.h=0;this.g=new Map}r=KC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?mb(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};
|
|
1322
|
+
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Ti(a),f=e.length;f<a.length&&!JC(a,f);f++);var g=1E3*c.endTime;e=Si(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=IC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ja;k.push({data:a.subarray(f,f+l.Y),size:l.Y,duration:1536,
|
|
1323
|
+
$a:0,flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:2,eb:0}});f+=l.Y}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ya:[],ja:h,ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.h,baseMediaDecodeTime:a,Va:k},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=$w(d),this.g.set(c,b));c=qx(d);this.h++;b=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",KC);KC.prototype.transmux=KC.prototype.transmux;
|
|
1324
|
+
KC.prototype.getOriginalMimeType=KC.prototype.getOriginalMimeType;KC.prototype.convertCodecs=KC.prototype.convertCodecs;KC.prototype.isSupported=KC.prototype.isSupported;KC.prototype.destroy=KC.prototype.destroy;kc("audio/ac3",function(){return new KC("audio/ac3")},qc);function LC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new cj(a.subarray(b+2));ej(c,2);ej(c,3);var d=fj(c,11)+1<<1,e=fj(c,2);if(3==e){e=fj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=fj(c,2);var g=fj(c,3),h=fj(c,1);c=fj(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,ja:a,Y:d}};function MC(a){this.i=a;this.h=0;this.g=new Map}r=MC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?mb(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};
|
|
1325
|
+
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Ti(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Si(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=LC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ja;k.push({data:a.subarray(f,f+l.Y),size:l.Y,
|
|
1326
|
+
duration:1536,$a:0,flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:2,eb:0}});f+=l.Y}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ya:[],ja:h,ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.h,baseMediaDecodeTime:a,Va:k},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=$w(d),this.g.set(c,b));c=qx(d);this.h++;b=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",MC);MC.prototype.transmux=MC.prototype.transmux;
|
|
1327
|
+
MC.prototype.getOriginalMimeType=MC.prototype.getOriginalMimeType;MC.prototype.convertCodecs=MC.prototype.convertCodecs;MC.prototype.isSupported=MC.prototype.isSupported;MC.prototype.destroy=MC.prototype.destroy;kc("audio/ec3",function(){return new MC("audio/ec3")},qc);function NC(a){if(!a.length)return null;var b=a.find(function(w){return 7==w.type});a=a.find(function(w){return 8==w.type});if(!b||!a)return null;var c=new cj(b.data),d=jj(c);jj(c);jj(c);hj(c);if(OC.includes(d)&&(d=V(c),3===d&&ej(c,1),hj(c),hj(c),ej(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?kj(c,16):kj(c,64))}hj(c);d=V(c);if(0===d)V(c);else if(1===d)for(ej(c,1),hj(c),hj(c),d=V(c),e=0;e<d;e++)hj(c);hj(c);ej(c,1);var f=V(c),g=V(c),h=fj(c,1);0===h&&ej(c,1);ej(c,1);var k=0,l=0,m=0,n=0;W(c)&&
|
|
1325
1328
|
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=jj(c),q=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=q[p-1],e=u[p-1]):255===p&&(d=fj(c,16),e=fj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
|
|
1326
1329
|
225].concat(k,[1],b));return{height:c,width:f,ua:a,Aa:d,Ba:e}}
|
|
1327
|
-
function
|
|
1328
|
-
{data:Md.apply(Ed,x(c)),
|
|
1329
|
-
ua:b,Aa:a.Hi,Ba:a.Gi}}function
|
|
1330
|
-
function
|
|
1331
|
-
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(I=0;4>I;I++)for(var
|
|
1332
|
-
1)}I=J=1;
|
|
1333
|
-
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var
|
|
1334
|
-
function
|
|
1335
|
-
function
|
|
1336
|
-
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
|
|
1337
|
-
function
|
|
1338
|
-
var
|
|
1339
|
-
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Ti(e).length;f<e.length&&!
|
|
1340
|
-
duration:d,Ya:[],ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.h,baseMediaDecodeTime:
|
|
1341
|
-
|
|
1342
|
-
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new mj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.
|
|
1343
|
-
|
|
1330
|
+
function PC(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=lj(new cj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
|
|
1331
|
+
{data:Md.apply(Ed,x(c)),ud:b}:null}var OC=[100,110,122,244,44,83,86,118,128,138,139,134];function QC(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=RC(b.fullData);a=SC(c.fullData);var f=TC(d.fullData);b=UC(b.fullData,c.fullData,d.fullData,{Af:e.Af,Xf:e.Xf,ff:a.ff,gf:a.gf,$e:a.$e,ef:a.ef,af:a.af,bf:a.bf,cf:a.cf,df:a.df,Ue:a.Ue,Ve:a.Ve,We:a.We,Xe:a.Xe,Ye:a.Ye,Ze:a.Ze,Re:a.Re,me:a.me,Pe:a.Pe,Oe:a.Oe,Ne:a.Ne,Df:f.Df});return{height:a.height,width:a.width,
|
|
1332
|
+
ua:b,Aa:a.Hi,Ba:a.Gi}}function RC(a){var b=new cj(a,!0);jj(b);jj(b);fj(b,4);fj(b,2);fj(b,6);a=fj(b,3);b=W(b);return{Af:a+1,Xf:b}}
|
|
1333
|
+
function SC(a){a=new cj(a,!0);jj(a);jj(a);var b=0,c=0,d=0,e=0;fj(a,4);var f=fj(a,3);W(a);for(var g=fj(a,2),h=fj(a,1),k=fj(a,5),l=jj(a),m=jj(a),n=jj(a),p=jj(a),q=jj(a),u=jj(a),w=jj(a),v=jj(a),A=jj(a),y=jj(a),B=jj(a),z=[],C=[],D=0;D<f;D++)z.push(W(a)),C.push(W(a));if(0<f)for(D=f;8>D;D++)fj(a,2);for(D=0;D<f;D++)z[D]&&fj(a,88),C[D]&&jj(a);V(a);z=V(a);3==z&&fj(a,1);C=V(a);D=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var K=V(a),G=V(a),J=V(a);if(W(a))for(var I=0;I<=f;I++)V(a),V(a),V(a);else V(a),V(a),
|
|
1334
|
+
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(I=0;4>I;I++)for(var F=0;F<(3===I?2:6);F++)if(W(a)){var M=Math.min(64,1<<4+(I<<1));1<I&&ij(a);for(var N=0;N<M;N++)ij(a)}else V(a);W(a);W(a);W(a)&&(jj(a),V(a),V(a),W(a));I=V(a);for(M=F=0;M<I;M++)if(N=!1,0!==M&&(N=W(a)),N){M===I&&V(a);W(a);V(a);for(var L=N=0;L<=F;L++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&N++}F=N}else{L=V(a);N=V(a);F=L+N;for(P=0;P<L;P++)V(a),W(a);for(L=0;L<N;L++)V(a),W(a)}if(W(a))for(I=V(a),F=0;F<I;F++){for(M=0;M<J+4;M++)fj(a,1);fj(a,
|
|
1335
|
+
1)}I=J=1;F=0;W(a);W(a);if(W(a)){W(a)&&(M=jj(a),N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(J=N[M-1],I=L[M-1]):255===M&&(J=fj(a,16),I=fj(a,16)));W(a)&&W(a);W(a)&&(fj(a,3),W(a),W(a)&&(jj(a),jj(a),jj(a)));W(a)&&(V(a),V(a));W(a);W(a);W(a);if(M=W(a))V(a),V(a),V(a),V(a);if(W(a)&&(fj(a,32),fj(a,32),W(a)&&V(a),W(a))){L=!1;M=W(a);N=W(a);if(M||N){if(L=W(a))jj(a),fj(a,5),W(a),fj(a,5);fj(a,4);fj(a,4);L&&fj(a,4);fj(a,5);fj(a,5);fj(a,5)}for(P=0;P<=
|
|
1336
|
+
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var fa=!1;Q?V(a):fa=W(a);fa||(R=V(a)+1);if(M){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}if(N){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),F=V(a),V(a),V(a),V(a),V(a))}return{$e:B,ff:g,gf:h,ef:k,af:l,bf:m,cf:n,df:p,Ue:q,Ve:u,We:w,Xe:v,Ye:A,Ze:y,me:F,Re:0,Pe:z,Oe:K,Ne:G,width:C-(b+c)*(1===z||2===z?2:1),height:D-(d+e)*(1===z?2:1),Hi:J,Gi:I}}
|
|
1337
|
+
function TC(a){var b=new cj(a,!0);jj(b);jj(b);V(b);V(b);W(b);W(b);fj(b,3);W(b);W(b);V(b);V(b);ij(b);W(b);W(b);W(b)&&V(b);ij(b);ij(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Df:c}}
|
|
1338
|
+
function UC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ff&3)<<6|(d.gf?1:0)<<5|d.ef&31;e[2]=d.af;e[3]=d.bf;e[4]=d.cf;e[5]=d.df;e[6]=d.Ue;e[7]=d.Ve;e[8]=d.We;e[9]=d.Xe;e[10]=d.Ye;e[11]=d.Ze;e[12]=d.$e;e[13]=240|(d.me&3840)>>8;e[14]=d.me&255;e[15]=252|d.Df&3;e[16]=252|d.Pe&3;e[17]=248|d.Oe&7;e[18]=248|d.Ne&7;e[19]=0;e[20]=0;e[21]=(d.Re&3)<<6|(d.Af&7)<<3|(d.Xf?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&
|
|
1339
|
+
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 VC(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*WC[14*(3===c?3-d:3===d?3:4)+e-1];f=XC[3*(3===c?0:2===c?1:2)+f];c=YC[c][d];var h=ZC[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,Y:k,Fi:8*c*h}}return null}
|
|
1340
|
+
function $C(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function aD(a,b){if(b+1<a.length&&$C(a,b)){var c=VC(a,b),d=4;c&&c.Y&&(d=c.Y);b+=d;return b===a.length||b+1<a.length&&$C(a,b)}return!1}
|
|
1341
|
+
var WC=[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],XC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],YC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ZC=[0,1,1,4];function bD(a){this.i=a;this.h=0;this.g=new Map}r=bD.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?mb(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};
|
|
1342
|
+
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Ti(e).length;f<e.length&&!aD(e,f);f++);var g;for(a=[];f<e.length;){var h=VC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.Y<=e.length&&a.push({data:e.subarray(f,f+h.Y),size:h.Y,duration:1152,$a:0,flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:2,eb:0}});f+=h.Y}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Fi/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1343
|
+
duration:d,Ya:[],ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.h,baseMediaDecodeTime:e,Va:a},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=$w(d),this.g.set(c,b));c=qx(d);this.h++;b=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",bD);bD.prototype.transmux=bD.prototype.transmux;bD.prototype.getOriginalMimeType=bD.prototype.getOriginalMimeType;bD.prototype.convertCodecs=bD.prototype.convertCodecs;bD.prototype.isSupported=bD.prototype.isSupported;
|
|
1344
|
+
bD.prototype.destroy=bD.prototype.destroy;kc("audio/mpeg",function(){return new bD("audio/mpeg")},qc);function cD(a){this.h=a;this.g=null}r=cD.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=ne(a).split(","),c=Rd("audio",b);b=Rd("video",b);return!c||b||"mp3"!=de(c)?!1:mb(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};
|
|
1345
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new mj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.ld().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Lb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=VC(a,b))?(b+d.Y<=a.length&&(c=Md(c,a.subarray(b,b+d.Y))),b+=d.Y):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",cD);cD.prototype.transmux=cD.prototype.transmux;
|
|
1346
|
+
cD.prototype.getOriginalMimeType=cD.prototype.getOriginalMimeType;cD.prototype.convertCodecs=cD.prototype.convertCodecs;cD.prototype.isSupported=cD.prototype.isSupported;cD.prototype.destroy=cD.prototype.destroy;kc("video/mp2t",function(){return new cD("video/mp2t")},pc);/*
|
|
1344
1347
|
@license
|
|
1345
1348
|
MSS Transmuxer
|
|
1346
1349
|
Copyright 2015 Dash Industry Forum
|
|
1347
1350
|
SPDX-License-Identifier: BSD-3-Clause
|
|
1348
1351
|
*/
|
|
1349
|
-
function
|
|
1350
|
-
function
|
|
1352
|
+
function dD(a){this.h=a;(this.g=ev.get("ISOBoxer")())&&eD(this)}
|
|
1353
|
+
function eD(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",
|
|
1351
1354
|
"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",
|
|
1352
|
-
"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]!==
|
|
1355
|
+
"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]!==fD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=dD.prototype;r.destroy=function(){};
|
|
1353
1356
|
r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
|
|
1354
1357
|
r.transmux=function(a,b,c){if(!c)return Promise.resolve(Bb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.M()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1355
1358
|
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var q=this.g.createFullBox("saiz",h);q.version=0;q.flags=0;q.sample_count=n.sample_count;q.default_sample_info_size=0;q.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)q.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else q.default_sample_info_size=
|
|
1356
|
-
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var
|
|
1357
|
-
|
|
1358
|
-
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=ne(c).split(",");c=Rd("audio",d);d=Rd("video",d);if(c&&(c=de(c),!
|
|
1359
|
+
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=gD(u,"traf")+gD(h,"senc")+16);var v=Bb(e.write());return Promise.resolve(v)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function gD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",dD);dD.prototype.transmux=dD.prototype.transmux;
|
|
1360
|
+
dD.prototype.getOriginalMimeType=dD.prototype.getOriginalMimeType;dD.prototype.convertCodecs=dD.prototype.convertCodecs;dD.prototype.isSupported=dD.prototype.isSupported;dD.prototype.destroy=dD.prototype.destroy;var fD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);kc("mss/audio/mp4",function(){return new dD("mss/audio/mp4")},qc);kc("mss/video/mp4",function(){return new dD("mss/video/mp4")},qc);function hD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=hD.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1361
|
+
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=ne(c).split(",");c=Rd("audio",d);d=Rd("video",d);if(c&&(c=de(c),!iD.includes(c))||d&&(c=de(d),!jD.includes(c)))return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};
|
|
1359
1362
|
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=ne(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return $e(c,"audio/mp4")}).map(Ze).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
|
|
1360
|
-
r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Aj(f)){for(var g=Ti(f),h=g.length;h<f.length;h++)if(
|
|
1361
|
-
if(!
|
|
1362
|
-
b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ya:[],ja:new Uint8Array([]),ua:C.ua,Aa:C.Aa,Ba:C.Ba,data:{pb:this.g,baseMediaDecodeTime:q,Va:p},stream:b};break;case "hvc":var D=[],K=null,
|
|
1363
|
-
P=!0;break;case 19:case 20:case 21:
|
|
1364
|
-
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ba.data,size:Ba.data.byteLength,duration:Ka,$a:Math.round((
|
|
1365
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Za=[],xa,Va=null,pb=t(k.Lb()),Pc=pb.next();!Pc.done;Pc=pb.next()){var ee=Pc.value,rd=ee.data;if(rd){var Hc=0;xa=
|
|
1366
|
-
|
|
1367
|
-
duration:1024,$a:0,flags:{cb:0,
|
|
1368
|
-
(oj=
|
|
1369
|
-
Aa:0,Ba:0,data:{pb:this.g,baseMediaDecodeTime:
|
|
1370
|
-
rf++}}if(0==pj||0==
|
|
1371
|
-
le);sf?(rj||(rj=sf),le+sf.Y<=Lg.length&&
|
|
1363
|
+
r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Aj(f)){for(var g=Ti(f),h=g.length;h<f.length;h++)if(aD(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(FC(f,h))return this.h||(this.h=new HC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new mj;var k=this.j.parse(f),l=[],m=k.ld();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],q=null,u=[],w=k.Ac();
|
|
1364
|
+
if(!w.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var v=0;v<w.length;v++){var A=w[v],y=A.nalus;u.push.apply(u,x(y));var B=PC(y);if(B){null==q&&(q=A.dts);var z=void 0;z=v+1<w.length?(w[v+1].dts||0)-(A.dts||0):1<w.length?(A.dts||0)-(w[v-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:B.data,size:B.data.byteLength,duration:z,$a:Math.round((A.pts||0)-(A.dts||0)),flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:B.ud?2:1,eb:B.ud?0:1}})}}var C=NC(u);if(!C||null==q)throw new T(2,3,3018,c?c.M()[0]:null);b.height=C.height;
|
|
1365
|
+
b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ya:[],ja:new Uint8Array([]),ua:C.ua,Aa:C.Aa,Ba:C.Ba,data:{pb:this.g,baseMediaDecodeTime:q,Va:p},stream:b};break;case "hvc":var D=[],K=null,G=[],J=k.Ac();if(!J.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var I=0;I<J.length;I++){var F=J[I],M=F.nalus;G.push.apply(G,x(M));for(var N=!1,L=[],P=!1,R=t(M),Q=R.next();!Q.done;Q=R.next()){var fa=Q.value;switch(fa.type){case 1:case 0:var ka=
|
|
1366
|
+
P=!0;break;case 19:case 20:case 21:N=ka=P=!0;break;case 32:ka=!0;break;case 33:ka=!0;break;case 34:ka=!0;break;case 35:P=ka=!0;break;case 39:case 40:ka=!0;break;default:ka=!1}if(P&&ka){var wa=fa.fullData.byteLength,ya=new Uint8Array(4);ya[0]=wa>>24&255;ya[1]=wa>>16&255;ya[2]=wa>>8&255;ya[3]=wa&255;L.push(ya);L.push(fa.fullData)}}var Ba=L.length?{data:Md.apply(Ed,x(L)),ud:N}:null;if(Ba){null==K&&null!=F.dts&&(K=F.dts);var Ka=void 0;Ka=I+1<J.length?(J[I+1].dts||0)-(F.dts||0):1<J.length?(F.dts||0)-(J[I-
|
|
1367
|
+
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ba.data,size:Ba.data.byteLength,duration:Ka,$a:Math.round((F.pts||0)-(F.dts||0)),flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:Ba.ud?2:1,eb:Ba.ud?0:1}})}}var Ca=QC(G);if(!Ca||null==K)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Ca.height;b.width=Ca.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ya:[],ja:new Uint8Array([]),ua:Ca.ua,Aa:Ca.Aa,Ba:Ca.Ba,data:{pb:this.g,baseMediaDecodeTime:K,Va:D},stream:b}}n&&
|
|
1368
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Za=[],xa,Va=null,pb=t(k.Lb()),Pc=pb.next();!Pc.done;Pc=pb.next()){var ee=Pc.value,rd=ee.data;if(rd){var Hc=0;xa=EC(rd,Hc);if(!xa)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=xa.sampleRate;b.channelsCount=xa.channelCount;null==Va&&null!==ee.pts&&(Va=ee.pts);for(;Hc<rd.length;){var fe=DC(rd,Hc);if(fe){var ge=fe.ce+fe.Y;Hc+ge<=rd.length&&Za.push({data:rd.subarray(Hc+fe.ce,Hc+ge),size:fe.Y,duration:1024,$a:0,flags:{cb:0,
|
|
1369
|
+
Ta:0,Sa:0,Qa:0,Ra:2,eb:0}});Hc+=ge}else Hc++}}}if(!xa||null==Va){if(!k.Ac().length)throw new T(2,3,3018,c?c.M()[0]:null);Va=9E4*c.startTime;var he=Rd("audio",b.codecs.split(","));if(!he||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);xa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,La:he};var sd=GC(he,b.channelsCount);if(!sd)throw new T(2,3,3018,c?c.M()[0]:null);for(var Di=Va+9E4*(c.endTime-c.startTime),xg=Va;xg<Di;)Za.push({data:sd,size:sd.byteLength,
|
|
1370
|
+
duration:1024,$a:0,flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:2,eb:0}}),xg+=1024/xa.sampleRate*9E4}var Ei=xa.sampleRate,Fi=Va/9E4*Ei;n={id:b.id,type:"audio",codecs:xa.La,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ei,duration:d,Ya:[],ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.g,baseMediaDecodeTime:Fi,Va:Za},stream:b};break;case "ac3":for(var yg=[],ie=0,ic=new Uint8Array([]),oj=null,Au=t(k.Lb()),Mm=Au.next();!Mm.done;Mm=Au.next()){var Nm=Mm.value,Om=Nm.data;null==oj&&null!==Nm.pts&&
|
|
1371
|
+
(oj=Nm.pts);for(var qf=0;qf<Om.length;){var Jd=IC(Om,qf);Jd?(b.audioSamplingRate=Jd.sampleRate,b.channelsCount=Jd.channelCount,ie=Jd.sampleRate,ic=Jd.ja,yg.push({data:Om.subarray(qf,qf+Jd.Y),size:Jd.Y,duration:1536,$a:0,flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:2,eb:0}}),qf+=Jd.Y):qf++}}if(0==ie||0==ic.byteLength||null==oj)throw new T(2,3,3018,c?c.M()[0]:null);var zD=oj/9E4*ie;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ie,duration:d,Ya:[],ja:ic,ua:new Uint8Array([]),
|
|
1372
|
+
Aa:0,Ba:0,data:{pb:this.g,baseMediaDecodeTime:zD,Va:yg},stream:b};break;case "ec3":for(var Bu=[],pj=0,Pm=new Uint8Array([]),qj=null,Cu=t(k.Lb()),Qm=Cu.next();!Qm.done;Qm=Cu.next()){var Rm=Qm.value,Sm=Rm.data;null==qj&&null!==Rm.pts&&(qj=Rm.pts);for(var rf=0;rf<Sm.length;){var Kd=LC(Sm,rf);Kd?(b.audioSamplingRate=Kd.sampleRate,b.channelsCount=Kd.channelCount,pj=Kd.sampleRate,Pm=Kd.ja,Bu.push({data:Sm.subarray(rf,rf+Kd.Y),size:Kd.Y,duration:1536,$a:0,flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:2,eb:0}}),rf+=Kd.Y):
|
|
1373
|
+
rf++}}if(0==pj||0==Pm.byteLength||null==qj)throw new T(2,3,3018,c?c.M()[0]:null);var AD=qj/9E4*pj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:pj,duration:d,Ya:[],ja:Pm,ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.g,baseMediaDecodeTime:AD,Va:Bu},stream:b};break;case "mp3":for(var Du=[],rj,sj=null,Eu=t(k.Lb()),Tm=Eu.next();!Tm.done;Tm=Eu.next()){var Um=Tm.value,Lg=Um.data;if(Lg){null==sj&&null!==Um.pts&&(sj=Um.pts);for(var le=0;le<Lg.length;){var sf=VC(Lg,
|
|
1374
|
+
le);sf?(rj||(rj=sf),le+sf.Y<=Lg.length&&Du.push({data:Lg.subarray(le,le+sf.Y),size:sf.Y,duration:1152,$a:0,flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:2,eb:0}}),le+=sf.Y):le++}}}if(!rj||null==sj)throw new T(2,3,3018,c?c.M()[0]:null);var Fu=rj.sampleRate,BD=sj/9E4*Fu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Fu,duration:d,Ya:[],ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.g,baseMediaDecodeTime:BD,Va:Du},stream:b};break;case "opus":var Gu=[],
|
|
1372
1375
|
tj=null,Rc=k.F;if(!Rc)throw new T(2,3,3018,c?c.M()[0]:null);var yb=[];switch(Rc.rh){case 1:case 2:yb=[0];break;case 0:yb=[255,1,1,0,1];break;case 128:yb=[255,2,0,0,1];break;case 3:yb=[1,2,1,0,2,1];break;case 4:yb=[1,2,2,0,1,2,3];break;case 5:yb=[1,3,2,0,4,1,2,3];break;case 6:yb=[1,4,2,0,4,1,2,3,5];break;case 7:yb=[1,4,2,0,4,1,2,3,5,6];break;case 8:yb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:yb=[1,1,2,0,1];break;case 131:yb=[1,1,3,0,1,2];break;case 132:yb=[1,1,4,0,1,2,3];break;case 133:yb=[1,1,5,0,1,
|
|
1373
|
-
2,3,4];break;case 134:yb=[1,1,6,0,1,2,3,4,5];break;case 135:yb=[1,1,7,0,1,2,3,4,5,6];break;case 136:yb=[1,1,8,0,1,2,3,4,5,6,7]}var
|
|
1374
|
-
2,uj=0;255===tf[ud];)uj+=255,ud+=1;uj+=tf[ud];ud+=1;ud+=
|
|
1375
|
-
data:{pb:this.g,baseMediaDecodeTime:
|
|
1376
|
-
|
|
1376
|
+
2,3,4];break;case 134:yb=[1,1,6,0,1,2,3,4,5];break;case 135:yb=[1,1,7,0,1,2,3,4,5,6];break;case 136:yb=[1,1,8,0,1,2,3,4,5,6,7]}var Hu=new Uint8Array([0,Rc.channelCount,0,0,Rc.sampleRate>>>24&255,Rc.sampleRate>>>17&255,Rc.sampleRate>>>8&255,Rc.sampleRate>>>0&255,0,0].concat(x(yb)));for(var Iu=Rc.sampleRate,Ju=t(k.Lb()),Vm=Ju.next();!Vm.done;Vm=Ju.next()){var Wm=Vm.value,tf=Wm.data;null==tj&&null!==Wm.pts&&(tj=Wm.pts);for(var Mg=0;Mg<tf.length;){for(var CD=0!==(tf[Mg+1]&16),DD=0!==(tf[Mg+1]&8),ud=Mg+
|
|
1377
|
+
2,uj=0;255===tf[ud];)uj+=255,ud+=1;uj+=tf[ud];ud+=1;ud+=CD?2:0;ud+=DD?2:0;var Ku=tf.slice(ud,ud+uj);Gu.push({data:Ku,size:Ku.byteLength,duration:960,$a:0,flags:{cb:0,Ta:0,Sa:0,Qa:0,Ra:2,eb:0}});Mg=ud+uj}}if(0==Hu.byteLength||null==tj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Rc.sampleRate;b.channelsCount=Rc.channelCount;var ED=tj/9E4*Iu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Iu,duration:d,Ya:[],ja:Hu,ua:new Uint8Array([]),Aa:0,Ba:0,
|
|
1378
|
+
data:{pb:this.g,baseMediaDecodeTime:ED,Va:Gu},stream:b}}n&&(l.push(n),n=null)}}catch(Xm){return Xm&&3023==Xm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Xm)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Lu=new Uw(l),Ym=b.id+"_"+c.i;if(this.i.has(Ym))var Zm=this.i.get(Ym);else Zm=$w(Lu),this.i.set(Ym,Zm);var FD=qx(Lu);this.g++;var GD=Md(Zm,FD);return Promise.resolve(GD)};S("shaka.transmuxer.TsTransmuxer",hD);hD.prototype.transmux=hD.prototype.transmux;
|
|
1379
|
+
hD.prototype.getOriginalMimeType=hD.prototype.getOriginalMimeType;hD.prototype.convertCodecs=hD.prototype.convertCodecs;hD.prototype.isSupported=hD.prototype.isSupported;hD.prototype.destroy=hD.prototype.destroy;var iD=["aac","ac-3","ec-3","mp3","opus"],jD=["avc","hevc"];kc("video/mp2t",function(){return new hD("video/mp2t")},oc);/*
|
|
1377
1380
|
@license
|
|
1378
1381
|
EME Encryption Scheme Polyfill
|
|
1379
1382
|
Copyright 2019 Google LLC
|
|
1380
1383
|
SPDX-License-Identifier: Apache-2.0
|
|
1381
1384
|
*/
|
|
1382
|
-
function
|
|
1383
|
-
function
|
|
1384
|
-
function
|
|
1385
|
+
function kD(){}var lD;
|
|
1386
|
+
function mD(){lD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(lD=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=nD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1387
|
+
function nD(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),E(e,lD.call(c,a,b),2);d=e.h;if(oD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=lD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=pD;return e.return(pD.call(c,
|
|
1385
1388
|
a,b))})}
|
|
1386
|
-
function
|
|
1387
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(
|
|
1388
|
-
function
|
|
1389
|
-
function
|
|
1390
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
1391
|
-
function
|
|
1392
|
-
new
|
|
1393
|
-
function
|
|
1394
|
-
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",
|
|
1395
|
-
|
|
1396
|
-
function
|
|
1397
|
-
function
|
|
1389
|
+
function pD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u;return O(function(w){if(1==w.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=qD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=rD(h.videoCapabilities,d),l=rD(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."),
|
|
1390
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(w,lD.call(c,a,e),2)}p=w.h;u=q=null;e[0]&&(e[0].videoCapabilities&&(q=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return w.return(new sD(p,q,u))})}function rD(a,b){return a?a.filter(function(c){return tD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",kD);kD.install=mD;function uD(){}var vD;
|
|
1391
|
+
function wD(){vD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(vD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=xD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1392
|
+
function xD(a){var b=this,c,d,e;return O(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(f,vD.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&oD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=vD,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1393
|
+
navigator.mediaCapabilities.decodingInfo=yD;if(d){f.u(3);break}e=c;return E(f,HD(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(yD.call(b,a))}})}
|
|
1394
|
+
function yD(a){var b=this,c,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=qD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},tD(d,g)&&tD(c,g))?E(m,vD.call(b,a),2):m.return(h);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1395
|
+
new sD(k.keySystemAccess,c,d);m.u(3);break}if(!a.keySystemConfiguration){m.u(3);break}l=k;return E(m,HD(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1396
|
+
function HD(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
1397
|
+
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",uD);uD.install=wD;function sD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
|
|
1398
|
+
sD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};sD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
|
|
1399
|
+
function qD(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function oD(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}
|
|
1400
|
+
function tD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(ID||JD)return!0;return!1}function KD(){}function Pz(){mD();wD()}S("EncryptionSchemePolyfills",KD);KD.install=Pz;var JD=navigator.userAgent.includes("CrKey"),ID=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=KD);}).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})();
|
|
1398
1401
|
|
|
1399
1402
|
//# sourceMappingURL=shaka-player.compiled.map
|