shaka-player 3.0.14 → 3.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +2 -0
- package/CHANGELOG.md +39 -0
- package/CONTRIBUTORS +2 -0
- package/build/generateExterns.js +1 -1
- package/demo/common/assets.js +1 -1
- package/dist/controls.css +1 -1
- package/dist/demo.compiled.debug.js +1 -1
- package/dist/demo.compiled.js +1 -1
- package/dist/deps.js +1 -1
- package/dist/locales.js +34 -34
- package/dist/receiver.compiled.debug.js +1 -1
- package/dist/receiver.compiled.js +1 -1
- package/dist/shaka-player.compiled.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.externs.js +1 -1
- package/dist/shaka-player.compiled.debug.js +181 -178
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +1 -1
- package/dist/shaka-player.compiled.js +688 -686
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +1 -1
- package/dist/shaka-player.ui.debug.d.ts +1 -1
- package/dist/shaka-player.ui.debug.externs.js +3 -3
- package/dist/shaka-player.ui.debug.js +169 -166
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +3 -3
- package/dist/shaka-player.ui.js +815 -813
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/fairplay.md +1 -1
- package/karma.conf.js +1 -0
- package/lib/ads/client_side_ad_manager.js +46 -86
- package/lib/ads/server_side_ad_manager.js +7 -10
- package/lib/cast/cast_proxy.js +3 -2
- package/lib/cast/cast_receiver.js +6 -2
- package/lib/cast/cast_sender.js +2 -2
- package/lib/dash/dash_parser.js +52 -0
- package/lib/dash/segment_list.js +1 -1
- package/lib/dash/segment_template.js +1 -1
- package/lib/hls/hls_parser.js +25 -10
- package/lib/media/drm_engine.js +7 -0
- package/lib/media/gap_jumping_controller.js +4 -2
- package/lib/media/streaming_engine.js +2 -1
- package/lib/net/networking_engine.js +2 -1
- package/lib/player.js +18 -17
- package/lib/polyfill/patchedmediakeys_apple.js +4 -4
- package/lib/polyfill/patchedmediakeys_ms.js +4 -4
- package/lib/polyfill/patchedmediakeys_webkit.js +4 -4
- package/lib/text/mp4_ttml_parser.js +3 -0
- package/lib/text/ttml_text_parser.js +5 -0
- package/lib/text/ui_text_displayer.js +6 -1
- package/lib/util/fake_event.js +53 -7
- package/lib/util/periods.js +4 -1
- package/package.json +1 -1
- package/test/cast/cast_proxy_unit.js +12 -6
- package/test/cast/cast_utils_unit.js +1 -1
- package/test/dash/dash_parser_manifest_unit.js +73 -0
- package/test/hls/hls_parser_unit.js +5 -1
- package/test/media/drm_engine_unit.js +43 -0
- package/test/player_integration.js +38 -0
- package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
- package/test/test/assets/3675/dash_0.mpd +30 -0
- package/test/test/assets/3675/dash_1.mpd +30 -0
- package/test/test/assets/3675/dash_2.mpd +30 -0
- package/test/test/assets/3675/dash_3.mpd +30 -0
- package/test/test/assets/3675/dash_4.mpd +30 -0
- package/test/test/assets/3675/dash_5.mpd +26 -0
- package/test/test/assets/3675/init-stream0.m4s +0 -0
- package/test/test/util/fake_ad_manager.js +1 -1
- package/test/text/ttml_text_parser_unit.js +9 -0
- package/test/text/ui_text_displayer_unit.js +18 -0
- package/test/ui/localization_unit.js +15 -14
- package/ui/cast_button.js +2 -3
- package/ui/controls.js +4 -6
- package/ui/locales/ru.json +6 -6
- package/ui/localization.js +28 -51
- package/ui/pip_button.js +2 -3
|
@@ -15,47 +15,47 @@ ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
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 ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={a:!0},ma={};try{ma.__proto__=la;ka=ma.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var na=ja;
|
|
18
|
-
function oa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(na)na(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.
|
|
19
|
-
function ra(a,b){a.i={
|
|
20
|
-
function va(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.
|
|
21
|
-
function za(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.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ra(a.g,g),
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
18
|
+
function oa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(na)na(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Wf=b.prototype}function pa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function qa(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}pa.prototype.u=function(a){this.h=a};
|
|
19
|
+
function ra(a,b){a.i={Id:b,Pd:!0};a.g=a.m||a.j}pa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function t(a,b,c){a.g=c;return{value:b}}pa.prototype.B=function(a){this.g=a};function x(a){a.g=0}function y(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a){a.m=0;a.j=2}function ta(a,b){a.g=b;a.m=0}function C(a){a.m=0;var b=a.i.Id;a.i=null;return b}function ua(a){a.C=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function va(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Pd?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function xa(a){this.g=new pa;this.h=a}function ya(a,b){qa(a.g);var c=a.g.l;if(c)return za(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Aa(a)}
|
|
21
|
+
function za(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.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ra(a.g,g),Aa(a)}a.g.l=null;d.call(a.g,f);return Aa(a)}
|
|
22
|
+
function Aa(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ra(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Pd)throw b.Id;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
|
|
23
|
+
function Ba(a){this.next=function(b){qa(a.g);a.g.l?b=za(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Aa(a));return b};this["throw"]=function(b){qa(a.g);a.g.l?b=za(a,a.g.l["throw"],b,a.g.u):(ra(a.g,b),b=Aa(a));return b};this["return"]=function(b){return ya(a,b)};this[Symbol.iterator]=function(){return this}}function Ca(a,b){var c=new Ba(new xa(b));na&&a.prototype&&na(c,a.prototype);return c}
|
|
24
|
+
function Da(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 Da(new Ba(new xa(a)))}
|
|
25
25
|
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!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
|
-
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.
|
|
27
|
-
b.prototype.I=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.
|
|
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.P(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.m(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.S(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=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.N();this.C()};b.prototype.N=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
|
|
28
28
|
function(){if(this.s)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.C=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.
|
|
30
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!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).
|
|
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.
|
|
29
|
+
b.prototype.P=function(g){var h=this.j();g.oc(h.resolve,h.reject)};b.prototype.S=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,u){return"function"==typeof p?function(v){try{l(p(v))}catch(z){m(z)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.oc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.oc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
30
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!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).oc(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(z){p[v]=z;u--;0==u&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).oc(n(p.length-1),m),k=h.next();
|
|
31
|
+
while(!k.done)})};return b});function Ea(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(!Ea(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(!Ea(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ea(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
34
|
+
Ea(k,g)&&Ea(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ea(k,g)&&Ea(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
35
|
+
ea("Map",function(a){function b(){var h={};return h.Oa=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.Oa;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&&Ea(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,ea:p}}return{id:l,
|
|
36
|
+
list:m,index:-1,ea: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.ea?l.ea.value=k:(l.ea={next:this.g,Oa:this.g.Oa,head:this.g,key:h,value:k},l.list.push(l.ea),this.g.Oa.next=l.ea,this.g.Oa=l.ea,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ea&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ea.Oa.next=h.ea.next,h.ea.next.Oa=h.ea.Oa,
|
|
38
|
+
h.ea.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Oa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ea};e.prototype.get=function(h){return(h=d(this,h).ea)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
|
|
39
39
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
40
40
|
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
|
-
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function
|
|
43
|
-
function
|
|
44
|
-
ea("Array.prototype.find",function(a){return a?a:function(b,c){return
|
|
45
|
-
ea("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=
|
|
46
|
-
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}});ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==
|
|
42
|
+
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Fa(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 Fa(this,function(b){return b})}});
|
|
43
|
+
function Ga(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{da:e,ge:f}}return{da:-1,ge:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ga(this,b,c).da}});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;})})}});
|
|
44
|
+
ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ga(this,b,c).ge}});function Ha(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+""}
|
|
45
|
+
ea("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ha(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}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
|
|
46
|
+
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}});ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ha(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.values",function(a){return a?a:function(){return Fa(this,function(b,c){return c})}});
|
|
47
47
|
ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
|
|
48
|
-
var
|
|
49
|
-
function L(a,b){var c=a.split("."),d=
|
|
48
|
+
var Ia="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)Ea(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Ia});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ea(b,d)&&c.push(b[d]);return c}});var Ja=this||self;
|
|
49
|
+
function L(a,b){var c=a.split("."),d=Ja;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
|
-
function
|
|
56
|
-
var
|
|
57
|
-
function
|
|
58
|
-
|
|
55
|
+
function Ka(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function La(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 Ma(a){return a.g/(1-Math.pow(a.i,a.h))};function Na(){this.h=new Ka(2);this.i=new Ka(5);this.g=0}Na.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Ma(this.h),Ma(this.i))};function Oa(){}function Pa(){}function Sa(){}function Ta(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Ua.has(a)||(Ua.add(a),Sa.apply(Oa,ha(c)))}function Va(){}function Wa(){}function Xa(){}var Ua=new Set;if(window.console&&window.console.log.bind){var Ya={},Za=(Ya[1]=console.error.bind(console),Ya[2]=console.warn.bind(console),Ya[3]=console.info.bind(console),Ya[4]=console.log.bind(console),Ya[5]=console.debug.bind(console),Ya[6]=console.debug.bind(console),Ya);Sa=Za[2];Pa=Za[1]};function $a(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function ab(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
|
|
56
|
+
var db=function cb(a){var c;return Ca(cb,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?t(d,c,3):d.B(0);c++;return d.B(2)})},fb=function eb(a){var c,d,e,f,g,h;return Ca(eb,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.B(0):t(k,{da:c,We:d,item:e,next:void 0},0);h=g.value;return 0<=c?t(k,{da:c,item:e,We:d,next:h},5):k.B(5)}c++;d=e;e=h;g=f.next();return k.B(2)})};function gb(){}function hb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(ib(a)==ib(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=N(a),d=N(b),e=r(db(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function ib(a){return a instanceof ArrayBuffer?a:a.buffer}function jb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
57
|
+
function N(a,b,c){c=void 0===c?Infinity:c;return kb(a,void 0===b?0:b,c,Uint8Array)}function lb(a,b,c){c=void 0===c?Infinity:c;return kb(a,void 0===b?0:b,c,DataView)}function kb(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(ib(a),b,Math.min(b+Math.max(c,0),e)-b)}L("shaka.util.BufferUtils",gb);gb.toDataView=lb;gb.toUint8=N;gb.toArrayBuffer=jb;gb.equal=hb;function O(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}O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};L("shaka.util.Error",O);O.Severity={RECOVERABLE:1,CRITICAL:2};O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
58
|
+
O.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,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,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
|
|
59
59
|
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,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,
|
|
60
60
|
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,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,
|
|
61
61
|
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,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,
|
|
@@ -66,700 +66,702 @@ NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERAT
|
|
|
66
66
|
Copyright 2008 The Closure Library Authors
|
|
67
67
|
SPDX-License-Identifier: Apache-2.0
|
|
68
68
|
*/
|
|
69
|
-
var
|
|
69
|
+
var mb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
|
|
70
70
|
@license
|
|
71
71
|
Copyright 2006 The Closure Library Authors
|
|
72
72
|
SPDX-License-Identifier: Apache-2.0
|
|
73
73
|
*/
|
|
74
|
-
function
|
|
75
|
-
q.toString=function(){var a=[],b=this.
|
|
76
|
-
q.resolve=function(a){var b=this.clone();"data"===b.
|
|
77
|
-
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.
|
|
78
|
-
function
|
|
79
|
-
q.add=function(a,b){if(!this.
|
|
80
|
-
q.toString=function(){if(this.g)return this.g;if(!this.
|
|
81
|
-
var
|
|
82
|
-
function
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
-
function
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
function
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
-
function
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
function
|
|
95
|
-
R.prototype.stopPropagation=function(){};L("shaka.util.FakeEvent",R);function
|
|
96
|
-
function
|
|
97
|
-
function
|
|
98
|
-
q.request=function(a,b){var c=this,d=new
|
|
99
|
-
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g
|
|
100
|
-
function
|
|
101
|
-
function
|
|
102
|
-
if(1010==p.code)throw f;if(1==p.severity){var u=new R("retry",
|
|
103
|
-
function
|
|
104
|
-
|
|
105
|
-
function
|
|
106
|
-
q.
|
|
107
|
-
|
|
108
|
-
function
|
|
109
|
-
var
|
|
110
|
-
function
|
|
111
|
-
function
|
|
112
|
-
function
|
|
113
|
-
function
|
|
114
|
-
b);if(!d.size)return a.
|
|
115
|
-
|
|
116
|
-
return t(e,c,2)}
|
|
117
|
-
function
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
function
|
|
121
|
-
distinctiveIdentifier:"optional",persistentState:f,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=
|
|
122
|
-
m.distinctiveIdentifierRequired&&(e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");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}function
|
|
123
|
-
function
|
|
124
|
-
if(u!=k){I.B(6);break}y(I,8);return t(I,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:f=I.h;I.B(7);break;case 8:
|
|
125
|
-
a.u.add(F.contentType.toLowerCase());a.i=
|
|
126
|
-
function
|
|
74
|
+
function nb(a){var b;a instanceof nb?(ob(this,a.Aa),this.ib=a.ib,this.Ca=a.Ca,pb(this,a.zb),this.ra=a.ra,qb(this,a.g.clone()),this.Za=a.Za):a&&(b=String(a).match(mb))?(ob(this,b[1]||"",!0),this.ib=rb(b[2]||""),this.Ca=rb(b[3]||"",!0),pb(this,b[4]),this.ra=rb(b[5]||"",!0),qb(this,b[6]||"",!0),this.Za=rb(b[7]||"")):this.g=new sb(null)}q=nb.prototype;q.Aa="";q.ib="";q.Ca="";q.zb=null;q.ra="";q.Za="";
|
|
75
|
+
q.toString=function(){var a=[],b=this.Aa;b&&a.push(tb(b,ub,!0),":");if(b=this.Ca){a.push("//");var c=this.ib;c&&a.push(tb(c,ub,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.zb;null!=b&&a.push(":",String(b))}if(b=this.ra)this.Ca&&"/"!=b.charAt(0)&&a.push("/"),a.push(tb(b,"/"==b.charAt(0)?vb:wb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Za)&&a.push("#",tb(b,xb));return a.join("")};
|
|
76
|
+
q.resolve=function(a){var b=this.clone();"data"===b.Aa&&(b=new nb);var c=!!a.Aa;c?ob(b,a.Aa):c=!!a.ib;c?b.ib=a.ib:c=!!a.Ca;c?b.Ca=a.Ca:c=null!=a.zb;var d=a.ra;if(c)pb(b,a.zb);else if(c=!!a.ra){if("/"!=d.charAt(0))if(this.Ca&&!this.ra)d="/"+d;else{var e=b.ra.lastIndexOf("/");-1!=e&&(d=b.ra.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(""):".."==
|
|
77
|
+
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.ra=d:c=""!==a.g.toString();c?qb(b,a.g.clone()):c=!!a.Za;c&&(b.Za=a.Za);return b};q.clone=function(){return new nb(this)};function ob(a,b,c){a.Aa=c?rb(b,!0):b;a.Aa&&(a.Aa=a.Aa.replace(/:$/,""))}function pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.zb=b}else a.zb=null}function qb(a,b,c){b instanceof sb?a.g=b:(c||(b=tb(b,yb)),a.g=new sb(b))}
|
|
78
|
+
function rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function tb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,zb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function zb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ub=/[#\/\?@]/g,wb=/[#\?:]/g,vb=/[#\?]/g,yb=/[#\?@]/g,xb=/#/g;function sb(a){this.g=a||null}q=sb.prototype;q.oa=null;q.qc=null;
|
|
79
|
+
q.add=function(a,b){if(!this.oa&&(this.oa={},this.qc=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.oa.hasOwnProperty(a)&&this.oa[a])||(this.oa[a]=c=[]);c.push(b);this.qc++;return this};
|
|
80
|
+
q.toString=function(){if(this.g)return this.g;if(!this.oa)return"";var a=[],b;for(b in this.oa)for(var c=encodeURIComponent(b),d=this.oa[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 sb;a.g=this.g;if(this.oa){var b={},c;for(c in this.oa)b[c]=this.oa[c].concat();a.oa=b;a.qc=this.qc}return a};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){Sa([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){Pa([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 nb(d)});return a.map(function(d){return new nb(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,initData:b||[],keyIds:new Set}}
|
|
81
|
+
var Nb={Ka:"video",Wa:"audio",ha:"text",Cf:"image",uf:"application"};function Ob(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ob.prototype.resolve=function(){};Ob.prototype.reject=function(){};function Pb(a){this.h=a;this.g=void 0}Pb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Qb(){}function Rb(a){if(!a)return"";a=N(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=Sb(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new O(2,2,2004);}}function Tb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=lb(a);d=r(db(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Sb(c)}
|
|
82
|
+
function Ub(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=N(a);if(239==c[0]&&187==c[1]&&191==c[2])return Rb(c);if(254==c[0]&&255==c[1])return Tb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Tb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Tb(a,!1);if(0==c[1]&&0==c[3])return Tb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Rb(a);throw new O(2,2,2003);}
|
|
83
|
+
function Vb(a){a=encodeURIComponent(a);var b=unescape(a);a=new Uint8Array(b.length);b=r(fb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.da]=c.item.charCodeAt(0);return jb(a)}function Wb(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=r(fb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.da,f.item.charCodeAt(0),b);return c}function Sb(a){return Xb.value()(a)}L("shaka.util.StringUtils",Qb);Qb.resetFromCharCode=function(){Xb.g=void 0};Qb.toUTF16=Wb;Qb.toUTF8=Vb;
|
|
84
|
+
Qb.fromBytesAutoDetect=Ub;Qb.fromUTF16=Tb;Qb.fromUTF8=Rb;var Xb=new Pb(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={Ra:65536};0<b.Ra;b={Ra:b.Ra},b.Ra/=2)if(a(b.Ra))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ra)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ra));return e}}(b);return null});function Yb(){}function Zb(a){a=Sb(N(a));return btoa(a)}function $b(a,b){b=void 0==b?!0:b;var c=Zb(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function ac(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=r(fb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.da]=c.item.charCodeAt(0);return a}
|
|
85
|
+
function bc(a){var b=a.length/2,c=new Uint8Array(b);b=r(db(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 cc(a){var b=N(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}
|
|
86
|
+
function dc(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(N(c),e),e+=c.byteLength;return d}L("shaka.util.Uint8ArrayUtils",Yb);Yb.concat=dc;Yb.toHex=cc;Yb.fromHex=bc;Yb.fromBase64=ac;Yb.toBase64=$b;Yb.toStandardBase64=Zb;
|
|
87
|
+
Yb.equal=function(a,b){Db("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return hb(a,b)};function ec(){var a=this;this.g=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(dc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:dc.apply(Yb,ha(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}ec.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
88
|
+
function fc(a,b){if(!window.muxjs||"mp2t"!=a.toLowerCase().split(";")[0].split("/")[1])return!1;if(b)return MediaSource.isTypeSupported(gc(b,a));var c=gc("audio",a),d=gc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}
|
|
89
|
+
function gc(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 hc(a,b){a.l=!0;a.h=new Ob;a.m=[];a.j=[];a.i=[];var c=N(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new O(2,3,3018));return a.h};function ic(a){this.h=a;this.g=null}ic.prototype.W=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};ic.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.ac=function(){this.stop();this.h();return this};Q.prototype.W=function(a){var b=this;this.stop();this.g=(new ic(function(){b.h()})).W(a);return this};Q.prototype.xa=function(a){var b=this;this.stop();this.g=(new ic(function(){b.g.W(a);b.h()})).W(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.xa;Q.prototype.tickAfter=Q.prototype.W;
|
|
90
|
+
Q.prototype.tickNow=Q.prototype.ac;function jc(a,b){var c=kc();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
91
|
+
function lc(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new O(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.s);return t(d,new Promise(function(e){(new Q(e)).W(c/1E3)}),2)}a.h*=a.m;x(d)})}function kc(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function mc(a,b){this.promise=a;this.i=b;this.g=!1}function nc(a){return new mc(Promise.reject(a),function(){return Promise.resolve()})}function oc(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new mc(a,function(){return Promise.resolve()})}function pc(a){return new mc(Promise.resolve(a),function(){return Promise.resolve()})}function qc(a){return new mc(a,function(){return a["catch"](function(){})})}mc.prototype.abort=function(){this.g=!0;return this.i()};
|
|
92
|
+
function rc(a){return new mc(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}mc.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
93
|
+
mc.prototype.$=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=sc(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ob,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new mc(f,function(){return d()})};
|
|
94
|
+
function sc(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()}}}L("shaka.util.AbortableOperation",mc);mc.prototype.chain=mc.prototype.$;mc.prototype["finally"]=mc.prototype["finally"];mc.all=rc;mc.prototype.abort=mc.prototype.abort;mc.notAbortable=qc;mc.completed=pc;mc.aborted=oc;mc.failed=nc;function R(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}
|
|
95
|
+
function tc(a){var b=new R(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}R.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};R.prototype.stopImmediatePropagation=function(){this.g=!0};R.prototype.stopPropagation=function(){};L("shaka.util.FakeEvent",R);function uc(){this.g={}}uc.prototype.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};uc.prototype.get=function(a){return(a=this.g[a])?a.slice():null};uc.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 vc(a,b){for(var c in a.g)b(c,a.g[c])}uc.prototype.size=function(){return Object.keys(this.g).length};function wc(){this.Wc=new uc;this.kc=this}wc.prototype.addEventListener=function(a,b){this.Wc.push(a,b)};wc.prototype.removeEventListener=function(a,b){this.Wc.remove(a,b)};wc.prototype.dispatchEvent=function(a){var b=this.Wc.get(a.type)||[];b=r(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.kc;a.currentTarget=this.kc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};function xc(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 yc(a){var b={},c;for(c in a)b[c]=a[c];return b};function zc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Ac(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function Bc(a,b,c){c||(c=zc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Lc:d.Lc},e=a.next()){d.Lc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Lc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
96
|
+
function Cc(a,b,c){c||(c=zc);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 Dc(){this.g=[]}function Ec(a,b){a.g.push(b["finally"](function(){Ac(a.g,b)}))}Dc.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 Fc(a){wc.call(this);this.i=!1;this.l=new Dc;this.g=new Set;this.h=new Set;this.j=a||null}oa(Fc,wc);function Gc(a,b,c){c=c||Hc;var d=Ic[a];if(!d||c>=d.priority)Ic[a]={priority:c,Ve:b}}q=Fc.prototype;q.Xe=function(a){this.g.add(a)};q.qf=function(a){this.g["delete"](a)};q.oe=function(){this.g.clear()};q.Ye=function(a){this.h.add(a)};q.rf=function(a){this.h["delete"](a)};q.pe=function(){this.h.clear()};
|
|
97
|
+
function Jc(a,b){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();return this.l.destroy()};
|
|
98
|
+
q.request=function(a,b){var c=this,d=new Kc;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new Mc(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?xc(b.retryParameters):kc();b.uris=xc(b.uris);e=Nc(this,a,b);var f=e.$(function(){return Oc(c,a,b,new jc(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return Pc(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
99
|
+
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var p=Date.now()-l,u=n.response;u.timeMs+=k;u.timeMs+=p;n.Ne||!c.j||u.fromCache||a!=Qc||c.j(u.timeMs,u.data.byteLength);return u},function(n){n&&(n.severity=2);throw n;});e=new Mc(m.promise,function(){return m.abort()},d);Ec(this.l,e);return e};
|
|
100
|
+
function Nc(a,b,c){var d=pc(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Pc:e.Pc},f=a.next())e.Pc=f.value,d=d.$(function(g){return function(){c.body&&(c.body=jb(c.body));return g.Pc(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
|
|
101
|
+
function Oc(a,b,c,d,e,f,g){var h=new nb(c.uris[e]),k=h.Aa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),ob(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ic[k])?k.Ve:null;if(!m)return nc(new O(2,1,1E3,h));var n;return qc(lc(d)).$(function(){if(a.i)return oc();n=Date.now();return m(c.uris[e],c,b,function(p,u,v){a.j&&b==Qc&&(a.j(p,u),l=!0,g.g=v)})}).$(function(p){void 0==p.timeMs&&(p.timeMs=Date.now()-n);return{response:p,Ne:l}},function(p){if(a.i)return oc();if(p instanceof O){if(7001==p.code)throw p;
|
|
102
|
+
if(1010==p.code)throw f;if(1==p.severity){var u=(new Map).set("error",p);u=new R("retry",u);a.dispatchEvent(u);e=(e+1)%c.uris.length;return Oc(a,b,c,d,e,p,g)}}throw p;})}
|
|
103
|
+
function Pc(a,b,c){var d=pc(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Qc:e.Qc},f=a.next())e.Qc=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=jb(h.data));return g.Qc(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}L("shaka.net.NetworkingEngine",Fc);Fc.prototype.request=Fc.prototype.request;Fc.prototype.destroy=Fc.prototype.destroy;Fc.makeRequest=Jc;
|
|
104
|
+
Fc.defaultRetryParameters=function(){return kc()};Fc.prototype.clearAllResponseFilters=Fc.prototype.pe;Fc.prototype.unregisterResponseFilter=Fc.prototype.rf;Fc.prototype.registerResponseFilter=Fc.prototype.Ye;Fc.prototype.clearAllRequestFilters=Fc.prototype.oe;Fc.prototype.unregisterRequestFilter=Fc.prototype.qf;Fc.prototype.registerRequestFilter=Fc.prototype.Xe;Fc.unregisterScheme=function(a){delete Ic[a]};Fc.registerScheme=Gc;function Kc(){this.g=0}Fc.NumBytesRemainingClass=Kc;
|
|
105
|
+
function Mc(a,b,c){mc.call(this,a,b);this.h=c}oa(Mc,mc);Fc.PendingRequest=Mc;var Qc=1;Fc.RequestType={MANIFEST:0,SEGMENT:Qc,LICENSE:2,APP:3,TIMING:4};var Hc=3;Fc.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Hc};var Ic={};function Rc(a){this.g=!1;this.h=new Ob;this.i=a}Rc.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 Sc(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function Tc(){this.g=new uc}q=Tc.prototype;q.release=function(){this.gb();this.g=null};q.v=function(a,b,c,d){this.g&&(a=new Uc(a,b,c,d),this.g.push(b,a))};q.pa=function(a,b,c,d){function e(g){f.ya(a,b,e);c(g)}var f=this;this.v(a,b,e,d)};q.ya=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.ya(),this.g.remove(b,e))}};
|
|
106
|
+
q.gb=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.ya();this.g.g={}}};L("shaka.util.EventManager",Tc);Tc.prototype.removeAll=Tc.prototype.gb;Tc.prototype.unlisten=Tc.prototype.ya;Tc.prototype.listenOnce=Tc.prototype.pa;Tc.prototype.listen=Tc.prototype.v;Tc.prototype.release=Tc.prototype.release;function Uc(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Vc(a,d);this.target.addEventListener(b,c,this.g)}
|
|
107
|
+
Uc.prototype.ya=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Vc(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 Wc(a)?b:b.capture||!1}
|
|
108
|
+
function Wc(a){var b=Xc;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}Xc=b}return b||!1}var Xc=void 0;function Yc(){}function Zc(a){a=Ub(a);return(new nb(a)).Ca}function $c(a,b,c){function d(h){lb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(N(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=Wb(b,!0):e=b;a=Ub(a);a=Wb(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}L("shaka.util.FairPlayUtils",Yc);Yc.initDataTransform=$c;Yc.defaultGetContentId=Zc;function ad(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 bd(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function cd(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 dd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function ed(a){var b=[a.mimeType];fd.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});return b.join(";")}function gd(a){a=a.split(".");var b=a[0];a.pop();return b}function hd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
|
|
109
|
+
var fd=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function id(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function jd(a){return""!=kd().canPlayType(a)}function ld(){return md("Tizen")}function nd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!ld()}function od(){if(!nd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function md(a){return(navigator.userAgent||"").includes(a)}
|
|
110
|
+
function kd(){if(pd)return pd;qd||(qd=new Q(function(){pd=null}));(pd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(pd=document.createElement("video"));qd.W(1);return pd}var qd=null,pd=null;function rd(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.u=new Set;this.g=this.m=null;this.N=!1;this.I=0;this.i=null;this.h=new Tc;this.j=new Map;this.C=[];this.s=new Ob;this.o=null;this.l=function(d){c.s.reject(d);a.onError(d)};this.ka=new Map;this.Z=new Map;this.S=new Q(function(){return sd(c)});this.F=!1;this.K=[];this.P=!1;this.ca=(new Q(function(){td(c)})).xa(b);this.s["catch"](function(){});this.J=new Rc(function(){return ud(c)})}rd.prototype.destroy=function(){return this.J.destroy()};
|
|
111
|
+
function ud(a){return K(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.s.reject(),a.ca.stop(),a.ca=null,a.S.stop(),a.S=null,t(b,vd(a),2);case 2:if(!a.g){b.B(3);break}y(b,4);return t(b,a.g.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:C(b);case 5:a.g=null;case 3:a.i=null,a.u.clear(),a.m=null,a.C=[],a.o=null,a.l=function(){},a.D=null,x(b)}})}rd.prototype.configure=function(a){this.o=a};function wd(a,b,c){a.C=[];a.F=c;return xd(a,b)}
|
|
112
|
+
function yd(a,b,c){a.C=c;a.F=0<c.length;return xd(a,b)}function Ad(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 Bd(a,g)}
|
|
113
|
+
function xd(a,b){var c=Cd(a);if(c)for(var d=r(b),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=[c]),e.audio&&(e.audio.drmInfos=[c]);c=b.some(function(g){return g.video&&g.video.drmInfos.length||g.audio&&g.audio.drmInfos.length?!0:!1});c||(d=ad(a.o.servers),Dd(b,d));d=r(b);for(e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())Ed(f.value,ad(a.o.servers),ad(a.o.advanced||{}))}d=Fd(a,
|
|
114
|
+
b);if(!d.size)return a.N=!0,Promise.resolve();d=Bd(a,d);return c?d:d["catch"](function(){})}
|
|
115
|
+
rd.prototype.Ib=function(a){var b=this,c,d;return K(function(e){if(1==e.g){if(!b.m)return b.h.pa(a,"encrypted",function(){b.l(new O(2,6,6010))}),e["return"]();b.g=a;b.h.pa(b.g,"play",function(){for(var f=r(b.K),g=f.next();!g.done;g=f.next())Gd(b,g.value);b.P=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.v(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return vd(b)});c=b.g.setMediaKeys(b.m);c=c["catch"](function(f){return Promise.reject(new O(2,6,6003,f.message))});
|
|
116
|
+
return t(e,c,2)}Sc(b.J);Hd(b);b.i.initData.length||b.C.length||(d=function(f){return Id(b,f.initDataType,N(f.initData))},b.h.v(b.g,"encrypted",d));x(e)})};function Jd(a){var b;return K(function(c){if(1==c.g){if(!(a.m&&a.i&&a.i.serverCertificate&&a.i.serverCertificate.length))return c.B(0);y(c,3);return t(c,a.m.setServerCertificate(a.i.serverCertificate),5)}if(3!=c.g)return ta(c,0);b=C(c);throw new O(2,6,6004,b.message);})}
|
|
117
|
+
function Kd(a,b){var c,d,e;return K(function(f){if(1==f.g)return t(f,Ld(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.Ha=new Ob,d.push(e.Ha);d.push(c.remove());return t(f,Promise.all(d),3)}a.j["delete"](c);x(f)})}function Hd(a){for(var b=(a.i?a.i.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Id(a,d.initDataType,d.initData);c=r(a.C);for(d=c.next();!d.done;d=c.next())Ld(a,d.value);b.length||a.C.length||a.s.resolve();return a.s}
|
|
118
|
+
function Id(a,b,c){var d=a.j.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(hb(c,e.value.initData)&&!md("Tizen 2"))return;Md(a,b,c)}function Nd(a){return a?a.keySystem:""}function Od(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(ld()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.u.has(b)||a.u.has(c)}return a.u.has(b)}function Pd(a){a=a.j.keys();a=$a(a,function(b){return b.sessionId});return Array.from(a)}
|
|
119
|
+
rd.prototype.Mb=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};
|
|
120
|
+
function Fd(a,b){for(var c=new Set,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));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())Ed(e.value,ad(a.o.servers),ad(a.o.advanced||{}));f=a.F?"required":"optional";var g=a.F?["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:[],
|
|
121
|
+
distinctiveIdentifier:"optional",persistentState:f,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=Qd(g),k=null;"ac-3"==g.codecs.toLowerCase()&&ld()&&(k=Qd(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})))));
|
|
122
|
+
m.distinctiveIdentifierRequired&&(e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");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}function Qd(a,b){var c=dd(a.mimeType,b||a.codecs);return fc(c)?gc(a.type,c):c}
|
|
123
|
+
function Bd(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G;return K(function(I){switch(I.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);c=r(b.values());for(d=c.next();!d.done;d=c.next())e=d.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;g=r([!0,!1]);h=g.next();case 2:if(h.done){I.B(4);break}k=h.value;l=r(b.keys());m=l.next();case 5:if(m.done){I.B(7);break}n=m.value;p=b.get(n);u=p.drmInfos.some(function(J){return!!J.licenseServerUri});
|
|
124
|
+
if(u!=k){I.B(6);break}y(I,8);return t(I,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:f=I.h;I.B(7);break;case 8:C(I);case 9:Sc(a.J);case 6:m=l.next();I.B(5);break;case 7:if(f){I.B(4);break}h=g.next();I.B(2);break;case 4:if(!f)throw new O(2,6,6001);Sc(a.J);y(I,11);a.u.clear();v=f.getConfiguration();z=v.audioCapabilities||[];w=v.videoCapabilities||[];A=r(z);for(D=A.next();!D.done;D=A.next())B=D.value,a.u.add(B.contentType.toLowerCase());E=r(w);for(D=E.next();!D.done;D=E.next())F=D.value,
|
|
125
|
+
a.u.add(F.contentType.toLowerCase());a.i=Rd(f.keySystem,b.get(f.keySystem));if(!a.i.licenseServerUri)throw new O(2,6,6012,a.i.keySystem);return t(I,f.createMediaKeys(),13);case 13:return H=I.h,Sc(a.J),a.m=H,a.N=!0,t(I,Jd(a),14);case 14:Sc(a.J);ta(I,0);break;case 11:G=C(I);Sc(a.J,G);a.i=null;a.u.clear();if(G instanceof O)throw G;throw new O(2,6,6002,G.message);}})}
|
|
126
|
+
function Cd(a){a=ad(a.o.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=bc(f),h=bc(e);g={kty:"oct",kid:$b(g,!1),k:$b(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:N(Vb(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
127
127
|
initData:d,keyIds:new Set(c)}}
|
|
128
|
-
function
|
|
129
|
-
a.l(new
|
|
130
|
-
function
|
|
131
|
-
c)["catch"](function(e){if(!a.J.g){a.j["delete"](d);var f=e.errorCode;if(f&&f.systemCode){var g=f.systemCode;0>g&&(g+=Math.pow(2,32));g="0x"+g.toString(16)}a.l(new
|
|
132
|
-
function
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
function
|
|
136
|
-
function
|
|
137
|
-
(e=!0);k=
|
|
138
|
-
function
|
|
139
|
-
return
|
|
140
|
-
function
|
|
141
|
-
function
|
|
142
|
-
function
|
|
143
|
-
|
|
144
|
-
function
|
|
145
|
-
function
|
|
146
|
-
function
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
(a
|
|
150
|
-
|
|
151
|
-
q.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
function
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
function
|
|
166
|
-
|
|
167
|
-
function
|
|
168
|
-
|
|
128
|
+
function Ld(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.m.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.v(c,"message",function(k){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.P?a.K.push(k):Gd(a,k)});a.h.v(c,"keystatuseschange",function(k){return Sd(a,k)});e={initData:null,loaded:!1,ld:Infinity,Ha:null};a.j.set(c,e);y(h,2);return t(h,c.load(b),4);case 4:f=h.h;Sc(a.J);if(!f)return a.j["delete"](c),
|
|
129
|
+
a.l(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Td(a)&&a.s.resolve();return h["return"](c);case 2:g=C(h),Sc(a.J,g),a.j["delete"](c),a.l(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
130
|
+
function Md(a,b,c){try{var d=a.F?a.m.createSession("persistent-license"):a.m.createSession()}catch(e){a.l(new O(2,6,6005,e.message));return}a.h.v(d,"message",function(e){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.P?a.K.push(e):Gd(a,e)});a.h.v(d,"keystatuseschange",function(e){return Sd(a,e)});a.j.set(d,{initData:c,loaded:!1,ld:Infinity,Ha:null});try{c=a.o.initDataTransform(c,b,a.i)}catch(e){b=e;e instanceof O||(b=new O(2,6,6016,e));a.l(b);return}a.o.logLicenseExchange&&$b(c);d.generateRequest(b,
|
|
131
|
+
c)["catch"](function(e){if(!a.J.g){a.j["delete"](d);var f=e.errorCode;if(f&&f.systemCode){var g=f.systemCode;0>g&&(g+=Math.pow(2,32));g="0x"+g.toString(16)}a.l(new O(2,6,6006,e.message,e,g))}})}function Ud(a,b,c){"skd"==b&&(b=c.serverCertificate,c=Zc(a),a=$c(a,c,b));return a}
|
|
132
|
+
function Gd(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,v,z;K(function(w){switch(w.g){case 1:return c=b.target,a.o.logLicenseExchange&&$b(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.o.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=Jc([e],a.o.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,"com.microsoft.playready"!=a.i.keySystem&&"com.chromecast.playready"!=a.i.keySystem||
|
|
133
|
+
Vd(g),h=Date.now(),y(w,2),l=a.D.wb.request(2,g),t(w,l.promise,4);case 4:k=w.h;ta(w,3);break;case 2:return m=C(w),n=new O(2,6,6007,m),a.l(n),d&&d.Ha&&d.Ha.reject(n),w["return"]();case 3:if(a.J.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.o.logLicenseExchange&&$b(k.data);y(w,5);return t(w,c.update(k.data),7);case 7:ta(w,6);break;case 5:return p=C(w),u=new O(2,6,6008,p.message),a.l(u),d&&d.Ha&&d.Ha.reject(u),w["return"]();case 6:v=new R("drmsessionupdate"),a.D.onEvent(v),d&&(d.Ha&&d.Ha.resolve(),
|
|
134
|
+
z=new Q(function(){d.loaded=!0;Td(a)&&a.s.resolve()}),z.W(Wd)),x(w)}})}
|
|
135
|
+
function Vd(a){var b=Tb(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=ac(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
136
|
+
function Sd(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("com.microsoft.playready"==a.i.keySystem&&16==h.byteLength&&(md("Trident/")||navigator.userAgent.match(/Edge?\//))){k=lb(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)}"com.microsoft.playready"==a.i.keySystem&&"status-pending"==g&&(g="usable");"status-pending"!=g&&(d.loaded=!0);"expired"==g&&
|
|
137
|
+
(e=!0);k=cc(h);a.ka.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ha&&(a.j["delete"](c),c.close()["catch"](function(){}));Td(a)&&(a.s.resolve(),a.S.W(Xd))}function sd(a){var b=a.ka,c=a.Z;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 O(2,6,6014));a.D.zc(bd(c))}
|
|
138
|
+
function Yd(){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.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,c],f=new Map,g=function(l){var m,n,p;
|
|
139
|
+
return K(function(u){switch(u.g){case 1:return y(u,2),t(u,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=u.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,md("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),t(u,m.createMediaKeys(),5);case 5:ta(u,0);break;case 2:C(u),f.set(l,null),x(u)}})},h=a.map(function(l){return g(l)}),t(k,Promise.all(h),2)):k["return"](bd(f))})}
|
|
140
|
+
function Zd(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).W($d)}),y(c,2),t(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);C(c);x(c)})}function vd(a){var b;return K(function(c){b=Array.from(a.j.keys());a.j.clear();return t(c,Promise.all(b.map(function(d){return K(function(e){if(1==e.g)return y(e,2),t(e,Zd(d),4);if(2!=e.g)return ta(e,0);C(e);x(e)})})),0)})}
|
|
141
|
+
function ae(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted){var e=Qd(c);if(!Od(a,e))return!1}if(d&&d.encrypted&&(e=Qd(d),!Od(a,e)))return!1;var f=Nd(a.i);c=(d?d.drmInfos:[]).concat(c?c.drmInfos:[]);return 0==c.length||c.some(function(g){return g.keySystem==f})}
|
|
142
|
+
function be(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={za:f.za},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.za=[];f.za=f.za.concat(e.initData||[]);f.za=f.za.concat(h.initData||[]);f.za=f.za.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.za.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ha(e.keyIds),ha(h.keyIds))):
|
|
143
|
+
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.za,keyIds:g});break}}return c}
|
|
144
|
+
function td(a){a.j.forEach(function(b,c){var d=b.ld,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.ld=e)})}function Td(a){a=a.j.values();return ab(a,function(b){return b.loaded})}
|
|
145
|
+
function Dd(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)}
|
|
146
|
+
function Rd(a,b){var c=[],d=[],e=[],f=new Set;ce(b.drmInfos,c,d,e,f);return{keySystem:a,licenseServerUri:c[0],distinctiveIdentifierRequired:"required"==b.distinctiveIdentifier,persistentStateRequired:"required"==b.persistentState,audioRobustness:(b.audioCapabilities?b.audioCapabilities[0].robustness:"")||"",videoRobustness:(b.videoCapabilities?b.videoCapabilities[0].robustness:"")||"",serverCertificate:d[0],initData:e,keyIds:f}}
|
|
147
|
+
function ce(a,b,c,d,e){var f={};a=r(a);for(var g=a.next();!g.done;f={sa:f.sa},g=a.next()){f.sa=g.value;b.includes(f.sa.licenseServerUri)||b.push(f.sa.licenseServerUri);f.sa.serverCertificate&&(c.some(function(l){return function(m){return hb(m,l.sa.serverCertificate)}}(f))||c.push(f.sa.serverCertificate));if(f.sa.initData){g={};for(var h=r(f.sa.initData),k=h.next();!k.done;g={dc:g.dc},k=h.next())g.dc=k.value,d.some(function(l){return function(m){var n=l.dc;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
|
|
148
|
+
n.initDataType&&hb(m.initData,n.initData)}}(g))||d.push(g.dc)}if(f.sa.keyIds)for(g=r(f.sa.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
|
|
149
|
+
function Ed(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||
|
|
150
|
+
(a.serverCertificate=c.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var $d=1,Wd=5,Xd=.5,de=new Pb(function(){return jb(new Uint8Array([0]))});function S(a,b){this.T=lb(a);this.g=b==ee;this.H=0}q=S.prototype;q.Da=function(){return this.H<this.T.byteLength};q.Ge=function(){return this.H};q.we=function(){return this.T.byteLength};q.wa=function(){try{var a=this.T.getUint8(this.H);this.H+=1;return a}catch(b){throw fe();}};q.Xb=function(){try{var a=this.T.getUint16(this.H,this.g);this.H+=2;return a}catch(b){throw fe();}};q.O=function(){try{var a=this.T.getUint32(this.H,this.g);this.H+=4;return a}catch(b){throw fe();}};
|
|
151
|
+
q.Wd=function(){try{var a=this.T.getInt32(this.H,this.g);this.H+=4;return a}catch(b){throw fe();}};q.fb=function(){try{if(this.g){var a=this.T.getUint32(this.H,!0);var b=this.T.getUint32(this.H+4,!0)}else b=this.T.getUint32(this.H,!1),a=this.T.getUint32(this.H+4,!1)}catch(c){throw fe();}if(2097151<b)throw new O(2,3,3001);this.H+=8;return b*Math.pow(2,32)+a};q.eb=function(a){if(this.H+a>this.T.byteLength)throw fe();var b=N(this.T,this.H,a);this.H+=a;return b};
|
|
152
|
+
q.skip=function(a){if(this.H+a>this.T.byteLength)throw fe();this.H+=a};q.Yd=function(a){if(this.H<a)throw fe();this.H-=a};q.seek=function(a){if(0>a||a>this.T.byteLength)throw fe();this.H=a};q.Wb=function(){for(var a=this.H;this.Da()&&0!=this.T.getUint8(this.H);)this.H+=1;a=N(this.T,a,this.H-a);this.H+=1;return Rb(a)};function fe(){return new O(2,3,3E3)}L("shaka.util.DataViewReader",S);S.prototype.readTerminatedString=S.prototype.Wb;S.prototype.seek=S.prototype.seek;S.prototype.rewind=S.prototype.Yd;
|
|
153
|
+
S.prototype.skip=S.prototype.skip;S.prototype.readBytes=S.prototype.eb;S.prototype.readUint64=S.prototype.fb;S.prototype.readInt32=S.prototype.Wd;S.prototype.readUint32=S.prototype.O;S.prototype.readUint16=S.prototype.Xb;S.prototype.readUint8=S.prototype.wa;S.prototype.getLength=S.prototype.we;S.prototype.getPosition=S.prototype.Ge;S.prototype.hasMoreData=S.prototype.Da;var ee=1;S.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ee};function ge(){this.i=[];this.h=[];this.g=!1}q=ge.prototype;q.box=function(a,b){var c=he(a);this.i[c]=ie;this.h[c]=b;return this};q.X=function(a,b){var c=he(a);this.i[c]=je;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b){var c=new S(a,0);for(this.g=!1;c.Da()&&!this.g;)this.Bc(0,c,b)};
|
|
154
|
+
q.Bc=function(a,b,c){var d=b.H,e=b.O(),f=b.O(),g=!1;switch(e){case 0:e=b.T.byteLength-d;break;case 1:e=b.fb(),g=!0}var h=this.h[f];if(h){var k=null,l=null;this.i[f]==je&&(l=b.O(),k=l>>>24,l&=16777215);f=d+e;c&&f>b.T.byteLength&&(f=b.T.byteLength);f-=b.H;b=0<f?b.eb(f):new Uint8Array(0);b=new S(b,0);h({parser:this,partialOkay:c||!1,version:k,flags:l,reader:b,size:e,start:d+a,has64BitSize:g})}else b.skip(Math.min(d+e-b.H,b.T.byteLength-b.H))};
|
|
155
|
+
function ke(a){for(var b=le(a);a.reader.Da()&&!a.parser.g;)a.parser.Bc(a.start+b,a.reader,a.partialOkay)}function me(a){var b=le(a),c=a.reader.O();c=r(db(c));for(var d=c.next();!d.done&&(a.parser.Bc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function ne(a){return function(b){a(b.reader.eb(b.reader.T.byteLength-b.reader.H))}}function he(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}
|
|
156
|
+
function oe(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function le(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",ge);ge.headerSize=le;ge.typeToString=oe;ge.allData=ne;ge.sampleDescription=me;ge.children=ke;ge.prototype.parseNext=ge.prototype.Bc;ge.prototype.parse=ge.prototype.parse;ge.prototype.stop=ge.prototype.stop;ge.prototype.fullBox=ge.prototype.X;ge.prototype.box=ge.prototype.box;var ie=0,je=1;function pe(a){function b(){d=!0}function c(l){f.push(l);ke(l)}a=N(a);var d=!1,e,f=[],g=[];(new ge).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);me(l)}).X("encv",b).X("enca",b).X("avc1",function(l){g.push({box:l,Tb:1701733238})}).X("avc3",function(l){g.push({box:l,Tb:1701733238})}).X("ac-3",function(l){g.push({box:l,Tb:1701733217})}).X("ec-3",function(l){g.push({box:l,Tb:1701733217})}).X("mp4a",function(l){g.push({box:l,Tb:1701733217})}).parse(a);
|
|
157
|
+
if(d)return a;if(0==g.length||!e)throw Xa(cc(a)),new O(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=qe(a,e,k.box,f,k.Tb);return a}
|
|
158
|
+
function qe(a,b,c,d,e){var f=re.value(),g=a.subarray(c.start,c.start+c.size),h=lb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=lb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);se(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=md("Xbox One")?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,se(e,d.start,d.size+k.byteLength);k=lb(e,b.start);b=le(b);
|
|
159
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function se(a,b,c){a=lb(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 re=new Pb(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 te(){this.g=new muxjs.mp4.CaptionParser;this.l=[];this.j={}}te.prototype.init=function(a){var b=muxjs.mp4.probe;a=N(a);this.l=b.videoTrackIds(a);this.j=b.timescale(a);this.g.init()};te.prototype.i=function(a,b){var c=N(a);(c=this.g.parse(c,this.l,this.j))&&c.captions&&b(c.captions);this.g.clearParsedCaptions()};te.prototype.h=function(){this.g.resetCaptionStream()};function ue(){}ue.prototype.init=function(){};ue.prototype.i=function(){};ue.prototype.h=function(){};function ve(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function we(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 xe(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(ye(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}
|
|
160
|
+
function ze(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;var c=navigator.userAgent.match(/Edge\//)||md("Trident/")||ld()||md("CrKey")?.5:.1,d=ye(a).findIndex(function(e,f,g){return e.start>b&&(0==f||g[f-1].end-b<=c)});return 0<=d?d:null}function ye(a){if(!a)return[];for(var b=[],c=r(db(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 Ae(a,b,c){this.startTime=a;this.direction=Be;this.endTime=b;this.payload=c;this.region=new Ce;this.position=null;this.positionAlign=De;this.size=0;this.textAlign=Ee;this.writingMode=Fe;this.lineInterpretation=Ge;this.line=null;this.lineHeight="";this.lineAlign=He;this.displayAlign=Je;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ke;this.fontStyle=Le;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
|
|
161
|
+
[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=!1;this.cellResolution={columns:32,rows:15}}Ae.prototype.clone=function(){var a=new Ae(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
162
|
+
function Me(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(!Cc(a.nestedCues,b.nestedCues,Me))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(!Cc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",Ae);var De="auto";
|
|
163
|
+
Ae.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:De};var Ee="center",Ne={LEFT:"left",RIGHT:"right",CENTER:Ee,START:"start",END:"end"};Ae.textAlign=Ne;var Je="after",Oe={BEFORE:"before",CENTER:"center",AFTER:Je};Ae.displayAlign=Oe;var Be="ltr";Ae.direction={HORIZONTAL_LEFT_TO_RIGHT:Be,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Fe="horizontal-tb";Ae.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Fe,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ge=0;
|
|
164
|
+
Ae.lineInterpretation={LINE_NUMBER:Ge,PERCENTAGE:1};var He="start",Pe={CENTER:"center",START:He,END:"end"};Ae.lineAlign=Pe;var Ke=400;Ae.fontWeight={NORMAL:Ke,BOLD:700};var Le="normal",Qe={NORMAL:Le,ITALIC:"italic",OBLIQUE:"oblique"};Ae.fontStyle=Qe;Ae.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
|
|
165
|
+
function Ce(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Re;this.scroll=Se}L("shaka.text.CueRegion",Ce);var Re=1;Ce.units={PX:0,PERCENTAGE:Re,LINES:2};var Se="";Ce.scrollMode={NONE:Se,UP:"up"};function Te(a){this.u=null;this.i=a;this.j=this.C=0;this.l=Infinity;this.h=this.g=null;this.s="";this.m=new Map}function Ue(a){return Ve[a]||window.muxjs&&"application/cea-608"==a?!0:!1}Te.prototype.destroy=function(){this.i=this.u=null;this.m.clear();return Promise.resolve()};
|
|
166
|
+
function We(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g)return t(h,Promise.resolve(),2);if(!a.u||!a.i)return h["return"]();if(null==c||null==d)return a.u.parseInit(N(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.u.parseMedia(N(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);x(h)})}
|
|
167
|
+
Te.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)return t(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));x(d)})};function Xe(a,b,c){a.j=b;a.l=c}function Ye(a,b,c){a.s=b;if(b=a.m.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)}
|
|
168
|
+
function Ze(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;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);k.startTime+=e;k.endTime+=e;k.startTime>=a.j&&k.startTime<a.l&&(k=new Ae(k.startTime,k.endTime,k.text),g.get(h).get(f).push(k),h==a.s&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.m.has(f)||a.m.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),
|
|
169
|
+
a.m.get(f).set(h,k);a.g=null==a.g?Math.max(c,a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.l))}L("shaka.text.TextEngine",Te);Te.prototype.destroy=Te.prototype.destroy;Te.unregisterParser=function(a){delete Ve[a]};Te.registerParser=function(a,b){Ve[a]=b};var Ve={};function $e(a,b,c,d){var e=this;this.g=a;this.m=c;this.j={};this.K={};this.i=null;this.N=d||function(){};this.l={};this.h=new Tc;this.u={};this.C=b;this.F=new Ob;this.s=af(this,this.F);this.J=new Rc(function(){return bf(e)});this.I=""}function af(a,b){var c=new MediaSource;a.h.pa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=cf(c);a.g.src=a.I;return c}function df(a){var b=dd(a.mimeType,a.codecs),c=ed(a);return Ue(b)||MediaSource.isTypeSupported(c)||fc(b,a.type)}q=$e.prototype;
|
|
169
170
|
q.destroy=function(){return this.J.destroy()};
|
|
170
|
-
function
|
|
171
|
-
{};
|
|
172
|
-
q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
173
|
-
c.j[e.
|
|
174
|
-
function
|
|
175
|
-
function
|
|
176
|
-
a.
|
|
177
|
-
function
|
|
178
|
-
function
|
|
179
|
-
q.endOfStream=function(a){var b=this;return
|
|
180
|
-
function
|
|
181
|
-
function
|
|
182
|
-
function
|
|
183
|
-
function
|
|
184
|
-
var
|
|
171
|
+
function bf(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 O(2,7,7003,void 0));a.i&&b.push(a.i.destroy());a.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return t(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.s=null;a.i=null;a.m=null;a.j={};a.u={};a.C=null;a.l=
|
|
172
|
+
{};x(l)})}
|
|
173
|
+
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=Nb,t(m,c.F,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={la:e.la},g=f.next())e.la=g.value,h=a.get(e.la),k=dd(h.mimeType,h.codecs),e.la==d.ha?ef(c,k):(!b&&MediaSource.isTypeSupported(k)||!fc(k,e.la)||(c.u[e.la]=new ec,k=gc(e.la,k)),l=c.s.addSourceBuffer(k),c.h.v(l,"error",function(n){return function(){c.l[n.la][0].p.reject(new O(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.v(l,"updateend",function(n){return function(){return ff(c,n.la)}}(e)),
|
|
174
|
+
c.j[e.la]=l,c.K[e.la]=k,c.l[e.la]=[]);x(m)})};function ef(a,b){a.i||(a.i=new Te(a.m));"application/cea-608"!=b&&(a.i.u=Kb(Ve[b]))}function gf(a){return a.s?"ended"==a.s.readyState:!0}function hf(a,b){if("text"==b)var c=a.i.g;else c=jf(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 kf(a,b){return"text"==b?a.i.h:ve(jf(a,b))}
|
|
175
|
+
function lf(a,b,c){if("text"==b)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=jf(a,b);return xe(a,c)}q.rc=function(){var a={total:ye(this.g.buffered),audio:ye(jf(this,"audio")),video:ye(jf(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 jf(a,b){try{return a.j[b].buffered}catch(c){return null}}
|
|
176
|
+
function mf(a,b,c,d,e,f){var g,h,k,l,m;return K(function(n){if(1==n.g){g=Nb;if(b==g.ha)return t(n,We(a.i,c,d,e),0);if(a.u[b])return t(n,hc(a.u[b],c),10);if(f&&window.muxjs)return a.i||ef(a,"text/vtt"),null==d&&null==e?a.C.init(c):a.C.i(c,function(p){p.length&&Ze(a.i,p,d,e,a.j[g.Ka].timestampOffset)}),c=nf(a,c,d,b),t(n,of(a,b,function(){a.j[b].appendBuffer(c)}),0);c=nf(a,c,d,b);return t(n,of(a,b,function(){a.j[b].appendBuffer(c)}),0)}h=n.h;a.i||ef(a,"text/vtt");h.metadata&&(k=a.j[b].timestampOffset,
|
|
177
|
+
a.N(h.metadata,k,e));h.captions&&h.captions.length&&(l=a.j[g.Ka].timestampOffset,Ze(a.i,h.captions,d,e,l));m=h.data;m=nf(a,m,d,b);return t(n,of(a,b,function(){a.j[b].appendBuffer(m)}),0)})}function pf(a,b){var c=kf(a,"video")||0;Ye(a.i,b,c)}function qf(a){a.i&&Ye(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=Nb;return a==e.ha?t(f,d.i.remove(b,c),0):t(f,of(d,a,function(){c<=b?ff(d,a):d.j[a].remove(b,c)}),0)})};
|
|
178
|
+
function rf(a,b){var c;return K(function(d){c=Nb;return b==c.ha?a.i?t(d,a.i.remove(0,Infinity),0):d["return"]():t(d,of(a,b,function(){var e=a.s.duration;0>=e?ff(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=Nb;return a==c.ha?d["return"]():t(d,of(b,a,function(){b.g.currentTime-=.001;ff(b,a)}),0)})};
|
|
179
|
+
function sf(a,b,c,d,e){var f;return K(function(g){f=Nb;return b==f.ha?(a.i.C=c,Xe(a.i,d,e),g["return"]()):t(g,Promise.all([of(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;ff(a,b)}),of(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;ff(a,b)}),of(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;ff(a,b)})]),0)})}
|
|
180
|
+
q.endOfStream=function(a){var b=this;return K(function(c){return t(c,tf(b,function(){gf(b)||(a?b.s.endOfStream(a):b.s.endOfStream())}),0)})};q.Ga=function(a){var b=this;return K(function(c){return t(c,tf(b,function(){b.s.duration=a}),0)})};q.getDuration=function(){return this.s.duration};function ff(a,b){var c=a.l[b][0];c&&(c.p.resolve(),uf(a,b))}function of(a,b,c){Sc(a.J);c={start:c,p:new Ob};a.l[b].push(c);1==a.l[b].length&&vf(a,b);return c.p}
|
|
181
|
+
function tf(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Sc(a.J);c=[];d={};for(e in a.j)d.Db=new Ob,f={start:function(l){return function(){return l.Db.resolve()}}(d),p:d.Db},a.l[e].push(f),c.push(d.Db),1==a.l[e].length&&f.start(),d={Db:d.Db};y(k,2);return t(k,Promise.all(c),4);case 4:ta(k,3);break;case 2:throw g=C(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.j)uf(a,h)}x(k)}})}function uf(a,b){a.l[b].shift();vf(a,b)}
|
|
182
|
+
function vf(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d)),uf(a,b)}}function nf(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(ld()||md("Xbox One"))&&"mp4"==a.K[d].split(";")[0].split("/")[1]&&(b=pe(b));return b}var cf=window.URL.createObjectURL;function wf(a,b){a=xf(a);b=xf(b);return a.split("-")[0]==b.split("-")[0]}function yf(a,b){a=xf(a);b=xf(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function zf(a,b){a=xf(a);b=xf(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function xf(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Af.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Bf(a,b){a=xf(a);b=xf(b);return b==a?4:yf(b,a)?3:zf(b,a)?2:yf(a,b)?1:0}
|
|
183
|
+
function Cf(a){return a.language?xf(a.language):a.audio&&a.audio.language?xf(a.audio.language):a.video&&a.video.language?xf(a.video.language):"und"}
|
|
184
|
+
function Df(a,b){for(var c=xf(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(xf(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,yf(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,zf(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,yf(c,f))return f;return null}
|
|
185
|
+
var Af=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",
|
|
185
186
|
"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",
|
|
186
187
|
"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",
|
|
187
188
|
"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",
|
|
188
189
|
"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",
|
|
189
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function
|
|
190
|
-
function
|
|
191
|
-
function
|
|
192
|
-
function
|
|
193
|
-
function
|
|
194
|
-
function
|
|
190
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ef(a,b){var c=Ff(a.variants,b);c=Gf(c);c=Hf(c);var d=If(c);a.variants=a.variants.filter(function(e){return Jf(e)==d?!0:!1})}function Gf(a){var b=new uc;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Jf(c);b.push(d,c)}return b}
|
|
191
|
+
function Hf(a){var b=0,c=new Map,d=a.size();vc(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 uc);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}function If(a){var b="",c=Infinity;vc(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}
|
|
192
|
+
function Jf(a){var b="";a.video&&(b=gd(a.video.codecs));var c="";a.audio&&(c=gd(a.audio.codecs));return b+"-"+c}
|
|
193
|
+
function Kf(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}
|
|
194
|
+
function Lf(a,b,c){c.variants=c.variants.filter(function(d){if(a&&a.N&&!ae(a,d))return!1;var e=d.audio;d=d.video;return e&&!df(e)||d&&!df(d)||md("Xbox One")&&d&&(d.width&&1920<d.width||d.height&&1080<d.height)&&d.codecs.includes("avc1.")||e&&b&&b.audio&&!Mf(e,b.audio)||d&&b&&b.video&&!Mf(d,b.video)?!1:!0});c.textStreams=c.textStreams.filter(function(d){return Ue(dd(d.mimeType,d.codecs))})}function Mf(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
195
|
+
function Nf(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,
|
|
195
196
|
frameRate:null,pixelAspectRatio:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=
|
|
196
197
|
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}
|
|
197
|
-
function
|
|
198
|
-
function
|
|
199
|
-
function
|
|
200
|
-
function
|
|
201
|
-
function
|
|
202
|
-
function
|
|
203
|
-
function
|
|
204
|
-
q.chooseVariant=function(){var a
|
|
205
|
-
q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){var c=this.h;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;
|
|
206
|
-
q.setVariants=function(a){this.g=a};q.playbackRateChanged=function(a){this.l=a};q.configure=function(a){this.o=a};function
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
function
|
|
210
|
-
|
|
211
|
-
function
|
|
212
|
-
function
|
|
213
|
-
|
|
214
|
-
function
|
|
215
|
-
|
|
216
|
-
q.
|
|
217
|
-
q
|
|
218
|
-
q.
|
|
219
|
-
T.prototype.getSegmentAvailabilityStart=T.prototype.
|
|
220
|
-
T.prototype.setClockOffset=T.prototype.
|
|
221
|
-
function
|
|
222
|
-
d>=a.C.
|
|
223
|
-
function
|
|
224
|
-
function
|
|
225
|
-
function
|
|
226
|
-
l-3);h<k&&(h=
|
|
227
|
-
function
|
|
228
|
-
function
|
|
229
|
-
q.find=function(a){for(var b=this.
|
|
230
|
-
q.
|
|
231
|
-
q.
|
|
232
|
-
q.
|
|
233
|
-
U.prototype.updateEvery=U.prototype.
|
|
234
|
-
|
|
235
|
-
q.clone=function(){var a=new
|
|
236
|
-
q.
|
|
237
|
-
function
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
function
|
|
241
|
-
function
|
|
242
|
-
function
|
|
243
|
-
function
|
|
244
|
-
k<(g||0)-f-Math.max(a.A.minBufferTime||0,a.o.rebufferingGoal)||b.
|
|
245
|
-
function
|
|
246
|
-
(m=
|
|
247
|
-
|
|
248
|
-
8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.m||!f.every(function(k){return k.endOfStream})){h.B(0);break}return t(h,b.D.
|
|
249
|
-
function
|
|
250
|
-
g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,
|
|
251
|
-
function
|
|
252
|
-
function
|
|
253
|
-
if(a.l)return p["return"]();b.
|
|
254
|
-
function
|
|
255
|
-
case 4:return n=v.h,
|
|
256
|
-
function
|
|
257
|
-
k=k.reader.
|
|
258
|
-
function
|
|
259
|
-
function
|
|
260
|
-
function
|
|
261
|
-
function
|
|
262
|
-
function
|
|
263
|
-
function
|
|
264
|
-
function
|
|
265
|
-
q.append=function(a){function b(g){return g.spacer?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):g.payload}var c=a.map(function(g){if(g.nestedCues.length){var h=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={
|
|
266
|
-
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)-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&&(
|
|
198
|
+
function Of(a){return{id:a.id,active:!1,type:"text",bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:a.originalId}}
|
|
199
|
+
function Pf(a){a.__shaka_id||(a.__shaka_id=Qf++);return a.__shaka_id}function Rf(a){var b=Sf(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]);return b}
|
|
200
|
+
function Sf(a){return{id:Pf(a),active:!1,type:"",bandwidth:0,language:xf(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
|
|
201
|
+
function Tf(a){return a.allowedByApplication&&a.allowedByKeySystem}function Uf(a){return a.filter(function(b){return Tf(b)})}
|
|
202
|
+
function Ff(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)))}
|
|
203
|
+
function Vf(a,b,c){var d=a,e=a.filter(function(h){return h.primary});e.length&&(d=e);var f=d.length?d[0].language:"";d=d.filter(function(h){return h.language==f});if(b){var g=Df(xf(b),a.map(function(h){return h.language}));g&&(d=a.filter(function(h){return xf(h.language)==g}))}if(c){if(a=Wf(d,c),a.length)return a}else if(a=d.filter(function(h){return 0==h.roles.length}),a.length)return a;a=d.map(function(h){return h.roles}).reduce(Hb,[]);return a.length?Wf(d,a[0]):d}
|
|
204
|
+
function Wf(a,b){return a.filter(function(c){return c.roles.includes(b)})}var Qf=0;function Xf(){this.m=null;this.i=!1;this.h=new Na;this.g=[];this.l=1;this.s=!1;this.o=this.j=null}q=Xf.prototype;q.stop=function(){this.m=null;this.i=!1;this.g=[];this.l=1;this.j=null};q.init=function(a){this.m=a};
|
|
205
|
+
q.chooseVariant=function(){var a=Yf(this.o.restrictions,this.g),b=this.h.getBandwidthEstimate(this.o.defaultBandwidthEstimate);this.g.length&&!a.length&&(a=Yf(null,this.g),a=[a[0]]);var c=a[0]||null;a=r(fb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.l)?1:Math.abs(this.l);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.o.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.o.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.j=Date.now();return c};
|
|
206
|
+
q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){var c=this.h;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;La(c.h,e,d);La(c.i,e,d)}if(null!=this.j&&this.i)a:{if(!this.s){if(!(128E3<=this.h.g))break a;this.s=!0}else if(Date.now()-this.j<1E3*this.o.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(this.o.defaultBandwidthEstimate);c&&this.m(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.o.defaultBandwidthEstimate)};
|
|
207
|
+
q.setVariants=function(a){this.g=a};q.playbackRateChanged=function(a){this.l=a};q.configure=function(a){this.o=a};function Yf(a,b){a&&(b=b.filter(function(c){return Kf(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}L("shaka.abr.SimpleAbrManager",Xf);Xf.prototype.configure=Xf.prototype.configure;Xf.prototype.playbackRateChanged=Xf.prototype.playbackRateChanged;Xf.prototype.setVariants=Xf.prototype.setVariants;
|
|
208
|
+
Xf.prototype.getBandwidthEstimate=Xf.prototype.getBandwidthEstimate;Xf.prototype.segmentDownloaded=Xf.prototype.segmentDownloaded;Xf.prototype.disable=Xf.prototype.disable;Xf.prototype.enable=Xf.prototype.enable;Xf.prototype.chooseVariant=Xf.prototype.chooseVariant;Xf.prototype.init=Xf.prototype.init;Xf.prototype.stop=Xf.prototype.stop;function Zf(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)}Zf.prototype.add=function(a){return $f(this.h,a)?(this.g.add(a),!0):!1};function $f(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&&ag(c,d)&&bg(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(ag(c,d)&&bg(c.roles,d.roles)));return c?!1:!0}
|
|
209
|
+
Zf.prototype.values=function(){return this.g.values()};function ag(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return gd(g)}),d=b.codecs.split(",").map(function(g){return gd(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(db(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
|
|
210
|
+
function bg(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 cg(a){this.g=a;this.h=new dg(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}cg.prototype.create=function(a){var b=this,c=a.filter(function(d){return $f(b.g,d)});return c.length?new Zf(c[0],c):this.h.create(a)};function dg(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
211
|
+
dg.prototype.create=function(a){var b=[];b=eg(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=fg(b,this.j);a.length&&(b=a);this.g&&(a=Ff(b,this.g),a.length&&(b=a));this.h&&(a=gg(b,this.h),a.length&&(b=a));a=new Zf(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,$f(a.h,c)&&a.add(c);return a};function eg(a,b){var c=xf(b),d=Df(c,a.map(function(e){return Cf(e)}));return d?a.filter(function(e){return d==Cf(e)}):[]}
|
|
212
|
+
function fg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function gg(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function hg(){this.g=ig;this.h=(new Map).set(ig,2).set(jg,1)}function kg(a,b,c){a.h.set(ig,c).set(jg,b)}var jg=0,ig=1;function lg(){}function mg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=ng[d.toLowerCase()]))return k["return"](e);if(f=og(a))if(g=pg[f])return k["return"](g);return d?k.B(2):t(k,qg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=ng[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
|
|
213
|
+
function qg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=Jc([a],c),d.method="HEAD",t(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function og(a){a=(new nb(a)).ra.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}L("shaka.media.ManifestParser",lg);lg.unregisterParserByMime=function(a){delete ng[a]};lg.registerParserByMime=function(a,b){ng[a]=b};
|
|
214
|
+
lg.registerParserByExtension=function(a,b){pg[a]=b};var ng={},pg={};function rg(a,b,c){this.ua=a;this.h=b;this.g=c}rg.prototype.Pb=function(){return this.h};rg.prototype.Lb=function(){return this.g};function sg(a,b){return a&&b?a.Pb()==b.Pb()&&a.Lb()==b.Lb()&&Cc(a.ua(),b.ua()):a==b}L("shaka.media.InitSegmentReference",rg);rg.prototype.getEndByte=rg.prototype.Lb;rg.prototype.getStartByte=rg.prototype.Pb;
|
|
215
|
+
function tg(a,b,c,d,e,f,g,h,k){this.startTime=a;this.endTime=b;this.j=c;this.h=d;this.g=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k}q=tg.prototype;q.ua=function(){return this.j()};q.Ie=function(){return this.startTime};q.ve=function(){return this.endTime};q.Pb=function(){return this.h};q.Lb=function(){return this.g};L("shaka.media.SegmentReference",tg);tg.prototype.getEndByte=tg.prototype.Lb;tg.prototype.getStartByte=tg.prototype.Pb;tg.prototype.getEndTime=tg.prototype.ve;
|
|
216
|
+
tg.prototype.getStartTime=tg.prototype.Ie;tg.prototype.getUris=tg.prototype.ua;function T(a,b,c){this.j=a;this.Cc=b;this.m=this.l=Infinity;this.g=1;this.h=this.i=null;this.s=0;this.u=!0;this.C=0;this.F=void 0===c?!0:c}q=T.prototype;q.getDuration=function(){return this.l};q.Ae=function(){return this.g};q.Ga=function(a){this.l=a};q.He=function(){return this.j};q.be=function(a){this.s=a};q.$b=function(a){this.u=a};q.xd=function(a){this.m=a};q.jf=function(a){this.Cc=a};q.ue=function(){return this.Cc};
|
|
217
|
+
q.xb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.jd(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.F&&(this.j=(Date.now()+this.s)/1E3-this.h-this.g)}};q.jd=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.hd=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.Y=function(){return Infinity==this.l&&!this.u};
|
|
218
|
+
q.bb=function(){return Infinity!=this.l&&!this.u};q.Na=function(){return Math.max(this.C,this.Ta()-this.m)};q.ce=function(a){this.C=a};q.Ta=function(){return this.Y()||this.bb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.j),this.l):this.h||this.l};q.Ob=function(a){var b=Math.max(this.i,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ta()-this.m+a,this.Ma()))};q.tb=function(){return this.Ob(0)};
|
|
219
|
+
q.Ma=function(){return Math.max(0,this.Ta()-(this.Y()||this.bb()?this.Cc:0))};q.fe=function(){return null==this.j||null!=this.h&&this.F?!1:!0};L("shaka.media.PresentationTimeline",T);T.prototype.usingPresentationStartTime=T.prototype.fe;T.prototype.getSeekRangeEnd=T.prototype.Ma;T.prototype.getSeekRangeStart=T.prototype.tb;T.prototype.getSafeSeekRangeStart=T.prototype.Ob;T.prototype.getSegmentAvailabilityEnd=T.prototype.Ta;T.prototype.setUserSeekStart=T.prototype.ce;
|
|
220
|
+
T.prototype.getSegmentAvailabilityStart=T.prototype.Na;T.prototype.isInProgress=T.prototype.bb;T.prototype.isLive=T.prototype.Y;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.hd;T.prototype.notifyMinSegmentStartTime=T.prototype.jd;T.prototype.notifySegments=T.prototype.xb;T.prototype.getDelay=T.prototype.ue;T.prototype.setDelay=T.prototype.jf;T.prototype.setSegmentAvailabilityDuration=T.prototype.xd;T.prototype.setStatic=T.prototype.$b;
|
|
221
|
+
T.prototype.setClockOffset=T.prototype.be;T.prototype.getPresentationStartTime=T.prototype.He;T.prototype.setDuration=T.prototype.Ga;T.prototype.getMaxSegmentDuration=T.prototype.Ae;T.prototype.getDuration=T.prototype.getDuration;function ug(a,b){this.j=a;this.m=vg(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.s=b;this.i=function(){}}ug.prototype.release=function(){this.j=null;this.i=function(){}};function wg(a,b){a.i=b}function xg(a){this.g=a}function vg(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(ye(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 yg(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.o=c;this.u=e;this.h=new Tc;this.s=!1;this.F=a.readyState;this.j=!1;this.i=d;this.m=!1;this.h.v(a,"waiting",function(){return zg(f)});this.l=(new Q(function(){zg(f)})).xa(.25)}yg.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.C=this.u=null};yg.prototype.md=function(){this.m=!0;zg(this)};
|
|
222
|
+
function zg(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.j=!1,a.F=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=vg(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.s&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.o.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=ze(b,g);if(!(null==c||0==c&&!a.m||(d=b.start(c),
|
|
223
|
+
d>=a.C.Ma()))){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 R("largegap",g),g.cancelable=!0,a.u(g),a.o.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ag(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Bg.value().get(b),c.pa(a,b,d))}var Bg=new Pb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Cg(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new Tc;this.i=new Dg(a);Ag(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Eg(d,d.j)})}Cg.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 Fg(a){return a.m?a.g.currentTime:a.j}function Gg(a,b){0<a.g.readyState?Kg(a.i,b):Ag(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Eg(a,a.j)})}
|
|
224
|
+
function Eg(a,b){.001>Math.abs(a.g.currentTime-b)?Lg(a):(a.h.pa(a.g,"seeking",function(){Lg(a)}),Kg(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Lg(a){a.m=!0;a.h.v(a.g,"seeking",function(){return a.l()})}function Dg(a){var b=this;this.h=a;this.m=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--)})}Dg.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
225
|
+
function Kg(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.xa(.1)};function Mg(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.pa(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 Tc;Ag(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Mg.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Mg.prototype.u=function(a){this.i=this.j?this.i:a};Mg.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Mg.prototype.F=function(){};
|
|
226
|
+
function Ng(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.I=b.minBufferTime||0;this.o=c;this.C=e;this.s=null;this.j=new yg(a,b.presentationTimeline,c,Og(a,c),f);this.h=new Cg(a,function(){a:{var h=g.j;h.s=!0;h.m=!1;h.j=!1;var k=Fg(g.h);h=Pg(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;Gg(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Qg(this,d));this.m=(new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Fg(g.h),k=g.g.tb(),l=g.g.Ma();3>l-k&&(k=
|
|
227
|
+
l-3);h<k&&(h=Pg(g,h),g.i.currentTime=h)}})).xa(.25)}Ng.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.o=null;this.C=function(){}};Ng.prototype.u=function(a){Gg(this.h,a)};Ng.prototype.l=function(){var a=Fg(this.h);return 0<this.i.readyState&&!this.i.paused?Rg(this,a):a};
|
|
228
|
+
function Qg(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.tb():a.g.Ma():0>b&&(b=a.g.Ma()+b);return Sg(a,Rg(a,b))}Ng.prototype.F=function(){this.j.md()};function Sg(a,b){var c=a.g.getDuration();return b>=c?c-a.o.durationBackoff:b}function Pg(a,b){var c=Math.max(a.I,a.o.rebufferingGoal),d=a.o.safeSeekOffset,e=a.g.tb(),f=a.g.Ma(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ob(c),k=a.g.Ob(d);c=a.g.Ob(c+d);return b>=g?Sg(a,b):b>f?f:b<e?we(a.i.buffered,k)?k:c:b>=h||we(a.i.buffered,b)?b:c}
|
|
229
|
+
function Rg(a,b){var c=a.g.tb();if(b<c)return c;c=a.g.Ma();return b>c?c:b}function Og(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ug(new xg(a),b.stallThreshold);wg(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=U.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.M=[],this.g&&this.g.stop(),this.g=null)};q.Qe=function(){this.i=!0};
|
|
230
|
+
q.find=function(a){for(var b=this.M.length-1,c=b;0<=c;--c){var d=this.M[c],e=c<b?this.M[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.M.length&&a<this.M[0].startTime?this.h:null};q.get=function(a){if(0==this.M.length)return null;a-=this.h;return 0>a||a>=this.M.length?null:this.M[a]};q.offset=function(a){if(!this.i)for(var b=r(this.M),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
|
|
231
|
+
q.xc=function(a){!this.i&&a.length&&(this.M=this.M.filter(function(b){return b.startTime<a[0].startTime}),this.M.push.apply(this.M,ha(a)))};q.vb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.M.length||d.endTime>c.M[0].startTime)});this.xc(a);this.Ya(b)};q.Ya=function(a){if(!this.i){var b=this.M.length;this.M=this.M.filter(function(c){return c.endTime>a});this.h+=b-this.M.length}};
|
|
232
|
+
q.Sa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new tg(a.startTime,b,a.j,a.h,a.g,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd))}};
|
|
233
|
+
q.Ec=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.M.push.apply(c.M,ha(d)):(c.g.stop(),c.g=null)}),this.g.xa(a))};U.prototype[Symbol.iterator]=function(){return this.sb(0)};U.prototype.sb=function(a){a=this.find(a);return null==a?null:new Tg(this,a)};function Ug(a,b,c){return new U([new tg(a,a+b,function(){return c},0,null,null,a,a,a+b)])}L("shaka.media.SegmentIndex",U);U.forSingleSegment=Ug;U.prototype.getIteratorForTime=U.prototype.sb;
|
|
234
|
+
U.prototype.updateEvery=U.prototype.Ec;U.prototype.fit=U.prototype.Sa;U.prototype.evict=U.prototype.Ya;U.prototype.mergeAndEvict=U.prototype.vb;U.prototype.merge=U.prototype.xc;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.Qe;U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function Tg(a,b){this.h=a;this.g=b}
|
|
235
|
+
Tg.prototype.seek=function(a){this.g=(a=this.h.sb(a))?a.g:Number.MAX_VALUE;return this.next().value};Tg.prototype.current=function(){return this.h.get(this.g-1)};Tg.prototype.next=function(){var a=this.h.get(this.g++);return{value:a,done:!a}};L("shaka.media.SegmentIterator",Tg);Tg.prototype.next=Tg.prototype.next;Tg.prototype.current=Tg.prototype.current;Tg.prototype.seek=Tg.prototype.seek;function Vg(){U.call(this,[]);this.j=[]}oa(Vg,U);q=Vg.prototype;
|
|
236
|
+
q.clone=function(){var a=new Vg;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.M.length}return null};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.M.length}return null};q.offset=function(){};q.xc=function(){};
|
|
237
|
+
q.Ya=function(){};q.vb=function(){};q.Sa=function(){};q.Ec=function(){};L("shaka.media.MetaSegmentIndex",Vg);Vg.prototype.updateEvery=Vg.prototype.Ec;Vg.prototype.fit=Vg.prototype.Sa;Vg.prototype.mergeAndEvict=Vg.prototype.vb;Vg.prototype.evict=Vg.prototype.Ya;Vg.prototype.merge=Vg.prototype.xc;Vg.prototype.offset=Vg.prototype.offset;Vg.prototype.get=Vg.prototype.get;Vg.prototype.find=Vg.prototype.find;Vg.prototype.release=Vg.prototype.release;function Wg(a){var b=this;this.g=a;this.j=!1;this.i=this.g.uc();this.h=new Q(function(){b.g.Ud(.25*b.i)})}Wg.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Wg.prototype.set=function(a){this.i=a;Xg(this)};Wg.prototype.sc=function(){return this.g.sc()};function Xg(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.uc()!=b&&a.g.wd(b);return}catch(c){}a.h.xa(.25);0!=a.g.uc()&&a.g.wd(0)};function Yg(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Zg(b,!1)})).xa(.25)}Yg.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()};
|
|
238
|
+
function Zg(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.l.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.j.get(h),l=e<h.startTime?$g:e>h.endTime?ah:bh;d.j.set(h,l);for(var m=r(d.m),n=m.next();!n.done;n=m.next())n=n.value,n.lb==k&&n.kb==l&&n.ab(h,f)}}};function ch(a){var b=this;this.h=function(){};this.g=new Set;this.j=a;this.i=(new Q(function(){for(var c=b.j(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.g["delete"](e)})).xa(2)}ch.prototype.release=function(){this.h=function(){};this.g.clear();this.i.stop()};function dh(a,b){a.h=b};function eh(a){var b=this;this.l=a;this.j=new Map;this.g=function(){};this.h=function(){};this.i=function(){};this.m=[{lb:null,kb:bh,ab:function(c,d){return b.g(c,d)}},{lb:$g,kb:bh,ab:function(c,d){return b.g(c,d)}},{lb:ah,kb:bh,ab:function(c,d){return b.g(c,d)}},{lb:bh,kb:$g,ab:function(c,d){return b.h(c,d)}},{lb:bh,kb:ah,ab:function(c,d){return b.h(c,d)}},{lb:$g,kb:ah,ab:function(c,d){return b.i(c,d)}},{lb:ah,kb:$g,ab:function(c,d){return b.i(c,d)}}]}
|
|
239
|
+
eh.prototype.release=function(){this.l=null;this.j.clear();this.g=function(){};this.h=function(){};this.i=function(){}};function fh(a,b,c,d){a.g=b;a.h=c;a.i=d}var $g=1,bh=2,ah=3;function gh(a,b,c,d){a=Jc(a,d);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function hh(a,b){var c=this;this.D=b;this.A=a;this.o=null;this.j=1;this.i=this.h=null;this.g=new Map;this.m=!1;this.s=null;this.l=!1;this.J=new Rc(function(){return ih(c)})}hh.prototype.destroy=function(){return this.J.destroy()};function ih(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,jh(e),b.push(kh(e));return t(f,Promise.all(b),2)}a.g.clear();a.D=null;a.A=null;a.o=null;x(f)})}
|
|
240
|
+
hh.prototype.configure=function(a){this.o=a;this.s=new jc({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0},!0)};hh.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return t(b,lh(a),2);Sc(a.J);a.m=!0;x(b)})};
|
|
241
|
+
function mh(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=Nb,y(k,2),t(k,rf(a.D.R,c.ha),4);case 4:ta(k,3);break;case 2:if(d=C(k),a.D)a.D.onError(d);case 3:e=dd(b.mimeType,b.codecs);ef(a.D.R,e);f=a.D.R.m;if(g=f.isTextVisible()||a.o.alwaysStreamText)h=nh(b),a.g.set(c.ha,h),oh(a,h,0);x(k)}})}function ph(a){var b=a.g.get("text");b&&(jh(b),kh(b)["catch"](function(){}),a.g["delete"]("text"));a.i=null}
|
|
242
|
+
function qh(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.hb&&(rh(a,e,!1,0,!1),c.hb=d)}else if(d=c.hb)c.hb=null,rh(a,d,!0,0,!1)}}function sh(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.m&&(b.video&&rh(a,b.video,c,d,e),b.audio&&rh(a,b.audio,c,d,e))}function th(a,b){a.i=b;a.m&&rh(a,b,!0,0,!1)}
|
|
243
|
+
function rh(a,b,c,d,e){var f=a.g.get(b.type);f||"text"!=b.type?f&&(f.hb&&(b.trickModeVideo?(f.hb=b,b=b.trickModeVideo):f.hb=null),f.stream!=b||e)&&("text"==b.type&&ef(a.D.R,dd(b.mimeType,b.codecs)),f.stream=b,f.aa=null,c&&(f.Jb?f.Hc=!0:f.Ua?(f.jb=!0,f.pc=d,f.Hc=!0):(jh(f),uh(a,f,!0,d)["catch"](function(g){if(a.D)a.D.onError(g)}))),vh(a,f)["catch"](function(g){if(a.D)a.D.onError(g)})):mh(a,b)}
|
|
244
|
+
function vh(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.qa)return e["return"]();c=b.stream;d=b.qa;return c.segmentIndex?e.B(2):t(e,c.createSegmentIndex(),2)}if(b.qa!=d||b.stream!=c)return e["return"]();var f=a.D.tc();var g=kf(a.D.R,b.type),h=b.stream.segmentIndex.find(b.va?b.va.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.g?k.g-k.h:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.g?k.g-k.h:null)||0),k=a.D.getBandwidthEstimate(),f=8*h/
|
|
245
|
+
k<(g||0)-f-Math.max(a.A.minBufferTime||0,a.o.rebufferingGoal)||b.qa.h.g>h?!0:!1):f=!1;f&&b.qa.abort();x(e)})}function wh(a,b){b.Jb||b.jb||(b.Ua?(b.jb=!0,b.pc=0):null==hf(a.D.R,b.type)?null==b.Qa&&oh(a,b,0):(jh(b),uh(a,b,!1,0)["catch"](function(c){if(a.D)a.D.onError(c)})))}
|
|
246
|
+
function lh(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=Nb;if(!a.h)throw new O(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.Wa,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.Ka,a.h.video),d.add(a.h.video));a.i&&(c.set(b.ha,a.i),d.add(a.i));e=a.D.R;f=a.o.forceTransmuxTS;return t(n,e.init(c,f),2)}Sc(a.J);var p=a.A.presentationTimeline.getDuration();Infinity>p?a.D.R.Ga(p):a.D.R.Ga(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)||
|
|
247
|
+
(m=nh(l),a.g.set(k,m),oh(a,m,0));x(n)})}function nh(a){return{stream:a,type:a.type,aa:null,va:null,wc:null,fd:null,ed:null,dd:null,hb:null,endOfStream:!1,Ua:!1,Qa:null,jb:!1,pc:0,Hc:!1,Jb:!1,pd:!1,Rb:!1,qa:null}}
|
|
248
|
+
hh.prototype.Ub=function(a){var b=this,c,d,e,f,g;return K(function(h){switch(h.g){case 1:Sc(b.J);if(a.Ua||null==a.Qa||a.Jb)return h["return"]();a.Qa=null;if(!a.jb){h.B(2);break}return t(h,uh(b,a,a.Hc,a.pc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.B(4);break}c=a.stream;return t(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.Qa&&oh(b,a,0),h["return"]();case 4:y(h,6);d=xh(b,a);null!=d&&(oh(b,a,d),a.Rb=!1);ta(h,7);break;case 6:return e=C(h),t(h,yh(b,e),
|
|
249
|
+
8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.m||!f.every(function(k){return k.endOfStream})){h.B(0);break}return t(h,b.D.R.endOfStream(),10);case 10:Sc(b.J),g=b.D.R.getDuration(),0!=g&&g<b.A.presentationTimeline.getDuration()&&b.A.presentationTimeline.Ga(g),x(h)}})};
|
|
250
|
+
function xh(a,b){if(zh(b))return pf(a.D.R,b.stream.originalId||""),null;"text"==b.type&&qf(a.D.R);var c=a.D.tc(),d=b.va?b.va.endTime:c,e=lf(a.D.R,b.type,c),f=Math.max(a.A.minBufferTime||0,a.o.rebufferingGoal,a.o.bufferingGoal)*a.j;if(d>=a.A.presentationTimeline.getDuration())return b.endOfStream=!0,"video"==b.type&&(c=a.g.get("text"))&&zh(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=kf(a.D.R,b.type);e=Ah(a,b,c,e);if(!e||!Bh(a,e))return 1;f=Infinity;var g=Array.from(a.g.values());
|
|
251
|
+
g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,zh(h)||h.aa&&!h.aa.current()||(f=Math.min(f,h.va?h.va.endTime:c));if(d>=f+a.A.presentationTimeline.g)return 1;Ch(a,b,c,e)["catch"](function(){});return null}
|
|
252
|
+
function Ah(a,b,c,d){if(b.aa)return b.aa.current();if(b.va||d)return b.aa=b.stream.segmentIndex.sb(b.va?b.va.endTime:d),b.aa&&b.aa.next().value;b.aa=b.stream.segmentIndex.sb(Math.max(c-a.o.inaccurateManifestTolerance,0));d=b.aa&&b.aa.next().value;d&&Bh(a,d)||(b.aa=b.stream.segmentIndex.sb(c),d=b.aa&&b.aa.next().value);return d}function Bh(a,b){var c=a.A.presentationTimeline,d=c.Ta();return b.endTime<c.Na()||b.startTime>d?!1:!0}
|
|
253
|
+
function Ch(a,b,c,d){var e,f,g,h,k,l,m,n;return K(function(p){switch(p.g){case 1:return e=Nb,f=b.stream,g=b.aa,b.Ua=!0,y(p,2),t(p,Dh(a,b,d),4);case 4:Sc(a.J);if(a.l)return p["return"]();h=Eh(a,b,d);return t(p,h,5);case 5:return k=p.h,Sc(a.J),a.l?p["return"]():b.jb?(b.Ua=!1,oh(a,b,0),p["return"]()):t(p,Fh(a,b,c,f,d,k),6);case 6:Sc(a.J);if(a.l)return p["return"]();b.va=d;g.next();b.Ua=!1;b.pd=!1;l=a.D.R.rc();m=l[b.type];JSON.stringify(m);b.jb||a.D.md();oh(a,b,0);ta(p,0);break;case 2:n=C(p);Sc(a.J,n);
|
|
254
|
+
if(a.l)return p["return"]();b.Ua=!1;if(7001==n.code)b.Ua=!1,b.Qa=null,oh(a,b,0),p.B(0);else if(b.type==e.ha&&a.o.ignoreTextStreamFailures)a.g["delete"](e.ha),p.B(0);else if(3017==n.code)Gh(a,b,n),p.B(0);else return b.Rb=!0,n.severity=2,t(p,yh(a,n),0)}})}function Gh(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.pd})){var d=Math.round(100*a.j);if(20<d)a.j-=.2;else if(4<d)a.j-=.04;else{b.Rb=!0;a.l=!0;a.D.onError(c);return}b.pd=!0}oh(a,b,4)}
|
|
255
|
+
function Dh(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.fd||e!=b.ed||f!=b.dd)h=function(){var n;return K(function(p){if(1==p.g)return y(p,2),b.ed=e,b.dd=f,b.fd=g,t(p,sf(a.D.R,b.type,g,e,f),4);if(2!=p.g)return ta(p,0);n=C(p);b.ed=null;b.dd=null;b.fd=null;throw n;})},d.push(h());!sg(c.i,b.wc)&&(b.wc=c.i)&&(k=Eh(a,b,c.i),l=function(){var n,p,u;return K(function(v){switch(v.g){case 1:return y(v,2),t(v,k,4);
|
|
256
|
+
case 4:return n=v.h,Sc(a.J),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,t(v,mf(a.D.R,b.type,n,null,null,p),5);case 5:ta(v,0);break;case 2:throw u=C(v),b.wc=null,u;}})},d.push(l()));return t(m,Promise.all(d),0)})}
|
|
257
|
+
function Fh(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 ge).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Wb();var n=k.reader.Wb();var p=k.reader.O();var u=k.reader.O();var v=k.reader.O();var z=k.reader.O();var w=e.startTime+u/p}else p=k.reader.O(),w=k.reader.fb()/p+e.timestampOffset,u=w-e.startTime,v=k.reader.O(),z=k.reader.O(),m=k.reader.Wb(),n=k.reader.Wb();
|
|
258
|
+
k=k.reader.eb(k.reader.T.byteLength-k.reader.H);l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.D.Ue():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:u,eventDuration:v,id:z,messageData:k}),l=new R(Hh,l),a.D.onEvent(l)))}).parse(f),t(h,Ih(a,b,c),2);if(3!=h.g)return Sc(a.J),t(h,mf(a.D.R,b.type,f,e.startTime,e.endTime,g),3);Sc(a.J);x(h)})}
|
|
259
|
+
function Ih(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.o.bufferBehind,a.A.presentationTimeline.g);e=hf(a.D.R,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():t(h,a.D.R.remove(b.type,e,e+g),2)}Sc(a.J);x(h)})}function zh(a){return a&&"text"==a.type&&"application/cea-608"==a.stream.mimeType}
|
|
260
|
+
function Eh(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=Qc,e=gh(c.ua(),c.h,c.g,a.o.retryParameters),f=a.D.wb.request(d,e),b.qa=f,t(h,f.promise,2);g=h.h;b.qa=null;return h["return"](g.data)})}
|
|
261
|
+
function uh(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.jb=!1,b.Hc=!1,b.pc=0,b.Jb=!0,b.va=null,b.wc=null,b.aa=null,d?(e=a.D.tc(),f=a.D.R.getDuration(),t(g,a.D.R.remove(b.type,e+d,f),3)):t(g,rf(a.D.R,b.type),4);if(3!=g.g)return Sc(a.J),c?t(g,a.D.R.flush(b.type),3):g.B(3);Sc(a.J);b.Jb=!1;b.endOfStream=!1;oh(a,b,0);x(g)})}
|
|
262
|
+
function oh(a,b,c){var d=b.type;if("text"!=d||a.g.has(d))b.Qa=(new ic(function(){var e;return K(function(f){if(1==f.g)return y(f,2),t(f,a.Ub(b),4);if(2!=f.g)return ta(f,0);e=C(f);if(a.D)a.D.onError(e);x(f)})})).W(c)}function jh(a){null!=a.Qa&&(a.Qa.stop(),a.Qa=null)}function kh(a){return K(function(b){return a.qa?t(b,a.qa.abort(),0):b.B(0)})}function yh(a,b){return K(function(c){if(1==c.g)return t(c,lc(a.s),2);Sc(a.J);a.D.onError(b);b.handled||a.o.failureCallback(b);x(c)})};function Jh(a,b){var c=Kh(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Lh(d)});this.J=new Rc(function(){return Mh(d)})}Jh.prototype.destroy=function(){return this.J.destroy()};function Mh(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Nh(a),t(e,a.u,2);a.g&&a.g.Ea.cb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ea.cb();a.g=null;a.m=[];a.j=null;x(e)})}
|
|
263
|
+
function Oh(a,b){var c={yb:function(){},yc:function(){},cb:function(){},onError:function(){},Ac:function(){},Vf:function(){}};a.m.push({create:b,Ea:c});a.h&&a.h.abort();Nh(a);return c}
|
|
264
|
+
function Lh(a){return K(function(b){if(a.J.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.$a)var c=!1;else{a.g&&(a.g.Ea.cb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ea.yb(),a.g={node:d.node,payload:d.payload,$a:d.$a,Ea:c.Ea}):c.Ea.Ac();c=!0}c?c=Promise.resolve():a.g?c=Ph(a):(a.j.Te(a.i),a.s=new Ob,c=a.s);b=t(b,c,1)}return b})}
|
|
265
|
+
function Ph(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Ce(a.i,a.l,a.g.node,a.g.payload),y(d,2),a.h=a.j.re(a.i,a.l,a.g.payload),t(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ea.yc(),a.g=null);ta(d,0);break;case 2:b=C(d);if(7001==b.code)a.g.Ea.cb();else a.g.Ea.onError(b);a.g=null;a.h=null;c=a;return t(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,x(d)}})}function Nh(a){a.s&&(a.s.resolve(),a.s=null)};function Qh(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=Qh.prototype;q.remove=function(a,b){if(!this.g)return!1;Rh(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
266
|
+
q.append=function(a){function b(g){return g.spacer?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):g.payload}var c=a.map(function(g){if(g.nestedCues.length){var h=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={mb:e.mb},f=c.next())e.mb=f.value,a.some(function(g){return function(h){return h.startTime==g.mb.startTime&&h.endTime==g.mb.endTime&&h.text==g.mb.payload?!0:!1}}(e))||(f=Sh(e.mb))&&
|
|
267
|
+
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)-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&&(Rh(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};
|
|
267
268
|
q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
268
|
-
function
|
|
269
|
-
function
|
|
270
|
-
window&&(this.m=new ResizeObserver(function(){
|
|
271
|
-
q.destroy=function(){this.s.removeChild(this.i);this.i=null;this.u=!1;this.
|
|
272
|
-
function
|
|
273
|
-
h.endTime-k.endTime});e=r(e);for(f=e.next();!f.done;f=e.next())
|
|
274
|
-
function
|
|
275
|
-
""==c.backgroundColor&&(e.backgroundColor="transparent")),c.backgroundImage&&c.region&&(b=c.region.widthUnits==
|
|
276
|
-
c.fontFamily,e.fontWeight=c.fontWeight.toString(),e.fontStyle=c.fontStyle,e.letterSpacing=c.letterSpacing,e.fontSize
|
|
277
|
-
|
|
278
|
-
e.writingMode=c.writingMode,"writingMode"in document.documentElement.style&&e.writingMode==c.writingMode||(e.webkitWritingMode=c.writingMode),c.size&&(c.writingMode==
|
|
279
|
-
function
|
|
280
|
-
|
|
281
|
-
function
|
|
282
|
-
k),g=!1)}return g}function
|
|
283
|
-
function
|
|
284
|
-
ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},e={retryParameters:
|
|
285
|
-
stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2};if(
|
|
269
|
+
function Sh(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}
|
|
270
|
+
function Rh(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}L("shaka.text.SimpleTextDisplayer",Qh);Qh.prototype.setTextVisibility=Qh.prototype.setTextVisibility;Qh.prototype.isTextVisible=Qh.prototype.isTextVisible;Qh.prototype.destroy=Qh.prototype.destroy;Qh.prototype.append=Qh.prototype.append;Qh.prototype.remove=Qh.prototype.remove;function Th(){}function Uh(a){for(;a.firstChild;)a.removeChild(a.firstChild)}L("shaka.util.Dom",Th);Th.removeAllChildren=Uh;function Vh(a,b){var c=this;this.u=!1;this.j=[];this.g=a;this.s=b;this.i=document.createElement("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.s.appendChild(this.i);this.C=(new Q(function(){Wh(c)})).xa(.25);this.l=new Map;this.h=new Tc;this.h.v(document,"fullscreenchange",function(){Wh(c,!0)});this.m=null;"ResizeObserver"in
|
|
271
|
+
window&&(this.m=new ResizeObserver(function(){Wh(c,!0)}),this.m.observe(this.i))}q=Vh.prototype;q.append=function(a){var b=[].concat(ha(this.j)),c={};a=r(a);for(var d=a.next();!d.done;c={bc:c.bc},d=a.next())c.bc=d.value,b.some(function(e){return function(f){return Me(f,e.bc)}}(c))||this.j.push(c.bc);Wh(this)};
|
|
272
|
+
q.destroy=function(){this.s.removeChild(this.i);this.i=null;this.u=!1;this.j=[];this.C&&this.C.stop();this.l.clear();this.h&&(this.h.release(),this.h=null);this.m&&(this.m.disconnect(),this.m=null)};q.remove=function(a,b){if(!this.i)return!1;var c=this.j.length;this.j=this.j.filter(function(d){return d.startTime<a||d.endTime>=b});Wh(this,c>this.j.length);return!0};q.isTextVisible=function(){return this.u};q.setTextVisibility=function(a){this.u=a};
|
|
273
|
+
function Wh(a,b){function c(h){return a.j.includes(h)&&a.u&&h.startTime<=d&&h.endTime>d}b=void 0===b?!1:b;for(var d=a.g.currentTime,e=r(a.l.keys()),f=e.next();!f.done;f=e.next())if(f=f.value,!c(f)||b){var g=a.l.get(f);a.i.removeChild(g);a.l["delete"](f)}e=new Set(a.l.values());f=r(Array.from(a.i.childNodes));for(g=f.next();!g.done;g=f.next())g=g.value,e.has(g)||a.i.removeChild(g);e=a.j.filter(function(h){return c(h)&&!a.l.has(h)}).sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:
|
|
274
|
+
h.endTime-k.endTime});e=r(e);for(f=e.next();!f.done;f=e.next())Xh(a,a.i,f.value)}function Yh(a,b,c,d){var e=document.createElement("span");d&&e.classList.add("shaka-nested-cue");Zh(a,e,c,!0);b.appendChild(e);return e}function Xh(a,b,c){if(c.nestedCues.length){var d=document.createElement("p");d.style.width="100%";Zh(a,d,c,!1);for(var e=0;e<c.nestedCues.length;e++)Yh(a,d,c.nestedCues[e],!0);b.appendChild(d);a.l.set(c,d)}else a.l.set(c,Yh(a,b,c,!1))}
|
|
275
|
+
function Zh(a,b,c,d){var e=b.style,f=0==c.nestedCues.length;c.spacer?(e.flexBasis="100%",e.height="0"):(e.whiteSpace="pre-line",b.textContent=c.payload,f&&(e.backgroundColor=c.backgroundColor),e.border=c.border,e.color=c.color,e.direction=c.direction,e.opacity=c.opacity,e.paddingLeft=$h(c.linePadding,c,a.s),e.paddingRight=$h(c.linePadding,c,a.s),c.backgroundImage&&(e.backgroundImage="url('"+c.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition="center",
|
|
276
|
+
""==c.backgroundColor&&(e.backgroundColor="transparent")),c.backgroundImage&&c.region&&(b=c.region.widthUnits==Re?"%":"px",e.height=c.region.height+(c.region.heightUnits==Re?"%":"px"),e.width=c.region.width+b),e.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end",f?e.display="inline-block":(e.display="flex",e.flexDirection="row",e.flexWrap="wrap",e.margin="0",e.alignItems=e.justifyContent,e.justifyContent="center"),d&&(e.maxWidth="100%"),e.fontFamily=
|
|
277
|
+
c.fontFamily,e.fontWeight=c.fontWeight.toString(),e.fontStyle=c.fontStyle,e.letterSpacing=c.letterSpacing,e.fontSize=$h(c.fontSize,c,a.s),c.line?1==c.lineInterpretation&&(e.position="absolute",c.writingMode==Fe?c.lineAlign==He?e.top=c.line+"%":"end"==c.lineAlign&&(e.bottom=c.line+"%"):"vertical-lr"==c.writingMode?c.lineAlign==He?e.left=c.line+"%":"end"==c.lineAlign&&(e.right=c.line+"%"):c.lineAlign==He?e.right=c.line+"%":"end"==c.lineAlign&&(e.left=c.line+"%")):c.region&&c.region.id&&!f&&(a=c.region.widthUnits==
|
|
278
|
+
Re?"%":"px",d=c.region.viewportAnchorUnits==Re?"%":"px",e.height=c.region.height+(c.region.heightUnits==Re?"%":"px"),e.width=c.region.width+a,e.position="absolute",e.top=c.region.viewportAnchorY+d,e.left=c.region.viewportAnchorX+d),e.lineHeight=c.lineHeight,c.position&&(c.writingMode==Fe?e.paddingLeft=c.position:e.paddingTop=c.position),"line-left"==c.positionAlign?e.cssFloat="left":"line-right"==c.positionAlign&&(e.cssFloat="right"),e.textAlign=c.textAlign,e.textDecoration=c.textDecoration.join(" "),
|
|
279
|
+
e.writingMode=c.writingMode,"writingMode"in document.documentElement.style&&e.writingMode==c.writingMode||(e.webkitWritingMode=c.writingMode),c.size&&(c.writingMode==Fe?e.width=c.size+"%":e.height=c.size+"%"))}
|
|
280
|
+
function $h(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),pf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.pf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}L("shaka.text.UITextDisplayer",Vh);Vh.prototype.setTextVisibility=Vh.prototype.setTextVisibility;Vh.prototype.isTextVisible=Vh.prototype.isTextVisible;Vh.prototype.remove=Vh.prototype.remove;
|
|
281
|
+
Vh.prototype.destroy=Vh.prototype.destroy;Vh.prototype.append=Vh.prototype.append;function ai(){}
|
|
282
|
+
function bi(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]=xc(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=xc(l)),k=bi(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?(Pa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Pa("Invalid config, unrecognized key "+
|
|
283
|
+
k),g=!1)}return g}function ci(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}L("shaka.util.ConfigUtils",ai);ai.convertToConfigObject=ci;ai.mergeConfigObjects=bi;function di(){}
|
|
284
|
+
function ei(){var a=1E6,b=Infinity;navigator.connection&&(navigator.connection.downlink&&(a=1E6*navigator.connection.downlink),navigator.connection.saveData&&(b=360));var c={retryParameters:kc(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Ud,logLicenseExchange:!1,updateExpirationTime:1},d={retryParameters:kc(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,
|
|
285
|
+
ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},e={retryParameters:kc(),failureCallback:function(h){return[h]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,
|
|
286
|
+
stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2};if(md("Web0S")||ld()||md("CrKey"))e.stallSkip=0;var f={trackSelectionCallback:function(h){return K(function(k){return k["return"](h)})},progressCallback:function(h,k){return[h,k]},usePersistentLicense:!0},g={drm:c,manifest:d,streaming:e,offline:f,abrFactory:function(){return new Xf},abr:{enabled:!0,defaultBandwidthEstimate:a,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,
|
|
286
287
|
minHeight:0,maxHeight:b,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};
|
|
287
|
-
f.trackSelectionCallback=function(h){return
|
|
288
|
-
function
|
|
289
|
-
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,"text"==g.type&&c.push(g);return c}L("shaka.util.PlayerConfiguration",
|
|
290
|
-
function
|
|
291
|
-
|
|
292
|
-
c.g=null;e=Promise.resolve();return
|
|
293
|
-
null;e==c.
|
|
294
|
-
f.g?t(f,
|
|
295
|
-
q.destroy=function(){var a=this,b;return
|
|
296
|
-
null,
|
|
297
|
-
q.
|
|
298
|
-
q.load=function(a,b,c){var d=this;if(this.m==
|
|
288
|
+
f.trackSelectionCallback=function(h){return K(function(k){return k["return"](fi(h,g.preferredAudioLanguage))})};return g}function gi(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return bi(a,b,c||ei(),d,"")}
|
|
289
|
+
function fi(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Df(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return xf(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/
|
|
290
|
+
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,"text"==g.type&&c.push(g);return c}L("shaka.util.PlayerConfiguration",di);di.mergeConfigObjects=gi;function hi(){this.g=null;this.h=[]}function ii(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 ji(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}
|
|
291
|
+
function ki(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 li(){this.i=this.h=null;this.g=[]}function mi(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 ni(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 oi(){this.m=this.s=this.I=this.C=this.l=this.i=this.F=this.j=this.K=this.N=this.P=this.u=this.S=NaN;this.h=new hi;this.g=new li};function V(a,b){wc.call(this);var c=this;this.m=pi;this.ic=this.g=null;this.Z=!1;this.h=new Tc;this.Tc=this.s=this.Fb=this.A=this.lc=this.u=this.i=this.mc=this.I=this.jc=this.F=this.Ja=this.C=this.K=this.l=this.U=null;this.Md=1E9;this.o=qi(this);this.Yc={width:Infinity,height:Infinity};this.j=null;this.ka=new dg(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount);this.Ba=this.o.preferredTextLanguage;this.Gb=this.o.preferredTextRole;this.Ic=[];b&&b(this);this.U=
|
|
292
|
+
ri(this);this.N=null;si&&(this.N=Kb(si));this.h.v(window,"online",function(){c.qd()});this.ma={name:"detach"};this.La={name:"attach"};this.S={name:"unload"};this.Zc={name:"manifest-parser"};this.Xc={name:"manifest"};this.Ia={name:"media-source"};this.Uc={name:"drm-engine"};this.P={name:"load"};this.$c={name:"src-equals-drm-engine"};this.ob={name:"src-equals"};var d=new Map;d.set(this.La,function(e,f){return qc(ti(c,e,f))});d.set(this.ma,function(e){e.G&&(c.h.ya(e.G,"error"),e.G=null);c.N&&c.N.release();
|
|
293
|
+
c.g=null;e=Promise.resolve();return qc(e)});d.set(this.S,function(e){return qc(ui(c,e))});d.set(this.Ia,function(e){e=vi(c,e);return qc(e)});d.set(this.Zc,function(e,f){var g=wi(c,e,f);return qc(g)});d.set(this.Xc,function(e){return xi(c,e)});d.set(this.Uc,function(e){e=yi(c,e);return qc(e)});d.set(this.P,function(e,f){return qc(zi(c,e,f))});d.set(this.$c,function(e,f){var g=Ai(c,e,f);return qc(g)});d.set(this.ob,function(e,f){return Bi(c,e,f)});this.ca=new Jh(this.ma,{Ce:function(e,f,g,h){var k=
|
|
294
|
+
null;e==c.ma&&(k=g==c.ma?c.ma:c.La);e==c.La&&(k=g==c.ma||f.G!=h.G?c.ma:g==c.La?c.La:g==c.Ia||g==c.P?c.Ia:g==c.ob?c.$c:null);e==c.Ia&&(k=g==c.P&&f.G==h.G?c.Zc:c.S);e==c.Zc&&(k=Ci(c.P,c.Xc,c.S,g,f,h));e==c.Xc&&(k=Ci(c.P,c.Uc,c.S,g,f,h));e==c.Uc&&(k=Ci(c.P,c.P,c.S,g,f,h));e==c.$c&&(k=g==c.ob&&f.G==h.G?c.ob:c.S);if(e==c.P||e==c.ob)k=c.S;e==c.S&&(k=h.G&&f.G==h.G?c.La:c.ma);return k},re:function(e,f,g){c.dispatchEvent(Di(Ei,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==
|
|
295
|
+
f.g?t(f,ui(c,e),2):f["return"](e.G?c.La:c.ma)})},Te:function(e){c.dispatchEvent(Di(Fi,(new Map).set("state",e.name)))}});a&&this.Ib(a,!0)}oa(V,wc);function Di(a,b){return new R(a,b)}q=V.prototype;
|
|
296
|
+
q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.m==Gi)return c["return"]();a.m=Gi;b=Oh(a.ca,function(){return{node:a.ma,payload:Kh(),$a:!1}});return t(c,new Promise(function(d){b.yb=function(){};b.yc=function(){d()};b.cb=function(){d()};b.onError=function(){d()};b.Ac=function(){d()}}),2);case 2:return t(c,a.ca.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.Tc=null;a.s=null;a.o=null;a.j=null;a.ic=null;if(!a.U){c.B(0);break}return t(c,a.U.destroy(),5);case 5:a.U=
|
|
297
|
+
null,x(c)}})};q.Ib=function(a,b){b=void 0===b?!0:b;if(this.m==Gi)return Promise.reject(Hi());var c=Kh();c.G=a;id()||(b=!1);var d=b?this.Ia:this.La,e=Oh(this.ca,function(){return{node:d,payload:c,$a:!1}});e.yb=function(){};return Ii(e)};q.detach=function(){var a=this;if(this.m==Gi)return Promise.reject(Hi());var b=Oh(this.ca,function(){return{node:a.ma,payload:Kh(),$a:!1}});b.yb=function(){};return Ii(b)};
|
|
298
|
+
q.Cd=function(a){var b=this;a=void 0===a?!0:a;if(this.m==Gi)return Promise.reject(Hi());id()||(a=!1);var c=Kh(),d=Oh(this.ca,function(e){var f=e.G&&a?b.Ia:e.G?b.La:b.ma;c.G=e.G;return{node:f,payload:c,$a:!1}});d.yb=function(){};return Ii(d)};
|
|
299
|
+
q.load=function(a,b,c){var d=this;if(this.m==Gi)return Promise.reject(Hi());this.dispatchEvent(Di(Ji));var e=Kh();e.uri=a;e.yd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ki(this,e)?this.ob:this.P,g=Oh(this.ca,function(h){if(null==h.G)return null;e.G=h.G;return{node:f,payload:e,$a:!0}});this.j=new oi;g.yb=function(){};return new Promise(function(h,k){g.Ac=function(){return k(new O(2,7,7002))};g.yc=function(){h();d.dispatchEvent(Di(Li))};g.cb=function(){return k(Hi())};g.onError=
|
|
299
300
|
function(l){return k(l)}})};
|
|
300
|
-
function
|
|
301
|
-
function
|
|
302
|
-
function
|
|
303
|
-
case 3:if(!a.s){n.B(5);break}return t(n,a.s.stop(),5);case 5:if(!a.i){n.B(7);break}return t(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.F&&(a.F.release(),a.F=null);a.C&&(a.C.release(),a.C=null);if(!a.K){n.B(9);break}return t(n,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.
|
|
304
|
-
null;case 13:a.
|
|
305
|
-
function
|
|
306
|
-
function
|
|
307
|
-
function
|
|
308
|
-
l;break a}k=null}null==k&&(h.g.add(g),h.h(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return
|
|
309
|
-
function
|
|
310
|
-
function
|
|
311
|
-
(
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
function
|
|
315
|
-
"video/mp4",codecs:c.mimeType?
|
|
316
|
-
function
|
|
317
|
-
function(){a.j.j=Date.now()/1E3-c.
|
|
318
|
-
var e=new
|
|
319
|
-
e.resolve());a.h.
|
|
320
|
-
function
|
|
321
|
-
function
|
|
322
|
-
function
|
|
323
|
-
function
|
|
324
|
-
function
|
|
325
|
-
function
|
|
326
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
327
|
-
function
|
|
328
|
-
a.o.abr.enabled?a.s.enable():a.s.disable(),
|
|
329
|
-
q.
|
|
330
|
-
q.
|
|
331
|
-
q.
|
|
332
|
-
q.
|
|
333
|
-
q.
|
|
334
|
-
q
|
|
335
|
-
q
|
|
336
|
-
b=c.find(function(e){return e.enabled});c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,
|
|
337
|
-
q.
|
|
338
|
-
c=
|
|
339
|
-
q.
|
|
340
|
-
q.
|
|
341
|
-
function
|
|
342
|
-
q.
|
|
343
|
-
q.
|
|
344
|
-
q.
|
|
345
|
-
q.getStats=function(){if(this.m!=
|
|
346
|
-
b.
|
|
347
|
-
d.j,l=d.F,m=d.i,n=
|
|
348
|
-
maxSegmentDuration:
|
|
349
|
-
q.addTextTrack=function(a,b,c,d,e,f){if(this.m==
|
|
350
|
-
audioSamplingRate:null,closedCaptions:null};this.A.textStreams.push(a);
|
|
351
|
-
q.
|
|
352
|
-
function
|
|
353
|
-
function
|
|
301
|
+
function Ki(a,b){if(!id())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"}[og(d)]);return c?""==(b.G||kd()).canPlayType(c)?!1:id()&&(c in ng||og(d)in pg)?nd()&&a.o.streaming.useNativeHlsOnSafari:!0:
|
|
302
|
+
!1}function ti(a,b,c){null==b.G&&(b.G=c.G,a.h.v(b.G,"error",function(){var d=Mi(a);d&&Ni(a,d)}));a.g=b.G;return Promise.resolve()}
|
|
303
|
+
function ui(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.m!=Gi&&(a.m=pi),c=a.Ic.map(function(p){return p()}),a.Ic=[],t(n,Promise.all(c),2);case 2:a.dispatchEvent(Di(Oi));b.mimeType=null;b.startTime=null;b.uri=null;b.G&&(a.h.ya(b.G,"loadedmetadata"),a.h.ya(b.G,"playing"),a.h.ya(b.G,"pause"),a.h.ya(b.G,"ended"),a.h.ya(b.G,"ratechange"));a.Ja&&(a.Ja.release(),a.Ja=null);a.jc&&(a.jc.stop(),a.jc=null);if(!a.u){n.B(3);break}return t(n,a.u.stop(),4);case 4:a.u=null,a.lc=null;
|
|
304
|
+
case 3:if(!a.s){n.B(5);break}return t(n,a.s.stop(),5);case 5:if(!a.i){n.B(7);break}return t(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.F&&(a.F.release(),a.F=null);a.C&&(a.C.release(),a.C=null);if(!a.K){n.B(9);break}return t(n,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.N)a.N.onAssetUnload();if(!b.G||!b.G.src){n.B(11);break}return t(n,new Promise(function(p){return(new Q(p)).W(.1)}),12);case 12:b.G.removeAttribute("src"),b.G.load();case 11:if(!a.l){n.B(13);break}return t(n,a.l.destroy(),14);case 14:a.l=
|
|
305
|
+
null;case 13:a.Fb=null;a.I=null;if(a.A){d=r(a.A.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.A.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.A=null;a.j=new oi;a.Vc=null;Pi(a);x(n)}})}
|
|
306
|
+
function vi(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=window.muxjs?new te:new ue,d=a.o.textDisplayFactory,e=Kb(d),a.Vc=d,f=Qi(b.G,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,u=r(m.frames),v=u.next();!v.done;v=u.next())Ri(a,n,p,"ID3",v.value);if(a.N)a.N.onHlsTimedMetadata(m,n)}}),t(g,f.F,2);a.K=f;x(g)})}
|
|
307
|
+
function wi(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.Fb=d,f=a,t(h,mg(d,e,a.o.manifest.retryParameters,b.mimeType),2);f.lc=h.h;a.u=Kb(a.lc);g=xc(a.o.manifest);c.G&&"AUDIO"===c.G.nodeName&&(g.disableVideo=!0);a.u.configure(g);x(h)})}
|
|
308
|
+
function xi(a,b){var c=b.uri,d=a.U;a.mc=new ch(function(){return a.rd()});dh(a.mc,function(g){Si(a,Ti,g);if(a.N)a.N.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return K(function(h){return h["return"](a.pb(g))})},makeTextStreamsForClosedCaptions:function(g){return Ui(a,g)},onTimelineRegionAdded:function(g){var h=a.mc;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==g.startTime&&l.endTime==g.endTime){k=
|
|
309
|
+
l;break a}k=null}null==k&&(h.g.add(g),h.h(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ni(a,g)}},f=Date.now()/1E3;return new mc(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,t(m,a.u.start(c,e),2);g.A=m.h;h=Di(Vi);a.dispatchEvent(h);if(0==a.A.variants.length)throw new O(2,4,4036);Wi(a.A);k=Date.now()/1E3;l=k-f;a.j.F=l;x(m)})}(),function(){return a.u.stop()})}
|
|
310
|
+
function yi(a,b){var c,d;return K(function(e){if(1==e.g)return c=Date.now()/1E3,d=!0,a.l=Xi(a,{wb:a.U,onError:function(f){Ni(a,f)},zc:function(f){Yi(a,f)},onExpirationUpdated:function(f,g){Zi(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==$i&&d&&(d=!1,a.j.i=Date.now()/1E3-c)}}),a.l.configure(a.o.drm),t(e,yd(a.l,a.A.variants,a.A.offlineSessionIds),2);if(3!=e.g)return t(e,a.l.Ib(b.G),3);a.pb(a.A);x(e)})}
|
|
311
|
+
function zi(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,v;return K(function(z){switch(z.g){case 1:b.startTime=c.startTime;d=b.G;e=b.uri;a.Fb=e;a.F=new Wg({uc:function(){return b.G.playbackRate},sc:function(){return b.G.defaultPlaybackRate},wd:function(w){b.G.playbackRate=w},Ud:function(w){b.G.currentTime+=w}});f=function(){return aj(a)};g=function(){return bj(a)};a.h.v(d,"playing",f);a.h.v(d,"pause",f);a.h.v(d,"ended",f);a.h.v(d,"ratechange",g);h=a.o.abrFactory;a.s&&a.Tc==h||(a.Tc=h,a.s=Kb(h),"function"!=typeof a.s.playbackRateChanged&&
|
|
312
|
+
(Db("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.s.playbackRateChanged=function(){}),a.s.configure(a.o.abr));a.ka=new dg(a.o.preferredAudioLanguage,a.o.preferredVariantRole,a.o.preferredAudioChannelCount);a.Ba=a.o.preferredTextLanguage;a.Gb=a.o.preferredTextRole;cj(a.A.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd);a.s.init(function(w,A,D){A=void 0===A?!1:A;D=void 0===D?0:D;a.i&&w!=a.i.h&&(mi(a.j.g,w,!0),sh(a.i,w,A,D),dj(a))});a.C=ej(a,b.startTime);a.Ja=
|
|
313
|
+
fj(a);k=Math.max(a.A.minBufferTime,a.o.streaming.rebufferingGoal);gj(a,k);Ef(a.A,a.o.preferredAudioChannelCount);a.i=hj(a);a.i.configure(a.o.streaming);a.m=ij;a.dispatchEvent(Di(jj));l=null;if(m=a.vc().find(function(w){return w.active})){z.B(2);break}l=kj(a)?a.s.chooseVariant():null;mi(a.j.g,l,!0);sh(a.i,l,!1,0);if(!a.o.streaming.startAtSegmentBoundary){z.B(3);break}n=a.C.l();return t(z,lj(l,n),4);case 4:p=z.h,a.C.u(p);case 3:dj(a);case 2:return u=a.Qb().find(function(w){return w.active}),u||((v=
|
|
314
|
+
Vf(a.A.textStreams,a.Ba,a.Gb)[0]||null)&&ni(a.j.g,v,!0),l&&(v?(l.audio&&mj(a,l.audio,v)&&(a.Z=!0),a.Z&&a.K.m.setTextVisibility(!0),nj(a)):a.Z=!1),v&&(a.o.streaming.alwaysStreamText||a.cd())&&th(a.i,v)),t(z,a.i.start(),5);case 5:a.o.abr.enabled&&(a.s.enable(),oj(a)),a.pb(a.A),pj(a),kj(a),a.A.variants.some(function(w){return w.primary}),a.h.pa(d,"loadedmetadata",function(){a.j.j=Date.now()/1E3-c.yd}),x(z)}})}
|
|
315
|
+
function Ai(a,b,c){var d,e,f,g;return K(function(h){return 1==h.g?(d=Nb,e=Date.now()/1E3,f=!0,a.l=Xi(a,{wb:a.U,onError:function(k){Ni(a,k)},zc:function(k){Yi(a,k)},onExpirationUpdated:function(k,l){Zi(a,k,l)},onEvent:function(k){a.dispatchEvent(k);k.type==$i&&f&&(f=!1,a.j.i=Date.now()/1E3-e)}}),a.l.configure(a.o.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]:
|
|
316
|
+
"video/mp4",codecs:c.mimeType?hd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ka,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0},t(h,yd(a.l,[g],[]),2)):t(h,a.l.Ib(b.G),0)})}
|
|
317
|
+
function Bi(a,b,c){function d(){return aj(a)}b.uri=c.uri;b.startTime=c.startTime;a.Fb=b.uri;a.C=new Mg(b.G);null!=b.startTime&&a.C.u(b.startTime);a.F=new Wg({uc:function(){return b.G.playbackRate},sc:function(){return b.G.defaultPlaybackRate},wd:function(g){b.G.playbackRate=g},Ud:function(g){b.G.currentTime+=g}});gj(a,a.o.streaming.rebufferingGoal);a.h.v(b.G,"playing",d);a.h.v(b.G,"pause",d);a.h.v(b.G,"ended",d);a.h.v(b.G,"ratechange",function(){return bj(a)});"none"!=a.g.preload&&a.h.pa(a.g,"loadedmetadata",
|
|
318
|
+
function(){a.j.j=Date.now()/1E3-c.yd});a.g.audioTracks&&(a.h.v(a.g.audioTracks,"addtrack",function(){return pj(a)}),a.h.v(a.g.audioTracks,"removetrack",function(){return pj(a)}),a.h.v(a.g.audioTracks,"change",function(){return pj(a)}));a.g.textTracks&&(a.h.v(a.g.textTracks,"addtrack",function(g){pj(a);qj(a,g)}),a.h.v(a.g.textTracks,"removetrack",function(){return pj(a)}),a.h.v(a.g.textTracks,"change",function(){return pj(a)}));b.G.src=b.uri;(ld()||md("Web0S"))&&b.G.load();a.m=rj;a.dispatchEvent(Di(jj));
|
|
319
|
+
var e=new Ob;Ag(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.Ic.push(function(){f=!0});Ag(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return K(function(h){if(1==h.g){if(f)return h["return"]();sj(a);g=tj(a);return g.find(function(k){return"disabled"!=k.mode})?h.B(2):t(h,new Promise(function(k){a.h.pa(a.g.textTracks,"change",k);(new Q(k)).W(1)}),2)}if(f)return h["return"]();uj(a);x(h)})});a.g.error?e.reject(Mi(a)):"none"==a.g.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),
|
|
320
|
+
e.resolve());a.h.pa(a.g,"error",function(){e.reject(Mi(a))});return new mc(e,function(){e.reject(new O(2,7,7001));return Promise.resolve()})}function sj(a){var b=a.o.preferredAudioLanguage;if(""!=b){a.sd(b);var c=a.o.preferredVariantRole;""!=c&&a.sd(b,c)}}function uj(a){var b=a.o.preferredTextLanguage;if(""!=b){a.td(b);var c=a.o.preferredTextRole;""!=c&&a.td(b,c)}}
|
|
321
|
+
function qj(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.h.v(c,"cuechange",function(){if(c.activeCues)for(var d=r(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ri(a,e.startTime,e.endTime,e.type,e.value),a.N)a.N.onCueMetadataChange(e.value)}),(new Q(function(){var d=vj(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).ac().W(.5))}
|
|
322
|
+
function Ri(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Di(wj,b))}function Wi(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 Xi(a,b){return new rd(b,a.o.drm.updateExpirationTime)}function ri(a){return new Fc(function(b,c){a.s&&a.s.segmentDownloaded(b,c)})}
|
|
323
|
+
function ej(a,b){return new Ng(a.g,a.A,a.o.streaming,b,function(){a.Ja&&Zg(a.Ja,!0);if(a.i)for(var c=a.i,d=c.D.tc(),e=c.o.smallGapLimit,f=r(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.aa=null;var k=c.D.R;"text"==g?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=jf(k,g),k=we(k,d,e));k||(null!=kf(c.D.R,g)&&wh(c,h),h.qa&&(h.qa.abort(),h.qa=null),"text"===g&&c.D.R.C.h())}a.I&&xj(a)},function(c){return a.dispatchEvent(c)})}
|
|
324
|
+
function fj(a){var b=new eh(a.mc);fh(b,function(d){Si(a,yj,d)},function(d){Si(a,zj,d)},function(d,e){e||(Si(a,yj,d),Si(a,zj,d))});var c=new Yg(a.g);c.g.add(b);return c}function gj(a,b){a.I=new hg;a.I.g=jg;kg(a.I,b,Math.min(.5,b/2));Pi(a);a.jc=(new Q(function(){xj(a)})).xa(.25)}
|
|
325
|
+
function xj(a){switch(a.m){case rj:if(a.g.ended)var b=!0;else{var c=ve(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ij:a:if(a.g.ended||gf(a.K))b=!0;else{if(a.A.presentationTimeline.Y()){c=a.A.presentationTimeline.Ta();var d=ve(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=xe(a.g.buffered,a.g.currentTime);c=a.I;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ig:jg;c.g=d;b!=d&&Pi(a)}function Qi(a,b,c,d){return new $e(a,b,c,d)}
|
|
326
|
+
function hj(a){return new hh(a.A,{tc:function(){return a.C.l()},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},R:a.K,wb:a.U,onError:function(b){return Ni(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ue:function(){a.u&&a.u.update&&a.u.update()},md:function(){a.C&&a.C.F();xj(a)}})}
|
|
327
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ci(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);var c=gi(this.o,a,qi(this));Aj(this);return c};
|
|
328
|
+
function Aj(a){if(a.u){var b=xc(a.o.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.u.configure(b)}a.l&&a.l.configure(a.o.drm);if(a.i){a.i.configure(a.o.streaming);try{a.pb(a.A)}catch(f){Ni(a,f)}a.s&&kj(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Bj(a)}if(a.K&&(b=a.o.textDisplayFactory,a.Vc!=b)){var c=Kb(b),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.Vc=b;a.i&&(b=a.i,(c=b.g.get("text"))&&rh(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.o.abr),
|
|
329
|
+
a.o.abr.enabled?a.s.enable():a.s.disable(),oj(a));a.I&&(b=a.o.streaming.rebufferingGoal,a.A&&(b=Math.max(b,a.A.minBufferTime)),kg(a.I,b,Math.min(.5,b/2)))}q.getConfiguration=function(){var a=qi(this);gi(a,this.o,qi(this));return a};q.cf=function(){for(var a in this.o)delete this.o[a];gi(this.o,qi(this),qi(this));Aj(this)};q.xe=function(){return this.m};q.Be=function(){return this.g};q.Nb=function(){return this.U};q.ad=function(){return this.Fb};
|
|
330
|
+
q.Kd=function(){Ta("getAdManager","Shaka Player's ad features are currently in BETA and are NOT yet covered by semantic versioning compatibility guarantees. The API may change at any time!");return this.N};q.Y=function(){return this.A?this.A.presentationTimeline.Y():this.g&&this.g.src?Infinity==this.g.duration:!1};q.bb=function(){return this.A?this.A.presentationTimeline.bb():!1};
|
|
331
|
+
q.Oe=function(){if(this.A){var a=this.A.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};q.rd=function(){if(this.A){var a=this.A.presentationTimeline;return{start:a.tb(),end:a.Ma()}}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 Nd(this.drmInfo())};q.drmInfo=function(){return this.l?this.l.i:null};
|
|
332
|
+
q.Mb=function(){return this.l?this.l.Mb():Infinity};q.bd=function(){return this.I?this.I.g==jg:!1};q.De=function(){return this.g?this.F?this.F.i:1:0};q.nf=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.F.set(a),this.m==ij&&(this.s.playbackRateChanged(a),qh(this.i,1<Math.abs(a))))};q.me=function(){var a=this.F.sc();this.m==rj&&this.F.set(a);this.m==ij&&(this.F.set(a),this.s.playbackRateChanged(a),qh(this.i,!1))};
|
|
333
|
+
q.vc=function(){if(this.A){for(var a=this.i?this.i.h:null,b=[],c=0,d=r(this.A.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Tf(e)){var f=Nf(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 Rf(g)}):[]};
|
|
334
|
+
q.Qb=function(){if(this.A){for(var a=this.i?this.i.i:null,b=[],c=r(this.A.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Of(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?tj(this).map(function(f){var g=Sf(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]);return g}):[]};
|
|
335
|
+
q.$d=function(a){if(this.A&&this.i){var b=this.A.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(ni(this.j.g,b,!1),th(this.i,b),Cj(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=tj(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,Pf(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";Cj(this)}};
|
|
336
|
+
q.ae=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.A&&this.i){this.o.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.A.variants.find(function(e){return e.id==a.id});d&&Tf(d)&&(d==this.i.h?b&&sh(this.i,d,b,c,!0):(mi(this.j.g,d,!1),sh(this.i,d,b,c),Dj(this),this.ka=new cg(d),kj(this)))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);
|
|
337
|
+
b=c.find(function(e){return e.enabled});c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Pf(d)==a.id&&(d.enabled=!0,d.id!==b.id&&(b.enabled=!1));Dj(this)}};q.te=function(){return Ej(this.vc())};q.Le=function(){return Ej(this.Qb())};q.se=function(){return Array.from(Fj(this.vc()))};q.Ke=function(){return Array.from(Fj(this.Qb()))};
|
|
338
|
+
q.sd=function(a,b){if(this.A&&this.C){this.ka=new dg(a,b||"",0,"");if(!this.o.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.ka.create(this.A.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=Nf(f);this.ae(c,!0);return}}Bj(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
|
|
339
|
+
c=xf(a);f=d=null;e=r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=Rf(g);xf(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?(f.enabled=!0,Dj(this)):d&&(d.enabled=!0,Dj(this))}};
|
|
340
|
+
q.td=function(a,b){if(this.A&&this.C){this.Ba=a;this.Gb=b||"";var c=Vf(this.A.textStreams,this.Ba,this.Gb)[0]||null;c&&c!=this.i.i&&(ni(this.j.g,c,!1),this.o.streaming.alwaysStreamText||this.cd())&&(th(this.i,c),Cj(this))}else{var d=xf(a);(c=this.Qb().find(function(e){return xf(e.language)==d&&(!b||e.roles.includes(b))}))&&this.$d(c)}};
|
|
341
|
+
q.df=function(a){if(this.A&&this.C){for(var b=null,c=r(this.A.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ka=new dg(b.language,"",0,a),Bj(this))}};q.cd=function(){var a=this.Z;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?tj(this).some(function(b){return"showing"==b.mode}):a};
|
|
342
|
+
function tj(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function vj(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}
|
|
343
|
+
q.kf=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.m==ij)this.K.m.setTextVisibility(a),this.o.streaming.alwaysStreamText||(a?this.i.i||(a=Vf(this.A.textStreams,this.Ba,this.Gb),0<a.length&&(th(this.i,a[0]),Cj(this))):ph(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=tj(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")}nj(this)}};
|
|
344
|
+
q.Fe=function(){if(!this.Y())return null;var a=this.ca.l,b=0;if(this.C)b=this.C.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.A?new Date(1E3*(this.A.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
345
|
+
q.Ld=function(){if(!this.Y())return null;if(this.A)return new Date(1E3*this.A.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.rc=function(){if(this.m==ij)return this.K.rc();var a={total:[],audio:[],video:[],text:[]};this.m==rj&&(a.total=ye(this.g.buffered));return a};
|
|
346
|
+
q.getStats=function(){if(this.m!=ij&&this.m!=rj)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};aj(this);var a=this.g;if(a.getVideoPlaybackQuality){a=a.getVideoPlaybackQuality();var b=this.j,c=Number(a.totalVideoFrames);b.P=Number(a.droppedVideoFrames);
|
|
347
|
+
b.N=c;this.j.K=Number(a.corruptedVideoFrames)}this.l?(a=this.l,a=a.I?a.I:NaN):a=NaN;this.j.l=a;if(this.m==ij){if(a=this.i.h)this.j.s=(this.F?this.F.i:1)*a.bandwidth;a&&a.video&&(b=this.j,c=a.video.height||NaN,b.S=a.video.width||NaN,b.u=c);this.Y()&&(a=this.Ld().valueOf()+1E3*this.rd().end,this.j.C=(Date.now()-a)/1E3);this.A&&this.A.presentationTimeline&&(this.j.I=this.A.presentationTimeline.g);a=this.s.getBandwidthEstimate();this.j.m=a}var d=this.j;a=d.S;b=d.u;c=d.s;var e=d.N,f=d.P,g=d.K,h=d.m,k=
|
|
348
|
+
d.j,l=d.F,m=d.i,n=ji(d.h,"playing"),p=ji(d.h,"paused"),u=ji(d.h,"buffering"),v=d.l,z=d.C,w=d.I,A=ki(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:b,streamBandwidth:c,decodedFrames:e,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,loadLatency:k,manifestTimeSeconds:l,drmTimeSeconds:m,playTime:n,pauseTime:p,bufferingTime:u,licenseTime:v,liveLatency:z,
|
|
349
|
+
maxSegmentDuration:w,stateHistory:A,switchHistory:D}};
|
|
350
|
+
q.addTextTrack=function(a,b,c,d,e,f){if(this.m==rj)throw Error("State error!");if(this.m!=ij)throw Error("State error!");var g=this.A.presentationTimeline.getDuration();if(Infinity==g)throw new O(1,4,4033);a={id:this.Md++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ug(0,g,[a]),mimeType:d,codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,
|
|
351
|
+
audioSamplingRate:null,closedCaptions:null};this.A.textStreams.push(a);pj(this);return Of(a)};q.vd=function(a,b){this.Yc.width=a;this.Yc.height=b};q.qd=function(){if(this.m==ij){var a=this.i;if(a.J.g)a=!1;else if(a.l)a=!1;else{for(var b=r(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Rb&&(c.Rb=!1,oh(a,c,.1));a=!0}}else a=!1;return a};
|
|
352
|
+
q.ye=function(){Sa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.A};q.ze=function(){return this.lc};
|
|
353
|
+
function qi(a){var b=ei();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Y()&&d.includes(c.code)&&(c.severity=1,a.qd())};b.textDisplayFactory=function(){return a.ic?new Vh(a.g,a.ic):new Qh(a.g)};return b}q.de=function(a){this.ic=a};
|
|
354
|
+
function Ui(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&&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=new Vg;h={id:a.Md++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:h,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,
|
|
354
355
|
drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};b.textStreams.push(h);c.add(g)}}
|
|
355
|
-
q.
|
|
356
|
-
d.next())if(e=e.value,e.keySystem==b.keySystem)for(e=r(e.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,
|
|
357
|
-
function
|
|
358
|
-
function
|
|
359
|
-
function
|
|
360
|
-
function
|
|
361
|
-
function
|
|
362
|
-
function
|
|
363
|
-
(e=!0)}}}e&&
|
|
364
|
-
function
|
|
365
|
-
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new
|
|
366
|
-
function
|
|
367
|
-
function
|
|
368
|
-
V.prototype.retryStreaming=V.prototype.
|
|
369
|
-
V.prototype.selectTextLanguage=V.prototype.
|
|
370
|
-
V.prototype.trickPlay=V.prototype.
|
|
371
|
-
V.prototype.getNetworkingEngine=V.prototype.
|
|
372
|
-
V.probeSupport=function(){var a,b,c,d,e,f;return
|
|
373
|
-
for(k=n.next();!k.done;k=n.next())k=k.value,h[k]=
|
|
374
|
-
V.isBrowserSupported=function(){if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach))return!1;var a=
|
|
375
|
-
var
|
|
376
|
-
|
|
356
|
+
q.pb=function(a){Lf(this.l,this.i?this.i.h:null,a);if(!a.variants.some(Tf))throw new O(2,4,4032);for(var b=this.o.restrictions,c=this.Yc,d=!1,e=r(a.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.allowedByApplication;f.allowedByApplication=Kf(f,b,c);g!=f.allowedByApplication&&(d=!0)}d&&this.i&&pj(this);if((b=this.l?this.l.i:null)&&this.l.m)for(c=r(a.variants),d=c.next();!d.done;d=c.next())for(d=d.value,d=r((d.video?d.video.drmInfos:[]).concat(d.audio?d.audio.drmInfos:[])),e=d.next();!e.done;e=
|
|
357
|
+
d.next())if(e=e.value,e.keySystem==b.keySystem)for(e=r(e.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,Id(this.l,f.initDataType,f.initData);Gj(this,a)};
|
|
358
|
+
function lj(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?t(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)})},t(h,e(c,b),2);if(3!=h.g)return f=h.h,t(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)})}
|
|
359
|
+
function Pi(a){var b=a.bd();if(a.j&&a.I&&a.C){var c=a.F;c.j=b;Xg(c);aj(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Di(Hj,b))}function bj(a){var b=a.g.playbackRate;0!=b&&(a.F&&a.F.set(b),b=Di(Ij),a.dispatchEvent(b))}function aj(a){if(a.j&&a.I){var b=a.j.h;a.I.g==jg?ii(b,"buffering"):a.g.paused?ii(b,"paused"):a.g.ended?ii(b,"ended"):ii(b,"playing")}}
|
|
360
|
+
function kj(a){try{Gj(a,a.A)}catch(c){return Ni(a,c),!1}var b=a.A.variants.filter(function(c){return Tf(c)});b=a.ka.create(b);a.s.setVariants(Array.from(b.values()));return!0}function Bj(a){var b;if(b=kj(a)?a.s.chooseVariant():null){if(b==a.i.h)return;mi(a.j.g,b,!0);sh(a.i,b,!0,0);Dj(a)}dj(a)}function mj(a,b,c){a=xf(a.o.preferredTextLanguage);b=xf(b.language);c=xf(c.language);return wf(c,a)&&!wf(b,c)}function dj(a){var b=Di(Jj);Kj(a,b)}function pj(a){var b=Di(Lj);Kj(a,b)}
|
|
361
|
+
function Dj(a){var b=Di(Mj);Kj(a,b)}function Cj(a){var b=Di(Nj);Kj(a,b)}function nj(a){var b=Di(Oj);Kj(a,b)}function oj(a){var b=(new Map).set("newStatus",a.o.abr.enabled);Kj(a,Di(Pj,b))}function Ni(a,b){if(a.m!=Gi){var c=Di(Qj,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Si(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(Di(b,c))}
|
|
362
|
+
function Mi(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new O(2,3,3016,b,c,a.g.error.message)}
|
|
363
|
+
function Yi(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.A.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&&!Rj.includes(l)}h!=f.allowedByKeySystem&&
|
|
364
|
+
(e=!0)}}}e&&kj(a);(d=a.i.h)&&!d.allowedByKeySystem&&Bj(a);e&&pj(a)}}function Zi(a,b,c){if(a.u&&a.u.onExpirationUpdated)a.u.onExpirationUpdated(b,c);b=Di(Sj);a.dispatchEvent(b)}function cj(a,b,c){0<b&&(a.Y()||a.ce(b));b=a.getDuration();c<b&&(a.Y()||a.Ga(c))}
|
|
365
|
+
function Gj(a,b){var c=a.l?bd(a.l.Z):{},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 u=c[d?"00":p];u?Rj.includes(u)&&h.add(u):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
366
|
+
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function Kj(a,b){K(function(c){if(1==c.g)return t(c,Promise.resolve(),2);a.m!=Gi&&a.dispatchEvent(b);x(c)})}function Fj(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(xf(c.language)):b.add("und");return b}
|
|
367
|
+
function Ej(a){var b=new Map;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=c.value;c="und";var e=[];d.language&&(c=xf(d.language));"variant"==d.type?e=d.audioRoles:e=d.roles;e&&e.length||(e=[""]);b.has(c)||b.set(c,new Set);d=r(e);for(e=d.next();!e.done;e=d.next())e=e.value,b.get(c).add(e)}var f=[];b.forEach(function(g,h){for(var k=r(g),l=k.next();!l.done;l=k.next())f.push({language:h,role:l.value})});return f}function Hi(){return new O(2,7,7E3)}
|
|
368
|
+
function Ci(a,b,c,d,e,f){return d==a&&e.G==f.G&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Kh(){return{G:null,mimeType:null,startTime:null,yd:NaN,uri:null}}function Ii(a){return new Promise(function(b,c){a.cb=function(){return c(Hi())};a.yc=function(){return b()};a.onError=function(d){return c(d)};a.Ac=function(){return c(Hi())}})}L("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.de;V.prototype.getManifestParserFactory=V.prototype.ze;V.prototype.getManifest=V.prototype.ye;
|
|
369
|
+
V.prototype.retryStreaming=V.prototype.qd;V.prototype.setMaxHardwareResolution=V.prototype.vd;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.rc;V.prototype.getPresentationStartTimeAsDate=V.prototype.Ld;V.prototype.getPlayheadTimeAsDate=V.prototype.Fe;V.prototype.setTextTrackVisibility=V.prototype.kf;V.prototype.isTextTrackVisible=V.prototype.cd;V.prototype.selectVariantsByLabel=V.prototype.df;
|
|
370
|
+
V.prototype.selectTextLanguage=V.prototype.td;V.prototype.selectAudioLanguage=V.prototype.sd;V.prototype.getTextLanguages=V.prototype.Ke;V.prototype.getAudioLanguages=V.prototype.se;V.prototype.getTextLanguagesAndRoles=V.prototype.Le;V.prototype.getAudioLanguagesAndRoles=V.prototype.te;V.prototype.selectVariantTrack=V.prototype.ae;V.prototype.selectTextTrack=V.prototype.$d;V.prototype.getTextTracks=V.prototype.Qb;V.prototype.getVariantTracks=V.prototype.vc;V.prototype.cancelTrickPlay=V.prototype.me;
|
|
371
|
+
V.prototype.trickPlay=V.prototype.nf;V.prototype.getPlaybackRate=V.prototype.De;V.prototype.isBuffering=V.prototype.bd;V.prototype.getExpiration=V.prototype.Mb;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.seekRange=V.prototype.rd;V.prototype.isAudioOnly=V.prototype.Oe;V.prototype.isInProgress=V.prototype.bb;V.prototype.isLive=V.prototype.Y;V.prototype.getAdManager=V.prototype.Kd;V.prototype.getAssetUri=V.prototype.ad;
|
|
372
|
+
V.prototype.getNetworkingEngine=V.prototype.Nb;V.prototype.getMediaElement=V.prototype.Be;V.prototype.getLoadMode=V.prototype.xe;V.prototype.resetConfiguration=V.prototype.cf;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.Cd;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Ib;
|
|
373
|
+
V.probeSupport=function(){var a,b,c,d,e,f;return K(function(g){if(1==g.g)return t(g,Yd(),2);a=g.h;var h={};if(id()){for(var k in ng)h[k]=!0;for(var l in pg)h[l]=!0}k={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};l=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,h[m]=id()?!!ng[m]:jd(m);for(var n in k)h[n]=id()?!!pg[n]:jd(k[n]);b=h;h={};n=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(","));
|
|
374
|
+
for(k=n.next();!k.done;k=n.next())k=k.value,h[k]=id()?Ue(k)?!0:MediaSource.isTypeSupported(k)||fc(k):jd(k),l=k.split(";")[0],h[l]=h[l]||h[k];c=h;d={manifest:b,media:c,drm:a};e=Tj;for(f in e)d[f]=e[f]();return g["return"](d)})};
|
|
375
|
+
V.isBrowserSupported=function(){if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach))return!1;var a=od();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:id()?!0:jd("application/x-mpegurl")};V.setAdManagerFactory=function(a){si=a};V.registerSupportPlugin=function(a,b){Tj[a]=b};V.prototype.destroy=V.prototype.destroy;
|
|
376
|
+
var Pj="abrstatuschanged",Jj="adaptation",Hj="buffering",$i="drmsessionupdate",Hh="emsg",Qj="error",Sj="expirationupdated",Li="loaded",Ji="loading",Vi="manifestparsed",wj="metadata",Ei="onstatechange",Fi="onstateidle",Ij="ratechange",jj="streaming",Nj="textchanged",Oj="texttrackvisibility",Ti="timelineregionadded",yj="timelineregionenter",zj="timelineregionexit",Lj="trackschanged",Oi="unloading",Mj="variantchanged",Uj={vf:Pj,wf:Jj,xf:Hj,yf:$i,Af:Hh,Error:Qj,Bf:Sj,Df:"largegap",Ef:Li,Ff:Ji,Gf:Vi,Metadata:wj,
|
|
377
|
+
Hf:Ei,If:Fi,Jf:Ij,Kf:jj,Lf:Nj,Mf:Oj,Nf:Ti,Of:yj,Pf:zj,Qf:Lj,Rf:Oi,Sf:Mj},Gi=0,pi=1,ij=2,rj=3;V.LoadMode={DESTROYED:Gi,NOT_LOADED:pi,MEDIA_SOURCE:ij,SRC_EQUALS:rj};V.version="v3.0.15";var Vj=["3","0"];Eb=new function(a){this.g=a;this.i=Fb;this.h=Gb}(new Cb(Number(Vj[0]),Number(Vj[1])));var Rj=["output-restricted","internal-error"],Tj={},si=null;function Wj(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new Tc;this.h.v(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.v(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=W.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};
|
|
377
378
|
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()};
|
|
378
379
|
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};L("shaka.ads.ClientSideAd",W);
|
|
379
380
|
W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;
|
|
380
|
-
W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function
|
|
381
|
-
function(f){
|
|
382
|
-
function
|
|
383
|
-
a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.u=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u.observe(a.g)),a.i.start()}catch(f){
|
|
384
|
-
function
|
|
385
|
-
{
|
|
386
|
-
|
|
387
|
-
google.ima.AdEvent.Type.
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
function bk(a,b){a.j(new R("ad-stopped",{originalEvent:b}));a.m.removeAttribute("ad-active");a.g.play()};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.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)};
|
|
381
|
+
W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Xj(a,b,c,d){var e=this;this.m=a;this.g=b;this.u=null;this.C=NaN;this.j=d;this.s=null;this.h=new Tc;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.0.15");this.i=null;this.h.pa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Yj(e,f)});this.h.v(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
382
|
+
function(f){Zj(e,f)});this.g.onended=function(){e.l.contentComplete()}}Xj.prototype.stop=function(){this.i&&this.i.stop();this.m&&Uh(this.m)};Xj.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function Zj(a,b){b.getError();ak(a,null);a.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
383
|
+
function Yj(a,b){a.j(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.i=b.getAdsManager(a.g);a.j(new R("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 bk(e.value));a.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",d)))}ck(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
384
|
+
a.h.v(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.u=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u.observe(a.g)),a.i.start()}catch(f){ak(a,null)}}
|
|
385
|
+
function ck(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new R(d,e))}a.h.v(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Zj(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){dk(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.STARTED,function(c){dk(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.v(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.v(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
386
|
+
function(c){b(c,"ad-third-quartile")});a.h.v(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.v(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){ak(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){ak(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.v(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.v(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
387
|
+
a.h.v(a.i,google.ima.AdEvent.Type.PAUSED,function(c){a.s.j=!0;b(c,"ad-paused")});a.h.v(a.i,google.ima.AdEvent.Type.RESUMED,function(c){a.s.j=!1;b(c,"ad-resumed")});a.h.v(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.v(a.i,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.v(a.i,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.v(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.v(a.i,
|
|
388
|
+
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.v(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.v(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.v(a.i,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.v(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.v(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.v(a.i,google.ima.AdEvent.Type.AD_METADATA,
|
|
389
|
+
function(c){b(c,"ad-metadata")});a.h.v(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.v(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.v(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function dk(a,b){var c=b.getAd();a.s=new W(c,a.i);c=(new Map).set("ad",a.s).set("sdkAdObject",c).set("originalEvent",b);a.j(new R("ad-started",c));a.m.setAttribute("ad-active","true");a.g.pause()}
|
|
390
|
+
function ak(a,b){a.j(new R("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.g.play()};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.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)};
|
|
391
391
|
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()};
|
|
392
392
|
q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};L("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;
|
|
393
393
|
X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;
|
|
394
|
-
X.prototype.getDuration=X.prototype.getDuration;function
|
|
395
|
-
e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.g);e.C&&(e.m.h=e.C);e.j(new R("ad-started",
|
|
396
|
-
e.s&&e.s>f&&(e.g.currentTime=e.s,e.s=null)});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new R("ad-first-quartile"))});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new R("ad-midpoint"))});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new R("ad-third-quartile"))});
|
|
397
|
-
this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new R("ad-complete"));e.j(new R("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new R("ad-skipped"));e.j(new R("ad-stopped"))});this.h.v(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
|
|
398
|
-
|
|
399
|
-
function
|
|
400
|
-
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 R("ad-stopped"));this.j=new
|
|
401
|
-
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new
|
|
402
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new
|
|
403
|
-
(c.I=!0),c.l=new
|
|
394
|
+
X.prototype.getDuration=X.prototype.getDuration;function ek(a,b,c,d){var e=this;this.u=a;this.g=b;this.l=null;this.K=NaN;this.j=d;this.I=!1;this.C=this.m=this.s=null;this.F="";this.h=new Tc;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.u,a);this.j(new R("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){fk(e,f)});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?e.l.resolve(e.F):
|
|
395
|
+
e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.g);e.C&&(e.m.h=e.C);e.j(new R("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
|
|
396
|
+
var f=e.g.currentTime;e.s&&e.s>f&&(e.g.currentTime=e.s,e.s=null)});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new R("ad-first-quartile"))});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new R("ad-midpoint"))});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new R("ad-third-quartile"))});
|
|
397
|
+
this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new R("ad-complete"));e.j(new R("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new R("ad-skipped"));e.j(new R("ad-stopped"))});this.h.v(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 bk(h.start,h.end));e.j(new R("ad-cue-points-changed",
|
|
398
|
+
(new Map).set("cuepoints",f)))})}ek.prototype.stop=function(){this.F="";this.s=null};ek.prototype.release=function(){this.stop();this.h&&this.h.release()};ek.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
|
|
399
|
+
function fk(a,b){a.j(new R("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.v(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.s=d,a.g.currentTime=e.start)}})};function Y(){wc.call(this);this.g=this.h=null;this.j=new Wj;this.i=navigator.language}oa(Y,wc);q=Y.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 O(2,10,1E4);this.h&&this.h.release();this.h=new Xj(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)})};
|
|
400
|
+
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 R("ad-stopped"));this.j=new Wj};q.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.C=Date.now()/1E3;b.l.requestAds(a)};
|
|
401
|
+
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new ek(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)})};
|
|
402
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.0.15";c=this.g;var d=b;c.l?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
403
|
+
(c.I=!0),c.l=new Ob,c.i.requestStream(a),c.F=d||"",c.K=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.0.15";this.g.i.replaceAdTagParameters(a)};
|
|
404
404
|
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)};L("shaka.ads.AdManager",Y);
|
|
405
405
|
Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;
|
|
406
|
-
Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;function
|
|
406
|
+
Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;function bk(a,b){this.start=a;this.end=void 0===b?null:b}Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
|
|
407
407
|
Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";
|
|
408
|
-
Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";
|
|
409
|
-
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(
|
|
410
|
-
function
|
|
411
|
-
function
|
|
412
|
-
var
|
|
413
|
-
isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},
|
|
414
|
-
"unload"];function
|
|
415
|
-
l.
|
|
416
|
-
q.init=function(){if(this.
|
|
417
|
-
a):
|
|
418
|
-
q.cast=function(a){var b=this;return
|
|
419
|
-
q.get=function(a,b){var c=this;if("video"==a){if(
|
|
420
|
-
[a,b].concat(ha(e)))};if(
|
|
421
|
-
function
|
|
422
|
-
function
|
|
423
|
-
function
|
|
424
|
-
q.destroy=function(a){a&&this.g.
|
|
425
|
-
q.cast=function(){var a=this,b;return
|
|
426
|
-
q.
|
|
427
|
-
function
|
|
428
|
-
|
|
429
|
-
function
|
|
430
|
-
function
|
|
431
|
-
function
|
|
432
|
-
function
|
|
433
|
-
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 R(
|
|
434
|
-
function
|
|
435
|
-
function
|
|
436
|
-
if(a.g.
|
|
437
|
-
|
|
438
|
-
q.
|
|
439
|
-
q.destroy=function(){var a=this,b,c;return
|
|
440
|
-
function
|
|
441
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
442
|
-
!1
|
|
443
|
-
function
|
|
444
|
-
function
|
|
445
|
-
b.manifest&&(a.g.play(),
|
|
446
|
-
function
|
|
447
|
-
function
|
|
448
|
-
function
|
|
449
|
-
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.
|
|
450
|
-
function
|
|
451
|
-
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||
|
|
452
|
-
function
|
|
453
|
-
L("shaka.cast.CastReceiver",
|
|
454
|
-
function
|
|
455
|
-
function
|
|
456
|
-
function
|
|
457
|
-
function
|
|
458
|
-
function
|
|
459
|
-
for(var h=f.next();!h.done;h=f.next())h.value.keyId=g}return{
|
|
460
|
-
function
|
|
461
|
-
function
|
|
462
|
-
function
|
|
463
|
-
null;g=
|
|
464
|
-
function
|
|
465
|
-
var
|
|
466
|
-
"":""}).set("com.microsoft.playready",function(a){a=
|
|
408
|
+
Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";si=function(){return new Y};function gk(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof R){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
|
|
409
|
+
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(ye(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}})}
|
|
410
|
+
function hk(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=ik(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})}
|
|
411
|
+
function ik(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
412
|
+
var jk="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),kk="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),lk=["loop","playbackRate"],mk=["pause","play"],nk={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,
|
|
413
|
+
isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},ok={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},pk=[["getConfiguration","configure"]],qk=[["isTextTrackVisible","setTextTrackVisibility"]],rk="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),sk=["attach","detach","load",
|
|
414
|
+
"unload"];function tk(a,b,c,d,e,f){var g=this;this.N=a;this.j=new Q(b);this.ca=c;this.C=!1;this.u=d;this.K=e;this.S=f;this.h=this.m=!1;this.Z="";this.s=null;this.F=function(){return uk(g)};this.I=function(h,k){var l=hk(k);switch(l.type){case "event":var m=l.targetName;l=tc(l.event);g.u(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.C&&(g.ca(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new O(l.severity,l.category,
|
|
415
|
+
l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.P=0;this.i={};this.l=null;vk.add(this)}q=tk.prototype;q.destroy=function(){vk["delete"](this);wk(this);xk&&yk(this);this.j&&(this.j.stop(),this.j=null);this.K=this.u=null;this.h=this.m=!1;this.I=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.na=function(){return this.h};q.od=function(){return this.Z};
|
|
416
|
+
q.init=function(){if(this.N.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.ac();var a=new chrome.cast.SessionRequest(this.N);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(vk),d=c.next();!d.done;d=c.next())zk(d.value,b)},function(b){for(var c=r(vk),d=c.next();!d.done;d=c.next())d=d.value,Ak="available"==b,d.j.ac()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Ak&&this.j.W(Bk);(a=xk)&&a.status!=chrome.cast.SessionStatus.STOPPED?zk(this,
|
|
417
|
+
a):xk=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Ck),window.__onGCastApiAvailable!=Ck&&Sa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.ud=function(a){this.s=a;this.h&&Dk(this,{type:"appData",appData:this.s})};
|
|
418
|
+
q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new O(1,8,8E3);if(!Ak)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Ob;chrome.cast.requestSession(function(d){return Ek(b,a,d)},function(d){return Fk(b,d)});return t(c,b.l,0)})};function Gk(a){if(a.h){var b=a.S();chrome.cast.requestSession(function(c){return Ek(a,b,c)},function(c){return Fk(a,c)})}}q.qb=function(){if(this.h){wk(this);if(xk){yk(this);try{xk.stop(function(){},function(){})}catch(a){}xk=null}uk(this)}};
|
|
419
|
+
q.get=function(a,b){var c=this;if("video"==a){if(mk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Xd.apply(c,[a,b].concat(ha(e)))}}else if("player"==a){if(ok[b]&&!this.get("player","isLive")())return function(){};if(rk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Xd.apply(c,[a,b].concat(ha(e)))};if(sk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.$e.apply(c,
|
|
420
|
+
[a,b].concat(ha(e)))};if(nk[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Dk(this,{type:"set",targetName:a,property:b,value:c})};function Ek(a,b,c){xk=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.I);uk(a);Dk(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}
|
|
421
|
+
function Fk(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new O(2,8,c,b))}q.Xd=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Dk(this,{type:"call",targetName:a,methodName:b,args:d})};q.$e=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Ob;var f=this.P.toString();this.P++;this.i[f]=e;try{Dk(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
|
|
422
|
+
function zk(a,b){var c=a.S();a.l=new Ob;a.C=!0;Ek(a,c,b)}function yk(a){var b=xk;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.I)}function uk(a){var b=xk?"connected"==xk.status:!1;if(a.h&&!b){a.K();for(var c in a.g)a.g[c]={};wk(a)}a.h=b;a.Z=b?xk.receiver.friendlyName:"";a.j.ac()}function wk(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}
|
|
423
|
+
function Dk(a,b){var c=gk(b),d=xk;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new O(2,8,8005,e),d=new R("error",(new Map).set("detail",c)),a.u("player",d),a.qb(),c;}}var Bk=.02,Ak=!1,xk=null,vk=new Set;function Ck(a){if(a){a=r(vk);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Hk(a,b,c){wc.call(this);var d=this;this.j=a;this.i=b;this.h=this.s=this.l=this.u=this.m=null;this.F=c;this.C=new Map;this.g=new tk(c,function(){return Ik(d)},function(){return Jk(d)},function(e,f){return Kk(d,e,f)},function(){return Lk(d)},function(){return Mk(d)});Nk(this)}oa(Hk,wc);q=Hk.prototype;
|
|
424
|
+
q.destroy=function(a){a&&this.g.qb();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.u=this.m=this.j=null;return Promise.all(a)};q.Me=function(){return this.m};q.Ee=function(){return this.u};q.le=function(){return this.g.m&&Ak};q.na=function(){return this.g.na()};q.od=function(){return this.g.od()};
|
|
425
|
+
q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Mk(a),t(c,a.g.cast(b),2)):a.i?t(c,a.i.Cd(),0):c["return"]()})};q.ud=function(a){this.g.ud(a)};q.lf=function(){Gk(this.g)};q.qb=function(){this.g.qb()};
|
|
426
|
+
q.ne=function(a){var b=this;return K(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.qb();return t(c,b.g.destroy(),2)}b.g=null;b.g=new tk(a,function(){return Ik(b)},function(){return Jk(b)},function(d,e){return Kk(b,d,e)},function(){return Lk(b)},function(){return Mk(b)});b.g.init();x(c)})};
|
|
427
|
+
function Nk(a){a.g.init();a.h=new Tc;for(var b=r(jk),c=b.next();!c.done;c=b.next())a.h.v(a.j,c.value,function(f){a.g.na()||(f=tc(f),a.l.dispatchEvent(f))});for(var d in Uj)a.h.v(a.i,Uj[d],function(f){a.g.na()||a.s.dispatchEvent(f)});a.m={};b={};for(var e in a.j)b.Bb=e,Object.defineProperty(a.m,b.Bb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ok(a,f.Bb)}}(b),set:function(f){return function(g){var h=f.Bb;a.g.na()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={Bb:b.Bb};a.u={};Pk(a,
|
|
428
|
+
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Qk(a,f)}})});Rk(a);a.l=new wc;a.l.kc=a.m;a.s=new wc;a.s.kc=a.u}function Rk(a){var b=new Map;Pk(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
|
|
429
|
+
function Pk(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)}}
|
|
430
|
+
function Mk(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.ad(),startTime:null};a.j.pause();for(var c=r(lk),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(pk);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(qk);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 Ik(a){var b=new R("caststatuschanged");a.dispatchEvent(b)}
|
|
431
|
+
function Jk(a){var b=new R(a.m.paused?"pause":"play");a.l.dispatchEvent(b)}
|
|
432
|
+
function Lk(a){for(var b=r(pk),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(lk);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(lk),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=r(qk);for(k=
|
|
433
|
+
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 R(Qj,h);a.i.dispatchEvent(h)})}
|
|
434
|
+
function Ok(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.na()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.na()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
|
|
435
|
+
function Qk(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.m};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Nb()};if("getAdManager"==b)return function(){return a.i.Kd()};if("setVideoContainer"==b)return function(c){return a.i.de(c)};
|
|
436
|
+
if(a.g.na()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.na()&&0==Object.keys(a.g.g.video).length&&nk[b]||!a.g.na()?a.i[b].bind(a.i):a.g.get("player",b)}function Kk(a,b,c){a.g.na()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}L("shaka.cast.CastProxy",Hk);Hk.prototype.changeReceiverId=Hk.prototype.ne;
|
|
437
|
+
Hk.prototype.forceDisconnect=Hk.prototype.qb;Hk.prototype.suggestDisconnect=Hk.prototype.lf;Hk.prototype.setAppData=Hk.prototype.ud;Hk.prototype.cast=Hk.prototype.cast;Hk.prototype.receiverName=Hk.prototype.od;Hk.prototype.isCasting=Hk.prototype.na;Hk.prototype.canCast=Hk.prototype.le;Hk.prototype.getPlayer=Hk.prototype.Ee;Hk.prototype.getVideo=Hk.prototype.Me;Hk.prototype.destroy=Hk.prototype.destroy;function Sk(a,b,c,d){wc.call(this);var e=this;this.g=a;this.i=b;this.h=new Tc;this.P={video:a,player:b};this.I=c||function(){};this.S=d||function(f){return f};this.j=null;this.K=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.u=this.l=null;this.N=new Q(function(){Tk(e)});Uk(this)}oa(Sk,wc);q=Sk.prototype;q.isConnected=function(){return this.K};q.Pe=function(){return this.s};q.gf=function(a){this.j=a};q.qe=function(){this.j=null};
|
|
438
|
+
q.hf=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.title=a};q.ff=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.images=[{url:a}]};q.ef=function(a){this.j||(this.j={});this.j.artist=a;this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
439
|
+
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.N&&(a.N.stop(),a.N=null),a.g=null,a.P=null,a.I=null,a.K=!1,a.s=!0,a.l=null,a.u=null,t(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();x(d)})};
|
|
440
|
+
function Uk(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Vk(a)};b.onSenderDisconnected=function(){return Vk(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Wk(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Wk(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return Xk(a,
|
|
441
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Yk(a,e)};b.start();b=r(jk);for(var c=b.next();!c.done;c=b.next())a.h.v(a.g,c.value,function(e){return Zk(a,"video",e)});for(var d in Uj)a.h.v(a.i,Uj[d],function(e){return Zk(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.vd(3840,2160):a.i.vd(1920,1080);a.h.v(a.g,"loadeddata",function(){a.F=!0});a.h.v(a.i,"loading",function(){a.s=
|
|
442
|
+
!1;$k(a)});a.h.v(a.g,"playing",function(){a.s=!1;$k(a)});a.h.v(a.g,"pause",function(){$k(a)});a.h.v(a.i,"unloading",function(){a.s=!0;$k(a)});a.h.v(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.s=!0,$k(a))})).W(al)})}function Vk(a){a.m=0;a.C=!0;a.K=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;$k(a)}
|
|
443
|
+
function $k(a){var b;K(function(c){if(1==c.g)return t(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new R("caststatuschanged");a.dispatchEvent(b);bl(a)||cl(a);x(c)})}
|
|
444
|
+
function dl(a,b,c){var d,e,f,g,h,k,l,m,n,p,u;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,y(v,5),t(v,a.i.load(b.manifest,b.startTime),7)):t(v,Promise.resolve(),3);case 7:ta(v,3);break;case 5:return g=C(v),h=Qj,k=(new Map).set("detail",g),l=new R(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)u=b.playerAfterLoad[p],
|
|
445
|
+
a.i[p](u);a.g.autoplay=f;b.manifest&&(a.g.play(),cl(a));x(v)}})}function Zk(a,b,c){a.i&&(Tk(a),Wk(a,{type:"event",targetName:b,event:c},a.l))}
|
|
446
|
+
function Tk(a){a.N.W(el);for(var b={video:{},player:{}},c=r(kk),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Y())for(var e in ok)0==a.m%ok[e]&&(b.player[e]=a.i[e]());for(var f in nk)0==a.m%nk[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.F&&(a.m+=1);Wk(a,{type:"update",update:b},a.l);bl(a)}function bl(a){return a.C&&(a.g.duration||a.i.Y())?(fl(a),a.C=!1,!0):!1}
|
|
447
|
+
function fl(a,b){var c={contentId:a.i.ad(),streamType:a.i.Y()?"LIVE":"BUFFERED",contentType:""};a.i.Y()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);cl(a,void 0===b?0:b,c)}
|
|
448
|
+
function Yk(a,b){var c=hk(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;dl(a,c.initState,c.appData);Tk(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.P[d][e]=c;break;case "call":d=a.P[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
|
|
449
|
+
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.P[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return gl(a,h,g,null)},function(k){return gl(a,h,g,k)})}}
|
|
450
|
+
function Xk(a,b){var c=hk(b.data);switch(c.type){case "PLAY":a.g.play();cl(a);break;case "PAUSE":a.g.pause();cl(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(),cl(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),cl(a));break;case "STOP":a.i.Cd().then(function(){a.i&&cl(a)});break;case "GET_STATUS":fl(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));
|
|
451
|
+
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||cl(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!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&&fl(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Wk(a,{requestId:Number(c.requestId),type:k},a.u)});break;default:Wk(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
452
|
+
function gl(a,b,c,d){a.i&&Wk(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Wk(a,b,c,d){a.K&&(a=gk(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function cl(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?hl:a.i.bd()?il:a.g.paused?jl:kl,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Wk(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
453
|
+
L("shaka.cast.CastReceiver",Sk);Sk.prototype.destroy=Sk.prototype.destroy;Sk.prototype.setContentArtist=Sk.prototype.ef;Sk.prototype.setContentImage=Sk.prototype.ff;Sk.prototype.setContentTitle=Sk.prototype.hf;Sk.prototype.clearContentMetadata=Sk.prototype.qe;Sk.prototype.setContentMetadata=Sk.prototype.gf;Sk.prototype.isIdle=Sk.prototype.Pe;Sk.prototype.isConnected=Sk.prototype.isConnected;var el=.5,al=5,hl="IDLE",kl="PLAYING",il="BUFFERING",jl="PAUSED";function ll(a){var b=this;this.g=[];this.h=[];this.data=[];(new ge).box("moov",ke).X("pssh",function(c){if(!(1<c.version)){var d=N(c.reader.T,-12,c.size);b.data.push(d);b.g.push(cc(c.reader.eb(16)));if(0<c.version){d=c.reader.O();d=r(db(d));for(var e=d.next();!e.done;e=d.next())e=cc(c.reader.eb(16)),b.h.push(e)}}}).parse(a)}
|
|
454
|
+
function ml(a){if(!a)return a;var b=new ll(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={cc:c.cc},d=b.next())c.cc=d.value,a.some(function(e){return function(f){return hb(f,e.cc)}}(c))||a.push(c.cc);return dc.apply(Yb,ha(a))};function nl(a,b){var c=ul(a,b);return 1!=c.length?null:c[0]}function vl(a,b,c){a=wl(a,b,c);return 1!=a.length?null:a[0]}function ul(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function wl(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}function xl(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}
|
|
455
|
+
function yl(a){return Array.from(a.childNodes).every(function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?a.textContent.trim():null}function zl(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Al(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)}
|
|
456
|
+
function Bl(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}function Cl(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}
|
|
457
|
+
function Dl(a){a=Number(a);return 0===a%1?a:null}function El(a){a=Number(a);return 0===a%1&&0<a?a:null}function Fl(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Gl(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}function Hl(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}
|
|
458
|
+
function Il(a,b){try{var c=Rb(a);return Hl(c,b)}catch(d){return null}};function Jl(a,b){var c=Kl(a),d=null,e=[],f=[],g=new Set(c.map(function(k){return k.keyId}));g["delete"](null);if(1<g.size)throw new O(2,4,4010);b||(f=c.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.Zd?(d=k.init||d,!1):!0}),f.length&&(e=Ll(d,f),0==e.length&&(e=[Mb("",d)])));if(c.length&&(b||!f.length))for(e=[],c=r(Ml.values()),f=c.next();!f.done;f=c.next())f=f.value,"org.w3.clearkey"!=f&&e.push(Mb(f,d));if(g=Array.from(g)[0]||null)for(c=r(e),f=c.next();!f.done;f=c.next()){f=r(f.value.initData);
|
|
459
|
+
for(var h=f.next();!h.done;h=f.next())h.value.keyId=g}return{Gd:g,Tf:d,drmInfos:e,Jd:!0}}function Nl(a,b,c){var d=Jl(a,c);if(b.Jd){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==d.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=d.drmInfos;b.Jd=!1}else if(0<d.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(e){return d.drmInfos.some(function(f){return f.keySystem==e.keySystem})}),0==b.drmInfos.length))throw new O(2,4,4008);return d.Gd||b.Gd}
|
|
460
|
+
function Ol(a){var b=0,c=lb(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=N(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
461
|
+
function Pl(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""}
|
|
462
|
+
function Ll(a,b){for(var c=[],d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=Ml.get(e.Zd);if(f){var g;if(g=vl(e.node,"urn:microsoft:playready","pro")){g=ac(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),k=g.length,l=h.length+16+k,m=new Uint8Array(l),n=lb(m),p=0;n.setUint32(p,l);p+=4;n.setUint32(p,1886614376);p+=4;n.setUint32(p,0);p+=4;m.set(h,p);p+=h.length;n.setUint32(p,k);p+=4;m.set(g,p);g=[{initData:m,initDataType:"cenc",keyId:e.keyId}]}else g=
|
|
463
|
+
null;g=Mb(f,e.init||a||g);if(f=Ql.get(f))g.licenseServerUri=f(e);c.push(g)}}return c}function Kl(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Rl(c.value))&&b.push(c);return b}
|
|
464
|
+
function Rl(a){var b=a.getAttribute("schemeIdUri"),c=xl(a,"urn:mpeg:cenc:2013","default_KID"),d=wl(a,"urn:mpeg:cenc:2013","pssh").map(yl);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:ac(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,Zd:b,keyId:c,init:0<e.length?e:null}}
|
|
465
|
+
var Ml=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime"),Ql=(new Map).set("com.widevine.alpha",function(a){return(a=vl(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||
|
|
466
|
+
"":""}).set("com.microsoft.playready",function(a){a=vl(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=ac(a.textContent);a=Ol(a).filter(function(b){return 1===b.type})[0];if(!a)return"";a=Tb(a.value,!0);return(a=Hl(a,"WRMHEADER"))?Pl(a):""});function Sl(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=
|
|
467
467
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
468
|
-
function
|
|
469
|
-
v)if(u){u=
|
|
470
|
-
function
|
|
471
|
-
function
|
|
472
|
-
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
|
|
473
|
-
function
|
|
474
|
-
function
|
|
475
|
-
return h};function
|
|
476
|
-
function
|
|
477
|
-
b);a.g.skip(b);return new
|
|
478
|
-
function
|
|
479
|
-
function
|
|
480
|
-
function
|
|
481
|
-
function
|
|
482
|
-
|
|
483
|
-
u=new U(
|
|
484
|
-
Infinity,d);return{
|
|
485
|
-
function
|
|
486
|
-
function
|
|
487
|
-
p,!0),l.
|
|
488
|
-
function
|
|
489
|
-
function
|
|
490
|
-
|
|
491
|
-
function
|
|
492
|
-
function
|
|
493
|
-
function
|
|
494
|
-
r(v);for(
|
|
495
|
-
0)+(
|
|
496
|
-
function
|
|
497
|
-
function
|
|
498
|
-
function
|
|
499
|
-
function
|
|
500
|
-
width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null});return t(G,
|
|
501
|
-
u.next())
|
|
502
|
-
function
|
|
503
|
-
Z.B(6);break}H=F.value;return t(Z,
|
|
504
|
-
function
|
|
505
|
-
function
|
|
506
|
-
function
|
|
507
|
-
function
|
|
508
|
-
(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.
|
|
509
|
-
function
|
|
510
|
-
function
|
|
511
|
-
function
|
|
512
|
-
function
|
|
513
|
-
d=
|
|
514
|
-
function
|
|
515
|
-
function
|
|
516
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
517
|
-
function
|
|
518
|
-
q.stop=function(){for(var a=r(Object.values(this.
|
|
519
|
-
function
|
|
520
|
-
function
|
|
521
|
-
function
|
|
522
|
-
v=
|
|
523
|
-
|
|
524
|
-
(
|
|
525
|
-
|
|
526
|
-
c=r(c);for(e=c.next();!e.done;e=c.next())
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
return
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
function
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
function
|
|
543
|
-
case
|
|
544
|
-
case
|
|
545
|
-
|
|
546
|
-
function
|
|
547
|
-
|
|
548
|
-
function
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
q.
|
|
554
|
-
function
|
|
555
|
-
function
|
|
556
|
-
|
|
557
|
-
k=Math.min(k,p.
|
|
558
|
-
|
|
559
|
-
function
|
|
560
|
-
r(
|
|
561
|
-
function
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
function
|
|
567
|
-
function
|
|
468
|
+
function Tl(a,b){var c=Ul(a,b,"timescale"),d=1;c&&(d=El(c)||1);c=Ul(a,b,"duration");(c=El(c||""))&&(c/=d);var e=Ul(a,b,"startNumber"),f=Number(Ul(a,b,"presentationTimeOffset"))||0,g=Fl(e||"");if(null==e||null==g)g=1;var h=Vl(a,b,"SegmentTimeline");e=null;if(h){e=d;var k=a.V.duration||Infinity,l=ul(h,"S");h=[];var m=-f;l=r(fb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,u=n.next,v=zl(p,"t",Fl);n=zl(p,"d",Fl);var z=zl(p,"r",Dl);null!=v&&(v-=f);if(!n)break;p=null!=v?v:m;v=z||0;if(0>
|
|
469
|
+
v)if(u){u=zl(u,"t",Fl);if(null==u)break;else if(p>=u)break;v=Math.ceil((u-p)/n)-1}else{if(Infinity==k)break;else if(p/e>=k)break;v=Math.ceil((k*e-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/e);u=r(db(v+1));for(v=u.next();!v.done;v=u.next())m=p+n,h.push({start:p/e,end:m/e,sf:p}),p=m}e=h}return{timescale:d,ga:c,Ab:g,Pa:f/d||0,Dd:f,timeline:e}}function Ul(a,b,c){return[b(a.L),b(a.ia),b(a.fa)].filter(Jb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
470
|
+
function Vl(a,b,c){return[b(a.L),b(a.ia),b(a.fa)].filter(Jb).map(function(d){return nl(d,c)}).reduce(function(d,e){return d||e})}
|
|
471
|
+
function Wl(a,b,c,d,e,f){for(var g=xl(a,"http://www.w3.org/1999/xlink","href"),h=xl(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 nc(new O(2,4,4028));if("onLoad"!=h)return nc(new O(2,4,4027));var m=Lb([d],[g]);return e.request(0,Jc(m,b)).$(function(n){n=Il(n.data,a.tagName);if(!n)return nc(new O(2,4,4001,g));
|
|
472
|
+
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 Xl(a,b,c,m[0],e,f+1)})}
|
|
473
|
+
function Xl(a,b,c,d,e,f){f=void 0===f?0:f;if(xl(a,"http://www.w3.org/1999/xlink","href")){var g=Wl(a,b,c,d,e,f);c&&(g=g.$(void 0,function(){return Xl(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"==xl(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Xl(k,b,c,d,e,f)));return rc(g).$(function(){return a})};function Yl(a,b,c,d,e,f,g){var h,k=(new ge).X("sidx",function(l){h=Zl(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
|
|
474
|
+
function Zl(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.fb(),m=g.reader.fb();g.reader.skip(2);var n=g.reader.Xb();a=a+g.size+m;n=r(db(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.O();m=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==m)throw new O(2,3,3006);h.push(new tg(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();
|
|
475
|
+
return h};function $l(a){this.h=lb(a);this.g=new S(this.h,0)}$l.prototype.Da=function(){return this.g.Da()};
|
|
476
|
+
function am(a){var b=bm(a);if(7<b.length)throw new O(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=bm(a);a:{d=r(cm);for(var e=d.next();!e.done;e=d.next())if(hb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.H;else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);d=0;e=r(fb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.da?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.H+b<=a.h.byteLength?b:a.h.byteLength-a.g.H;d=lb(a.h,a.g.H,
|
|
477
|
+
b);a.g.skip(b);return new dm(c,d)}function bm(a){var b=a.g.H,c=a.g.wa();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return N(a.h,b,c)}var cm=[[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 dm(a,b){this.id=a;this.g=b}
|
|
478
|
+
function em(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=r(db(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function fm(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new $l(a.g);for(var n=null,p=null;a.Da();){var u=am(a);if(187==u.id){var v=gm(u);v&&(u=c*v.tf,v=b+v.Ze,null!=n&&m.push(new tg(n+g,u+g,l,p,v-1,f,g,h,k)),n=u,p=v)}}null!=n&&m.push(new tg(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
479
|
+
function gm(a){var b=new $l(a.g);a=am(b);if(179!=a.id)throw new O(2,3,3013);a=em(a);b=am(b);if(183!=b.id)throw new O(2,3,3012);b=new $l(b.g);for(var c=0;b.Da();){var d=am(b);if(241==d.id){c=em(d);break}}return{tf:a,Ze:c}};function hm(a,b){var c=Vl(a,b,"Initialization");if(!c)return null;var d=a.L.ta,e=c.getAttribute("sourceURL");e&&(d=Lb(a.L.ta,[e]));e=0;var f=null;if(c=zl(c,"range",Cl))e=c.start,f=c.end;return new rg(function(){return d},e,f)}
|
|
480
|
+
function im(a,b){var c=Number(Ul(a,jm,"presentationTimeOffset"))||0,d=Ul(a,jm,"timescale"),e=1;d&&(e=El(d)||1);var f=c/e||0,g=hm(a,jm);km(a,g);var h=yc(a);return{rb:function(){var k=Vl(h,jm,"RepresentationIndex"),l=h.L.ta;k&&(k=k.getAttribute("sourceURL"))&&(l=Lb(h.L.ta,[k]));k=lm(h);return mm(h,b,g,l,k.start,k.end,f)}}}
|
|
481
|
+
function mm(a,b,c,d,e,f,g){var h,k,l,m,n,p,u,v,z,w,A,D,B,E,F;return K(function(H){var G;if(1==H.g)return h=a.presentationTimeline,k=!a.Xa||!a.V.Qd,l=a.V.start,m=a.V.duration,n=a.L.mimeType.split("/")[1],p=b,u=null,v=[p(d,e,f),"webm"==n?p(c.ua(),c.h,c.g):null],p=null,t(H,Promise.all(v),2);z=H.h;w=z[0];A=z[1]||null;D=null;B=l-g;E=l;F=m?l+m:Infinity;if("mp4"==n)var I=Yl(w,e,d,c,B,E,F);else{I=new $l(A);if(440786851!=am(I).id)throw new O(2,3,3008);var J=am(I);if(408125543!=J.id)throw new O(2,3,3009);I=
|
|
482
|
+
J.g.byteOffset;J=new $l(J.g);for(G=null;J.Da();){var M=am(J);if(357149030==M.id){G=M;break}}if(!G)throw new O(2,3,3010);G=new $l(G.g);M=1E6;for(J=null;G.Da();){var P=am(G);if(2807729==P.id)M=em(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new O(2,3,3003);}if(null==J)throw new O(2,3,3011);G=M/1E9;G={mf:G,duration:J*G};J=G.mf;G=G.duration;M=am(new $l(w));if(475249515!=M.id)throw new O(2,3,3007);I=fm(M,I,J,G,d,c,B,E,F)}D=I;h.xb(D);
|
|
483
|
+
u=new U(D);k&&u.Sa(E,F,!0);return H["return"](u)})}function jm(a){return a.Yb}function lm(a){var b=Vl(a,jm,"RepresentationIndex");a=Ul(a,jm,"indexRange");a=Cl(a||"");b&&(a=zl(b,"range",Cl,a));return a}function km(a,b){nm(a,b);if(!lm(a))throw new O(2,4,4002);}function nm(a,b){var c=a.L.mimeType.split("/")[1];if("text"!=a.L.contentType&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);};function om(a,b){var c=hm(a,pm),d=qm(a);if(!d.ga&&!d.timeline&&1<d.ub.length)throw new O(2,4,4002);if(!d.ga&&!a.V.duration&&!d.timeline&&1==d.ub.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.fa.id&&a.L.id&&(f=a.fa.id+","+a.L.id,e=b[f]);c=rm(a.V.start,a.V.duration,a.L.ta,d,c);d=!e;e?e.vb(c,a.presentationTimeline.Na()):(e=new U(c),f&&a.Xa&&(b[f]=e));a.presentationTimeline.xb(c);a.Xa&&a.V.Qd||e.Sa(a.V.start,a.V.duration?a.V.start+a.V.duration:
|
|
484
|
+
Infinity,d);return{rb:function(){return Promise.resolve(e)}}}function pm(a){return a.Va}function qm(a){var b=sm(a);a=Tl(a,pm);var c=a.Ab;0==c&&(c=1);var d=0;a.ga?d=a.ga*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ga:a.ga,startTime:d,Ab:c,Pa:a.Pa,timeline:a.timeline,ub:b}}
|
|
485
|
+
function rm(a,b,c,d,e){var f=d.ub.length;d.timeline&&d.timeline.length!=d.ub.length&&(f=Math.min(d.timeline.length,d.ub.length));var g=a-d.Pa,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(db(f));for(var n=f.next();!n.done;m={Nc:m.Nc},n=f.next()){n=n.value;var p=d.ub[n];m.Nc=Lb(c,[p.Se]);var u=void 0;u=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new tg(a+l,a+u,function(v){return function(){return v.Nc}}(m),p.start,p.end,e,g,a,h));l=u}return k}
|
|
486
|
+
function sm(a){return[a.L.Va,a.ia.Va,a.fa.Va].filter(Jb).map(function(b){return ul(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Od&&(a.Od=!0);var c=b.getAttribute("media");b=zl(b,"mediaRange",Cl,{start:0,end:null});return{Se:c,start:b.start,end:b.end}})};function tm(a,b,c,d,e,f){var g=um(a),h=vm(a);wm(h);var k=yc(a);if(h.Sb)return nm(a,g),{rb:function(){var v=Sl(h.Sb,k.L.id,null,k.bandwidth||null,null);v=Lb(k.L.ta,[v]);return mm(k,b,g,v,0,null,h.Pa)}};if(h.ga)return d||(a.presentationTimeline.hd(h.ga),a.presentationTimeline.jd(a.V.start)),{rb:function(){return xm(k,h,e,g,f)}};var l=null;d=null;a.fa.id&&a.L.id&&(d=a.fa.id+","+a.L.id,l=c[d]);var m=ym(k,h,g),n=a.V.start,p=a.V.duration?a.V.start+a.V.duration:Infinity,u=Infinity!=p;l?(u&&(new U(m)).Sa(n,
|
|
487
|
+
p,!0),l.vb(m,a.presentationTimeline.Na())):(l=new U(m),d&&a.Xa&&(c[d]=l));a.presentationTimeline.xb(m);u&&l.Sa(n,p);return{rb:function(){return Promise.resolve(l)}}}function zm(a){return a.Zb}function vm(a){var b=Tl(a,zm),c=Ul(a,zm,"media");a=Ul(a,zm,"index");return{ga:b.ga,timescale:b.timescale,Ab:b.Ab,Pa:b.Pa,Dd:b.Dd,timeline:b.timeline,gd:c,Sb:a}}
|
|
488
|
+
function wm(a){var b=a.Sb?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Sb&&(a.timeline=null),a.ga=null);if(!a.Sb&&!a.gd)throw new O(2,4,4002);}
|
|
489
|
+
function xm(a,b,c,d,e){function f(J){var M=(J-u)*p,P=M+b.Pa;M+=l;var wa=Math.min(M+p,h());return new tg(M,wa,function(){var Z=Sl(z,A,J,w,P*v);return Lb(D,[Z])},0,null,d,B,l,h())}function g(){var J=[Math.max(k.Na(),l),Math.min(k.Ta(),h())].map(function(M){return M-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(M){return M+u})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.V.start,m=a.fa.id,n=a.V.duration,p=b.ga,u=b.Ab,v=b.timescale,z=b.gd,
|
|
490
|
+
w=a.bandwidth||null,A=a.L.id,D=a.L.ta,B=l-b.Pa,E=g();a=a.Xa?Math.max(E[0],E[1]-c+1):E[0];E=E[1];c=[];for(var F=a;F<=E;++F){var H=f(F);c.push(H)}var G=new U(c);c=k.Ta()<h();F=k.Y();if(c||F){var I=Math.max(a,E+1);G.Ec(p,function(){var J=k.Na();G.Ya(J);var M=r(g());M.next();M=M.next().value;for(var P=[];I<=M;){var wa=f(I);P.push(wa);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(G)}
|
|
491
|
+
function ym(a,b,c){var d=a.V.start,e=a.V.duration,f=d-b.Pa;e=e?d+e:Infinity;for(var g=[],h={},k=r(fb(b.timeline)),l=k.next();!l.done;h={Mc:h.Mc,Oc:h.Oc,Rc:h.Rc,Jc:h.Jc,Sc:h.Sc,Kc:h.Kc},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.sf;m=m.end;h.Rc=l.da+b.Ab;h.Sc=p+b.Dd;h.Oc=a.L.id;h.Jc=a.bandwidth||null;h.Mc=b.gd;h.Kc=a.L.ta;g.push(new tg(d+n,d+m,function(u){return function(){var v=Sl(u.Mc,u.Oc,u.Rc,u.Jc||null,u.Sc);return Lb(u.Kc,[v]).map(function(z){return z.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
492
|
+
function um(a){var b=Ul(a,zm,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.ta;return new rg(function(){var f=Sl(b,c,null,d,null);return Lb(e,[f])},0,null)};function Am(){this.j=[];this.g=[];this.h=[];this.i=[];this.l=new Set}Am.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.i=[];this.j=[]};
|
|
493
|
+
function Bm(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M,P,wa,Z,bb,Ab,Lc;return K(function(Qa){switch(Qa.g){case 1:d=Nb;Cm(b);Dm(b);Em(b);if(!c&&1==b.length){e=b[0];a.g=e.nc;a.h=e.Gc;a.i=e.textStreams;Qa.B(2);break}f=-1;g=r(fb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.da,n=l.item,a.l.has(n.id)||(a.l.add(n.id),-1==f&&(f=m));if(-1==f)return Qa["return"]();p=b.map(function(Bb){return Bb.nc});u=b.map(function(Bb){return Bb.Gc});v=b.map(function(Bb){return Bb.textStreams});z=
|
|
494
|
+
r(v);for(w=z.next();!w.done;w=z.next())A=w.value,A.push(Fm());return t(Qa,Gm(a.g,p,f,Hm,Im),3);case 3:return t(Qa,Gm(a.h,u,f,Hm,Im),4);case 4:return t(Qa,Gm(a.i,v,f,Hm,Im),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(J=r(a.g),M=J.next();!M.done;M=J.next())for(P=M.value,wa=r(a.h),Z=wa.next();!Z.done;Z=wa.next())bb=Z.value,Ab=be(P.drmInfos,bb.drmInfos),P.drmInfos.length&&bb.drmInfos.length&&!Ab.length||(Lc=D++,B.push({id:Lc,language:P.language,primary:P.primary,audio:P,video:bb,bandwidth:(P.bandwidth||
|
|
495
|
+
0)+(bb.bandwidth||0),drmInfos:Ab,allowedByApplication:!0,allowedByKeySystem:!0}));else for(E=a.h.concat(a.g),F=r(E),H=F.next();!H.done;H=F.next())G=H.value,I=D++,B.push({id:I,language:G.language,primary:G.primary,audio:G.type==d.Wa?G:null,video:G.type==d.Ka?G:null,bandwidth:G.bandwidth||0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0});a.j=B;x(Qa)}})}
|
|
496
|
+
function Cm(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.nc),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&&Bc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.nc=c}}
|
|
497
|
+
function Em(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&&Bc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
498
|
+
function Dm(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Gc),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&&Bc(e.roles,h.roles)&&cd(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Gc=c}}
|
|
499
|
+
function Jm(a){var b,c,d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H;return K(function(G){switch(G.g){case 1:b=Nb;if(1==a.length)return G["return"](a[0]);c=a.map(function(I){return I.filter(function(J){return J.type==b.Wa})});d=a.map(function(I){return I.filter(function(J){return J.type==b.Ka})});e=a.map(function(I){return I.filter(function(J){return J.type==b.ha})});f=r(e);for(g=f.next();!g.done;g=f.next())h=g.value,h.push({id:0,originalId:"",primary:!1,type:"text",mimeType:"",codecs:"",language:"",label:null,
|
|
500
|
+
width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null});return t(G,Gm([],c,0,Km,Lm),2);case 2:return k=G.h,t(G,Gm([],d,0,Km,Lm),3);case 3:return l=G.h,t(G,Gm([],e,0,Km,Lm),4);case 4:m=G.h;n=0;if(l.length&&k.length)for(w=r(k),A=w.next();!A.done;A=w.next())for(D=A.value,B=r(l),E=B.next();!E.done;E=B.next())F=E.value,H=n++,F.variantIds.push(H),D.variantIds.push(H);else for(p=l.concat(k),u=r(p),v=u.next();!v.done;v=
|
|
501
|
+
u.next())z=v.value,z.variantIds=[n++];return G["return"](l.concat(k).concat(m))}})}
|
|
502
|
+
function Gm(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M,P,wa;return K(function(Z){switch(Z.g){case 1:f=Nb;g=[];h=r(fb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.da,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);u=r(a);v=u.next();case 2:if(v.done){Z.B(4);break}z=v.value;return t(Z,Mm(z,b,c,e,g),5);case 5:w=Z.h;if(!w)throw new O(2,4,4037);v=u.next();Z.B(2);break;case 4:A=r(g),D=A.next();case 6:if(D.done){Z.B(8);break}B=D.value;E=r(B);F=E.next();case 9:if(F.done){D=A.next();
|
|
503
|
+
Z.B(6);break}H=F.value;return t(Z,Nm(H,b,d,e,g),12);case 12:(G=Z.h)&&a.push(G);F=E.next();Z.B(9);break;case 8:I=r(g);for(D=I.next();!D.done;D=I.next())for(J=D.value,M={},P=r(J),F=P.next();!F.done;M={nb:M.nb},F=P.next())if(M.nb=F.value,M.nb.type!=f.ha||M.nb.language)if(wa=a.some(function(bb){return function(Ab){return Ab.mimeType==bb.nb.mimeType&&gd(Ab.codecs)==gd(bb.nb.codecs)}}(M)))throw new O(2,4,4037);return Z["return"](a)}})}
|
|
504
|
+
function Mm(a,b,c,d,e){var f;return K(function(g){if(1==g.g)return(f=Om(b,a))?t(g,Pm(f),2):g["return"](!1);Qm(a,f,c,d,e);return g["return"](!0)})}function Pm(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)}
|
|
505
|
+
function Nm(a,b,c,d,e){var f,g;return K(function(h){if(1==h.g)return f=c(a),(g=Om(b,f))?f.createSegmentIndex?t(h,Pm(g),2):h.B(2):h["return"](null);Qm(f,g,0,d,e);return h["return"](f)})}function Qm(a,b,c,d,e){b=r(fb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.da;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Bf(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
|
|
506
|
+
function Hm(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Vg;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function Km(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
507
|
+
function Im(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=be(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new O(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
508
|
+
(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=Hm(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Im(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Im(a.trickModeVideo,b)}
|
|
509
|
+
function Lm(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)}}}
|
|
510
|
+
function Om(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Rm,video:Rm,text:Sm}[f.type],h={audio:Tm,video:Um,text:Vm}[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 Rm(a,b){var c;if(!(c=b.mimeType!=a.mimeType||gd(b.codecs)!=gd(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<be(c,d).length:1)}return c?!1:!0}
|
|
511
|
+
function Sm(a,b){return a.language?b.language?0==Bf(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}
|
|
512
|
+
function Tm(a,b,c){if(a.id==c.id)return!0;var d=Bf(a.language,b.language),e=Bf(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;
|
|
513
|
+
d=Wm(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Xm)return!0;if(d==Ym)return!1;d=Wm(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Xm?!0:d==Ym?!1:a.bandwidth&&Zm(a.bandwidth,b.bandwidth,c.bandwidth)==Xm?!0:!1}
|
|
514
|
+
function Um(a,b,c){if(a.id==c.id)return!0;var d=Wm(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Xm)return!0;if(d==Ym)return!1;if(a.frameRate){d=Wm(a.frameRate,b.frameRate,c.frameRate);if(d==Xm)return!0;if(d==Ym)return!1}return a.bandwidth&&Zm(a.bandwidth,b.bandwidth,c.bandwidth)==Xm?!0:!1}
|
|
515
|
+
function Vm(a,b,c){if(a.id==c.id)return!0;var d=Bf(a.language,b.language),e=Bf(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!=
|
|
516
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Fm(){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null}}
|
|
517
|
+
function Wm(a,b,c){if(b==a&&a!=c)return Ym;if(c==a&&a!=b)return Xm;if(b>a){if(c<=a||c-a<b-a)return Xm;if(c-a>b-a)return Ym}else{if(c>a)return Ym;if(a-c<a-b)return Xm;if(a-c>a-b)return Ym}return $m}function Zm(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Xm:b<a?Ym:$m}var Xm=1,$m=0,Ym=-1;function an(){var a=this;this.D=this.o=null;this.h=[];this.A=null;this.u=1;this.l={};this.I={};this.g=new Am;this.s=0;this.C=new Ka(5);this.m=new Q(function(){a.Ub()});this.i=new Dc;this.j=null;this.F=[]}q=an.prototype;q.configure=function(a){this.o=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.h=[a],c.D=b,t(e,bn(c),2);d=e.h;c.D&&cn(c,d);if(!c.D)throw new O(2,7,7001);return e["return"](c.A)})};
|
|
518
|
+
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.o=this.D=null;this.h=[];this.A=null;this.l={};this.g=null;null!=this.m&&(this.m.stop(),this.m=null);return this.i.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return y(c,2),t(c,bn(a),4);if(2!=c.g)return ta(c,0);b=C(c);if(!a.D||!b)return c["return"]();a.D.onError(b);x(c)})};q.onExpirationUpdated=function(){};
|
|
519
|
+
function bn(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=Jc(a.h,a.o.retryParameters),c=a.D.networkingEngine,d=Date.now(),e=c.request(0,b),Ec(a.i,e),t(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.D)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return t(k,dn(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;La(a.C,1,h);return k["return"](h)})}
|
|
520
|
+
function dn(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Il(b,"MPD");if(!d)throw new O(2,4,4001,c);e=a.o.dash.xlinkFailGracefully;f=Xl(d,a.o.retryParameters,e,c,a.D.networkingEngine);Ec(a.i,f);return t(h,f.promise,2)}g=h.h;return h["return"](en(a,g,c))})}
|
|
521
|
+
function en(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M,P,wa;return K(function(Z){switch(Z.g){case 1:d=[c];e=ul(b,"Location").map(yl).filter(Jb);0<e.length&&(f=Lb(d,e),d=a.h=f);g=ul(b,"BaseURL").map(yl);h=Lb(d,g);k=a.o.dash.ignoreMinBufferTime;l=0;k||(l=zl(b,"minBufferTime",Bl)||0);a.s=zl(b,"minimumUpdatePeriod",Bl,-1);m=zl(b,"availabilityStartTime",Al);n=zl(b,"timeShiftBufferDepth",Bl);p=a.o.dash.ignoreSuggestedPresentationDelay;u=null;p||(u=zl(b,"suggestedPresentationDelay",Bl));
|
|
522
|
+
v=zl(b,"maxSegmentDuration",Bl);z=b.getAttribute("type")||"static";if(a.A)for(w=a.A.presentationTimeline,A=r(Object.values(a.l)),D=A.next();!D.done;D=A.next())B=D.value,B.Ya(w.Na());else E=a.o.defaultPresentationDelay||1.5*l,F=null!=u?u:E,w=new T(m,F,a.o.dash.autoCorrectDrift);H={Xa:"static"!=z,presentationTimeline:w,fa:null,V:null,ia:null,L:null,bandwidth:0,Od:!1};G=fn(a,H,h,b);I=G.duration;J=G.periods;w.$b("static"==z);"static"!=z&&G.Hd||w.Ga(I||Infinity);(M=w.Y())&&!isNaN(a.o.availabilityWindowOverride)&&
|
|
523
|
+
(n=a.o.availabilityWindowOverride);null==n&&(n=Infinity);w.xd(n);w.hd(v||1);return t(Z,Bm(a.g,J,H.Xa),2);case 2:if(a.A){a.A.variants=a.g.j;a.A.textStreams=a.g.i.slice();Z.B(3);break}a.A={presentationTimeline:w,variants:a.g.j,textStreams:a.g.i.slice(),offlineSessionIds:[],minBufferTime:l||0};if(!w.fe()){Z.B(3);break}P=ul(b,"UTCTiming");return t(Z,gn(a,h,P),5);case 5:wa=Z.h;if(!a.D)return Z["return"]();w.be(wa);case 3:return a.D.makeTextStreamsForClosedCaptions(a.A),t(Z,a.D.filter(a.A),0)}})}
|
|
524
|
+
function fn(a,b,c,d){var e=zl(d,"mediaPresentationDuration",Bl),f=[],g=0;d=ul(d,"Period");for(var h=r(fb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.da;var m=l.item,n=l.next;l=zl(m,"start",Bl,g);var p=m.id,u=zl(m,"duration",Bl),v=null;if(n){var z=zl(n,"start",Bl);null!=z&&(v=z-l)}else null!=e&&(v=e-l);null==v&&(v=u);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.F.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=hn(a,b,c,{start:l,duration:v,node:m,Qd:null==v||!n});f.push(g);
|
|
525
|
+
b.fa.id&&v&&(a.I[b.fa.id]=v);if(null==v){g=null;break}g=l+v}}a.F=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Hd:!1}:{periods:f,duration:g,Hd:!0}}
|
|
526
|
+
function hn(a,b,c,d){b.fa=jn(d.node,null,c);b.V=d;b.fa.id||(b.fa.id="__shaka_period_"+d.start);c=ul(d.node,"EventStream");c=r(c);for(var e=c.next();!e.done;e=c.next())kn(a,d.start,d.duration,e.value);c=ul(d.node,"AdaptationSet").map(function(m){return ln(a,b,m)}).filter(Jb);if(b.Xa){d=[];e=r(c);for(var f=e.next();!f.done;f=e.next()){f=r(f.value.bf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);}d=c.filter(function(m){return!m.Bd});c=c.filter(function(m){return m.Bd});
|
|
527
|
+
c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Bd.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={hc:h.hc},l=k.next())h.hc=l.value,h.hc.trickModeVideo=e.streams.find(function(m){return function(n){return gd(m.hc.codecs)==gd(n.codecs)}}(h))}}}e=a.o.disableAudio?[]:mn(d,"audio");f=a.o.disableVideo?[]:mn(d,"video");c=a.o.disableText?[]:mn(d,"text");if(!f.length&&!e.length)throw new O(2,4,4004);d=[];
|
|
528
|
+
e=r(e);for(g=e.next();!g.done;g=e.next())d.push.apply(d,ha(g.value.streams));e=[];f=r(f);for(g=f.next();!g.done;g=f.next())e.push.apply(e,ha(g.value.streams));f=[];c=r(c);for(g=c.next();!g.done;g=c.next())f.push.apply(f,ha(g.value.streams));return{id:b.fa.id,nc:d,Gc:e,textStreams:f}}function mn(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
529
|
+
function ln(a,b,c){b.ia=jn(c,b.fa,null);if("image"==b.ia.contentType)return null;var d=!1,e=ul(c,"Role"),f=e.map(function(B){return B.getAttribute("value")}).filter(Jb),g=void 0,h="text"==b.ia.contentType;h&&(g="subtitle");e=r(e);for(var k=e.next();!k.done;k=e.next()){k=k.value;var l=k.getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(k=k.getAttribute("value"),k){case "main":d=!0;break;case "caption":case "subtitle":g=k}}l=ul(c,"EssentialProperty");e=null;k=!1;l=r(l);for(var m=
|
|
530
|
+
l.next();!m.done;m=l.next())m=m.value,"http://dashif.org/guidelines/trickmode"==m.getAttribute("schemeIdUri")?e=m.getAttribute("value"):k=!0;l=ul(c,"Accessibility");var n=new Map;l=r(l);for(m=l.next();!m.done;m=l.next()){var p=m.value;m=p.getAttribute("schemeIdUri");p=p.getAttribute("value");if("urn:scte:dash:cc:cea-608:2015"==m||"urn:scte:dash:cc:cea-708:2015"==m)if(m=1,null!=p){p=r(p.split(";"));for(var u=p.next();!u.done;u=p.next()){var v=u.value,z=u=void 0;v.includes("=")?(v=v.split("="),u=v[0].startsWith("CC")?
|
|
531
|
+
v[0]:"CC"+v[0],z=v[1].split(",")[0].split(":").pop()):(u="CC"+m,m+=2,z=v);n.set(u,xf(z))}}else n.set("CC1","und");else"urn:mpeg:dash:role:2011"==m&&null!=p&&(f.push(p),"captions"==p&&(g="caption"))}if(k)return null;k=ul(c,"ContentProtection");var w=Jl(k,a.o.dash.ignoreDrmInfo),A=xf(c.getAttribute("lang")||"und"),D=c.getAttribute("label");(k=ul(c,"Label"))&&k.length&&(k=k[0],k.textContent&&(D=k.textContent));k=ul(c,"Representation");c=k.map(function(B){return nn(a,b,w,g,A,D,d,f,n,B)}).filter(function(B){return!!B});
|
|
532
|
+
if(0==c.length){if(a.o.dash.ignoreEmptyAdaptationSet||h)return null;throw new O(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=on(c[0].mimeType,c[0].codecs),h=r(c),l=h.next();!l.done;l=h.next())l.value.type=b.ia.contentType;h=r(c);for(l=h.next();!l.done;l=h.next())for(l=l.value,m=r(w.drmInfos),p=m.next();!p.done;p=m.next())p=p.value,p.keyIds=p.keyIds&&l.keyIds?new Set([].concat(ha(p.keyIds),ha(l.keyIds))):p.keyIds||l.keyIds;h=k.map(function(B){return B.getAttribute("id")}).filter(Jb);
|
|
533
|
+
return{id:b.ia.id||"__fake__"+a.u++,contentType:b.ia.contentType,language:A,Uf:d,streams:c,drmInfos:w.drmInfos,Bd:e,bf:h}}
|
|
534
|
+
function nn(a,b,c,d,e,f,g,h,k,l){b.L=jn(l,b.ia,null);if(!pn(b.L))return null;var m=b.V.start;b.bandwidth=zl(l,"bandwidth",El)||0;var n=b.L.contentType;n="text"==n||"application"==n;try{var p=function(A,D,B){return qn(a,A,D,B)};if(b.L.Yb)var u=im(b,p);else if(b.L.Va)u=om(b,a.l);else if(b.L.Zb)u=tm(b,p,a.l,!!a.A,a.o.dash.initialSegmentLimit,a.I);else{var v=b.L.ta,z=b.V.duration||0;u={rb:function(){return Promise.resolve(Ug(m,z,v))}}}}catch(A){if(n&&4002==A.code)return null;throw A;}n=ul(l,"ContentProtection");
|
|
535
|
+
n=Nl(n,c,a.o.dash.ignoreDrmInfo);n=new Set(n?[n]:[]);ul(l,"SupplementalProperty").some(function(A){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==A.getAttribute("schemeIdUri")&&"JOC"==A.getAttribute("value")})&&(b.L.mimeType="audio/eac3-joc");var w={id:a.u++,originalId:b.L.id,createSegmentIndex:function(){var A;return K(function(D){if(1==D.g){if(w.segmentIndex)return D.B(0);A=w;return t(D,u.rb(),3)}A.segmentIndex=D.h;x(D)})},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,
|
|
536
|
+
pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,label:f,type:b.ia.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,channelsCount:b.L.kd,audioSamplingRate:b.L.audioSamplingRate,closedCaptions:k};return w}
|
|
537
|
+
q.Ub=function(){var a=this,b,c;return K(function(d){switch(d.g){case 1:return b=0,y(d,2),t(d,bn(a),4);case 4:b=d.h;ta(d,3);break;case 2:c=C(d),a.D&&(c.severity=1,a.D.onError(c));case 3:if(!a.D)return d["return"]();cn(a,b);x(d)}})};function cn(a,b){0>a.s||a.m.W(Math.max(3,a.s-b,Ma(a.C)))}
|
|
538
|
+
function jn(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,kd:null,audioSamplingRate:null};c=c||b.ta;var d=ul(a,"BaseURL").map(yl),e=a.getAttribute("contentType")||b.contentType,f=a.getAttribute("mimeType")||b.mimeType,g=a.getAttribute("codecs")||b.codecs,h=zl(a,"frameRate",Gl)||b.frameRate,k=a.getAttribute("sar")||b.pixelAspectRatio,l=ul(a,"InbandEventStream"),m=b.emsgSchemeIdUris.slice();l=r(l);for(var n=l.next();!n.done;n=l.next())n=
|
|
539
|
+
n.value.getAttribute("schemeIdUri"),m.includes(n)||m.push(n);l=ul(a,"AudioChannelConfiguration");l=rn(l)||b.kd;n=zl(a,"audioSamplingRate",Fl)||b.audioSamplingRate;e||(e=on(f,g));return{ta:Lb(c,d),Yb:nl(a,"SegmentBase")||b.Yb,Va:nl(a,"SegmentList")||b.Va,Zb:nl(a,"SegmentTemplate")||b.Zb,width:zl(a,"width",Fl)||b.width,height:zl(a,"height",Fl)||b.height,contentType:e,mimeType:f,codecs:g,frameRate:h,pixelAspectRatio:k,emsgSchemeIdUris:m,id:a.getAttribute("id"),kd:l,audioSamplingRate:n}}
|
|
540
|
+
function rn(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":if(b=
|
|
541
|
+
parseInt(c,16)){for(a=0;b;)b&1&&++a,b>>=1;return a}}}return null}function pn(a){var b=a.Yb?1:0;b+=a.Va?1:0;b+=a.Zb?1:0;if(0==b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.Yb&&(a.Va=null),a.Zb=null);return!0}
|
|
542
|
+
function sn(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=Jc(e,a.o.retryParameters),f.method=d,g=a.D.networkingEngine.request(4,f),Ec(a.i,g),t(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=Rb(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
543
|
+
function gn(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.o.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.B(4);break}h=g.value;y(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
|
|
544
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return t(n,sn(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return t(n,sn(a,b,l,"GET"),11);case 11:return n["return"](n.h);
|
|
545
|
+
case 9:ta(n,3);break;case 5:C(n);case 3:g=f.next();n.B(2);break;case 4:return Sa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
|
|
546
|
+
function kn(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=zl(d,"timescale",Fl)||1;d=r(ul(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=zl(h,"presentationTime",Fl)||0,l=zl(h,"duration",Fl)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.D.onTimelineRegionAdded(h)}}
|
|
547
|
+
function qn(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=Qc,f=gh(b,c,d,a.o.retryParameters),g=a.D.networkingEngine,h=g.request(e,f),Ec(a.i,h),t(l,h.promise,2);k=l.h;return l["return"](k.data)})}function on(a,b){return Ue(dd(a,b))?"text":a.split("/")[0]}L("shaka.dash.DashParser",an);pg.mpd=function(){return new an};ng["application/dash+xml"]=function(){return new an};ng["video/vnd.mpeg.dash.mpd"]=function(){return new an};function tn(a,b,c,d){this.g=a;this.type=b;this.ba=c;this.segments=d||null}function un(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}un.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};
|
|
548
|
+
un.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function vn(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function wn(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function xn(a,b){this.ba=b;this.g=a}function yn(a,b){this.name=a;this.value=b};function zn(a,b){return a.filter(function(c){return c.name==b})}function An(a,b){return a.filter(function(c){return wn(c,"TYPE")==b})}function Bn(a,b){var c=zn(a,b);return c.length?c[0]:null}function Cn(a,b,c){c=void 0===c?0:c;return(a=Bn(a,b))?Number(a.value):c};function Dn(a){this.h=a;this.g=0}function En(a){Fn(a,/[ \t]+/gm)}function Fn(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 Gn(a){return a.g==a.h.length?null:(a=Fn(a,/[^ \t\n]*/gm))?a[0]:null};function Hn(){this.g=0}
|
|
549
|
+
function In(a,b,c){b=Rb(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 O(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=Jn(a.g++,g),--a.g,Kn.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(fb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.da;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=Jn(a.g++,
|
|
550
|
+
l);if(Ln.includes(l.name)){if(1!=b)throw new O(2,4,4017);l=d.splice(h,d.length-h);d=c;e=[];g=[];h=null;l=r(l);for(k=l.next();!k.done;k=l.next())k=k.value,/^(#EXT)/.test(k)?(k=Jn(a.g++,k),Kn.includes(k.name)?f.push(k):"EXT-X-MAP"==k.name?h=k:g.push(k)):/^#(?!EXT)/m.test(k)||(k=Lb([d],[k.trim()])[0],h&&g.push(h),e.push(new xn(k,g)),g=[]);return new tn(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new yn("URI",k)),e=!0)}}return new tn(c,b,f)}
|
|
551
|
+
function Jn(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new Dn(e);var g;(g=Fn(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=Fn(e,h);)c.push(new yn(g[1],g[2]||g[3]))}return new un(a,d,c,f)}var Kn="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Ln="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Mn(){}function Nn(a){try{var b=On(a);return pc({uri:a,Vd:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return nc(c)}}function On(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=ac(a):e=Vb(a);return{data:e,contentType:c}}
|
|
552
|
+
L("shaka.net.DataUriPlugin",Mn);Mn.parse=Nn;Gc("data",Nn);function Pn(){var a=this;this.o=this.D=null;this.Ia=1;this.s=new Map;this.l=new Map;this.Ba=new Set;this.h=new Map;this.g=null;this.S="";this.N=new Hn;this.ka=0;this.m=new Q(function(){a.Ub()});this.i=Qn;this.A=null;this.Z=0;this.ca=Infinity;this.u=new Dc;this.K=[];this.F=new Map;this.Ja=!1;this.j=new Map;this.I=null;this.P=new Map;this.C=new Map}q=Pn.prototype;q.configure=function(a){this.o=a};
|
|
553
|
+
q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.D=b,t(f,Rn(c,Jc([a],c.o.retryParameters),0),2);if(3!=f.g)return d=f.h,c.S=d.uri,t(f,Sn(c,d.data),3);e=c.ka;0<e&&c.m.W(e);return f["return"](c.A)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.u&&(a.push(this.u.destroy()),this.u=null);this.o=this.D=null;this.Ba.clear();this.A=null;this.h.clear();this.l.clear();this.j.clear();this.s.clear();return Promise.all(a)};
|
|
554
|
+
q.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.i==Qn)return e["return"]();b=[];a.I=null;c=Array.from(a.h.values());return c.length?t(e,Tn(a,c[0]),2):e.B(2)}for(d=1;d<c.length;d++)b.push(Tn(a,c[d]));return t(e,Promise.all(b),0)})};
|
|
555
|
+
function Tn(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(p){if(1==p.g)return c=Un,d=b.je,t(p,Rn(a,Jc([d],a.o.retryParameters),0),2);if(3!=p.g){e=p.h;f=In(a.N,e.data,e.uri);if(1!=f.type)throw new O(2,4,4017);g=zn(f.ba,"EXT-X-DEFINE");h=Vn(a,g);k=b.stream;return t(p,Wn(a,b.Fc,f,k.mimeType,b.Sd,h),3)}l=p.h;k.segmentIndex.vb(l,a.g.Na());l.length&&k.segmentIndex.Ya(l[0].startTime);m=l[l.length-1];if(n=Bn(f.ba,"EXT-X-ENDLIST"))Xn(a,c.ie),a.g.Ga(m.endTime);x(p)})}q.onExpirationUpdated=function(){};
|
|
556
|
+
function Sn(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J;return K(function(M){switch(M.g){case 1:c=In(a.N,b,a.S);if(0!=c.type)throw new O(2,4,4022);d=zn(c.ba,"EXT-X-DEFINE");Yn(a,d);e=zn(c.ba,"EXT-X-MEDIA");f=zn(c.ba,"EXT-X-STREAM-INF");Zn(a,f);return t(M,$n(a,e),2);case 2:return ao(a,e),t(M,bo(a,f),3);case 3:return g=M.h,t(M,co(a,e),4);case 4:h=M.h;if(!a.D)throw new O(2,7,7001);if(a.Ja&&0==g.length)throw new O(2,4,4034);l=k=Infinity;m=r(a.h.values());for(n=m.next();!n.done;n=m.next())p=
|
|
557
|
+
n.value,k=Math.min(k,p.Td),"text"!=p.stream.type&&(l=Math.min(l,p.Re-p.Td));a.i!=Qn?(a.g=new T(0,a.o.defaultPresentationDelay||3*a.Z),a.g.$b(!1)):(a.g=new T(null,0),a.g.$b(!0));eo(a);if(a.i!=Qn)a.ka=a.ca,u=Un,a.i==u.he&&(v=a.g.Cc,isNaN(a.o.availabilityWindowOverride)||(v=a.o.availabilityWindowOverride),a.g.xd(v));else for(a.g.Ga(l),a.g.offset(-k),z=r(a.h.values()),n=z.next();!n.done;n=z.next())w=n.value,w.stream.segmentIndex.offset(-k),w.stream.segmentIndex.Sa(0,l);a.K=[];A=[];D=r(g);for(B=D.next();!B.done;B=
|
|
558
|
+
D.next())for(E=B.value,F=r([E.video,E.audio]),H=F.next();!H.done;H=F.next())(G=H.value)&&A.push(G);return t(M,Promise.all(A.map(function(P){return K(function(wa){return t(wa,P.createSegmentIndex(),0)})})),5);case 5:I=r(A);for(H=I.next();!H.done;H=I.next())J=H.value,a.K.push(J.segmentIndex.M);eo(a);a.A={presentationTimeline:a.g,variants:g,textStreams:h,offlineSessionIds:[],minBufferTime:0};a.D.makeTextStreamsForClosedCaptions(a.A);return t(M,a.D.filter(a.A),0)}})}
|
|
559
|
+
function Yn(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=vn(e,"NAME");e=vn(e,"VALUE");d&&e&&(a.s.has(d)||a.s.set(d,e))}}function Vn(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=vn(f,"NAME");var g=vn(f,"VALUE");f=vn(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.s.get(f))&&c.set(f,e)}return c}
|
|
560
|
+
function Zn(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=vn(e,"AUDIO");d=vn(e,"VIDEO");var g=vn(e,"SUBTITLES");e=fo(a,e);if(g){var h=go("text",e);a.j.set(g,h);Ac(e,h)}f&&(g=ho("audio",e),a.j.set(f,g));d&&(f=ho("video",e),a.j.set(d,f))}}
|
|
561
|
+
function co(a,b){var c,d,e,f,g,h,k,l,m,n,p,u;return K(function(v){if(1==v.g)return c=An(b,"SUBTITLES"),d=c.map(function(z){var w,A,D;return K(function(B){if(1==B.g){if(w=a.o.disableText)return B["return"](null);y(B,2);return t(B,io(a,z),4)}if(2!=B.g)return A=B.h,B["return"](A.stream);D=C(B);if(a.o.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),t(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=wn(h,"GROUP-ID"),l=a.j.get(k))if(m=a.l.get(k))for(n=
|
|
562
|
+
r(m),p=n.next();!p.done;p=n.next())u=p.value,u.stream.codecs=l;return v["return"](e.filter(function(z){return z}))})}function $n(a,b){var c;return K(function(d){if(1==d.g)return b=b.filter(function(e){var f=vn(e,"URI")||"";return"SUBTITLES"!=vn(e,"TYPE")&&""!=f}),b.length?t(d,io(a,b[0]),2):d.B(2);c=b.slice(1).map(function(e){return io(a,e)});return t(d,Promise.all(c),0)})}
|
|
563
|
+
function bo(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,u;return K(function(v){if(1==v.g)return h=vn(g,"FRAME-RATE"),k=Number(vn(g,"AVERAGE-BANDWIDTH"))||Number(wn(g,"BANDWIDTH")),l=vn(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t(v,jo(a,g),2);if(u=v.h){for(var z=v["return"],w=u.audio,A=u.video,D=r(A),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||void 0,B.frameRate=
|
|
564
|
+
Number(h)||void 0;D=a.o.disableAudio;if(!w.length||D)w=[null];D=a.o.disableVideo;if(!A.length||D)A=[null];D=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var E=r(A),F=E.next();!F.done;F=E.next()){var H=F.value;F=B?B.stream:null;var G=H?H.stream:null,I=B?B.stream.drmInfos:null,J=H?H.stream.drmInfos:null;H=(H?H.Fc:"")+" - "+(B?B.Fc:"");F&&G&&I.length&&J.length&&!(0<be(I,J).length)||a.Ba.has(H)||(F={id:a.Ia++,language:F?F.language:"und",primary:!!F&&F.primary||!!G&&G.primary,audio:F,video:G,
|
|
565
|
+
bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0},D.push(F),a.Ba.add(H))}}v=z.call(v,D)}else v=v["return"]([]);return v})}),t(f,Promise.all(c),2);d=f.h;e=d.reduce(Hb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
566
|
+
function jo(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,v,z;return K(function(w){if(1==w.g)return c=Nb,d=fo(a,b),e=vn(b,"AUDIO"),f=vn(b,"VIDEO"),h=(g=e||f)&&a.l.has(g)?a.l.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=wn(b,"URI"),p=k.audio.find(function(A){return A&&A.Fc==n}),u=go(c.Ka,d),(v=go(c.Wa,d))&&!u?l=c.Wa:!h.length&&v&&u?(l=c.Ka,d=[[u,v].join()]):k.audio.length&&p?(l=c.Wa,m=!0):l=k.video.length?c.Wa:c.Ka,m?w.B(2):t(w,ko(a,b,d,l),3);2!=w.g&&(z=w.h);if(z)k[z.stream.type]=[z];else if(null===z)return w["return"](null);
|
|
567
|
+
lo(k);return w["return"](k)})}function fo(a,b){var c=[];a.o.disableVideo||c.push("avc1.42E01E");a.o.disableAudio||c.push("mp4a.40.2");var d=vn(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=gd(f);c.has(g)||(e.push(f),c.add(g))}return e}function mo(a){a=vn(a,"LANGUAGE")||"und";return xf(a)}
|
|
568
|
+
function lo(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 ao(a,b){var c=An(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=mo(e);var f=wn(e,"GROUP-ID");e=wn(e,"INSTREAM-ID");a.F.get(f)||a.F.set(f,new Map);a.F.get(f).set(e,d)}}
|
|
569
|
+
function io(a,b){var c,d,e,f,g,h,k,l,m,n,p;return K(function(u){if(1==u.g){c=wn(b,"GROUP-ID");d="";var v=wn(b,"TYPE").toLowerCase();"subtitles"==v&&(v="text");e=v;"text"!=e&&c&&a.j.has(c)&&(d=a.j.get(c));f=no(wn(b,"URI"),a.s);if(a.h.has(f))return u["return"](a.h.get(f));g=mo(b);h=vn(b,"NAME");k=vn(b,"DEFAULT");l="YES"==k;"audio"==e?v=(v=vn(b,"CHANNELS"))?parseInt(v.split("/")[0],10):null:v=null;m=v;n=vn(b,"CHARACTERISTICS");return t(u,oo(a,f,d,e,g,l,h,m,null,n),2)}p=u.h;a.l.has(c)?a.l.get(c).push(p):
|
|
568
570
|
a.l.set(c,[p]);if(null==p)return u["return"](null);if(a.h.has(f))return u["return"](a.h.get(f));a.h.set(f,p);return u["return"](p)})}
|
|
569
|
-
function
|
|
570
|
-
function
|
|
571
|
-
H.value,I=
|
|
572
|
-
|
|
573
|
-
width:void 0,height:void 0,bandwidth:void 0,roles:
|
|
574
|
-
function
|
|
575
|
-
function
|
|
576
|
-
function
|
|
577
|
-
break}B=
|
|
578
|
-
function
|
|
579
|
-
function
|
|
580
|
-
e.uris[0]);return t(k,
|
|
581
|
-
function
|
|
582
|
-
|
|
583
|
-
function
|
|
584
|
-
function
|
|
585
|
-
var l=f.
|
|
586
|
-
function
|
|
587
|
-
function
|
|
588
|
-
function
|
|
589
|
-
L("shaka.hls.HlsParser",
|
|
590
|
-
var
|
|
591
|
-
cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}},
|
|
592
|
-
return b}},
|
|
593
|
-
function
|
|
594
|
-
v-l),m=l,n=G;H.done?E.close():(E.enqueue(H.value),F());
|
|
595
|
-
function
|
|
596
|
-
function
|
|
597
|
-
c);k(
|
|
598
|
-
|
|
599
|
-
function
|
|
600
|
-
function
|
|
601
|
-
function
|
|
602
|
-
q.updateManifestExpiration=function(a,b){var c=
|
|
603
|
-
q.getAllManifests=function(){var a=this,b,c;return
|
|
604
|
-
q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
605
|
-
function
|
|
606
|
-
function
|
|
607
|
-
|
|
608
|
-
function
|
|
609
|
-
function
|
|
610
|
-
function
|
|
611
|
-
|
|
612
|
-
function
|
|
613
|
-
function
|
|
614
|
-
initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}}
|
|
615
|
-
function
|
|
616
|
-
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
|
|
617
|
-
|
|
571
|
+
function ko(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=no(wn(b,"URI"),a.s);if(a.h.has(e))return k["return"](a.h.get(e));var l=vn(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.F.get(l):null;g=ho(d,c);return t(k,oo(a,e,g,d,"und",!1,null,null,f,null),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)})}
|
|
572
|
+
function oo(a,b,c,d,e,f,g,h,k,l){var m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M,P,wa,Z,bb,Ab,Lc,Qa,Bb,zd,Hg,ol,pl,ql,rl,Ig,Jg,Ie,sl,tl;return K(function(Ra){switch(Ra.g){case 1:return m=Lb([a.S],[b])[0],t(Ra,Rn(a,Jc([m],a.o.retryParameters),0),2);case 2:n=Ra.h;m=n.uri;p=In(a.N,n.data,m);if(1!=p.type)throw new O(2,4,4017);u=[];if(p.segments)for(v=r(p.segments),z=v.next();!z.done;z=v.next())w=z.value,A=zn(w.ba,"EXT-X-KEY"),u.push.apply(u,ha(A));D=!1;B=[];E=new Set;F=r(u);for(H=F.next();!H.done;H=F.next())if(G=
|
|
573
|
+
H.value,I=wn(G,"METHOD"),"NONE"!=I){D=!0;if("AES-128"==I)return a.Ja=!0,Ra["return"](null);J=wn(G,"KEYFORMAT");if(P=(M=po[J])?M(G):null){if(P.keyIds)for(wa=r(P.keyIds),Z=wa.next();!Z.done;Z=wa.next())bb=Z.value,E.add(bb);B.push(P)}}if(D&&!B.length)throw new O(2,4,4026);Ab=zn(p.ba,"EXT-X-DEFINE");Lc=Vn(a,Ab);qo(a,p);return t(Ra,ro(a,d,c,p,Lc),3);case 3:return Qa=Ra.h,so.includes(Qa)&&(c=""),Bb=new Map,y(Ra,4),t(Ra,Wn(a,b,p,Qa,Bb,Lc),6);case 6:zd=Ra.h;ta(Ra,5);break;case 4:Hg=C(Ra);if(4035==Hg.code)return Sa("Skipping unsupported HLS stream",
|
|
574
|
+
Qa,b),Ra["return"](null);throw Hg;case 5:ol=zd[0].startTime;pl=zd[zd.length-1].endTime;ql=new U(zd);rl="text"==d?"subtitle":void 0;Ig=[];if(l)for(Jg=r(l.split(",")),Ie=Jg.next();!Ie.done;Ie=Jg.next())sl=Ie.value,Ig.push(sl);tl={id:a.Ia++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ql,mimeType:Qa,codecs:c,kind:rl,encrypted:D,drmInfos:B,keyIds:E,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,
|
|
575
|
+
width:void 0,height:void 0,bandwidth:void 0,roles:Ig,channelsCount:h,audioSamplingRate:null,closedCaptions:k};return Ra["return"]({stream:tl,Fc:b,je:m,Td:ol,Re:pl,Sd:Bb})}})}function qo(a,b){var c=Bn(b.ba,"EXT-X-PLAYLIST-TYPE"),d=Bn(b.ba,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;d?Xn(a,Qn):(c?Xn(a,to):Xn(a,uo),d=vo(b.ba,"EXT-X-TARGETDURATION"),d=Number(d.value),a.Z=Math.max(d,a.Z),a.ca=Math.min(d,a.ca))}
|
|
576
|
+
function wo(a,b,c,d){c=Bn(c,"EXT-X-MAP");if(!c)return null;var e=wn(c,"URI");d=no(Lb([b],[e])[0],d);b=[d,vn(c,"BYTERANGE","")].join("-");a.P.has(b)||(c=xo(d,c),a.P.set(b,c));return a.P.get(b)}function xo(a,b){var c=0,d=null,e=vn(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new rg(function(){return[a]},c,d)}
|
|
577
|
+
function yo(a,b,c,d,e,f){var g=c.ba,h=no(c.g,f);c=vo(g,"EXTINF").value.split(",");c=d+Number(c[0]);f=0;var k=null;if(g=Bn(g,"EXT-X-BYTERANGE"))f=g.value.split("@"),g=Number(f[0]),f=f[1]?Number(f[1]):b.g+1,k=f+g-1;return new tg(d,c,function(){return[h]},f,k,a,e,0,Infinity)}function eo(a){if(a.g){for(var b=r(a.K),c=b.next();!c.done;c=b.next())a.g.xb(c.value);a.K=[]}}
|
|
578
|
+
function Wn(a,b,c,d,e,f){var g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M;return K(function(P){switch(P.g){case 1:g=c.segments;k=Cn(c.ba,"EXT-X-MEDIA-SEQUENCE",0);if(a.i!=Qn&&e.has(k)){l=e.get(k);P.B(2);break}if(null!=a.I){P.B(3);break}h=wo(a,c.g,g[0].ba,f);m=a;return t(P,zo(a,b,h,d,k,!1,g[0],f),4);case 4:m.I=P.h;case 3:l=a.I;case 2:n=g[0].g,Wa(n.split("/").pop()),p=Cn(c.ba,"EXT-X-DISCONTINUITY-SEQUENCE"),u=a.C.get(p)||0,v=[],z=function(wa){return fb(wa)},w=r(z(g)),A=w.next();case 5:if(A.done){P.B(7);
|
|
579
|
+
break}B=D=A.value;E=B.da;F=B.item;H=v[v.length-1];G=0==E?l:H.endTime;I=k+E;e.set(I,G);h=wo(a,c.g,F.ba,f);J=Bn(F.ba,"EXT-X-DISCONTINUITY");if(!J){P.B(8);break}p++;return t(P,Ao(a,p,b,h,d,I,F,f,G),9);case 9:u=P.h;case 8:M=yo(h,H,F,G,u,f);v.push(M);A=w.next();P.B(5);break;case 7:return P["return"](v)}})}
|
|
580
|
+
function Ao(a,b,c,d,e,f,g,h,k){var l,m;return K(function(n){if(1==n.g)return l=0,a.C.has(b)?(l=a.C.get(b),n.B(2)):t(n,zo(a,c,d,e,f,!0,g,h),3);2!=n.g&&(m=n.h,l=k-m,a.C.set(b,l));return n["return"](l)})}
|
|
581
|
+
function Bo(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:c=Qc;d=gh(b.ua(),b.h,b.g,a.o.retryParameters);if(a.o.hls.useFullSegmentsForStartTime)return k["return"](Rn(a,d,c));e=gh(b.ua(),b.h,b.h+2048-1,a.o.retryParameters);y(k,2);return t(k,Rn(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=C(k);if(7001==g.code)throw g;Sa("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
|
|
582
|
+
e.uris[0]);return t(k,Rn(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
|
|
583
|
+
function zo(a,b,c,d,e,f,g,h){var k,l,m,n,p,u,v,z;return K(function(w){switch(w.g){case 1:k=yo(c,null,g,0,0,h);if(a.A&&!f&&(l=a.h.get(b),m=l.Sd.get(e),void 0!=m))return w["return"](m);d=d.toLowerCase();if(so.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new O(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new O(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.B(2);break}n=[Bo(a,k)];c&&n.push(Bo(a,c));return t(w,Promise.all(n),3);case 3:return p=
|
|
584
|
+
w.h,u=p[0],v=p[1]||p[0],w["return"](Co(b,u.uri,u.data,v.data));case 2:if("video/mp2t"!=d){w.B(4);break}return t(w,Bo(a,k),5);case 5:return z=w.h,w["return"](Do(b,z.uri,z.data));case 4:throw new O(2,4,4030,b);}})}
|
|
585
|
+
function Co(a,b,c,d){var e=0;(new ge).box("moov",ke).box("trak",ke).box("mdia",ke).X("mdhd",function(h){h.reader.skip(0==h.version?8:16);e=h.reader.O();h.parser.stop()}).parse(d,!0);if(!e)throw new O(2,4,4030,a,b);var f=0,g=!1;(new ge).box("moof",ke).box("traf",ke).X("tfdt",function(h){f=(0==h.version?h.reader.O():h.reader.fb())/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new O(2,4,4030,a,b);return f}
|
|
586
|
+
function Do(a,b,c){function d(){f.seek(g+188);h=f.wa();71!=h&&(f.seek(g+192),h=f.wa());71!=h&&(f.seek(g+204),h=f.wa());71!=h&&e();f.Yd(1)}function e(){throw new O(2,4,4030,a,b);}var f=new S(c,0),g=0,h=0;for(c=Math.min(f.T.byteLength-188,940);;){g=f.H;h=f.wa();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Xb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.wa()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.wa(),f.skip(k)),1!=f.O()>>8)d();else{f.skip(3);c=f.wa()>>6;0!=c&&1!=c||e();0==f.wa()&&e();c=f.wa();k=f.Xb();
|
|
587
|
+
var l=f.Xb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function ho(a,b){if(1==b.length)return b[0];var c=go(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function go(a,b){for(var c=r(Eo[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"text"==a?"":null}
|
|
588
|
+
function no(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 O(2,4,4039,f);}}return c}
|
|
589
|
+
function ro(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,v,z;return K(function(w){if(1==w.g){f=Nb;g=Qc;h=no(d.segments[0].g,e);k=new nb(h);l=k.ra.split(".").pop();m=Fo[b];if(n=m[l])return w["return"](n);if(b==f.ha)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");p=Jc([h],a.o.retryParameters);p.method="HEAD";return t(w,Rn(a,p,g),2)}u=w.h;v=u.headers["content-type"];return v?w["return"](v.split(";")[0]):(z=m.mp4,w["return"](z))})}
|
|
590
|
+
function vo(a,b){var c=Bn(a,b);if(!c)throw new O(2,4,4024,b);return c}q.Ub=function(){var a=this,b,c;return K(function(d){if(1==d.g){if(!a.D)return d["return"]();y(d,2);return t(d,a.update(),4)}if(2!=d.g)return b=a.ka,a.m.W(b),ta(d,0);c=C(d);if(!a.D)return d["return"]();c.severity=1;a.D.onError(c);a.m.W(.1);x(d)})};function Xn(a,b){a.i=b;a.g&&a.g.$b(a.i==Qn);a.i!=Qn||a.m.stop()}function Rn(a,b,c){if(!a.u)throw new O(2,7,7001);b=a.D.networkingEngine.request(c,b);Ec(a.u,b);return b.promise}
|
|
591
|
+
L("shaka.hls.HlsParser",Pn);
|
|
592
|
+
var Eo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},so=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Fo={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",
|
|
593
|
+
cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}},po={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=wn(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=wn(a,"URI");b=On(b);b=N(b.data);b=Mb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=vn(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
|
|
594
|
+
return b}},Qn="VOD",uo="EVENT",to="LIVE",Un={ie:Qn,zf:uo,he:to};pg.m3u8=function(){return new Pn};ng["application/x-mpegurl"]=function(){return new Pn};ng["application/vnd.apple.mpegurl"]=function(){return new Pn};function Go(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Vd:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ub(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Ho(){}function Io(a,b,c,d){var e=new Jo;ad(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Ko,g={Ed:!1,ee:!1};a=Lo(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d);a=new mc(a,function(){g.Ed=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new Q(function(){g.ee=!0;f.abort()});h.W(b/1E3);a["finally"](function(){h.stop()})}return a}
|
|
595
|
+
function Lo(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,v,z,w,A,D;return K(function(B){switch(B.g){case 1:return f=Mo,g=No,m=l=0,n=Date.now(),y(B,2),t(B,f(a,c),4);case 4:return h=B.h,p=h.clone().body.getReader(),v=(u=h.headers.get("Content-Length"))?parseInt(u,10):0,z=function(E){function F(){var H,G;return K(function(I){switch(I.g){case 1:return y(I,2),t(I,p.read(),4);case 4:H=I.h;ta(I,3);break;case 2:return C(I),I["return"]();case 3:H.done||(l+=H.value.byteLength);G=Date.now();if(100<G-n||H.done)e(G-n,l-m,
|
|
596
|
+
v-l),m=l,n=G;H.done?E.close():(E.enqueue(H.value),F());x(I)}})}F()},new g({start:z}),t(B,h.arrayBuffer(),5);case 5:k=B.h;ta(B,3);break;case 2:w=C(B);if(d.Ed)throw new O(1,1,7001,a,b);if(d.ee)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,w,b);case 3:return A={},D=h.headers,D.forEach(function(E,F){A[F.trim()]=E}),B["return"](Go(A,k,h.status,a,h.url,b))}})}
|
|
597
|
+
function Oo(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}L("shaka.net.HttpFetchPlugin",Ho);Ho.isSupported=Oo;Ho.parse=Io;var Mo=window.fetch,Ko=window.AbortController,No=window.ReadableStream,Jo=window.Headers;Oo()&&(Gc("http",Io,2),Gc("https",Io,2));function Po(){}
|
|
598
|
+
function Qo(a,b,c,d){var e=new Ro,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 O(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),u={};p=r(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),u[v[0].toLowerCase()]=v.slice(1).join(": ");try{var z=Go(u,n.response,n.status,a,n.responseURL,
|
|
599
|
+
c);k(z)}catch(w){l(w)}};e.onerror=function(n){l(new O(1,1,1002,a,n,c))};e.ontimeout=function(){l(new O(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 mc(h,function(){e.abort();return Promise.resolve()})}L("shaka.net.HttpXHRPlugin",Po);Po.parse=Qo;var Ro=window.XMLHttpRequest;
|
|
600
|
+
Gc("http",Qo,1);Gc("https",Qo,1);function So(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function To(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}So.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 Uo(a){var b=this;this.U=a;this.g=new Map;this.J=new Rc(function(){return Vo(b)["catch"](function(){})});this.h=[];this.Rd=function(){};this.Nd=function(){};this.Hb=new So}Uo.prototype.destroy=function(){return this.J.destroy()};function Wo(a,b,c){a.Rd=b;a.Nd=c}function Vo(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
601
|
+
function Xo(a,b,c,d,e,f){Sc(a.J);var g=To(a.Hb,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,u;return K(function(v){if(1==v.g)return t(v,Yo(a,c),2);h=v.h;if(a.J.g)throw new O(2,9,7001);if(e)for(m in k=N(h),l=new ll(k),l.data)n=Number(m),p=l.data[n],u=l.g[n],a.Nd(p,u);a.Hb.close(g,h.byteLength);var z=a.Hb;a.Rd(0==z.i?0:z.j/z.i,a.Hb.h);return v["return"](f(h))})});a.g.set(b,d);return d}
|
|
602
|
+
function Zo(a,b,c){Sc(a.J);var d=(a.g.get(b)||Promise.resolve()).then(function(){return K(function(e){return t(e,c(),0)})});a.g.set(b,d)}function $o(a){return K(function(b){return 1==b.g?t(b,Promise.all(a.g.values()),2):b["return"](a.Hb.h)})}function Yo(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=Qc,d=a.U.request(c,b),e=function(){return d.abort()},a.h.push(e),t(g,d.promise,2);f=g.h;Ac(a.h,e);return g["return"](f.data)})};function ap(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Ob;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ap.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}y(b,2);return t(b,a.g,4)}if(2!=b.g)return ta(b,0);C(b);x(b)})};
|
|
603
|
+
function bp(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 t(g,b(f.key,f.value,f),2)}f["continue"]();x(g)})}})}ap.prototype.store=function(){return this.h};ap.prototype.promise=function(){return this.g};function cp(a){this.h=a;this.g=[]}cp.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function dp(a,b){return ep(a,b,"readwrite")}function ep(a,b,c){c=a.h.transaction([b],c);var d=new ap(c,b);a.g.push(d);d.promise().then(function(){Ac(a.g,d)},function(){Ac(a.g,d)});return d};function fp(a,b,c){this.g=new cp(a);this.i=b;this.h=c}q=fp.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return gp(this.i)};q.removeSegments=function(a,b){return hp(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return t(d,ip(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Fd(e)}))})};q.addManifests=function(){return gp(this.h)};
|
|
604
|
+
q.updateManifestExpiration=function(a,b){var c=dp(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 hp(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return t(d,ip(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Kb(e)})))})};
|
|
605
|
+
q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=ep(a.g,a.h,"readonly"),c=new Map,t(d,bp(b,function(e,f){var g;return K(function(h){if(1==h.g)return t(h,a.Kb(f),2);g=h.h;c.set(e,g);x(h)})}),2)):3!=d.g?t(d,b.promise(),3):d["return"](c)})};q.Fd=function(a){return a};q.Kb=function(a){return Promise.resolve(a)};function gp(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}
|
|
606
|
+
q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=dp(c.g,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={fc:g.fc},k=h.next())l=k.value,g.fc=e.add(l),g.fc.onsuccess=function(n){return function(){f.push(n.fc.result)}}(g);return t(m,d.promise(),2)}return m["return"](f)})};
|
|
607
|
+
function hp(a,b,c,d){a=dp(a.g,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={ec:e.ec},f=c.next())e.ec=f.value,b["delete"](e.ec).onsuccess=function(g){return function(){return d(g.ec)}}(e);return a.promise()}
|
|
608
|
+
function ip(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=ep(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Eb:h.Eb,Cb:h.Cb},l=k.next())h.Cb=l.value,h.Eb=e.get(h.Cb),h.Eb.onsuccess=function(n){return function(){void 0==n.Eb.result&&g.push(n.Cb);f[n.Cb]=n.Eb.result}}(h);return t(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function jp(a){this.g=new cp(a)}jp.prototype.destroy=function(){return this.g.destroy()};jp.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=ep(a.g,"session-ids","readonly"),c=[],t(d,bp(b,function(e,f){c.push(f)}),2)):3!=d.g?t(d,b.promise(),3):d["return"](c)})};jp.prototype.add=function(a){var b=dp(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()};
|
|
609
|
+
jp.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=dp(b.g,"session-ids"),t(d,bp(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):t(d,c.promise(),0)})};function kp(){this.g=new Map}kp.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)};kp.prototype.init=function(){var a=this;lp.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)};
|
|
610
|
+
function mp(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Fa:d,ja:f},ja:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function np(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Fa:d,ja:f},e)})})}
|
|
611
|
+
function op(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function pp(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function qp(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
612
|
+
function rp(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=lp,d.forEach(function(f){(f=f())&&b.push(f)})),t(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):t(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function sp(a,b){lp.set(a,b)}L("shaka.offline.StorageMuxer",kp);kp.unregister=function(a){lp["delete"](a)};kp.register=sp;kp.prototype.destroy=kp.prototype.destroy;var lp=new Map;function tp(){fp.apply(this,arguments)}oa(tp,fp);tp.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=dp(c.g,c.h);e=d.store();f=new Ob;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return t(g,Promise.all([d.promise(),f]),0)})};
|
|
613
|
+
tp.prototype.Kb=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=up(a.periods[c],e),b.push(f);return t(h,Jm(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})})};
|
|
614
|
+
function up(a,b){vp(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return wp(e,a.startTime,b)})}
|
|
615
|
+
function wp(a,b,c){var d=a.initSegmentUri?xp(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,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=xp(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,
|
|
616
|
+
initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}}tp.prototype.Fd=function(a){return{data:a.data}};function xp(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new O(2,9,9004,"Could not parse uri "+a);}
|
|
617
|
+
function vp(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++,
|
|
618
|
+
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 yp(){fp.apply(this,arguments)}oa(yp,fp);
|
|
619
|
+
yp.prototype.Kb=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(zp(n,k.startTime,k.startTime+e));f=l;b.push(f)}return t(h,Jm(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
|
|
618
620
|
a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
|
|
619
|
-
function
|
|
620
|
-
dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}};function
|
|
621
|
-
q.init=function(){var a=this,b=new
|
|
622
|
-
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new
|
|
623
|
-
q.destroy=function(){var a=this;return
|
|
621
|
+
function zp(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,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,
|
|
622
|
+
dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}};function Ap(){fp.apply(this,arguments)}oa(Ap,fp);Ap.prototype.hasFixedKeySpace=function(){return!1};Ap.prototype.addSegments=function(a){return this.add(this.i,a)};Ap.prototype.addManifests=function(a){return this.add(this.h,a)};Ap.prototype.Kb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Bp(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Bp.prototype;
|
|
623
|
+
q.init=function(){var a=this,b=new Ob,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 tp(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new yp(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new yp(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
|
|
624
|
+
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Ap(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new jp(d):null;a.m=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 O(2,9,9001,c.error));d.preventDefault()};return b};
|
|
625
|
+
q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return t(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return t(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return t(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return t(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return t(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),x(b)}})};
|
|
624
626
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
625
|
-
q.erase=function(){var a=this;return
|
|
626
|
-
function
|
|
627
|
-
function
|
|
628
|
-
function
|
|
627
|
+
q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return t(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return t(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return t(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return t(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),t(b,Cp(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,t(b,a.init(),0)}})};
|
|
628
|
+
function Cp(){var a=new Ob,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}sp("idb",function(){return md("CrKey")||!window.indexedDB?null:new Bp});function Dp(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Dp.prototype.Fa=function(){return this.i};Dp.prototype.ja=function(){return this.h};Dp.prototype.key=function(){return this.l};Dp.prototype.toString=function(){return this.j};
|
|
629
|
+
function Ep(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 Dp(b,c,d,Number(a[4])):null};function Fp(a,b){this.h=a;this.g=b}
|
|
630
|
+
function Gp(a,b){var c=new T(null,0);c.Ga(b.duration);var d=b.streams.filter(function(k){return"audio"==k.type}),e=b.streams.filter(function(k){return"video"==k.type});d=Hp(a,d,e,c);e=b.streams.filter(function(k){return"text"==k.type}).map(function(k){return Ip(a,k,c)});var f=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var g=r(d.values()),h=g.next();!h.done;h=g.next())h=h.value,h.audio&&h.audio.encrypted&&(h.audio.drmInfos=f),h.video&&h.video.encrypted&&(h.video.drmInfos=f);return{presentationTimeline:c,
|
|
629
631
|
minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e}}
|
|
630
|
-
function
|
|
631
|
-
g=
|
|
632
|
-
function
|
|
633
|
-
roles:b.roles,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,closedCaptions:b.closedCaptions}}function
|
|
634
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
635
|
-
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
636
|
-
|
|
637
|
-
function
|
|
638
|
-
function
|
|
639
|
-
9);case 9:return f["return"]([]);case 7:return e=[],t(f,Promise.all(c.sessionIds.map(function(g){return
|
|
640
|
-
function
|
|
641
|
-
function
|
|
642
|
-
4);case 4:b.o=null,b.
|
|
643
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
644
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
645
|
-
return g.promise.then(h)};return
|
|
646
|
-
function
|
|
647
|
-
h,n,b,c,e,f),11);case 11:u=
|
|
648
|
-
q.
|
|
649
|
-
"text"==
|
|
650
|
-
function
|
|
651
|
-
H.initData.length})}),v=p&&!u,
|
|
652
|
-
function
|
|
653
|
-
function
|
|
654
|
-
function
|
|
655
|
-
function
|
|
656
|
-
q.list=function(){return
|
|
657
|
-
function
|
|
658
|
-
function
|
|
659
|
-
function
|
|
660
|
-
p.next())u=u.value,v=
|
|
661
|
-
function
|
|
662
|
-
function(n){var p=
|
|
663
|
-
function
|
|
664
|
-
function
|
|
665
|
-
function
|
|
666
|
-
function
|
|
667
|
-
function
|
|
668
|
-
function
|
|
669
|
-
function
|
|
670
|
-
|
|
671
|
-
var
|
|
672
|
-
function
|
|
673
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
674
|
-
function
|
|
675
|
-
function
|
|
676
|
-
function
|
|
677
|
-
function
|
|
678
|
-
function
|
|
632
|
+
function Hp(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});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=e.value,
|
|
633
|
+
g=Ip(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=Ip(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}
|
|
634
|
+
function Ip(a,b,c){var d=b.segments.map(function(e){return Jp(a,e)});c.xb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,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,
|
|
635
|
+
roles:b.roles,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,closedCaptions:b.closedCaptions}}function Jp(a,b){var c=new Dp("segment",a.h,a.g,b.dataKey);return new tg(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Kp(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}function Kp(a,b){var c=new Dp("segment",a.h,a.g,b);return new rg(function(){return[c.toString()]},0,null)};function Lp(){this.g=null}q=Lp.prototype;q.configure=function(){};
|
|
636
|
+
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=Ep(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new kp;sa(m);return t(m,e.init(),4);case 4:return t(m,op(e,d.Fa(),d.ja()),5);case 5:return f=m.h,t(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Fp(d.Fa(),d.ja()),l=Gp(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return ua(m),t(m,e.destroy(),7);case 7:va(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
637
|
+
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 kp,y(m,2,3),t(m,e.init(),5);case 5:return t(m,op(e,d.Fa(),d.ja()),6);case 6:return f=m.h,t(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return t(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ua(m),t(m,e.destroy(),10);case 10:va(m,0);break;case 2:C(m),m.B(3)}})};
|
|
638
|
+
ng["application/x-offline-manifest"]=function(){return new Lp};function Mp(){}function Np(a){var b=Ep(a);b&&"manifest"==b.g?(a={uri:a,Vd:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=pc(a)):a=b&&"segment"==b.g?Op(b.key(),b):nc(new O(2,1,9004,a));return a}
|
|
639
|
+
function Op(a,b){var c=new kp;return pc(void 0).$(function(){return c.init()}).$(function(){return op(c,b.Fa(),b.ja())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}L("shaka.offline.OfflineScheme",Mp);Mp.plugin=Np;Gc("offline",Np);function Pp(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 u=!1,v=r(m),z=v.next();!z.done;z=v.next())if(z=z.value,Qp(z.info,p)){z.sessionIds.push(p.sessionId);u=!0;break}u||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Rp(a,b,g);return t(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l["return"](d)}})}
|
|
640
|
+
function Rp(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new rd({wb:b,onError:function(){},zc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),y(f,2),d.configure(a),t(f,Ad(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return C(f),t(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return y(f,6),t(f,Jd(d),8);case 8:ta(f,7);break;case 6:return C(f),t(f,d.destroy(),
|
|
641
|
+
9);case 9:return f["return"]([]);case 7:return e=[],t(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return y(h,2),t(h,Kd(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);C(h);x(h)})})),10);case 10:return t(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
642
|
+
function Qp(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Bc(a.audioCapabilities,b.audioCapabilities,c)&&Bc(a.videoCapabilities,b.videoCapabilities,c)};function Sp(a,b,c){var d=b.presentationTimeline.getDuration();b=Tp(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function Up(a,b){var c=Gp(new Fp(a.Fa(),a.ja()),b),d=b.appMetadata||{};c=Tp(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
|
|
643
|
+
function Tp(a){var b=[],c=Uf(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(Nf(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Of(c.value));return b};function Vp(){this.g={}}function Wp(a,b,c){c=c.endTime-c.startTime;return Xp(a,b)*c}function Xp(a,b){var c=a.g[b];null==c&&(c=0);return c};function Yp(a,b,c){a.variants=a.variants.filter(function(d){return Kf(d,b,c)})}function Zp(a){a.variants=a.variants.filter(function(b){var c=!0;b.audio&&(c=c&&df(b.audio));b.video&&(c=c&&df(b.video));return c})}function $p(a,b){a.variants=a.variants.filter(function(c){return ae(b,c)})};function aq(a){var b=this;if(a&&a.constructor!=V)throw new O(2,9,9008);this.U=this.o=null;a?(this.o=a.o,this.U=a.Nb()):(this.o=ei(),this.U=new Fc);this.Dc=[];this.Vb=[];this.nd=[];var c=!a;this.J=new Rc(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return t(k,Promise.all(b.nd.map(function(l){return Vo(l)})),2);case 2:d=function(){};e=[];f=r(b.Vb);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return t(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return t(k,b.U.destroy(),
|
|
644
|
+
4);case 4:b.o=null,b.U=null,x(k)}})})}function bq(){if(id())a:{var a=r(lp.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=aq.prototype;q.destroy=function(){return this.J.destroy()};
|
|
645
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ci(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 gi(this.o,a)};q.getConfiguration=function(){var a=ei();gi(a,this.o,ei());return a};q.Nb=function(){return this.U};
|
|
646
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Uo(this.U);this.nd.push(f);b=cq(this,a,b||{},function(){var h;return K(function(k){if(1==k.g)return t(k,mg(a,d.U,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Kb(h))})},e,f);var g=new mc(b,function(){return Vo(f)});g["finally"](function(){Ac(d.nd,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.");
|
|
647
|
+
return g.promise.then(h)};return dq(this,g)};q.Je=function(){Db("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
|
|
648
|
+
function cq(a,b,c,d,e,f){var g,h,k,l,m,n,p,u,v,z,w;return K(function(A){switch(A.g){case 1:return eq(),h=g=null,k=new kp,m=l=null,y(A,2,3),t(A,d(),5);case 5:return g=A.h,t(A,fq(a,b,g,e),6);case 6:n=A.h;gq(a);p=!n.presentationTimeline.Y()&&!n.presentationTimeline.bb();if(!p)throw new O(2,9,9005,b);return t(A,hq(a,n,function(D){m=m||D},e),7);case 7:h=A.h;gq(a);if(m)throw m;return t(A,a.pb(n,h,e),8);case 8:return t(A,k.init(),9);case 9:return gq(a),t(A,mp(k),10);case 10:return l=A.h,gq(a),t(A,iq(a,l.ja,
|
|
649
|
+
h,n,b,c,e,f),11);case 11:u=A.h;gq(a);if(m)throw m;return t(A,l.ja.addManifests([u]),12);case 12:return v=A.h,gq(a),z=new Dp("manifest",l.path.Fa,l.path.ja,v[0]),A["return"](Up(z,u));case 3:return ua(A),a.Dc=[],t(A,k.destroy(),13);case 13:if(!g){A.B(14);break}return t(A,g.stop(),14);case 14:if(!h){A.B(16);break}return t(A,h.destroy(),16);case 16:va(A,0);break;case 2:w=C(A);if(!l){A.B(18);break}return t(A,l.ja.removeSegments(a.Dc,function(){}),18);case 18:throw m||w;}})}
|
|
650
|
+
q.pb=function(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,v,z,w,A;return K(function(D){if(1==D.g){d={width:Infinity,height:Infinity};Yp(a,c.restrictions,d);Zp(a);$p(a,b);e=[];f=c.preferredAudioChannelCount;Ef(a,f);g=r(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(Nf(k));l=r(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(Of(n));return t(D,c.offline.trackSelectionCallback(e),2)}p=D.h;u=new Set;v=new Set;z=r(p);for(w=z.next();!w.done;w=z.next())A=w.value,"variant"==A.type&&u.add(A.id),
|
|
651
|
+
"text"==A.type&&v.add(A.id);a.variants=a.variants.filter(function(B){return u.has(B.id)});a.textStreams=a.textStreams.filter(function(B){return v.has(B.id)});jq(a);x(D)})};
|
|
652
|
+
function iq(a,b,c,d,e,f,g,h){var k,l,m,n,p,u,v,z,w,A,D,B;return K(function(E){switch(E.g){case 1:return k=Sp(e,d,f),l=g.offline.progressCallback,m=function(F,H){k.size=H;l(k,F)},n=function(F,H){v&&g.offline.usePersistentLicense&&z==H&&Id(c,"cenc",F)},Wo(h,m,n),p=d.variants.some(function(F){var H=F.audio&&F.audio.encrypted;return F.video&&F.video.encrypted||H}),u=d.variants.some(function(F){return(F.video?F.video.drmInfos:[]).concat(F.audio?F.audio.drmInfos:[]).some(function(H){return H.initData&&
|
|
653
|
+
H.initData.length})}),v=p&&!u,z=null,v&&(w=c.i,z=kq.get(w.keySystem)),sa(E),D=A=lq(a,h,b,c,d,e,f,g),t(E,$o(h),4);case 4:D.size=E.h;A.expiration=c.Mb();B=Pd(c);A.sessionIds=g.offline.usePersistentLicense?B:[];if(p&&g.offline.usePersistentLicense&&!B.length)throw new O(2,9,9007);return E["return"](A);case 2:return ua(E),t(E,h.destroy(),5);case 5:va(E,0)}})}q.remove=function(a){return mq(this,nq(this,a))};
|
|
654
|
+
function nq(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:eq();c=Ep(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new kp;sa(k);return t(k,e.init(),4);case 4:return t(k,op(e,d.Fa(),d.ja()),5);case 5:return f=k.h,t(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],t(k,Promise.all([oq(a,h,e),pq(f,d,h)]),2);case 2:return ua(k),t(k,e.destroy(),8);case 8:va(k,0)}})}
|
|
655
|
+
function qq(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:dd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:dd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function oq(a,b,c){return K(function(d){return t(d,rq(a.U,a.o.drm,c,b),0)})}
|
|
656
|
+
function pq(a,b,c){function d(){}var e=sq(c);Up(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.af=function(){return mq(this,tq(this))};
|
|
657
|
+
function tq(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return eq(),b=a.U,c=a.o.drm,d=new kp,e=!1,sa(n),t(n,d.init(),4);case 4:f=[],pp(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return t(n,k.getAll(),8);case 8:return l=n.h,t(n,Pp(c,b,l),9);case 9:return m=n.h,t(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return ua(n),t(n,d.destroy(),11);case 11:va(n,3);break;case 3:return n["return"](!e)}})}
|
|
658
|
+
q.list=function(){return mq(this,uq())};function uq(){var a,b,c;return K(function(d){switch(d.g){case 1:return eq(),a=[],b=new kp,sa(d),t(d,b.init(),4);case 4:return c=Promise.resolve(),np(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return t(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Up(new Dp("manifest",e.Fa,e.ja,l),k);a.push(m)});x(h)})})}),t(d,c,2);case 2:return ua(d),t(d,b.destroy(),6);case 6:va(d,3);break;case 3:return d["return"](a)}})}
|
|
659
|
+
function fq(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}},c.configure(d.manifest),gq(a),t(l,c.start(b,g),2);if(3!=l.g)return h=l.h,gq(a),k=vq(h),t(l,Promise.all($a(k,function(m){return m.createSegmentIndex()})),3);gq(a);if(e)throw e;return l["return"](h)})}
|
|
660
|
+
function hq(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new rd({wb:a.U,onError:c,zc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),t(f,wd(e,b.variants,d.offline.usePersistentLicense),2);case 2:return t(f,Jd(e),3);case 3:return t(f,Hd(e),4);case 4:return f["return"](e)}})}
|
|
661
|
+
function lq(a,b,c,d,e,f,g,h){for(var k=new Vp,l=r(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,u=m.video;p&&!u&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&u&&(n.g[u.id]=u.bandwidth||m.bandwidth);if(p&&u){var v=p.bandwidth||393216,z=u.bandwidth||m.bandwidth-v;0>=z&&(z=m.bandwidth);n.g[p.id]=v;n.g[u.id]=z}}l=r(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;n=new Map;n.set(null,Promise.resolve(null));m=new Map;p=vq(e);l=new Map;p=r(p);for(u=p.next();!u.done;u=
|
|
662
|
+
p.next())u=u.value,v=wq(a,b,c,k,e,u,h,n,m),l.set(u.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,expiration:d.Mb(),streams:a,sessionIds:h?Pd(d):[],drmInfo:b,appMetadata:g}}
|
|
663
|
+
function wq(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,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,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,closedCaptions:f.closedCaptions},m=f.id;xq(f,e.presentationTimeline.Na(),
|
|
664
|
+
function(n){var p=yq(a,b,m,f.id,c,d,n.i,g,h),u=zq(a,b,m,f.id,c,d,n,g,k);Zo(b,m,function(){var v,z;return K(function(w){if(1==w.g)return t(w,p,2);if(3!=w.g)return v=w.h,t(w,u,3);z=w.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:z});x(w)})})});return l}
|
|
665
|
+
function yq(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=gh(g.ua(),g.h,g.g,h.streaming.retryParameters);b=Xo(b,c,h,.5*Xp(f,d),!0,function(l){var m;return K(function(n){if(1==n.g)return t(n,e.addSegments([{data:l}]),2);m=n.h;a.Dc.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
|
|
666
|
+
function zq(a,b,c,d,e,f,g,h,k){var l=[g.ua()[0],g.h,g.g].join("-");if(k.has(l))return k.get(l);h=gh(g.ua(),g.h,g.g,h.streaming.retryParameters);b=Xo(b,c,h,Wp(f,d,g),!1,function(m){var n;return K(function(p){if(1==p.g)return t(p,e.addSegments([{data:m}]),2);n=p.h;a.Dc.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function xq(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 gq(a){if(a.J.g)throw new O(2,9,7001);}
|
|
667
|
+
function eq(){if(!bq())throw new O(2,9,9E3);}function mq(a,b){return K(function(c){if(1==c.g)return a.Vb.push(b),sa(c),t(c,b,4);if(2!=c.g)return c["return"](c.h);ua(c);Ac(a.Vb,b);return va(c,0)})}function dq(a,b){var c=b.promise;a.Vb.push(c);return b["finally"](function(){Ac(a.Vb,c)})}
|
|
668
|
+
function sq(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}
|
|
669
|
+
function rq(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=qp(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:qq(d,!1),videoCapabilities:qq(d,!0)}});return t(h,Pp(b,a,f),2)}return 3!=h.g?(g=h.h,t(h,e.remove(g),3)):t(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
670
|
+
function vq(a){for(var b=new Set,c=r(a.textStreams),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}
|
|
671
|
+
function jq(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());}L("shaka.offline.Storage",aq);aq.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new kp,sa(b),t(b,rp(a),2)):5!=b.g?(ua(b),t(b,a.destroy(),5)):va(b,0)})};aq.prototype.list=aq.prototype.list;
|
|
672
|
+
aq.prototype.removeEmeSessions=aq.prototype.af;aq.prototype.remove=aq.prototype.remove;aq.prototype.getStoreInProgress=aq.prototype.Je;aq.prototype.store=aq.prototype.store;aq.prototype.getNetworkingEngine=aq.prototype.Nb;aq.prototype.getConfiguration=aq.prototype.getConfiguration;aq.prototype.configure=aq.prototype.configure;aq.prototype.destroy=aq.prototype.destroy;aq.support=bq;
|
|
673
|
+
var kq=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Tj.offline=bq;function Aq(){}function Bq(a,b){for(var c={priority:b||0,ke:a},d=r(fb(Cq)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.da;if(e.item.priority<c.priority){Cq.splice(f,0,c);return}}Cq.push(c)}L("shaka.polyfill",Aq);Aq.register=Bq;Aq.installAll=function(){for(var a=r(Cq),b=a.next();!b.done;b=a.next()){b=b.value;try{b.ke()}catch(c){Sa("Error installing polyfill!",c)}}};var Cq=[];function Dq(){}function Eq(){Fq()}Aq.EncryptionScheme=Dq;Dq.install=Eq;Bq(Eq,-1);function Gq(){}
|
|
674
|
+
function Hq(){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}}),
|
|
675
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Iq);document.addEventListener("webkitfullscreenerror",Iq);document.addEventListener("mozfullscreenchange",Iq);document.addEventListener("mozfullscreenerror",Iq);document.addEventListener("MSFullscreenChange",Iq);document.addEventListener("MSFullscreenError",Iq)}}
|
|
676
|
+
function Iq(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Aq.Fullscreen=Gq;Gq.install=Hq;Bq(Hq);function Jq(a,b,c){if("input"==a)switch(this.type){case "range":a="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,a,b,c)}Bq(function(){md("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Jq)});Bq(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});function Kq(){}function Lq(){}Aq.MathRound=Kq;Kq.install=Lq;Bq(Lq);function Mq(){}function Nq(){var a=od();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Oq():a?(Pq(),12>=a?(Qq(),Rq()):Qq()):(md("Tizen 2")||md("Tizen 3")||md("Tizen 4"))&&Sq())}function Qq(){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}}
|
|
677
|
+
function Rq(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Pq(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}function Sq(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=gd(b)&&a(b)}}
|
|
678
|
+
function Oq(){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)}}Aq.MediaSource=Mq;Mq.install=Nq;Bq(Nq);function Tq(){}function Uq(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Vq,window.MediaKeys=Wq,window.MediaKeySystemAccess=Xq,navigator.requestMediaKeySystemAccess=Yq)}function Yq(a,b){try{var c=new Xq(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
679
|
+
function Vq(a){var b=this.mediaKeys;b&&b!=a&&Zq(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Zq(a,this):Promise.resolve()}function $q(a){a=N(a.initData);if(lb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Tb(a.subarray(4),!0);a=Vb(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=jb(a);this.dispatchEvent(b)}Aq.PatchedMediaKeysApple=Tq;Tq.install=Uq;
|
|
680
|
+
function Xq(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,
|
|
679
681
|
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;}
|
|
680
|
-
|
|
681
|
-
function
|
|
682
|
-
q.generateRequest=function(a,b){var c=this;this.g=new
|
|
683
|
-
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:
|
|
684
|
-
q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.
|
|
685
|
-
q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=
|
|
686
|
-
function
|
|
687
|
-
function
|
|
682
|
+
Xq.prototype.createMediaKeys=function(){var a=new Wq(this.keySystem);return Promise.resolve(a)};Xq.prototype.getConfiguration=function(){return this.g};function Wq(a){this.g=new WebKitMediaKeys(a);this.h=new Tc}Wq.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new ar(this.g,a)};Wq.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
683
|
+
function Zq(a,b){a.h.gb();if(!b)return Promise.resolve();a.h.v(b,"webkitneedkey",$q);try{return Ag(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function ar(a){wc.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new Tc;this.sessionId="";this.expiration=NaN;this.closed=new Ob;this.keyStatuses=new br}oa(ar,wc);q=ar.prototype;
|
|
684
|
+
q.generateRequest=function(a,b){var c=this;this.g=new Ob;try{var d=this.l.createSession("video/mp4",N(b));this.j=d;this.sessionId=d.sessionId||"";this.h.v(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",jb(e.message));e=new R("message",e);c.dispatchEvent(e)});this.h.v(d,"webkitkeyadded",function(){c.i&&(cr(c,"usable"),c.i.resolve(),c.i=null)});this.h.v(d,"webkitkeyerror",function(){var e=
|
|
685
|
+
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:cr(c,"output-not-allowed");break;default:cr(c,"internal-error")}});cr(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
686
|
+
q.update=function(a){this.i=new Ob;try{this.j.update(N(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.gb()}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 cr(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
|
|
687
|
+
function br(){this.size=0;this.g=void 0}q=br.prototype;q.forEach=function(a){this.g&&a(this.g,de.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=de.value();return this.g&&hb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Bq(Uq);function dr(){}function er(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=fr,window.MediaKeySystemAccess=gr,navigator.requestMediaKeySystemAccess=hr,HTMLMediaElement.prototype.setMediaKeys=ir)}function hr(a,b){try{var c=new gr(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
688
|
+
function jr(a){if(a.initData){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="cenc";b.initData=jb(ml(a.initData));this.dispatchEvent(b)}}Aq.PatchedMediaKeysMs=dr;dr.install=er;
|
|
689
|
+
function gr(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=
|
|
688
690
|
!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;}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
function
|
|
692
|
-
q.generateRequest=function(a,b){var c=this;this.g=new
|
|
693
|
-
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:
|
|
694
|
-
q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.
|
|
695
|
-
q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=
|
|
696
|
-
function
|
|
697
|
-
function
|
|
698
|
-
function
|
|
691
|
+
gr.prototype.createMediaKeys=function(){var a=new fr(this.keySystem);return Promise.resolve(a)};gr.prototype.getConfiguration=function(){return this.g};function ir(a){var b=this.mediaKeys;b&&b!=a&&kr(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?kr(a,this):Promise.resolve()}function fr(a){this.g=new MSMediaKeys(a);this.h=new Tc}
|
|
692
|
+
fr.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new lr(this.g,a)};fr.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function kr(a,b){a.h.gb();if(!b)return Promise.resolve();a.h.v(b,"msneedkey",jr);try{return Ag(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
|
|
693
|
+
function lr(a){wc.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new Tc;this.sessionId="";this.expiration=NaN;this.closed=new Ob;this.keyStatuses=new mr}oa(lr,wc);q=lr.prototype;
|
|
694
|
+
q.generateRequest=function(a,b){var c=this;this.g=new Ob;try{this.j=this.l.createSession("video/mp4",N(b),null),this.h.v(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",jb(d.message));d=new R("message",d);c.dispatchEvent(d)}),this.h.v(this.j,"mskeyadded",function(){c.g?(nr(c,"usable"),c.g.resolve(),c.g=null):c.i&&(nr(c,"usable"),c.i.resolve(),c.i=null)}),this.h.v(this.j,"mskeyerror",
|
|
695
|
+
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:nr(c,"output-not-allowed");break;default:nr(c,"internal-error")}}),nr(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
696
|
+
q.update=function(a){this.i=new Ob;try{this.j.update(N(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.gb()}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 nr(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
|
|
697
|
+
function mr(){this.size=0;this.g=void 0}q=mr.prototype;q.forEach=function(a){this.g&&a(this.g,de.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=de.value();return this.g&&hb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Bq(er);function or(){}function pr(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=qr,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rr,window.MediaKeys=sr,window.MediaKeySystemAccess=tr)}function qr(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
698
|
+
function rr(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Aq.PatchedMediaKeysNop=or;or.install=pr;function sr(){throw new TypeError("Illegal constructor.");}sr.prototype.createSession=function(){};sr.prototype.setServerCertificate=function(){};function tr(){this.keySystem="";throw new TypeError("Illegal constructor.");}tr.prototype.getConfiguration=function(){};tr.prototype.createMediaKeys=function(){};Bq(pr,-10);function ur(){}function vr(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)wr="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xr;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=yr;window.MediaKeys=zr;window.MediaKeySystemAccess=Ar}}
|
|
699
|
+
function Br(a){var b=wr;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function xr(a,b){try{var c=new Ar(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function yr(a){var b=this.mediaKeys;b&&b!=a&&Cr(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Cr(a,this);return Promise.resolve()}Aq.PatchedMediaKeysWebkit=ur;ur.install=vr;
|
|
700
|
+
function Ar(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),
|
|
699
701
|
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"]):
|
|
700
|
-
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;}
|
|
701
|
-
function
|
|
702
|
-
"usable"),d.g&&d.g.resolve(),d.g=null}),a.h.v(b,c+"keyerror",function(d){var e=
|
|
703
|
-
function
|
|
704
|
-
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?
|
|
705
|
-
function
|
|
706
|
-
function
|
|
707
|
-
function
|
|
708
|
-
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=
|
|
709
|
-
q.has=function(a){var b=
|
|
710
|
-
function
|
|
711
|
-
function
|
|
712
|
-
function
|
|
713
|
-
|
|
714
|
-
var l=
|
|
715
|
-
k=
|
|
716
|
-
|
|
717
|
-
function
|
|
718
|
-
function
|
|
719
|
-
function
|
|
720
|
-
2,2001);m=k&&null==m?0:m+b;n=k&&null==n?0:n+b;p="";k=[];if(Array.from(a.childNodes).some(function(
|
|
721
|
-
|
|
722
|
-
function
|
|
723
|
-
f;if(f=
|
|
724
|
-
"PNG"==f&&"Base64"==g&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=
|
|
725
|
-
function
|
|
726
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&
|
|
727
|
-
function
|
|
728
|
-
function
|
|
729
|
-
function
|
|
730
|
-
function
|
|
731
|
-
var
|
|
732
|
-
{left:"line-left",center:"center",right:"line-right"};
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
[];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
|
|
736
|
-
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");
|
|
737
|
-
|
|
738
|
-
function
|
|
739
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
740
|
-
function
|
|
741
|
-
|
|
742
|
-
sampleSize:null,
|
|
743
|
-
f.push(
|
|
744
|
-
|
|
702
|
+
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;}Ar.prototype.createMediaKeys=function(){var a=new zr(this.g);return Promise.resolve(a)};Ar.prototype.getConfiguration=function(){return this.h};function zr(a){this.l=a;this.g=null;this.h=new Tc;this.i=[];this.j=new Map}
|
|
703
|
+
function Cr(a,b){a.g=b;a.h.gb();var c=wr;b&&(a.h.v(b,c+"needkey",function(d){var e=document.createEvent("CustomEvent");e.initCustomEvent("encrypted",!1,!1,null);e.initDataType="cenc";e.initData=jb(d.initData);a.g.dispatchEvent(e)}),a.h.v(b,c+"keymessage",function(d){var e=Dr(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new R("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.v(b,c+"keyadded",
|
|
704
|
+
function(d){if(d=Dr(a,d.sessionId))Er(d,"usable"),d.g&&d.g.resolve(),d.g=null}),a.h.v(b,c+"keyerror",function(d){var e=Dr(a,d.sessionId);e&&e.handleError(d)}))}zr.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 Fr(b,this.l,a);this.i.push(a);return a};zr.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
705
|
+
function Dr(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 Fr(a,b,c){wc.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Ob;this.keyStatuses=new Gr}oa(Fr,wc);q=Fr.prototype;
|
|
706
|
+
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?Er(this,"output-restricted"):1==b?Er(this,"expired"):Er(this,"internal-error"))};
|
|
707
|
+
function Hr(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=N(Vb("LOAD_SESSION|"+c));else{var e=Vb("PERSISTENT|");d=dc(e,b)}else d=N(b)}catch(g){return Promise.reject(g)}a.h=new Ob;var f=Br("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}})).W(.01)}return a.h}
|
|
708
|
+
function Ir(a,b,c){if(a.g)a.g.then(function(){return Ir(a,b,c)})["catch"](function(){return Ir(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Rb(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=ac(e.keys[0].k);e=ac(e.keys[0].kid)}else d=N(c),e=null;var f=Br("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
709
|
+
function Er(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return Hr(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Hr(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Ob;Ir(this,b,a);return b};
|
|
710
|
+
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=Br("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 Gr(){this.size=0;this.g=void 0}q=Gr.prototype;q.forEach=function(a){this.g&&a(this.g,de.value())};q.get=function(a){if(this.has(a))return this.g};
|
|
711
|
+
q.has=function(a){var b=de.value();return this.g&&hb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var wr="";Bq(vr);function Jr(){}function Kr(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Lr,Object.defineProperty(a,"disablePictureInPicture",{get:Mr,set:Nr,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Or,document.addEventListener("webkitpresentationmodechanged",Pr,!0))}}
|
|
712
|
+
function Pr(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)}
|
|
713
|
+
function Lr(){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 Or(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
714
|
+
function Mr(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Nr(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Aq.PiPWebkit=Jr;Jr.install=Kr;Bq(Kr);function Qr(){}function Rr(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Aq.VideoPlayPromise=Qr;Qr.install=Rr;Bq(Rr);function Sr(){}function Tr(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Ur)}}function Ur(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Aq.VideoPlaybackQuality=Sr;Sr.install=Tr;Bq(Tr);function Vr(){}function Wr(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Xr;else if(6==b)a=Yr;else{try{var c=!!Xr(1,2,"")}catch(d){c=!1}c&&(a=Xr)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Xr(a,b,c){return new window.TextTrackCue(a,b,c)}function Yr(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Aq.VTTCue=Vr;Vr.install=Wr;Bq(Wr);function Zr(){}Zr.prototype.parseInit=function(){};
|
|
715
|
+
Zr.prototype.parseMedia=function(a,b){var c=Rb(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new O(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new O(2,2,2005,c.textContent);if(e=f.getElementsByTagName("tt")[0]){var g=xl(e,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=xl(e,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var k=xl(e,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");
|
|
716
|
+
var l=xl(e,"http://www.w3.org/ns/ttml#parameter","tickRate");var m=xl(e,"http://www.w3.org/ns/ttml#parameter","cellResolution");f=e.getAttribute("xml:space")||"default";c=xl(e,"http://www.w3.org/ns/ttml#styling","extent")}else throw new O(2,2,2005,"TTML does not contain <tt> tag.");if("default"!=f&&"preserve"!=f)throw new O(2,2,2005,"Invalid xml:space value: "+f);f="default"==f;g=new $r(g,h,k,l);m=m?(m=/^(\d+) (\d+)$/.exec(m))?{columns:parseInt(m[1],10),rows:parseInt(m[2],10)}:null:null;h=as(e.getElementsByTagName("metadata")[0]);
|
|
717
|
+
k=as(e.getElementsByTagName("styling")[0]);l=as(e.getElementsByTagName("layout")[0]);for(var n=[],p=r(l),u=p.next();!u.done;u=p.next()){var v=u.value,z=c;u=new Ce;var w=v.getAttribute("xml:id");if(w){u.id=w;w=null;z&&(w=bs.exec(z)||cs.exec(z));z=w?Number(w[1]):null;w=w?Number(w[2]):null;var A,D;if(A=ds(v,k,"extent"))A=(D=bs.exec(A))||cs.exec(A),null!=A&&(u.width=null!=z?100*Number(A[1])/z:Number(A[1]),u.height=null!=w?100*Number(A[2])/w:Number(A[2]),u.widthUnits=D||null!=z?Re:0,u.heightUnits=D||null!=
|
|
718
|
+
w?Re:0);if(v=ds(v,k,"origin"))A=(D=bs.exec(v))||cs.exec(v),null!=A&&(u.viewportAnchorX=null!=z?100*Number(A[1])/z:Number(A[1]),u.viewportAnchorY=null!=w?100*Number(A[2])/w:Number(A[2]),u.viewportAnchorUnits=D||null!=z?Re:0)}else u=null;u&&n.push(u)}c=es(e.getElementsByTagName("body")[0]);c=r(c);for(e=c.next();!e.done;e=c.next())(e=fs(e.value,b.periodStart,g,h,k,l,n,f,!1,m))&&d.push(e)}return d};
|
|
719
|
+
function as(a){var b=[];if(!a)return b;for(var c=r(a.childNodes),d=c.next();!d.done;d=c.next())d=d.value,d.nodeType==Node.ELEMENT_NODE&&"br"!==d.nodeName&&(d=as(d),b=b.concat(d));b.length||b.push(a);return b}function es(a){if(!a)return[];var b=[];a=r(a.childNodes);for(var c=a.next();!c.done;c=a.next())c=c.value,c instanceof Element&&(c.hasAttribute("begin")?b.push(c):b=b.concat(es(c)));return b}
|
|
720
|
+
function gs(a,b){for(var c="",d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,"br"==e.nodeName&&a.childNodes[0]!==e?c+="\n":e.childNodes&&0<e.childNodes.length?c+=gs(e,b):b?(e=e.textContent.trim(),e=e.replace(/\s+/g," "),c+=e):c+=e.textContent;return c}
|
|
721
|
+
function fs(a,b,c,d,e,f,g,h,k,l){if(k&&"br"==a.nodeName)return a=new Ae(0,0,""),a.spacer=!0,a;var m=/^[\s\n]*$/.test(a.textContent),n=a.nodeType==Node.ELEMENT_NODE&&!a.hasAttribute("begin")&&!a.hasAttribute("end");if(a.nodeType==Node.COMMENT_NODE||a.nodeType!=Node.ELEMENT_NODE||n&&m||n&&!k)return null;h="default"==(a.getAttribute("xml:space")||(h?"default":"preserve"));m=hs(a.getAttribute("begin"),c);n=hs(a.getAttribute("end"),c);var p=hs(a.getAttribute("dur"),c);null==n&&null!=p&&(n=m+p);if(!k&&
|
|
722
|
+
(null==m||null==n))throw new O(2,2,2001);m=k&&null==m?0:m+b;n=k&&null==n?0:n+b;p="";k=[];if(Array.from(a.childNodes).some(function(w){return w.nodeType==Node.TEXT_NODE&&/\S+/.test(w.textContent)}))p=gs(a,h);else for(var u=r(a.childNodes),v=u.next();!v.done;v=u.next())if(v=fs(v.value,b,c,d,e,f,g,h,!0,l))v.startTime=v.startTime||m,v.endTime=v.endTime||n,k.push(v);b=new Ae(m,n,p);b.nestedCues=k;l&&(b.cellResolution=l);if((f=is(a,"region",f,"")[0])&&f.getAttribute("xml:id")){var z=f.getAttribute("xml:id");
|
|
723
|
+
b.region=g.filter(function(w){return w.id==z})[0]}d=is(a,"backgroundImage",d,"#","http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt")[0];js(b,a,f,d,e);return b}
|
|
724
|
+
function js(a,b,c,d,e){"rtl"==ks(b,c,e,"direction")&&(a.direction="rtl");var f=ks(b,c,e,"writingMode");"tb"==f||"tblr"==f?a.writingMode="vertical-lr":"tbrl"==f?a.writingMode="vertical-rl":"rltb"==f||"rl"==f?a.direction="rtl":f&&(a.direction=Be);(f=ks(b,c,e,"textAlign"))?(a.positionAlign=ls[f],a.lineAlign=ms[f],a.textAlign=Ne[f.toUpperCase()]):a.textAlign="start";if(f=ks(b,c,e,"displayAlign"))a.displayAlign=Oe[f.toUpperCase()];if(f=ks(b,c,e,"color"))a.color=f;if(f=ks(b,c,e,"backgroundColor"))a.backgroundColor=
|
|
725
|
+
f;if(f=ks(b,c,e,"border"))a.border=f;if(f=ks(b,c,e,"fontFamily"))a.fontFamily=f;(f=ks(b,c,e,"fontWeight"))&&"bold"==f&&(a.fontWeight=700);(f=ks(b,c,e,"wrapOption"))&&"noWrap"==f&&(a.wrapLine=!1);(f=ks(b,c,e,"lineHeight"))&&f.match(ns)&&(a.lineHeight=f);(f=ks(b,c,e,"fontSize"))&&(f.match(ns)||f.match(os))&&(a.fontSize=f);if(f=ks(b,c,e,"fontStyle"))a.fontStyle=Qe[f.toUpperCase()];if(d){f=d.getAttribute("imageType")||d.getAttribute("imagetype");var g=d.getAttribute("encoding");d=d.textContent.trim();
|
|
726
|
+
"PNG"==f&&"Base64"==g&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=ks(b,c,e,"letterSpacing"))&&d.match(ns)&&(a.letterSpacing=d);(d=ks(b,c,e,"linePadding"))&&d.match(ns)&&(a.linePadding=d);if(d=ks(b,c,e,"opacity"))a.opacity=parseFloat(d);(c=ds(c,e,"textDecoration"))&&ps(a,c);(b=qs(b,e,"textDecoration"))&&ps(a,b)}
|
|
727
|
+
function ps(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")&&Ac(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Ac(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
728
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ac(a.textDecoration,"overline")}}function ks(a,b,c,d){return(a=qs(a,c,d))?a:ds(b,c,d)}function ds(a,b,c){if(!a)return null;var d=as(a);d=r(d);for(var e=d.next();!e.done;e=d.next())if(e=xl(e.value,"http://www.w3.org/ns/ttml#styling",c))return e;return rs(a,b,c)}function qs(a,b,c){var d=xl(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:rs(a,b,c)}
|
|
729
|
+
function rs(a,b,c){a=is(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=xl(a[e],"urn:ebu:tt:style",c);f||(f=xl(a[e],"http://www.w3.org/ns/ttml#styling",c));f||(f=qs(a[e],b,c));f&&(d=f)}return d}
|
|
730
|
+
function is(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?xl(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}
|
|
731
|
+
function hs(a,b){var c=null;if(ss.test(a)){c=ss.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 ts.test(a)?c=us(ts,a):vs.test(a)?c=us(vs,a):ws.test(a)?(c=ws.exec(a),c=Number(c[1])/b.frameRate):xs.test(a)?(c=xs.exec(a),c=Number(c[1])/b.g):ys.test(a)&&(c=us(ys,a));return c}
|
|
732
|
+
function us(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)}L("shaka.text.TtmlTextParser",Zr);Zr.prototype.parseMedia=Zr.prototype.parseMedia;Zr.prototype.parseInit=Zr.prototype.parseInit;function $r(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]))}
|
|
733
|
+
var bs=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,os=/^(\d{1,2}(?:\.\d+)?|100)%$/,ns=/^(\d+px|\d+em|\d*\.?\d+c)$/,cs=/^(\d+)px (\d+)px$/,ss=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ts=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,vs=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,ws=/^(\d*(?:\.\d*)?)f$/,xs=/^(\d*(?:\.\d*)?)t$/,ys=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,ms={left:He,center:"center",right:"end",start:He,end:"end"},ls=
|
|
734
|
+
{left:"line-left",center:"center",right:"line-right"};Ve["application/ttml+xml"]=function(){return new Zr};function zs(){this.u=new Zr}zs.prototype.parseInit=function(a){var b=!1;(new ge).box("moov",ke).box("trak",ke).box("mdia",ke).box("minf",ke).box("stbl",ke).X("stsd",me).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};zs.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new ge).box("mdat",ne(function(f){d=!0;e=e.concat(c.u.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};L("shaka.text.Mp4TtmlParser",zs);zs.prototype.parseMedia=zs.prototype.parseMedia;
|
|
735
|
+
zs.prototype.parseInit=zs.prototype.parseInit;Ve['application/mp4; codecs="stpp"']=function(){return new zs};Ve['application/mp4; codecs="stpp.ttml"']=function(){return new zs};Ve['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new zs};Ve['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new zs};function As(){}As.prototype.parseInit=function(){};
|
|
736
|
+
As.prototype.parseMedia=function(a,b){var c=Rb(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 O(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=Bs(new Dn(e[1]));if(null==c)throw new O(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=
|
|
737
|
+
[];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 Dn(g);var h=new Ce;Gn(g);En(g);for(var k=Gn(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))?
|
|
738
|
+
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");En(g);k=Gn(g)}f.push(h)}e=[];d=r(d.slice(1));for(g=d.next();!g.done;g=d.next()){l=g.value.split("\n");k=c;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0])g=null;else{g=null;l[0].includes("--\x3e")||(g=l[0],l.splice(0,1));h=new Dn(l[0]);m=Bs(h);var n=Fn(h,/[ \t]+--\x3e[ \t]+/g),p=Bs(h);if(null==m||null==n||null==p)throw new O(2,2,2001);l=new Ae(m+k,p+k,l.slice(1).join("\n").trim());
|
|
739
|
+
En(h);for(k=Gn(h);k;)Cs(l,k,f),En(h),k=Gn(h);null!=g&&(l.id=g);g=l}g&&e.push(g)}return e};
|
|
740
|
+
function Cs(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ee:a.textAlign=Ne[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"==
|
|
741
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Ds(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=Pe[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ge,a.line=Number(c[1]),c[2]&&(a.lineAlign=Pe[c[2].toUpperCase()])}function Ds(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
742
|
+
function Bs(a){a=Fn(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)}L("shaka.text.VttTextParser",As);As.prototype.parseMedia=As.prototype.parseMedia;As.prototype.parseInit=As.prototype.parseInit;Ve["text/vtt"]=function(){return new As};Ve['text/vtt; codecs="vtt"']=function(){return new As};Ve['text/vtt; codecs="wvtt"']=function(){return new As};function Es(){this.g=null}Es.prototype.parseInit=function(a){var b=this,c=!1;(new ge).box("moov",ke).box("trak",ke).box("mdia",ke).X("mdhd",function(d){0==d.version?(d.reader.skip(4),d.reader.skip(4),b.g=d.reader.O(),d.reader.skip(4)):(d.reader.skip(8),d.reader.skip(8),b.g=d.reader.O(),d.reader.skip(8));d.reader.skip(4)}).box("minf",ke).box("stbl",ke).X("stsd",me).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};
|
|
743
|
+
Es.prototype.parseMedia=function(a,b){if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new ge).box("moof",ke).box("traf",ke).X("tfdt",function(E){g=!0;c=0==E.version?E.reader.O():E.reader.fb()}).X("tfhd",function(E){var F=E.flags;E=E.reader;E.skip(4);F&1&&E.skip(8);F&2&&E.skip(4);l=F&8?E.O():null}).X("trun",function(E){h=!0;var F=E.version,H=E.flags;E=E.reader;var G=E.O();H&1&&E.skip(4);H&4&&E.skip(4);var I=[];G=r(db(G));for(var J=G.next();!J.done;J=G.next())J={duration:null,
|
|
744
|
+
sampleSize:null,zd:null},H&256&&(J.duration=E.O()),H&512&&(J.sampleSize=E.O()),H&1024&&E.skip(4),H&2048&&(J.zd=0==F?E.O():E.Wd()),I.push(J);d=I}).box("mdat",ne(function(E){k=!0;e=E})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,n=new S(e,0),p=r(d),u=p.next();!u.done;u=p.next()){u=u.value;var v=u.duration||l,z=u.zd?c+u.zd:m;m=z+(v||0);var w=0;do{var A=n.O();w+=A;var D=n.O(),B=null;"vttc"==oe(D)?8<A&&(B=n.eb(A-8)):n.skip(A-8);v&&B&&(A=Fs(B,b.periodStart+z/this.g,b.periodStart+m/this.g),
|
|
745
|
+
f.push(A))}while(u.sampleSize&&w<u.sampleSize)}return f.filter(Jb)};function Fs(a,b,c){var d,e,f;(new ge).box("payl",ne(function(g){d=Rb(g)})).box("iden",ne(function(g){e=Rb(g)})).box("sttg",ne(function(g){f=Rb(g)})).parse(a);return d?Gs(d,e,f,b,c):null}function Gs(a,b,c,d,e){a=new Ae(d,e,a);b&&(a.id=b);if(c)for(b=new Dn(c),c=Gn(b);c;)Cs(a,c,[]),En(b),c=Gn(b);return a}L("shaka.text.Mp4VttParser",Es);Es.prototype.parseMedia=Es.prototype.parseMedia;Es.prototype.parseInit=Es.prototype.parseInit;
|
|
746
|
+
Ve['application/mp4; codecs="wvtt"']=function(){return new Es};/*
|
|
745
747
|
@license
|
|
746
748
|
EME Encryption Scheme Polyfill
|
|
747
749
|
Copyright 2019 Google LLC
|
|
748
750
|
SPDX-License-Identifier: Apache-2.0
|
|
749
751
|
*/
|
|
750
|
-
function
|
|
751
|
-
function
|
|
752
|
+
function Hs(){}var Is;function Js(){Is?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Is=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Ks):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
753
|
+
function Ks(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),t(e,Is.call(c,a,b),2);d=e.h;if(Ls(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Is,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Ms;return e["return"](Ms.call(c,
|
|
752
754
|
a,b))})}
|
|
753
|
-
function
|
|
754
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return t(u,
|
|
755
|
-
function
|
|
756
|
-
function
|
|
757
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
758
|
-
function
|
|
759
|
-
new
|
|
760
|
-
v);l=p;m=k;return t(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}L("McEncryptionSchemePolyfill",
|
|
761
|
-
|
|
762
|
-
function
|
|
763
|
-
function
|
|
755
|
+
function Ms(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return K(function(u){if(1==u.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Ns(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Os(h.videoCapabilities,d),l=Os(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."),
|
|
756
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return t(u,Is.call(c,a,e),2)}p=u.h;return u["return"](new Ps(p,d))})}function Os(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}L("EmeEncryptionSchemePolyfill",Hs);Hs.install=Js;function Qs(){}var Rs;
|
|
757
|
+
function Ss(){Rs?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Rs=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Ts):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
758
|
+
function Ts(a){var b=this,c,d;return K(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t(e,Rs.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Ls(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Rs,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
759
|
+
navigator.mediaCapabilities.decodingInfo=Us;return e["return"](Us.call(b,a))})}
|
|
760
|
+
function Us(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=Ns(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):t(n,Rs.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
761
|
+
new Ps(k.keySystemAccess,c);n.B(3);break}if(!a.keySystemConfiguration){n.B(3);break}var p=a.keySystemConfiguration,u=[],v=[];p.audio&&u.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};u.length&&(p.audioCapabilities=u);v.length&&(p.videoCapabilities=
|
|
762
|
+
v);l=p;m=k;return t(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}L("McEncryptionSchemePolyfill",Qs);Qs.install=Ss;function Ps(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
763
|
+
Ps.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};Ps.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
764
|
+
function Ns(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 Ls(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 Vs(){}
|
|
765
|
+
function Fq(){Js();Ss()}L("EncryptionSchemePolyfills",Vs);Vs.install=Fq;"undefined"!==typeof module&&module.exports&&(module.exports=Vs);}).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})();
|
|
764
766
|
|
|
765
767
|
//# sourceMappingURL=shaka-player.compiled.map
|