shaka-player 3.1.5 → 3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build_and_test.yaml +73 -0
- package/.github/workflows/release.yaml +53 -0
- package/CHANGELOG.md +13 -1
- package/build/checkversion.py +1 -1
- package/build/test.py +6 -0
- package/dist/controls.css +1 -1
- package/dist/deps.js +3 -3
- package/dist/locales.js +29 -29
- package/dist/shaka-player.compiled.d.ts +2 -1
- package/dist/shaka-player.compiled.debug.d.ts +2 -1
- package/dist/shaka-player.compiled.debug.externs.js +5 -0
- package/dist/shaka-player.compiled.debug.js +200 -198
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +5 -0
- package/dist/shaka-player.compiled.js +609 -608
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +4 -12
- package/dist/shaka-player.ui.debug.d.ts +4 -12
- package/dist/shaka-player.ui.debug.externs.js +19 -23
- package/dist/shaka-player.ui.debug.js +77 -76
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +19 -23
- package/dist/shaka-player.ui.js +901 -901
- package/dist/shaka-player.ui.map +2 -2
- package/karma.conf.js +19 -15
- package/lib/ads/ad_manager.js +1 -0
- package/lib/cast/cast_proxy.js +3 -0
- package/lib/cast/cast_receiver.js +3 -0
- package/lib/dash/dash_parser.js +31 -19
- package/lib/hls/manifest_text_parser.js +1 -0
- package/lib/media/region_observer.js +39 -33
- package/lib/media/region_timeline.js +17 -19
- package/lib/media/streaming_engine.js +1 -1
- package/lib/net/networking_engine.js +4 -0
- package/lib/offline/storage.js +10 -11
- package/lib/player.js +25 -9
- package/lib/util/fake_event_target.js +21 -1
- package/package.json +3 -6
- package/test/dash/dash_parser_live_unit.js +43 -0
- package/test/dash/dash_parser_manifest_unit.js +2 -1
- package/test/hls/hls_parser_unit.js +74 -0
- package/test/media/region_observer_unit.js +40 -5
- package/test/media/region_timeline_unit.js +40 -22
- package/test/test/util/util.js +10 -7
- package/test/ui/text_displayer_layout_unit.js +8 -7
- package/ui/controls.js +3 -0
- package/ui/localization.js +12 -36
package/dist/shaka-player.ui.js
CHANGED
|
@@ -14,870 +14,870 @@ function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof win
|
|
|
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
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 fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ha(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
|
|
17
|
-
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
17
|
+
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;la=pa.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ka;
|
|
18
|
+
function u(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.mi=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.o=0;this.D=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
|
|
19
|
+
function ta(a,b){a.i={Re:b,Ze:!0};a.g=a.o||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function z(a,b,c){a.g=c;return{value:b}}ra.prototype.C=function(a){this.g=a};function A(a){a.g=0}function F(a,b,c){a.o=b;void 0!=c&&(a.j=c)}function ua(a){a.o=0;a.j=2}function va(a,b,c){a.g=b;a.o=c||0}function H(a,b){a.o=b||0;var c=a.i.Re;a.i=null;return c}function wa(a){a.D=[a.i];a.o=0;a.j=0}
|
|
20
|
+
function xa(a,b){var c=a.D.splice(0)[0];(c=a.i=a.i||c)?c.Ze?a.g=a.o||a.j:void 0!=c.C&&a.j<c.C?(a.g=c.C,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
|
|
21
|
+
function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
|
|
22
|
+
function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Ze)throw b.Re;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
|
|
23
|
+
function Ca(a){this.next=function(b){sa(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Ba(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.B):(ta(a.g,b),b=Ba(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}function Da(a,b){var c=new Ca(new ya(b));qa&&a.prototype&&qa(c,a.prototype);return c}
|
|
24
|
+
function Ea(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function K(a){return Ea(new Ca(new ya(a)))}
|
|
25
25
|
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.A=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
26
26
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.K),reject:g(this.l)}};b.prototype.K=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.O(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.I(g):this.o(g)}};
|
|
27
|
-
b.prototype.I=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.
|
|
27
|
+
b.prototype.I=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.Y(h,g):this.o(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.o=function(g){this.B(1,g)};b.prototype.B=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.L();this.D()};b.prototype.L=function(){var g=this;e(function(){if(g.H()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.H=
|
|
28
28
|
function(){if(this.A)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.D=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
29
|
-
b.prototype.O=function(g){var h=this.j();g.bd(h.resolve,h.reject)};b.prototype.
|
|
29
|
+
b.prototype.O=function(g){var h=this.j();g.bd(h.resolve,h.reject)};b.prototype.Y=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,t){return"function"==typeof p?function(v){try{l(p(v))}catch(x){m(x)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.bd(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.bd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
30
30
|
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!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=r(g),m=l.next();!m.done;m=l.next())d(m.value).bd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(x){p[v]=x;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).bd(n(p.length-1),m),k=h.next();
|
|
31
|
-
while(!k.done)})};return b});function
|
|
32
|
-
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!
|
|
33
|
-
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!
|
|
34
|
-
|
|
35
|
-
ea("Map",function(a){function b(){var h={};return h.
|
|
36
|
-
list:m,index:-1,
|
|
37
|
-
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.
|
|
38
|
-
h.
|
|
39
|
-
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});function
|
|
31
|
+
while(!k.done)})};return b});function Fa(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
32
|
+
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(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(!Fa(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
33
|
+
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Fa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Fa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
34
|
+
Fa(k,g)&&Fa(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Fa(k,g)&&Fa(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
35
|
+
ea("Map",function(a){function b(){var h={};return h.rb=h.next=h.head=h}function c(h,k){var l=h.g;return fa(function(){if(l){for(;l.head!=h.g;)l=l.rb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Fa(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,Ba:p}}return{id:l,
|
|
36
|
+
list:m,index:-1,Ba:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(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(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
|
|
37
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.Ba?l.Ba.value=k:(l.Ba={next:this.g,rb:this.g.rb,head:this.g,key:h,value:k},l.list.push(l.Ba),this.g.rb.next=l.Ba,this.g.rb=l.Ba,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.Ba&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.Ba.rb.next=h.Ba.next,h.Ba.next.rb=h.Ba.rb,
|
|
38
|
+
h.Ba.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.rb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).Ba};e.prototype.get=function(h){return(h=d(this,h).Ba)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
|
|
39
|
+
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});function Ha(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.keys",function(a){return a?a:function(){return Ha(this,function(b){return b})}});
|
|
40
40
|
ea("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
41
41
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
|
|
42
42
|
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});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}});
|
|
43
43
|
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,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});
|
|
44
|
-
function
|
|
45
|
-
function
|
|
46
|
-
ea("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=
|
|
47
|
-
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;})})}});ea("Array.prototype.entries",function(a){return a?a:function(){return
|
|
48
|
-
ea("String.prototype.repeat",function(a){return a?a:function(b){var c=
|
|
49
|
-
ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)
|
|
44
|
+
function Ia(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ia(this,b,"includes").indexOf(b,c||0)}});
|
|
45
|
+
function Ja(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{xa:e,xf:f}}return{xa:-1,xf:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).xa}});ea("Array.prototype.values",function(a){return a?a:function(){return Ha(this,function(b,c){return c})}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ja(this,b,c).xf}});
|
|
46
|
+
ea("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ia(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});var Ka="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)Fa(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Ka});
|
|
47
|
+
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;})})}});ea("Array.prototype.entries",function(a){return a?a:function(){return Ha(this,function(b,c){return[b,c]})}});
|
|
48
|
+
ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Ia(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Fa(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
|
|
49
|
+
ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Fa(b,d)&&c.push([d,b[d]]);return c}});var La=this||self;function M(a,b){var c=a.split("."),d=La;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
|
|
50
50
|
@license
|
|
51
51
|
Shaka Player
|
|
52
52
|
Copyright 2016 Google LLC
|
|
53
53
|
SPDX-License-Identifier: Apache-2.0
|
|
54
54
|
*/
|
|
55
55
|
function N(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
56
|
-
function
|
|
57
|
-
if(window.console&&window.console.log.bind){var
|
|
58
|
-
|
|
56
|
+
function Ma(a){var b=new N(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}N.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};N.prototype.stopImmediatePropagation=function(){this.g=!0};N.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",N);function Na(){}function Oa(){}function Pa(){}function Ra(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Sa.has(a)||(Sa.add(a),Pa.apply(Na,ha(c)))}function Ta(){}function Ua(){}function Va(){}function Wa(){}var Sa=new Set;
|
|
57
|
+
if(window.console&&window.console.log.bind){var Xa={},Ya=(Xa[1]=console.error.bind(console),Xa[2]=console.warn.bind(console),Xa[3]=console.info.bind(console),Xa[4]=console.log.bind(console),Xa[5]=console.debug.bind(console),Xa[6]=console.debug.bind(console),Xa);Pa=Ya[2];Oa=Ya[1]};function ab(){this.g={}}ab.prototype.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};ab.prototype.get=function(a){return(a=this.g[a])?a.slice():null};ab.prototype.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function bb(a,b){for(var c in a.g)b(c,a.g[c])}ab.prototype.size=function(){return Object.keys(this.g).length};function cb(){this.Y=new ab;this.Yc=this}cb.prototype.addEventListener=function(a,b){this.Y&&this.Y.push(a,b)};cb.prototype.removeEventListener=function(a,b){this.Y&&this.Y.remove(a,b)};cb.prototype.dispatchEvent=function(a){if(!this.Y)return!0;var b=this.Y.get(a.type)||[],c=this.Y.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Yc;a.currentTarget=this.Yc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
58
|
+
cb.prototype.release=function(){this.Y=null};function db(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function fb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function gb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function hb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c}
|
|
59
|
+
var jb=function ib(a){var c;return Da(ib,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?z(d,c,3):d.C(0);c++;return d.C(2)})},mb=function lb(a){var c,d,e,f,g,h;return Da(lb,function(k){1==k.g&&(c=-1,e=d=void 0,f=r(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.C(0):z(k,{xa:c,Bg:d,item:e,next:void 0},0);h=g.value;return 0<=c?z(k,{xa:c,item:e,Bg:d,next:h},5):k.C(5)}c++;d=e;e=h;g=f.next();return k.C(2)})};/*
|
|
59
60
|
@license
|
|
60
61
|
Copyright 2008 The Closure Library Authors
|
|
61
62
|
SPDX-License-Identifier: Apache-2.0
|
|
62
63
|
*/
|
|
63
|
-
var
|
|
64
|
+
var nb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
|
|
64
65
|
@license
|
|
65
66
|
Copyright 2006 The Closure Library Authors
|
|
66
67
|
SPDX-License-Identifier: Apache-2.0
|
|
67
68
|
*/
|
|
68
|
-
function
|
|
69
|
-
q.toString=function(){var a=[],b=this.Ya;b&&a.push(
|
|
70
|
-
q.resolve=function(a){var b=this.clone();"data"===b.Ya&&(b=new
|
|
71
|
-
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.Pa=d:c=""!==a.g.toString();c?
|
|
72
|
-
function
|
|
69
|
+
function ob(a){var b;a instanceof ob?(pb(this,a.Ya),this.Sb=a.Sb,this.ab=a.ab,qb(this,a.kc),this.Pa=a.Pa,rb(this,a.g.clone()),this.Hb=a.Hb):a&&(b=String(a).match(nb))?(pb(this,b[1]||"",!0),this.Sb=sb(b[2]||""),this.ab=sb(b[3]||"",!0),qb(this,b[4]),this.Pa=sb(b[5]||"",!0),rb(this,b[6]||"",!0),this.Hb=sb(b[7]||"")):this.g=new ub(null)}q=ob.prototype;q.Ya="";q.Sb="";q.ab="";q.kc=null;q.Pa="";q.Hb="";
|
|
70
|
+
q.toString=function(){var a=[],b=this.Ya;b&&a.push(vb(b,wb,!0),":");if(b=this.ab){a.push("//");var c=this.Sb;c&&a.push(vb(c,wb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.kc;null!=b&&a.push(":",String(b))}if(b=this.Pa)this.ab&&"/"!=b.charAt(0)&&a.push("/"),a.push(vb(b,"/"==b.charAt(0)?xb:yb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hb)&&a.push("#",vb(b,zb));return a.join("")};
|
|
71
|
+
q.resolve=function(a){var b=this.clone();"data"===b.Ya&&(b=new ob);var c=!!a.Ya;c?pb(b,a.Ya):c=!!a.Sb;c?b.Sb=a.Sb:c=!!a.ab;c?b.ab=a.ab:c=null!=a.kc;var d=a.Pa;if(c)qb(b,a.kc);else if(c=!!a.Pa){if("/"!=d.charAt(0))if(this.ab&&!this.Pa)d="/"+d;else{var e=b.Pa.lastIndexOf("/");-1!=e&&(d=b.Pa.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(""):".."==
|
|
72
|
+
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.Pa=d:c=""!==a.g.toString();c?rb(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};q.clone=function(){return new ob(this)};function pb(a,b,c){a.Ya=c?sb(b,!0):b;a.Ya&&(a.Ya=a.Ya.replace(/:$/,""))}function qb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.kc=b}else a.kc=null}function rb(a,b,c){b instanceof ub?a.g=b:(c||(b=vb(b,Ab)),a.g=new ub(b))}
|
|
73
|
+
function sb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function vb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Bb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Bb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var wb=/[#\/\?@]/g,yb=/[#\?:]/g,xb=/[#\?]/g,Ab=/[#\?@]/g,zb=/#/g;function ub(a){this.g=a||null}q=ub.prototype;q.Ma=null;q.dd=null;
|
|
73
74
|
q.add=function(a,b){if(!this.Ma&&(this.Ma={},this.dd=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.Ma.hasOwnProperty(a)&&this.Ma[a])||(this.Ma[a]=c=[]);c.push(b);this.dd++;return this};
|
|
74
|
-
q.toString=function(){if(this.g)return this.g;if(!this.Ma)return"";var a=[],b;for(b in this.Ma)for(var c=encodeURIComponent(b),d=this.Ma[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new
|
|
75
|
-
|
|
75
|
+
q.toString=function(){if(this.g)return this.g;if(!this.Ma)return"";var a=[],b;for(b in this.Ma)for(var c=encodeURIComponent(b),d=this.Ma[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new ub;a.g=this.g;if(this.Ma){var b={},c;for(c in this.Ma)b[c]=this.Ma[c].concat();a.Ma=b;a.dd=this.dd}return a};function P(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",P);P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
76
|
+
P.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,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,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
|
|
76
77
|
TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
|
|
77
78
|
MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,
|
|
78
79
|
HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,
|
|
79
80
|
HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,
|
|
80
81
|
ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,
|
|
81
|
-
INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function
|
|
82
|
-
function
|
|
83
|
-
function
|
|
84
|
-
function
|
|
85
|
-
var
|
|
82
|
+
INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function Cb(a,b){this.g=a;this.h=b}Cb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Db(a,b){var c=new Cb(4,0),d=Eb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Fb(a,b,c,d){Pa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Gb(a,b,c,d){Oa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Eb=null;function Hb(a,b){return a.concat(b)}function Ib(){}function Jb(a){return null!=a}function Kb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Db("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Db("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Lb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new ob(d)});return a.map(function(d){return new ob(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Hb,[]).map(function(d){return d.toString()})}function Mb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,sessionType:"",initData:b||[],keyIds:new Set}}
|
|
83
|
+
function Nb(a,b){if(1==b.length)return b[0];var c=Ob(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Ob(a,b){for(var c=r(Pb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Qb?"":null}var Qb="text",Rb={ib:"video",Cb:"audio",ra:Qb,Xc:"image",$g:"application"},Pb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Sb(a,b){a=Tb(a);b=Tb(b);return a.split("-")[0]==b.split("-")[0]}function Ub(a,b){a=Tb(a);b=Tb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Vb(a,b){a=Tb(a);b=Tb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Tb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Wb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Xb(a,b){a=Tb(a);b=Tb(b);return b==a?4:Ub(b,a)?3:Vb(b,a)?2:Ub(a,b)?1:0}
|
|
84
|
+
function Yb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Wb.get(a)||a}function Zb(a){return a.language?Tb(a.language):a.audio&&a.audio.language?Tb(a.audio.language):a.video&&a.video.language?Tb(a.video.language):"und"}
|
|
85
|
+
function $b(a,b){for(var c=Tb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Tb(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Ub(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Vb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Ub(c,f))return f;return null}
|
|
86
|
+
var Wb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
|
|
86
87
|
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
87
88
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
88
89
|
"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",
|
|
89
90
|
"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",
|
|
90
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function
|
|
91
|
-
q.Ke=function(a){var b=this;this.
|
|
92
|
-
q.ka=function(a,b,c){a=
|
|
93
|
-
function
|
|
94
|
-
b.get(h.value))&&c.push(h);c.reverse();a.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
function
|
|
99
|
-
function
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
q.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
function
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
function
|
|
112
|
-
function
|
|
113
|
-
function cd(a){
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
function
|
|
126
|
-
function
|
|
127
|
-
|
|
128
|
-
b
|
|
129
|
-
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
[
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
function Ee(a){
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
function
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
(
|
|
149
|
-
function Re(a
|
|
150
|
-
|
|
151
|
-
function
|
|
152
|
-
function
|
|
153
|
-
|
|
154
|
-
var
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
function
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
function Af(a){var b=Bf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}Bf=b}return b||!1}var Bf=void 0;function Cf(a,b,c,d){var e=this;this.g=a;this.o=c;this.j={};this.K={};this.i=null;this.L=d||function(){};this.l={};this.h=new xf;this.B={};this.D=b;this.H=new Xe;this.A=Df(this,this.H);this.M=new vf(function(){return Ef(e)});this.I=""}function Df(a,b){var c=new MediaSource;a.h.Na(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Ff(c);a.g.src=a.I;return c}function Gf(a){var b=ff(a.mimeType,a.codecs),c=hf(a);return nf(b)||MediaSource.isTypeSupported(c)||bf(b,a.type)}q=Cf.prototype;
|
|
91
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ac(a){cb.call(this);this.j=Tb(a);this.i=new Map;this.g=new Set;this.h=new Map}u(ac,cb);q=ac.prototype;q.release=function(){cb.prototype.release.call(this)};
|
|
92
|
+
q.Ke=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Tb(c.value));bc(this);a=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new N("unknown-locales",(new Map).set("locales",a)));a=hb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new N("locale-changed",a))};
|
|
93
|
+
q.ka=function(a,b,c){a=Tb(a);void 0===c&&(c=cc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=cc||d.set(f,e)});this.h.set(a,d);bc(this);this.dispatchEvent(new N("locale-updated"));return this};q.Kg=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new N("unknown-localization",a));return""};
|
|
94
|
+
function bc(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Xb:f.Xb},h=g.next()){f.Xb=h.value;e.add(f.Xb);e.add(Yb(f.Xb));h=hb(b.keys(),function(l){return function(m){var n=l.Xb,p=Yb(m),t=Yb(n);return m!=p&&n!=t&&p==t}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Yb(m)==l.Xb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=
|
|
95
|
+
b.get(h.value))&&c.push(h);c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,dc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new N("missing-localizations",d)))}function dc(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}M("shaka.ui.Localization",ac);
|
|
96
|
+
ac.prototype.resolve=ac.prototype.resolve;ac.prototype.resolveDictionary=ac.prototype.Kg;ac.prototype.insert=ac.prototype.ka;ac.prototype.changeLocale=ac.prototype.Ke;ac.prototype.release=ac.prototype.release;var cc=1;ac.ConflictResolution={USE_OLD:0,USE_NEW:cc};ac.UNKNOWN_LOCALES="unknown-locales";ac.UNKNOWN_LOCALIZATION="unknown-localization";ac.MISSING_LOCALIZATIONS="missing-localizations";ac.LOCALE_CHANGED="locale-changed";ac.LOCALE_UPDATED="locale-updated";var ec={Ge:"LIVE",BACK:"BACK",lh:"EXIT_FULL_SCREEN",Bh:"MUTE",Mh:"REPLAY",yh:"MORE_SETTINGS",zf:"SUBTITLE_FORCED",Eh:"OFF",ci:"UNRECOGNIZED_LANGUAGE",bi:"UNMUTE",gh:"CAST",Jh:"PICTURE_IN_PICTURE",rh:"FULL_SCREEN",jh:"ENTER_PICTURE_IN_PICTURE",Fh:"ON",fh:"CAPTIONS",Qh:"SEEK",Xg:"AD_DURATION",nh:"EXIT_PICTURE_IN_PICTURE",Lh:"PLAYBACK_RATE",Yg:"AD_TIME",ah:"AUTO_QUALITY",AD_PROGRESS:"AD_PROGRESS",Kh:"PLAY",Nh:"RESOLUTION",Sh:"SKIP_TO_LIVE",ai:"UNDETERMINED_LANGUAGE",Dh:"NOT_APPLICABLE",Zg:"AIRPLAY",
|
|
97
|
+
sh:"LANGUAGE",mh:"EXIT_LOOP_MODE",ih:"ENTER_LOOP_MODE",Oh:"REWIND",Rh:"SKIP_AD",ei:"VOLUME",qh:"FAST_FORWARD",Ih:"PAUSE",uh:"LOOP",Ah:"MULTIPLE_LANGUAGES"};function fc(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function gc(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function hc(a){return a.g/(1-Math.pow(a.i,a.h))};function ic(){this.h=new fc(2);this.i=new fc(5);this.g=0}ic.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(hc(this.h),hc(this.i))};function jc(){}function kc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(lc(a)==lc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=mc(a),d=mc(b),e=r(jb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function lc(a){return a instanceof ArrayBuffer?a:a.buffer}function nc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
98
|
+
function mc(a,b,c){c=void 0===c?Infinity:c;return oc(a,void 0===b?0:b,c,Uint8Array)}function pc(a,b,c){c=void 0===c?Infinity:c;return oc(a,void 0===b?0:b,c,DataView)}function oc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(lc(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",jc);jc.toDataView=pc;jc.toUint8=mc;jc.toArrayBuffer=nc;jc.equal=kc;function qc(a){this.h=a;this.g=void 0}qc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function rc(){}function sc(a){if(!a)return"";a=mc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Oa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}
|
|
99
|
+
function tc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=pc(a);d=r(jb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return uc.value()(c)}
|
|
100
|
+
function vc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=mc(a);if(239==c[0]&&187==c[1]&&191==c[2])return sc(c);if(254==c[0]&&255==c[1])return tc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return tc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return tc(a,!1);if(0==c[1]&&0==c[3])return tc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return sc(a);throw new P(2,2,2003);}function wc(a){var b=new TextEncoder;return nc(b.encode(a))}
|
|
101
|
+
function xc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=r(mb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.xa,f.item.charCodeAt(0),b);return c}M("shaka.util.StringUtils",rc);rc.resetFromCharCode=function(){uc.g=void 0};rc.toUTF16=xc;rc.toUTF8=wc;rc.fromBytesAutoDetect=vc;rc.fromUTF16=tc;rc.fromUTF8=sc;
|
|
102
|
+
var uc=new qc(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={ub:65536};0<b.ub;b={ub:b.ub},b.ub/=2)if(a(b.ub))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ub)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ub));return e}}(b);return null});function yc(a,b){this.V=pc(a);this.h=b==zc;this.g=0}q=yc.prototype;q.Ha=function(){return this.g<this.V.byteLength};q.ma=function(){return this.g};q.Wf=function(){return this.V.byteLength};q.na=function(){try{var a=this.V.getUint8(this.g);this.g+=1;return a}catch(b){throw Ac();}};q.lc=function(){try{var a=this.V.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Ac();}};q.R=function(){try{var a=this.V.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Ac();}};
|
|
103
|
+
q.hf=function(){try{var a=this.V.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Ac();}};q.mc=function(){try{if(this.h){var a=this.V.getUint32(this.g,!0);var b=this.V.getUint32(this.g+4,!0)}else b=this.V.getUint32(this.g,!1),a=this.V.getUint32(this.g+4,!1)}catch(c){throw Ac();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Ab=function(a){if(this.g+a>this.V.byteLength)throw Ac();var b=mc(this.V,this.g,a);this.g+=a;return b};
|
|
104
|
+
q.skip=function(a){if(this.g+a>this.V.byteLength)throw Ac();this.g+=a};q.kf=function(a){if(this.g<a)throw Ac();this.g-=a};q.seek=function(a){if(0>a||a>this.V.byteLength)throw Ac();this.g=a};q.Nc=function(){for(var a=this.g;this.Ha()&&0!=this.V.getUint8(this.g);)this.g+=1;a=mc(this.V,a,this.g-a);this.g+=1;return sc(a)};function Ac(){return new P(2,3,3E3)}M("shaka.util.DataViewReader",yc);yc.prototype.readTerminatedString=yc.prototype.Nc;yc.prototype.seek=yc.prototype.seek;yc.prototype.rewind=yc.prototype.kf;
|
|
105
|
+
yc.prototype.skip=yc.prototype.skip;yc.prototype.readBytes=yc.prototype.Ab;yc.prototype.readUint64=yc.prototype.mc;yc.prototype.readInt32=yc.prototype.hf;yc.prototype.readUint32=yc.prototype.R;yc.prototype.readUint16=yc.prototype.lc;yc.prototype.readUint8=yc.prototype.na;yc.prototype.getLength=yc.prototype.Wf;yc.prototype.getPosition=yc.prototype.ma;yc.prototype.hasMoreData=yc.prototype.Ha;var zc=1;yc.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:zc};function Bc(){this.i=[];this.h=[];this.g=!1}q=Bc.prototype;q.box=function(a,b){var c=Cc(a);this.i[c]=Dc;this.h[c]=b;return this};q.X=function(a,b){var c=Cc(a);this.i[c]=Ec;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new yc(a,0);for(this.g=!1;a.Ha()&&!this.g;)this.rd(0,a,b,c)};
|
|
106
|
+
q.rd=function(a,b,c,d){var e=b.ma();if(d&&e+8>b.V.byteLength)this.g=!0;else{var f=b.R(),g=b.R(),h=!1;switch(f){case 0:f=b.V.byteLength-e;break;case 1:if(d&&b.ma()+8>b.V.byteLength){this.g=!0;return}f=b.mc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Ec){if(d&&b.ma()+4>b.V.byteLength){this.g=!0;return}m=b.R();l=m>>>24;m&=16777215}g=e+f;c&&g>b.V.byteLength&&(g=b.V.byteLength);d&&g>b.V.byteLength?this.g=!0:(d=g-b.ma(),b=0<d?b.Ab(d):new Uint8Array(0),b=new yc(b,0),k({parser:this,partialOkay:c||
|
|
107
|
+
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ma(),b.V.byteLength-b.ma()))}};function Fc(a){for(var b=Gc(a);a.reader.Ha()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}function Hc(a){var b=Gc(a),c=a.reader.R();c=r(jb(c));for(var d=c.next();!d.done&&(a.parser.rd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function Ic(a){return function(b){a(b.reader.Ab(b.reader.V.byteLength-b.reader.ma()))}}
|
|
108
|
+
function Cc(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Jc(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Gc(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Bc);Bc.headerSize=Gc;Bc.typeToString=Jc;Bc.allData=Ic;Bc.sampleDescription=Hc;Bc.children=Fc;Bc.prototype.parseNext=Bc.prototype.rd;Bc.prototype.parse=Bc.prototype.parse;Bc.prototype.stop=Bc.prototype.stop;
|
|
109
|
+
Bc.prototype.fullBox=Bc.prototype.X;Bc.prototype.box=Bc.prototype.box;var Dc=0,Ec=1;function Kc(a){this.h=a;this.g=null}Kc.prototype.T=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};Kc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.Ia=function(){this.stop();this.h();return this};Q.prototype.T=function(a){var b=this;this.stop();this.g=(new Kc(function(){b.h()})).T(a);return this};Q.prototype.oa=function(a){var b=this;this.stop();this.g=(new Kc(function(){b.g.T(a);b.h()})).T(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.oa;Q.prototype.tickAfter=Q.prototype.T;
|
|
110
|
+
Q.prototype.tickNow=Q.prototype.Ia;function Lc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Mc(a){return""!=Nc().canPlayType(a)}function Oc(){return Pc("Xbox One")}function Qc(){return Pc("Tizen")}function Rc(){return Pc("CrKey")}function Sc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Qc()}function Tc(){if(!Sc())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}
|
|
111
|
+
function Pc(a){return(navigator.userAgent||"").includes(a)}function Nc(){if(Uc)return Uc;Vc||(Vc=new Q(function(){Uc=null}));(Uc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Uc=document.createElement("video"));Vc.T(1);return Uc}var Vc=null,Uc=null;function Wc(){}function Xc(a){a=mc(a);a=uc.value()(a);return btoa(a)}function Yc(a,b){b=void 0==b?!0:b;var c=Xc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Zc(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=r(mb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.xa]=c.item.charCodeAt(0);return a}
|
|
112
|
+
function $c(a){var b=a.length/2,c=new Uint8Array(b);b=r(jb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function ad(a){var b=mc(a);a="";b=r(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}
|
|
113
|
+
function bd(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=r(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(mc(c),e),e+=c.byteLength;return d}M("shaka.util.Uint8ArrayUtils",Wc);Wc.concat=bd;Wc.toHex=ad;Wc.fromHex=$c;Wc.fromBase64=Zc;Wc.toBase64=Yc;Wc.toStandardBase64=Xc;
|
|
114
|
+
Wc.equal=function(a,b){Db("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return kc(a,b)};function cd(a){function b(){d=!0}function c(l){f.push(l);Fc(l)}a=mc(a);var d=!1,e,f=[],g=[];(new Bc).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);Hc(l)}).X("encv",b).X("enca",b).X("avc1",function(l){g.push({box:l,Kc:1701733238})}).X("avc3",function(l){g.push({box:l,Kc:1701733238})}).X("ac-3",function(l){g.push({box:l,Kc:1701733217})}).X("ec-3",function(l){g.push({box:l,Kc:1701733217})}).X("mp4a",function(l){g.push({box:l,Kc:1701733217})}).parse(a);
|
|
115
|
+
if(d)return a;if(0==g.length||!e)throw Wa(ad(a)),new P(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=dd(a,e,k.box,f,k.Kc);return a}
|
|
116
|
+
function dd(a,b,c,d,e){var f=ed.value(),g=a.subarray(c.start,c.start+c.size),h=pc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=pc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);fd(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Oc()?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=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,fd(e,d.start,d.size+k.byteLength);k=pc(e,b.start);b=Gc(b);a=k.getUint32(b);
|
|
117
|
+
k.setUint32(b,a+1);return e}function fd(a,b,c){a=pc(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 ed=new qc(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 gd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function hd(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function id(a,b,c){c||(c=gd);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ed:d.Ed},e=a.next()){d.Ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
118
|
+
function jd(a,b,c){c||(c=gd);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function kd(a,b,c){this.startTime=a;this.direction=ld;this.endTime=b;this.payload=c;this.region=new md;this.position=null;this.positionAlign=nd;this.size=0;this.textAlign=od;this.writingMode=pd;this.lineInterpretation=qd;this.line=null;this.lineHeight="";this.lineAlign=rd;this.displayAlign=sd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=td;this.fontStyle=ud;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
|
|
119
|
+
[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}kd.prototype.clone=function(){var a=new kd(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
120
|
+
function vd(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!jd(a.nestedCues,b.nestedCues,vd))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!jd(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",kd);var nd="auto";
|
|
121
|
+
kd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:nd};var od="center",wd={LEFT:"left",RIGHT:"right",CENTER:od,START:"start",END:"end"};kd.textAlign=wd;var sd="after",xd={BEFORE:"before",CENTER:"center",AFTER:sd};kd.displayAlign=xd;var ld="ltr";kd.direction={HORIZONTAL_LEFT_TO_RIGHT:ld,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var pd="horizontal-tb";kd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:pd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var qd=0;
|
|
122
|
+
kd.lineInterpretation={LINE_NUMBER:qd,PERCENTAGE:1};var rd="start",yd={CENTER:"center",START:rd,END:"end"};kd.lineAlign=yd;var zd={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};kd.defaultTextColor=zd;var Ad={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};kd.defaultTextBackgroundColor=Ad;var td=400;kd.fontWeight={NORMAL:td,BOLD:700};
|
|
123
|
+
var ud="normal",Bd={NORMAL:ud,ITALIC:"italic",OBLIQUE:"oblique"};kd.fontStyle=Bd;kd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function md(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Cd;this.scroll=Dd}M("shaka.text.CueRegion",md);var Cd=1;md.units={PX:0,PERCENTAGE:Cd,LINES:2};var Dd="";md.scrollMode={NONE:Dd,UP:"up"};function Ed(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(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Fd(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){t=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){v=x;break}if(-1===
|
|
124
|
+
t||-1===v)p=Gd(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(x=p[t]){var w=x.l,y=x.i,C=x.j,D=x.h;if(w!=h||y!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Fd(d,e,w,y,C,D),h=w,k=y,l=C,m=D;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Gd(d,e),a.nestedCues.push(n));n=Fd(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
125
|
+
function Fd(a,b,c,d,e,f){a=new kd(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Gd(a,b){var c=new kd(a,b,"");c.lineBreak=!0;return c}function Hd(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Id(){this.l=!1;this.H=this.K=0;this.I=Jd;this.i=[];this.g=this.h=this.j=0;this.D=this.A=!1;this.B="white";this.o="black";Kd(this)}function Kd(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Ld())}function Ld(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Md(a,b){Nd(a)&&(a.i[a.h][a.g]=new Hd(b,a.D,a.A,a.o,a.B),a.g++)}function Nd(a){var b=a.g<a.H&&0<=a.g;return a.h<a.K&&0<=a.h&&b}Id.prototype.isVisible=function(){return this.l};
|
|
126
|
+
function Od(a,b,c){var d=new kd(a.j,b,"");d.textAlign=a.I===Pd?"left":a.I===Qd?"right":od;if(c=Ed(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Pd=0,Qd=1,Jd=2;function Rd(){this.i=[];this.h=null;this.g=0}function Sd(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 Td(a.h)),a.h=null,a.g=0))}function Td(a){this.g=0;this.h=a}Td.prototype.Ha=function(){return this.g<this.h.length};Td.prototype.ma=function(){return this.g};function Ud(a){if(!a.Ha())throw new P(2,2,3E3);return a.h[a.g++]}Td.prototype.skip=function(a){if(this.g+a>this.h.length)throw new P(2,2,3E3);this.g+=a};function Vd(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
127
|
+
function Wd(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=Ud(b).value;b=null;c=r(Xd(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Od(e,d,a.i)),Kd(e);return b}if(137===c)for(b=Ud(b).value,b=r(Xd(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=Ud(b).value;b=null;c=r(Xd(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Od(e,d,a.i)),e.l=!1;return b}if(139===c){c=Ud(b).value;
|
|
128
|
+
b=null;c=r(Xd(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Od(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Ud(b).value,Yd(a,b,d);if(143===c)return d=Yd(a,255,d),Zd(a),d;if(144===c)b.skip(1),d=Ud(b).value,a.g&&(a.g.A=0<(d&128),a.g.D=0<(d&64));else if(145===c)d=Ud(b).value,c=Ud(b).value,b.skip(1),a.g&&(b=$d((c&48)>>4,(c&12)>>2,c&3),a.g.B=$d((d&48)>>4,(d&12)>>2,d&3),a.g.o=b);else if(146===c)d=Ud(b).value,b=Ud(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
129
|
+
b.skip(1),d=Ud(b).value,b.skip(1),a.g&&(a.g.I=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Id;f.j=d;a.h[c]=f}d=Ud(b).value;Ud(b);Ud(b);f=Ud(b).value;var g=Ud(b).value;b=Ud(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.A=!1,b.B="white",b.o="black");b=a.h[c];b.l=0<(d&32);b.K=(f&15)+1;b.H=(g&63)+1;a.g=a.h[c]}}}return null}
|
|
130
|
+
var Xd=function ae(a,b){var d,e;return Da(ae,function(f){1==f.g&&(d=0);if(5!=f.g)return 8>d?(e=1===(b&1))&&a.h[d]?z(f,d,5):f.C(5):f.C(0);b>>=1;d++;return f.C(2)})};function Yd(a,b,c){var d=null;b=r(Xd(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Od(f,c,a.i));a.h[e]=null}return d}function Zd(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function $d(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return be[a<<2|b<<1|c]}
|
|
131
|
+
var ce=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"]]),be="black blue green cyan red magenta yellow white".split(" ");function de(a,b){this.i=[];this.g=1;this.h=0;this.D=a;this.B=b;this.j=this.o=!1;this.l="white";this.A="black";ee(this)}function fe(a,b,c){return Ed(new kd(b,c,""),"CC"+(a.D<<1|a.B+1),a.i,b,c)}function ee(a){ge(a,0,15);a.g=1}function he(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case ie:d=je.has(c)?je.get(c):String.fromCharCode(c);break;case ke:d=le.get(c);break;case me:a.i[a.g].pop();d=ne.get(c);break;case oe:a.i[a.g].pop(),d=pe.get(c)}d&&a.i[a.g].push(new Hd(d,a.o,a.j,a.A,a.l))}}
|
|
132
|
+
function qe(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function ge(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
133
|
+
var ie=0,ke=1,me=2,oe=3,je=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"]]),le=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),ne=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
|
|
134
|
+
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),pe=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
135
|
+
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function re(a,b){this.h=se;this.A=new de(a,b);this.i=new de(a,b);this.l=new de(a,b);this.g=this.i;this.j=0;this.o=null}function te(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ue&&a.h!==ve&&(e=fe(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,ge(c,0,15),c=a.l,c.g=0<c.h?c.h:0,ge(c,0,15),d.g=15);a.h=ue;d.h=b;return e}function we(a){a.h=xe;a.g=a.l;a.g.h=0}function ye(a){Ra("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=ve}
|
|
136
|
+
var se=0,xe=1,ue=3,ve=4,ze="black green blue cyan red yellow magenta black".split(" "),Ae="white green blue cyan red yellow magenta white_italics".split(" ");function Be(){this.h=[];this.g=[];this.i=new Rd;this.l=0;this.B=new Map([["CC1",new re(0,0)],["CC2",new re(0,1)],["CC3",new re(1,0)],["CC4",new re(1,1)]]);this.A=this.o=0;this.j=new Map;Ce(this)}function Ce(a){a.o=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.o=null,ee(b.i),ee(b.l),ee(b.A)}
|
|
137
|
+
function De(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=Ee(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Sd(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Fe(a,e.value),c.push.apply(c,ha(e));a.i.i=[];a.h=[];a.g=[];return c}
|
|
138
|
+
function Ee(a,b){var c=b.type;if(16===(b.Ta&112)){var d=b.Ta>>3&1;0===c?a.o=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.o)+1));if(255===b.Ta&&255===b.mb||!b.Ta&&!b.mb||!Ge(b.Ta)||!Ge(b.mb))return 45<=++a.l&&Ce(a),null;a.l=0;b.Ta&=127;b.mb&=127;if(!b.Ta&&!b.mb)return null;d=null;if(16===(b.Ta&112))a:{var e=b.Ta;d=b.mb;if(c.o===(e<<8|d))c.o=null;else if(c.o=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Ae[f]:7===f&&(h=!0);
|
|
139
|
+
d=1===(d&1);if(c.h!==ve){f=c.g;if(c.h===ue&&e!==f.g){var k=1+e-f.h;qe(f,k,1+f.g-f.h,f.h);ge(f,0,k-1);ge(f,e+1,15-e)}f.g=e;c.g.o=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.o=!1,c.g.j=!1,c.g.l="white",he(c.g,ie,32),g=!1,e=Ae[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.o=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=ze[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))he(c.g,ke,d);else if(18===
|
|
140
|
+
(e&246)&&32===(d&224))he(c.g,e&1?oe:me,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.mb){case 32:we(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=te(c,2,d);break;case 38:e=te(c,3,d);break;case 39:e=te(c,4,d);break;case 40:he(c.g,ie,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:ee(c.A);ye(c);break;case 43:ye(c);break;case 44:e=c.i;g=null;c.h!==ve&&(g=fe(e,c.j,d));ge(e,0,15);e=g;break;case 45:e=c.g;c.h!==ue?e=null:(g=fe(e,c.j,d),h=e.g-e.h+1,qe(e,h-1,h,e.h),ge(e,
|
|
141
|
+
0,h-1),ge(e,e.g,15-e.g),c.j=d,e=g);break;case 46:ge(c.l,0,15);break;case 47:e=null,c.h!==ve&&(e=fe(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,we(c),c.j=d}d=e;break a}d=null}else e=b.mb,he(c.g,ie,b.Ta),he(c.g,ie,e);return d}
|
|
142
|
+
function Fe(a,b){var c=[];try{for(;b.Ha();){var d=Ud(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Ud(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Vd(e));for(var g=a.j.get(e),h=b.ma();b.ma()-h<f;){e=b;var k=Ud(e),l=k.value,m=k.pts;if(16===l){var n=Ud(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Nd(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.H-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Od(t,p,g.i));if(t.h+1>=t.K){p=t;for(var v=0,x=1;15>x;x++,
|
|
143
|
+
v++)p.i[v]=p.i[x];for(x=0;1>x;x++,v++)p.i[v]=Ld()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Od(t,p,g.i));t.i[t.h]=Ld();t.g=0;break;case 12:t.isVisible()&&(e=Od(t,p,g.i)),Kd(t),p=t,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Wd(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?Md(g.g,"\u266a"):Md(g.g,
|
|
144
|
+
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Md(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ce.has(e)){var y=ce.get(e);Md(g.g,y)}else Md(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Md(g.g,"_"):Md(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof P&&3E3===C.code)Ra("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Ge(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function He(){}var Je=function Ie(a,b){var d,e,f,g;return Da(Ie,function(h){if(1==h.g){for(var k=b,l=0,m=0;m<k.length;)2==l&&3==k[m]?(l=0,k=[].concat(ha(k)),k.splice(m,1),k=new Uint8Array(k)):0==k[m]?l++:l=0,m++;d=k;e=0}if(4!=h.g){if(!(e<d.length))return h.C(0);for(f=0;255==d[e];)f+=255,e++;f+=d[e++];for(g=0;255==d[e];)g+=255,e++;g+=d[e++];return 4!=f?h.C(4):z(h,d.subarray(e,e+g),4)}e+=g;return h.C(2)})};function Ke(a,b){var c=null,d=null,e=a.R();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:e,Pe:c,Jf:d}}function Le(a,b){return{Od:1==b?a.mc():a.R()}}function Me(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
|
|
145
|
+
function Ne(a,b,c){var d=a.R(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=r(jb(d)),g=f.next();!g.done;g=f.next())g={le:null,sampleSize:null,ud:null},c&256&&(g.le=a.R()),c&512&&(g.sampleSize=a.R()),c&1024&&a.skip(4),c&2048&&(g.ud=0==b?a.R():a.hf()),e.push(g);return{li:d,lf:e}};function Oe(){this.j=new He;this.i=new Map;this.h=this.g=0}
|
|
146
|
+
Oe.prototype.init=function(a){var b=this,c=[],d=[];(new Bc).box("moov",Fc).box("mvex",Fc).X("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.R();f=f.R();b.g=e;b.h=f}).box("trak",Fc).X("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.R();c.push(e)}).box("mdia",Fc).X("mdhd",function(e){e=Me(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
147
|
+
Oe.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Bc).box("moof",Fc).box("traf",Fc).X("trun",function(k){f=Ne(k.reader,k.version,k.flags).lf}).X("tfhd",function(k){k=Ke(k.reader,k.flags);d=k.Pe||b.g;e=k.Jf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=Le(k.reader,k.version).Od}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,x=p;for(t.length&&(x=t[0].sampleSize||p);k.Ha();){var w=k.R();if(6==
|
|
148
|
+
(k.na()&31)){var y=0;t.length>v&&(y=t[v].ud||0);y=(l+y)/m;for(var C=r(Je(b.j,k.Ab(w-1))),D=C.next();!D.done;D=C.next())c.push({zg:D.value,pts:y})}else k.skip(w-1);x-=w+4;0==x&&(l=t.length>v?l+(t[v].le||n):l+n,v++,x=t.length>v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Pe(){this.h=new Oe;this.g=new Be}Pe.prototype.init=function(a){this.h.init(a)};
|
|
149
|
+
function Qe(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=mc(e.zg);if(0<f.length&&(d=a.g,e=e.pts,f=new yc(f,0),181===f.na()&&49===f.lc()&&1195456820===f.R()&&3===f.na())){var g=f.na();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.na(),l=(k&4)>>2,m=f.na(),n=f.na();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ta:m,mb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return De(a.g)}
|
|
150
|
+
;function Re(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Se(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Te(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Ue(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
|
|
151
|
+
function Ve(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ue(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ue(a){if(!a)return[];for(var b=[],c=r(jb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function We(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}We.prototype.resolve=function(){};We.prototype.reject=function(){};function Xe(){}M("shaka.dependencies",Xe);Xe.has=function(a){return Ye.has(a)};Xe.add=function(a,b){if(!Ze[a])throw Error(a+" is not supported");Ye.set(a,function(){return b})};var Ze={muxjs:"muxjs"};Xe.Allowed=Ze;var Ye=new Map([["muxjs",function(){return window.muxjs}]]);function $e(){var a=this;this.A=Ye.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.o=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.o.push(bd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:bd.apply(Wc,ha(a.o)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}$e.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
152
|
+
function af(a,b){if(!Ye.get("muxjs")()||!bf(a))return!1;if(b)return MediaSource.isTypeSupported(cf(b,a));var c=cf("audio",a),d=cf("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function bf(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
153
|
+
function cf(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function df(a,b){a.l=!0;a.h=new We;a.o=[];a.j=[];a.i=[];var c=mc(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function ef(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function ff(a,b,c){a=ef(a,b);return Ye.get("muxjs")()&&bf(a)?cf(c,a):a}function gf(a){var b=[a.mimeType];hf.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});"PQ"==a.hdr&&b.push('eotf="smpte2084"');return b.join(";")}function jf(a){a=a.split(".");var b=a[0];a.pop();return b}function kf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
|
|
154
|
+
var hf=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function lf(a){this.A=null;this.i=a;this.j=this.D=0;this.l=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function mf(a){return nf[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}lf.prototype.destroy=function(){this.i=this.A=null;this.o.clear();return Promise.resolve()};
|
|
155
|
+
function of(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g)return z(h,Promise.resolve(),2);if(!a.A||!a.i)return h["return"]();if(null==c||null==d)return a.A.parseInit(mc(b)),h["return"]();e={periodStart:a.D,segmentStart:c,segmentEnd:d};f=a.A.parseMedia(mc(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.l});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.l);A(h)})}
|
|
156
|
+
lf.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)return z(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));A(d)})};function pf(a,b,c){a.j=b;a.l=c}function qf(a,b,c){a.B=b;if(b=a.o.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
|
|
157
|
+
function rf(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new kd(c.startTime,c.endTime,c.text)});return b}function sf(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())sf(a,d.value,c)}
|
|
158
|
+
function tf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);sf(a,k,e);k.startTime>=a.j&&k.startTime<a.l&&(g.get(h).get(f).push(k),h==a.B&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
159
|
+
a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.l))}M("shaka.text.TextEngine",lf);lf.prototype.destroy=lf.prototype.destroy;lf.findParser=function(a){return nf[a]};lf.unregisterParser=function(a){delete nf[a]};lf.registerParser=function(a,b){nf[a]=b};var nf={};function uf(a){this.g=!1;this.h=new We;this.i=a}uf.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 vf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function wf(){this.g=new ab}q=wf.prototype;q.release=function(){this.Qb();this.g=null};q.m=function(a,b,c,d){this.g&&(a=new xf(a,b,c,d),this.g.push(b,a))};q.Na=function(a,b,c,d){function e(g){f.Qa(a,b,e);c(g)}var f=this;this.m(a,b,e,d)};q.Qa=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Qa(),this.g.remove(b,e))}};
|
|
160
|
+
q.Qb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.Qa();this.g.g={}}};M("shaka.util.EventManager",wf);wf.prototype.removeAll=wf.prototype.Qb;wf.prototype.unlisten=wf.prototype.Qa;wf.prototype.listenOnce=wf.prototype.Na;wf.prototype.listen=wf.prototype.m;wf.prototype.release=wf.prototype.release;function xf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=yf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
161
|
+
xf.prototype.Qa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function yf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return zf(a)?b:b.capture||!1}
|
|
162
|
+
function zf(a){var b=Af;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}Af=b}return b||!1}var Af=void 0;function Bf(a,b,c,d){var e=this;this.g=a;this.o=c;this.j={};this.K={};this.i=null;this.L=d||function(){};this.l={};this.h=new wf;this.B={};this.D=b;this.H=new We;this.A=Cf(this,this.H);this.M=new uf(function(){return Df(e)});this.I=""}function Cf(a,b){var c=new MediaSource;a.h.Na(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Ef(c);a.g.src=a.I;return c}function Ff(a){var b=ef(a.mimeType,a.codecs),c=gf(a);return mf(b)||MediaSource.isTypeSupported(c)||af(b,a.type)}q=Bf.prototype;
|
|
163
163
|
q.destroy=function(){return this.M.destroy()};
|
|
164
|
-
function
|
|
165
|
-
{};
|
|
166
|
-
q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
167
|
-
c.j[e.Ka]=l,c.K[e.Ka]=k,c.l[e.Ka]=[]);
|
|
168
|
-
function
|
|
169
|
-
function
|
|
170
|
-
m,e));l.captions&&l.captions.length&&(n=a.j[g.ib].timestampOffset,p=
|
|
171
|
-
function
|
|
172
|
-
function
|
|
173
|
-
q.endOfStream=function(a){var b=this;return
|
|
174
|
-
function
|
|
175
|
-
function
|
|
176
|
-
function
|
|
177
|
-
function
|
|
178
|
-
function
|
|
179
|
-
function
|
|
180
|
-
function
|
|
181
|
-
1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return
|
|
182
|
-
function
|
|
164
|
+
function Df(a){var b,c,d,e,f,g,h,k;return K(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"](Ib)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.i&&b.push(a.i.destroy());a.o&&b.push(a.o.destroy());for(k in a.B)b.push(a.B[k].destroy());return z(l,Promise.all(b),2)}a.h&&(a.h.release(),a.h=null);a.g&&(a.g.removeAttribute("src"),a.g.load(),a.g=null);a.A=null;a.i=null;a.o=null;a.j={};a.B={};a.D=null;a.l=
|
|
165
|
+
{};A(l)})}
|
|
166
|
+
q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return d=Rb,z(m,c.H,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ka:e.Ka},g=f.next())e.Ka=g.value,h=a.get(e.Ka),k=ef(h.mimeType,h.codecs),e.Ka==d.ra?Gf(c,k):(!b&&MediaSource.isTypeSupported(k)||!af(k,e.Ka)||(c.B[e.Ka]=new $e,k=cf(e.Ka,k)),l=c.A.addSourceBuffer(k),c.h.m(l,"error",function(n){return function(){c.l[n.Ka][0].p.reject(new P(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.m(l,"updateend",function(n){return function(){return Hf(c,n.Ka)}}(e)),
|
|
167
|
+
c.j[e.Ka]=l,c.K[e.Ka]=k,c.l[e.Ka]=[]);A(m)})};function Gf(a,b){a.i||(a.i=new lf(a.o));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.i.A=Kb(nf[b]))}function If(a){return a.A?"ended"==a.A.readyState:!0}function Jf(a,b){if(b==Qb)var c=a.i.g;else c=Kf(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function Lf(a,b){return b==Qb?a.i.h:Re(Kf(a,b))}
|
|
168
|
+
function Mf(a,b,c){if(b==Qb)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Kf(a,b);return Te(a,c)}q.gd=function(){var a={total:Ue(this.g.buffered),audio:Ue(Kf(this,"audio")),video:Ue(Kf(this,"video")),text:[]};if(this.i){var b=this.i.g,c=this.i.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Kf(a,b){try{return a.j[b].buffered}catch(c){return null}}
|
|
169
|
+
function Nf(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return K(function(v){if(1==v.g){g=Rb;if(b==g.ra)return z(v,of(a.i,c,d,e),0);if(a.B[b])return z(v,df(a.B[b],c),10);if(f)return a.i||Gf(a,"text/vtt"),null==d&&null==e?a.D.init(c):(h=Qe(a.D,c),h.length&&(k=a.j[g.ib].timestampOffset,tf(a.i,h,d,e,k))),c=Of(a,c,d,b),z(v,Pf(a,b,function(){a.j[b].appendBuffer(c)}),0);c=Of(a,c,d,b);return z(v,Pf(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=v.h;a.i||Gf(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
|
|
170
|
+
m,e));l.captions&&l.captions.length&&(n=a.j[g.ib].timestampOffset,p=rf(l.captions),tf(a.i,p,d,e,n));t=l.data;t=Of(a,t,d,b);return z(v,Pf(a,b,function(){a.j[b].appendBuffer(t)}),0)})}function Qf(a,b){var c=Lf(a,"video")||0;qf(a.i,b,c)}function Rf(a){a.i&&qf(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=Rb;return a==e.ra?z(f,d.i.remove(b,c),0):z(f,Pf(d,a,function(){c<=b?Hf(d,a):d.j[a].remove(b,c)}),0)})};
|
|
171
|
+
function Sf(a,b){var c;return K(function(d){c=Rb;return b==c.ra?a.i?z(d,a.i.remove(0,Infinity),0):d["return"]():z(d,Pf(a,b,function(){var e=a.A.duration;0>=e?Hf(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=Rb;return a==c.ra?d["return"]():z(d,Pf(b,a,function(){b.g.currentTime-=.001;Hf(b,a)}),0)})};
|
|
172
|
+
function Tf(a,b,c,d,e){var f;return K(function(g){f=Rb;return b==f.ra?(a.i.D=c,pf(a.i,d,e),g["return"]()):z(g,Promise.all([Pf(a,b,function(){var h=a.j[b].appendWindowStart,k=a.j[b].appendWindowEnd;a.j[b].abort();a.j[b].appendWindowStart=h;a.j[b].appendWindowEnd=k;Hf(a,b)}),Pf(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;Hf(a,b)}),Pf(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;Hf(a,b)})]),0)})}
|
|
173
|
+
q.endOfStream=function(a){var b=this;return K(function(c){return z(c,Uf(b,function(){If(b)||(a?b.A.endOfStream(a):b.A.endOfStream())}),0)})};q.fb=function(a){var b=this;return K(function(c){return z(c,Uf(b,function(){b.A.duration=a}),0)})};q.getDuration=function(){return this.A.duration};function Hf(a,b){var c=a.l[b][0];c&&(c.p.resolve(),Vf(a,b))}function Pf(a,b,c){vf(a.M);c={start:c,p:new We};a.l[b].push(c);1==a.l[b].length&&Wf(a,b);return c.p}
|
|
174
|
+
function Uf(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:vf(a.M);c=[];d={};for(e in a.j)d.tc=new We,f={start:function(l){return function(){return l.tc.resolve()}}(d),p:d.tc},a.l[e].push(f),c.push(d.tc),1==a.l[e].length&&f.start(),d={tc:d.tc};F(k,2);return z(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=H(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.j)Vf(a,h)}A(k)}})}function Vf(a,b){a.l[b].shift();Wf(a,b)}
|
|
175
|
+
function Wf(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),Vf(a,b)}}function Of(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(Qc()||Oc())&&"mp4"==a.K[d].split(";")[0].split("/")[1]&&(b=cd(b));return b}var Ef=window.URL.createObjectURL;function Xf(a,b){var c=Zf(a.variants,b);c=$f(c);c=ag(c);var d=bg(c);a.variants=a.variants.filter(function(e){return cg(e)==d?!0:!1})}function $f(a){var b=new ab;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=cg(c);b.push(d,c)}return b}
|
|
176
|
+
function ag(a){var b=0,c=new Map,d=a.size();bb(a,function(e,f){for(var g=r(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new ab);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}function bg(a){var b="",c=Infinity;bb(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}
|
|
177
|
+
function cg(a){var b="";a.video&&(b=jf(a.video.codecs));var c="";a.audio&&(c=jf(a.audio.codecs));return b+"-"+c}function dg(a,b,c){a.variants=a.variants.filter(function(d){return eg(d,b,c)})}
|
|
178
|
+
function eg(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
|
|
179
|
+
function fg(a,b,c,d){return K(function(e){if(1==e.g)return d?z(e,ig(c,0<c.offlineSessionIds.length),2):(gg(c,a),hg(c),e.C(2));jg(b,c);kg(c);lg(c);A(e)})}function gg(a,b){a.variants=a.variants.filter(function(c){return b&&b.L?mg(b,c)?!0:!1:!0})}
|
|
180
|
+
function ig(a,b){return K(function(c){if(1==c.g)return z(c,ng(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=og(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Nb("video",g);g=Nb("audio",g);g=ff(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=ff(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=pg(f.codecs),f=ff(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Oc()&&e&&(e.width&&
|
|
181
|
+
1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Ua(qg(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Ua(qg(d));return e});A(c)})}function hg(a){a.variants=a.variants.filter(function(b){var c=b.audio;b=b.video;return c&&!Ff(c)||b&&!Ff(b)||Oc()&&b&&(b.width&&1920<b.width||b.height&&1080<b.height)&&b.codecs.includes("avc1.")?!1:!0})}
|
|
182
|
+
function ng(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return K(function(v){if(d=a.some(function(x){return x.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(x,w){var y;return K(function(C){if(1==C.g)return F(C,2),z(C,e.decodingInfo(w),4);if(2!=C.g)return y=C.h,x.decodingInfos.push(y),va(C,0);H(C);JSON.stringify(w);A(C)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=rg(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return z(v,Promise.all(f),
|
|
183
183
|
0)})}
|
|
184
|
-
function
|
|
185
|
-
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
184
|
+
function rg(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Nb("video",g);f=og(f);g=Nb("audio",g);g=ff(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=og(f);f=ff(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
185
|
+
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=pg(d.codecs),f=ff(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
|
|
186
186
|
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=r(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
187
|
-
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function
|
|
188
|
-
function
|
|
189
|
-
function
|
|
190
|
-
function
|
|
187
|
+
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function pg(a){return Qc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
|
|
188
|
+
function og(a){return"vp9"==a?"vp09.00.10.08":a}function jg(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!sg(d,a.audio)||c&&a&&a.video&&!sg(c,a.video)?!1:!0})}function kg(a){a.textStreams=a.textStreams.filter(function(b){return mf(ef(b.mimeType,b.codecs))})}function lg(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Pc("Web0S")||Qc()||Rc())&&c.push("image/webp");return c.includes(b.mimeType)})}
|
|
189
|
+
function sg(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
190
|
+
function tg(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
|
|
191
191
|
frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
|
|
192
192
|
null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
|
|
193
|
-
function
|
|
193
|
+
function ug(a){return{id:a.id,active:!1,type:Qb,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
|
|
194
194
|
originalTextId:a.originalId,originalImageId:null}}
|
|
195
|
-
function
|
|
196
|
-
originalTextId:null,originalImageId:a.originalId}}function
|
|
197
|
-
function
|
|
198
|
-
function
|
|
199
|
-
function
|
|
200
|
-
function
|
|
201
|
-
|
|
202
|
-
function
|
|
203
|
-
q.chooseVariant=function(){var a=
|
|
204
|
-
q.disable=function(){this.h=!1};q.segmentDownloaded=function(a,b){var c=this.g;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;
|
|
205
|
-
q.playbackRateChanged=function(a){this.o=a};q.configure=function(a){this.v=a};function
|
|
206
|
-
|
|
207
|
-
function
|
|
208
|
-
function
|
|
209
|
-
function
|
|
210
|
-
|
|
211
|
-
function
|
|
212
|
-
function
|
|
213
|
-
function
|
|
214
|
-
|
|
215
|
-
function
|
|
216
|
-
function
|
|
217
|
-
q.request=function(a,b){var c=this,d=new
|
|
218
|
-
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.
|
|
219
|
-
function
|
|
220
|
-
function
|
|
221
|
-
y&&(p=new
|
|
222
|
-
return
|
|
223
|
-
|
|
224
|
-
function
|
|
225
|
-
function
|
|
226
|
-
function
|
|
227
|
-
function
|
|
228
|
-
|
|
229
|
-
q.
|
|
230
|
-
c,2)}
|
|
231
|
-
function
|
|
232
|
-
function
|
|
233
|
-
function
|
|
234
|
-
function
|
|
235
|
-
sessionTypes:g,label:e.keySystem,drmInfos:[]});c=r(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=r([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h
|
|
195
|
+
function vg(a){return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:a.width||null,height:a.height||null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:a.tilesLayout||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
|
|
196
|
+
originalTextId:null,originalImageId:a.originalId}}function wg(a){a.__shaka_id||(a.__shaka_id=xg++);return a.__shaka_id}function yg(a){var b=zg(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
197
|
+
function zg(a){return{id:wg(a),active:!1,type:"",bandwidth:0,language:Tb(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
|
|
198
|
+
function Ag(a){return a.allowedByApplication&&a.allowedByKeySystem}function Bg(a){return a.filter(function(b){return Ag(b)})}
|
|
199
|
+
function Zf(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ha(e))):d.get(Math.min.apply(Math,ha(c)))}
|
|
200
|
+
function Cg(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=$b(Tb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Tb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Dg(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Hb,[]);return a.length?
|
|
201
|
+
Dg(e,a[0]):e}function Dg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function qg(a){var b=[];a.audio&&b.push(Eg(a.audio));a.video&&b.push(Eg(a.video));return b.join(", ")}
|
|
202
|
+
function Eg(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var xg=0;function Fg(){var a=this;this.j=null;this.h=!1;this.g=new ic;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.v.useNetworkInformation&&a.h){a.g=new ic;var b=a.chooseVariant();b&&a.j(b)}});this.i=[];this.o=1;this.A=!1;this.v=this.l=null}q=Fg.prototype;q.stop=function(){this.j=null;this.h=!1;this.i=[];this.o=1;this.l=null};q.init=function(a){this.j=a};
|
|
203
|
+
q.chooseVariant=function(){var a=Gg(this.v.restrictions,this.i),b=this.g.getBandwidthEstimate(Hg(this));this.i.length&&!a.length&&(a=Gg(null,this.i),a=[a[0]]);var c=a[0]||null;a=r(mb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.o)?1:Math.abs(this.o);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.v.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.v.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.l=Date.now();return c};q.enable=function(){this.h=!0};
|
|
204
|
+
q.disable=function(){this.h=!1};q.segmentDownloaded=function(a,b){var c=this.g;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;gc(c.h,e,d);gc(c.i,e,d)}if(null!=this.l&&this.h)a:{if(!this.A){if(!(128E3<=this.g.g))break a;this.A=!0}else if(Date.now()-this.l<1E3*this.v.switchInterval)break a;c=this.chooseVariant();this.g.getBandwidthEstimate(Hg(this));c&&this.j(c)}};q.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.v.defaultBandwidthEstimate)};q.setVariants=function(a){this.i=a};
|
|
205
|
+
q.playbackRateChanged=function(a){this.o=a};q.configure=function(a){this.v=a};function Hg(a){var b=a.v.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.v.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function Gg(a,b){a&&(b=b.filter(function(c){return eg(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",Fg);Fg.prototype.configure=Fg.prototype.configure;
|
|
206
|
+
Fg.prototype.playbackRateChanged=Fg.prototype.playbackRateChanged;Fg.prototype.setVariants=Fg.prototype.setVariants;Fg.prototype.getBandwidthEstimate=Fg.prototype.getBandwidthEstimate;Fg.prototype.segmentDownloaded=Fg.prototype.segmentDownloaded;Fg.prototype.disable=Fg.prototype.disable;Fg.prototype.enable=Fg.prototype.enable;Fg.prototype.chooseVariant=Fg.prototype.chooseVariant;Fg.prototype.init=Fg.prototype.init;Fg.prototype.stop=Fg.prototype.stop;function Ig(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Ig.prototype.add=function(a){return Jg(this.h,a)?(this.g.add(a),!0):!1};
|
|
207
|
+
function Jg(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&Kg(c,d)&&Lg(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Kg(c,d)&&Lg(c.roles,d.roles)));return c?!1:!0}Ig.prototype.values=function(){return this.g.values()};
|
|
208
|
+
function Kg(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return jf(g)}),d=b.codecs.split(",").map(function(g){return jf(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(jb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
|
|
209
|
+
function Lg(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Mg(a){this.g=a;this.h=new Ng(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Mg.prototype.create=function(a){var b=this,c=a.filter(function(d){return Jg(b.g,d)});return c.length?new Ig(c[0],c):this.h.create(a)};function Ng(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
210
|
+
Ng.prototype.create=function(a){var b=[];b=Og(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Pg(b,this.j);a.length&&(b=a);this.g&&(a=Zf(b,this.g),a.length&&(b=a));this.h&&(a=Qg(b,this.h),a.length&&(b=a));a=new Ig(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Jg(a.h,c)&&a.add(c);return a};function Og(a,b){var c=Tb(b),d=$b(c,a.map(function(e){return Zb(e)}));return d?a.filter(function(e){return d==Zb(e)}):[]}
|
|
211
|
+
function Pg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Qg(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Rg(){this.g=Sg;this.h=(new Map).set(Sg,2).set(Tg,1)}function Ug(a,b,c){a.h.set(Sg,c).set(Tg,b)}var Tg=0,Sg=1;function Vg(a,b){var c=Wg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.o=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
212
|
+
function Xg(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return z(d,new Promise(function(e){(new Q(e)).T(c/1E3)}),2)}a.h*=a.o;A(d)})}function Wg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Yg(a,b){this.promise=a;this.i=b;this.g=!1}function Zg(a){return new Yg(Promise.reject(a),function(){return Promise.resolve()})}function $g(){var a=Promise.reject(new P(2,7,7001));a["catch"](function(){});return new Yg(a,function(){return Promise.resolve()})}function ah(a){return new Yg(Promise.resolve(a),function(){return Promise.resolve()})}function bh(a){return new Yg(a,function(){return a["catch"](function(){})})}Yg.prototype.abort=function(){this.g=!0;return this.i()};
|
|
213
|
+
function ch(a){return new Yg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Yg.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
214
|
+
Yg.prototype.sa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=dh(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new We,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new Yg(f,function(){return d()})};
|
|
215
|
+
function dh(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Yg);Yg.prototype.chain=Yg.prototype.sa;Yg.prototype["finally"]=Yg.prototype["finally"];Yg.all=ch;Yg.prototype.abort=Yg.prototype.abort;Yg.notAbortable=bh;Yg.completed=ah;Yg.aborted=$g;Yg.failed=Zg;function eh(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function fh(a){var b={},c;for(c in a)b[c]=a[c];return b};function gh(){this.g=[]}function hh(a,b){a.g.push(b["finally"](function(){hd(a.g,b)}))}gh.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function ih(a){cb.call(this);this.i=!1;this.l=new gh;this.g=new Set;this.h=new Set;this.j=a||null;this.o=!1}u(ih,cb);q=ih.prototype;q.se=function(a){this.o=a};function jh(a,b,c,d){c=c||kh;var e=lh[a];if(!e||c>=e.priority)lh[a]={priority:c,Ag:b,Cg:void 0===d?!1:d}}q.Dg=function(a){this.g.add(a)};q.Tg=function(a){this.g["delete"](a)};q.Gf=function(){this.g.clear()};q.Eg=function(a){this.h.add(a)};q.Ug=function(a){this.h["delete"](a)};q.Hf=function(){this.h.clear()};
|
|
216
|
+
function mh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();cb.prototype.release.call(this);return this.l.destroy()};
|
|
217
|
+
q.request=function(a,b){var c=this,d=new nh;if(this.i){var e=Promise.reject(new P(2,7,7001));e["catch"](function(){});return new oh(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?eh(b.retryParameters):Wg();b.uris=eh(b.uris);e=ph(this,a,b);var f=e.sa(function(){return qh(c,a,b,new Vg(b.retryParameters,!1),0,null,d)}),g=f.sa(function(n){return rh(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
218
|
+
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.sa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.og||!c.j||t.fromCache||a!=sh||c.j(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new oh(m.promise,function(){return m.abort()},d);hh(this.l,e);return e};
|
|
219
|
+
function ph(a,b,c){var d=ah(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Jd:e.Jd},f=a.next())e.Jd=f.value,d=d.sa(function(g){return function(){c.body&&(c.body=nc(c.body));return g.Jd(b,c)}}(e));return d.sa(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})}
|
|
220
|
+
function qh(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new ob(c.uris[e]),k=h.Ya,l=!1;k||(k=location.protocol,k=k.slice(0,-1),pb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=lh[k])?k.Ag:null;if(!m)return Zg(new P(2,1,1E3,h));var n=k.Cg,p=null,t=null,v=!1,x;return bh(Xg(d)).sa(function(){if(a.i)return $g();x=Date.now();var w=m(c.uris[e],c,b,function(D,B,E){p&&p.stop();t&&t.T(C/1E3);a.j&&b==sh&&(a.j(D,B),l=!0,g.g=E)});if(!n)return w;var y=c.retryParameters.connectionTimeout;
|
|
221
|
+
y&&(p=new Q(function(){v=!0;w.abort()}),p.T(y/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new Q(function(){v=!0;w.abort()}));return w}).sa(function(w){p&&p.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);return{response:w,og:l}},function(w){p&&p.stop();t&&t.stop();if(a.i)return $g();v&&(w=new P(1,1,1003,c.uris[e],b));if(w instanceof P){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity){var y=(new Map).set("error",w);y=new N("retry",y);a.dispatchEvent(y);e=(e+1)%c.uris.length;
|
|
222
|
+
return qh(a,b,c,d,e,w,g)}}throw w;})}function rh(a,b,c){var d=ah(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.sa(function(g){return function(){var h=c.response;h.data&&(h.data=nc(h.data));return g.Kd(b,h)}}(e));return d.sa(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}M("shaka.net.NetworkingEngine",ih);ih.prototype.request=ih.prototype.request;ih.prototype.destroy=ih.prototype.destroy;
|
|
223
|
+
ih.makeRequest=mh;ih.defaultRetryParameters=function(){return Wg()};ih.prototype.clearAllResponseFilters=ih.prototype.Hf;ih.prototype.unregisterResponseFilter=ih.prototype.Ug;ih.prototype.registerResponseFilter=ih.prototype.Eg;ih.prototype.clearAllRequestFilters=ih.prototype.Gf;ih.prototype.unregisterRequestFilter=ih.prototype.Tg;ih.prototype.registerRequestFilter=ih.prototype.Dg;ih.unregisterScheme=function(a){delete lh[a]};ih.registerScheme=jh;ih.prototype.setForceHTTPS=ih.prototype.se;
|
|
224
|
+
function nh(){this.g=0}ih.NumBytesRemainingClass=nh;function oh(a,b,c){Yg.call(this,a,b);this.h=c}u(oh,Yg);ih.PendingRequest=oh;var sh=1;ih.RequestType={MANIFEST:0,SEGMENT:sh,LICENSE:2,APP:3,TIMING:4};var kh=3;ih.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:kh};var lh={};function th(){}function uh(a){a=vc(a);return(new ob(a)).ab}function vh(a,b,c){function d(h){pc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(mc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=xc(b,!0):e=b;a=vc(a);a=xc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",th);th.initDataTransform=vh;th.defaultGetContentId=uh;function wh(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function xh(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function yh(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function zh(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.B=new Set;this.g=this.o=null;this.ha=this.L=!1;this.I=0;this.i=null;this.h=new wf;this.j=new Map;this.D=[];this.A=new We;this.v=null;this.l=function(d){c.A.reject(d);a.onError(d)};this.ia=new Map;this.ba=new Map;this.Y=new Q(function(){return Ah(c)});this.H=!1;this.K=[];this.O=!1;this.ea=(new Q(function(){Bh(c)})).oa(b);this.A["catch"](function(){});this.M=new uf(function(){return Ch(c)});this.S=!1}q=zh.prototype;q.destroy=function(){return this.M.destroy()};
|
|
225
|
+
function Ch(a){return K(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.A.reject(),a.ea.stop(),a.ea=null,a.Y.stop(),a.Y=null,z(b,Dh(a),2);case 2:if(!a.g){b.C(3);break}F(b,4);return z(b,a.g.setMediaKeys(null),6);case 6:va(b,5);break;case 4:H(b);case 5:a.g=null;case 3:a.i=null,a.B.clear(),a.o=null,a.D=[],a.v=null,a.l=function(){},a.G=null,a.S=!1,A(b)}})}q.configure=function(a){this.v=a};function Eh(a,b,c,d){a.ha=!0;a.D=[];a.H=c;return Fh(a,b,!!d)}
|
|
226
|
+
function Gh(a,b,c,d){a.D=c;a.H=0<c.length;return Fh(a,b,!!d)}function Hh(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,initData:null,keyIds:null}];g.set(b,e);return Ih(a,g,[],!1)}
|
|
227
|
+
function Fh(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,w,y;return K(function(C){if(1==C.g){if(d=Jh(a))for(e=r(b),f=e.next();!f.done;f=e.next())g=f.value,g.video&&(g.video.drmInfos=[d]),g.audio&&(g.audio.drmInfos=[d]);h=b.some(function(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});h||(k=wh(a.v.servers),Kh(b,k));l=r(b);for(f=l.next();!f.done;f=l.next())for(m=f.value,n=Lh(m),p=r(n),t=p.next();!t.done;t=p.next())v=t.value,Mh(v,wh(a.v.servers),wh(a.v.advanced||{}));return c?
|
|
228
|
+
z(C,ng(b,a.H,a.S),2):(x=Nh(a,b),C.C(2))}w=h||Object.keys(a.v.servers).length;if(!w)return a.L=!0,C["return"](Promise.resolve());y=Ih(a,x,b,c);return C["return"](h?y:y["catch"](function(){}))})}
|
|
229
|
+
q.xc=function(a){var b=this,c,d;return K(function(e){if(1==e.g){if(!b.o)return b.h.Na(a,"encrypted",function(){b.l(new P(2,6,6010))}),e["return"]();b.g=a;b.h.Na(b.g,"play",function(){for(var f=r(b.K),g=f.next();!g.done;g=f.next())Oh(b,g.value);b.O=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.m(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Dh(b)});c=b.g.setMediaKeys(b.o);c=c["catch"](function(f){return Promise.reject(new P(2,6,6003,f.message))});return z(e,
|
|
230
|
+
c,2)}vf(b.M);Ph(b);b.i.initData.length||b.D.length||(d=function(f){return Qh(b,f.initDataType,mc(f.initData))},b.h.m(b.g,"encrypted",d));A(e)})};function Rh(a){var b;return K(function(c){if(1==c.g){if(!(a.o&&a.i&&a.i.serverCertificate&&a.i.serverCertificate.length))return c.C(0);F(c,3);return z(c,a.o.setServerCertificate(a.i.serverCertificate),5)}if(3!=c.g)return va(c,0);b=H(c);throw new P(2,6,6004,b.message);})}
|
|
231
|
+
function Sh(a,b){var c,d,e;return K(function(f){if(1==f.g)return z(f,Th(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.gb=new We,d.push(e.gb);d.push(c.remove());return z(f,Promise.all(d),3)}a.j["delete"](c);A(f)})}function Ph(a){for(var b=(a.i?a.i.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Qh(a,d.initDataType,d.initData);c=r(a.D);for(d=c.next();!d.done;d=c.next())Th(a,d.value);b.length||a.D.length||a.A.resolve();return a.A}
|
|
232
|
+
function Qh(a,b,c){var d=a.j.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(kc(c,e.value.initData)&&!Pc("Tizen 2"))return;Uh(a,b,c)}function Vh(a){return a?a.keySystem:""}function Wh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Xh(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(Qc()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.B.has(b)||a.B.has(c)}return a.B.has(b)}
|
|
233
|
+
function Yh(a){a=a.j.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.Bc=function(){var a=Infinity,b=this.j.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.jd=function(){return xh(this.ba)};
|
|
234
|
+
function Nh(a,b){for(var c=new Set,d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Lh(e.value));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=r(c);for(e=d.next();!e.done;e=d.next())Mh(e.value,wh(a.v.servers),wh(a.v.advanced||{}));f=a.H?"required":"optional";var g=a.H?["persistent-license"]:["temporary"];d=new Map;c=r(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:f,
|
|
235
|
+
sessionTypes:g,label:e.keySystem,drmInfos:[]});c=r(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=r([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=Zh(g),k=null;"ac-3"==g.codecs.toLowerCase()&&Qc()&&(k=Zh(g,"ec-3"));var l=r(g.drmInfos);for(e=l.next();!e.done;e=l.next()){var m=e.value;e=d.get(m.keySystem);e.drmInfos.push(m);m.initData&&m.initData.length&&(e.initDataTypes=[].concat(ha(new Set(m.initData.map(function(p){return p.initDataType})))));m.distinctiveIdentifierRequired&&
|
|
236
236
|
(e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");m.sessionType&&(e.sessionTypes=[m.sessionType]);m="audio"==g.type?m.audioRobustness:m.videoRobustness;var n={robustness:m||"",contentType:h};"audio"==g.type?e.audioCapabilities.push(n):e.videoCapabilities.push(n);k&&(m={robustness:m||"",contentType:k},"audio"==g.type?e.audioCapabilities.push(m):e.videoCapabilities.push(m))}}return d}
|
|
237
|
-
function
|
|
238
|
-
function
|
|
239
|
-
D.value;if(I.supported&&I.keySystemAccess){D=e.get(I.keySystemAccess.keySystem);var L=r(D);for(D=L.next();!D.done;D=L.next())if(!!D.value.licenseServerUri==B){f=I.keySystemAccess;break a}}}}f=null}y.C(2);break}return
|
|
240
|
-
t.next())v=n.value,a.B.add(v.contentType.toLowerCase());if(d){B=g.keySystem;C=e.get(g.keySystem);E=[];D=[];G=[];I=new Set;
|
|
241
|
-
C.next();!E.done;E=C.next())E=E.value,E.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(B.persistentStateRequired=E.persistentStateRequired);C=B}else C=g.keySystem,B=b.get(g.keySystem),E=[],D=[],G=[],I=new Set,
|
|
242
|
-
audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:D[0],initData:G,keyIds:I};a.i=C;if(!a.i.licenseServerUri)throw new
|
|
243
|
-
function
|
|
244
|
-
if(t!=k){v.C(6);break}
|
|
245
|
-
function
|
|
237
|
+
function Zh(a,b){var c=ef(a.mimeType,b||a.codecs);return af(c)?cf(a.type,c):c}
|
|
238
|
+
function Ih(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,x,w;return K(function(y){switch(y.g){case 1:e=new Map;if(d){a:{for(var C=r(c),D=C.next();!D.done;D=C.next()){var B=r(Lh(D.value));for(D=B.next();!D.done;D=B.next()){var E=D.value;e.has(E.keySystem)||e.set(E.keySystem,[]);e.get(E.keySystem).push(E)}}if(1==e.size&&e.has(""))throw new P(2,6,6E3);C=r([!0,!1]);for(B=C.next();!B.done;B=C.next())for(B=B.value,E=r(c),D=E.next();!D.done;D=E.next()){var G=r(D.value.decodingInfos);for(D=G.next();!D.done;D=G.next()){var I=
|
|
239
|
+
D.value;if(I.supported&&I.keySystemAccess){D=e.get(I.keySystemAccess.keySystem);var L=r(D);for(D=L.next();!D.done;D=L.next())if(!!D.value.licenseServerUri==B){f=I.keySystemAccess;break a}}}}f=null}y.C(2);break}return z(y,$h(a,b),3);case 3:f=y.h;case 2:g=f;if(!g)throw new P(2,6,6001);vf(a.M);F(y,4);a.B.clear();h=g.getConfiguration();k=h.audioCapabilities||[];l=h.videoCapabilities||[];m=r(k);for(n=m.next();!n.done;n=m.next())p=n.value,a.B.add(p.contentType.toLowerCase());t=r(l);for(n=t.next();!n.done;n=
|
|
240
|
+
t.next())v=n.value,a.B.add(v.contentType.toLowerCase());if(d){B=g.keySystem;C=e.get(g.keySystem);E=[];D=[];G=[];I=new Set;ai(C,E,D,G,I);L=a.H?"persistent-license":"temporary";B={keySystem:B,licenseServerUri:E[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||L,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:D[0],initData:G,keyIds:I};C=r(C);for(E=
|
|
241
|
+
C.next();!E.done;E=C.next())E=E.value,E.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(B.persistentStateRequired=E.persistentStateRequired);C=B}else C=g.keySystem,B=b.get(g.keySystem),E=[],D=[],G=[],I=new Set,ai(B.drmInfos,E,D,G,I),C={keySystem:C,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,sessionType:B.sessionTypes[0]||"temporary",
|
|
242
|
+
audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:D[0],initData:G,keyIds:I};a.i=C;if(!a.i.licenseServerUri)throw new P(2,6,6012,a.i.keySystem);return z(y,g.createMediaKeys(),6);case 6:return x=y.h,vf(a.M),a.o=x,a.L=!0,z(y,Rh(a),7);case 7:vf(a.M);va(y,0);break;case 4:w=H(y);vf(a.M,w);a.i=null;a.B.clear();if(w instanceof P)throw w;throw new P(2,6,6002,w.message);}})}
|
|
243
|
+
function $h(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return K(function(v){switch(v.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=r(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=r([!0,!1]);h=g.next();case 2:if(h.done){v.C(4);break}k=h.value;l=r(b.keys());m=l.next();case 5:if(m.done){h=g.next();v.C(2);break}n=m.value;p=b.get(n);t=p.drmInfos.some(function(x){return!!x.licenseServerUri});
|
|
244
|
+
if(t!=k){v.C(6);break}F(v,8);return z(v,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:return c=v.h,v["return"](c);case 8:H(v);case 9:vf(a.M);case 6:m=l.next();v.C(5);break;case 4:return v["return"](c)}})}
|
|
245
|
+
function Jh(a){a=wh(a.v.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=$c(f),h=$c(e);g={kty:"oct",kid:Yc(g,!1),k:Yc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:mc(wc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
246
246
|
sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
247
|
-
function
|
|
248
|
-
if(!f)return a.j["delete"](c),a.l(new
|
|
249
|
-
function
|
|
250
|
-
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.l(new
|
|
251
|
-
function
|
|
252
|
-
l.promise,4);case 4:k=w.h;
|
|
253
|
-
x.T(
|
|
254
|
-
function
|
|
255
|
-
|
|
256
|
-
function
|
|
257
|
-
c],f=new Map,g=function(l){var m,n,p;return
|
|
258
|
-
function
|
|
259
|
-
function
|
|
260
|
-
function
|
|
261
|
-
function
|
|
247
|
+
function Th(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.o.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.m(c,"message",function(k){a.g&&a.v.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.O?a.K.push(k):Oh(a,k)});a.h.m(c,"keystatuseschange",function(k){return bi(a,k)});e={initData:null,loaded:!1,fe:Infinity,gb:null,type:"persistent-license"};a.j.set(c,e);F(h,2);return z(h,c.load(b),4);case 4:f=h.h;vf(a.M);
|
|
248
|
+
if(!f)return a.j["delete"](c),a.l(new P(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;ci(a)&&a.A.resolve();return h["return"](c);case 2:g=H(h),vf(a.M,g),a.j["delete"](c),a.l(new P(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
249
|
+
function Uh(a,b,c){var d=a.i.sessionType;try{var e=a.o.createSession(d)}catch(f){a.l(new P(2,6,6005,f.message));return}a.h.m(e,"message",function(f){a.g&&a.v.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.O?a.K.push(f):Oh(a,f)});a.h.m(e,"keystatuseschange",function(f){return bi(a,f)});a.j.set(e,{initData:c,loaded:!1,fe:Infinity,gb:null,type:d});try{c=a.v.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.l(b);return}a.v.logLicenseExchange&&Yc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.M.g){a.j["delete"](e);
|
|
250
|
+
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.l(new P(2,6,6006,f.message,f,h))}})}function di(a,b,c){"skd"==b&&(b=c.serverCertificate,c=uh(a),a=vh(a,c,b));return a}
|
|
251
|
+
function Oh(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;K(function(w){switch(w.g){case 1:return c=b.target,a.v.logLicenseExchange&&Yc(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.v.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=mh([e],a.v.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Wh(a.i.keySystem)&&ei(g),h=Date.now(),F(w,2),l=a.G.hc.request(2,g),z(w,
|
|
252
|
+
l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=H(w),n=new P(2,6,6007,m),a.l(n),d&&d.gb&&d.gb.reject(n),w["return"]();case 3:if(a.M.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.v.logLicenseExchange&&Yc(k.data);F(w,5);return z(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=H(w),t=new P(2,6,6008,p.message),a.l(t),d&&d.gb&&d.gb.reject(t),w["return"]();case 6:v=new N("drmsessionupdate"),a.G.onEvent(v),d&&(d.gb&&d.gb.resolve(),x=new Q(function(){d.loaded=!0;ci(a)&&a.A.resolve()}),
|
|
253
|
+
x.T(fi)),A(w)}})}function ei(a){var b=tc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Zc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
254
|
+
function bi(a,b){var c=b.target,d=a.j.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Wh(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=pc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=ad(h);a.ia.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.gb&&(a.j["delete"](c),c.close()["catch"](function(){}));
|
|
255
|
+
ci(a)&&(a.A.resolve(),a.Y.T(gi))}function Ah(a){var b=a.ia,c=a.ba;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.l(new P(2,6,6014));a.G.pd(xh(c))}
|
|
256
|
+
function hi(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
|
|
257
|
+
c],f=new Map,g=function(l){var m,n,p;return K(function(t){switch(t.g){case 1:return F(t,2),z(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Pc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),z(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:H(t),f.set(l,null),A(t)}})},h=a.map(function(l){return g(l)}),z(k,Promise.all(h),2)):k["return"](xh(f))})}
|
|
258
|
+
function ii(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).T(ji)}),F(c,2),z(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);H(c);A(c)})}
|
|
259
|
+
function Dh(a){var b;return K(function(c){b=Array.from(a.j.entries());a.j.clear();return z(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return F(g,2),a.ha||a.D.includes(e.sessionId)||"persistent-license"!==f.type?z(g,ii(e),5):z(g,e.remove(),5);if(2!=g.g)return va(g,0);H(g);A(g)})})),0)})}
|
|
260
|
+
function mg(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted&&(c=Zh(c),!Xh(a,c))||d&&d.encrypted&&(d=Zh(d),!Xh(a,d)))return!1;var e=Vh(a.i);d=Lh(b);return 0==d.length||d.some(function(f){return f.keySystem==e})}
|
|
261
|
+
function ki(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Wa:f.Wa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Wa=[];f.Wa=f.Wa.concat(e.initData||[]);f.Wa=f.Wa.concat(h.initData||[]);f.Wa=f.Wa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Wa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ha(e.keyIds),ha(h.keyIds))):
|
|
262
262
|
e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,initData:f.Wa,keyIds:g});break}}return c}
|
|
263
|
-
function
|
|
264
|
-
function
|
|
265
|
-
function
|
|
266
|
-
n.initDataType&&
|
|
267
|
-
function
|
|
268
|
-
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var
|
|
269
|
-
function
|
|
270
|
-
|
|
271
|
-
function
|
|
272
|
-
|
|
273
|
-
q.
|
|
274
|
-
q.
|
|
275
|
-
q.
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
function
|
|
279
|
-
c||0==c&&!a.o||(d=b.start(c),d>=a.D.
|
|
280
|
-
function
|
|
281
|
-
function
|
|
282
|
-
function
|
|
283
|
-
l-3);h<k&&(h=
|
|
284
|
-
function
|
|
285
|
-
function
|
|
263
|
+
function Lh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Bh(a){a.j.forEach(function(b,c){var d=b.fe,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.fe=e)})}function ci(a){a=a.j.values();return fb(a,function(b){return b.loaded})}
|
|
264
|
+
function Kh(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
|
|
265
|
+
function ai(a,b,c,d,e){var f={};a=r(a);for(var g=a.next();!g.done;f={Ra:f.Ra},g=a.next()){f.Ra=g.value;b.includes(f.Ra.licenseServerUri)||b.push(f.Ra.licenseServerUri);f.Ra.serverCertificate&&(c.some(function(l){return function(m){return kc(m,l.Ra.serverCertificate)}}(f))||c.push(f.Ra.serverCertificate));if(f.Ra.initData){g={};for(var h=r(f.Ra.initData),k=h.next();!k.done;g={Tc:g.Tc},k=h.next())g.Tc=k.value,d.some(function(l){return function(m){var n=l.Tc;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
|
|
266
|
+
n.initDataType&&kc(m.initData,n.initData)}}(g))||d.push(g.Tc)}if(f.Ra.keyIds)for(g=r(f.Ra.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
|
|
267
|
+
function Mh(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))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||
|
|
268
|
+
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var ji=1,fi=5,gi=.5,li=new qc(function(){return nc(new Uint8Array([0]))});function mi(){}function ni(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=oi[d.toLowerCase()]))return k["return"](e);if(f=pi(a))if(g=qi[f])return k["return"](g);return d?k.C(2):z(k,ri(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=oi[d]))return k["return"](h);throw new P(2,4,4E3,a);})}
|
|
269
|
+
function ri(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=mh([a],c),d.method="HEAD",z(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function pi(a){a=(new ob(a)).Pa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",mi);mi.unregisterParserByMime=function(a){delete oi[a]};mi.registerParserByMime=function(a,b){oi[a]=b};
|
|
270
|
+
mi.registerParserByExtension=function(a,b){qi[a]=b};var oi={},qi={};function si(a,b,c){this.Ga=a;this.Da=b;this.wa=c}si.prototype.Fc=function(){return this.Da};si.prototype.Ac=function(){return this.wa};function ti(a,b){return a&&b?a.Fc()==b.Fc()&&a.Ac()==b.Ac()&&jd(a.Ga(),b.Ga()):a==b}M("shaka.media.InitSegmentReference",si);si.prototype.getEndByte=si.prototype.Ac;si.prototype.getStartByte=si.prototype.Fc;
|
|
271
|
+
function ui(a,b,c,d,e,f,g,h,k,l){l=void 0===l?[]:l;this.startTime=a;this.j=this.endTime=b;this.i=c;this.Da=d;this.wa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l}q=ui.prototype;q.Ga=function(){return this.i()};q.ig=function(){return this.startTime};q.Uf=function(){return this.endTime};q.Fc=function(){return this.Da};q.Ac=function(){return this.wa};M("shaka.media.SegmentReference",ui);ui.prototype.getEndByte=ui.prototype.Ac;ui.prototype.getStartByte=ui.prototype.Fc;
|
|
272
|
+
ui.prototype.getEndTime=ui.prototype.Uf;ui.prototype.getStartTime=ui.prototype.ig;ui.prototype.getUris=ui.prototype.Ga;function R(a,b,c){this.j=a;this.sd=b;this.o=this.l=Infinity;this.g=1;this.h=this.i=null;this.A=0;this.B=!0;this.D=0;this.H=void 0===c?!0:c;this.I=0}q=R.prototype;q.getDuration=function(){return this.l};q.cg=function(){return this.g};q.fb=function(a){this.l=a};q.gg=function(){return this.j};q.pf=function(a){this.A=a};q.Qc=function(a){this.B=a};q.xe=function(a){this.o=a};q.Qg=function(a){this.sd=a};q.Tf=function(){return this.sd};
|
|
273
|
+
q.ic=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.be(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.j&&this.H&&(this.j=(Date.now()+this.A)/1E3-this.h-this.g)}};q.be=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.ae=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.Z=function(){return Infinity==this.l&&!this.B};
|
|
274
|
+
q.Mb=function(){return Infinity!=this.l&&!this.B};q.pb=function(){return Math.max(this.D,this.Ib()-this.o)};q.sf=function(a){this.D=a};q.Ib=function(){return this.Z()||this.Mb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.j)+this.I,this.l):this.h||this.l};q.Ec=function(a){var b=Math.max(this.i,this.D);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ib()-this.o+a,this.ob()))};q.dc=function(){return this.Ec(0)};
|
|
275
|
+
q.ob=function(){return Math.max(0,this.Ib()-(this.Z()||this.Mb()?this.sd:0))};q.wf=function(){return null==this.j||null!=this.h&&this.H?!1:!0};q.nf=function(a){this.I=a};M("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.nf;R.prototype.usingPresentationStartTime=R.prototype.wf;R.prototype.getSeekRangeEnd=R.prototype.ob;R.prototype.getSeekRangeStart=R.prototype.dc;R.prototype.getSafeSeekRangeStart=R.prototype.Ec;R.prototype.getSegmentAvailabilityEnd=R.prototype.Ib;
|
|
276
|
+
R.prototype.setUserSeekStart=R.prototype.sf;R.prototype.getSegmentAvailabilityStart=R.prototype.pb;R.prototype.isInProgress=R.prototype.Mb;R.prototype.isLive=R.prototype.Z;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.ae;R.prototype.notifyMinSegmentStartTime=R.prototype.be;R.prototype.notifySegments=R.prototype.ic;R.prototype.getDelay=R.prototype.Tf;R.prototype.setDelay=R.prototype.Qg;R.prototype.setSegmentAvailabilityDuration=R.prototype.xe;
|
|
277
|
+
R.prototype.setStatic=R.prototype.Qc;R.prototype.setClockOffset=R.prototype.pf;R.prototype.getPresentationStartTime=R.prototype.gg;R.prototype.setDuration=R.prototype.fb;R.prototype.getMaxSegmentDuration=R.prototype.cg;R.prototype.getDuration=R.prototype.getDuration;function vi(a,b){this.j=a;this.o=wi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}vi.prototype.release=function(){this.j=null;this.i=function(){}};function xi(a,b){a.i=b}function yi(a){this.g=a}function wi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Ue(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 zi(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.v=c;this.B=e;this.h=new wf;this.A=!1;this.H=a.readyState;this.j=!1;this.i=d;this.o=!1;this.h.m(a,"waiting",function(){return Ai(f)});this.l=(new Q(function(){Ai(f)})).oa(.25)}zi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.D=this.B=null};zi.prototype.ge=function(){this.o=!0;Ai(this)};
|
|
278
|
+
function Ai(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.A)return}else a.A=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.H&&(a.j=!1,a.H=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=wi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.o!=d)b.l=f,b.g=e,b.o=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.v.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Ve(b,g,a.v.gapDetectionThreshold);if(!(null==
|
|
279
|
+
c||0==c&&!a.o||(d=b.start(c),d>=a.D.ob()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new N("largegap",g),g.cancelable=!0,a.B(g),a.v.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ei(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Fi.value().get(b),c.Na(a,b,d))}var Fi=new qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Gi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.o=!1;this.h=new wf;this.i=new Hi(a);Ei(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ii(d,d.j)})}Gi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ji(a){return a.o?a.g.currentTime:a.j}function Ki(a,b){0<a.g.readyState?Li(a.i,b):Ei(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ii(a,a.j)})}
|
|
280
|
+
function Ii(a,b){.001>Math.abs(a.g.currentTime-b)?Mi(a):(a.h.Na(a.g,"seeking",function(){Mi(a)}),Li(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Mi(a){a.o=!0;a.h.m(a.g,"seeking",function(){return a.l()})}function Hi(a){var b=this;this.h=a;this.o=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Hi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
281
|
+
function Li(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.o;a.h.currentTime=b;a.g.oa(.1)};function Ni(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.Na(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.i))}var c=this;this.g=a;this.j=!1;this.i=null;this.h=new wf;Ei(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Ni.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Ni.prototype.o=function(a){this.i=this.j?this.i:a};Ni.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Ni.prototype.H=function(){};
|
|
282
|
+
function Oi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.I=b.minBufferTime||0;this.v=c;this.D=e;this.B=null;this.j=new zi(a,b.presentationTimeline,c,Pi(a,c),f);this.h=new Gi(a,function(){a:{var h=g.j;h.A=!0;h.o=!1;h.j=!1;var k=Ji(g.h);h=Qi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Ki(g.h,h);h=void 0;break a}g.D();h=void 0}return h},Ri(this,d));this.A=(new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ji(g.h),k=g.g.dc(),l=g.g.ob();3>l-k&&(k=
|
|
283
|
+
l-3);h<k&&(h=Qi(g,h),g.i.currentTime=h)}})).oa(.25)}Oi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.A&&(this.A.stop(),this.A=null);this.i=this.h=this.g=this.v=null;this.D=function(){}};Oi.prototype.o=function(a){Ki(this.h,a)};Oi.prototype.l=function(){var a=Ji(this.h);return 0<this.i.readyState&&!this.i.paused?Si(this,a):a};
|
|
284
|
+
function Ri(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.dc():a.g.ob():0>b&&(b=a.g.ob()+b);return Ti(a,Si(a,b))}Oi.prototype.H=function(){this.j.ge()};function Ti(a,b){var c=a.g.getDuration();return b>=c?c-a.v.durationBackoff:b}function Qi(a,b){var c=Math.max(a.I,a.v.rebufferingGoal),d=a.v.safeSeekOffset,e=a.g.dc(),f=a.g.ob(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ec(c),k=a.g.Ec(d);c=a.g.Ec(c+d);return b>=g?Ti(a,b):b>f?f:b<e?Se(a.i.buffered,k)?k:c:b>=h||Se(a.i.buffered,b)?b:c}
|
|
285
|
+
function Si(a,b){var c=a.g.dc();if(b<c)return c;c=a.g.ob();return b>c?c:b}function Pi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new vi(new yi(a),b.stallThreshold);xi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Ui(a){this.P=a;this.g=null;this.h=0;this.i=!1}q=Ui.prototype;q.destroy=function(){Db("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.P=[],this.g&&this.g.stop(),this.g=null)};q.ug=function(){this.i=!0};
|
|
286
286
|
q.find=function(a){for(var b=this.P.length-1,c=b;0<=c;--c){var d=this.P[c],e=c<b?this.P[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.P.length&&a<this.P[0].startTime?this.h:null};q.get=function(a){if(0==this.P.length)return null;a-=this.h;return 0>a||a>=this.P.length?null:this.P[a]};q.offset=function(a){if(!this.i)for(var b=r(this.P),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
|
|
287
|
-
q.nd=function(a){!this.i&&a.length&&(this.P=this.P.filter(function(b){return b.startTime<a[0].startTime}),this.P.push.apply(this.P,ha(a)))};q.
|
|
288
|
-
q.
|
|
289
|
-
q.xd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new
|
|
290
|
-
function
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.P.length}return null};q.offset=function(){};q.nd=function(){};q.
|
|
295
|
-
|
|
296
|
-
function
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
function
|
|
300
|
-
function
|
|
301
|
-
function
|
|
302
|
-
function
|
|
303
|
-
f=8*h/k<(g||0)-f-Math.max(a.F.minBufferTime||0,a.v.rebufferingGoal)||b.Oa.h.g>h?!0:!1):f=!1;f&&b.Oa.abort();
|
|
304
|
-
function
|
|
305
|
-
(m=
|
|
306
|
-
|
|
307
|
-
8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.o||!f.every(function(k){return k.endOfStream})){h.C(0);break}return
|
|
308
|
-
function
|
|
309
|
-
g.next();!h.done;h=g.next())h=h.value,
|
|
310
|
-
function
|
|
311
|
-
function
|
|
312
|
-
B=n.subarray(0,D);n=n.subarray(D);return
|
|
313
|
-
e.
|
|
314
|
-
function
|
|
315
|
-
function
|
|
316
|
-
case 4:return n=v.h,
|
|
317
|
-
function
|
|
318
|
-
k=k.reader.
|
|
319
|
-
function
|
|
320
|
-
function
|
|
321
|
-
function
|
|
322
|
-
function
|
|
323
|
-
function
|
|
324
|
-
function
|
|
325
|
-
function
|
|
326
|
-
q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&
|
|
327
|
-
g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={
|
|
328
|
-
d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(
|
|
329
|
-
function
|
|
330
|
-
function
|
|
331
|
-
!0)}),this.A.observe(this.i))}q=
|
|
332
|
-
q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});
|
|
333
|
-
function
|
|
334
|
-
h=r(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Ne)}}function
|
|
335
|
-
function
|
|
336
|
-
function
|
|
337
|
-
"center";else{if(c.nestedCues.length)var l=b;else l=
|
|
338
|
-
c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=
|
|
339
|
-
c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==
|
|
340
|
-
"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==
|
|
341
|
-
function
|
|
342
|
-
|
|
343
|
-
g.nestedCues=[];g.payload=b(f);return g}return f});a="WEBVTT\n\n";c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=function(f){var g=Math.floor(f/3600),h=Math.floor(f/60%60),k=Math.floor(f%60);f=Math.floor(1E3*f%1E3);return(10>g?"0":"")+g+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>f?10>f?"00":"0":"")+f};a+=e(d.startTime)+" --\x3e "+e(d.endTime)+"\n";a+=d.payload+"\n\n"}return a}
|
|
344
|
-
function
|
|
345
|
-
k),g=!1)}return g}function
|
|
346
|
-
function
|
|
287
|
+
q.nd=function(a){!this.i&&a.length&&(this.P=this.P.filter(function(b){return b.startTime<a[0].startTime}),this.P.push.apply(this.P,ha(a)))};q.fc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.P.length||d.endTime>c.P[0].startTime)});this.nd(a);this.Gb(b)};q.Gb=function(a){if(!this.i){var b=this.P.length;this.P=this.P.filter(function(c){return c.endTime>a});this.h+=b-this.P.length}};
|
|
288
|
+
q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],this.P[this.P.length-1]=new ui(a.startTime,b,a.i,a.Da,a.wa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd))}};
|
|
289
|
+
q.xd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.P.push.apply(c.P,ha(d)):(c.g.stop(),c.g=null)}),this.g.oa(a))};Ui.prototype[Symbol.iterator]=function(){return this.bc(0)};Ui.prototype.bc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Vi(this,b,d)};
|
|
290
|
+
function Wi(a,b,c){return new Ui([new ui(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",Ui);Ui.forSingleSegment=Wi;Ui.prototype.getIteratorForTime=Ui.prototype.bc;Ui.prototype.updateEvery=Ui.prototype.xd;Ui.prototype.fit=Ui.prototype.yb;Ui.prototype.evict=Ui.prototype.Gb;Ui.prototype.mergeAndEvict=Ui.prototype.fc;Ui.prototype.merge=Ui.prototype.nd;Ui.prototype.offset=Ui.prototype.offset;Ui.prototype.get=Ui.prototype.get;Ui.prototype.find=Ui.prototype.find;
|
|
291
|
+
Ui.prototype.markImmutable=Ui.prototype.ug;Ui.prototype.release=Ui.prototype.release;Ui.prototype.destroy=Ui.prototype.destroy;function Vi(a,b,c){this.i=a;this.h=b;this.g=c}Vi.prototype.seek=function(a){Db("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.bc(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
|
|
292
|
+
Vi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.Ga().length&&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};Vi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.Ga().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Vi);Vi.prototype.next=Vi.prototype.next;Vi.prototype.current=Vi.prototype.current;
|
|
293
|
+
Vi.prototype.seek=Vi.prototype.seek;function Xi(){Ui.call(this,[]);this.j=[]}u(Xi,Ui);q=Xi.prototype;q.clone=function(){var a=new Xi;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.P.length}return null};
|
|
294
|
+
q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.P.length}return null};q.offset=function(){};q.nd=function(){};q.Gb=function(){};q.fc=function(){};q.yb=function(){};q.xd=function(){};M("shaka.media.MetaSegmentIndex",Xi);Xi.prototype.updateEvery=Xi.prototype.xd;Xi.prototype.fit=Xi.prototype.yb;Xi.prototype.mergeAndEvict=Xi.prototype.fc;Xi.prototype.evict=Xi.prototype.Gb;Xi.prototype.merge=Xi.prototype.nd;
|
|
295
|
+
Xi.prototype.offset=Xi.prototype.offset;Xi.prototype.get=Xi.prototype.get;Xi.prototype.find=Xi.prototype.find;Xi.prototype.release=Xi.prototype.release;function Yi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ld();this.h=new Q(function(){b.g.cf(.25*b.i)})}Yi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Yi.prototype.set=function(a){this.i=a;Zi(this)};Yi.prototype.hd=function(){return this.g.hd()};function Zi(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ld()!=b&&a.g.ve(b);return}catch(c){}a.h.oa(.25);0!=a.g.ld()&&a.g.ve(0)};function $i(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){aj(b,!1)})).oa(.25)}$i.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
|
|
296
|
+
function aj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=r(d.i.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.g.get(h),l=e<h.startTime?bj:e>h.endTime?cj:dj;d.g.set(h,l);for(var m=r(d.j),n=m.next();!n.done;n=m.next())n=n.value,n.Vb==k&&n.Ub==l&&n.Lb(h,f)}}};function ej(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new N("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).oa(2)}u(ej,cb);ej.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function fj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.j=[{Vb:null,Ub:dj,Lb:function(c,d){return gj(b,"enter",c,d)}},{Vb:bj,Ub:dj,Lb:function(c,d){return gj(b,"enter",c,d)}},{Vb:cj,Ub:dj,Lb:function(c,d){return gj(b,"enter",c,d)}},{Vb:dj,Ub:bj,Lb:function(c,d){return gj(b,"exit",c,d)}},{Vb:dj,Ub:cj,Lb:function(c,d){return gj(b,"exit",c,d)}},{Vb:bj,Ub:cj,Lb:function(c,d){return gj(b,"skip",c,d)}},{Vb:cj,Ub:bj,Lb:function(c,d){return gj(b,"skip",c,d)}}];this.h=new wf;this.h.m(this.i,"regionremove",
|
|
297
|
+
function(c){b.g["delete"](c.region)})}u(fj,cb);fj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};function gj(a,b,c,d){b=new N(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var bj=1,dj=2,cj=3;function hj(a,b,c,d,e){a=mh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ij(a,b){var c=this;this.G=b;this.F=a;this.v=null;this.l=1;this.i=this.h=null;this.g=new Map;this.o=!1;this.A=null;this.j=!1;this.M=new uf(function(){return jj(c)})}ij.prototype.destroy=function(){return this.M.destroy()};function jj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=r(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,kj(e),b.push(lj(e));return z(f,Promise.all(b),2)}a.g.clear();a.G=null;a.F=null;a.v=null;A(f)})}
|
|
298
|
+
ij.prototype.configure=function(a){this.v=a;this.A=new Vg({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)};ij.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return z(b,mj(a),2);vf(a.M);a.o=!0;A(b)})};
|
|
299
|
+
function nj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=Rb,F(k,2),z(k,Sf(a.G.W,c.ra),4);case 4:va(k,3);break;case 2:if(d=H(k),a.G)a.G.onError(d);case 3:e=ef(b.mimeType,b.codecs);Gf(a.G.W,e);f=a.G.W.o;if(g=f.isTextVisible()||a.v.alwaysStreamText)h=oj(b),a.g.set(c.ra,h),pj(a,h,0);A(k)}})}function qj(a){var b=a.g.get(Qb);b&&(kj(b),lj(b)["catch"](function(){}),a.g["delete"](Qb));a.i=null}
|
|
300
|
+
function rj(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Rb&&(sj(a,e,!1,0,!1),c.Rb=d)}else if(d=c.Rb)c.Rb=null,sj(a,d,!0,0,!1)}}function tj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.o&&(b.video&&sj(a,b.video,c,d,e),b.audio&&sj(a,b.audio,c,d,e))}function uj(a,b){a.i=b;a.o&&sj(a,b,!0,0,!1)}
|
|
301
|
+
function sj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=Qb?f&&(f.Rb&&(b.trickModeVideo?(f.Rb=b,b=b.trickModeVideo):f.Rb=null),f.stream!=b||e)&&(b.type==Qb&&Gf(a.G.W,ef(b.mimeType,b.codecs)),f.stream=b,f.va=null,c&&(f.yc?f.Bd=!0:f.eb?(f.Tb=!0,f.cd=d,f.Bd=!0):(kj(f),vj(a,f,!0,d)["catch"](function(g){if(a.G)a.G.onError(g)}))),wj(a,f)["catch"](function(g){if(a.G)a.G.onError(g)})):nj(a,b)}
|
|
302
|
+
function wj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.Oa)return e["return"]();c=b.stream;d=b.Oa;return c.segmentIndex?e.C(2):z(e,c.createSegmentIndex(),2)}if(b.Oa!=d||b.stream!=c)return e["return"]();var f=a.G.kd();var g=Lf(a.G.W,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.wa?k.wa-k.Da:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.wa?k.wa-k.Da:null)||0),k=a.G.getBandwidthEstimate(),
|
|
303
|
+
f=8*h/k<(g||0)-f-Math.max(a.F.minBufferTime||0,a.v.rebufferingGoal)||b.Oa.h.g>h?!0:!1):f=!1;f&&b.Oa.abort();A(e)})}function xj(a,b){b.yc||b.Tb||(b.eb?(b.Tb=!0,b.cd=0):null==Jf(a.G.W,b.type)?null==b.hb&&pj(a,b,0):(kj(b),vj(a,b,!1,0)["catch"](function(c){if(a.G)a.G.onError(c)})))}
|
|
304
|
+
function mj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=Rb;if(!a.h)throw new P(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.Cb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.ib,a.h.video),d.add(a.h.video));a.i&&(c.set(b.ra,a.i),d.add(a.i));e=a.G.W;f=a.v.forceTransmuxTS;return z(n,e.init(c,f),2)}vf(a.M);var p=a.F.presentationTimeline.getDuration();Infinity>p?a.G.W.fb(p):a.G.W.fb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
|
|
305
|
+
(m=oj(l),a.g.set(k,m),pj(a,m,0));A(n)})}function oj(a){return{stream:a,type:a.type,va:null,Ua:null,md:null,Wd:null,Vd:null,Ud:null,Rb:null,endOfStream:!1,eb:!1,hb:null,Tb:!1,cd:0,Bd:!1,yc:!1,je:!1,Gc:!1,Oa:null}}
|
|
306
|
+
ij.prototype.Lc=function(a){var b=this,c,d,e,f,g;return K(function(h){switch(h.g){case 1:vf(b.M);if(a.eb||null==a.hb||a.yc)return h["return"]();a.hb=null;if(!a.Tb){h.C(2);break}return z(h,vj(b,a,a.Bd,a.cd),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.C(4);break}c=a.stream;return z(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.hb&&pj(b,a,0),h["return"]();case 4:F(h,6);d=yj(b,a);null!=d&&(pj(b,a,d),a.Gc=!1);va(h,7);break;case 6:return e=H(h),z(h,zj(b,e),
|
|
307
|
+
8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.o||!f.every(function(k){return k.endOfStream})){h.C(0);break}return z(h,b.G.W.endOfStream(),10);case 10:vf(b.M),g=b.G.W.getDuration(),0!=g&&g<b.F.presentationTimeline.getDuration()&&b.F.presentationTimeline.fb(g),A(h)}})};
|
|
308
|
+
function yj(a,b){if(Aj(b))return Qf(a.G.W,b.stream.originalId||""),null;b.type==Qb&&Rf(a.G.W);var c=a.G.kd(),d=b.Ua?b.Ua.endTime:c,e=Mf(a.G.W,b.type,c),f=Math.max(a.F.minBufferTime||0,a.v.rebufferingGoal,a.v.bufferingGoal)*a.l;if(1E-6>a.F.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(Qb))&&Aj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=Lf(a.G.W,b.type);e=Bj(a,b,c,e);if(!e)return 1;f=Infinity;var g=Array.from(a.g.values());g=r(g);for(var h=
|
|
309
|
+
g.next();!h.done;h=g.next())h=h.value,Aj(h)||h.va&&!h.va.current()||(f=Math.min(f,h.Ua?h.Ua.endTime:c));if(d>=f+a.F.presentationTimeline.g)return 1;Cj(a,b,c,e)["catch"](function(){});return null}
|
|
310
|
+
function Bj(a,b,c,d){if(b.va)return b.va.current();if(b.Ua||d)return b.va=b.stream.segmentIndex.bc(b.Ua?b.Ua.endTime:d),b.va&&b.va.next().value;a=a.v.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.va=b.stream.segmentIndex.bc(d),e=b.va&&b.va.next().value);e||(b.va=b.stream.segmentIndex.bc(c),e=b.va&&b.va.next().value);return e}
|
|
311
|
+
function Cj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,x;return K(function(w){switch(w.g){case 1:return e=Rb,f=b.stream,g=b.va,b.eb=!0,F(w,2),z(w,Dj(a,b,d),4);case 4:vf(a.M);if(a.j)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.v.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(y){var C,D,B;return K(function(E){vf(a.M);if(a.j)return E["return"]();n=Ej(n,y);C=!1;D=0;(new Bc).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return E.C(0);
|
|
312
|
+
B=n.subarray(0,D);n=n.subarray(D);return z(E,Fj(a,b,c,f,d,B),0)})},z(w,Gj(a,b,d,p),6);l=Gj(a,b,d);return z(w,l,7);case 7:return m=w.h,vf(a.M),a.j?w["return"]():b.Tb?(b.eb=!1,pj(a,b,0),w["return"]()):z(w,Fj(a,b,c,f,d,m),6);case 6:vf(a.M);if(a.j)return w["return"]();b.Ua=d;g.next();b.eb=!1;b.je=!1;t=a.G.W.gd();v=t[b.type];Va(JSON.stringify(v));b.Tb||a.G.ge();pj(a,b,0);va(w,0);break;case 2:x=H(w);vf(a.M,x);if(a.j)return w["return"]();b.eb=!1;if(7001==x.code)b.eb=!1,b.hb=null,pj(a,b,0),w.C(0);else if(b.type==
|
|
313
|
+
e.ra&&a.v.ignoreTextStreamFailures)a.g["delete"](e.ra),w.C(0);else if(3017==x.code)Hj(a,b,x),w.C(0);else if(1001==x.code&&x.data&&404==x.data[1])b.eb=!1,b.hb=null,pj(a,b,1),w.C(0);else return b.Gc=!0,x.severity=2,z(w,zj(a,x),0)}})}function Ej(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
314
|
+
function Hj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.je})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.Gc=!0;a.j=!0;a.G.onError(c);return}b.je=!0}pj(a,b,4)}
|
|
315
|
+
function Dj(a,b,c){var d,e,f,g,h,k,l;return K(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Wd||e!=b.Vd||f!=b.Ud)h=function(){var n;return K(function(p){if(1==p.g)return F(p,2),b.Vd=e,b.Ud=f,b.Wd=g,z(p,Tf(a.G.W,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=H(p);b.Vd=null;b.Ud=null;b.Wd=null;throw n;})},d.push(h());!ti(c.h,b.md)&&(b.md=c.h)&&(k=Gj(a,b,c.h),l=function(){var n,p,t;return K(function(v){switch(v.g){case 1:return F(v,2),z(v,k,4);
|
|
316
|
+
case 4:return n=v.h,vf(a.M),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,z(v,Nf(a.G.W,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=H(v),b.md=null,t;}})},d.push(l()));return z(m,Promise.all(d),0)})}
|
|
317
|
+
function Fj(a,b,c,d,e,f){var g;return K(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new Bc).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Nc();var n=k.reader.Nc();var p=k.reader.R();var t=k.reader.R();var v=k.reader.R();var x=k.reader.R();var w=e.startTime+t/p}else p=k.reader.R(),w=k.reader.mc()/p+e.timestampOffset,t=w-e.startTime,v=k.reader.R(),x=k.reader.R(),m=k.reader.Nc(),n=k.reader.Nc();
|
|
318
|
+
k=k.reader.Ab(k.reader.V.byteLength-k.reader.ma());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.G.yg():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:x,messageData:k}),l=new N(Ij,l),a.G.onEvent(l)))}).parse(f),z(h,Jj(a,b,c),2);if(3!=h.g)return vf(a.M),z(h,Nf(a.G.W,b.type,f,e.startTime,e.endTime,g),3);vf(a.M);A(h)})}
|
|
319
|
+
function Jj(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.v.bufferBehind,a.F.presentationTimeline.g);e=Jf(a.G.W,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():z(h,a.G.W.remove(b.type,e,e+g),2)}vf(a.M);A(h)})}function Aj(a){return a&&a.type==Qb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
320
|
+
function Gj(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g)return e=sh,f=hj(c.Ga(),c.Da,c.wa,a.v.retryParameters,d),g=a.G.hc.request(e,f),b.Oa=g,z(k,g.promise,2);h=k.h;b.Oa=null;return k["return"](h.data)})}
|
|
321
|
+
function vj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Tb=!1,b.Bd=!1,b.cd=0,b.yc=!0,b.Ua=null,b.md=null,b.va=null,d?(e=a.G.kd(),f=a.G.W.getDuration(),z(g,a.G.W.remove(b.type,e+d,f),3)):z(g,Sf(a.G.W,b.type),4);if(3!=g.g)return vf(a.M),c?z(g,a.G.W.flush(b.type),3):g.C(3);vf(a.M);b.yc=!1;b.endOfStream=!1;pj(a,b,0);A(g)})}
|
|
322
|
+
function pj(a,b,c){var d=b.type;if(d!=Qb||a.g.has(d))b.hb=(new Kc(function(){var e;return K(function(f){if(1==f.g)return F(f,2),z(f,a.Lc(b),4);if(2!=f.g)return va(f,0);e=H(f);if(a.G)a.G.onError(e);A(f)})})).T(c)}function kj(a){null!=a.hb&&(a.hb.stop(),a.hb=null)}function lj(a){return K(function(b){return a.Oa?z(b,a.Oa.abort(),0):b.C(0)})}function zj(a,b){return K(function(c){if(1==c.g)return z(c,Xg(a.A),2);vf(a.M);a.G.onError(b);b.handled||a.v.failureCallback(b);A(c)})};function Kj(a,b){var c=Lj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.o=[];this.h=this.g=null;this.B=Promise.resolve().then(function(){return Mj(d)});this.M=new uf(function(){return Nj(d)})}Kj.prototype.destroy=function(){return this.M.destroy()};function Nj(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Oj(a),z(e,a.B,2);a.g&&a.g.bb.Pb();b=r(a.o);for(c=b.next();!c.done;c=b.next())d=c.value,d.bb.Pb();a.g=null;a.o=[];a.j=null;A(e)})}
|
|
323
|
+
function Pj(a,b){var c={jc:function(){},od:function(){},Pb:function(){},onError:function(){},qd:function(){},ki:function(){}};a.o.push({create:b,bb:c});a.h&&a.h.abort();Oj(a);return c}
|
|
324
|
+
function Mj(a){return K(function(b){if(a.M.g)b=b.C(0);else{if(0==a.o.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.bb.Pb(),a.g=null);c=a.o.shift();var d=c.create(a.l);d?(c.bb.jc(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,bb:c.bb}):c.bb.qd();c=!0}c?c=Promise.resolve():a.g?c=Qj(a):(a.j.xg(a.i),a.A=new We,c=a.A);b=z(b,c,1)}return b})}
|
|
325
|
+
function Qj(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.eg(a.i,a.l,a.g.node,a.g.payload),F(d,2),a.h=a.j.Lf(a.i,a.l,a.g.payload),z(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.bb.od(),a.g=null);va(d,0);break;case 2:b=H(d);if(7001==b.code)a.g.bb.Pb();else a.g.bb.onError(b);a.g=null;a.h=null;c=a;return z(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function Oj(a){a.A&&(a.A.resolve(),a.A=null)};function Rj(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Rj.prototype;q.remove=function(a,b){if(!this.g)return!1;Sj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
326
|
+
q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Db("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
|
|
327
|
+
g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={Wb:e.Wb},f=c.next())e.Wb=f.value,a.some(function(g){return function(h){return h.startTime==g.Wb.startTime&&h.endTime==g.Wb.endTime&&h.text==g.Wb.payload?!0:!1}}(e))||(f=Tj(e.Wb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
|
|
328
|
+
d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Sj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
329
|
+
function Tj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
330
|
+
function Sj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Rj);Rj.prototype.setTextVisibility=Rj.prototype.setTextVisibility;Rj.prototype.isTextVisible=Rj.prototype.isTextVisible;Rj.prototype.destroy=Rj.prototype.destroy;Rj.prototype.append=Rj.prototype.append;Rj.prototype.remove=Rj.prototype.remove;function Uj(){}function T(a){return document.createElement(a)}function Vj(){return document.createElement("button")}function Wj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Uj);Uj.removeAllChildren=Wj;function Xj(a,b){var c=this;this.o=!1;this.l=[];this.g=a;this.B=b;this.i=T("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.B.appendChild(this.i);this.D=(new Q(function(){Yj(c)})).oa(.25);this.j=new Map;this.h=new wf;this.h.m(document,"fullscreenchange",function(){Yj(c,!0)});this.A=null;"ResizeObserver"in window&&(this.A=new ResizeObserver(function(){Yj(c,
|
|
331
|
+
!0)}),this.A.observe(this.i))}q=Xj.prototype;q.append=function(a){var b=[].concat(ha(this.l)),c={};a=r(a);for(var d=a.next();!d.done;c={Rc:c.Rc},d=a.next())c.Rc=d.value,b.some(function(e){return function(f){return vd(f,e.Rc)}}(c))||this.l.push(c.Rc);Yj(this)};q.destroy=function(){this.B.removeChild(this.i);this.i=null;this.o=!1;this.l=[];this.D&&this.D.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.A&&(this.A.disconnect(),this.A=null)};
|
|
332
|
+
q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});Yj(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.o};q.setTextVisibility=function(a){this.o=a};
|
|
333
|
+
function Zj(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.yf:null;l&&(g.push(l.Ne),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(ak(a,k,e),l=a.j.get(k),n=l.yf,f=!0));0<k.nestedCues.length&&n&&Zj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,t){return p.startTime!=t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});
|
|
334
|
+
h=r(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Ne)}}function Yj(a,b){if(a.i){var c=a.g.currentTime;(!a.o||(void 0===b?0:b))&&0<a.j.size&&(Wj(a.i),a.j.clear());if(a.o){for(var d=new Map,e=r(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Zj(a,a.l,a.i,c,[])}}}
|
|
335
|
+
function ak(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Db("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=T(e);"br"!=e&&bk(a,f,b,c,d);c=f;d&&(c=T("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.j.set(b,{Ne:f,yf:c})}
|
|
336
|
+
function bk(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.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ck(c.linePadding,c,a.B);f.paddingRight=ck(c.linePadding,c,a.B);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
|
|
337
|
+
"center";else{if(c.nestedCues.length)var l=b;else l=T("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=dk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=
|
|
338
|
+
c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ck(c.fontSize,c,a.B);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==pd?(f.width="100%",c.lineAlign==rd?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==rd?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==rd?f.right=c.line+"%":"end"==
|
|
339
|
+
c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Cd?"%":"px",d=c.region.viewportAnchorUnits==Cd?"%":"px",f.height=c.region.height+(c.region.heightUnits==Cd?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==pd?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat=
|
|
340
|
+
"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==pd?f.width=c.size+"%":f.height=c.size+"%")}
|
|
341
|
+
function ck(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),Sg:d[2]}:null;if(!d)return a;var e=d.value;switch(d.Sg){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function dk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Xj);Xj.prototype.setTextVisibility=Xj.prototype.setTextVisibility;
|
|
342
|
+
Xj.prototype.isTextVisible=Xj.prototype.isTextVisible;Xj.prototype.remove=Xj.prototype.remove;Xj.prototype.destroy=Xj.prototype.destroy;Xj.prototype.append=Xj.prototype.append;function ek(a){function b(f){var g=[],h=700<=f.fontWeight,k="italic"==f.fontStyle,l=f.textDecoration.includes("underline");h&&g.push("b");k&&g.push("i");l&&g.push("u");h=g.reduce(function(m,n){return m+"<"+n+">"},"");g=g.reduceRight(function(m,n){return m+"</"+n+">"},"");return f.lineBreak||f.spacer?(f.spacer&&Db("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):f.nestedCues.length?f.nestedCues.map(b).join(""):h+f.payload+g}var c=a.map(function(f){if(f.nestedCues.length){var g=f.clone();
|
|
343
|
+
g.nestedCues=[];g.payload=b(f);return g}return f});a="WEBVTT\n\n";c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=function(f){var g=Math.floor(f/3600),h=Math.floor(f/60%60),k=Math.floor(f%60);f=Math.floor(1E3*f%1E3);return(10>g?"0":"")+g+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>f?10>f?"00":"0":"")+f};a+=e(d.startTime)+" --\x3e "+e(d.endTime)+"\n";a+=d.payload+"\n\n"}return a}M("shaka.text.WebVttGenerator",function(){});function fk(){}
|
|
344
|
+
function gk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=eh(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=eh(l)),k=gk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Oa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Pa("Unexpected number of arguments for "+k),a[h]=b[h]):(Oa("Invalid config, unrecognized key "+
|
|
345
|
+
k),g=!1)}return g}function hk(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}M("shaka.util.ConfigUtils",fk);fk.convertToConfigObject=hk;fk.mergeConfigObjects=gk;function ik(){}
|
|
346
|
+
function jk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Wg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:di,logLicenseExchange:!1,updateExpirationTime:1},c={retryParameters:Wg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,
|
|
347
347
|
autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"}},
|
|
348
|
-
hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:
|
|
349
|
-
forceHTTPS:!1,preferNativeHls:!1};if(navigator.userAgent.match(/Edge\//)||
|
|
350
|
-
h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new
|
|
351
|
-
preferredAudioChannelCount:2,preferForcedSubs:!1,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,useMediaCapabilities:!1,textDisplayFactory:function(){return null}};e.trackSelectionCallback=function(g){return
|
|
352
|
-
function
|
|
353
|
-
function
|
|
354
|
-
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=
|
|
355
|
-
function
|
|
356
|
-
this.
|
|
357
|
-
function(e){e.J&&(c.h.Qa(e.J,"error"),e.J=null);c.I&&c.I.release();c.g=null;e=Promise.resolve();return
|
|
358
|
-
e,f)});this.
|
|
359
|
-
e.name)));return d.get(e)(f,g)},handleError:function(e){return
|
|
360
|
-
q.destroy=function(){var a=this,b;return
|
|
361
|
-
null,
|
|
362
|
-
function
|
|
363
|
-
|
|
364
|
-
q.Ee=function(a){var b=this;a=void 0===a?!0:a;if(this.l==
|
|
365
|
-
q.load=function(a,b,c){var d=this;if(this.l==
|
|
348
|
+
hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Wg(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,
|
|
349
|
+
forceHTTPS:!1,preferNativeHls:!1};if(navigator.userAgent.match(/Edge\//)||Qc()||Rc())d.gapDetectionThreshold=.5;if(Pc("Web0S")||Qc()||Rc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?z(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,
|
|
350
|
+
h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new Fg},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",
|
|
351
|
+
preferredAudioChannelCount:2,preferForcedSubs:!1,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,useMediaCapabilities:!1,textDisplayFactory:function(){return null}};e.trackSelectionCallback=function(g){return K(function(h){return h["return"](kk(g,f.preferredAudioLanguage))})};return f}
|
|
352
|
+
function lk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return gk(a,b,c||jk(),d,"")}
|
|
353
|
+
function kk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=$b(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Tb(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
|
|
354
|
+
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Qb&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",ik);ik.mergeConfigObjects=lk;function mk(){this.g=null;this.h=[]}function nk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function ok(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
|
|
355
|
+
function pk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 qk(){this.i=this.h=null;this.g=[]}function rk(a,b,c){a.h!=b&&(a.h=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}))}function sk(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 tk(){this.A=this.B=this.K=this.H=this.o=this.j=this.I=this.l=this.i=this.L=this.O=this.Y=this.D=this.S=NaN;this.h=new mk;this.g=new qk};function V(a,b){cb.call(this);var c=this;this.l=uk;this.jb=this.g=null;this.ba=!1;this.h=new wf;this.Db=this.B=this.Ja=this.F=this.xb=this.A=this.i=this.tb=this.K=this.wb=this.H=this.za=this.D=this.L=this.o=this.U=null;this.Xd=1E9;this.v=vk(this);this.Td={width:Infinity,height:Infinity};this.j=null;this.ha=new Ng(this.v.preferredAudioLanguage,this.v.preferredVariantRole,this.v.preferredAudioChannelCount);this.ia=this.v.preferredTextLanguage;this.$a=this.v.preferredTextRole;this.Za=this.v.preferForcedSubs;
|
|
356
|
+
this.Eb=[];b&&b(this);this.U=wk(this);this.U.se(this.v.streaming.forceHTTPS);this.I=null;xk&&(this.I=Kb(xk));this.h.m(window,"online",function(){c.ke()});this.La={name:"detach"};this.kb={name:"attach"};this.S={name:"unload"};this.$d={name:"manifest-parser"};this.Rd={name:"manifest"};this.qa={name:"media-source"};this.Zb={name:"drm-engine"};this.O={name:"load"};this.ee={name:"src-equals-drm-engine"};this.Aa={name:"src-equals"};var d=new Map;d.set(this.kb,function(e,f){return bh(yk(c,e,f))});d.set(this.La,
|
|
357
|
+
function(e){e.J&&(c.h.Qa(e.J,"error"),e.J=null);c.I&&c.I.release();c.g=null;e=Promise.resolve();return bh(e)});d.set(this.S,function(e){return bh(zk(c,e))});d.set(this.qa,function(e){e=Ak(c,e);return bh(e)});d.set(this.$d,function(e,f){var g=Bk(c,e,f);return bh(g)});d.set(this.Rd,function(e){return Ck(c,e)});d.set(this.Zb,function(e){e=Dk(c,e);return bh(e)});d.set(this.O,function(e,f){return bh(Ek(c,e,f))});d.set(this.ee,function(e,f){var g=Fk(c,e,f);return bh(g)});d.set(this.Aa,function(e,f){return Gk(c,
|
|
358
|
+
e,f)});this.ea=new Kj(this.La,{eg:function(e,f,g,h){var k=null;e==c.La&&(k=g==c.La?c.La:c.kb);e==c.kb&&(k=g==c.La||f.J!=h.J?c.La:g==c.kb?c.kb:g==c.qa||g==c.O?c.qa:g==c.Aa?c.ee:null);e==c.qa&&(k=g==c.O&&f.J==h.J?c.$d:c.S);e==c.$d&&(k=Hk(c.O,c.Rd,c.S,g,f,h));e==c.Rd&&(k=Hk(c.O,c.Zb,c.S,g,f,h));e==c.Zb&&(k=Hk(c.O,c.O,c.S,g,f,h));e==c.ee&&(k=g==c.Aa&&f.J==h.J?c.Aa:c.S);if(e==c.O||e==c.Aa)k=c.S;e==c.S&&(k=h.J&&f.J==h.J?c.kb:c.La);return k},Lf:function(e,f,g){c.dispatchEvent(Ik(Jk,(new Map).set("state",
|
|
359
|
+
e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?z(f,zk(c,e),2):f["return"](e.J?c.kb:c.La)})},xg:function(e){c.dispatchEvent(Ik(Kk,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}u(V,cb);function Ik(a,b){return new N(a,b)}q=V.prototype;
|
|
360
|
+
q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Lk)return c["return"]();a.l=Lk;b=Pj(a.ea,function(){return{node:a.La,payload:Lj(),Kb:!1}});return z(c,new Promise(function(d){b.jc=function(){};b.od=function(){d()};b.Pb=function(){d()};b.onError=function(){d()};b.qd=function(){d()}}),2);case 2:return z(c,a.ea.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.Db=null;a.B=null;a.v=null;a.j=null;a.jb=null;if(!a.U){c.C(4);break}return z(c,a.U.destroy(),5);case 5:a.U=
|
|
361
|
+
null;case 4:cb.prototype.release.call(a),A(c)}})};
|
|
362
|
+
function Mk(){window.Promise||Pa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Pa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Pc("Trident/"))return!1;var a=Tc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
|
|
363
|
+
!1:Lc()?!0:Mc("application/x-mpegurl")}q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==Lk)return Promise.reject(Nk());var c=Lj();c.J=a;Lc()||(b=!1);var d=b?this.qa:this.kb,e=Pj(this.ea,function(){return{node:d,payload:c,Kb:!1}});e.jc=function(){};return Ok(e)};q.detach=function(){var a=this;if(this.l==Lk)return Promise.reject(Nk());var b=Pj(this.ea,function(){return{node:a.La,payload:Lj(),Kb:!1}});b.jc=function(){};return Ok(b)};
|
|
364
|
+
q.Ee=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Lk)return Promise.reject(Nk());Lc()||(a=!1);var c=Lj(),d=Pj(this.ea,function(e){var f=e.J&&a?b.qa:e.J?b.kb:b.La;c.J=e.J;return{node:f,payload:c,Kb:!1}});d.jc=function(){};return Ok(d)};
|
|
365
|
+
q.load=function(a,b,c){var d=this;if(this.l==Lk)return Promise.reject(Nk());this.dispatchEvent(Ik(Pk));var e=Lj();e.uri=a;e.Ae=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Qk(this,e)?this.Aa:this.O,g=Pj(this.ea,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,Kb:!0}});this.j=new tk;g.jc=function(){};return new Promise(function(h,k){g.qd=function(){return k(new P(2,7,7002))};g.od=function(){h();d.dispatchEvent(Ik(Rk))};g.Pb=function(){return k(Nk())};g.onError=
|
|
366
366
|
function(l){return k(l)}})};
|
|
367
|
-
function
|
|
368
|
-
function
|
|
369
|
-
function
|
|
370
|
-
case 3:if(!a.B){n.C(5);break}return
|
|
371
|
-
break}return
|
|
372
|
-
function
|
|
373
|
-
function
|
|
374
|
-
function
|
|
375
|
-
l;break a}k=null}null==k&&(h.g.add(g),h.
|
|
376
|
-
a.F.variants.length)throw new
|
|
377
|
-
function
|
|
378
|
-
function
|
|
379
|
-
(
|
|
380
|
-
a.D=
|
|
381
|
-
t||((v=
|
|
382
|
-
function
|
|
383
|
-
"video/mp4",codecs:c.mimeType?
|
|
384
|
-
function
|
|
385
|
-
function(){a.j.l=Date.now()/1E3-c.Ae});a.g.audioTracks&&(a.h.m(a.g.audioTracks,"addtrack",function(){return
|
|
386
|
-
var e=new
|
|
387
|
-
e.resolve());a.h.Na(a.g,"error",function(){e.reject(
|
|
388
|
-
function
|
|
389
|
-
function
|
|
390
|
-
function
|
|
391
|
-
|
|
392
|
-
function
|
|
393
|
-
function
|
|
394
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
395
|
-
0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=
|
|
396
|
-
function
|
|
397
|
-
|
|
398
|
-
q.
|
|
399
|
-
q.Va=function(){if(this.F){var a=this.F.presentationTimeline;return{start:a.
|
|
400
|
-
q.De=function(a){0==a?
|
|
401
|
-
q.
|
|
402
|
-
q.
|
|
403
|
-
q.Vf=function(){return this.F?this.F.imageStreams.map(function(a){return
|
|
404
|
-
q.mg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D;return
|
|
405
|
-
x=v/t;w=f.startTime;C=y=0;1<t&&(D=Math.floor((b-f.startTime)/x),w=f.startTime+D*x,y=D%l*n,C=Math.floor(D/l)*p);return B["return"]({height:p,positionX:y,positionY:C,startTime:w,duration:x,uris:f.
|
|
406
|
-
q.oe=function(a){if(this.F&&this.i){var b=this.F.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(
|
|
407
|
-
q.pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.F&&this.i){this.v.abr.enabled&&
|
|
408
|
-
|
|
409
|
-
q.wd=function(a,b){if(this.F&&this.D){this.
|
|
410
|
-
c=
|
|
411
|
-
q.me=function(a,b,c){c=void 0===c?!1:c;if(this.F&&this.D){if(this.
|
|
412
|
-
q.Lg=function(a){if(this.F&&this.D){for(var b=null,c=r(this.F.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.
|
|
413
|
-
function
|
|
414
|
-
q.ye=function(a){a=!!a;if(this.
|
|
415
|
-
q.fg=function(){if(!this.Z())return null;var a=this.
|
|
416
|
-
q.Ve=function(){if(!this.Z())return null;if(this.F)return new Date(1E3*this.F.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.gd=function(){if(this.l==
|
|
417
|
-
q.getStats=function(){if(this.l!=
|
|
418
|
-
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.
|
|
419
|
-
(this.j.K=this.F.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.j.A=a}var d=this.j;a=d.
|
|
367
|
+
function Qk(a,b){if(!Lc())return!0;var c=b.mimeType,d=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[pi(d)]);if(c){if(""==(b.J||Nc()).canPlayType(c))return!1;if(!Lc()||!(c in oi||pi(d)in qi)||a.v.streaming.preferNativeHls)return!0;if(Sc())return a.v.streaming.useNativeHlsOnSafari}return!1}
|
|
368
|
+
function yk(a,b,c){null==b.J&&(b.J=c.J,a.h.m(b.J,"error",function(){var d=Sk(a);d&&Tk(a,d)}));a.g=b.J;return Promise.resolve()}
|
|
369
|
+
function zk(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.l!=Lk&&(a.l=uk),c=a.Eb.map(function(p){return p()}),a.Eb=[],z(n,Promise.all(c),2);case 2:a.dispatchEvent(Ik(Uk));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&(a.h.Qa(b.J,"loadedmetadata"),a.h.Qa(b.J,"playing"),a.h.Qa(b.J,"pause"),a.h.Qa(b.J,"ended"),a.h.Qa(b.J,"ratechange"));a.za&&(a.za.release(),a.za=null);a.wb&&(a.wb.stop(),a.wb=null);if(!a.A){n.C(3);break}return z(n,a.A.stop(),4);case 4:a.A=null,a.xb=null;
|
|
370
|
+
case 3:if(!a.B){n.C(5);break}return z(n,a.B.stop(),5);case 5:if(!a.i){n.C(7);break}return z(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.H&&(a.H.release(),a.H=null);a.D&&(a.D.release(),a.D=null);if(!a.L){n.C(9);break}return z(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.I)a.I.onAssetUnload();if(!b.J||!b.J.src){n.C(11);break}return z(n,new Promise(function(p){return(new Q(p)).T(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.o){n.C(13);
|
|
371
|
+
break}return z(n,a.o.destroy(),14);case 14:a.o=null;case 13:a.Ja=null;a.K=null;if(a.F){d=r(a.F.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.F.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.F=null;a.j=new tk;a.Qd=null;Vk(a);A(n)}})}
|
|
372
|
+
function Ak(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=new Pe,d=a.v.textDisplayFactory,e=Kb(d),a.Qd=d,f=Wk(b.J,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())Xk(a,n,p,"ID3",v.value);if(a.I)a.I.onHlsTimedMetadata(m,n)}}),z(g,f.H,2);a.L=f;A(g)})}
|
|
373
|
+
function Bk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.U,a.Ja=d,f=a,z(h,ni(d,e,a.v.manifest.retryParameters,b.mimeType),2);f.xb=h.h;a.A=Kb(a.xb);g=eh(a.v.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.A.configure(g);A(h)})}
|
|
374
|
+
function Ck(a,b){var c=b.uri,d=a.U;a.tb=new ej(function(){return a.Va()});a.tb.addEventListener("regionadd",function(g){g=g.region;Yk(a,Zk,g);if(a.I)a.I.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return K(function(h){return h["return"](a.ed(g))})},makeTextStreamsForClosedCaptions:function(g){return $k(a,g)},onTimelineRegionAdded:function(g){var h=a.tb;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==
|
|
375
|
+
g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new N("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Tk(a,g)},isLowLatencyMode:function(){return a.v.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.v.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Yg(function(){var g,h,k,l;return K(function(m){if(1==
|
|
376
|
+
m.g)return g=a,z(m,a.A.start(c,e),2);g.F=m.h;h=Ik(al);a.dispatchEvent(h);if(0==a.F.variants.length)throw new P(2,4,4036);bl(a.F);k=Date.now()/1E3;l=k-f;a.j.I=l;A(m)})}(),function(){return a.A.stop()})}
|
|
377
|
+
function Dk(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.o=cl(a,{hc:a.U,onError:function(f){Tk(a,f)},pd:function(f){dl(a,f)},onExpirationUpdated:function(f,g){el(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==fl&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.v.useMediaCapabilities||hg(a.F),a.o.configure(a.v.drm),z(e,Gh(a.o,a.F.variants,a.F.offlineSessionIds,a.v.useMediaCapabilities),2)):3!=e.g?z(e,a.o.xc(b.J),3):z(e,a.ed(a.F),0)})}
|
|
378
|
+
function Ek(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return K(function(x){switch(x.g){case 1:b.startTime=c.startTime;d=b.J;e=b.uri;a.Ja=e;a.H=new Yi({ld:function(){return b.J.playbackRate},hd:function(){return b.J.defaultPlaybackRate},ve:function(w){b.J.playbackRate=w},cf:function(w){b.J.currentTime+=w}});f=function(){return gl(a)};g=function(){return hl(a)};a.h.m(d,"playing",f);a.h.m(d,"pause",f);a.h.m(d,"ended",f);a.h.m(d,"ratechange",g);h=a.v.abrFactory;a.B&&a.Db==h||(a.Db=h,a.B=Kb(h),"function"!=typeof a.B.playbackRateChanged&&
|
|
379
|
+
(Db("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.v.abr));a.ha=new Ng(a.v.preferredAudioLanguage,a.v.preferredVariantRole,a.v.preferredAudioChannelCount);a.ia=a.v.preferredTextLanguage;a.$a=a.v.preferredTextRole;a.Za=a.v.preferForcedSubs;il(a.F.presentationTimeline,a.v.playRangeStart,a.v.playRangeEnd);a.B.init(function(w,y,C){y=void 0===y?!1:y;C=void 0===C?0:C;a.i&&w!=a.i.h&&(rk(a.j.g,w,!0),tj(a.i,w,y,C),jl(a))});
|
|
380
|
+
a.D=kl(a,b.startTime);a.za=ll(a);k=Math.max(a.F.minBufferTime,a.v.streaming.rebufferingGoal);ml(a,k);Xf(a.F,a.v.preferredAudioChannelCount);a.i=nl(a);a.i.configure(a.v.streaming);a.l=ol;a.dispatchEvent(Ik(pl));l=null;if(m=a.Jb().find(function(w){return w.active})){x.C(2);break}l=ql(a)?a.B.chooseVariant():null;rl(a,l,!0,!1,0);if(!a.v.streaming.startAtSegmentBoundary){x.C(3);break}n=a.D.l();return z(x,sl(l,n),4);case 4:p=x.h,a.D.o(p);case 3:jl(a);case 2:return t=a.qb().find(function(w){return w.active}),
|
|
381
|
+
t||((v=Cg(a.F.textStreams,a.ia,a.$a,a.Za)[0]||null)&&sk(a.j.g,v,!0),l&&(v?(l.audio&&tl(a,l.audio,v)&&(a.ba=!0),a.ba&&a.L.o.setTextVisibility(!0),ul(a)):a.ba=!1),v&&(a.v.streaming.alwaysStreamText||a.Ob())&&uj(a.i,v)),z(x,a.i.start(),5);case 5:a.v.abr.enabled&&(a.B.enable(),vl(a)),jg(a.i?a.i.h:null,a.F),wl(a.F),xl(a),ql(a),a.F.variants.some(function(w){return w.primary}),a.h.Na(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Ae}),A(x)}})}
|
|
382
|
+
function Fk(a,b,c){var d,e,f,g;return K(function(h){return 1==h.g?(d=Rb,e=Date.now()/1E3,f=!0,a.o=cl(a,{hc:a.U,onError:function(k){Tk(a,k)},pd:function(k){dl(a,k)},onExpirationUpdated:function(k,l){el(a,k,l)},onEvent:function(k){a.dispatchEvent(k);k.type==fl&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.o.configure(a.v.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:
|
|
383
|
+
"video/mp4",codecs:c.mimeType?kf(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.o.S=!0,z(h,Gh(a.o,[g],[]),2)):z(h,a.o.xc(b.J),0)})}
|
|
384
|
+
function Gk(a,b,c){function d(){return gl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ja=b.uri;a.D=new Ni(b.J);null!=b.startTime&&a.D.o(b.startTime);a.H=new Yi({ld:function(){return b.J.playbackRate},hd:function(){return b.J.defaultPlaybackRate},ve:function(g){b.J.playbackRate=g},cf:function(g){b.J.currentTime+=g}});ml(a,a.v.streaming.rebufferingGoal);a.h.m(b.J,"playing",d);a.h.m(b.J,"pause",d);a.h.m(b.J,"ended",d);a.h.m(b.J,"ratechange",function(){return hl(a)});"none"!=a.g.preload&&a.h.Na(a.g,"loadedmetadata",
|
|
385
|
+
function(){a.j.l=Date.now()/1E3-c.Ae});a.g.audioTracks&&(a.h.m(a.g.audioTracks,"addtrack",function(){return xl(a)}),a.h.m(a.g.audioTracks,"removetrack",function(){return xl(a)}),a.h.m(a.g.audioTracks,"change",function(){return xl(a)}));a.g.textTracks&&(a.h.m(a.g.textTracks,"addtrack",function(g){xl(a);yl(a,g)}),a.h.m(a.g.textTracks,"removetrack",function(){return xl(a)}),a.h.m(a.g.textTracks,"change",function(){return xl(a)}));b.J.src=b.uri;(Qc()||Pc("Web0S"))&&b.J.load();a.l=zl;a.dispatchEvent(Ik(pl));
|
|
386
|
+
var e=new We;Ei(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.Eb.push(function(){f=!0});Ei(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return K(function(h){if(1==h.g){if(f)return h["return"]();Al(a);g=Bl(a);return g.find(function(k){return"disabled"!=k.mode})?h.C(2):z(h,new Promise(function(k){a.h.Na(a.g.textTracks,"change",k);(new Q(k)).T(1)}),2)}if(f)return h["return"]();Cl(a);A(h)})});a.g.error?e.reject(Sk(a)):"none"==a.g.preload&&(Pa('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.'),
|
|
387
|
+
e.resolve());a.h.Na(a.g,"error",function(){e.reject(Sk(a))});return new Yg(e,function(){e.reject(new P(2,7,7001));return Promise.resolve()})}function Al(a){var b=a.v.preferredAudioLanguage;if(""!=b){a.wd(b);var c=a.v.preferredVariantRole;""!=c&&a.wd(b,c)}}function Cl(a){var b=a.v.preferredTextLanguage,c=a.v.preferForcedSubs;if(""!=b){a.me(b,"",c);var d=a.v.preferredTextRole;""!=d&&a.me(b,d,c)}}
|
|
388
|
+
function yl(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.h.m(c,"cuechange",function(){if(c.activeCues)for(var d=r(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Xk(a,e.startTime,e.endTime,e.type,e.value),a.I)a.I.onCueMetadataChange(e.value)}),(new Q(function(){var d=Dl(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ia().T(.5))}
|
|
389
|
+
function Xk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Ik(El,b))}function bl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function cl(a,b){return new zh(b,a.v.drm.updateExpirationTime)}function wk(a){return new ih(function(b,c){a.B&&a.B.segmentDownloaded(b,c)})}
|
|
390
|
+
function kl(a,b){return new Oi(a.g,a.F,a.v.streaming,b,function(){a.za&&aj(a.za,!0);if(a.i)for(var c=a.i,d=c.G.kd(),e=c.v.smallGapLimit,f=r(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.va=null;var k=c.G.W;g==Qb?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Kf(k,g),k=Se(k,d,e));if(!k&&((null!=Lf(c.G.W,g)||h.eb)&&xj(c,h),h.Oa&&(h.Oa.abort(),h.Oa=null),g===Qb))for(g=c.G.W.D.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Ce(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())Zd(h.value)}a.K&&
|
|
391
|
+
Fl(a)},function(c){return a.dispatchEvent(c)})}function ll(a){var b=new fj(a.tb);b.addEventListener("enter",function(d){Yk(a,Gl,d.region)});b.addEventListener("exit",function(d){Yk(a,Hl,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Yk(a,Gl,e),Yk(a,Hl,e))});var c=new $i(a.g);c.g.add(b);return c}function ml(a,b){a.K=new Rg;a.K.g=Tg;Ug(a.K,b,Math.min(.5,b/2));Vk(a);a.wb=(new Q(function(){Fl(a)})).oa(.25)}
|
|
392
|
+
function Fl(a){switch(a.l){case zl:if(a.g.ended)var b=!0;else{var c=Re(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ol:a:if(a.g.ended||If(a.L))b=!0;else{if(a.F.presentationTimeline.Z()){c=a.F.presentationTimeline.Ib();var d=Re(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Te(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Sg:Tg;c.g=d;b!=d&&Vk(a)}function Wk(a,b,c,d){return new Bf(a,b,c,d)}
|
|
393
|
+
function nl(a){return new ij(a.F,{kd:function(){return a.D.l()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},W:a.L,hc:a.U,onError:function(b){return Tk(a,b)},onEvent:function(b){return a.dispatchEvent(b)},yg:function(){a.A&&a.A.update&&a.A.update()},ge:function(){a.D&&a.D.H();Fl(a)}})}
|
|
394
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Db("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
|
|
395
|
+
0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=lk(this.v,a,vk(this));Il(this);return c};
|
|
396
|
+
function Il(a){if(a.A){var b=eh(a.v.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.A.configure(b)}a.o&&a.o.configure(a.v.drm);if(a.i){a.i.configure(a.v.streaming);try{Jl(a,a.F)}catch(f){Tk(a,f)}a.B&&ql(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Kl(a)}a.U&&a.U.se(a.v.streaming.forceHTTPS);if(a.L&&(b=a.v.textDisplayFactory,a.Qd!=b)){var c=Kb(b),d=a.L,e=d.o;d.o=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.Qd=b;a.i&&(b=a.i,(c=b.g.get(Qb))&&
|
|
397
|
+
sj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.v.abr),a.v.abr.enabled?a.B.enable():a.B.disable(),vl(a));a.K&&(b=a.v.streaming.rebufferingGoal,a.F&&(b=Math.max(b,a.F.minBufferTime)),Ug(a.K,b,Math.min(.5,b/2)));a.F&&il(a.F.presentationTimeline,a.v.playRangeStart,a.v.playRangeEnd)}q.getConfiguration=function(){var a=vk(this);lk(a,this.v,vk(this));return a};q.Jg=function(){for(var a in this.v)delete this.v[a];lk(this.v,vk(this),vk(this));Il(this)};q.Ue=function(){return this.l};q.dg=function(){return this.g};
|
|
398
|
+
q.Cc=function(){return this.U};q.Pd=function(){return this.Ja};q.fd=function(){return this.I?this.I:null};q.Z=function(){return this.F?this.F.presentationTimeline.Z():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.F?this.F.presentationTimeline.Mb():!1};q.Ye=function(){if(this.F){var a=this.F.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
399
|
+
q.Va=function(){if(this.F){var a=this.F.presentationTimeline;return{start:a.dc(),end:a.ob()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.keySystem=function(){return Vh(this.drmInfo())};q.drmInfo=function(){return this.o?this.o.i:null};q.Bc=function(){return this.o?this.o.Bc():Infinity};q.jd=function(){return this.o?this.o.jd():{}};q.Jc=function(){return this.K?this.K.g==Tg:!1};q.Dc=function(){return this.g?this.H?this.H.i:1:0};
|
|
400
|
+
q.De=function(a){0==a?Pa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==ol&&(this.B.playbackRateChanged(a),rj(this.i,1<Math.abs(a))))};q.Ie=function(){var a=this.H.hd();this.l==zl&&this.H.set(a);this.l==ol&&(this.H.set(a),this.B.playbackRateChanged(a),rj(this.i,!1))};
|
|
401
|
+
q.Jb=function(){if(this.F){for(var a=this.i?this.i.h:null,b=[],c=0,d=r(this.F.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Ag(e)){var f=tg(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return yg(g)}):[]};
|
|
402
|
+
q.qb=function(){if(this.F){for(var a=this.i?this.i.i:null,b=[],c=r(this.F.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ug(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Bl(this).map(function(f){var g=zg(f);g.active="disabled"!=f.mode;g.type="text";g.originalTextId=f.id;"captions"==f.kind&&(g.mimeType="application/cea-608");f.kind&&(g.roles=[f.kind]);"forced"==f.kind&&(g.forced=!0);return g}):[]};
|
|
403
|
+
q.Vf=function(){return this.F?this.F.imageStreams.map(function(a){return vg(a)}):[]};
|
|
404
|
+
q.mg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D;return K(function(B){if(1==B.g)return c.F?(d=c.F.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?B.C(3):z(B,d.createSegmentIndex(),3):B["return"](null):B.C(2);if(2!=B.g){e=d.segmentIndex.find(b);if(null==e)return B["return"](null);f=d.segmentIndex.get(e);g=/(\d+)x(\d+)/.exec(d.tilesLayout);if(!g)return B["return"](null);h=d.width||0;k=d.height||0;l=parseInt(g[1],10);m=parseInt(g[2],10);n=h/l;p=k/m;t=l*m;v=f.j-f.startTime;
|
|
405
|
+
x=v/t;w=f.startTime;C=y=0;1<t&&(D=Math.floor((b-f.startTime)/x),w=f.startTime+D*x,y=D%l*n,C=Math.floor(D/l)*p);return B["return"]({height:p,positionX:y,positionY:C,startTime:w,duration:x,uris:f.Ga(),width:n})}return B["return"](null)})};
|
|
406
|
+
q.oe=function(a){if(this.F&&this.i){var b=this.F.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(sk(this.j.g,b,!1),uj(this.i,b),Ll(this),this.ia=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Bl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,wg(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";Ll(this)}};
|
|
407
|
+
q.pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.F&&this.i){this.v.abr.enabled&&Pa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.F.variants.find(function(e){return e.id==a.id});d&&Ag(d)&&(rl(this,d,!1,b,c),this.ha=new Mg(d),ql(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
408
|
+
wg(c)==a.id){Ml(this,c);break}};q.Nf=function(){return Nl(this.Jb())};q.lg=function(){return Nl(this.qb())};q.Mf=function(){return Array.from(Ol(this.Jb()))};q.kg=function(){return Array.from(Ol(this.qb()))};
|
|
409
|
+
q.wd=function(a,b){if(this.F&&this.D){this.ha=new Ng(a,b||"",0,"");if(!this.v.abr.enabled){var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.i.h,e=this.ha.create(this.F.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;if(f){c=tg(f);this.pe(c,!0);return}}Kl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
|
|
410
|
+
c=Tb(a);f=d=null;e=r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=yg(g);Tb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Ml(this,f):d&&Ml(this,d)}};
|
|
411
|
+
q.me=function(a,b,c){c=void 0===c?!1:c;if(this.F&&this.D){if(this.ia=a,this.$a=b||"",this.Za=c,(a=Cg(this.F.textStreams,this.ia,this.$a,this.Za)[0]||null)&&a!=this.i.i&&(sk(this.j.g,a,!1),this.v.streaming.alwaysStreamText||this.Ob()))uj(this.i,a),Ll(this)}else{var d=Tb(a);(a=this.qb().find(function(e){return Tb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.oe(a)}};
|
|
412
|
+
q.Lg=function(a){if(this.F&&this.D){for(var b=null,c=r(this.F.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ha=new Ng(b.language,"",0,a),Kl(this))}};q.Ob=function(){var a=this.ba;return this.L?this.L.o.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Bl(this).some(function(b){return"showing"==b.mode}):a};
|
|
413
|
+
function Bl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Dl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}
|
|
414
|
+
q.ye=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==ol)this.L.o.setTextVisibility(a),this.v.streaming.alwaysStreamText||(a?this.i.i||(a=Cg(this.F.textStreams,this.ia,this.$a,this.Za),0<a.length&&(uj(this.i,a[0]),Ll(this))):qj(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=Bl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}ul(this)}};
|
|
415
|
+
q.fg=function(){if(!this.Z())return null;var a=this.ea.l,b=0;if(this.D)b=this.D.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.F?new Date(1E3*(this.F.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
416
|
+
q.Ve=function(){if(!this.Z())return null;if(this.F)return new Date(1E3*this.F.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.gd=function(){if(this.l==ol)return this.L.gd();var a={total:[],audio:[],video:[],text:[]};this.l==zl&&(a.total=Ue(this.g.buffered));return a};
|
|
417
|
+
q.getStats=function(){if(this.l!=ol&&this.l!=zl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};gl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
418
|
+
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.Y=Number(a.droppedVideoFrames),c.O=b,this.j.L=Number(a.corruptedVideoFrames));this.o?(a=this.o,a=a.I?a.I:NaN):a=NaN;this.j.o=a;if(this.l==ol){if(a=this.i.h)this.j.B=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.S=a.video.width||NaN,c.D=b);this.Z()&&(a=this.Ve().valueOf()+1E3*this.Va().end,this.j.H=(Date.now()-a)/1E3);this.F&&this.F.presentationTimeline&&
|
|
419
|
+
(this.j.K=this.F.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.j.A=a}var d=this.j;a=d.S;c=d.D;b=d.B;var e=d.O,f=d.Y,g=d.L,h=d.A,k=d.i,l=d.l,m=d.I,n=d.j,p=ok(d.h,"playing"),t=ok(d.h,"paused"),v=ok(d.h,"buffering"),x=d.o,w=d.H,y=d.K,C=pk(d.h),D=[];d=r(d.g.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
|
|
420
420
|
estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:x,liveLatency:w,maxSegmentDuration:y,stateHistory:C,switchHistory:D}};
|
|
421
|
-
q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;
|
|
422
|
-
f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.
|
|
423
|
-
keyIds:new Set,language:b,label:f||null,type:
|
|
424
|
-
q.Cf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,x,w,y,C,D;return
|
|
425
|
-
2,2011,k);case 2:if(h.l!=
|
|
426
|
-
B["return"](v);throw new
|
|
427
|
-
|
|
428
|
-
q.ue=function(a,b){this.Td.width=a;this.Td.height=b};q.ke=function(){if(this.l==
|
|
429
|
-
q.ag=function(){return this.
|
|
430
|
-
function
|
|
431
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:
|
|
432
|
-
function
|
|
433
|
-
function
|
|
434
|
-
f.next())g=g.value,
|
|
435
|
-
function
|
|
436
|
-
function
|
|
437
|
-
function
|
|
438
|
-
function
|
|
439
|
-
function
|
|
440
|
-
function
|
|
441
|
-
function
|
|
442
|
-
(e=!0)}}}e&&
|
|
443
|
-
function
|
|
444
|
-
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new
|
|
445
|
-
function
|
|
446
|
-
h.push({language:l,role:n,label:p})}});return h}function
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=
|
|
455
|
-
var
|
|
456
|
-
Gh:
|
|
421
|
+
q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Db("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=ol&&this.l!=zl)throw new P(1,7,7004);if(!d){var h=pi(a);d={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"}[h];if(!d)throw new P(1,2,2011,h);}if(this.l==zl){if("text/vtt"!=d)throw new P(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=
|
|
422
|
+
f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.qb().find(function(k){return k.language==b&&k.label==(f||"")&&k.kind==c}))return xl(this),a;throw new P(1,2,2012);}h=this.F.presentationTimeline.getDuration();if(Infinity==h)throw new P(1,4,4033);a={id:this.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Wi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],
|
|
423
|
+
keyIds:new Set,language:b,label:f||null,type:Qb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};if(!mf(ef(a.mimeType,a.codecs)))throw new P(2,2,2014,d);this.F.textStreams.push(a);xl(this);return ug(a)};
|
|
424
|
+
q.Cf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,x,w,y,C,D;return K(function(B){switch(B.g){case 1:if(h.l!=ol&&h.l!=zl)throw new P(1,7,7004);if(d){B.C(2);break}k=pi(a);if(d={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"}[k]){B.C(3);break}F(B,4);return z(B,ri(a,h.U,h.v.streaming.retryParameters),6);case 6:d=B.h;va(B,3);break;case 4:H(B);case 3:if(!d)throw new P(1,
|
|
425
|
+
2,2011,k);case 2:if(h.l!=zl){B.C(7);break}if("text/vtt"==d){B.C(8);break}return z(B,Pl(a,h.U,h.v.streaming.retryParameters),9);case 9:l=B.h,m=Ql(h,l,d),n=new Blob([m],{type:"text/vtt"}),a=Ef(n),d="text/vtt";case 8:g&&(c="forced");p=document.createElement("track");p.src=a;p.label=f||"";p.kind=c;p.srclang=b;h.g.getAttribute("crossorigin")||h.g.setAttribute("crossorigin","anonymous");h.g.appendChild(p);t=h.qb();if(v=t.find(function(E){return E.language==b&&E.label==(f||"")&&E.kind==c}))return xl(h),
|
|
426
|
+
B["return"](v);throw new P(1,2,2012);case 7:x=Rb;w=h.F.presentationTimeline.getDuration();if(Infinity==w)throw new P(1,4,4033);y={id:h.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Wi(0,w,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:x.ra,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};C=
|
|
427
|
+
ef(y.mimeType,y.codecs);D=mf(C);if(!D)throw new P(2,2,2014,d);h.F.textStreams.push(y);xl(h);return B["return"](ug(y))}})};function Pl(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=sh,e=mh([a],c),e.method="GET",z(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Ql(a,b,c){var d=nf[c];if(d)return c=d(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=mc(b),b=c.parseMedia(b,a),ek(b);throw new P(2,2,2014,c);}
|
|
428
|
+
q.ue=function(a,b){this.Td.width=a;this.Td.height=b};q.ke=function(){if(this.l==ol){var a=this.i;if(a.M.g)a=!1;else if(a.j)a=!1;else{for(var b=r(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Gc&&(c.Gc=!1,pj(a,c,.1));a=!0}}else a=!1;return a};q.$f=function(){Pa("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.F};
|
|
429
|
+
q.ag=function(){return this.xb};function vk(a){var b=jk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Z()&&d.includes(c.code)&&(c.severity=1,a.ke())};b.textDisplayFactory=function(){return a.jb?new Xj(a.g,a.jb):new Rj(a.g)};return b}q.ze=function(a){this.jb=a};
|
|
430
|
+
function $k(a,b){for(var c=new Set,d=r(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=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Xi;h={id:a.Xd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
431
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Qb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}q.ed=function(a){var b=this;return K(function(c){if(1==c.g)return z(c,Rl(b,a),2);Jl(b,a);A(c)})};
|
|
432
|
+
function Rl(a,b){var c;return K(function(d){if(1==d.g)return c=a.i?a.i.h:null,z(d,fg(a.o,c,b,a.v.useMediaCapabilities),2);wl(b);A(d)})}
|
|
433
|
+
function Jl(a,b){if(a.l!=Lk){for(var c=a.v.restrictions,d=a.Td,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=eg(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&xl(a);if((c=a.o?a.o.i:null)&&a.o.o)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
|
|
434
|
+
f.next())g=g.value,Qh(a.o,g.initDataType,g.initData);Sl(a,b)}}
|
|
435
|
+
function sl(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return K(function(p){if(1==p.g)return k?z(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},z(h,e(c,b),2);if(3!=h.g)return f=h.h,z(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)})}
|
|
436
|
+
function Vk(a){var b=a.Jc();if(a.j&&a.K&&a.D){var c=a.H;c.j=b;Zi(c);gl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Ik(Tl,b))}function hl(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Ik(Ul),a.dispatchEvent(b))}function gl(a){if(a.j&&a.K){var b=a.j.h;a.K.g==Tg?nk(b,"buffering"):a.g.paused?nk(b,"paused"):a.g.ended?nk(b,"ended"):nk(b,"playing")}}
|
|
437
|
+
function ql(a){try{Sl(a,a.F)}catch(c){return Tk(a,c),!1}var b=a.F.variants.filter(function(c){return Ag(c)});b=a.ha.create(b);a.B.setVariants(Array.from(b.values()));return!0}function Kl(a){var b;if(b=ql(a)?a.B.chooseVariant():null)rl(a,b,!0,!0,0),jl(a)}function rl(a,b,c,d,e){var f=a.i.h;b==f?d&&tj(a.i,b,d,e,!0):(rk(a.j.g,b,c),tj(a.i,b,d,e),c=null,f&&(c=tg(f)),b=tg(b),Vl(a,c,b))}
|
|
438
|
+
function Ml(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=yg(c);var d=yg(b);Vl(a,c,d)}function tl(a,b,c){a=Tb(a.v.preferredTextLanguage);b=Tb(b.language);c=Tb(c.language);return Sb(c,a)&&!Sb(b,c)}function jl(a){var b=Ik(Wl);Xl(a,b)}function xl(a){var b=Ik(Yl);Xl(a,b)}function Vl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Ik(Zl,b);Xl(a,b)}function Ll(a){var b=Ik($l);Xl(a,b)}function ul(a){var b=Ik(am);Xl(a,b)}
|
|
439
|
+
function vl(a){var b=(new Map).set("newStatus",a.v.abr.enabled);Xl(a,Ik(bm,b))}function Tk(a,b){if(a.l!=Lk){var c=Ik(cm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Yk(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Ik(b,c))}
|
|
440
|
+
function Sk(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new P(2,3,3016,b,c,a.g.error.message)}
|
|
441
|
+
function dl(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.F.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!dm.includes(l)}h!=f.allowedByKeySystem&&
|
|
442
|
+
(e=!0)}}}e&&ql(a);(d=a.i.h)&&!d.allowedByKeySystem&&Kl(a);e&&xl(a)}}function el(a,b,c){if(a.A&&a.A.onExpirationUpdated)a.A.onExpirationUpdated(b,c);b=Ik(em);a.dispatchEvent(b)}function il(a,b,c){0<b&&(a.Z()||a.sf(b));b=a.getDuration();c<b&&(a.Z()||a.fb(c))}
|
|
443
|
+
function Sl(a,b){var c=a.o?a.o.jd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?dm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
444
|
+
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new P(2,4,4012,c);}function wl(a){if(!a.variants.some(Ag))throw new P(2,4,4032);}function Xl(a,b){K(function(c){if(1==c.g)return z(c,Promise.resolve(),2);a.l!=Lk&&a.dispatchEvent(b);A(c)})}function Ol(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Tb(c.language)):b.add("und");return b}
|
|
445
|
+
function Nl(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Tb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
|
|
446
|
+
h.push({language:l,role:n,label:p})}});return h}function Nk(){return new P(2,7,7E3)}function Hk(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Lj(){return{J:null,mimeType:null,startTime:null,Ae:NaN,uri:null}}function Ok(a){return new Promise(function(b,c){a.Pb=function(){return c(Nk())};a.od=function(){return b()};a.onError=function(d){return c(d)};a.qd=function(){return c(Nk())}})}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.ze;
|
|
447
|
+
V.prototype.getManifestParserFactory=V.prototype.ag;V.prototype.getManifest=V.prototype.$f;V.prototype.retryStreaming=V.prototype.ke;V.prototype.setMaxHardwareResolution=V.prototype.ue;V.prototype.addTextTrackAsync=V.prototype.Cf;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.gd;V.prototype.getPresentationStartTimeAsDate=V.prototype.Ve;V.prototype.getPlayheadTimeAsDate=V.prototype.fg;
|
|
448
|
+
V.prototype.setTextTrackVisibility=V.prototype.ye;V.prototype.isTextTrackVisible=V.prototype.Ob;V.prototype.selectVariantsByLabel=V.prototype.Lg;V.prototype.selectTextLanguage=V.prototype.me;V.prototype.selectAudioLanguage=V.prototype.wd;V.prototype.getTextLanguages=V.prototype.kg;V.prototype.getAudioLanguages=V.prototype.Mf;V.prototype.getTextLanguagesAndRoles=V.prototype.lg;V.prototype.getAudioLanguagesAndRoles=V.prototype.Nf;V.prototype.selectVariantTrack=V.prototype.pe;
|
|
449
|
+
V.prototype.selectTextTrack=V.prototype.oe;V.prototype.getThumbnails=V.prototype.mg;V.prototype.getImageTracks=V.prototype.Vf;V.prototype.getTextTracks=V.prototype.qb;V.prototype.getVariantTracks=V.prototype.Jb;V.prototype.cancelTrickPlay=V.prototype.Ie;V.prototype.trickPlay=V.prototype.De;V.prototype.getPlaybackRate=V.prototype.Dc;V.prototype.isBuffering=V.prototype.Jc;V.prototype.getKeyStatuses=V.prototype.jd;V.prototype.getExpiration=V.prototype.Bc;V.prototype.drmInfo=V.prototype.drmInfo;
|
|
450
|
+
V.prototype.keySystem=V.prototype.keySystem;V.prototype.seekRange=V.prototype.Va;V.prototype.isAudioOnly=V.prototype.Ye;V.prototype.isInProgress=V.prototype.Mb;V.prototype.isLive=V.prototype.Z;V.prototype.getAdManager=V.prototype.fd;V.prototype.getAssetUri=V.prototype.Pd;V.prototype.getNetworkingEngine=V.prototype.Cc;V.prototype.getMediaElement=V.prototype.dg;V.prototype.getLoadMode=V.prototype.Ue;V.prototype.resetConfiguration=V.prototype.Jg;V.prototype.getConfiguration=V.prototype.getConfiguration;
|
|
451
|
+
V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.Ee;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.xc;
|
|
452
|
+
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?z(h,hi(),3):h.C(2);2!=h.g&&(b=h.h);var k={};if(Lc()){for(var l in oi)k[l]=!0;for(var m in qi)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Lc()?!!oi[n]:Mc(n);for(var p in l)k[p]=
|
|
453
|
+
Lc()?!!qi[p]:Mc(l[p]);c=k;k={};p=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
|
|
454
|
+
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Lc()?mf(l)?!0:MediaSource.isTypeSupported(l)||af(l):Mc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=fm;for(g in f)e[g]=f[g]();return h["return"](e)})};V.isBrowserSupported=Mk;V.setAdManagerFactory=function(a){xk=a};V.registerSupportPlugin=function(a,b){fm[a]=b};V.prototype.destroy=V.prototype.destroy;
|
|
455
|
+
var bm="abrstatuschanged",Wl="adaptation",Tl="buffering",fl="drmsessionupdate",Ij="emsg",cm="error",em="expirationupdated",Rk="loaded",Pk="loading",al="manifestparsed",El="metadata",Jk="onstatechange",Kk="onstateidle",Ul="ratechange",pl="streaming",$l="textchanged",am="texttrackvisibility",Zk="timelineregionadded",Gl="timelineregionenter",Hl="timelineregionexit",Yl="trackschanged",Uk="unloading",Zl="variantchanged",gm={bh:bm,dh:Wl,eh:Tl,hh:fl,oh:Ij,Error:cm,ph:em,vh:"largegap",wh:Rk,xh:Pk,Ch:al,Metadata:El,
|
|
456
|
+
Gh:Jk,Hh:Kk,Ph:Ul,Th:"sessiondata",Uh:pl,Vh:$l,Wh:am,Xh:Zk,Yh:Gl,Zh:Hl,$h:Yl,di:Uk,gi:Zl},Lk=0,uk=1,ol=2,zl=3;V.LoadMode={DESTROYED:Lk,NOT_LOADED:uk,MEDIA_SOURCE:ol,SRC_EQUALS:zl};V.version="v3.1.6";var hm=["3","1"];Eb=new function(a){this.g=a;this.i=Fb;this.h=Gb}(new Cb(Number(hm[0]),Number(hm[1])));var dm=["output-restricted","internal-error"],fm={},xk=null;function im(){this.h=[];this.j=this.i=this.g=0};function jm(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new wf;this.h.m(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.m(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=jm.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
|
|
457
457
|
q.isSkippable=function(){return 0<=this.i.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
|
|
458
|
-
q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
function(f){
|
|
462
|
-
function
|
|
463
|
-
a.h.m(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.g)),a.i.start()}catch(f){
|
|
464
|
-
function
|
|
465
|
-
function(c){b(c,"ad-third-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
458
|
+
q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};M("shaka.ads.ClientSideAd",jm);
|
|
459
|
+
jm.prototype.release=jm.prototype.release;jm.prototype.getPositionInSequence=jm.prototype.getPositionInSequence;jm.prototype.getSequenceLength=jm.prototype.getSequenceLength;jm.prototype.setMuted=jm.prototype.setMuted;jm.prototype.resize=jm.prototype.resize;jm.prototype.isMuted=jm.prototype.isMuted;jm.prototype.setVolume=jm.prototype.setVolume;jm.prototype.getVolume=jm.prototype.getVolume;jm.prototype.play=jm.prototype.play;jm.prototype.pause=jm.prototype.pause;jm.prototype.skip=jm.prototype.skip;
|
|
460
|
+
jm.prototype.canSkipNow=jm.prototype.canSkipNow;jm.prototype.getTimeUntilSkippable=jm.prototype.getTimeUntilSkippable;jm.prototype.isSkippable=jm.prototype.isSkippable;jm.prototype.isPaused=jm.prototype.isPaused;jm.prototype.getRemainingTime=jm.prototype.getRemainingTime;jm.prototype.getMinSuggestedDuration=jm.prototype.getMinSuggestedDuration;jm.prototype.getDuration=jm.prototype.getDuration;function km(a,b,c,d){var e=this;this.o=a;this.g=b;this.B=null;this.D=NaN;this.j=d;this.A=null;this.h=new wf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.1.6");this.i=null;this.h.Na(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){lm(e,f)});this.h.m(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
461
|
+
function(f){mm(e,f)});this.g.onended=function(){e.l.contentComplete()}}km.prototype.stop=function(){this.i&&this.i.stop();this.o&&Wj(this.o)};km.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function mm(a,b){b.getError();nm(a,null);a.j(new N("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
462
|
+
function lm(a,b){a.j(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.D)));a.i=b.getAdsManager(a.g);a.j(new N("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push(new om(e.value));a.j(new N("ad-cue-points-changed",(new Map).set("cuepoints",d)))}pm(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
463
|
+
a.h.m(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.g)),a.i.start()}catch(f){nm(a,null)}}
|
|
464
|
+
function pm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new N(d,e))}a.h.m(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){mm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){qm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.STARTED,function(c){qm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.m(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
465
|
+
function(c){b(c,"ad-third-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){nm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){nm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
466
466
|
a.h.m(a.i,google.ima.AdEvent.Type.PAUSED,function(c){a.A.j=!0;b(c,"ad-paused")});a.h.m(a.i,google.ima.AdEvent.Type.RESUMED,function(c){a.A.j=!1;b(c,"ad-resumed")});a.h.m(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.m(a.i,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.m(a.i,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.m(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.m(a.i,
|
|
467
467
|
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.m(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.m(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.m(a.i,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.m(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.m(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.m(a.i,google.ima.AdEvent.Type.AD_METADATA,
|
|
468
|
-
function(c){b(c,"ad-metadata")});a.h.m(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.m(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.m(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function
|
|
469
|
-
function
|
|
468
|
+
function(c){b(c,"ad-metadata")});a.h.m(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.m(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.m(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function qm(a,b){var c=b.getAd();a.A=new jm(c,a.i);c=(new Map).set("ad",a.A).set("sdkAdObject",c).set("originalEvent",b);a.j(new N("ad-started",c));a.o.setAttribute("ad-active","true");a.g.pause()}
|
|
469
|
+
function nm(a,b){a.j(new N("ad-stopped",(new Map).set("originalEvent",b)));a.o.removeAttribute("ad-active");a.g.play()};function rm(a,b){this.i=a;this.h=null;this.g=b}q=rm.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
470
470
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
471
|
-
q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.o=new
|
|
471
|
+
q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",rm);rm.prototype.release=rm.prototype.release;rm.prototype.getPositionInSequence=rm.prototype.getPositionInSequence;rm.prototype.getSequenceLength=rm.prototype.getSequenceLength;rm.prototype.setMuted=rm.prototype.setMuted;rm.prototype.resize=rm.prototype.resize;rm.prototype.isMuted=rm.prototype.isMuted;
|
|
472
|
+
rm.prototype.setVolume=rm.prototype.setVolume;rm.prototype.getVolume=rm.prototype.getVolume;rm.prototype.play=rm.prototype.play;rm.prototype.pause=rm.prototype.pause;rm.prototype.skip=rm.prototype.skip;rm.prototype.canSkipNow=rm.prototype.canSkipNow;rm.prototype.getTimeUntilSkippable=rm.prototype.getTimeUntilSkippable;rm.prototype.isSkippable=rm.prototype.isSkippable;rm.prototype.isPaused=rm.prototype.isPaused;rm.prototype.getRemainingTime=rm.prototype.getRemainingTime;
|
|
473
|
+
rm.prototype.getMinSuggestedDuration=rm.prototype.getMinSuggestedDuration;rm.prototype.getDuration=rm.prototype.getDuration;function sm(a,b,c,d){var e=this;this.B=a;this.g=b;this.l=null;this.K=NaN;this.j=d;this.I=!1;this.D=this.o=this.A=null;this.H="";this.h=new wf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.B,a);this.j(new N("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){tm(e,f)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.H.length?e.l.resolve(e.H):
|
|
474
|
+
e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.o=new rm(f,e.g);e.D&&(e.o.h=e.D);e.j(new N("ad-started",(new Map).set("ad",e.o)));e.B.setAttribute("ad-active","true")});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
|
|
475
475
|
var f=e.g.currentTime;e.A&&e.A>f&&(e.g.currentTime=e.A,e.A=null)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.D=f.getStreamData().adProgressData;e.o&&(e.o.h=e.D)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new N("ad-first-quartile"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new N("ad-midpoint"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new N("ad-third-quartile"))});
|
|
476
|
-
this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new N("ad-complete"));e.j(new N("ad-stopped"));e.B.removeAttribute("ad-active");e.o=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new N("ad-skipped"));e.j(new N("ad-stopped"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new
|
|
477
|
-
(new Map).set("cuepoints",f)))})}
|
|
478
|
-
function
|
|
479
|
-
q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.j=new
|
|
480
|
-
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new
|
|
481
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new
|
|
482
|
-
(c.I=!0),c.l=new
|
|
483
|
-
q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.i.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.i.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(
|
|
489
|
-
function
|
|
490
|
-
function
|
|
491
|
-
var
|
|
492
|
-
getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},
|
|
493
|
-
|
|
494
|
-
l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;
|
|
495
|
-
q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.o=!0;this.j.
|
|
496
|
-
a):
|
|
497
|
-
q.cast=function(a){var b=this;return
|
|
498
|
-
q.get=function(a,b){var c=this;if("video"==a){if(
|
|
499
|
-
[a,b].concat(ha(e)))};if(
|
|
500
|
-
function
|
|
501
|
-
function
|
|
502
|
-
function
|
|
503
|
-
q.destroy=function(a){a&&this.g
|
|
504
|
-
q.cast=function(){var a=this,b;return
|
|
505
|
-
q.Le=function(a){var b=this;return
|
|
506
|
-
function
|
|
507
|
-
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
508
|
-
function
|
|
509
|
-
function
|
|
510
|
-
function
|
|
511
|
-
function
|
|
512
|
-
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new N(
|
|
513
|
-
function
|
|
514
|
-
function
|
|
515
|
-
if(a.g.
|
|
516
|
-
|
|
476
|
+
this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new N("ad-complete"));e.j(new N("ad-stopped"));e.B.removeAttribute("ad-active");e.o=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new N("ad-skipped"));e.j(new N("ad-stopped"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new om(h.start,h.end));e.j(new N("ad-cue-points-changed",
|
|
477
|
+
(new Map).set("cuepoints",f)))})}sm.prototype.stop=function(){this.H="";this.A=null};sm.prototype.release=function(){this.stop();this.h&&this.h.release()};sm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
|
|
478
|
+
function tm(a,b){a.j(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.K)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.I||a.h.m(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.g.currentTime=e.start)}})};function W(){cb.call(this);this.g=this.h=null;this.j=new im;this.i=navigator.language}u(W,cb);q=W.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.h&&this.h.release();this.h=new km(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
|
|
479
|
+
q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.j=new im};q.requestClientSideAds=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.D=Date.now()/1E3;b.l.requestAds(a)};
|
|
480
|
+
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new sm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
|
|
481
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Pa('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="v3.1.6";c=this.g;var d=b;c.l?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
482
|
+
(c.I=!0),c.l=new We,c.i.requestStream(a),c.H=d||"",c.K=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Pa('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="v3.1.6";this.g.i.replaceAdTagParameters(a)};
|
|
483
|
+
q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.i.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.i.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",W);
|
|
484
|
+
W.prototype.onCueMetadataChange=W.prototype.onCueMetadataChange;W.prototype.onHlsTimedMetadata=W.prototype.onHlsTimedMetadata;W.prototype.onDashTimedMetadata=W.prototype.onDashTimedMetadata;W.prototype.getStats=W.prototype.getStats;W.prototype.replaceServerSideAdTagParameters=W.prototype.replaceServerSideAdTagParameters;W.prototype.requestServerSideStream=W.prototype.requestServerSideStream;W.prototype.initServerSide=W.prototype.initServerSide;W.prototype.requestClientSideAds=W.prototype.requestClientSideAds;
|
|
485
|
+
W.prototype.onAssetUnload=W.prototype.onAssetUnload;W.prototype.release=W.prototype.release;W.prototype.initClientSide=W.prototype.initClientSide;W.prototype.setLocale=W.prototype.setLocale;function om(a,b){this.start=a;this.end=void 0===b?null:b}W.ADS_LOADED="ads-loaded";W.AD_STARTED="ad-started";W.AD_FIRST_QUARTILE="ad-first-quartile";W.AD_MIDPOINT="ad-midpoint";W.AD_THIRD_QUARTILE="ad-third-quartile";W.AD_COMPLETE="ad-complete";W.AD_STOPPED="ad-stopped";W.AD_SKIPPED="ad-skipped";
|
|
486
|
+
W.AD_VOLUME_CHANGED="ad-volume-changed";W.AD_MUTED="ad-muted";W.AD_PAUSED="ad-paused";W.AD_RESUMED="ad-resumed";W.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";W.CUEPOINTS_CHANGED="ad-cue-points-changed";W.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";W.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";W.AD_CLICKED="ad-clicked";W.AD_PROGRESS="ad-progress";W.AD_BUFFERING="ad-buffering";W.AD_IMPRESSION="ad-impression";W.AD_DURATION_CHANGED="ad-duration-changed";W.AD_CLOSED="ad-closed";
|
|
487
|
+
W.AD_LOADED="ad-loaded";W.ALL_ADS_COMPLETED="all-ads-completed";W.AD_LINEAR_CHANGED="ad-linear-changed";W.AD_METADATA="ad-metadata";W.AD_RECOVERABLE_ERROR="ad-recoverable-error";W.AD_BREAK_READY="ad-break-ready";W.AD_INTERACTION="ad-interaction";xk=function(){return new W};function um(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof N){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
|
|
488
|
+
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(Ue(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
|
|
489
|
+
function vm(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=wm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
|
|
490
|
+
function wm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
491
|
+
var xm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ym="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),zm=["loop","playbackRate"],Am=["pause","play"],Bm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,
|
|
492
|
+
getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Cm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Dm=[["getConfiguration","configure"]],Em=[["isTextTrackVisible","setTextTrackVisibility"]],Fm="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),
|
|
493
|
+
Gm=["attach","detach","load","unload"];function Hm(a,b,c,d,e,f){var g=this;this.L=a;this.j=new Q(b);this.ba=c;this.D=!1;this.B=d;this.K=e;this.Y=f;this.h=this.o=!1;this.S="";this.A=null;this.H=function(){return Im(g)};this.I=function(h,k){var l=vm(k);switch(l.type){case "event":var m=l.targetName;l=Ma(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.D&&(g.ba(),g.D=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new P(l.severity,l.category,
|
|
494
|
+
l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;Jm.add(this)}q=Hm.prototype;q.destroy=function(){Jm["delete"](this);Km(this);Lm&&Mm(this);this.j&&(this.j.stop(),this.j=null);this.K=this.B=null;this.h=this.o=!1;this.I=this.H=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.ua=function(){return this.h};q.td=function(){return this.S};
|
|
495
|
+
q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.o=!0;this.j.Ia();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Jm),d=c.next();!d.done;d=c.next())Nm(d.value,b)},function(b){for(var c=r(Jm),d=c.next();!d.done;d=c.next())d=d.value,Om="available"==b,d.j.Ia()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Om&&this.j.T(Pm);(a=Lm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Nm(this,
|
|
496
|
+
a):Lm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Qm),window.__onGCastApiAvailable!=Qm&&Pa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.qe=function(a){this.A=a;this.h&&Rm(this,{type:"appData",appData:this.A})};
|
|
497
|
+
q.cast=function(a){var b=this;return K(function(c){if(!b.o)throw new P(1,8,8E3);if(!Om)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new We;chrome.cast.requestSession(function(d){return Sm(b,a,d)},function(d){return Tm(b,d)});return z(c,b.l,0)})};function Um(a){if(a.h){var b=a.Y();chrome.cast.requestSession(function(c){return Sm(a,b,c)},function(c){return Tm(a,c)})}}q.$b=function(){if(this.h){Km(this);if(Lm){Mm(this);try{Lm.stop(function(){},function(){})}catch(a){}Lm=null}Im(this)}};
|
|
498
|
+
q.get=function(a,b){var c=this;if("video"==a){if(Am.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.jf.apply(c,[a,b].concat(ha(e)))}}else if("player"==a){if(Cm[b]&&!this.get("player","isLive")())return function(){};if(Fm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.jf.apply(c,[a,b].concat(ha(e)))};if(Gm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Gg.apply(c,
|
|
499
|
+
[a,b].concat(ha(e)))};if(Bm[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Rm(this,{type:"set",targetName:a,property:b,value:c})};function Sm(a,b,c){Lm=c;c.addUpdateListener(a.H);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.I);Im(a);Rm(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}
|
|
500
|
+
function Tm(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new P(2,8,c,b))}q.jf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Rm(this,{type:"call",targetName:a,methodName:b,args:d})};q.Gg=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new We;var f=this.O.toString();this.O++;this.i[f]=e;try{Rm(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
|
|
501
|
+
function Nm(a,b){var c=a.Y();a.l=new We;a.D=!0;Sm(a,c,b)}function Mm(a){var b=Lm;b.removeUpdateListener(a.H);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.I)}function Im(a){var b=Lm?"connected"==Lm.status:!1;if(a.h&&!b){a.K();for(var c in a.g)a.g[c]={};Km(a)}a.h=b;a.S=b?Lm.receiver.friendlyName:"";a.j.Ia()}function Km(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}
|
|
502
|
+
function Rm(a,b){var c=um(b),d=Lm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ta)}catch(e){throw c=new P(2,8,8005,e),d=new N("error",(new Map).set("detail",c)),a.B("player",d),a.$b(),c;}}var Pm=.02,Om=!1,Lm=null,Jm=new Set;function Qm(a){if(a){a=r(Jm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Vm(a,b,c){cb.call(this);var d=this;this.j=a;this.i=b;this.h=this.A=this.l=this.B=this.o=null;this.H=c;this.D=new Map;this.g=new Hm(c,function(){return Wm(d)},function(){return Xm(d)},function(e,f){return Ym(d,e,f)},function(){return Zm(d)},function(){return $m(d)});an(this)}u(Vm,cb);q=Vm.prototype;
|
|
503
|
+
q.destroy=function(a){a&&this.g.$b();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.o=this.j=null;cb.prototype.release.call(this);return Promise.all(a)};q.zb=function(){return this.o};q.cc=function(){return this.B};q.He=function(){return this.g.o&&Om};q.ua=function(){return this.g.ua()};q.td=function(){return this.g.td()};
|
|
504
|
+
q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=$m(a),z(c,a.g.cast(b),2)):a.i?z(c,a.i.Ee(),0):c["return"]()})};q.qe=function(a){this.g.qe(a)};q.uf=function(){Um(this.g)};q.$b=function(){this.g.$b()};
|
|
505
|
+
q.Le=function(a){var b=this;return K(function(c){if(1==c.g){if(a==b.H)return c["return"]();b.H=a;b.g.$b();return z(c,b.g.destroy(),2)}b.g=null;b.g=new Hm(a,function(){return Wm(b)},function(){return Xm(b)},function(d,e){return Ym(b,d,e)},function(){return Zm(b)},function(){return $m(b)});b.g.init();A(c)})};
|
|
506
|
+
function an(a){a.g.init();a.h=new wf;for(var b=r(xm),c=b.next();!c.done;c=b.next())a.h.m(a.j,c.value,function(f){a.g.ua()||(f=Ma(f),a.l.dispatchEvent(f))});for(var d in gm)a.h.m(a.i,gm[d],function(f){a.g.ua()||a.A.dispatchEvent(f)});a.o={};b={};for(var e in a.j)b.pc=e,Object.defineProperty(a.o,b.pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return bn(a,f.pc)}}(b),set:function(f){return function(g){var h=f.pc;a.g.ua()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={pc:b.pc};a.B={};cn(a,
|
|
507
|
+
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return dn(a,f)}})});en(a);a.l=new cb;a.l.Yc=a.o;a.A=new cb;a.A.Yc=a.B}function en(a){var b=new Map;cn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.D.set(c,e):a.D.set(e,c)}else b.set(d,c)})}
|
|
508
|
+
function cn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
|
|
509
|
+
function $m(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.Pd(),startTime:null};a.j.pause();for(var c=r(zm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=r(Dm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=r(Em);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function Wm(a){var b=new N("caststatuschanged");a.dispatchEvent(b)}
|
|
510
|
+
function Xm(a){var b=new N(a.o.paused?"pause":"play");a.l.dispatchEvent(b)}
|
|
511
|
+
function Zm(a){for(var b=r(Dm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=r(zm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=r(zm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=r(Em);for(k=
|
|
512
|
+
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new N(cm,h);a.i.dispatchEvent(h)})}
|
|
513
|
+
function bn(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.ua()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.ua()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
|
|
514
|
+
function dn(a,b){a.D.has(b)&&(b=a.D.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.o};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Cc()};if("getAdManager"==b)return function(){return a.i.fd()};if("setVideoContainer"==b)return function(c){return a.i.ze(c)};
|
|
515
|
+
if(a.g.ua()){if("getManifest"==b||"drmInfo"==b)return function(){Pa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Pa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ua()&&0==Object.keys(a.g.g.video).length&&Bm[b]||!a.g.ua()?a.i[b].bind(a.i):a.g.get("player",b)}function Ym(a,b,c){a.g.ua()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}M("shaka.cast.CastProxy",Vm);Vm.prototype.changeReceiverId=Vm.prototype.Le;
|
|
516
|
+
Vm.prototype.forceDisconnect=Vm.prototype.$b;Vm.prototype.suggestDisconnect=Vm.prototype.uf;Vm.prototype.setAppData=Vm.prototype.qe;Vm.prototype.cast=Vm.prototype.cast;Vm.prototype.receiverName=Vm.prototype.td;Vm.prototype.isCasting=Vm.prototype.ua;Vm.prototype.canCast=Vm.prototype.He;Vm.prototype.getPlayer=Vm.prototype.cc;Vm.prototype.getVideo=Vm.prototype.zb;Vm.prototype.destroy=Vm.prototype.destroy;function fn(a,b,c,d){cb.call(this);var e=this;this.g=a;this.i=b;this.h=new wf;this.O={video:a,player:b};this.I=c||function(){};this.S=d||function(f){return f};this.j=null;this.K=!1;this.A=!0;this.o=0;this.H=!1;this.D=!0;this.B=this.l=null;this.L=new Q(function(){gn(e)});hn(this)}u(fn,cb);q=fn.prototype;q.isConnected=function(){return this.K};q.qg=function(){return this.A};q.Og=function(a){this.j=a};q.If=function(){this.j=null};
|
|
517
517
|
q.Pg=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.title=a};q.Ng=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.images=[{url:a}]};q.Mg=function(a){this.j||(this.j={});this.j.artist=a;this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
518
|
-
q.destroy=function(){var a=this,b,c;return
|
|
519
|
-
function
|
|
520
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
521
|
-
!1;
|
|
522
|
-
function
|
|
523
|
-
function
|
|
524
|
-
a.i[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
525
|
-
function
|
|
526
|
-
function
|
|
527
|
-
function
|
|
528
|
-
c.methodName;"player"==d&&"load"==e&&(a.o=0,a.H=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.D=!0}));c.then(function(){return
|
|
529
|
-
function
|
|
530
|
-
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||
|
|
531
|
-
function
|
|
532
|
-
|
|
533
|
-
function
|
|
534
|
-
function
|
|
535
|
-
function
|
|
536
|
-
function
|
|
537
|
-
function
|
|
538
|
-
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Oe:g,ii:e,drmInfos:a,Se:!0}}function
|
|
539
|
-
function
|
|
540
|
-
function
|
|
541
|
-
function
|
|
542
|
-
function
|
|
543
|
-
function
|
|
544
|
-
var
|
|
518
|
+
q.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.O=null,a.I=null,a.K=!1,a.A=!0,a.l=null,a.B=null,cb.prototype.release.call(a),z(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
|
|
519
|
+
function hn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return jn(a)};b.onSenderDisconnected=function(){return jn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&kn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);kn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return ln(a,
|
|
520
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return mn(a,e)};b.start();b=r(xm);for(var c=b.next();!c.done;c=b.next())a.h.m(a.g,c.value,function(e){return nn(a,"video",e)});for(var d in gm)a.h.m(a.i,gm[d],function(e){return nn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.ue(3840,2160):a.i.ue(1920,1080);a.h.m(a.g,"loadeddata",function(){a.H=!0});a.h.m(a.i,"loading",function(){a.A=
|
|
521
|
+
!1;on(a)});a.h.m(a.g,"playing",function(){a.A=!1;on(a)});a.h.m(a.g,"pause",function(){on(a)});a.h.m(a.i,"unloading",function(){a.A=!0;on(a)});a.h.m(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,on(a))})).T(pn)})}function jn(a){a.o=0;a.D=!0;a.K=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;on(a)}
|
|
522
|
+
function on(a){var b;K(function(c){if(1==c.g)return z(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new N("caststatuschanged");a.dispatchEvent(b);qn(a)||rn(a);A(c)})}
|
|
523
|
+
function sn(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;K(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.I(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,F(v,5),z(v,a.i.load(b.manifest,b.startTime),7)):z(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=H(v),h=cm,k=(new Map).set("detail",g),l=new N(h,k),a.i&&a.i.dispatchEvent(l),v["return"]();case 3:if(!a.i)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
|
|
524
|
+
a.i[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),rn(a));A(v)}})}function nn(a,b,c){a.i&&(gn(a),kn(a,{type:"event",targetName:b,event:c},a.l))}
|
|
525
|
+
function gn(a){a.L.T(tn);for(var b={video:{},player:{}},c=r(ym),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Z())for(var e in Cm)0==a.o%Cm[e]&&(b.player[e]=a.i[e]());for(var f in Bm)0==a.o%Bm[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.H&&(a.o+=1);kn(a,{type:"update",update:b},a.l);qn(a)}function qn(a){return a.D&&(a.g.duration||a.i.Z())?(un(a),a.D=!1,!0):!1}
|
|
526
|
+
function un(a,b){var c={contentId:a.i.Pd(),streamType:a.i.Z()?"LIVE":"BUFFERED",contentType:""};a.i.Z()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);rn(a,void 0===b?0:b,c)}
|
|
527
|
+
function mn(a,b){var c=vm(b.data);switch(c.type){case "init":a.o=0;a.H=!1;a.D=!0;sn(a,c.initState,c.appData);gn(a);break;case "appData":a.I(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.O[d][e]=c;break;case "call":d=a.O[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
|
|
528
|
+
c.methodName;"player"==d&&"load"==e&&(a.o=0,a.H=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.D=!0}));c.then(function(){return vn(a,h,g,null)},function(k){return vn(a,h,g,k)})}}
|
|
529
|
+
function ln(a,b){var c=vm(b.data);switch(c.type){case "PLAY":a.g.play();rn(a);break;case "PAUSE":a.g.pause();rn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),rn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),rn(a));break;case "STOP":a.i.Ee().then(function(){a.i&&rn(a)});break;case "GET_STATUS":un(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
|
|
530
|
+
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||rn(a);break;case "LOAD":a.o=0;a.H=!1;a.D=!1;d=c.media;e=c.currentTime;f=a.S(d.contentId);g=c.autoplay||!0;a.I(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&un(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");kn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:kn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
|
|
531
|
+
function vn(a,b,c,d){a.i&&kn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function kn(a,b,c,d){a.K&&(a=um(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function rn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?wn:a.i.Jc()?xn:a.g.paused?yn:zn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);kn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
|
|
532
|
+
M("shaka.cast.CastReceiver",fn);fn.prototype.destroy=fn.prototype.destroy;fn.prototype.setContentArtist=fn.prototype.Mg;fn.prototype.setContentImage=fn.prototype.Ng;fn.prototype.setContentTitle=fn.prototype.Pg;fn.prototype.clearContentMetadata=fn.prototype.If;fn.prototype.setContentMetadata=fn.prototype.Og;fn.prototype.isIdle=fn.prototype.qg;fn.prototype.isConnected=fn.prototype.isConnected;var tn=.5,pn=5,wn="IDLE",zn="PLAYING",xn="BUFFERING",yn="PAUSED";function An(a){var b=this;this.g=[];this.h=[];this.data=[];(new Bc).box("moov",Fc).X("pssh",function(c){if(!(1<c.version)){var d=mc(c.reader.V,-12,c.size);b.data.push(d);b.g.push(ad(c.reader.Ab(16)));if(0<c.version){d=c.reader.R();d=r(jb(d));for(var e=d.next();!e.done;e=d.next())e=ad(c.reader.Ab(16)),b.h.push(e)}}}).parse(a)}
|
|
533
|
+
function Bn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=pc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Cn(a){if(!a)return a;var b=new An(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Sc:c.Sc},d=b.next())c.Sc=d.value,a.some(function(e){return function(f){return kc(f,e.Sc)}}(c))||a.push(c.Sc);return bd.apply(Wc,ha(a))};function Dn(a,b){var c=En(a,b);return 1!=c.length?null:c[0]}function Fn(a,b,c){a=Gn(a,b,c);return 1!=a.length?null:a[0]}function En(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function Hn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function Gn(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
|
|
534
|
+
function In(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Jn(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Kn(a){return Array.from(a.childNodes).every(Ln)?a.textContent.trim():null}function Ln(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Mn(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}
|
|
535
|
+
function Nn(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}function On(a){if(!a)return null;a=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
536
|
+
function Pn(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Qn(a){a=Number(a);return 0===a%1?a:null}function Rn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Sn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Tn(a){a=Number(a);return isNaN(a)?null:a}function Un(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
|
|
537
|
+
function Vn(a,b){var c=new DOMParser,d=null,e=null;try{e=c.parseFromString(a,"text/xml")}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d}function Wn(a,b){try{var c=sc(a);return Vn(c,b)}catch(d){return null}};function Xn(a,b,c){var d=Yn(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.mf?(e=h.init||e,!1):!0}),f.length&&(a=Zn(e,f,c),0==a.length&&(a=[Mb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Mb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
|
|
538
|
+
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Oe:g,ii:e,drmInfos:a,Se:!0}}function $n(a,b,c,d){var e=Xn(a,c,d);if(b.Se){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Se=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new P(2,4,4008);return e.Oe||b.Oe}
|
|
539
|
+
function ao(a){var b=0,c=pc(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=mc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
540
|
+
function bo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function co(a){a=Fn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Zc(a.textContent);a=ao(a).filter(function(b){return b.type===eo})[0];if(!a)return"";a=tc(a.value,!0);return(a=Vn(a,"WRMHEADER"))?bo(a):""}
|
|
541
|
+
function Zn(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.mf];if(f){var g;if(g=Fn(e.node,"urn:microsoft:playready","pro")){g=Zc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Bn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Mb(f,e.init||a||g);if(f=fo.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
|
|
542
|
+
function Yn(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=go(c.value))&&b.push(c);return b}
|
|
543
|
+
function go(a){var b=a.getAttribute("schemeIdUri"),c=In(a,"urn:mpeg:cenc:2013","default_KID"),d=Gn(a,"urn:mpeg:cenc:2013","pssh").map(Kn);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Zc(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,mf:b,keyId:c,init:0<e.length?e:null}}
|
|
544
|
+
var eo=1,fo=(new Map).set("com.widevine.alpha",function(a){return(a=Fn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",co).set("com.microsoft.playready.recommendation",co).set("com.microsoft.playready.software",co).set("com.microsoft.playready.hardware",co);function ho(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
|
|
545
545
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
546
|
-
function
|
|
547
|
-
v&&(v-=e);if(!n)break;p=null!=v?v:m;v=x||0;if(0>v)if(t){t=
|
|
548
|
-
function
|
|
549
|
-
function
|
|
550
|
-
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return
|
|
551
|
-
function
|
|
552
|
-
function
|
|
553
|
-
return h};function
|
|
554
|
-
function
|
|
555
|
-
a.g.ma(),b);a.g.skip(b);return new
|
|
556
|
-
function
|
|
557
|
-
function
|
|
558
|
-
function
|
|
559
|
-
function
|
|
560
|
-
L=new
|
|
561
|
-
function
|
|
562
|
-
Infinity,d);return{
|
|
563
|
-
function
|
|
564
|
-
function
|
|
565
|
-
p,!0),l.
|
|
566
|
-
function
|
|
567
|
-
function
|
|
568
|
-
x=b.Zd,w=a.bandwidth||null,y=a.N.id,C=a.N.Sa,D=l-b.
|
|
569
|
-
function
|
|
570
|
-
function
|
|
571
|
-
function
|
|
572
|
-
x=b.map(function($a){return $a.imageStreams});w=r(v);for(y=w.next();!y.done;y=w.next())C=y.value,C.push(
|
|
573
|
-
|
|
574
|
-
allowedByKeySystem:!0,decodingInfos:[]});a.l=I;
|
|
575
|
-
function
|
|
576
|
-
function
|
|
577
|
-
function
|
|
578
|
-
function
|
|
579
|
-
function
|
|
580
|
-
k.push(
|
|
546
|
+
function io(a,b){var c=jo(a,b,"timescale"),d=1;c&&(d=Rn(c)||1);var e=jo(a,b,"duration");c=Rn(e||"");"image"==a.N.contentType&&(c=Tn(e||""));c&&(c/=d);var f=jo(a,b,"startNumber");e=Number(jo(a,b,"presentationTimeOffset"))||0;var g=Sn(f||"");if(null==f||null==g)g=1;var h=ko(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.$.duration||Infinity,l=En(h,"S");h=[];var m=-e;l=r(mb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,t=n.next,v=Mn(p,"t",Sn);n=Mn(p,"d",Sn);var x=Mn(p,"r",Qn);null!=
|
|
547
|
+
v&&(v-=e);if(!n)break;p=null!=v?v:m;v=x||0;if(0>v)if(t){t=Mn(t,"t",Sn);if(null==t)break;else if(p>=t)break;v=Math.ceil((t-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;v=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);t=r(jb(v+1));for(v=t.next();!v.done;v=t.next())m=p+n,h.push({start:p/f,end:m/f,Vg:p}),p=m}f=h}return{timescale:d,Ca:c,nc:g,sb:e/d||0,Fe:e,timeline:f}}
|
|
548
|
+
function jo(a,b,c){return[b(a.N),b(a.Ea),b(a.ya)].filter(Jb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function ko(a,b,c){return[b(a.N),b(a.Ea),b(a.ya)].filter(Jb).map(function(d){return Dn(d,c)}).reduce(function(d,e){return d||e})}
|
|
549
|
+
function lo(a,b,c,d,e,f){for(var g=In(a,"http://www.w3.org/1999/xlink","href"),h=In(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Zg(new P(2,4,4028));if("onLoad"!=h)return Zg(new P(2,4,4027));var m=Lb([d],[g]);return e.request(0,mh(m,b)).sa(function(n){n=Wn(n.data,a.tagName);if(!n)return Zg(new P(2,4,4001,g));
|
|
550
|
+
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return mo(a,b,c,m[0],e,f+1)})}
|
|
551
|
+
function mo(a,b,c,d,e,f){f=void 0===f?0:f;if(In(a,"http://www.w3.org/1999/xlink","href")){var g=lo(a,b,c,d,e,f);c&&(g=g.sa(void 0,function(){return mo(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==In(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(mo(k,b,c,d,e,f)));return ch(g).sa(function(){return a})};function no(a,b,c,d,e,f,g){var h,k=(new Bc).X("sidx",function(l){h=oo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
|
|
552
|
+
function oo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.mc(),m=g.reader.mc();g.reader.skip(2);var n=g.reader.lc();a=a+g.size+m;n=r(jb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.R();m=(p&2147483648)>>>31;p&=2147483647;var t=g.reader.R();g.reader.skip(4);if(1==m)throw new P(2,3,3006);h.push(new ui(l/k+c,(l+t)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=t;a+=p}g.parser.stop();
|
|
553
|
+
return h};function po(a){this.h=pc(a);this.g=new yc(this.h,0)}po.prototype.Ha=function(){return this.g.Ha()};
|
|
554
|
+
function qo(a){var b=ro(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=ro(a);a:{d=r(so);for(var e=d.next();!e.done;e=d.next())if(kc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ma();else{if(8==b.length&&b[1]&224)throw new P(2,3,3001);d=0;e=r(mb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.xa?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.ma()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ma();d=pc(a.h,
|
|
555
|
+
a.g.ma(),b);a.g.skip(b);return new to(c,d)}function ro(a){var b=a.g.ma(),c=a.g.na();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return mc(a.h,b,c)}var so=[[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 to(a,b){this.id=a;this.g=b}
|
|
556
|
+
function uo(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=r(jb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function vo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new po(a.g);for(var n=null,p=null;a.Ha();){var t=qo(a);if(187==t.id){var v=wo(t);v&&(t=c*v.Wg,v=b+v.Fg,null!=n&&m.push(new ui(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new ui(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
557
|
+
function wo(a){var b=new po(a.g);a=qo(b);if(179!=a.id)throw new P(2,3,3013);a=uo(a);b=qo(b);if(183!=b.id)throw new P(2,3,3012);b=new po(b.g);for(var c=0;b.Ha();){var d=qo(b);if(241==d.id){c=uo(d);break}}return{Wg:a,Fg:c}};function xo(a,b){var c=ko(a,b,"Initialization");if(!c)return null;var d=a.N.Sa,e=c.getAttribute("sourceURL");e&&(d=Lb(a.N.Sa,[e]));e=0;var f=null;if(c=Mn(c,"range",Pn))e=c.start,f=c.end;return new si(function(){return d},e,f)}
|
|
558
|
+
function yo(a,b){var c=Number(jo(a,zo,"presentationTimeOffset"))||0,d=jo(a,zo,"timescale"),e=1;d&&(e=Rn(d)||1);var f=c/e||0,g=xo(a,zo);Ao(a,g);var h=fh(a);return{ac:function(){var k=ko(h,zo,"RepresentationIndex"),l=h.N.Sa;k&&(k=k.getAttribute("sourceURL"))&&(l=Lb(h.N.Sa,[k]));k=Bo(h);return Co(h,b,g,l,k.start,k.end,f)}}}
|
|
559
|
+
function Co(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,w,y,C,D,B,E;return K(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Fb||!a.$.$e,l=a.$.start,m=a.$.duration,n=a.N.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ga(),c.Da,c.wa):null],p=null,z(G,Promise.all(v),2);x=G.h;w=x[0];y=x[1]||null;C=null;D=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var I=no(w,e,d,c,D,B,E);else{I=new po(y);if(440786851!=qo(I).id)throw new P(2,3,3008);var L=qo(I);if(408125543!=L.id)throw new P(2,3,3009);I=L.g.byteOffset;
|
|
560
|
+
L=new po(L.g);for(var J=null;L.Ha();){var O=qo(L);if(357149030==O.id){J=O;break}}if(!J)throw new P(2,3,3010);J=new po(J.g);O=1E6;for(L=null;J.Ha();){var S=qo(J);if(2807729==S.id)O=uo(S);else if(17545==S.id)if(4==S.g.byteLength)L=S.g.getFloat32(0);else if(8==S.g.byteLength)L=S.g.getFloat64(0);else throw new P(2,3,3003);}if(null==L)throw new P(2,3,3011);J=O/1E9;L*=J;O=qo(new po(w));if(475249515!=O.id)throw new P(2,3,3007);I=vo(O,I,J,L,d,c,D,B,E)}C=I;h.ic(C);t=new Ui(C);k&&t.yb(B,E,!0);return G["return"](t)})}
|
|
561
|
+
function zo(a){return a.Oc}function Bo(a){var b=ko(a,zo,"RepresentationIndex");a=jo(a,zo,"indexRange");a=Pn(a||"");b&&(a=Mn(b,"range",Pn,a));return a}function Ao(a,b){Do(a,b);if(!Bo(a))throw new P(2,4,4002);}function Do(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Qb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);};function Eo(a,b){var c=xo(a,Fo),d=Go(a);if(!d.Ca&&!d.timeline&&1<d.ec.length)throw new P(2,4,4002);if(!d.Ca&&!a.$.duration&&!d.timeline&&1==d.ec.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.ya.id&&a.N.id&&(f=a.ya.id+","+a.N.id,e=b[f]);c=Ho(a.$.start,a.$.duration,a.N.Sa,d,c);d=!e;e?e.fc(c,a.presentationTimeline.pb()):(e=new Ui(c),f&&a.Fb&&(b[f]=e));a.presentationTimeline.ic(c);a.Fb&&a.$.$e||e.yb(a.$.start,a.$.duration?a.$.start+a.$.duration:
|
|
562
|
+
Infinity,d);return{ac:function(){return Promise.resolve(e)}}}function Fo(a){return a.Bb}function Go(a){var b=Io(a);a=io(a,Fo);var c=a.nc;0==c&&(c=1);var d=0;a.Ca?d=a.Ca*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ca:a.Ca,startTime:d,nc:c,sb:a.sb,timeline:a.timeline,ec:b}}
|
|
563
|
+
function Ho(a,b,c,d,e){var f=d.ec.length;d.timeline&&d.timeline.length!=d.ec.length&&(f=Math.min(d.timeline.length,d.ec.length));var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(jb(f));for(var n=f.next();!n.done;m={Gd:m.Gd},n=f.next()){n=n.value;var p=d.ec[n];m.Gd=Lb(c,[p.wg]);var t=void 0;t=null!=d.Ca?l+d.Ca:d.timeline?d.timeline[n].end:l+b;k.push(new ui(a+l,a+t,function(v){return function(){return v.Gd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
|
|
564
|
+
function Io(a){return[a.N.Bb,a.Ea.Bb,a.ya.Bb].filter(Jb).map(function(b){return En(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Xe&&(a.Xe=!0);var c=b.getAttribute("media");b=Mn(b,"mediaRange",Pn,{start:0,end:null});return{wg:c,start:b.start,end:b.end}})};function Jo(a,b,c,d,e,f){var g=So(a),h=To(a);Uo(h);var k=fh(a);if(h.Ic)return Do(a,g),{ac:function(){var v=ho(h.Ic,k.N.id,null,k.bandwidth||null,null);v=Lb(k.N.Sa,[v]);return Co(k,b,g,v,0,null,h.sb)}};if(h.Ca)return d||(a.presentationTimeline.ae(h.Ca),a.presentationTimeline.be(a.$.start)),{ac:function(){return Vo(k,h,e,g,f)}};var l=null;d=null;a.ya.id&&a.N.id&&(d=a.ya.id+","+a.N.id,l=c[d]);var m=Wo(k,h,g),n=a.$.start,p=a.$.duration?a.$.start+a.$.duration:Infinity,t=Infinity!=p;l?(t&&(new Ui(m)).yb(n,
|
|
565
|
+
p,!0),l.fc(m,a.presentationTimeline.pb())):(l=new Ui(m),d&&a.Fb&&(c[d]=l));a.presentationTimeline.ic(m);t&&l.yb(n,p);return{ac:function(){return Promise.resolve(l)}}}function Xo(a){return a.Pc}function To(a){var b=io(a,Xo),c=jo(a,Xo,"media");a=jo(a,Xo,"index");return{Ca:b.Ca,timescale:b.timescale,nc:b.nc,sb:b.sb,Fe:b.Fe,timeline:b.timeline,Zd:c,Ic:a}}
|
|
566
|
+
function Uo(a){var b=a.Ic?1:0;b+=a.timeline?1:0;b+=a.Ca?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Ic&&(a.timeline=null),a.Ca=null);if(!a.Ic&&!a.Zd)throw new P(2,4,4002);}
|
|
567
|
+
function Vo(a,b,c,d,e){function f(J){var O=(J-t)*p,S=O+b.sb,U=O+l;O=U+p;var Z=Math.min(O,h());U=new ui(U,Z,function(){var ia=ho(x,y,J,w,S*v);return Lb(C,[ia])},0,null,d,D,l,h());U.j=O;return U}function g(){var J=[Math.max(k.pb(),l),Math.min(k.Ib(),h())].map(function(O){return O-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(O){return O+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.$.start,m=a.ya.id,n=a.$.duration,p=b.Ca,t=b.nc,v=b.timescale,
|
|
568
|
+
x=b.Zd,w=a.bandwidth||null,y=a.N.id,C=a.N.Sa,D=l-b.sb,B=g();a=a.Fb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var I=new Ui(c);c=k.Ib()<h();E=k.Z();if(c||E){var L=Math.max(a,B+1);I.xd(p,function(){var J=k.pb();I.Gb(J);var O=r(g());O.next();O=O.next().value;for(var S=[];L<=O;){var U=f(L);S.push(U);L++}return J>h()&&!S.length?null:S})}return Promise.resolve(I)}
|
|
569
|
+
function Wo(a,b,c){var d=a.$.start,e=a.$.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=r(mb(b.timeline)),l=k.next();!l.done;h={Fd:h.Fd,Id:h.Id,Ld:h.Ld,Cd:h.Cd,Nd:h.Nd,Dd:h.Dd},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.Vg;m=m.end;h.Ld=l.xa+b.nc;h.Nd=p+b.Fe;h.Id=a.N.id;h.Cd=a.bandwidth||null;h.Fd=b.Zd;h.Dd=a.N.Sa;g.push(new ui(d+n,d+m,function(t){return function(){var v=ho(t.Fd,t.Id,t.Ld,t.Cd||null,t.Nd);return Lb(t.Dd,[v]).map(function(x){return x.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
570
|
+
function So(a){var b=jo(a,Xo,"initialization");if(!b)return null;var c=a.N.id,d=a.bandwidth||null,e=a.N.Sa;return new si(function(){var f=ho(b,c,null,d,null);return Lb(e,[f])},0,null)};function Yo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.o=new Set}Yo.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
571
|
+
function Zo(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,O,S,U,Z,ia,ma,na,Qa,Ga,tb,Za;return K(function(eb){switch(eb.g){case 1:d=Rb;$o(b);ap(b);bp(b);cp(b);if(!c&&1==b.length){e=b[0];a.g=e.$c;a.h=e.zd;a.j=e.textStreams;a.i=e.imageStreams;eb.C(2);break}f=-1;g=r(mb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.xa,n=l.item,a.o.has(n.id)||(a.o.add(n.id),-1==f&&(f=m));if(-1==f)return eb["return"]();p=b.map(function($a){return $a.$c});t=b.map(function($a){return $a.zd});v=b.map(function($a){return $a.textStreams});
|
|
572
|
+
x=b.map(function($a){return $a.imageStreams});w=r(v);for(y=w.next();!y.done;y=w.next())C=y.value,C.push(dp(d.ra));D=r(x);for(B=D.next();!B.done;B=D.next())E=B.value,E.push(dp(d.Xc));return z(eb,ep(a.g,p,f,fp,gp),3);case 3:return z(eb,ep(a.h,t,f,fp,gp),4);case 4:return z(eb,ep(a.j,v,f,fp,gp),5);case 5:return z(eb,ep(a.i,x,f,fp,gp),2);case 2:G=0;I=[];if(a.h.length&&a.g.length)for(Z=r(a.g),ia=Z.next();!ia.done;ia=Z.next())for(ma=ia.value,na=r(a.h),Qa=na.next();!Qa.done;Qa=na.next())Ga=Qa.value,tb=ki(ma.drmInfos,
|
|
573
|
+
Ga.drmInfos),ma.drmInfos.length&&Ga.drmInfos.length&&!tb.length||(Za=G++,I.push({id:Za,language:ma.language,primary:ma.primary,audio:ma,video:Ga,bandwidth:(ma.bandwidth||0)+(Ga.bandwidth||0),drmInfos:tb,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(L=a.h.concat(a.g),J=r(L),O=J.next();!O.done;O=J.next())S=O.value,U=G++,I.push({id:U,language:S.language,primary:S.primary,audio:S.type==d.Cb?S:null,video:S.type==d.ib?S:null,bandwidth:S.bandwidth||0,drmInfos:S.drmInfos,allowedByApplication:!0,
|
|
574
|
+
allowedByKeySystem:!0,decodingInfos:[]});a.l=I;A(eb)}})}
|
|
575
|
+
function $o(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.$c),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&id(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.$c=c}}
|
|
576
|
+
function bp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&id(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
577
|
+
function ap(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.zd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&id(e.roles,h.roles)&&yh(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.zd=c}}
|
|
578
|
+
function cp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
|
|
579
|
+
function hp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,O,S;return K(function(U){switch(U.g){case 1:b=Rb;if(1==a.length)return U["return"](a[0]);c=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.Cb})});d=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.ib})});e=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.ra})});f=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.Xc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
|
|
580
|
+
k.push(ip(b.ra));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(ip(b.Xc));return z(U,ep([],c,0,jp,kp),2);case 2:return p=U.h,z(U,ep([],d,0,jp,kp),3);case 3:return t=U.h,z(U,ep([],e,0,jp,kp),4);case 4:return v=U.h,z(U,ep([],f,0,jp,kp),5);case 5:x=U.h;w=0;if(t.length&&p.length)for(E=r(p),G=E.next();!G.done;G=E.next())for(I=G.value,L=r(t),J=L.next();!J.done;J=L.next())O=J.value,S=w++,O.variantIds.push(S),I.variantIds.push(S);else for(y=t.concat(p),C=r(y),D=C.next();!D.done;D=C.next())B=D.value,
|
|
581
581
|
B.variantIds=[w++];return U["return"](t.concat(p).concat(v).concat(x))}})}
|
|
582
|
-
function
|
|
583
|
-
y.next();
|
|
584
|
-
function
|
|
585
|
-
function
|
|
586
|
-
function
|
|
587
|
-
function
|
|
588
|
-
(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
589
|
-
function
|
|
590
|
-
function
|
|
591
|
-
function
|
|
592
|
-
function
|
|
593
|
-
d=
|
|
594
|
-
function
|
|
595
|
-
function
|
|
596
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
597
|
-
function
|
|
598
|
-
function
|
|
599
|
-
q.stop=function(){for(var a=r(Object.values(this.o)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.v=this.G=null;this.h=[];this.F=null;this.o={};this.g=null;null!=this.B&&(this.B.stop(),this.B=null);return this.i.destroy()};q.update=function(){var a=this,b;return
|
|
600
|
-
function
|
|
601
|
-
function
|
|
602
|
-
function
|
|
603
|
-
x=null;v||(x=
|
|
604
|
-
profiles:
|
|
605
|
-
|
|
606
|
-
function
|
|
582
|
+
function ep(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,O,S,U,Z,ia;return K(function(ma){switch(ma.g){case 1:f=Rb;g=[];h=r(mb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.xa,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);t=r(a);v=t.next();case 2:if(v.done){ma.C(4);break}x=v.value;return z(ma,lp(x,b,c,e,g),5);case 5:w=ma.h;if(!w)throw new P(2,4,4037);v=t.next();ma.C(2);break;case 4:y=r(g),C=y.next();case 6:if(C.done){ma.C(8);break}D=C.value;B=r(D);E=B.next();case 9:if(E.done){C=
|
|
583
|
+
y.next();ma.C(6);break}G=E.value;return z(ma,mp(G,b,d,e,g),12);case 12:(I=ma.h)&&a.push(I);E=B.next();ma.C(9);break;case 8:L=r(g);for(C=L.next();!C.done;C=L.next())for(J=C.value,O={},S=r(J),E=S.next();!E.done;O={vb:O.vb},E=S.next())if(O.vb=E.value,U=O.vb.type==f.ra&&!O.vb.language,Z=O.vb.type==f.Xc&&!O.vb.tilesLayout,!U&&!Z&&(ia=a.some(function(na){return function(Qa){return Qa.mimeType==na.vb.mimeType&&jf(Qa.codecs)==jf(na.vb.codecs)}}(O))))throw new P(2,4,4037);return ma["return"](a)}})}
|
|
584
|
+
function lp(a,b,c,d,e){var f;return K(function(g){if(1==g.g)return(f=np(b,a))?z(g,op(f),2):g["return"](!1);pp(a,f,c,d,e);return g["return"](!0)})}function op(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
|
|
585
|
+
function mp(a,b,c,d,e){var f,g;return K(function(h){if(1==h.g)return f=c(a),(g=np(b,f))?f.createSegmentIndex?z(h,op(g),2):h.C(2):h["return"](null);pp(f,g,0,d,e);return h["return"](f)})}function pp(a,b,c,d,e){b=r(mb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.xa;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Xb(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
|
|
586
|
+
function fp(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Xi;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function jp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
587
|
+
function gp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=ki(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
588
|
+
(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=fp(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),gp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&gp(a.trickModeVideo,b)}
|
|
589
|
+
function kp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
|
|
590
|
+
function np(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:qp,video:qp,text:rp,image:sp}[f.type],h={audio:tp,video:up,text:vp,image:wp}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function qp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||jf(b.codecs)!=jf(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ki(c,d).length:1)}return c?!1:!0}
|
|
591
|
+
function rp(a,b){return a.language?b.language?0==Xb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function sp(a){return a.tilesLayout?!0:!1}
|
|
592
|
+
function tp(a,b,c){if(a.id==c.id)return!0;var d=Xb(a.language,b.language),e=Xb(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(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;if(c.roles.length&&!b.roles.length)return!1;
|
|
593
|
+
d=xp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==yp)return!0;if(d==zp)return!1;d=xp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==yp?!0:d==zp?!1:a.bandwidth&&Ap(a.bandwidth,b.bandwidth,c.bandwidth)==yp?!0:!1}
|
|
594
|
+
function up(a,b,c){if(a.id==c.id)return!0;var d=xp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==yp)return!0;if(d==zp)return!1;if(a.frameRate){d=xp(a.frameRate,b.frameRate,c.frameRate);if(d==yp)return!0;if(d==zp)return!1}return a.bandwidth&&Ap(a.bandwidth,b.bandwidth,c.bandwidth)==yp?!0:!1}
|
|
595
|
+
function vp(a,b,c){if(a.id==c.id)return!0;var d=Xb(a.language,b.language),e=Xb(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(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;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
|
|
596
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function wp(a,b,c){return a.id==c.id?!0:xp(a.width*a.height,b.width*b.height,c.width*c.height)==yp?!0:!1}function ip(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
597
|
+
function dp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ui([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
598
|
+
function xp(a,b,c){if(b==a&&a!=c)return zp;if(c==a&&a!=b)return yp;if(b>a){if(c<=a||c-a<b-a)return yp;if(c-a>b-a)return zp}else{if(c>a)return zp;if(a-c<a-b)return yp;if(a-c>a-b)return zp}return Bp}function Ap(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?yp:b<a?zp:Bp}var yp=1,Bp=0,zp=-1;function Cp(){var a=this;this.G=this.v=null;this.h=[];this.F=null;this.H=1;this.o={};this.L={};this.g=new Yo;this.D=0;this.I=new fc(5);this.B=new Q(function(){a.Lc()});this.i=new gh;this.j=null;this.K=[];this.l=Infinity;this.A=!1}q=Cp.prototype;q.configure=function(a){this.v=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.A=b.isLowLatencyMode(),c.h=[a],c.G=b,z(e,Dp(c),2);d=e.h;c.G&&Ep(c,d);if(!c.G)throw new P(2,7,7001);return e["return"](c.F)})};
|
|
599
|
+
q.stop=function(){for(var a=r(Object.values(this.o)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.v=this.G=null;this.h=[];this.F=null;this.o={};this.g=null;null!=this.B&&(this.B.stop(),this.B=null);return this.i.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return F(c,2),z(c,Dp(a),4);if(2!=c.g)return va(c,0);b=H(c);if(!a.G||!b)return c["return"]();a.G.onError(b);A(c)})};q.onExpirationUpdated=function(){};
|
|
600
|
+
function Dp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=mh(a.h,a.v.retryParameters),c=a.G.networkingEngine,d=Date.now(),e=c.request(0,b),hh(a.i,e),z(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.G)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return z(k,Fp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;gc(a.I,1,h);return k["return"](h)})}
|
|
601
|
+
function Fp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Wn(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.v.dash.disableXlinkProcessing)return k["return"](Gp(a,d,c));f=a.v.dash.xlinkFailGracefully;g=mo(d,a.v.retryParameters,f,c,a.G.networkingEngine);hh(a.i,g);return z(k,g.promise,2)}h=k.h;return k["return"](Gp(a,h,c))})}
|
|
602
|
+
function Gp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,O,S,U,Z,ia,ma,na,Qa;return K(function(Ga){switch(Ga.g){case 1:d=[c];e=En(b,"Location").map(Kn).filter(Jb);0<e.length&&(f=Lb(d,e),d=a.h=f);g=En(b,"BaseURL");h=g.map(Kn);k=Lb(d,h);l=0;g&&g.length&&(l=Mn(g[0],"availabilityTimeOffset",Tn)||0);m=a.v.dash.ignoreMinBufferTime;n=0;m||(n=Mn(b,"minBufferTime",On)||0);a.D=Mn(b,"minimumUpdatePeriod",On,-1);p=Mn(b,"availabilityStartTime",Nn);t=Mn(b,"timeShiftBufferDepth",On);v=a.v.dash.ignoreSuggestedPresentationDelay;
|
|
603
|
+
x=null;v||(x=Mn(b,"suggestedPresentationDelay",On));w=a.v.dash.ignoreMaxSegmentDuration;y=null;w||(y=Mn(b,"maxSegmentDuration",On));C=b.getAttribute("type")||"static";if(a.F)for(D=a.F.presentationTimeline,B=r(Object.values(a.o)),E=B.next();!E.done;E=B.next())G=E.value,G.Gb(D.pb());else I=a.v.defaultPresentationDelay||1.5*n,L=null!=x?x:I,D=new R(p,L,a.v.dash.autoCorrectDrift);D.Qc("static"==C);(J=D.Z())&&!isNaN(a.v.availabilityWindowOverride)&&(t=a.v.availabilityWindowOverride);null==t&&(t=Infinity);
|
|
604
|
+
D.xe(t);O=b.getAttribute("profiles")||"";S={Fb:"static"!=C,presentationTimeline:D,ya:null,$:null,Ea:null,N:null,bandwidth:0,Xe:!1,Yb:l,profiles:O.split(",")};U=Hp(a,S,k,b);Z=U.duration;ia=U.periods;"static"!=C&&U.Qe||D.fb(Z||Infinity);a.l&&!a.A&&(ma=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.A=a.G.isLowLatencyMode());a.A?D.nf(a.l):a.l&&Pa("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.");
|
|
605
|
+
D.ae(y||1);return z(Ga,Zo(a.g,ia,S.Fb),2);case 2:if(a.F){a.F.variants=a.g.l;a.F.textStreams=a.g.j.slice();a.F.imageStreams=a.g.i;a.G.filter(a.F);Ga.C(3);break}a.F={presentationTimeline:D,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:n||0};if(!D.wf()){Ga.C(3);break}na=En(b,"UTCTiming");return z(Ga,Ip(a,k,na),5);case 5:Qa=Ga.h;if(!a.G)return Ga["return"]();D.pf(Qa);case 3:a.G.makeTextStreamsForClosedCaptions(a.F),A(Ga)}})}
|
|
606
|
+
function Hp(a,b,c,d){var e=Mn(d,"mediaPresentationDuration",On),f=[],g=0;d=En(d,"Period");for(var h=r(mb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.xa;var m=l.item,n=l.next;l=Mn(m,"start",On,g);var p=m.id,t=Mn(m,"duration",On),v=null;if(n){var x=Mn(n,"start",On);null!=x&&(v=x-l)}else null!=e&&(v=e-l);null==v&&(v=t);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.K.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=Jp(a,b,c,{start:l,duration:v,node:m,$e:null==v||!n});f.push(g);
|
|
607
607
|
b.ya.id&&v&&(a.L[b.ya.id]=v);if(null==v){g=null;break}g=l+v}}a.K=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Qe:!1}:{periods:f,duration:g,Qe:!0}}
|
|
608
|
-
function
|
|
609
|
-
c=c.filter(function(m){return m.Ce});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ce.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={
|
|
610
|
-
[]:
|
|
611
|
-
function
|
|
612
|
-
function
|
|
613
|
-
l}}var n;m=
|
|
614
|
-
10)));m=
|
|
615
|
-
1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,y=x=void 0,w.includes("=")?(w=w.split("="),x="svc"+w[0],y=w[1].split(",")[0].split(":").pop()):(x="svc"+p,p++,y=w),v.set(x,
|
|
616
|
-
(l=l[0],l.textContent&&(E=l.textContent));l=
|
|
617
|
-
m.value,p=r(D.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ha(t.keyIds),ha(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(
|
|
618
|
-
function
|
|
619
|
-
throw G;}t=
|
|
620
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&(D=l.getAttribute("value")),!D))return null;var B;l=b.N.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"))&&(B="PQ");var E={id:a.H++,originalId:b.N.id,createSegmentIndex:function(){var G;return
|
|
621
|
-
mimeType:b.N.mimeType,codecs:b.N.codecs,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.
|
|
622
|
-
q.
|
|
623
|
-
function
|
|
624
|
-
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=
|
|
625
|
-
"height",
|
|
626
|
-
function
|
|
627
|
-
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
|
|
628
|
-
function
|
|
629
|
-
function
|
|
630
|
-
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":
|
|
631
|
-
case 9:
|
|
632
|
-
function
|
|
633
|
-
function
|
|
634
|
-
|
|
635
|
-
function
|
|
636
|
-
l);if(
|
|
637
|
-
(l&&g.push(l),e.push(new
|
|
638
|
-
var
|
|
639
|
-
|
|
640
|
-
q.start=function(a,b){var c=this,d,e;return
|
|
641
|
-
q.update=function(){var a=this,b,c,d;return
|
|
642
|
-
function
|
|
643
|
-
1];if(v=
|
|
644
|
-
function
|
|
645
|
-
p),t&&v.set("value",t),x=new N("sessiondata",v),a.G)a.G.onEvent(x);return
|
|
646
|
-
(a.g=new
|
|
647
|
-
eb.createSegmentIndex(),0)})})),5);case 5:
|
|
648
|
-
function
|
|
649
|
-
function
|
|
650
|
-
r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(x){return x}))})}function
|
|
651
|
-
function
|
|
652
|
-
void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;D=a.v.disableAudio;if(!y.length||D)y=[null];D=a.v.disableVideo;if(!C.length||D)C=[null];D=[];y=r(y);for(B=y.next();!B.done;B=y.next()){B=B.value;for(var E=r(C),G=E.next();!G.done;G=E.next()){var I=G.value;G=B?B.stream:null;var L=I?I.stream:null,J=B?B.stream.drmInfos:null,
|
|
653
|
-
!!L&&L.primary,audio:G,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.
|
|
654
|
-
function
|
|
655
|
-
|
|
656
|
-
function
|
|
657
|
-
function
|
|
658
|
-
v="YES"==t;return
|
|
659
|
-
function
|
|
660
|
-
function
|
|
661
|
-
I.next())if(J=L.value,
|
|
662
|
-
case 4:
|
|
663
|
-
kind:
|
|
664
|
-
function
|
|
665
|
-
function
|
|
666
|
-
function
|
|
667
|
-
C,D,b,f,0,Infinity))}}else if(!m)throw new
|
|
668
|
-
function
|
|
669
|
-
function
|
|
670
|
-
(g.has(w)||g.set(w,p),n))for(;g.has(w+1)&&g.get(w+1)<p;)w++;y=a.I.get(w)||0;C=[];D=function(Qa){return
|
|
671
|
-
a.i||ia?(
|
|
672
|
-
function
|
|
673
|
-
function
|
|
674
|
-
e.uris[0]);return
|
|
675
|
-
function
|
|
676
|
-
w.h,t=p[0],v=p[1]||p[0],w["return"](
|
|
677
|
-
function
|
|
678
|
-
function
|
|
679
|
-
f.
|
|
680
|
-
function
|
|
681
|
-
q.
|
|
682
|
-
var
|
|
683
|
-
vtt:"text/vtt",ttml:"application/ttml+xml"}},
|
|
684
|
-
a=
|
|
685
|
-
function
|
|
686
|
-
f(I.value),5);case 5:L=Date.now();if(100<L-p||I.done)e(L-p,m-n,x-m),n=m,p=L;I.done?E.close():(E.enqueue(I.value),G());
|
|
687
|
-
function
|
|
688
|
-
function
|
|
689
|
-
c);k(x)}catch(w){l(w)}};e.onerror=function(n){l(new
|
|
690
|
-
|
|
691
|
-
function
|
|
692
|
-
function
|
|
693
|
-
function
|
|
694
|
-
q.updateManifestExpiration=function(a,b){var c=
|
|
695
|
-
q.getAllManifests=function(){var a=this,b,c;return
|
|
696
|
-
q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
697
|
-
function
|
|
698
|
-
function
|
|
699
|
-
|
|
700
|
-
function
|
|
701
|
-
function
|
|
702
|
-
function
|
|
703
|
-
|
|
704
|
-
function
|
|
705
|
-
function
|
|
706
|
-
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}
|
|
707
|
-
function
|
|
708
|
-
f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function
|
|
709
|
-
|
|
608
|
+
function Jp(a,b,c,d){b.ya=Kp(d.node,null,c);b.$=d;b.ya.Yb=b.Yb;b.ya.id||(b.ya.id="__shaka_period_"+d.start);var e=En(d.node,"EventStream");c=b.presentationTimeline.pb();e=r(e);for(var f=e.next();!f.done;f=e.next())Lp(a,d.start,d.duration,f.value,c);c=En(d.node,"AdaptationSet").map(function(m){return Mp(a,b,m)}).filter(Jb);if(b.Fb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Ig);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
|
|
609
|
+
}d=c.filter(function(m){return!m.Ce});c=c.filter(function(m){return m.Ce});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ce.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Wc:h.Wc},l=k.next())h.Wc=l.value,h.Wc.trickModeVideo=e.streams.find(function(m){return function(n){return jf(m.Wc.codecs)==jf(n.codecs)}}(h))}}}e=a.v.disableAudio?[]:Np(d,"audio");g=a.v.disableVideo?[]:Np(d,"video");f=a.v.disableText?
|
|
610
|
+
[]:Np(d,Qb);c=a.v.disableThumbnails?[]:Np(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ha(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ha(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ha(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ha(h.value.streams));return{id:b.ya.id,$c:d,zd:e,textStreams:g,imageStreams:f}}
|
|
611
|
+
function Np(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
612
|
+
function Mp(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ea=Kp(c,b.ya,null);var e=!1,f=En(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Jb),h=void 0,k=b.Ea.contentType==Qb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
613
|
+
l}}var n;m=En(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=En(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
|
|
614
|
+
10)));m=En(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var x=r(t),w=x.next();!w.done;w=x.next()){var y=w.value,C=w=void 0;y.includes("=")?(y=y.split("="),w=y[0].startsWith("CC")?y[0]:"CC"+y[0],C=y[1]||"und"):(w="CC"+p,2==t.length?p+=2:p++,C=y);v.set(w,Tb(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
615
|
+
1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,y=x=void 0,w.includes("=")?(w=w.split("="),x="svc"+w[0],y=w[1].split(",")[0].split(":").pop()):(x="svc"+p,p++,y=w),v.set(x,Tb(y));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=En(c,"ContentProtection");var D=Xn(l,a.v.dash.ignoreDrmInfo,a.v.dash.keySystemsByURI),B=Tb(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=En(c,"Label"))&&l.length&&
|
|
616
|
+
(l=l[0],l.textContent&&(E=l.textContent));l=En(c,"Representation");c=l.map(function(G){if(G=Op(a,b,D,h,B,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ea.contentType;if(a.v.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.Ea.contentType||"application"==b.Ea.contentType)for(b.Ea.contentType=Pp(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ea.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
617
|
+
m.value,p=r(D.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ha(t.keyIds),ha(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Jb);return{id:b.Ea.id||"__fake__"+a.H++,contentType:b.Ea.contentType,language:B,ji:e,streams:c,drmInfos:D.drmInfos,Ce:f,Ig:k}}
|
|
618
|
+
function Op(a,b,c,d,e,f,g,h,k,l){b.N=Kp(l,b.Ea,null);a.l=Math.min(a.l,b.N.Yb);if(!Qp(b.N))return null;var m=b.$.start;b.bandwidth=Mn(l,"bandwidth",Rn)||0;var n=b.N.contentType,p=n==Qb||"application"==n;n="image"==n;try{var t=function(G,I,L){return Rp(a,G,I,L)};if(b.N.Oc)var v=yo(b,t);else if(b.N.Bb)v=Eo(b,a.o);else if(b.N.Pc)v=Jo(b,t,a.o,!!a.F,a.v.dash.initialSegmentLimit,a.L);else{var x=b.N.Sa,w=b.$.duration||0;v={ac:function(){return Promise.resolve(Wi(m,w,x))}}}}catch(G){if((p||n)&&4002==G.code)return null;
|
|
619
|
+
throw G;}t=En(l,"ContentProtection");t=$n(t,c,a.v.dash.ignoreDrmInfo,a.v.dash.keySystemsByURI);t=new Set(t?[t]:[]);var y=!1;En(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.N.mimeType="audio/eac3-joc",y=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var D;if(n&&((l=En(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile",
|
|
620
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&(D=l.getAttribute("value")),!D))return null;var B;l=b.N.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"))&&(B="PQ");var E={id:a.H++,originalId:b.N.id,createSegmentIndex:function(){var G;return K(function(I){if(1==I.g){if(E.segmentIndex)return I.C(0);G=E;return z(I,v.ac(),3)}G.segmentIndex=I.h;A(I)})},segmentIndex:null,
|
|
621
|
+
mimeType:b.N.mimeType,codecs:b.N.codecs,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Ea.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.N.ce,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:B,tilesLayout:D};return E}
|
|
622
|
+
q.Lc=function(){var a=this,b,c;return K(function(d){switch(d.g){case 1:return b=0,F(d,2),z(d,Dp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=H(d),a.G&&(c.severity=1,a.G.onError(c));case 3:if(!a.G)return d["return"]();Ep(a,b);A(d)}})};function Ep(a,b){0>a.D||a.B.T(Math.max(3,a.D-b,hc(a.I)))}
|
|
623
|
+
function Kp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ce:null,audioSamplingRate:null,Yb:0};c=c||b.Sa;var d=En(a,"BaseURL"),e=d.map(Kn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Mn(a,"frameRate",Un)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=En(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
|
|
624
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=En(a,"AudioChannelConfiguration");m=Sp(m)||b.ce;p=Mn(a,"audioSamplingRate",Sn)||b.audioSamplingRate;f||(f=Pp(g,h));var t=Dn(a,"SegmentBase"),v=Dn(a,"SegmentTemplate"),x=t?Mn(t,"availabilityTimeOffset",Tn)||0:0,w=v?Mn(v,"availabilityTimeOffset",Tn)||0:0;d=d&&d.length?Mn(d[0],"availabilityTimeOffset",Tn)||0:0;d=b.Yb+d+x+w;return{Sa:Lb(c,e),Oc:t||b.Oc,Bb:Dn(a,"SegmentList")||b.Bb,Pc:v||b.Pc,width:Mn(a,"width",Sn)||b.width,height:Mn(a,
|
|
625
|
+
"height",Sn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),ce:m,audioSamplingRate:p,Yb:d}}
|
|
626
|
+
function Sp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
627
|
+
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 Qp(a){var b=a.Oc?1:0;b+=a.Bb?1:0;b+=a.Pc?1:0;if(0==b)return a.contentType==Qb||"application"==a.contentType?!0:!1;1!=b&&(a.Oc&&(a.Bb=null),a.Pc=null);return!0}
|
|
628
|
+
function Tp(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=Lb(b,[c]),f=mh(e,a.v.retryParameters),f.method=d,g=a.G.networkingEngine.request(4,f),hh(a.i,g),z(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=sc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
629
|
+
function Ip(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.v.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.C(4);break}h=g.value;F(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.C(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.C(8);
|
|
630
|
+
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":Pa("NTP UTCTiming scheme is not supported");break;default:Pa("Unrecognized scheme in UTCTiming element",k)}n.C(9);break;case 7:return z(n,Tp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return z(n,Tp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
|
|
631
|
+
case 9:va(n,3);break;case 5:H(n);case 3:g=f.next();n.C(2);break;case 4:return Pa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
|
|
632
|
+
function Lp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Mn(d,"timescale",Sn)||1;d=r(En(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Mn(k,"presentationTime",Sn)||0,m=Mn(k,"duration",Sn)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.G.onTimelineRegionAdded(k))}}
|
|
633
|
+
function Rp(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=sh,f=hj(b,c,d,a.v.retryParameters),g=a.G.networkingEngine,h=g.request(e,f),hh(a.i,h),z(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Pp(a,b){return mf(ef(a,b))?Qb:a.split("/")[0]}M("shaka.dash.DashParser",Cp);qi.mpd=function(){return new Cp};oi["application/dash+xml"]=function(){return new Cp};oi["video/vnd.mpeg.dash.mpd"]=function(){return new Cp};function Up(a,b,c,d){this.g=a;this.type=b;this.aa=c;this.segments=d||null}function Vp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Vp.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
|
|
634
|
+
Vp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Wp(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Xp(a,b){var c=a.getAttribute(b);if(!c)throw new P(2,4,4023,b);return c.value}function Yp(a,b,c){c=void 0===c?[]:c;this.aa=b;this.g=a;this.h=c}function Zp(a,b){this.name=a;this.value=b};function $p(a,b){return a.filter(function(c){return c.name==b})}function aq(a,b){return a.filter(function(c){return Xp(c,"TYPE")==b})}function bq(a,b){var c=$p(a,b);return c.length?c[0]:null}function cq(a,b,c){c=void 0===c?0:c;return(a=bq(a,b))?Number(a.value):c};function dq(a){this.h=a;this.g=0}function eq(a){fq(a,/[ \t]+/gm)}function fq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function gq(a){return a.g==a.h.length?null:(a=fq(a,/[^ \t\n]*/gm))?a[0]:null};function hq(){this.g=0}
|
|
635
|
+
function iq(a,b,c){b=sc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new P(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=jq(a.g++,g),--a.g,kq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(mb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.xa;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=jq(a.g++,
|
|
636
|
+
l);if(lq.includes(l.name)){if(1!=b)throw new P(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=r(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=jq(a.g++,m),kq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Wp(m,"TYPE")?h.push(m):"MAP"==Wp(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Lb([d],[m.trim()])[0],l&&g.push(l),e.push(new Yp(m,g,h)),g=[],h=[]);h.length&&
|
|
637
|
+
(l&&g.push(l),e.push(new Yp("",g,h)));return new Up(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new Zp("URI",k)),e=!0)}}return new Up(c,b,f)}function jq(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new P(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new dq(e);var g;(g=fq(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=fq(e,h);)c.push(new Zp(g[1],g[2]||g[3])),eq(e)}return new Vp(a,d,c,f)}
|
|
638
|
+
var kq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),lq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function mq(){}function nq(a){try{var b=oq(a);return ah({uri:a,df:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Zg(c)}}function oq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(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=Zc(a):e=wc(a);return{data:e,contentType:c}}
|
|
639
|
+
M("shaka.net.DataUriPlugin",mq);mq.parse=nq;jh("data",nq);function pq(){var a=this;this.v=this.G=null;this.za=1;this.B=new Map;this.o=new Map;this.qa=new Set;this.h=new Map;this.g=null;this.L="";this.ba=new hq;this.ia=0;this.A=new Q(function(){a.Lc()});this.j=qq;this.F=null;this.ha=0;this.H=Infinity;this.S=this.Ja=0;this.D=new gh;this.Y=[];this.K=new Map;this.Aa=!1;this.l=new Map;this.O=null;this.ea=new Map;this.I=new Map;this.i=!1}q=pq.prototype;q.configure=function(a){this.v=a};
|
|
640
|
+
q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.G=b,c.i=b.isLowLatencyMode(),z(f,rq(c,mh([a],c.v.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,z(f,sq(c,d.data),3);e=c.ia;0<e&&c.A.T(e);return f["return"](c.F)})};q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.v=this.G=null;this.qa.clear();this.F=null;this.h.clear();this.o.clear();this.l.clear();this.B.clear();return Promise.all(a)};
|
|
641
|
+
q.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.j==qq)return e["return"]();b=[];a.O=null;c=Array.from(a.h.values());return c.length?z(e,tq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(tq(a,c[d]));return z(e,Promise.all(b),0)})};
|
|
642
|
+
function tq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return K(function(x){if(1==x.g)return c=uq,d=b.Bf,e=new ob(d),a.i&&b.Ff&&rb(e,new ub("_HLS_skip=YES")),z(x,rq(a,mh([e.toString()],a.v.retryParameters),0),2);if(3!=x.g){f=x.h;g=iq(a.ba,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=$p(g.aa,"EXT-X-DEFINE");k=vq(a,h);l=b.stream;return z(x,wq(a,b.yd,g,l.mimeType,b.Yd,k,b.Kf),3)}m=x.h;l.segmentIndex.fc(m,a.g.pb());m.length&&(n=cq(g.aa,"EXT-X-MEDIA-SEQUENCE",0),p=b.Yd.get(n),l.segmentIndex.Gb(p));t=m[m.length-
|
|
643
|
+
1];if(v=bq(g.aa,"EXT-X-ENDLIST"))xq(a,c.Af),a.g.fb(t.endTime);A(x)})}q.onExpirationUpdated=function(){};
|
|
644
|
+
function sq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,O,S,U,Z,ia,ma,na,Qa,Ga,tb;return K(function(Za){switch(Za.g){case 1:c=iq(a.ba,b,a.L);if(0!=c.type)throw new P(2,4,4022);d=$p(c.aa,"EXT-X-DEFINE");yq(a,d);e=$p(c.aa,"EXT-X-MEDIA");f=$p(c.aa,"EXT-X-STREAM-INF");zq(a,f);g=$p(c.aa,"EXT-X-SESSION-DATA");h=r(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Wp(l,"DATA-ID"),n=Wp(l,"URI"),p=Wp(l,"LANGUAGE"),t=Wp(l,"VALUE"),v=(new Map).set("id",m),n&&v.set("uri",Lb([a.L],[n])[0]),p&&v.set("language",
|
|
645
|
+
p),t&&v.set("value",t),x=new N("sessiondata",v),a.G)a.G.onEvent(x);return z(Za,Aq(a,e),2);case 2:return Bq(a,e),z(Za,Cq(a,f),3);case 3:return w=Za.h,z(Za,Dq(a,e),4);case 4:y=Za.h;if(!a.G)throw new P(2,7,7001);if(a.Aa&&0==w.length)throw new P(2,4,4034);D=C=Infinity;B=r(a.h.values());for(E=B.next();!E.done;E=B.next())G=E.value,C=Math.min(C,G.bf),"text"!=G.stream.type&&(D=Math.min(D,G.vg-G.bf));a.j!=qq?(a.g=new R(0,a.v.defaultPresentationDelay?a.v.defaultPresentationDelay:a.S?a.S:3*a.ha),a.g.Qc(!1)):
|
|
646
|
+
(a.g=new R(null,0),a.g.Qc(!0));Eq(a);if(a.j!=qq)a.ia=a.H,I=uq,a.j==I.Ge&&(L=a.g.sd,isNaN(a.v.availabilityWindowOverride)||(L=a.v.availabilityWindowOverride),a.g.xe(L));else for(a.g.fb(D),a.g.offset(-C),J=r(a.h.values()),E=J.next();!E.done;E=J.next())O=E.value,O.stream.segmentIndex.offset(-C),O.stream.segmentIndex.yb(0,D);a.Y=[];S=[];U=r(w);for(Z=U.next();!Z.done;Z=U.next())for(ia=Z.value,ma=r([ia.video,ia.audio]),na=ma.next();!na.done;na=ma.next())(Qa=na.value)&&S.push(Qa);return z(Za,Promise.all(S.map(function(eb){return K(function($a){return z($a,
|
|
647
|
+
eb.createSegmentIndex(),0)})})),5);case 5:Ga=r(S);for(na=Ga.next();!na.done;na=Ga.next())tb=na.value,a.Y.push(tb.segmentIndex.P);Eq(a);a.F={presentationTimeline:a.g,variants:w,textStreams:y,imageStreams:[],offlineSessionIds:[],minBufferTime:0};a.G.makeTextStreamsForClosedCaptions(a.F);A(Za)}})}function yq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Wp(e,"NAME");e=Wp(e,"VALUE");d&&e&&(a.B.has(d)||a.B.set(d,e))}}
|
|
648
|
+
function vq(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Wp(f,"NAME");var g=Wp(f,"VALUE");f=Wp(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.B.get(f))&&c.set(f,e)}return c}function zq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Wp(e,"AUDIO");d=Wp(e,"VIDEO");var g=Wp(e,"SUBTITLES");e=Fq(a,e);if(g){var h=Ob(Qb,e);a.l.set(g,h);hd(e,h)}f&&(g=Nb("audio",e),a.l.set(f,g));d&&(f=Nb("video",e),a.l.set(d,f))}}
|
|
649
|
+
function Dq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return K(function(v){if(1==v.g)return c=aq(b,"SUBTITLES"),d=c.map(function(x){var w,y,C;return K(function(D){if(1==D.g){if(w=a.v.disableText)return D["return"](null);F(D,2);return z(D,Gq(a,x),4)}if(2!=D.g)return y=D.h,D["return"](y.stream);C=H(D);if(a.v.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),z(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Xp(h,"GROUP-ID"),l=a.l.get(k))if(m=a.o.get(k))for(n=
|
|
650
|
+
r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(x){return x}))})}function Aq(a,b){var c;return K(function(d){if(1==d.g)return b=b.filter(function(e){var f=Wp(e,"URI")||"";return"SUBTITLES"!=Wp(e,"TYPE")&&""!=f}),b.length?z(d,Gq(a,b[0]),2):d.C(2);c=b.slice(1).map(function(e){return Gq(a,e)});return z(d,Promise.all(c),0)})}
|
|
651
|
+
function Cq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return K(function(x){if(1==x.g)return h=Wp(g,"FRAME-RATE"),k=Number(Wp(g,"AVERAGE-BANDWIDTH"))||Number(Xp(g,"BANDWIDTH")),l=Wp(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Wp(g,"VIDEO-RANGE"),z(x,Hq(a,g),2);if(v=x.h){for(var w=x["return"],y=v.audio,C=v.video,D=r(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
|
|
652
|
+
void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;D=a.v.disableAudio;if(!y.length||D)y=[null];D=a.v.disableVideo;if(!C.length||D)C=[null];D=[];y=r(y);for(B=y.next();!B.done;B=y.next()){B=B.value;for(var E=r(C),G=E.next();!G.done;G=E.next()){var I=G.value;G=B?B.stream:null;var L=I?I.stream:null,J=B?B.stream.drmInfos:null,O=I?I.stream.drmInfos:null;I=(I?I.yd:"")+" - "+(B?B.yd:"");G&&L&&J.length&&O.length&&!(0<ki(J,O).length)||a.qa.has(I)||(G={id:a.za++,language:G?G.language:"und",primary:!!G&&G.primary||
|
|
653
|
+
!!L&&L.primary,audio:G,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.qa.add(I))}}x=w.call(x,D)}else x=x["return"]([]);return x})}),z(f,Promise.all(c),2);d=f.h;e=d.reduce(Hb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
654
|
+
function Hq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return K(function(w){if(1==w.g)return c=Rb,d=Fq(a,b),e=Wp(b,"AUDIO"),f=Wp(b,"VIDEO"),h=(g=e||f)&&a.o.has(g)?a.o.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Xp(b,"URI"),p=k.audio.find(function(y){return y&&y.yd==n}),t=Ob(c.ib,d),(v=Ob(c.Cb,d))&&!t?l=c.Cb:!h.length&&v&&t?(l=c.ib,d=[[t,v].join()]):k.audio.length&&p?(l=c.Cb,m=!0):l=k.video.length?c.Cb:c.ib,m?w.C(2):z(w,Iq(a,b,d,l),3);2!=w.g&&(x=w.h);if(x)k[x.stream.type]=[x];else if(null===x)return w["return"](null);
|
|
655
|
+
Jq(k);return w["return"](k)})}function Fq(a,b){var c=[];a.v.disableVideo||c.push("avc1.42E01E");a.v.disableAudio||c.push("mp4a.40.2");var d=Wp(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=jf(f);c.has(g)||(e.push(f),c.add(g))}return e}function Kq(a){a=Wp(a,"LANGUAGE")||"und";return Tb(a)}
|
|
656
|
+
function Jq(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Bq(a,b){var c=aq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Kq(e);var f=Xp(e,"GROUP-ID");e=Xp(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
|
|
657
|
+
function Gq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return K(function(w){if(1==w.g){c=Xp(b,"GROUP-ID");d="";var y=Xp(b,"TYPE").toLowerCase();"subtitles"==y&&(y=Qb);e=y;e!=Qb&&c&&a.l.has(c)&&(d=a.l.get(c));f=Lq(Xp(b,"URI"),a.B);if(a.h.has(f))return w["return"](a.h.get(f));g=Kq(b);h=Wp(b,"NAME");k=Wp(b,"DEFAULT");l="YES"==k;"audio"==e?y=(y=Wp(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Wp(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;n=y;p=Wp(b,"CHARACTERISTICS");t=Wp(b,"FORCED");
|
|
658
|
+
v="YES"==t;return z(w,Mq(a,f,d,e,g,l,h,m,null,p,v,n),2)}x=w.h;a.o.has(c)?a.o.get(c).push(x):a.o.set(c,[x]);if(null==x)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,x);return w["return"](x)})}
|
|
659
|
+
function Iq(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=Lq(Xp(b,"URI"),a.B);if(a.h.has(e))return k["return"](a.h.get(e));var l=Wp(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Nb(d,c);return z(k,Mq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
|
|
660
|
+
function Mq(a,b,c,d,e,f,g,h,k,l,m,n){var p,t,v,x,w,y,C,D,B,E,G,I,L,J,O,S,U,Z,ia,ma,na,Qa,Ga,tb,Za,eb,$a,Bi,Ko,Lo,Mo,No,Ci,Di,Yf,Oo,Po,Qo,Ro;return K(function(kb){switch(kb.g){case 1:return p=Lb([a.L],[b])[0],z(kb,rq(a,mh([p],a.v.retryParameters),0),2);case 2:t=kb.h;p=t.uri;v=iq(a.ba,t.data,p);if(1!=v.type)throw new P(2,4,4017);x=[];if(v.segments)for(w=r(v.segments),y=w.next();!y.done;y=w.next())C=y.value,D=$p(C.aa,"EXT-X-KEY"),x.push.apply(x,ha(D));B=!1;E=[];G=new Set;I=r(x);for(L=I.next();!L.done;L=
|
|
661
|
+
I.next())if(J=L.value,O=Xp(J,"METHOD"),"NONE"!=O){B=!0;if("AES-128"==O)return a.Aa=!0,kb["return"](null);S=Xp(J,"KEYFORMAT");if(Z=(U=Nq[S])?U(J):null){if(Z.keyIds)for(ia=r(Z.keyIds),ma=ia.next();!ma.done;ma=ia.next())na=ma.value,G.add(na);E.push(Z)}}if(B&&!E.length)throw new P(2,4,4026);Qa=$p(v.aa,"EXT-X-DEFINE");Ga=vq(a,Qa);Oq(a,v);return z(kb,Pq(a,d,c,v,Ga),3);case 3:return tb=kb.h,Qq.includes(tb)&&(c=""),Za=new Map,eb=new Map,F(kb,4),z(kb,wq(a,b,v,tb,Za,Ga,eb),6);case 6:$a=kb.h;va(kb,5);break;
|
|
662
|
+
case 4:Bi=H(kb);if(4035==Bi.code)return Pa("Skipping unsupported HLS stream",tb,b),kb["return"](null);throw Bi;case 5:Ko=$a[0].startTime;Lo=$a[$a.length-1].endTime;Mo=new Ui($a);No=d==Qb?"subtitle":void 0;Ci=[];if(l)for(Di=r(l.split(",")),Yf=Di.next();!Yf.done;Yf=Di.next())Oo=Yf.value,Ci.push(Oo);Qo=(Po=bq(v.aa,"EXT-X-SERVER-CONTROL"))?null!=Po.getAttribute("CAN-SKIP-UNTIL"):!1;Ro={id:a.za++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mo,mimeType:tb,codecs:c,
|
|
663
|
+
kind:No,encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Ci,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return kb["return"]({stream:Ro,yd:b,Bf:p,bf:Ko,vg:Lo,Yd:Za,Kf:eb,Ff:Qo})}})}
|
|
664
|
+
function Oq(a,b){var c=bq(b.aa,"EXT-X-PLAYLIST-TYPE"),d=bq(b.aa,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)xq(a,qq);else{c?xq(a,Rq):xq(a,Sq);d=bq(b.aa,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=bq(b.aa,"EXT-X-PART-INF");a.i&&c?(a.Ja=Number(Xp(c,"PART-TARGET")),a.H=Math.min(a.Ja,a.H),c=bq(b.aa,"EXT-X-SERVER-CONTROL"),a.S=c?Number(Xp(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ha=Math.max(d,a.ha)}}
|
|
665
|
+
function Tq(a,b,c,d){c=bq(c,"EXT-X-MAP");if(!c)return null;var e=Xp(c,"URI");d=Lq(Lb([b],[e])[0],d);b=[d,Wp(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=Uq(d,c),a.ea.set(b,c));return a.ea.get(b)}function Uq(a,b){var c=0,d=null,e=Wp(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new si(function(){return[a]},c,d)}
|
|
666
|
+
function Vq(a,b,c,d,e,f,g,h){var k=d.aa,l=Lq(d.g,g),m=bq(k,"EXTINF"),n=g=0,p=null,t=[];if(a.i&&d.h.length){a={};d=r(mb(d.h));for(var v=d.next();!v.done;a={Hd:a.Hd},v=d.next()){v=v.value;var x=v.xa;v=v.item;var w=0==x?c:t[t.length-1];x=0==x?e:w.endTime;var y=Number(Wp(v,"DURATION"));y=x+y;var C=0,D=null;"EXT-X-PRELOAD-HINT"==v.name?C=(w=Wp(v,"BYTERANGE-START"))?Number(w):0:(C=Wp(v,"BYTERANGE"),w=r(Wq(w,C)),C=w.next().value,D=w.next().value);v=Wp(v,"URI");a.Hd=Lb([h],[v])[0];t.push(new ui(x,y,function(B){return function(){return[B.Hd]}}(a),
|
|
667
|
+
C,D,b,f,0,Infinity))}}else if(!m)throw new P(2,4,4024,"EXTINF");m?g=e+Number(m.value.split(",")[0]):g=t[t.length-1].endTime;(h=bq(k,"EXT-X-BYTERANGE"))?(c=r(Wq(c,h.value)),n=c.next().value,p=c.next().value):t.length&&(n=t[0].Da,p=t[t.length-1].wa);return new ui(e,g,function(){return l.length?[l]:[]},n,p,b,f,0,Infinity,t)}function Wq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}
|
|
668
|
+
function Eq(a){if(a.g){for(var b=r(a.Y),c=b.next();!c.done;c=b.next())a.g.ic(c.value);a.Y=[]}}
|
|
669
|
+
function wq(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,O,S,U,Z,ia,ma;return K(function(na){switch(na.g){case 1:h=c.segments;l=cq(c.aa,"EXT-X-MEDIA-SEQUENCE",0);n=(m=bq(c.aa,"EXT-X-SKIP"))?Number(Wp(m,"SKIPPED-SEGMENTS")):0;p=l+n;if(a.j!=qq&&e.has(p)){t=e.get(p);na.C(2);break}if(null!=a.O){na.C(3);break}k=Tq(a,c.g,h[0].aa,f);v=a;return z(na,Xq(a,b,k,d,p,!1,h[0],f),4);case 4:v.O=na.h;case 3:t=a.O;case 2:x=h[0].g;Ua(x.split("/").pop());w=cq(c.aa,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&
|
|
670
|
+
(g.has(w)||g.set(w,p),n))for(;g.has(w+1)&&g.get(w+1)<p;)w++;y=a.I.get(w)||0;C=[];D=function(Qa){return mb(Qa)};B=r(D(h));E=B.next();case 5:if(E.done){na.C(7);break}I=G=E.value;L=I.xa;J=I.item;O=C[C.length-1];S=0==L?t:O.endTime;p=l+n+L;e.set(p,S);k=Tq(a,c.g,J.aa,f);U=bq(J.aa,"EXT-X-DISCONTINUITY");if(!U){na.C(8);break}w++;g.set(w,p);return z(na,Yq(a,w,b,k,d,p,J,f,S),9);case 9:y=na.h;case 8:!a.i&&(Z=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.i=a.G.isLowLatencyMode());ia=bq(J.aa,"EXTINF");
|
|
671
|
+
a.i||ia?(ma=Vq(a,k,O,J,S,y,f,c.g),C.push(ma)):a.i||Pa("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.");E=B.next();na.C(5);break;case 7:return na["return"](C)}})}
|
|
672
|
+
function Yq(a,b,c,d,e,f,g,h,k){var l,m;return K(function(n){if(1==n.g)return l=0,a.I.has(b)?(l=a.I.get(b),n.C(2)):z(n,Xq(a,c,d,e,f,!0,g,h),3);2!=n.g&&(m=n.h,l=k-m,a.I.set(b,l));return n["return"](l)})}
|
|
673
|
+
function Zq(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:c=sh;d=hj(b.Ga(),b.Da,b.wa,a.v.retryParameters);if(a.v.hls.useFullSegmentsForStartTime)return k["return"](rq(a,d,c));e=hj(b.Ga(),b.Da,b.Da+2048-1,a.v.retryParameters);F(k,2);return z(k,rq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=H(k);if(7001==g.code)throw g;Pa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
|
|
674
|
+
e.uris[0]);return z(k,rq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
|
|
675
|
+
function Xq(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,x;return K(function(w){switch(w.g){case 1:k=Vq(a,c,null,g,0,0,h,"");if(a.F&&!f&&(l=a.h.get(b),m=l.Yd.get(e),void 0!=m))return w["return"](m);d=d.toLowerCase();if(Qq.includes(d))throw Pa("Raw formats are not yet supported. Skipping "+d),new P(1,4,4035);if("video/webm"==d)throw Pa("WebM in HLS is not yet supported. Skipping."),new P(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.C(2);break}n=[Zq(a,k)];c&&n.push(Zq(a,c));return z(w,Promise.all(n),3);case 3:return p=
|
|
676
|
+
w.h,t=p[0],v=p[1]||p[0],w["return"]($q(b,t.uri,t.data,v.data));case 2:if("video/mp2t"!=d){w.C(4);break}return z(w,Zq(a,k),5);case 5:return x=w.h,w["return"](ar(b,x.uri,x.data));case 4:throw new P(2,4,4030,b);}})}
|
|
677
|
+
function $q(a,b,c,d){var e=0;(new Bc).box("moov",Fc).box("trak",Fc).box("mdia",Fc).X("mdhd",function(h){e=Me(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new P(2,4,4030,a,b);var f=0,g=!1;(new Bc).box("moof",Fc).box("traf",Fc).X("tfdt",function(h){f=Le(h.reader,h.version).Od/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new P(2,4,4030,a,b);return f}
|
|
678
|
+
function ar(a,b,c){function d(){f.seek(g+188);h=f.na();71!=h&&(f.seek(g+192),h=f.na());71!=h&&(f.seek(g+204),h=f.na());71!=h&&e();f.kf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new yc(c,0),g=0,h=0;for(c=Math.min(f.V.byteLength-188,940);;){g=f.ma();h=f.na();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.lc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.na()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.na(),f.skip(k)),1!=f.R()>>8)d();else{f.skip(3);c=f.na()>>6;0!=c&&1!=c||e();0==f.na()&&e();c=f.na();k=
|
|
679
|
+
f.lc();var l=f.lc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Lq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new P(2,4,4039,f);}}return c}
|
|
680
|
+
function Pq(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x;return K(function(w){if(1==w.g){f=Rb;g=sh;h=Lq(d.segments[0].g,e);k=new ob(h);l=k.Pa.split(".").pop();m=br[b];if(n=m[l])return w["return"](n);if(b==f.ra)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");p=mh([h],a.v.retryParameters);p.method="HEAD";return z(w,rq(a,p,g),2)}t=w.h;v=t.headers["content-type"];return v?w["return"](v.split(";")[0]):(x=m.mp4,w["return"](x))})}
|
|
681
|
+
q.Lc=function(){var a=this,b,c;return K(function(d){if(1==d.g){if(!a.G)return d["return"]();F(d,2);return z(d,a.update(),4)}if(2!=d.g)return b=a.ia,a.A.T(b),va(d,0);c=H(d);if(!a.G)return d["return"]();c.severity=1;a.G.onError(c);a.A.T(.1);A(d)})};function xq(a,b){a.j=b;a.g&&a.g.Qc(a.j==qq);a.j!=qq||a.A.stop()}function rq(a,b,c){if(!a.D)throw new P(2,7,7001);b=a.G.networkingEngine.request(c,b);hh(a.D,b);return b.promise}M("shaka.hls.HlsParser",pq);
|
|
682
|
+
var Qq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],br={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
683
|
+
vtt:"text/vtt",ttml:"application/ttml+xml"}},Nq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Xp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Xp(a,"URI");b=oq(b);b=mc(b.data);b=Mb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Wp(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Xp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Xp(a,"URI");a=oq(a);
|
|
684
|
+
a=mc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Bn(a,b);return Mb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},qq="VOD",Sq="EVENT",Rq="LIVE",uq={Af:qq,kh:Sq,Ge:Rq};qi.m3u8=function(){return new pq};oi["application/x-mpegurl"]=function(){return new pq};oi["application/vnd.apple.mpegurl"]=function(){return new pq};function cr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,df:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=vc(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function dr(){}function er(a,b,c,d){var e=new fr;wh(b.headers).forEach(function(k,l){e.append(l,k)});var f=new gr,g={Je:!1,vf:!1};a=hr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Yg(a,function(){g.Je=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new Q(function(){g.vf=!0;f.abort()});h.T(b/1E3);a["finally"](function(){h.stop()})}return a}
|
|
685
|
+
function hr(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,w,y,C,D;return K(function(B){switch(B.g){case 1:return g=ir,h=jr,n=m=0,p=Date.now(),F(B,2),z(B,g(a,c),4);case 4:return k=B.h,t=k.clone().body.getReader(),x=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,w=function(E){function G(){var I,L;return K(function(J){switch(J.g){case 1:return F(J,2),z(J,t.read(),4);case 4:I=J.h;va(J,3);break;case 2:return H(J),J["return"]();case 3:if(I.done){J.C(5);break}m+=I.value.byteLength;if(!f){J.C(5);break}return z(J,
|
|
686
|
+
f(I.value),5);case 5:L=Date.now();if(100<L-p||I.done)e(L-p,m-n,x-m),n=m,p=L;I.done?E.close():(E.enqueue(I.value),G());A(J)}})}G()},new h({start:w}),z(B,k.arrayBuffer(),5);case 5:l=B.h;va(B,3);break;case 2:y=H(B);if(d.Je)throw new P(1,1,7001,a,b);if(d.vf)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,y,b);case 3:return C={},D=k.headers,D.forEach(function(E,G){C[G.trim()]=E}),B["return"](cr(C,l,k.status,a,k.url,b))}})}
|
|
687
|
+
function kr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",dr);dr.isSupported=kr;dr.parse=er;var ir=window.fetch,gr=window.AbortController,jr=window.ReadableStream,fr=window.Headers;kr()&&(jh("http",er,2,!0),jh("https",er,2,!0));function lr(){}
|
|
688
|
+
function mr(a,b,c,d){var e=new nr,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new P(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),t={};p=r(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),t[v[0].toLowerCase()]=v.slice(1).join(": ");try{var x=cr(t,n.response,n.status,a,n.responseURL,
|
|
689
|
+
c);k(x)}catch(w){l(w)}};e.onerror=function(n){l(new P(1,1,1002,a,n,c))};e.ontimeout=function(){l(new P(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Yg(h,function(){e.abort();return Promise.resolve()})}M("shaka.net.HttpXHRPlugin",lr);lr.parse=mr;var nr=window.XMLHttpRequest;
|
|
690
|
+
jh("http",mr,1,!0);jh("https",mr,1,!0);function or(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function pr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}or.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 qr(a){var b=this;this.U=a;this.g=new Map;this.M=new uf(function(){var c=Array.from(b.g.values());return Promise.all(c.map(function(d){return d["catch"](function(){})}))});this.h=[];this.gf=function(){};this.ef=function(){};this.wc=new or}qr.prototype.destroy=function(){return this.M.destroy()};function rr(a,b,c){a.gf=b;a.ef=c}function sr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
691
|
+
function tr(a,b,c,d,e,f){vf(a.M);var g=pr(a.wc,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return K(function(v){if(1==v.g)return z(v,ur(a,c),2);h=v.h;if(a.M.g)throw new P(2,9,7001);if(e)for(m in k=mc(h),l=new An(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.ef(p,t);a.wc.close(g,h.byteLength);var x=a.wc;a.gf(0==x.i?0:x.j/x.i,a.wc.h);return v["return"](f(h))})});a.g.set(b,d);return d}
|
|
692
|
+
function vr(a,b,c){vf(a.M);var d=(a.g.get(b)||Promise.resolve()).then(function(){return K(function(e){return z(e,c(),0)})});a.g.set(b,d)}function wr(a){return K(function(b){return 1==b.g?z(b,Promise.all(a.g.values()),2):b["return"](a.wc.h)})}function ur(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=sh,d=a.U.request(c,b),e=function(){return d.abort()},a.h.push(e),z(g,d.promise,2);f=g.h;hd(a.h,e);return g["return"](f.data)})};function xr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new We;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}xr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}F(b,2);return z(b,a.g,4)}if(2!=b.g)return va(b,0);H(b);A(b)})};
|
|
693
|
+
function yr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return z(g,b(f.key,f.value,f),2)}f["continue"]();A(g)})}})}xr.prototype.store=function(){return this.h};xr.prototype.promise=function(){return this.g};function zr(a){this.h=a;this.g=[]}zr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ar(a,b){return Br(a,b,"readwrite")}function Br(a,b,c){c=a.h.transaction([b],c);var d=new xr(c,b);a.g.push(d);d.promise().then(function(){hd(a.g,d)},function(){hd(a.g,d)});return d};function Cr(a,b,c){this.g=new zr(a);this.i=b;this.h=c}q=Cr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Dr(this.i)};q.removeSegments=function(a,b){return Er(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return z(d,Fr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Me(e)}))})};q.addManifests=function(){return Dr(this.h)};
|
|
694
|
+
q.updateManifestExpiration=function(a,b){var c=Ar(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Er(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return z(d,Fr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.zc(e)})))})};
|
|
695
|
+
q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Br(a.g,a.h,"readonly"),c=new Map,z(d,yr(b,function(e,f){var g;return K(function(h){if(1==h.g)return z(h,a.zc(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?z(d,b.promise(),3):d["return"](c)})};q.Me=function(a){return a};q.zc=function(a){return Promise.resolve(a)};function Dr(a){return Promise.reject(new P(2,9,9011,"Cannot add new value to "+a))}
|
|
696
|
+
q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Ar(c.g,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Vc:g.Vc},k=h.next())l=k.value,g.Vc=e.add(l),g.Vc.onsuccess=function(n){return function(){f.push(n.Vc.result)}}(g);return z(m,d.promise(),2)}return m["return"](f)})};
|
|
697
|
+
function Er(a,b,c,d){a=Ar(a.g,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Uc:e.Uc},f=c.next())e.Uc=f.value,b["delete"](e.Uc).onsuccess=function(g){return function(){return d(g.Uc)}}(e);return a.promise()}
|
|
698
|
+
function Fr(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Br(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={uc:h.uc,qc:h.qc},l=k.next())h.qc=l.value,h.uc=e.get(h.qc),h.uc.onsuccess=function(n){return function(){void 0==n.uc.result&&g.push(n.qc);f[n.qc]=n.uc.result}}(h);return z(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Gr(a){this.g=new zr(a)}Gr.prototype.destroy=function(){return this.g.destroy()};Gr.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Br(a.g,"session-ids","readonly"),c=[],z(d,yr(b,function(e,f){c.push(f)}),2)):3!=d.g?z(d,b.promise(),3):d["return"](c)})};Gr.prototype.add=function(a){var b=Ar(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
699
|
+
Gr.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Ar(b.g,"session-ids"),z(d,yr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):z(d,c.promise(),0)})};function Hr(){this.g=new Map}Hr.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Hr.prototype.init=function(){var a=this;Ir.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
700
|
+
function Jr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{cb:d,Fa:f},Fa:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Kr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({cb:d,Fa:f},e)})})}
|
|
701
|
+
function Lr(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function Mr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Nr(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
702
|
+
function Or(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ir,d.forEach(function(f){(f=f())&&b.push(f)})),z(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.C(0):z(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Pr(a,b){Ir.set(a,b)}M("shaka.offline.StorageMuxer",Hr);Hr.unregister=function(a){Ir["delete"](a)};Hr.register=Pr;Hr.prototype.destroy=Hr.prototype.destroy;var Ir=new Map;function Qr(){Cr.apply(this,arguments)}u(Qr,Cr);Qr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Ar(c.g,c.h);e=d.store();f=new We;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return z(g,Promise.all([d.promise(),f]),0)})};
|
|
703
|
+
Qr.prototype.zc=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Rr(a.periods[c],e),b.push(f);return z(h,hp(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})})};
|
|
704
|
+
function Rr(a,b){Sr(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Tr(e,a.startTime,b)})}
|
|
705
|
+
function Tr(a,b,c){var d=a.initSegmentUri?Ur(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Ur(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
706
|
+
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Qr.prototype.Me=function(a){return{data:a.data}};function Ur(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 P(2,9,9004,"Could not parse uri "+a);}
|
|
707
|
+
function Sr(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=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
708
|
+
f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Vr(){Cr.apply(this,arguments)}u(Vr,Cr);
|
|
709
|
+
Vr.prototype.zc=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Wr(n,k.startTime,k.startTime+e));f=l;b.push(f)}return z(h,hp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
|
|
710
710
|
a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
|
|
711
|
-
function
|
|
712
|
-
dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function
|
|
713
|
-
q.init=function(){var a=this,b=new
|
|
714
|
-
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new
|
|
715
|
-
q.destroy=function(){var a=this;return
|
|
711
|
+
function Wr(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
712
|
+
dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Xr(){Cr.apply(this,arguments)}u(Xr,Cr);Xr.prototype.hasFixedKeySpace=function(){return!1};Xr.prototype.addSegments=function(a){return this.add(this.i,a)};Xr.prototype.addManifests=function(a){return this.add(this.h,a)};Xr.prototype.zc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Yr(){this.o=this.j=this.i=this.h=this.g=this.l=null}q=Yr.prototype;
|
|
713
|
+
q.init=function(){var a=this,b=new We,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Qr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Vr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Vr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
|
|
714
|
+
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Xr(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Gr(d):null;a.o=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new P(2,9,9001,c.error));d.preventDefault()};return b};
|
|
715
|
+
q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return z(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return z(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return z(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return z(b,a.j.destroy(),8);case 8:if(!a.o){b.C(10);break}return z(b,a.o.destroy(),10);case 10:a.l&&a.l.close(),A(b)}})};
|
|
716
716
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.o};
|
|
717
|
-
q.erase=function(){var a=this;return
|
|
718
|
-
function
|
|
719
|
-
function
|
|
720
|
-
function
|
|
717
|
+
q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return z(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return z(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return z(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return z(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),z(b,Zr(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,z(b,a.init(),0)}})};
|
|
718
|
+
function Zr(){var a=new We,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Pr("idb",function(){return Rc()||!window.indexedDB?null:new Yr});function $r(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}$r.prototype.cb=function(){return this.i};$r.prototype.Fa=function(){return this.h};$r.prototype.key=function(){return this.l};$r.prototype.toString=function(){return this.j};
|
|
719
|
+
function as(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 $r(b,c,d,Number(a[4])):null};function bs(a,b){this.h=a;this.g=b}
|
|
720
|
+
function cs(a,b){var c=new R(null,0);c.fb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ds(a,d,e,c);e=b.streams.filter(function(l){return l.type==Qb}).map(function(l){return es(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return es(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
721
721
|
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}}
|
|
722
|
-
function
|
|
723
|
-
e.value,g=
|
|
724
|
-
function
|
|
725
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function
|
|
726
|
-
function
|
|
727
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
728
|
-
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
729
|
-
|
|
730
|
-
function
|
|
731
|
-
function
|
|
732
|
-
9);case 9:return f["return"]([]);case 7:return e=[],
|
|
733
|
-
function
|
|
734
|
-
function
|
|
735
|
-
4);case 4:b.v=null,b.U=null,
|
|
736
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
737
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
738
|
-
return g.promise.then(h)};return
|
|
739
|
-
function
|
|
740
|
-
h,n,b,c,e,f),11);case 11:t=y.h;
|
|
741
|
-
q.ed=function(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,
|
|
742
|
-
t.value,e.push(
|
|
743
|
-
U.type&&J.add(U.id),"image"==U.type&&
|
|
744
|
-
function
|
|
745
|
-
G.initData.length})}),v=p&&!t,x=null,v&&(w=c.i,x=
|
|
746
|
-
function
|
|
747
|
-
function
|
|
748
|
-
function
|
|
749
|
-
function
|
|
750
|
-
q.list=function(){return
|
|
751
|
-
function
|
|
752
|
-
function(m){return m.createSegmentIndex()})),3);
|
|
753
|
-
function
|
|
754
|
-
n.set(null,Promise.resolve(null));m=new Map;p=
|
|
755
|
-
expiration:d.
|
|
756
|
-
function
|
|
757
|
-
tilesLayout:f.tilesLayout},m=f.id;
|
|
758
|
-
function
|
|
759
|
-
function
|
|
760
|
-
function
|
|
761
|
-
function
|
|
762
|
-
function
|
|
763
|
-
function
|
|
764
|
-
function
|
|
765
|
-
|
|
766
|
-
var
|
|
767
|
-
|
|
768
|
-
function
|
|
769
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
770
|
-
function
|
|
771
|
-
function
|
|
772
|
-
l=
|
|
773
|
-
n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);
|
|
774
|
-
function
|
|
775
|
-
function
|
|
776
|
-
function
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
function
|
|
781
|
-
function
|
|
722
|
+
function ds(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
|
|
723
|
+
e.value,g=es(a,e,d),h=r(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=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=es(a,e,d),g=r(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}
|
|
724
|
+
function es(a,b,c){var d=b.segments.map(function(e){return fs(a,e)});c.ic(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ui(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,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
725
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function fs(a,b){var c=new $r("segment",a.h,a.g,b.dataKey);return new ui(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?gs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}
|
|
726
|
+
function gs(a,b){var c=new $r("segment",a.h,a.g,b);return new si(function(){return[c.toString()]},0,null)};function hs(){this.g=null}q=hs.prototype;q.configure=function(){};
|
|
727
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=as(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new Hr;ua(m);return z(m,e.init(),4);case 4:return z(m,Lr(e,d.cb(),d.Fa()),5);case 5:return f=m.h,z(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new bs(d.cb(),d.Fa()),l=cs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),z(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
728
|
+
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new Hr,F(m,2,3),z(m,e.init(),5);case 5:return z(m,Lr(e,d.cb(),d.Fa()),6);case 6:return f=m.h,z(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.C(3);break}return z(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),z(m,e.destroy(),10);case 10:xa(m,0);break;case 2:H(m),m.C(3)}})};
|
|
729
|
+
oi["application/x-offline-manifest"]=function(){return new hs};function is(){}function js(a){var b=as(a);b&&"manifest"==b.g?(a={uri:a,df:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=ah(a)):a=b&&"segment"==b.g?ks(b.key(),b):Zg(new P(2,1,9004,a));return a}
|
|
730
|
+
function ks(a,b){var c=new Hr;return ah(void 0).sa(function(){return c.init()}).sa(function(){return Lr(c,b.cb(),b.Fa())}).sa(function(d){return d.getSegments([b.key()])}).sa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",is);is.plugin=js;jh("offline",js);function ls(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),x=v.next();!x.done;x=v.next())if(x=x.value,ms(x.info,p)){x.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.C(4);break}g=f.value;h=ns(a,b,g);return z(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.C(2);break;case 4:return l["return"](d)}})}
|
|
731
|
+
function ns(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new zh({hc:b,onError:function(){},pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),F(f,2),d.configure(a),z(f,Hh(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 H(f),z(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return F(f,6),z(f,Rh(d),8);case 8:va(f,7);break;case 6:return H(f),z(f,d.destroy(),
|
|
732
|
+
9);case 9:return f["return"]([]);case 7:return e=[],z(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return F(h,2),z(h,Sh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);H(h);A(h)})})),10);case 10:return z(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
733
|
+
function ms(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&id(a.audioCapabilities,b.audioCapabilities,c)&&id(a.videoCapabilities,b.videoCapabilities,c)};function os(a,b,c){var d=b.presentationTimeline.getDuration();b=ps(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function qs(a,b){var c=cs(new bs(a.cb(),a.Fa()),b),d=b.appMetadata||{};c=ps(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
|
|
734
|
+
function ps(a){var b=[],c=Bg(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(tg(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ug(c.value));return b};function rs(){this.g={}}function ss(a,b,c){c=c.endTime-c.startTime;return ts(a,b)*c}function ts(a,b){var c=a.g[b];null==c&&(c=0);return c};function us(a){var b=this;if(a&&a.constructor!=V)throw new P(2,9,9008);this.U=this.v=null;a?(this.v=a.v,this.U=a.Cc()):(this.v=jk(),this.U=new ih);this.vd=[];this.Mc=[];this.ie=[];var c=!a;this.M=new uf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return z(k,Promise.all(b.ie.map(function(l){return sr(l)})),2);case 2:d=function(){};e=[];f=r(b.Mc);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return z(k,Promise.all(e),3);case 3:if(!c){k.C(4);break}return z(k,b.U.destroy(),
|
|
735
|
+
4);case 4:b.v=null,b.U=null,A(k)}})})}function vs(){if(Lc())a:{var a=r(Ir.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=us.prototype;q.destroy=function(){return this.M.destroy()};
|
|
736
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Db("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return lk(this.v,a)};q.getConfiguration=function(){var a=jk();lk(a,this.v,jk());return a};q.Cc=function(){return this.U};
|
|
737
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new qr(this.U);this.ie.push(f);b=ws(this,a,b||{},function(){var h;return K(function(k){if(1==k.g)return z(k,ni(a,d.U,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Kb(h))})},e,f);var g=new Yg(b,function(){return sr(f)});g["finally"](function(){hd(d.ie,f)});g.then=function(h){Db("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
|
|
738
|
+
return g.promise.then(h)};return xs(this,g)};q.jg=function(){Db("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
|
|
739
|
+
function ws(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,w;return K(function(y){switch(y.g){case 1:return ys(),h=g=null,k=new Hr,m=l=null,F(y,2,3),z(y,d(),5);case 5:return g=y.h,z(y,zs(a,b,g,e),6);case 6:n=y.h;As(a);p=!n.presentationTimeline.Z()&&!n.presentationTimeline.Mb();if(!p)throw new P(2,9,9005,b);return z(y,Bs(a,n,function(C){m=m||C},e),7);case 7:h=y.h;As(a);if(m)throw m;return z(y,a.ed(n,h,e),8);case 8:return z(y,k.init(),9);case 9:return As(a),z(y,Jr(k),10);case 10:return l=y.h,As(a),z(y,Cs(a,l.Fa,
|
|
740
|
+
h,n,b,c,e,f),11);case 11:t=y.h;As(a);if(m)throw m;return z(y,l.Fa.addManifests([t]),12);case 12:return v=y.h,As(a),x=new $r("manifest",l.path.cb,l.path.Fa,v[0]),y["return"](qs(x,t));case 3:return wa(y),a.vd=[],z(y,k.destroy(),13);case 13:if(!g){y.C(14);break}return z(y,g.stop(),14);case 14:if(!h){y.C(16);break}return z(y,h.destroy(),16);case 16:xa(y,0);break;case 2:w=H(y);if(!l){y.C(18);break}return z(y,l.Fa.removeSegments(a.vd,function(){}),18);case 18:throw m||w;}})}
|
|
741
|
+
q.ed=function(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,O,S,U;return K(function(Z){switch(Z.g){case 1:d={width:Infinity,height:Infinity};dg(a,c.restrictions,d);if(!c.useMediaCapabilities){hg(a);gg(a,b);Z.C(2);break}return z(Z,ig(a,c.offline.usePersistentLicense),2);case 2:e=[];f=c.preferredAudioChannelCount;Xf(a,f);g=r(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(tg(k));l=r(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(ug(n));p=r(a.imageStreams);
|
|
742
|
+
for(t=p.next();!t.done;t=p.next())v=t.value,e.push(vg(v));return z(Z,c.offline.trackSelectionCallback(e),4);case 4:x=Z.h;w=a.presentationTimeline.getDuration();y=0;C=r(x);for(D=C.next();!D.done;D=C.next())B=D.value,E=B.bandwidth*w/8,y+=E;F(Z,5);return z(Z,c.offline.downloadSizeCallback(y),7);case 7:G=Z.h;if(!G)throw new P(2,9,9014);va(Z,6);break;case 5:I=H(Z);if(I instanceof P)throw I;throw new P(2,9,9015);case 6:L=new Set;J=new Set;O=new Set;S=r(x);for(D=S.next();!D.done;D=S.next())U=D.value,"variant"==
|
|
743
|
+
U.type&&L.add(U.id),"text"==U.type&&J.add(U.id),"image"==U.type&&O.add(U.id);a.variants=a.variants.filter(function(ia){return L.has(ia.id)});a.textStreams=a.textStreams.filter(function(ia){return J.has(ia.id)});a.imageStreams=a.imageStreams.filter(function(ia){return O.has(ia.id)});Ds(a);A(Z)}})};
|
|
744
|
+
function Cs(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,x,w,y,C,D;return K(function(B){switch(B.g){case 1:return k=os(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){v&&g.offline.usePersistentLicense&&x==G&&Qh(c,"cenc",E)},rr(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),t=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
|
|
745
|
+
G.initData.length})}),v=p&&!t,x=null,v&&(w=c.i,x=Es.get(w.keySystem)),ua(B),C=y=Fs(a,h,b,c,d,e,f,g),z(B,wr(h),4);case 4:C.size=B.h;y.expiration=c.Bc();D=Yh(c);y.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new P(2,9,9007);return B["return"](y);case 2:return wa(B),z(B,h.destroy(),5);case 5:xa(B,0)}})}q.remove=function(a){return Gs(this,Hs(this,a))};
|
|
746
|
+
function Hs(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:ys();c=as(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new Hr;ua(k);return z(k,e.init(),4);case 4:return z(k,Lr(e,d.cb(),d.Fa()),5);case 5:return f=k.h,z(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],z(k,Promise.all([Is(a,h,e),Js(f,d,h)]),2);case 2:return wa(k),z(k,e.destroy(),8);case 8:xa(k,0)}})}
|
|
747
|
+
function Ks(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:ef(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ef(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Is(a,b,c){return K(function(d){return z(d,Ls(a.U,a.v.drm,c,b),0)})}
|
|
748
|
+
function Js(a,b,c){function d(){}var e=Ms(c);qs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Hg=function(){return Gs(this,Ns(this))};
|
|
749
|
+
function Ns(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return ys(),b=a.U,c=a.v.drm,d=new Hr,e=!1,ua(n),z(n,d.init(),4);case 4:f=[],Mr(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.C(2);break}k=h.value;return z(n,k.getAll(),8);case 8:return l=n.h,z(n,ls(c,b,l),9);case 9:return m=n.h,z(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.C(5);break;case 2:return wa(n),z(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
|
|
750
|
+
q.list=function(){return Gs(this,Os())};function Os(){var a,b,c;return K(function(d){switch(d.g){case 1:return ys(),a=[],b=new Hr,ua(d),z(d,b.init(),4);case 4:return c=Promise.resolve(),Kr(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return z(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=qs(new $r("manifest",e.cb,e.Fa,l),k);a.push(m)});A(h)})})}),z(d,c,2);case 2:return wa(d),z(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
|
|
751
|
+
function zs(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.U,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(){}},c.configure(d.manifest),As(a),z(l,c.start(b,g),2);if(3!=l.g)return h=l.h,As(a),k=Ps(h),z(l,Promise.all(db(k,
|
|
752
|
+
function(m){return m.createSegmentIndex()})),3);As(a);if(e)throw e;return l["return"](h)})}function Bs(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new zh({hc:a.U,onError:c,pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),z(f,Eh(e,b.variants,d.offline.usePersistentLicense,d.useMediaCapabilities),2);case 2:return z(f,Rh(e),3);case 3:return z(f,Ph(e),4);case 4:return f["return"](e)}})}
|
|
753
|
+
function Fs(a,b,c,d,e,f,g,h){for(var k=new rs,l=r(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,t=m.video;p&&!t&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&t&&(n.g[t.id]=t.bandwidth||m.bandwidth);if(p&&t){var v=p.bandwidth||393216,x=t.bandwidth||m.bandwidth-v;0>=x&&(x=m.bandwidth);n.g[p.id]=v;n.g[t.id]=x}}l=r(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=r(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
|
|
754
|
+
n.set(null,Promise.resolve(null));m=new Map;p=Ps(e);l=new Map;p=r(p);for(t=p.next();!t.done;t=p.next())t=t.value,v=Qs(a,b,c,k,e,t,h,n,m),l.set(t.id,v);a=r(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
|
|
755
|
+
expiration:d.Bc(),streams:a,sessionIds:h?Yh(d):[],drmInfo:b,appMetadata:g}}
|
|
756
|
+
function Qs(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
|
|
757
|
+
tilesLayout:f.tilesLayout},m=f.id;Rs(f,e.presentationTimeline.pb(),function(n){var p=Ss(a,b,m,f.id,c,d,n.h,g,h),t=Ts(a,b,m,f.id,c,d,n,g,k);vr(b,m,function(){var v,x;return K(function(w){if(1==w.g)return z(w,p,2);if(3!=w.g)return v=w.h,z(w,t,3);x=w.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:x});A(w)})})});return l}
|
|
758
|
+
function Ss(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=hj(g.Ga(),g.Da,g.wa,h.streaming.retryParameters);b=tr(b,c,h,.5*ts(f,d),!0,function(l){var m;return K(function(n){if(1==n.g)return z(n,e.addSegments([{data:l}]),2);m=n.h;a.vd.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
|
|
759
|
+
function Ts(a,b,c,d,e,f,g,h,k){var l=[g.Ga()[0],g.Da,g.wa].join("-");if(k.has(l))return k.get(l);h=hj(g.Ga(),g.Da,g.wa,h.streaming.retryParameters);b=tr(b,c,h,ss(f,d,g),!1,function(m){var n;return K(function(p){if(1==p.g)return z(p,e.addSegments([{data:m}]),2);n=p.h;a.vd.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Rs(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 As(a){if(a.M.g)throw new P(2,9,7001);}
|
|
760
|
+
function ys(){if(!vs())throw new P(2,9,9E3);}function Gs(a,b){return K(function(c){if(1==c.g)return a.Mc.push(b),ua(c),z(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);hd(a.Mc,b);return xa(c,0)})}function xs(a,b){var c=b.promise;a.Mc.push(c);return b["finally"](function(){hd(a.Mc,c)})}
|
|
761
|
+
function Ms(a){var b=[];a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
|
|
762
|
+
function Ls(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Nr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ks(d,!1),videoCapabilities:Ks(d,!0)}});return z(h,ls(b,a,f),2)}return 3!=h.g?(g=h.h,z(h,e.remove(g),3)):z(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
763
|
+
function Ps(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(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}
|
|
764
|
+
function Ds(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=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",us);us.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new Hr,ua(b),z(b,Or(a),2)):5!=b.g?(wa(b),z(b,a.destroy(),5)):xa(b,0)})};us.prototype.list=us.prototype.list;
|
|
765
|
+
us.prototype.removeEmeSessions=us.prototype.Hg;us.prototype.remove=us.prototype.remove;us.prototype.getStoreInProgress=us.prototype.jg;us.prototype.store=us.prototype.store;us.prototype.getNetworkingEngine=us.prototype.Cc;us.prototype.getConfiguration=us.prototype.getConfiguration;us.prototype.configure=us.prototype.configure;us.prototype.destroy=us.prototype.destroy;us.support=vs;
|
|
766
|
+
var Es=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
767
|
+
fm.offline=vs;function Us(){}function Vs(){for(var a=r(Ws),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Ef()}catch(c){Pa("Error installing polyfill!",c)}}}function Xs(a,b){for(var c={priority:b||0,Ef:a},d=r(mb(Ws)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.xa;if(e.item.priority<c.priority){Ws.splice(f,0,c);return}}Ws.push(c)}M("shaka.polyfill",Us);Us.register=Xs;Us.installAll=Vs;var Ws=[];function Ys(){}function Zs(){$s()}Us.EncryptionScheme=Ys;Ys.install=Zs;Xs(Zs,-2);function at(){}
|
|
768
|
+
function bt(){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}}),
|
|
769
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ct);document.addEventListener("webkitfullscreenerror",ct);document.addEventListener("mozfullscreenchange",ct);document.addEventListener("mozfullscreenerror",ct);document.addEventListener("MSFullscreenChange",ct);document.addEventListener("MSFullscreenError",ct)}}
|
|
770
|
+
function ct(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)}Us.Fullscreen=at;at.install=bt;Xs(bt);function dt(){}function et(){}Us.MathRound=dt;dt.install=et;Xs(et);function ft(){}function gt(){if(Rc()||Sc()||Pc("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),ht=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=it}
|
|
771
|
+
function it(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,w;return K(function(y){switch(y.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return y["return"](b);if("media-source"==a.type){if(!Lc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return y["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Mc(g),!h)||a.audio&&(k=a.audio.contentType,
|
|
772
|
+
l=Mc(k),!l))return y["return"](b)}else return y["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,y["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));x={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
|
|
773
|
+
n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);F(y,3);return z(y,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:w=y.h;va(y,4);break;case 3:H(y);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return y["return"](b)}})}Us.MediaCapabilities=ft;ft.install=gt;var ht=null;ft.originalMcap=ht;Xs(gt,-1);function jt(){}function kt(){var a=Tc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?lt():a?(mt(),12>=a?(nt(),ot()):nt()):(Pc("Tizen 2")||Pc("Tizen 3")||Pc("Tizen 4"))&&pt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&qt()}
|
|
774
|
+
function nt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function ot(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function mt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
|
|
775
|
+
function pt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=jf(b)&&a(b)}}function lt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
776
|
+
function qt(){var a=MediaSource.isTypeSupported;Pc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Us.MediaSource=jt;jt.install=kt;Xs(kt);function rt(){}function st(){screen.orientation||void 0!=window.orientation&&tt()}function tt(){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 ut;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new N("change");b.dispatchEvent(c)})}Us.Orientation=rt;
|
|
777
|
+
rt.install=st;function ut(){cb.call(this);this.type="";this.angle=0}u(ut,cb);
|
|
778
|
+
ut.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)};
|
|
779
|
+
ut.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Xs(st);function vt(){}function wt(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=xt,window.MediaKeys=yt,window.MediaKeySystemAccess=zt,navigator.requestMediaKeySystemAccess=At)}function At(a,b){try{var c=new zt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
780
|
+
function xt(a){var b=this.mediaKeys;b&&b!=a&&Bt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Bt(a,this):Promise.resolve()}function Ct(a){a=mc(a.initData);if(pc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=tc(a.subarray(4),!0);a=wc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=nc(a);this.dispatchEvent(b)}Us.PatchedMediaKeysApple=vt;vt.install=wt;
|
|
781
|
+
function zt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
782
782
|
k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
783
|
-
|
|
784
|
-
function
|
|
785
|
-
q.generateRequest=function(a,b){var c=this;this.g=new
|
|
786
|
-
Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
787
|
-
q.update=function(a){this.i=new
|
|
788
|
-
function
|
|
789
|
-
function
|
|
790
|
-
function
|
|
783
|
+
zt.prototype.createMediaKeys=function(){var a=new yt(this.keySystem);return Promise.resolve(a)};zt.prototype.getConfiguration=function(){return this.g};function yt(a){this.g=new WebKitMediaKeys(a);this.h=new wf}yt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Dt(this.g,a)};yt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
784
|
+
function Bt(a,b){a.h.Qb();if(!b)return Promise.resolve();a.h.m(b,"webkitneedkey",Ct);try{return Ei(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Dt(a){cb.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new wf;this.sessionId="";this.expiration=NaN;this.closed=new We;this.keyStatuses=new Et}u(Dt,cb);q=Dt.prototype;
|
|
785
|
+
q.generateRequest=function(a,b){var c=this;this.g=new We;try{var d=this.l.createSession("video/mp4",mc(b));this.j=d;this.sessionId=d.sessionId||"";this.h.m(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",nc(e.message));e=new N("message",e);c.dispatchEvent(e)});this.h.m(d,"webkitkeyadded",function(){c.i&&(Ft(c,"usable"),c.i.resolve(),c.i=null)});this.h.m(d,"webkitkeyerror",function(){var e=
|
|
786
|
+
Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ft(c,"output-not-allowed");break;default:Ft(c,"internal-error")}});Ft(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
787
|
+
q.update=function(a){this.i=new We;try{this.j.update(mc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Qb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ft(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new N("keystatuseschange");a.dispatchEvent(c)}
|
|
788
|
+
function Et(){this.size=0;this.g=void 0}q=Et.prototype;q.forEach=function(a){this.g&&a(this.g,li.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=li.value();return this.g&&kc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Xs(wt);function Gt(){}function Ht(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=It,window.MediaKeySystemAccess=Jt,navigator.requestMediaKeySystemAccess=Kt,HTMLMediaElement.prototype.setMediaKeys=Lt)}function Kt(a,b){try{var c=new Jt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
789
|
+
function Mt(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=nc(Cn(a.initData));this.dispatchEvent(b)}}Us.PatchedMediaKeysMs=Gt;Gt.install=Ht;
|
|
790
|
+
function Jt(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
|
|
791
791
|
!0));if(e.videoCapabilities)for(h=r(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
function
|
|
795
|
-
q.generateRequest=function(a,b){var c=this;this.g=new
|
|
796
|
-
function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:
|
|
797
|
-
q.update=function(a){this.i=new
|
|
798
|
-
function
|
|
799
|
-
function
|
|
800
|
-
function
|
|
801
|
-
function
|
|
792
|
+
Jt.prototype.createMediaKeys=function(){var a=new It(this.keySystem);return Promise.resolve(a)};Jt.prototype.getConfiguration=function(){return this.g};function Lt(a){var b=this.mediaKeys;b&&b!=a&&Nt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Nt(a,this):Promise.resolve()}function It(a){this.g=new MSMediaKeys(a);this.h=new wf}
|
|
793
|
+
It.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ot(this.g,a)};It.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Nt(a,b){a.h.Qb();if(!b)return Promise.resolve();a.h.m(b,"msneedkey",Mt);try{return Ei(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
|
|
794
|
+
function Ot(a){cb.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new wf;this.sessionId="";this.expiration=NaN;this.closed=new We;this.keyStatuses=new Pt}u(Ot,cb);q=Ot.prototype;
|
|
795
|
+
q.generateRequest=function(a,b){var c=this;this.g=new We;try{this.j=this.l.createSession("video/mp4",mc(b),null),this.h.m(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",nc(d.message));d=new N("message",d);c.dispatchEvent(d)}),this.h.m(this.j,"mskeyadded",function(){c.g?(Qt(c,"usable"),c.g.resolve(),c.g=null):c.i&&(Qt(c,"usable"),c.i.resolve(),c.i=null)}),this.h.m(this.j,"mskeyerror",
|
|
796
|
+
function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Qt(c,"output-not-allowed");break;default:Qt(c,"internal-error")}}),Qt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
797
|
+
q.update=function(a){this.i=new We;try{this.j.update(mc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Qb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Qt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new N("keystatuseschange");a.dispatchEvent(c)}
|
|
798
|
+
function Pt(){this.size=0;this.g=void 0}q=Pt.prototype;q.forEach=function(a){this.g&&a(this.g,li.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=li.value();return this.g&&kc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Xs(Ht);function Rt(){}function St(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Tt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ut,window.MediaKeys=Vt,window.MediaKeySystemAccess=Wt)}function Tt(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
799
|
+
function Ut(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Us.PatchedMediaKeysNop=Rt;Rt.install=St;function Vt(){throw new TypeError("Illegal constructor.");}Vt.prototype.createSession=function(){};Vt.prototype.setServerCertificate=function(){};function Wt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Wt.prototype.getConfiguration=function(){};Wt.prototype.createMediaKeys=function(){};Xs(St,-10);function Xt(){}function Yt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Zt="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=$t;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=au;window.MediaKeys=bu;window.MediaKeySystemAccess=cu}}
|
|
800
|
+
function du(a){var b=Zt;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function $t(a,b){try{var c=new cu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function au(a){var b=this.mediaKeys;b&&b!=a&&eu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&eu(a,this);return Promise.resolve()}Us.PatchedMediaKeysWebkit=Xt;Xt.install=Yt;
|
|
801
|
+
function cu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
|
|
802
802
|
m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
|
|
803
|
-
d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
804
|
-
function
|
|
805
|
-
d.g&&d.g.resolve(),d.g=null}),a.h.m(b,c+"keyerror",function(d){var e=
|
|
806
|
-
function
|
|
807
|
-
q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?
|
|
808
|
-
function
|
|
809
|
-
function
|
|
810
|
-
function
|
|
811
|
-
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
812
|
-
q.has=function(a){var b=
|
|
813
|
-
function
|
|
814
|
-
function
|
|
815
|
-
function
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
m=
|
|
819
|
-
p.next()){var v=t.value;t=new
|
|
820
|
-
Number(y[2]),C||(null!=w&&(t.viewportAnchorY=100*t.viewportAnchorY/w),null!=x&&(t.viewportAnchorX=100*t.viewportAnchorX/x)),t.viewportAnchorUnits=C||null!=x?
|
|
821
|
-
function
|
|
822
|
-
a=[];if(!x)for(var w=r(p.childNodes),y=w.next();!y.done;y=w.next())(y=
|
|
823
|
-
c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),y=Math.max(y,c.endTime);if("br"==p.tagName)return e=new
|
|
824
|
-
(g=
|
|
825
|
-
function
|
|
826
|
-
f))a.backgroundColor=g;if(g=
|
|
827
|
-
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=
|
|
828
|
-
function
|
|
829
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&
|
|
830
|
-
function
|
|
831
|
-
function
|
|
832
|
-
function
|
|
833
|
-
function
|
|
834
|
-
function
|
|
835
|
-
var
|
|
836
|
-
{left:"line-left",center:"center",right:"line-right"},
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
[];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new
|
|
840
|
-
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");
|
|
841
|
-
/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var v=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=
|
|
842
|
-
!0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new
|
|
843
|
-
""):h=new
|
|
844
|
-
function
|
|
845
|
-
function
|
|
846
|
-
function
|
|
847
|
-
"italic";break;case "u":e.textDecoration.push("underline")}}if(
|
|
848
|
-
function
|
|
849
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
850
|
-
function
|
|
851
|
-
|
|
852
|
-
c+t.ud:m;m=x+(v||0);var w=0;do{var y=n.
|
|
853
|
-
function
|
|
854
|
-
function
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Md:e.Md},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
858
|
-
function
|
|
859
|
-
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=
|
|
860
|
-
function
|
|
861
|
-
|
|
803
|
+
d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}cu.prototype.createMediaKeys=function(){var a=new bu(this.g);return Promise.resolve(a)};cu.prototype.getConfiguration=function(){return this.h};function bu(a){this.l=a;this.g=null;this.h=new wf;this.i=[];this.j=new Map}
|
|
804
|
+
function eu(a,b){a.g=b;a.h.Qb();var c=Zt;b&&(a.h.m(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=nc(d.initData);a.g.dispatchEvent(e)}),a.h.m(b,c+"keymessage",function(d){var e=fu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new N("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.m(b,c+"keyadded",function(d){if(d=fu(a,d.sessionId))gu(d,"usable"),
|
|
805
|
+
d.g&&d.g.resolve(),d.g=null}),a.h.m(b,c+"keyerror",function(d){var e=fu(a,d.sessionId);e&&e.handleError(d)}))}bu.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.g||document.createElement("video");b.src||(b.src="about:blank");a=new hu(b,this.l,a);this.i.push(a);return a};bu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
806
|
+
function fu(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 hu(a,b,c){cb.call(this);this.j=a;this.o=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new We;this.keyStatuses=new iu}u(hu,cb);q=hu.prototype;
|
|
807
|
+
q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?gu(this,"output-restricted"):1==b?gu(this,"expired"):gu(this,"internal-error"))};
|
|
808
|
+
function ju(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;try{if("persistent-license"==a.l)if(c)var d=mc(wc("LOAD_SESSION|"+c));else{var e=wc("PERSISTENT|");d=bd(e,b)}else d=mc(b)}catch(g){return Promise.reject(g)}a.h=new We;var f=du("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).T(.01)}return a.h}
|
|
809
|
+
function ku(a,b,c){if(a.g)a.g.then(function(){return ku(a,b,c)})["catch"](function(){return ku(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=sc(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=Zc(e.keys[0].k);e=Zc(e.keys[0].kid)}else d=mc(c),e=null;var f=du("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
810
|
+
function gu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new N("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return ju(this,b,null)};q.load=function(a){return"persistent-license"==this.l?ju(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new We;ku(this,b,a);return b};
|
|
811
|
+
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=du("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function iu(){this.size=0;this.g=void 0}q=iu.prototype;q.forEach=function(a){this.g&&a(this.g,li.value())};q.get=function(a){if(this.has(a))return this.g};
|
|
812
|
+
q.has=function(a){var b=li.value();return this.g&&kc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Zt="";Xs(Yt);function lu(){}function mu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=nu,Object.defineProperty(a,"disablePictureInPicture",{get:ou,set:pu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=qu,document.addEventListener("webkitpresentationmodechanged",ru,!0))}}
|
|
813
|
+
function ru(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)}
|
|
814
|
+
function nu(){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 qu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
815
|
+
function ou(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function pu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Us.PiPWebkit=lu;lu.install=mu;Xs(mu);function su(){}function tu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=uu)}function uu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Us.StorageEstimate=su;su.install=tu;Xs(tu);function vu(){}function wu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Us.VideoPlayPromise=vu;vu.install=wu;Xs(wu);function xu(){}function yu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=zu)}}function zu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Us.VideoPlaybackQuality=xu;xu.install=yu;Xs(yu);function Au(){}function Bu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Cu;else if(6==b)a=Du;else{try{var c=!!Cu(1,2,"")}catch(d){c=!1}c&&(a=Cu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Cu(a,b,c){return new window.TextTrackCue(a,b,c)}function Du(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Us.VTTCue=Au;Au.install=Bu;Xs(Bu);function Eu(){}Eu.prototype.parseInit=function(){};Eu.prototype.parseMedia=function(a,b){var c=null,d=[],e=sc(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Fu.exec(f))){var g=Gu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new kd(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",Eu);Eu.prototype.parseMedia=Eu.prototype.parseMedia;
|
|
816
|
+
Eu.prototype.parseInit=Eu.prototype.parseInit;var Fu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Gu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;nf["application/x-subtitle-lrc"]=function(){return new Eu};function Hu(){}Hu.prototype.parseInit=function(){};
|
|
817
|
+
Hu.prototype.parseMedia=function(a,b){var c=sc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new P(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new P(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new P(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=Jn(g,Iu,"frameRate"),k=Jn(g,Iu,"subFrameRate"),l=Jn(g,Iu,"frameRateMultiplier"),
|
|
818
|
+
m=Jn(g,Iu,"tickRate"),n=Jn(g,Iu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=Jn(g,Ju,"extent");if("default"!=c&&"preserve"!=c)throw new P(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Ku(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?Hn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
|
|
819
|
+
p.next()){var v=t.value;t=new md;var x=v.getAttribute("xml:id");if(x){t.id=x;var w=null;e&&(w=Lu.exec(e)||Mu.exec(e));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var y,C;if(y=Nu(v,l,"extent"))y=(C=Lu.exec(y))||Mu.exec(y),null!=y&&(t.width=Number(y[1]),t.height=Number(y[2]),C||(null!=x&&(t.width=100*t.width/x),null!=w&&(t.height=100*t.height/w)),t.widthUnits=C||null!=x?Cd:0,t.heightUnits=C||null!=w?Cd:0);if(v=Nu(v,l,"origin"))y=(C=Lu.exec(v))||Mu.exec(v),null!=y&&(t.viewportAnchorX=Number(y[1]),t.viewportAnchorY=
|
|
820
|
+
Number(y[2]),C||(null!=w&&(t.viewportAnchorY=100*t.viewportAnchorY/w),null!=x&&(t.viewportAnchorX=100*t.viewportAnchorX/x)),t.viewportAnchorUnits=C||null!=x?Cd:0)}else t=null;t&&m.push(t)}if(En(f,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");e=r(En(f,"div"));for(p=e.next();!p.done;p=e.next())if(En(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");(f=Ou(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
|
|
821
|
+
function Ou(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var t=null,v=r(Pu),x=v.next();!x.done&&!(t=Qu(p,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
|
|
822
|
+
a=[];if(!x)for(var w=r(p.childNodes),y=w.next();!y.done;y=w.next())(y=Ou(y.value,b,c,d,e,f,g,h,k,p,m))&&a.push(y);d=null!=l;w=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||w||"br"==p.tagName||0!=a.length||d&&!h))return null;y=Ru(p,c);w=y.start;for(y=y.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)y=Su(n,c,w,y),w=y.start,y=y.end,n=n.parentNode;null==w&&(w=0);w+=b;y=null==y?Infinity:y+b;if(!C&&0<a.length)for(w=Infinity,y=0,b=r(a),
|
|
823
|
+
c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),y=Math.max(y,c.endTime);if("br"==p.tagName)return e=new kd(w,y,""),e.lineBreak=!0,e;b="";x&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new kd(w,y,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Qu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var D=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==D})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
|
|
824
|
+
(g=Qu(l,"region",f,"")[0]);Tu(b,p,g,t,e,v,0==a.length);return b}
|
|
825
|
+
function Tu(a,b,c,d,e,f,g){f=f||g;"rtl"==Uu(b,c,e,"direction",f)&&(a.direction="rtl");g=Uu(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=ld);(g=Uu(b,c,e,"textAlign",!0))?(a.positionAlign=Vu[g],a.lineAlign=Wu[g],a.textAlign=wd[g.toUpperCase()]):a.textAlign="start";if(g=Uu(b,c,e,"displayAlign",!0))a.displayAlign=xd[g.toUpperCase()];if(g=Uu(b,c,e,"color",f))a.color=g;if(g=Uu(b,c,e,"backgroundColor",
|
|
826
|
+
f))a.backgroundColor=g;if(g=Uu(b,c,e,"border",f))a.border=g;if(g=Uu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Uu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Uu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Uu(b,c,e,"lineHeight",f))&&g.match(Xu)&&(a.lineHeight=g);(g=Uu(b,c,e,"fontSize",f))&&(g.match(Xu)||g.match(Yu))&&(a.fontSize=g);if(g=Uu(b,c,e,"fontStyle",f))a.fontStyle=Bd[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
|
|
827
|
+
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Uu(b,c,e,"letterSpacing",f))&&d.match(Xu)&&(a.letterSpacing=d);(d=Uu(b,c,e,"linePadding",f))&&d.match(Xu)&&(a.linePadding=d);if(f=Uu(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Nu(c,e,"textDecoration"))&&Zu(a,c);(b=$u(b,e,"textDecoration"))&&Zu(a,b)}
|
|
828
|
+
function Zu(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&hd(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&hd(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
829
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&hd(a.textDecoration,"overline")}}function Uu(a,b,c,d,e){e=void 0===e?!0:e;return(a=$u(a,c,d))?a:e?Nu(b,c,d):null}function Nu(a,b,c){if(!a)return null;var d=Jn(a,Ju,c);return d?d:av(a,b,c)}function $u(a,b,c){var d=Jn(a,Ju,c);return d?d:av(a,b,c)}
|
|
830
|
+
function av(a,b,c){a=Qu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=In(a[e],"urn:ebu:tt:style",c);f||(f=Jn(a[e],Ju,c));f||(f=$u(a[e],b,c));f&&(d=f)}return d}
|
|
831
|
+
function Qu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?In(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Su(a,b,c,d){a=Ru(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}}
|
|
832
|
+
function Ru(a,b){var c=bv(a.getAttribute("begin"),b),d=bv(a.getAttribute("end"),b),e=bv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
|
|
833
|
+
function bv(a,b){var c=null;if(cv.test(a)){c=cv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(dv.test(a))c=ev(dv,a);else if(fv.test(a))c=ev(fv,a);else if(gv.test(a))c=gv.exec(a),c=Number(c[1])/b.frameRate;else if(hv.test(a))c=hv.exec(a),c=Number(c[1])/b.g;else if(iv.test(a))c=ev(iv,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
834
|
+
function ev(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",Hu);Hu.prototype.parseMedia=Hu.prototype.parseMedia;Hu.prototype.parseInit=Hu.prototype.parseInit;function Ku(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]))}
|
|
835
|
+
var Lu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Yu=/^(\d{1,2}(?:\.\d+)?|100)%$/,Xu=/^(\d+px|\d+em|\d*\.?\d+c)$/,Mu=/^(\d+)px (\d+)px$/,cv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,dv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,fv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,gv=/^(\d*(?:\.\d*)?)f$/,hv=/^(\d*(?:\.\d*)?)t$/,iv=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Wu={left:rd,center:"center",right:"end",start:rd,end:"end"},Vu=
|
|
836
|
+
{left:"line-left",center:"center",right:"line-right"},Iu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Ju=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Pu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];nf["application/ttml+xml"]=function(){return new Hu};function jv(){this.A=new Hu}jv.prototype.parseInit=function(a){var b=!1;(new Bc).box("moov",Fc).box("trak",Fc).box("mdia",Fc).box("minf",Fc).box("stbl",Fc).X("stsd",Hc).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};jv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Bc).box("mdat",Ic(function(f){d=!0;e=e.concat(c.A.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",jv);jv.prototype.parseMedia=jv.prototype.parseMedia;
|
|
837
|
+
jv.prototype.parseInit=jv.prototype.parseInit;nf['application/mp4; codecs="stpp"']=function(){return new jv};nf['application/mp4; codecs="stpp.ttml"']=function(){return new jv};nf['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new jv};nf['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new jv};function kv(){}kv.prototype.parseInit=function(){};
|
|
838
|
+
kv.prototype.parseMedia=function(a,b){var c=sc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new P(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=lv(new dq(e[1]));if(null==c)throw new P(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
|
|
839
|
+
[];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new dq(g);var h=new md;gq(g);eq(g);for(var k=gq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
|
|
840
|
+
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");eq(g);k=gq(g)}f.push(h)}e=new Map;mv(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new kd(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
|
|
841
|
+
/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var v=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=ud;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
|
|
842
|
+
!0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new dq(h[0]);m=lv(k);t=fq(k,/[ \t]+--\x3e[ \t]+/g);n=lv(k);if(null==m||null==t||null==n)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
|
|
843
|
+
""):h=new kd(m,n,"");nv(p,h,e);eq(k);for(m=gq(k);m;)ov(h,m,f),eq(k),m=gq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function mv(a){for(var b=r(Object.entries(zd)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new kd(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Ad));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new kd(0,0,""),e.backgroundColor=d,a.set(c,e)}
|
|
844
|
+
function nv(a,b,c){0===c.size&&mv(c);a=pv(a);var d=Vn("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())qv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
|
|
845
|
+
function pv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function rv(a,b){return a&&0<a.length?a:b}
|
|
846
|
+
function qv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=rv(h.backgroundColor,e.backgroundColor),e.color=rv(h.color,e.color),e.fontFamily=rv(h.fontFamily,e.fontFamily),e.fontSize=rv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
|
|
847
|
+
"italic";break;case "u":e.textDecoration.push("underline")}}if(Ln(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())qv(a.value,e,c,d)}
|
|
848
|
+
function ov(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=od:a.textAlign=wd[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
|
|
849
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=sv(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=yd[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=qd,a.line=Number(c[1]),c[2]&&(a.lineAlign=yd[c[2].toUpperCase()])}function sv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
850
|
+
function lv(a){a=fq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",kv);kv.prototype.parseMedia=kv.prototype.parseMedia;kv.prototype.parseInit=kv.prototype.parseInit;nf["text/vtt"]=function(){return new kv};nf['text/vtt; codecs="vtt"']=function(){return new kv};nf['text/vtt; codecs="wvtt"']=function(){return new kv};function tv(){this.g=null}tv.prototype.parseInit=function(a){var b=this,c=!1;(new Bc).box("moov",Fc).box("trak",Fc).box("mdia",Fc).X("mdhd",function(d){d=Me(d.reader,d.version);b.g=d.timescale}).box("minf",Fc).box("stbl",Fc).X("stsd",Hc).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};
|
|
851
|
+
tv.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Bc).box("moof",Fc).box("traf",Fc).X("tfdt",function(B){g=!0;c=Le(B.reader,B.version).Od}).X("tfhd",function(B){l=Ke(B.reader,B.flags).Pe}).X("trun",function(B){h=!0;d=Ne(B.reader,B.version,B.flags).lf}).box("mdat",Ic(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);for(var m=c,n=new yc(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.le||l,x=t.ud?
|
|
852
|
+
c+t.ud:m;m=x+(v||0);var w=0;do{var y=n.R();w+=y;var C=n.R(),D=null;"vttc"==Jc(C)?8<y&&(D=n.Ab(y-8)):n.skip(y-8);v&&D&&(y=uv(D,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(y))}while(t.sampleSize&&w<t.sampleSize)}return f.filter(Jb)};function uv(a,b,c){var d,e,f;(new Bc).box("payl",Ic(function(g){d=sc(g)})).box("iden",Ic(function(g){e=sc(g)})).box("sttg",Ic(function(g){f=sc(g)})).parse(a);return d?vv(d,e,f,b,c):null}
|
|
853
|
+
function vv(a,b,c,d,e){d=new kd(d,e,"");nv(a,d,new Map);b&&(d.id=b);if(c)for(a=new dq(c),b=gq(a);b;)ov(d,b,[]),eq(a),b=gq(a);return d}M("shaka.text.Mp4VttParser",tv);tv.prototype.parseMedia=tv.prototype.parseMedia;tv.prototype.parseInit=tv.prototype.parseInit;nf['application/mp4; codecs="wvtt"']=function(){return new tv};function wv(){}wv.prototype.parseInit=function(){};wv.prototype.parseMedia=function(a){var b=sc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new dq(c[0]),e=xv(d),f=fq(d,/,/g);d=xv(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new kd(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
854
|
+
function xv(a){a=fq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",wv);wv.prototype.parseMedia=wv.prototype.parseMedia;wv.prototype.parseInit=wv.prototype.parseInit;nf["text/x-subviewer"]=function(){return new wv};function yv(){this.A=new kv}yv.prototype.parseInit=function(){};yv.prototype.parseMedia=function(a,b){var c=sc(a);c=zv(c);c=mc(wc(c));return this.A.parseMedia(c,b)};function zv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",yv);yv.srt2webvtt=zv;yv.prototype.parseMedia=yv.prototype.parseMedia;
|
|
855
|
+
yv.prototype.parseInit=yv.prototype.parseInit;nf["text/srt"]=function(){return new yv};function Av(){}Av.prototype.parseInit=function(){};
|
|
856
|
+
Av.prototype.parseMedia=function(a){var b="",c="";a=sc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Bv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Cv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Dv);else if("Style"==e){e=f.split(Dv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
857
|
+
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Md:e.Md},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Cv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Dv);else if("Dialogue"==f){g=g.split(Dv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Ev(f.Start);var k=Ev(f.End);g=new kd(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Md=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Md}}(e)))&&Fv(g,f);d.push(g)}return d};
|
|
858
|
+
function Fv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Gv(c))a.color=c;if(c=b.BackColour)if(c=Gv(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=sd;a.textAlign="start";break;case 2:a.displayAlign=sd;a.textAlign=od;break;case 3:a.displayAlign=sd;a.textAlign="end";
|
|
859
|
+
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=od;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=od;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
|
|
860
|
+
function Gv(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 Ev(a){a=Hv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Av);Av.prototype.parseMedia=Av.prototype.parseMedia;Av.prototype.parseInit=Av.prototype.parseInit;var Bv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Cv=/^\s*([^:]+):\s*(.*)/,Dv=/\s*,\s*/,Hv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
|
|
861
|
+
nf["text/x-ssa"]=function(){return new Av};/*
|
|
862
862
|
@license
|
|
863
863
|
EME Encryption Scheme Polyfill
|
|
864
864
|
Copyright 2019 Google LLC
|
|
865
865
|
SPDX-License-Identifier: Apache-2.0
|
|
866
866
|
*/
|
|
867
|
-
function
|
|
868
|
-
function
|
|
867
|
+
function Iv(){}var Jv;function Kv(){Jv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Jv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Lv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
868
|
+
function Lv(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),z(e,Jv.call(c,a,b),2);d=e.h;if(Mv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Jv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Nv;return e["return"](Nv.call(c,
|
|
869
869
|
a,b))})}
|
|
870
|
-
function
|
|
871
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return
|
|
872
|
-
function
|
|
873
|
-
function
|
|
874
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
875
|
-
function
|
|
876
|
-
new
|
|
877
|
-
v);l=p;m=k;return
|
|
878
|
-
|
|
879
|
-
function
|
|
880
|
-
function
|
|
870
|
+
function Nv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return K(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Ov(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Pv(h.videoCapabilities,d),l=Pv(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."),
|
|
871
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return z(t,Jv.call(c,a,e),2)}p=t.h;return t["return"](new Qv(p,d))})}function Pv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Iv);Iv.install=Kv;function Rv(){}var Sv;
|
|
872
|
+
function Tv(){Sv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Sv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Uv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
873
|
+
function Uv(a){var b=this,c,d;return K(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),z(e,Sv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Mv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Sv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
874
|
+
navigator.mediaCapabilities.decodingInfo=Vv;return e["return"](Vv.call(b,a))})}
|
|
875
|
+
function Vv(a){var b=this,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Ov(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):z(n,Sv.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
876
|
+
new Qv(k.keySystemAccess,c);n.C(3);break}if(!a.keySystemConfiguration){n.C(3);break}var p=a.keySystemConfiguration,t=[],v=[];p.audio&&t.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};t.length&&(p.audioCapabilities=t);v.length&&(p.videoCapabilities=
|
|
877
|
+
v);l=p;m=k;return z(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}M("McEncryptionSchemePolyfill",Rv);Rv.install=Tv;function Qv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
878
|
+
Qv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Qv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
879
|
+
function Ov(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Mv(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}function Wv(){}
|
|
880
|
+
function $s(){Kv();Tv()}M("EncryptionSchemePolyfills",Wv);Wv.install=$s;"undefined"!==typeof module&&module.exports&&(module.exports=Wv);/*
|
|
881
881
|
@license
|
|
882
882
|
Copyright 2013 Ali Al Dallal
|
|
883
883
|
|
|
@@ -901,7 +901,7 @@ function bt(){Mv();Vv()}K("EncryptionSchemePolyfills",Yv);Yv.install=bt;"undefin
|
|
|
901
901
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
902
902
|
SOFTWARE.
|
|
903
903
|
*/
|
|
904
|
-
for(var
|
|
904
|
+
for(var Xv={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
|
|
905
905
|
"ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
|
|
906
906
|
u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
|
|
907
907
|
u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
|
|
@@ -922,49 +922,49 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
|
|
|
922
922
|
sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
|
|
923
923
|
u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
924
924
|
u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
|
|
925
|
-
u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}}
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
function
|
|
929
|
-
""))});this.eventManager.m(this.localization,"locale-updated",function(){});this.eventManager.m(this.localization,"locale-changed",function(){});this.eventManager.m(this.adManager,"ad-started",function(){c.g.
|
|
930
|
-
"ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&
|
|
931
|
-
c.h()});this.eventManager.m(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.m(this.button,"click",function(){c.ad?
|
|
932
|
-
this.parent.appendChild(this.container);this.eventManager.m(this.bar,"mousedown",function(){e.controls.
|
|
933
|
-
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}
|
|
934
|
-
q.setValue=function(a){this.g||(this.bar.value=a)};function
|
|
935
|
-
|
|
936
|
-
"locale-changed",function(){return
|
|
937
|
-
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.o.stop(),this.o=null);
|
|
938
|
-
q.update=function(){var a=this.v.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Va(),g=f.end-f.start;this.setRange(f.start,f.end);
|
|
925
|
+
u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},Yv=r(Object.keys(Xv)),Zv=Yv.next();!Zv.done;Zv=
|
|
926
|
+
Yv.next()){var $v=Zv.value;Xv[$v.toLowerCase()]=Xv[$v]};function aw(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new wf;this.localization=this.controls.$a;this.player=this.controls.cc();this.video=this.controls.zb();this.adManager=this.player.fd();this.ad=b.getAd();this.eventManager.m(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null})}
|
|
927
|
+
aw.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};M("shaka.ui.Element",aw);aw.prototype.release=aw.prototype.release;function bw(a){return cw(a,"shaka-back-to-overflow-button")}function cw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function dw(a){a&&(a=cw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function ew(){var a=T("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.setAttribute("aria-hidden","true");return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
928
|
+
function fw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function gw(a,b){aw.call(this,a,b);var c=this;this.i=T("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=T("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=fw(e-d,!1)+" / "+fw(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
|
|
929
|
+
""))});this.eventManager.m(this.localization,"locale-updated",function(){});this.eventManager.m(this.localization,"locale-changed",function(){});this.eventManager.m(this.adManager,"ad-started",function(){c.g.Ia();c.g.oa(.5)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Ia(),this.g.oa(.5))}u(gw,aw);gw.prototype.release=function(){this.g.stop();this.g=null;aw.prototype.release.call(this)};M("shaka.ui.AdCounter",gw);function hw(a,b){aw.call(this,a,b);var c=this;this.g=T("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=T("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.m(this.localization,"locale-updated",function(){c.ad&&iw(c)});this.eventManager.m(this.localization,"locale-changed",function(){c.ad&&iw(c)});this.eventManager.m(this.adManager,"ad-started",function(){iw(c)});this.eventManager.m(this.adManager,
|
|
930
|
+
"ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&iw(this)}u(hw,aw);function iw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}M("shaka.ui.AdPosition",hw);function jw(a,b){aw.call(this,a,b);var c=this;this.button=Vj();this.parent.appendChild(this.button);this.eventManager.m(this.localization,"locale-updated",function(){c.g()});this.eventManager.m(this.localization,"locale-changed",function(){c.g()});this.eventManager.m(this.video,"play",function(){c.g();c.h()});this.eventManager.m(this.video,"pause",function(){c.g();c.h()});this.eventManager.m(this.video,"seeking",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-paused",function(){c.g();
|
|
931
|
+
c.h()});this.eventManager.m(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.m(this.button,"click",function(){c.ad?kw(c.controls):lw(c.controls)});this.ad&&(this.g(),this.h())}u(jw,aw);jw.prototype.isPaused=function(){if(this.ad)var a=this.ad.isPaused();else a=this.controls,a=a.g.paused&&!a.ha;return a};jw.prototype.g=function(){};jw.prototype.h=function(){};M("shaka.ui.PlayButton",jw);function mw(a,b){jw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(mw,jw);mw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};mw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};M("shaka.ui.BigPlayButton",mw);function nw(a,b,c,d){aw.call(this,a,b);var e=this;this.container=T("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
|
|
932
|
+
this.parent.appendChild(this.container);this.eventManager.m(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.m(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,ow(e,f),e.onChangeStart())});this.eventManager.m(this.bar,"input",function(){e.onChange()});this.eventManager.m(this.bar,"touchmove",function(f){e.g&&(ow(e,f),e.onChange())});this.eventManager.m(this.bar,"touchend",function(f){e.g&&(e.g=!1,ow(e,f),e.onChangeEnd())});this.eventManager.m(this.bar,
|
|
933
|
+
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(nw,aw);q=nw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);aw.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.T(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
|
|
934
|
+
q.setValue=function(a){this.g||(this.bar.value=a)};function ow(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}M("shaka.ui.RangeElement",nw);nw.prototype.setValue=nw.prototype.setValue;nw.prototype.getValue=nw.prototype.getValue;nw.prototype.changeTo=nw.prototype.changeTo;nw.prototype.onChangeEnd=nw.prototype.onChangeEnd;nw.prototype.onChange=nw.prototype.onChange;
|
|
935
|
+
nw.prototype.onChangeStart=nw.prototype.onChangeStart;nw.prototype.setRange=nw.prototype.setRange;function pw(a,b){nw.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=T("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.v=this.controls.v;this.h=new Q(function(){c.video.currentTime=c.getValue()});this.o=new Q(function(){qw(c)});this.A=!1;this.i=[];this.eventManager.m(this.localization,"locale-updated",function(){return rw(c)});this.eventManager.m(this.localization,
|
|
936
|
+
"locale-changed",function(){return rw(c)});this.eventManager.m(this.adManager,"ad-started",function(){X(c.container,!1)});this.eventManager.m(this.adManager,"ad-stopped",function(){sw(c)&&X(c.container,!0)});this.eventManager.m(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;tw(c)});this.eventManager.m(this.player,"unloading",function(){c.i=[];tw(c)});this.setValue(this.video.currentTime);this.update();rw(this);this.ad&&X(this.container,!1)}u(pw,nw);q=pw.prototype;
|
|
937
|
+
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.o.stop(),this.o=null);nw.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.we(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.T(.125))};q.onChangeEnd=function(){this.h.Ia();this.controls.we(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
938
|
+
q.update=function(){var a=this.v.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Va(),g=f.end-f.start;this.setRange(f.start,f.end);sw(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.v.showUnbufferedStart?
|
|
939
939
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):X(this.container,!1)};
|
|
940
|
-
function
|
|
941
|
-
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
q.destroy=function(){var a=this;return
|
|
945
|
-
null;case 6:a.D=null,a.B=null,a.g=null,a
|
|
946
|
-
q.configure=function(a){this.v=a;this.A.Le(a.castReceiverAppId);this.l&&(this.l=null);this.
|
|
947
|
-
|
|
948
|
-
q.re=function(a){(this.
|
|
949
|
-
q.hg=function(){return this.
|
|
950
|
-
q.Be=function(){var a=this,b;return
|
|
951
|
-
9,4);break;case 10:
|
|
952
|
-
function
|
|
953
|
-
function
|
|
954
|
-
function
|
|
940
|
+
function qw(a){if(a.i.length){for(var b=a.player.Va(),c=b.end-b.start,d=["to right"],e=[],f=a.v.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
941
|
+
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function tw(a){qw(a);var b=a.player.Va();b=b.end-b.start;a.player.Z()&&5<b&&a.o.oa(1)}function sw(a){var b=a.player.Va();b=b.end-b.start;return a.player.Z()&&5>b?!1:null==a.ad}function rw(a){a.bar.setAttribute("aria-label",a.localization.resolve("SEEK"))}M("shaka.ui.SeekBar",pw);function uw(){}
|
|
942
|
+
uw.prototype.create=function(a,b){return new pw(a,b)};pw.Factory=uw;function Y(a,b,c,d){cb.call(this);var e=this;this.ba=!0;this.v=d;this.A=new Vm(c,a,this.v.castReceiverAppId);this.xb=!0;this.g=this.A.zb();this.B=c;this.D=this.A.cc();this.Ja=a;this.j=b;this.wb=this.D.fd();this.l=this.o=null;this.ha=!1;this.H=[];this.Zb=[];this.Eb=!1;this.ia=new Q(function(){e.j.style.cursor="none";e.Eb=!1;vw(e)});this.za=new Q(function(){e.i.removeAttribute("shown");e.I.T(2)});this.I=new Q(function(){for(var f=r(e.H),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.jb=new Q(function(){e.Nb()&&
|
|
943
|
+
ww(e)});this.K=null;this.S=[];this.$a=xw();this.h=new wf;this.configure(this.v);yw(this);this.Aa=new Set;zw(this);this.jb.oa(.125);this.h.m(this.$a,"locale-changed",function(f){e.wb.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
|
|
944
|
+
q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.C(2);break}return z(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.ia&&(a.ia.stop(),a.ia=null);a.za&&(a.za.stop(),a.za=null);a.I&&(a.I.stop(),a.I=null);a.jb&&(a.jb.stop(),a.jb=null);Aw(a);a.i&&(a.j.removeChild(a.i),a.i=null);if(!a.A){b.C(4);break}return z(b,a.A.destroy(),5);case 5:a.A=null;case 4:if(!a.Ja){b.C(6);break}return z(b,a.Ja.destroy(),7);case 7:a.Ja=
|
|
945
|
+
null;case 6:a.D=null,a.B=null,a.g=null,a.$a=null,a.Aa.clear(),cb.prototype.release.call(a),A(b)}})};function Aw(a){for(var b=r(a.S),c=b.next();!c.done;c=b.next())c.value.release();a.S=[]}function Bw(a,b){Cw.set(a,b)}q.Df=function(a){this.xb=a;zw(this)};q.sg=function(){vw(this)};
|
|
946
|
+
q.configure=function(a){this.v=a;this.A.Le(a.castReceiverAppId);this.l&&(this.l=null);this.Db&&(this.Db=null);this.i?(Wj(this.i),Aw(this)):(Dw(this),this.ea=T("div"),this.ea.classList.add("shaka-client-side-ad-container"),X(this.ea,!1),this.j.appendChild(this.ea));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");Ew(this);this.v.addBigPlayButton&&Fw(this);this.qa||Gw(this);this.tb=T("div");this.tb.classList.add("shaka-server-side-ad-container");this.i.appendChild(this.tb);
|
|
947
|
+
Hw(this);this.H=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.H.push.apply(this.H,ha(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Iw(this);this.Zb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));vw(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.m(b,"click",c);this.h.m(b,"dblclick",c)}};
|
|
948
|
+
q.re=function(a){(this.ba=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");vw(this)};q.qf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.re(!1)};q.getAd=function(){return this.o};q.Of=function(){return this.A};q.Zf=function(){return this.$a};q.ng=function(){return this.j};q.zb=function(){return this.g};q.Yf=function(){return this.B};q.cc=function(){return this.D};q.Xf=function(){return this.Ja};q.Sf=function(){return this.i};
|
|
949
|
+
q.hg=function(){return this.tb};q.Pf=function(){return this.ea};q.Qf=function(){return this.v};q.rg=function(){return this.ha};q.we=function(a){this.ha=a};q.pg=function(){return this.xb};q.Te=function(){return this.l?this.l.getValue():this.g.currentTime};q.rf=function(a){this.K=a};q.Zc=function(){return this.H.some(function(a){return!a.classList.contains("shaka-hidden")})};q.Hc=function(){this.I.Ia()};
|
|
950
|
+
q.Be=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),z(c,document.exitFullscreen(),0);F(c,4);if(!document.pictureInPictureElement){c.C(6);break}return z(c,document.exitPictureInPicture(),6);case 6:return z(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.v.forceLandscapeOnFullscreen||!screen.orientation){c.C(9);break}F(c,10);return z(c,screen.orientation.lock("landscape"),12);case 12:va(c,
|
|
951
|
+
9,4);break;case 10:H(c,4);case 9:va(c,0);break;case 4:b=H(c),a.dispatchEvent(new N("error",(new Map).set("detail",b))),c.C(0)}})};q.tf=function(){X(this.L,!0);X(this.ea,!0);this.i.setAttribute("ad-active","true")};q.We=function(){X(this.L,!1);X(this.ea,!1);this.i.removeAttribute("ad-active")};function lw(a){a.ba&&a.g.duration&&(a.D.Ie(),a.g.paused&&!a.ha?a.g.play():a.g.pause())}function kw(a){a.o&&a.o.isPaused()?a.o.play():a.o&&a.o.pause()}
|
|
952
|
+
function Dw(a){a.i=T("div");a.i.classList.add("shaka-controls-container");a.j.appendChild(a.i);a.j.setAttribute("shaka-controls","true");a.h.m(a.i,"touchstart",function(b){a.g.duration&&(a.Nb()?a.K=Date.now():(Jw(a,b),b.preventDefault()))},{passive:!1});a.h.m(a.i,"click",function(){a.ba&&(a.Zc()?a.I.Ia():a.o?kw(a):lw(a))});a.h.m(a.i,"dblclick",function(){a.v.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Be()})}
|
|
953
|
+
function Fw(a){var b=T("div");b.classList.add("shaka-play-button-container");a.i.appendChild(b);a.Db=new mw(b,a);a.S.push(a.Db)}function Ew(a){var b=T("div");b.classList.add("shaka-scrim-container");a.i.appendChild(b)}function Kw(a){a.L=T("div");a.L.classList.add("shaka-ad-controls");X(a.L,null!=a.o);a.O.appendChild(a.L);var b=new hw(a.L,a);a.S.push(b);b=new gw(a.L,a);a.S.push(b)}
|
|
954
|
+
function Gw(a){a.qa=T("div");a.qa.classList.add("shaka-spinner-container");a.j.appendChild(a.qa);var b=T("div");b.classList.add("shaka-spinner");a.qa.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
|
|
955
955
|
b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
|
|
956
|
-
function
|
|
957
|
-
"Please update UI elements to have a release() method."),b.
|
|
958
|
-
function
|
|
959
|
-
a.h.m(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.i.contains(c)&&
|
|
960
|
-
(a.o?
|
|
961
|
-
function
|
|
962
|
-
function
|
|
963
|
-
function
|
|
964
|
-
function
|
|
965
|
-
function
|
|
966
|
-
function
|
|
967
|
-
function
|
|
956
|
+
function Hw(a){a.O=T("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.i.appendChild(a.O);a.h.m(a.O,"click",function(){a.Hc()});Kw(a);a.Za=T("div");a.Za.classList.add("shaka-controls-button-panel");a.Za.classList.add("shaka-show-controls-on-mouse-over");a.O.appendChild(a.Za);for(var b={},c=r(a.v.controlPanelElements),d=c.next();!d.done;b={rc:b.rc},d=c.next())d=d.value,Cw.get(d)?(d=Cw.get(d).create(a.Za,a),"function"!=typeof d.release&&(Db("shaka.extern.IUIElement",
|
|
957
|
+
"Please update UI elements to have a release() method."),b.rc=d,b.rc.release=function(e){return function(){e.rc.destroy&&e.rc.destroy()}}(b)),a.S.push(d)):Pa("Unrecognized control panel element requested:",d)}function Iw(a){if(a.v.addSeekBar)a.l=Lw.create(a.O,a),a.S.push(a.l);else{a=r(a.H);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
|
|
958
|
+
function yw(a){a.h.m(a.D,"buffering",function(){a.ba&&X(a.qa,a.D.Jc())});a.ba&&X(a.qa,a.D.Jc());a.h.m(window,"keydown",function(b){Mw(a,b)});a.h.m(window,"click",function(){return a.Hc()});a.h.m(a.g,"play",function(){vw(a)});a.h.m(a.g,"pause",function(){vw(a)});a.h.m(a.j,"mousemove",function(b){Jw(a,b)});a.h.m(a.j,"touchmove",function(b){Jw(a,b)},{passive:!0});a.h.m(a.j,"touchend",function(b){Jw(a,b)},{passive:!0});a.h.m(a.j,"mouseleave",function(){a.K||a.ia.Ia()});a.h.m(a.A,"caststatuschanged",function(){zw(a)});
|
|
959
|
+
a.h.m(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.i.contains(c)&&Jw(a,b);if(a.v.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),Nw(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),Nw(a,a.l.getValue()+5));break;case "Home":a.l&&Nw(a,a.D.Va().start);break;case "End":a.l&&Nw(a,a.D.Va().end);break;case " ":e&&
|
|
960
|
+
(a.o?kw(a):lw(a))}});a.h.m(a.j,"keyup",function(b){a.Aa["delete"](b.key)});a.h.m(a.wb,"ad-started",function(b){a.o=b.ad;a.tf()});a.h.m(a.wb,"ad-stopped",function(){a.o=null;a.We()});screen.orientation&&a.h.m(screen.orientation,"change",function(){return K(function(b){return z(b,Ow(a),0)})});a.h.m(document,"fullscreenchange",function(){a.o&&a.o.resize(a.B.offsetWidth,a.B.offsetHeight)})}
|
|
961
|
+
function Ow(a){return K(function(b){return a.g&&0!=a.g.readyState&&!a.A.ua()&&a.v.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?z(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?z(b,document.exitFullscreen(),0):b.C(0):b["return"]()})}
|
|
962
|
+
function Jw(a,b){"mousemove"==b.type&&(a.i.classList.remove("shaka-keyboard-navigation"),vw(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.K=Date.now():a.K+1E3<Date.now()&&(a.K=null);a.K&&"mousemove"==b.type||(a.j.style.cursor="",a.Eb=!0,a.I.stop(),a.Nb()||(ww(a),vw(a)),a.ia.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.K||a.ia.T(3))}function Pw(a){return window.matchMedia("hover: hover").matches?a.Zb.some(function(b){return b.matches(":hover")}):!1}
|
|
963
|
+
function vw(a){var b=a.o?a.o.isPaused():!1,c=a.g.paused&&!a.ha,d=a.i.classList.contains("shaka-keyboard-navigation");b||!a.o&&c||a.Eb||d||Pw(a)?(ww(a),a.i.setAttribute("shown","true"),a.za.stop()):a.za.T(a.v.fadeDelay)}function zw(a){var b=a.A.ua();a.dispatchEvent(new N("caststatuschanged",(new Map).set("newStatus",b)));b?a.i.setAttribute("casting","true"):a.i.removeAttribute("casting")}q.Nb=function(){return this.ba?null!=this.i.getAttribute("shown")||null!=this.i.getAttribute("casting"):!1};
|
|
964
|
+
function Nw(a,b){a.l.changeTo(b);a.Nb()&&ww(a)}function ww(a){if(a.l)if(a.l.setValue(a.g.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new N("timeandseekrangeupdated"))}
|
|
965
|
+
function Mw(a,b){a.Aa.add(b.key);var c=a.Zc();"Tab"==b.key&&(a.i.classList.add("shaka-keyboard-navigation"),vw(a),a.h.m(window,"mousedown",function(){a.h.Qa(window,"mousedown")}));"Escape"==b.key&&a.I.Ia();c&&a.Aa.has("Tab")&&Qw(a,b)}
|
|
966
|
+
function Qw(a,b){var c=a.H.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.Aa.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
967
|
+
function xw(){var a=new ac("en");a.ka("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
|
|
968
968
|
["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
|
|
969
969
|
["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
|
|
970
970
|
["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
|
|
@@ -1022,67 +1022,67 @@ new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD
|
|
|
1022
1022
|
"\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.ka("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY",
|
|
1023
1023
|
"\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN",
|
|
1024
1024
|
"\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u89e3\u6790\u5ea6"],
|
|
1025
|
-
["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Ke(navigator.languages||[]);return a}
|
|
1026
|
-
Y.prototype.toggleFullScreen=Y.prototype.Be;Y.prototype.hideSettingsMenus=Y.prototype.
|
|
1027
|
-
Y.prototype.getControlsContainer=Y.prototype.Sf;Y.prototype.getLocalPlayer=Y.prototype.Xf;Y.prototype.getPlayer=Y.prototype.
|
|
1028
|
-
Y.prototype.loadComplete=Y.prototype.sg;Y.prototype.allowCast=Y.prototype.Df;Y.registerSeekBar=function(a){
|
|
1029
|
-
this.j.appendChild(this.g);
|
|
1030
|
-
!1)});this.eventManager.m(this.adManager,"ad-stopped",function(){X(c.h,!0)});this.eventManager.m(this.controls,"submenuopen",function(){X(c.g,!1)});this.eventManager.m(this.g,"touchstart",function(f){c.controls.rf(Date.now());f.stopPropagation()});this.eventManager.m(this.h,"click",function(){
|
|
1031
|
-
function
|
|
1032
|
-
function
|
|
1033
|
-
this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g)
|
|
1034
|
-
|
|
1035
|
-
q.getConfiguration=function(){var a=
|
|
1036
|
-
function
|
|
1037
|
-
level:"rgb(255, 255, 255)"},trackLabelFormat:
|
|
1038
|
-
function
|
|
1039
|
-
case 4:if(k.done){t.C(2);break}l=k.value;if(l.ui){t.C(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));
|
|
1040
|
-
function
|
|
1041
|
-
function
|
|
1042
|
-
k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;
|
|
1043
|
-
|
|
1044
|
-
n.Xa.forced,v=f.resolve(
|
|
1045
|
-
break;case 3:n.Xa.label?C.textContent=n.Xa.label:(
|
|
1046
|
-
function
|
|
1047
|
-
function
|
|
1048
|
-
function
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
function
|
|
1052
|
-
this.g.appendChild(d);this.parent.appendChild(this.g);
|
|
1053
|
-
function
|
|
1054
|
-
function
|
|
1055
|
-
function
|
|
1056
|
-
c.controls.Be(),0)})});this.eventManager.m(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";
|
|
1057
|
-
this.g.appendChild(d);
|
|
1058
|
-
function
|
|
1059
|
-
function(){
|
|
1060
|
-
function
|
|
1061
|
-
d.appendChild(this.h);this.g.appendChild(d);
|
|
1025
|
+
["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Ke(navigator.languages||[]);return a}M("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Nb;Y.prototype.hideAdUI=Y.prototype.We;Y.prototype.showAdUI=Y.prototype.tf;
|
|
1026
|
+
Y.prototype.toggleFullScreen=Y.prototype.Be;Y.prototype.hideSettingsMenus=Y.prototype.Hc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Zc;Y.prototype.setLastTouchEventTime=Y.prototype.rf;Y.prototype.getDisplayTime=Y.prototype.Te;Y.prototype.isCastAllowed=Y.prototype.pg;Y.prototype.setSeeking=Y.prototype.we;Y.prototype.isSeeking=Y.prototype.rg;Y.prototype.getConfig=Y.prototype.Qf;Y.prototype.getClientSideAdContainer=Y.prototype.Pf;Y.prototype.getServerSideAdContainer=Y.prototype.hg;
|
|
1027
|
+
Y.prototype.getControlsContainer=Y.prototype.Sf;Y.prototype.getLocalPlayer=Y.prototype.Xf;Y.prototype.getPlayer=Y.prototype.cc;Y.prototype.getLocalVideo=Y.prototype.Yf;Y.prototype.getVideo=Y.prototype.zb;Y.prototype.getVideoContainer=Y.prototype.ng;Y.prototype.getLocalization=Y.prototype.Zf;Y.prototype.getCastProxy=Y.prototype.Of;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.qf;Y.prototype.setEnabledShakaControls=Y.prototype.re;Y.prototype.configure=Y.prototype.configure;
|
|
1028
|
+
Y.prototype.loadComplete=Y.prototype.sg;Y.prototype.allowCast=Y.prototype.Df;Y.registerSeekBar=function(a){Lw=a};Y.registerElement=Bw;Y.prototype.destroy=Y.prototype.destroy;var Cw=new Map,Lw=new uw;function Rw(a,b){aw.call(this,a,b);var c=this;this.v=this.controls.v;this.j=this.controls.i;this.i=[];this.h=Vj();this.h.classList.add("shaka-overflow-menu-button");this.h.classList.add("shaka-no-propagation");this.h.classList.add("material-icons-round");this.h.textContent="more_vert";this.parent.appendChild(this.h);this.g=T("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");
|
|
1029
|
+
this.j.appendChild(this.g);Sw(this);for(var d=r(this.controls.j.getElementsByClassName("shaka-back-to-overflow-button")),e=d.next();!e.done;e=d.next())this.eventManager.m(e.value,"click",function(){c.controls.Hc();X(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();vw(c.controls)});this.eventManager.m(this.localization,"locale-updated",function(){Tw(c)});this.eventManager.m(this.localization,"locale-changed",function(){Tw(c)});this.eventManager.m(this.adManager,"ad-started",function(){X(c.h,
|
|
1030
|
+
!1)});this.eventManager.m(this.adManager,"ad-stopped",function(){X(c.h,!0)});this.eventManager.m(this.controls,"submenuopen",function(){X(c.g,!1)});this.eventManager.m(this.g,"touchstart",function(f){c.controls.rf(Date.now());f.stopPropagation()});this.eventManager.m(this.h,"click",function(){Uw(c)});Tw(this);this.ad&&X(this.h,!1)}u(Rw,aw);Rw.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];aw.prototype.release.call(this)};
|
|
1031
|
+
function Vw(a,b){Ww.set(a,b)}function Sw(a){for(var b=r(a.v.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Ww.get(c)?(c=Ww.get(c),a.i.push(c.create(a.g,a.controls))):Pa("Unrecognized overflow menu element requested:",c)}function Uw(a){if(a.controls.Zc())a.controls.Hc();else{X(a.g,!0);vw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};gb(a.g.childNodes,b)&&hb(a.g.childNodes,b)[0].focus()}}
|
|
1032
|
+
function Tw(a){a.h.setAttribute("aria-label",a.localization.resolve("MORE_SETTINGS"))}M("shaka.ui.OverflowMenu",Rw);Rw.registerElement=Vw;function Xw(){}Xw.prototype.create=function(a,b){return new Rw(a,b)};Bw("overflow_menu",new Xw);var Ww=new Map;function Yw(a,b){aw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-airplay-button");this.g.setAttribute("aria-pressed","false");this.h=T("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=T("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=T("span");d.appendChild(this.j);this.i=T("span");
|
|
1033
|
+
this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);Zw(this);$w(this);this.eventManager.m(this.localization,"locale-updated",function(){Zw(c)});this.eventManager.m(this.localization,"locale-changed",function(){Zw(c)});this.eventManager.m(this.g,"click",function(){c.controls.zb().webkitShowPlaybackTargetPicker()});d=this.controls.zb();this.eventManager.m(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.Ue()==
|
|
1034
|
+
zl;X(c.g,"available"==e.availability&&f)});this.eventManager.m(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){$w(c)})}u(Yw,aw);function $w(a){var b=a.controls.zb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Zw(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}M("shaka.ui.AirPlayButton",Yw);function ax(){}ax.prototype.create=function(a,b){return new Yw(a,b)};Vw("airplay",new ax);Bw("airplay",new ax);function bx(a,b,c){this.h=a;this.v=cx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Sd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.v);this.configure({});c.controls||a.ze(b);b.ui=this;c.ui=this}q=bx.prototype;q.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?z(b,a.g.destroy(),2):b.C(2);if(4!=b.g)return a.g=null,a.h?z(b,a.h.destroy(),4):b.C(4);a.h=null;A(b)})};q.Sd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Sc()&&1<navigator.maxTouchPoints};
|
|
1035
|
+
q.getConfiguration=function(){var a=cx(this);gk(a,this.v,cx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hk(a,b));gk(this.v,a,cx(this),{},"");this.v.castReceiverAppId&&!this.v.overflowMenuButtons.includes("cast")&&this.v.overflowMenuButtons.push("cast");this.g.configure(this.v);this.g.dispatchEvent(new N("uiupdated"))};q.Rf=function(){return this.g};q.Rg=function(a){this.g.re(a)};
|
|
1036
|
+
function cx(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),addSeekBar:!0,addBigPlayButton:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
|
|
1037
|
+
level:"rgb(255, 255, 255)"},trackLabelFormat:dx,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Sd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1038
|
+
function ex(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return K(function(t){switch(t.g){case 1:Vs();if(!Mk())return fx("shaka-ui-load-failed",gx),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.C(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),hx(f,e));t.C(2);break}h=r(a);k=h.next();
|
|
1039
|
+
case 4:if(k.done){t.C(2);break}l=k.value;if(l.ui){t.C(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));F(t,7);return z(t,hx(l,m),9);case 9:va(t,5);break;case 7:return H(t),fx("shaka-ui-load-failed",ix),t["return"]();case 5:k=h.next();t.C(4);break;case 2:fx("shaka-ui-loaded"),A(t)}})}
|
|
1040
|
+
function fx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
|
|
1041
|
+
function hx(a,b){var c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:c=new V(b);d=new bx(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.qf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
|
|
1042
|
+
k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;F(m,5);return z(m,d.g.cc().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:H(m);case 3:k=h.next(),m.C(2)}})}M("shaka.ui.Overlay",bx);bx.prototype.setEnabled=bx.prototype.Rg;bx.prototype.getControls=bx.prototype.Rf;bx.prototype.configure=bx.prototype.configure;bx.prototype.getConfiguration=bx.prototype.getConfiguration;bx.prototype.isMobile=bx.prototype.Sd;bx.prototype.destroy=bx.prototype.destroy;var dx=0;
|
|
1043
|
+
bx.TrackLabelFormat={LANGUAGE:dx,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var gx=0,ix=1;bx.FailReasonCode={NO_BROWSER_SUPPORT:gx,PLAYER_FAILED_TO_LOAD:ix};"complete"==document.readyState?K(function(a){if(1==a.g)return z(a,Promise.resolve(),2);ex();A(a)}):window.addEventListener("load",ex);function jx(a,b,c,d,e,f,g){function h(D,B){return D+": "+B}function k(D){return"variant"==D.type?D.audioRoles?D.audioRoles.join(", "):void 0:D.roles.join(", ")}var l=a.find(function(D){return 1==D.active}),m=bw(b);Wj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Xa:n.Xa},p=a.next()){n.Xa=p.value;p=n.Xa.language;var t=
|
|
1044
|
+
n.Xa.forced,v=f.resolve(ec.zf),x=k(n.Xa),w=h(p,x);if(!m.has(w)){m.add(w);var y=Vj();y.addEventListener("click",function(D){return function(){c(D.Xa)}}(n));var C=T("span");y.appendChild(C);C.textContent=kx(p,f);switch(g){case dx:t&&(C.textContent+=" ("+v+")");break;case 1:x?C.textContent=x:(Pa("Track #"+n.Xa.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+v+")");break;case 2:x&&(C.textContent+=": "+x);t&&(C.textContent+=" ("+v+")");
|
|
1045
|
+
break;case 3:n.Xa.label?C.textContent=n.Xa.label:(Pa("Track #"+n.Xa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&w==l&&(y.appendChild(ew()),C.classList.add("shaka-chosen-item"),y.setAttribute("aria-selected","true"),e.textContent=C.textContent);b.appendChild(y)}}}
|
|
1046
|
+
function kx(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Yb(a);return a in Xv?Xv[a].s:c in Xv?Xv[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function lx(a,b,c){aw.call(this,a,b);var d=this;mx(this,c);nx(this);this.eventManager.m(this.button,"click",function(){d.controls.dispatchEvent(new N("submenuopen"));X(d.menu,!0);dw(d.menu)})}u(lx,aw);
|
|
1047
|
+
function mx(a,b){a.button=Vj();a.icon=T("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=T("label");c.classList.add("shaka-overflow-button-label");a.nameSpan=T("span");c.appendChild(a.nameSpan);a.currentSelection=T("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
|
|
1048
|
+
function nx(a){a.menu=T("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Vj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);var b=T("i");b.classList.add("material-icons-round");b.textContent="arrow_back";a.backButton.appendChild(b);a.backSpan=T("span");a.backButton.appendChild(a.backSpan);a.controls.i.appendChild(a.menu)}
|
|
1049
|
+
M("shaka.ui.SettingsMenu",lx);function ox(a,b){lx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.menu.classList.add("shaka-audio-languages");this.eventManager.m(this.localization,"locale-updated",function(){px(c)});this.eventManager.m(this.localization,"locale-changed",function(){px(c)});this.eventManager.m(this.player,"trackschanged",function(){var d=0<c.player.Jb().length;X(c.button,d);qx(c)});this.eventManager.m(this.player,"variantchanged",function(){qx(c)});px(this);qx(this)}
|
|
1050
|
+
u(ox,lx);function qx(a){var b=a.player.Jb();jx(b,a.menu,function(c){a.player.wd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.v.trackLabelFormat);dw(a.menu);a.controls.dispatchEvent(new N("languageselectionupdated"))}
|
|
1051
|
+
function px(a){a.backButton.setAttribute("aria-label",a.localization.resolve("BACK"));a.button.setAttribute("aria-label",a.localization.resolve("LANGUAGE"));a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}M("shaka.ui.AudioLanguageSelection",ox);function rx(){}rx.prototype.create=function(a,b){return new ox(a,b)};Vw("language",new rx);function sx(a,b){aw.call(this,a,b);var c=this;this.h=this.controls.A;this.g=Vj();this.g.classList.add("shaka-cast-button");this.g.setAttribute("aria-pressed","false");this.i=T("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=T("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=T("span");d.appendChild(this.l);this.j=T("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
|
|
1052
|
+
this.g.appendChild(d);this.parent.appendChild(this.g);tx(this);ux(this);this.eventManager.m(this.localization,"locale-updated",function(){tx(c)});this.eventManager.m(this.localization,"locale-changed",function(){tx(c)});this.eventManager.m(this.g,"click",function(){vx(c)});this.eventManager.m(this.controls,"caststatuschanged",function(){ux(c)})}u(sx,aw);
|
|
1053
|
+
function vx(a){var b;K(function(c){if(1==c.g){if(a.h.ua())return a.h.uf(),c.C(0);F(c,3);a.g.disabled=!0;return z(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=H(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new N("error",(new Map).set("detail",b)));A(c)})}function ux(a){var b=a.h.He()&&a.controls.xb,c=a.h.ua();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(c?a.g.setAttribute("aria-pressed","true"):a.g.setAttribute("aria-pressed","false"));wx(a)}
|
|
1054
|
+
function wx(a){a.j.textContent=a.h.ua()?a.h.td():a.localization.resolve("OFF")}function tx(a){a.g.setAttribute("aria-label",a.localization.resolve("CAST"));a.l.textContent=a.localization.resolve("CAST");wx(a)}M("shaka.ui.CastButton",sx);function xx(){}xx.prototype.create=function(a,b){return new sx(a,b)};Vw("cast",new xx);Bw("cast",new xx);function yx(a,b){aw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.parent.appendChild(this.g);zx(this);this.eventManager.m(this.localization,"locale-updated",function(){zx(c)});this.eventManager.m(this.localization,"locale-changed",function(){zx(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Dc();c.player.De(0>d||4<d?1:2*d)}})}u(yx,aw);
|
|
1055
|
+
function zx(a){a.g.setAttribute("aria-label",a.localization.resolve("FAST_FORWARD"))}M("shaka.ui.FastForwardButton",yx);function Ax(){}Ax.prototype.create=function(a,b){return new yx(a,b)};Bw("fast_forward",new Ax);function Bx(a,b){aw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Cx(this);this.eventManager.m(this.localization,"locale-updated",function(){Cx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Cx(c)});this.eventManager.m(this.g,"click",function(){return K(function(d){return z(d,
|
|
1056
|
+
c.controls.Be(),0)})});this.eventManager.m(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Cx(c)})}u(Bx,aw);function Cx(a){a.g.setAttribute("aria-label",a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN"))}M("shaka.ui.FullscreenButton",Bx);function Dx(){}Dx.prototype.create=function(a,b){return new Bx(a,b)};Bw("fullscreen",new Dx);function Ex(a,b){aw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-loop-button");this.i=T("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=T("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=T("span");this.l.textContent=this.localization.resolve("LOOP");d.appendChild(this.l);this.j=T("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
|
|
1057
|
+
this.g.appendChild(d);Fx(this);this.parent.appendChild(this.g);this.eventManager.m(this.localization,"locale-updated",function(){Fx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Fx(c)});this.eventManager.m(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Ia();c.h.oa(1)});this.o=this.video.loop;this.h=new Q(function(){c.o!=c.video.loop&&(Fx(c),c.o=c.video.loop)});this.h.oa(1)}u(Ex,aw);Ex.prototype.release=function(){this.h.stop();this.h=null;aw.prototype.release.call(this)};
|
|
1058
|
+
function Fx(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.setAttribute("aria-label",a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE"))}M("shaka.ui.LoopButton",Ex);function Gx(){}Gx.prototype.create=function(a,b){return new Ex(a,b)};Vw("loop",new Gx);Bw("loop",new Gx);function Hx(a,b){aw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.parent.appendChild(this.g);Ix(this);Jx(this);this.eventManager.m(this.localization,"locale-updated",function(){Ix(c)});this.eventManager.m(this.localization,"locale-changed",function(){Ix(c)});this.eventManager.m(this.g,"click",function(){c.ad?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});this.eventManager.m(this.video,"volumechange",
|
|
1059
|
+
function(){Ix(c);Jx(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){Ix(c);Jx(c)});this.eventManager.m(this.adManager,"ad-muted",function(){Ix(c);Jx(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null;Ix(c);Jx(c)})}u(Hx,aw);function Ix(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.setAttribute("aria-label",a.localization.resolve(b))}
|
|
1060
|
+
function Jx(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}M("shaka.ui.MuteButton",Hx);function Kx(){}Kx.prototype.create=function(a,b){return new Hx(a,b)};Bw("mute",new Kx);function Lx(a,b){aw.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Vj();this.g.classList.add("shaka-pip-button");this.i=T("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=T("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=T("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);this.h=T("span");this.h.classList.add("shaka-current-selection-span");
|
|
1061
|
+
d.appendChild(this.h);this.g.appendChild(d);Mx(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.m(this.localization,"locale-updated",function(){Mx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Mx(c)});this.eventManager.m(this.g,"click",function(){Nx(c)});this.eventManager.m(this.l,"enterpictureinpicture",function(){c.i.textContent="branding_watermark";c.g.setAttribute("aria-label",c.localization.resolve("EXIT_PICTURE_IN_PICTURE"));
|
|
1062
1062
|
c.h.textContent=c.localization.resolve("ON")});this.eventManager.m(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.setAttribute("aria-label",c.localization.resolve("ENTER_PICTURE_IN_PICTURE"));c.h.textContent=c.localization.resolve("OFF")});this.eventManager.m(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&
|
|
1063
|
-
X(c.g,!0)});this.eventManager.m(this.player,"trackschanged",function(){
|
|
1064
|
-
function
|
|
1065
|
-
function
|
|
1066
|
-
|
|
1067
|
-
function
|
|
1068
|
-
function
|
|
1069
|
-
!1):(
|
|
1070
|
-
|
|
1071
|
-
function
|
|
1072
|
-
{
|
|
1073
|
-
a.eventManager.m(e,"click",function(){a.player.configure({abr:{enabled:!0}})
|
|
1074
|
-
function
|
|
1075
|
-
function
|
|
1076
|
-
function
|
|
1077
|
-
d:(c.i.stop(),X(c.h,!1))});this.eventManager.m(this.localization,"locale-updated",function(){
|
|
1078
|
-
"click",function(){c.ad.skip()});this.ad&&
|
|
1079
|
-
|
|
1080
|
-
function(){
|
|
1081
|
-
function
|
|
1082
|
-
function
|
|
1083
|
-
a.controls.dispatchEvent(new N("captionselectionupdated"))}function
|
|
1084
|
-
function
|
|
1085
|
-
this.eventManager.m(this.localization,"locale-changed",function(){return
|
|
1086
|
-
function
|
|
1063
|
+
X(c.g,!0)});this.eventManager.m(this.player,"trackschanged",function(){Ox(c)})}u(Lx,aw);function Nx(a){var b;K(function(c){if(1==c.g)return F(c,2),document.pictureInPictureElement?z(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),z(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=H(c);a.controls.dispatchEvent(new N("error",(new Map).set("detail",b)));A(c)})}
|
|
1064
|
+
function Mx(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.setAttribute("aria-label",a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE"));a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
|
|
1065
|
+
function Ox(a){K(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.Ye())return X(a.g,!0),b.C(0);X(a.g,!1);return document.pictureInPictureElement?z(b,document.exitPictureInPicture(),0):b.C(0)})}M("shaka.ui.PipButton",Lx);function Px(){}Px.prototype.create=function(a,b){return new Lx(a,b)};Vw("picture_in_picture",new Px);Bw("picture_in_picture",new Px);function Qx(a,b){lx.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.eventManager.m(this.localization,"locale-updated",function(){Rx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Rx(c)});this.eventManager.m(this.player,"ratechange",function(){Sx(c,c.player.Dc())});this.g=new Map([["0.5x",.5],["0.75x",.75],["1x",1],["1.25x",1.25],["1.5x",1.5],["1.75x",1.75],["2x",2]]);Rx(this);
|
|
1066
|
+
Tx(this);Sx(this,this.player.Dc())}u(Qx,lx);function Rx(a){a.backButton.setAttribute("aria-label",a.localization.resolve("BACK"));a.button.setAttribute("aria-label",a.localization.resolve("PLAYBACK_RATE"));a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
|
|
1067
|
+
function Sx(a,b){var c=cw(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(ew()),d.setAttribute("aria-selected","true"),c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
|
|
1068
|
+
function Tx(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={sc:b.sc},d=c.next()){b.sc=d.value;d=Vj();var e=T("span");e.textContent=b.sc;d.appendChild(e);a.eventManager.m(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.sc);a.video.defaultPlaybackRate=a.g.get(f.sc)}}(b));a.menu.appendChild(d)}dw(a.menu)}M("shaka.ui.PlaybackRateSelection",Qx);function Ux(){}Ux.prototype.create=function(a,b){return new Qx(a,b)};Vw("playback_rate",new Ux);function Vx(a,b){aw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-current-time");Wx(this,"0:00");this.parent.appendChild(this.g);this.eventManager.m(this.g,"click",function(){c.player.Z()&&(c.video.currentTime=c.player.Va().end)});this.eventManager.m(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.ha,e=c.controls.Te(),f=c.video.duration,g=c.player.Va(),h=g.end-g.start;c.player.Z()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Wx(c,"- "+fw(e,f)),c.g.disabled=
|
|
1069
|
+
!1):(Wx(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=fw(e,d),f&&(e+=" / "+fw(f,d)),Wx(c,e),c.g.disabled=!0)});this.eventManager.m(this.player,"trackschanged",function(){c.player.Z()&&c.g.setAttribute("aria-label",c.localization.resolve("SKIP_TO_LIVE"))})}u(Vx,aw);function Wx(a,b){b!=a.g.textContent&&(a.g.textContent=b)}M("shaka.ui.PresentationTimeTracker",Vx);function Xx(){}Xx.prototype.create=function(a,b){return new Vx(a,b)};Bw("time_and_duration",new Xx);function Yx(a,b){lx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.menu.classList.add("shaka-resolutions");this.eventManager.m(this.localization,"locale-updated",function(){Zx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Zx(c)});this.eventManager.m(this.player,"variantchanged",function(){$x(c)});this.eventManager.m(this.player,"trackschanged",function(){$x(c)});this.eventManager.m(this.player,"abrstatuschanged",function(){$x(c)});
|
|
1070
|
+
$x(this);Zx(this)}u(Yx,lx);
|
|
1071
|
+
function $x(a){var b=a.player.Jb();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=bw(a.menu);Wj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
|
|
1072
|
+
{vc:e.vc},g=f.next()){e.vc=g.value;g=Vj();g.classList.add("explicit-resolution");a.eventManager.m(g,"click",function(k){return function(){var l=k.vc;a.player.configure({abr:{enabled:!1}});a.player.pe(l,a.controls.v.clearBufferOnQualityChange)}}(e));var h=T("span");h.textContent=e.vc.height+"p";g.appendChild(h);d||e.vc!=c||(g.setAttribute("aria-selected","true"),g.appendChild(ew()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Vj();e.classList.add("shaka-enable-abr-button");
|
|
1073
|
+
a.eventManager.m(e,"click",function(){a.player.configure({abr:{enabled:!0}});$x(a)});a.g=T("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.setAttribute("aria-selected","true"),e.appendChild(ew()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);dw(a.menu);a.controls.dispatchEvent(new N("resolutionselectionupdated"))}}
|
|
1074
|
+
function Zx(a){a.button.setAttribute("aria-label",a.localization.resolve("RESOLUTION"));a.backButton.setAttribute("aria-label",a.localization.resolve("RESOLUTION"));a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}M("shaka.ui.ResolutionSelection",Yx);
|
|
1075
|
+
function ay(){}ay.prototype.create=function(a,b){return new Yx(a,b)};Vw("quality",new ay);function by(a,b){aw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);cy(this);this.eventManager.m(this.localization,"locale-updated",function(){cy(c)});this.eventManager.m(this.localization,"locale-changed",function(){cy(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Dc();c.player.De(0<d||-4>d?-1:2*d)}})}u(by,aw);
|
|
1076
|
+
function cy(a){a.g.setAttribute("aria-label",a.localization.resolve("REWIND"))}M("shaka.ui.RewindButton",by);function dy(){}dy.prototype.create=function(a,b){return new by(a,b)};Bw("rewind",new dy);function ey(a,b){aw.call(this,a,b);var c=this;this.j=T("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=T("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=Vj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);fy(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1077
|
+
d:(c.i.stop(),X(c.h,!1))});this.eventManager.m(this.localization,"locale-updated",function(){fy(c)});this.eventManager.m(this.localization,"locale-changed",function(){fy(c)});this.eventManager.m(this.adManager,"ad-started",function(){gy(c)});this.eventManager.m(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.m(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.m(this.g,
|
|
1078
|
+
"click",function(){c.ad.skip()});this.ad&&gy(this)}u(ey,aw);ey.prototype.release=function(){this.i.stop();this.i=null;aw.prototype.release.call(this)};function fy(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function gy(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.Ia(),a.i.oa(.5))}M("shaka.ui.SkipAdButton",ey);function hy(a,b){jw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}u(hy,jw);hy.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};hy.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
|
|
1079
|
+
M("shaka.ui.SmallPlayButton",hy);function iy(){}iy.prototype.create=function(a,b){return new hy(a,b)};Bw("play_pause",new iy);function jy(a,b){aw.call(this,a,b);var c=T("div");c.classList.add("shaka-spacer");c.setAttribute("aria-hidden",!0);this.parent.appendChild(c)}u(jy,aw);M("shaka.ui.Spacer",jy);function ky(){}ky.prototype.create=function(a,b){return new jy(a,b)};Bw("spacer",new ky);function ly(a,b){lx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Ob()?this.button.setAttribute("aria-pressed","true"):this.button.setAttribute("aria-pressed","false");my(this);this.eventManager.m(this.localization,"locale-updated",function(){ny(c);oy(c)});this.eventManager.m(this.localization,"locale-changed",function(){ny(c);oy(c)});this.eventManager.m(this.player,"texttrackvisibility",
|
|
1080
|
+
function(){py(c);oy(c)});this.eventManager.m(this.player,"textchanged",function(){oy(c)});this.eventManager.m(this.player,"trackschanged",function(){qy(c)});py(this);ny(this);oy(this);qy(this)}u(ly,lx);function my(a){var b=Vj();b.setAttribute("aria-selected","true");a.menu.appendChild(b);b.appendChild(ew());a.g=T("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1081
|
+
function py(a){a.player.Ob()?(a.icon.classList.add("shaka-captions-on"),a.icon.classList.remove("shaka-captions-off"),a.button.setAttribute("aria-pressed","true")):(a.icon.classList.add("shaka-captions-off"),a.icon.classList.remove("shaka-captions-on"),a.button.setAttribute("aria-pressed","false"));a.controls.dispatchEvent(new N("captionselectionupdated"))}
|
|
1082
|
+
function oy(a){var b=a.player.qb();jx(b,a.menu,function(c){return ry(a,c)},a.player.Ob(),a.currentSelection,a.localization,a.controls.v.trackLabelFormat);b=Vj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.m(b,"click",function(){a.player.ye(!1);oy(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ob()||(b.setAttribute("aria-selected","true"),b.appendChild(ew()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));dw(a.menu);
|
|
1083
|
+
a.controls.dispatchEvent(new N("captionselectionupdated"))}function ry(a,b){return K(function(c){a.player.oe(b);return z(c,a.player.ye(!0),0)})}function ny(a){a.button.setAttribute("aria-label",a.localization.resolve("CAPTIONS"));a.backButton.setAttribute("aria-label",a.localization.resolve("BACK"));a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
|
|
1084
|
+
function qy(a){var b=0<a.player.qb().length;X(a.button,b);oy(a)}M("shaka.ui.TextSelection",ly);function sy(){}sy.prototype.create=function(a,b){return new ly(a,b)};Vw("captions",new sy);function ty(a,b){nw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.v=this.controls.v;this.eventManager.m(this.video,"volumechange",function(){return uy(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){return vy(c)});this.eventManager.m(this.adManager,"ad-muted",function(){return vy(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){return uy(c)});this.eventManager.m(this.localization,"locale-updated",function(){return wy(c)});
|
|
1085
|
+
this.eventManager.m(this.localization,"locale-changed",function(){return wy(c)});uy(this);wy(this);if(this.ad)this.onChange()}u(ty,nw);ty.prototype.onChange=function(){this.ad?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function uy(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);xy(a)}function vy(a){var b=a.ad.getVolume();a.setValue(b);xy(a)}
|
|
1086
|
+
function xy(a){var b=a.v.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function wy(a){a.bar.setAttribute("aria-label",a.localization.resolve("VOLUME"))}M("shaka.ui.VolumeBar",ty);function yy(){}yy.prototype.create=function(a,b){return new ty(a,b)};Bw("volume",new yy);}).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})();
|
|
1087
1087
|
|
|
1088
1088
|
//# sourceMappingURL=shaka-player.ui.map
|