shaka-player 4.0.3 → 4.0.4
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/CHANGELOG.md +13 -0
- package/CONTRIBUTORS +2 -0
- package/README.md +20 -6
- package/demo/index.html +0 -2
- package/dist/controls.css +1 -1
- package/dist/deps.js +3 -3
- package/dist/locales.js +33 -33
- package/dist/shaka-player.compiled.d.ts +11 -0
- package/dist/shaka-player.compiled.debug.d.ts +11 -0
- package/dist/shaka-player.compiled.debug.externs.js +48 -37
- package/dist/shaka-player.compiled.debug.js +141 -137
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +48 -37
- package/dist/shaka-player.compiled.js +774 -772
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +11 -0
- package/dist/shaka-player.ui.debug.d.ts +11 -0
- package/dist/shaka-player.ui.debug.externs.js +48 -37
- package/dist/shaka-player.ui.debug.js +153 -149
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +48 -37
- package/dist/shaka-player.ui.js +892 -890
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/upgrade.md +1 -0
- package/docs/tutorials/welcome.md +6 -3
- package/lib/dash/dash_parser.js +5 -0
- package/lib/hls/hls_parser.js +6 -2
- package/lib/media/media_source_engine.js +57 -24
- package/lib/media/presentation_timeline.js +24 -1
- package/lib/media/streaming_engine.js +3 -4
- package/lib/media/time_ranges_utils.js +46 -0
- package/lib/player.js +1 -1
- package/lib/polyfill/media_capabilities.js +3 -0
- package/lib/polyfill/videoplaybackquality.js +3 -1
- package/lib/util/platform.js +19 -1
- package/lib/util/string_utils.js +56 -14
- package/maintained-branches.md +15 -0
- package/package.json +2 -4
- package/test/media/drm_engine_integration.js +24 -8
- package/test/media/media_source_engine_integration.js +24 -10
- package/test/media/media_source_engine_unit.js +53 -38
- package/test/media/streaming_engine_unit.js +28 -27
- package/test/test/util/fake_media_source_engine.js +10 -9
- package/app-engine/README.md +0 -9
- package/app-engine/demo-version-index/README.md +0 -14
- package/app-engine/demo-version-index/app.yaml +0 -28
- package/app-engine/demo-version-index/generate.py +0 -164
- package/app-engine/demo-version-index/main.py +0 -11
- package/app-engine/demo-version-index/requirements.txt +0 -5
- package/app-engine/demo-version-index/templates/index.html +0 -114
- package/app-engine/shaka-player-demo/README.md +0 -18
- package/app-engine/shaka-player-demo/app.yaml +0 -61
- package/app-engine/shaka-player-demo/main.py +0 -95
- package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
- package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
- package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
- package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
- package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
- package/app-engine/shaka-player-demo/posters/standard.png +0 -0
- package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
- package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
- package/app-engine/shaka-player-demo/posters.py +0 -110
- package/app-engine/shaka-player-demo/requirements.txt +0 -5
- package/app-engine/shaka-player-demo/time.txt +0 -1
- package/build/README.md +0 -127
- package/build/__init__.py +0 -0
- package/build/all.py +0 -150
- package/build/apps.py +0 -186
- package/build/build.py +0 -392
- package/build/check.py +0 -354
- package/build/checkversion.py +0 -84
- package/build/compiler.py +0 -513
- package/build/conformance.textproto +0 -335
- package/build/docker/Dockerfile +0 -20
- package/build/docker/docker-compose.yml +0 -10
- package/build/docs.py +0 -54
- package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
- package/build/eslint-plugin-shaka-rules/index.js +0 -24
- package/build/eslint-plugin-shaka-rules/package.json +0 -7
- package/build/eslint-plugin-shaka-rules/private.js +0 -109
- package/build/gendeps.py +0 -71
- package/build/generateExterns.js +0 -867
- package/build/generateLocalizations.py +0 -262
- package/build/generateTsDefs.py +0 -137
- package/build/install-linux-prereqs.sh +0 -136
- package/build/license-header +0 -5
- package/build/misspellings.txt +0 -39
- package/build/pixelsChanged.js +0 -35
- package/build/shaka-lab.yaml +0 -161
- package/build/shakaBuildHelpers.py +0 -356
- package/build/stats.py +0 -816
- package/build/subprocessWindowsPatch.py +0 -103
- package/build/test.py +0 -541
- package/build/types/ads +0 -8
- package/build/types/cast +0 -6
- package/build/types/cea +0 -13
- package/build/types/complete +0 -9
- package/build/types/core +0 -108
- package/build/types/dash +0 -8
- package/build/types/hls +0 -9
- package/build/types/manifests +0 -5
- package/build/types/networking +0 -6
- package/build/types/offline +0 -22
- package/build/types/polyfill +0 -18
- package/build/types/text +0 -11
- package/build/types/ui +0 -39
- package/build/updateScreenshots.py +0 -85
- package/build/wrapper.template.js +0 -52
package/dist/shaka-player.ui.js
CHANGED
|
@@ -15,32 +15,32 @@ 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 ia(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 ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=la;
|
|
18
|
-
function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(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 ta(a,b){a.i={
|
|
20
|
-
function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.
|
|
18
|
+
function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(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.Si=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
|
|
19
|
+
function ta(a,b){a.i={hf:b,tf:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function z(a){a.g=0}function B(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function F(a,b){a.m=b||0;var c=a.i.hf;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.tf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
|
|
21
21
|
function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}
|
|
22
|
-
function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.
|
|
22
|
+
function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.tf)throw b.hf;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
|
|
23
23
|
function Da(a){this.next=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Ca(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.B):(ta(a.g,b),b=Ca(a));return b};this["return"]=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}
|
|
24
24
|
function Ea(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function I(a){return Ea(new Da(new za(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
25
25
|
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.A=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
26
26
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(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.G(g):this.m(g)}};
|
|
27
27
|
b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.C()};b.prototype.I=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.A)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.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.J=function(g){var h=this.j();g.cd(h.resolve,h.reject)};b.prototype.K=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(
|
|
30
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).cd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function
|
|
29
|
+
b.prototype.J=function(g){var h=this.j();g.cd(h.resolve,h.reject)};b.prototype.K=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(n,t){return"function"==typeof n?function(v){try{l(n(v))}catch(y){m(y)}}:t}var l,m,p=new b(function(n,t){l=n;m=t});this.cd(k(g,l),k(h,m));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.cd=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.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).cd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(v){return function(y){n[v]=y;t--;0==t&&l(n)}}var n=[],t=0;do n.push(void 0),t++,d(k.value).cd(p(n.length-1),m),k=h.next();
|
|
31
31
|
while(!k.done)})};return b});function Ia(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
32
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(!Ia(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(
|
|
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(p){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(!Ia(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ia(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
34
34
|
Ia(k,g)&&Ia(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ia(k,g)&&Ia(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
35
|
-
ea("Map",function(a){function b(){var h={};return h.ob=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.ob;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&&Ia(h.h,l))for(var
|
|
35
|
+
ea("Map",function(a){function b(){var h={};return h.ob=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.ob;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&&Ia(h.h,l))for(var p=0;p<m.length;p++){var n=m[p];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:p,va:n}}return{id:l,
|
|
36
36
|
list:m,index:-1,va: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(
|
|
37
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(p){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.va?l.va.value=k:(l.va={next:this.g,ob:this.g.ob,head:this.g,key:h,value:k},l.list.push(l.va),this.g.ob.next=l.va,this.g.ob=l.va,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.va&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.va.ob.next=h.va.next,h.va.next.ob=h.va.ob,
|
|
38
38
|
h.va.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.ob=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).va};e.prototype.get=function(h){return(h=d(this,h).va)&&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});function Ja(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.keys",function(a){return a?a:function(){return Ja(this,function(b){return b})}});
|
|
40
40
|
ea("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
41
41
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
|
|
42
42
|
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
|
|
43
|
-
function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{
|
|
43
|
+
function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{qf:e,v:f}}return{qf:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).qf}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
|
|
44
44
|
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}});function Ma(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
45
|
ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ma(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ma(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}});
|
|
46
46
|
var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ia(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Na});ea("Array.prototype.values",function(a){return a?a:function(){return Ja(this,function(b,c){return c})}});
|
|
@@ -53,8 +53,8 @@ function J(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScri
|
|
|
53
53
|
Copyright 2016 Google LLC
|
|
54
54
|
SPDX-License-Identifier: Apache-2.0
|
|
55
55
|
*/
|
|
56
|
-
function
|
|
57
|
-
function Pa(a){var b=new
|
|
56
|
+
function L(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}
|
|
57
|
+
function Pa(a){var b=new L(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}L.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};L.prototype.stopImmediatePropagation=function(){this.g=!0};L.prototype.stopPropagation=function(){};J("shaka.util.FakeEvent",L);function Qa(){}function Ra(){}function Ta(){}function Ua(a){var b=Ha.apply(1,arguments);Va.has(a)||(Va.add(a),Ta.apply(Qa,ia(b)))}function Wa(){}function Xa(){}function Ya(){}function Za(){}var Va=new Set;if(window.console&&window.console.log.bind){var $a={},bb=($a[1]=console.error.bind(console),$a[2]=console.warn.bind(console),$a[3]=console.info.bind(console),$a[4]=console.log.bind(console),$a[5]=console.debug.bind(console),$a[6]=console.debug.bind(console),$a);Ta=bb[2];Ra=bb[1]};function cb(){this.g={}}q=cb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.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 db(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function eb(){this.ua=new cb;this.nd=this}eb.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};eb.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};eb.prototype.dispatchEvent=function(a){if(!this.ua)return!0;var b=this.ua.get(a.type)||[],c=this.ua.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.nd;a.currentTarget=this.nd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
58
58
|
eb.prototype.release=function(){this.ua=null};function fb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function gb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function hb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function ib(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c};/*
|
|
59
59
|
@license
|
|
60
60
|
Copyright 2008 The Closure Library Authors
|
|
@@ -80,7 +80,7 @@ HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIA
|
|
|
80
80
|
LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,
|
|
81
81
|
CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,CS_IMA_SDK_MISSING:1E4,
|
|
82
82
|
CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function zb(a,b){return a.concat(b)}function Ab(){}function Bb(a){return null!=a};function Cb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new kb(d)});return a.map(function(d){return new kb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(zb,[]).map(function(d){return d.toString()})}function Db(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
83
|
-
function Eb(a,b){if(1==b.length)return b[0];var c=Fb(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function Fb(a,b){for(var c=r(Gb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Hb?"":null}var Hb="text",Ib={Ma:"video",Fb:"audio",ha:Hb,xc:"image",
|
|
83
|
+
function Eb(a,b){if(1==b.length)return b[0];var c=Fb(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function Fb(a,b){for(var c=r(Gb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Hb?"":null}var Hb="text",Ib={Ma:"video",Fb:"audio",ha:Hb,xc:"image",rh:"application"},Gb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Jb(){}function Kb(a,b){a=Lb(a);b=Lb(b);return a.split("-")[0]==b.split("-")[0]}function Mb(a,b){a=Lb(a);b=Lb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Nb(a,b){a=Lb(a);b=Lb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Lb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Ob.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Pb(a,b){var c=Qb(a),d=Qb(b);return a!=c&&b!=d&&c==d}
|
|
84
84
|
function Rb(a,b){a=Lb(a);b=Lb(b);return b==a?4:Mb(b,a)?3:Nb(b,a)?2:Mb(a,b)?1:0}function Qb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Ob.get(a)||a}function Sb(a){return a.language?Lb(a.language):a.audio&&a.audio.language?Lb(a.audio.language):a.video&&a.video.language?Lb(a.video.language):"und"}
|
|
85
85
|
function Tb(a,b){for(var c=Lb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Lb(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,Mb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Nb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Mb(c,f))return f;return null}J("shaka.util.LanguageUtils",Jb);Jb.findClosestLocale=Tb;Jb.getLocaleForVariant=Sb;
|
|
86
86
|
Jb.getLocaleForText=function(a){return Lb(a.language||"und")};Jb.getBase=Qb;Jb.relatedness=Rb;Jb.areSiblings=Pb;Jb.normalize=Lb;Jb.isSiblingOf=Nb;Jb.isParentOf=Mb;Jb.areLanguageCompatible=Kb;Jb.areLocaleCompatible=function(a,b){a=Lb(a);b=Lb(b);return a==b};
|
|
@@ -90,814 +90,816 @@ var Ob=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
90
90
|
"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",
|
|
91
91
|
"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",
|
|
92
92
|
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ub(a){eb.call(this);this.j=Lb(a);this.i=new Map;this.g=new Set;this.h=new Map}qa(Ub,eb);q=Ub.prototype;q.release=function(){eb.prototype.release.call(this)};
|
|
93
|
-
q.
|
|
94
|
-
q.ia=function(a,b,c){a=Lb(a);void 0===c&&(c=Wb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Wb||d.set(f,e)});this.h.set(a,d);Vb(this);this.dispatchEvent(new
|
|
93
|
+
q.Ye=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Lb(c.value));Vb(this);a=ib(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new L("unknown-locales",(new Map).set("locales",a)));a=ib(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new L("locale-changed",a))};
|
|
94
|
+
q.ia=function(a,b,c){a=Lb(a);void 0===c&&(c=Wb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Wb||d.set(f,e)});this.h.set(a,d);Vb(this);this.dispatchEvent(new L("locale-updated"));return this};q.$g=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new L("unknown-localization",a));return""};
|
|
95
95
|
function Vb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Wb:f.Wb},h=g.next()){f.Wb=h.value;e.add(f.Wb);e.add(Qb(f.Wb));h=ib(b.keys(),function(l){return function(m){return Pb(m,l.Wb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=ib(b.keys(),function(l){return function(m){return Qb(m)==l.Wb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
96
|
-
c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Xb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new
|
|
97
|
-
Ub.prototype.resolveDictionary=Ub.prototype
|
|
98
|
-
|
|
96
|
+
c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Xb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new L("missing-localizations",d)))}function Xb(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}J("shaka.ui.Localization",Ub);Ub.prototype.resolve=Ub.prototype.resolve;
|
|
97
|
+
Ub.prototype.resolveDictionary=Ub.prototype.$g;Ub.prototype.insert=Ub.prototype.ia;Ub.prototype.changeLocale=Ub.prototype.Ye;Ub.prototype.release=Ub.prototype.release;var Wb=1;Ub.ConflictResolution={USE_OLD:0,USE_NEW:Wb};Ub.UNKNOWN_LOCALES="unknown-locales";Ub.UNKNOWN_LOCALIZATION="unknown-localization";Ub.MISSING_LOCALIZATIONS="missing-localizations";Ub.LOCALE_CHANGED="locale-changed";Ub.LOCALE_UPDATED="locale-updated";var Yb={Ki:"UNRECOGNIZED_LANGUAGE",ii:"PICTURE_IN_PICTURE",Jh:"EXIT_LOOP_MODE",Te:"LIVE",Ih:"EXIT_FULL_SCREEN",Gh:"ENTER_PICTURE_IN_PICTURE",Mi:"VOLUME",ri:"SEEK",Ah:"CAST",Vh:"MORE_SETTINGS",Rh:"LOOP",bi:"ON",mi:"REPLAY",si:"SKIP_AD",qh:"AIRPLAY",Qh:"LANGUAGE",$h:"NOT_APPLICABLE",Lf:"SUBTITLE_FORCED",ph:"AD_TIME",oi:"REWIND",Xh:"MUTE",sh:"AUTO_QUALITY",gi:"PAUSE",ai:"OFF",ki:"PLAYBACK_RATE",Wh:"MULTIPLE_LANGUAGES",ji:"PLAY",Ji:"UNMUTE",xi:"STATISTICS",Fh:"ENTER_LOOP_MODE",yh:"CAPTIONS",Nh:"FAST_FORWARD",
|
|
98
|
+
Kh:"EXIT_PICTURE_IN_PICTURE",Oh:"FULL_SCREEN",BACK:"BACK",ni:"RESOLUTION",oh:"AD_DURATION",AD_PROGRESS:"AD_PROGRESS",Ii:"UNDETERMINED_LANGUAGE",li:"QUALITY",ti:"SKIP_TO_LIVE"};function Zb(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Zb.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function $b(a){return a.h/(1-Math.pow(a.g,a.i))};function ac(){this.h=new Zb(2);this.j=new Zb(5);this.g=0;this.i=128E3;this.l=16E3}ac.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};ac.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};ac.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min($b(this.h),$b(this.j))};function bc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function cc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function dc(a,b,c){c||(c=bc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Jd:d.Jd},e=a.next()){d.Jd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Jd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
99
99
|
function ec(a,b,c){c||(c=bc);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 fc(a,b,c){this.startTime=a;this.direction=gc;this.endTime=b;this.payload=c;this.region=new hc;this.position=null;this.positionAlign=ic;this.size=0;this.textAlign=jc;this.writingMode=kc;this.lineInterpretation=lc;this.line=null;this.lineHeight="";this.lineAlign=mc;this.displayAlign=nc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=oc;this.fontStyle=pc;this.linePadding=this.letterSpacing=this.fontFamily=
|
|
100
100
|
"";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}fc.prototype.clone=function(){var a=new fc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
101
|
-
function
|
|
101
|
+
function qc(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(!ec(a.nestedCues,b.nestedCues,qc))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(!ec(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}J("shaka.text.Cue",fc);var ic="auto";
|
|
102
102
|
fc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ic};var jc="center",uc={LEFT:"left",RIGHT:"right",CENTER:jc,START:"start",END:"end"};fc.textAlign=uc;var nc="after",vc={BEFORE:"before",CENTER:"center",AFTER:nc};fc.displayAlign=vc;var gc="ltr";fc.direction={HORIZONTAL_LEFT_TO_RIGHT:gc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var kc="horizontal-tb";fc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:kc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var lc=0;
|
|
103
103
|
fc.lineInterpretation={LINE_NUMBER:lc,PERCENTAGE:1};var mc="start",wc={CENTER:"center",START:mc,END:"end"};fc.lineAlign=wc;var xc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};fc.defaultTextColor=xc;var yc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};fc.defaultTextBackgroundColor=yc;var oc=400;fc.fontWeight={NORMAL:oc,BOLD:700};
|
|
104
104
|
var pc="normal",zc={NORMAL:pc,ITALIC:"italic",OBLIQUE:"oblique"};fc.fontStyle=zc;fc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function hc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ac;this.scroll=Bc}J("shaka.text.CueRegion",hc);var Ac=1;hc.units={PX:0,PERCENTAGE:Ac,LINES:2};var Bc="";hc.scrollMode={NONE:Bc,UP:"up"};function Cc(){}function Dc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Ec(a)==Ec(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Fc(a),d=Fc(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Ec(a){return a instanceof ArrayBuffer?a:a.buffer}function Gc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
105
|
-
function Fc(a,b,c){c=void 0===c?Infinity:c;return Hc(a,void 0===b?0:b,c,Uint8Array)}function Ic(a,b,c){c=void 0===c?Infinity:c;return Hc(a,void 0===b?0:b,c,DataView)}function Hc(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(Ec(a),b,Math.min(b+Math.max(c,0),e)-b)}J("shaka.util.BufferUtils",Cc);Cc.toDataView=Ic;Cc.toUint8=Fc;Cc.toArrayBuffer=Gc;Cc.equal=Dc;function Jc(){}J("shaka.dependencies",Jc);Jc.has=function(a){return Kc.has(a)};Jc.add=function(a,b){if(!Lc[a])throw Error(a+" is not supported");Kc.set(a,function(){return b})};var Lc={muxjs:"muxjs"};Jc.Allowed=Lc;var Kc=new Map([["muxjs",function(){return window.muxjs}]]);function Mc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Mc.prototype.resolve=function(){};Mc.prototype.reject=function(){};function Nc(a){this.h=a;this.g=void 0}Nc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Oc(){}function
|
|
106
|
-
function
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
function
|
|
110
|
-
function
|
|
111
|
-
function
|
|
112
|
-
function
|
|
113
|
-
|
|
114
|
-
(
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
function
|
|
124
|
-
function
|
|
125
|
-
function
|
|
126
|
-
function
|
|
127
|
-
function
|
|
128
|
-
function
|
|
129
|
-
|
|
130
|
-
|
|
105
|
+
function Fc(a,b,c){c=void 0===c?Infinity:c;return Hc(a,void 0===b?0:b,c,Uint8Array)}function Ic(a,b,c){c=void 0===c?Infinity:c;return Hc(a,void 0===b?0:b,c,DataView)}function Hc(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(Ec(a),b,Math.min(b+Math.max(c,0),e)-b)}J("shaka.util.BufferUtils",Cc);Cc.toDataView=Ic;Cc.toUint8=Fc;Cc.toArrayBuffer=Gc;Cc.equal=Dc;function Jc(){}J("shaka.dependencies",Jc);Jc.has=function(a){return Kc.has(a)};Jc.add=function(a,b){if(!Lc[a])throw Error(a+" is not supported");Kc.set(a,function(){return b})};var Lc={muxjs:"muxjs"};Jc.Allowed=Lc;var Kc=new Map([["muxjs",function(){return window.muxjs}]]);function Mc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Mc.prototype.resolve=function(){};Mc.prototype.reject=function(){};function Nc(a){this.h=a;this.g=void 0}Nc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Oc(a){this.h=a;this.g=null}Oc.prototype.S=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};Oc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.xa=function(){this.stop();this.h();return this};P.prototype.S=function(a){var b=this;this.stop();this.g=(new Oc(function(){b.h()})).S(a);return this};P.prototype.ka=function(a){var b=this;this.stop();this.g=(new Oc(function(){b.g.S(a);b.h()})).S(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};J("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.ka;P.prototype.tickAfter=P.prototype.S;
|
|
106
|
+
P.prototype.tickNow=P.prototype.xa;function Pc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Rc(a){return""!=Sc().canPlayType(a)}function Tc(){return Uc("Xbox One")}function Vc(){return Uc("Tizen")}function Wc(){return Uc("Web0S")&&Uc("Chrome/38.0.2125.122 Safari/537.36")}function Xc(){return Uc("CrKey")}function Yc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Vc()&&!Uc("PC=EOS")&&!Zc()}function Zc(){return Uc("PlayStation 4")}
|
|
107
|
+
function $c(){if(!Yc())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 Uc(a){return(navigator.userAgent||"").includes(a)}function Sc(){if(ad)return ad;bd||(bd=new P(function(){ad=null}));(ad=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ad=document.createElement("video"));bd.S(1);return ad}var bd=null,ad=null;function cd(){}function dd(a){if(!a)return"";a=Fc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Zc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ra('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;a=ed(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new O(2,2,2004);}}
|
|
108
|
+
function fd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ic(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return ed(d)}
|
|
109
|
+
function gd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fc(a);if(239==c[0]&&187==c[1]&&191==c[2])return dd(c);if(254==c[0]&&255==c[1])return fd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return fd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return fd(a,!1);if(0==c[1]&&0==c[3])return fd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return dd(a);throw new O(2,2,2003);}
|
|
110
|
+
function hd(a){if(window.TextEncoder&&!Zc()){var b=new TextEncoder;return Gc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gc(b)}function id(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function ed(a){return jd.value()(a)}J("shaka.util.StringUtils",cd);cd.resetFromCharCode=function(){jd.g=void 0};cd.toUTF16=id;cd.toUTF8=hd;
|
|
111
|
+
cd.fromBytesAutoDetect=gd;cd.fromUTF16=fd;cd.fromUTF8=dd;var jd=new Nc(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={sb:65536};0<b.sb;b={sb:b.sb},b.sb/=2)if(a(b.sb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.sb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.sb));return e}}(b);return null});function kd(){}function ld(a){a=ed(Fc(a));return btoa(a)}function md(a,b){b=void 0==b?!0:b;var c=ld(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function nd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function od(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
112
|
+
function pd(a){var b=Fc(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}function qd(){for(var a=Ha.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fc(d),c),c+=d.byteLength;return b}J("shaka.util.Uint8ArrayUtils",kd);kd.concat=qd;kd.toHex=pd;kd.fromHex=od;kd.fromBase64=nd;kd.toBase64=md;kd.toStandardBase64=ld;function rd(){var a=this;this.A=Kc.get("muxjs")();this.g=new this.A.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(qd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:qd.apply(kd,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}rd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
113
|
+
function sd(a,b){if(!Kc.get("muxjs")()||!td(a))return!1;if(b)return MediaSource.isTypeSupported(ud(b,a));var c=ud("audio",a),d=ud("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function td(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
114
|
+
function ud(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 vd(a,b){a.l=!0;a.h=new Mc;a.m=[];a.j=[];a.i=[];var c=Fc(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new O(2,3,3018));return a.h};function wd(){}function xd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function yd(a,b,c){a=xd(a,b);if(td(a)){if(Kc.get("muxjs")())return ud(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
|
|
115
|
+
function zd(a){var b=Ad(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
|
|
116
|
+
case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Bd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ad(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}J("shaka.util.MimeUtils",wd);wd.getFullType=xd;
|
|
117
|
+
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Cd(a){this.j=null;this.i=a;this.C=!1;this.l=this.B=0;this.m=Infinity;this.h=this.g=null;this.F="";this.A=new Map}function Gd(a){return Hd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Cd.prototype.destroy=function(){this.i=this.j=null;this.A.clear();return Promise.resolve()};
|
|
118
|
+
function Id(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.j||!a.i)return k["return"]();if(null==c||null==d)return a.j.parseInit(Fc(b)),k["return"]();e=a.C?c:a.B;f={periodStart:a.B,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Fc(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);z(k)})}
|
|
119
|
+
Cd.prototype.remove=function(a,b){var c=this;return I(function(d){if(1==d.g)return u(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));z(d)})};function Jd(a,b,c){a.l=b;a.m=c}function Kd(a,b,c){a.F=b;if(b=a.A.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)}
|
|
120
|
+
function Ld(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new fc(c.startTime,c.endTime,c.text)});return b}function Md(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Md(a,d.value,c)}
|
|
121
|
+
function Nd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Md(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.F&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.A.has(f)||a.A.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.A.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
122
|
+
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}J("shaka.text.TextEngine",Cd);Cd.prototype.destroy=Cd.prototype.destroy;Cd.findParser=function(a){return Hd[a]};Cd.unregisterParser=function(a){delete Hd[a]};Cd.registerParser=function(a,b){Hd[a]=b};var Hd={};function Od(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Pd(f,b,c);f=Qd(f,d);b=Rd(f);b=Sd(b);var g=Td(b,e);a.variants=a.variants.filter(function(h){return Ud(h)==g?!0:!1})}function Rd(a){var b=new cb;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Ud(c);b.push(d,c)}return b}
|
|
123
|
+
function Sd(a){var b=0,c=new Map,d=a.size();db(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 cb);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
|
|
124
|
+
function Pd(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={Ud:d.Ud},e=b.next())if(d.Ud=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Ud)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Gd:d.Gd},b=c.next())if(d.Gd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Gd)}}(d)),b.length){a=b;break}return a}
|
|
125
|
+
function Td(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Vd||d==Wd){if(a=Xd(a,d),1==a.size())return a.keys()[0]}else if(d==Yd)break;return Zd(a)}function Xd(a,b){var c=0,d=new cb;db(a,function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
|
|
126
|
+
function Zd(a){var b="",c=Infinity;db(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}function Ud(a){var b="";a.video&&(b=zd(a.video.codecs));var c="";a.audio&&(c=zd(a.audio.codecs));return b+"-"+c}function $d(a,b,c){a.variants=a.variants.filter(function(d){return ae(d,b,c)})}
|
|
127
|
+
function ae(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}
|
|
128
|
+
function be(a,b){return I(function(c){if(1==c.g)return u(c,ce(b,0<b.offlineSessionIds.length),2);de(a,b);ee(b);return u(c,fe(b),0)})}
|
|
129
|
+
function ce(a,b){return I(function(c){if(1==c.g)return u(c,ge(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=he(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Eb("video",g);g=Eb("audio",g);g=yd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=yd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=ie(f.codecs),f=yd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Tc()&&e&&(e.width&&
|
|
130
|
+
1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Xa(je(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Xa(je(d));return e});z(c)})}
|
|
131
|
+
function ge(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return I(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return I(function(D){if(1==D.g)return B(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return w=D.h,y.decodingInfos.push(w),va(D,0);F(D);JSON.stringify(x);z(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=ke(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(v,Promise.all(f),
|
|
131
132
|
0)})}
|
|
132
|
-
function
|
|
133
|
-
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
134
|
-
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var
|
|
135
|
-
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function
|
|
136
|
-
function
|
|
137
|
-
function
|
|
138
|
-
function
|
|
139
|
-
function
|
|
133
|
+
function ke(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Eb("video",g);f=he(f);g=Eb("audio",g);g=yd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=he(f);f=yd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
134
|
+
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ie(d.codecs),f=yd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
|
|
135
|
+
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())n.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
136
|
+
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function ie(a){return Vc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
|
|
137
|
+
function he(a){return"vp9"==a?"vp09.00.10.08":a}function de(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!le(d,a.audio)||c&&a&&a.video&&!le(c,a.video)?!1:!0})}function ee(a){a.textStreams=a.textStreams.filter(function(b){return Gd(xd(b.mimeType,b.codecs))})}
|
|
138
|
+
function fe(a){var b,c,d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(me.has(f)){l.D(5);break}g=ne.get(f);if(!g){me.set(f,!1);l.D(5);break}return u(l,oe(g),7);case 7:h=l.h,me.set(f,h);case 5:(k=me.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,z(l)}})}
|
|
139
|
+
function oe(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)})["catch"](function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function le(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
140
|
+
function pe(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
140
141
|
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
|
|
141
142
|
a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
|
|
142
|
-
function
|
|
143
|
+
function qe(a){return{id:a.id,active:!1,type:Hb,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
|
|
143
144
|
originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
|
|
144
|
-
function
|
|
145
|
-
audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function
|
|
146
|
-
function
|
|
147
|
-
function
|
|
148
|
-
originalTextId:null,originalImageId:null}}function
|
|
149
|
-
function
|
|
150
|
-
function
|
|
151
|
-
|
|
152
|
-
function
|
|
153
|
-
var
|
|
154
|
-
q.chooseVariant=function(){var a=
|
|
155
|
-
q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(
|
|
156
|
-
q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function
|
|
157
|
-
|
|
158
|
-
function
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
function
|
|
162
|
-
function
|
|
163
|
-
function
|
|
164
|
-
|
|
165
|
-
function
|
|
166
|
-
function
|
|
167
|
-
q.request=function(a,b){var c=this,d=new
|
|
168
|
-
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(
|
|
169
|
-
function
|
|
170
|
-
function
|
|
171
|
-
if(!
|
|
172
|
-
c.uris[e],b));if(
|
|
173
|
-
function
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
q.Pc=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};J("shaka.util.EventManager",
|
|
177
|
-
|
|
178
|
-
function
|
|
179
|
-
function
|
|
180
|
-
function
|
|
181
|
-
function
|
|
182
|
-
|
|
183
|
-
function
|
|
184
|
-
q.yc=function(a){var b=this,c;return I(function(d){if(1==d.g){if(!b.B)return b.A.Fa(a,"encrypted",function(){b.m(new O(2,6,6010))}),d["return"]();b.l=a;b.A.Fa(b.l,"play",function(){for(var e=r(b.K),f=e.next();!f.done;f=e.next())
|
|
185
|
-
|
|
186
|
-
function
|
|
187
|
-
B(g,6);return u(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=
|
|
188
|
-
function
|
|
189
|
-
function
|
|
190
|
-
function
|
|
191
|
-
f.keySystem;var D=d.get(f.keySystem);var C=[],A=[],
|
|
192
|
-
D.next())C=C.value,C.distinctiveIdentifierRequired&&(
|
|
193
|
-
|
|
194
|
-
function
|
|
145
|
+
function re(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
|
|
146
|
+
audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function se(a){a.__shaka_id||(a.__shaka_id=te++);return a.__shaka_id}
|
|
147
|
+
function ue(a){var b=ve(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function we(a){var b=ve(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
148
|
+
function ve(a){return{id:se(a),active:!1,type:"",bandwidth:0,language:Lb(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
|
|
149
|
+
originalTextId:null,originalImageId:null}}function xe(a){return a.allowedByApplication&&a.allowedByKeySystem}function ye(a){return a.filter(function(b){return xe(b)})}
|
|
150
|
+
function Qd(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,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
|
|
151
|
+
function ze(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Tb(Lb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Lb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Ae(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(zb,[]);return a.length?
|
|
152
|
+
Ae(e,a[0]):e}function Ae(a,b){return a.filter(function(c){return c.roles.includes(b)})}function je(a){var b=[];a.audio&&b.push(Be(a.audio));a.video&&b.push(Be(a.video));return b.join(", ")}
|
|
153
|
+
function Be(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
|
|
154
|
+
var te=0,Vd="smooth",Wd="powerEfficient",Yd="bandwidth",me=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ne=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Ce(){var a=this;this.l=null;this.i=!1;this.h=new ac;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.i){a.h=new ac;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.j=[];this.A=1;this.B=!1;this.g=this.m=null}q=Ce.prototype;q.stop=function(){this.l=null;this.i=!1;this.j=[];this.A=1;this.m=null};q.init=function(a){this.l=a};
|
|
155
|
+
q.chooseVariant=function(){var a=De(this.g.restrictions,this.j),b=this.h.getBandwidthEstimate(Fe(this));this.j.length&&!a.length&&(a=De(null,this.j),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
|
|
156
|
+
q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(Fe(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(Fe(this))};q.setVariants=function(a){this.j=a};q.playbackRateChanged=function(a){this.A=a};
|
|
157
|
+
q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function Fe(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function De(a,b){a&&(b=b.filter(function(c){return ae(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}J("shaka.abr.SimpleAbrManager",Ce);Ce.prototype.configure=Ce.prototype.configure;
|
|
158
|
+
Ce.prototype.playbackRateChanged=Ce.prototype.playbackRateChanged;Ce.prototype.setVariants=Ce.prototype.setVariants;Ce.prototype.getBandwidthEstimate=Ce.prototype.getBandwidthEstimate;Ce.prototype.segmentDownloaded=Ce.prototype.segmentDownloaded;Ce.prototype.disable=Ce.prototype.disable;Ce.prototype.enable=Ce.prototype.enable;Ce.prototype.chooseVariant=Ce.prototype.chooseVariant;Ce.prototype.init=Ce.prototype.init;Ce.prototype.stop=Ce.prototype.stop;function Ge(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)}Ge.prototype.add=function(a){return He(this.h,a)?(this.g.add(a),!0):!1};
|
|
159
|
+
function He(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&Ie(c,d)&&Je(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Ie(c,d)&&Je(c.roles,d.roles)));return c?!1:!0}Ge.prototype.values=function(){return this.g.values()};
|
|
160
|
+
function Ie(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Ad(f)[0]}),d=b.codecs.split(",").map(function(f){return Ad(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Je(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 Ke(a){this.g=a;this.h=new Le(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Ke.prototype.create=function(a){var b=this,c=a.filter(function(d){return He(b.g,d)});return c.length?new Ge(c[0],c):this.h.create(a)};function Le(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
161
|
+
Le.prototype.create=function(a){var b=[];b=Me(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ne(b,this.j);a.length&&(b=a);this.g&&(a=Qd(b,this.g),a.length&&(b=a));this.h&&(a=Oe(b,this.h),a.length&&(b=a));a=new Ge(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,He(a.h,c)&&a.add(c);return a};function Me(a,b){var c=Lb(b),d=Tb(c,a.map(function(e){return Sb(e)}));return d?a.filter(function(e){return d==Sb(e)}):[]}
|
|
162
|
+
function Ne(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Oe(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Pe(){this.g=Qe;this.h=(new Map).set(Qe,2).set(Re,1)}function Se(a,b,c){a.h.set(Qe,c).set(Re,b)}var Re=0,Qe=1;function Te(a,b){var c=Ue();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.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}
|
|
163
|
+
function Ve(a){var b,c;return I(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.A);return u(d,new Promise(function(e){(new P(e)).S(c/1E3)}),2)}a.h*=a.m;z(d)})}function Ue(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function We(a,b){this.promise=a;this.i=b;this.g=!1}function Xe(a){return new We(Promise.reject(a),function(){return Promise.resolve()})}function Ye(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new We(a,function(){return Promise.resolve()})}function Ze(a){return new We(Promise.resolve(a),function(){return Promise.resolve()})}function $e(a){return new We(a,function(){return a["catch"](function(){})})}We.prototype.abort=function(){this.g=!0;return this.i()};
|
|
164
|
+
function af(a){return new We(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}We.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
165
|
+
We.prototype.na=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=bf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Mc,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new We(f,function(){return d()})};
|
|
166
|
+
function bf(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()}}}J("shaka.util.AbortableOperation",We);We.prototype.chain=We.prototype.na;We.prototype["finally"]=We.prototype["finally"];We.all=af;We.prototype.abort=We.prototype.abort;We.notAbortable=$e;We.completed=Ze;We.aborted=Ye;We.failed=Xe;function cf(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 df(a){var b={},c;for(c in a)b[c]=a[c];return b};function ef(){this.g=[]}function ff(a,b){a.g.push(b["finally"](function(){cc(a.g,b)}))}ef.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 gf(a,b,c){eb.call(this);this.i=!1;this.m=new ef;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}qa(gf,eb);q=gf.prototype;q.Be=function(a){this.A=a};function hf(a,b,c,d){c=c||jf;var e=kf[a];if(!e||c>=e.priority)kf[a]={priority:c,Rg:b,Sg:void 0===d?!1:d}}q.Tg=function(a){this.g.add(a)};q.jh=function(a){this.g["delete"](a)};q.Tf=function(){this.g.clear()};q.Ug=function(a){this.h.add(a)};q.kh=function(a){this.h["delete"](a)};q.Uf=function(){this.h.clear()};
|
|
167
|
+
function lf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();eb.prototype.release.call(this);return this.m.destroy()};
|
|
168
|
+
q.request=function(a,b){var c=this,d=new mf;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new nf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?cf(b.retryParameters):Ue();b.uris=cf(b.uris);e=of(this,a,b);var f=e.na(function(){return pf(c,a,b,new Te(b.retryParameters,!1),0,null,d)}),g=f.na(function(p){return qf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
169
|
+
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Eg||!c.l||t.fromCache||a!=rf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new nf(m.promise,function(){return m.abort()},d);ff(this.m,e);return e};
|
|
170
|
+
function of(a,b,c){var d=Ze(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Pd:e.Pd},f=a.next())e.Pd=f.value,d=d.na(function(g){return function(){c.body&&(c.body=Gc(c.body));return g.Pd(b,c)}}(e));return d.na(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
|
|
171
|
+
function pf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new kb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),lb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=kf[k])?k.Rg:null;if(!m)return Xe(new O(2,1,1E3,h));var p=k.Sg,n=null,t=null,v=!1,y=!1,x;return $e(Ve(d)).na(function(){if(a.i)return Ye();x=Date.now();var w=m(c.uris[e],c,b,function(A,G,E){n&&n.stop();t&&t.S(C/1E3);a.l&&b==rf&&(a.l(A,G),l=!0,g.g=E)},function(A){a.j&&a.j(A,c,b);y=!0});
|
|
172
|
+
if(!p)return w;var D=c.retryParameters.connectionTimeout;D&&(n=new P(function(){v=!0;w.abort()}),n.S(D/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new P(function(){v=!0;w.abort()}));return w}).na(function(w){n&&n.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var D={response:w,Eg:l};!y&&a.j&&a.j(w.headers,c,b);return D},function(w){n&&n.stop();t&&t.stop();if(a.B){var D=null,C=0;w instanceof O&&(D=w,1001==w.code&&(C=w.data[1]));a.B(c,D,C,v)}if(a.i)return Ye();v&&(w=new O(1,1,1003,
|
|
173
|
+
c.uris[e],b));if(w instanceof O){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new L("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,pf(a,b,c,d,e,w,g)}throw w;})}
|
|
174
|
+
function qf(a,b,c){var d=Ze(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Qd:e.Qd},f=a.next())e.Qd=f.value,d=d.na(function(g){return function(){var h=c.response;h.data&&(h.data=Gc(h.data));return g.Qd(b,h)}}(e));return d.na(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);})}J("shaka.net.NetworkingEngine",gf);gf.prototype.request=gf.prototype.request;gf.prototype.destroy=gf.prototype.destroy;gf.makeRequest=lf;
|
|
175
|
+
gf.defaultRetryParameters=function(){return Ue()};gf.prototype.clearAllResponseFilters=gf.prototype.Uf;gf.prototype.unregisterResponseFilter=gf.prototype.kh;gf.prototype.registerResponseFilter=gf.prototype.Ug;gf.prototype.clearAllRequestFilters=gf.prototype.Tf;gf.prototype.unregisterRequestFilter=gf.prototype.jh;gf.prototype.registerRequestFilter=gf.prototype.Tg;gf.unregisterScheme=function(a){delete kf[a]};gf.registerScheme=hf;gf.prototype.setForceHTTPS=gf.prototype.Be;function mf(){this.g=0}
|
|
176
|
+
gf.NumBytesRemainingClass=mf;function nf(a,b,c){We.call(this,a,b);this.h=c}qa(nf,We);gf.PendingRequest=nf;var rf=1;gf.RequestType={MANIFEST:0,SEGMENT:rf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var jf=3;gf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:jf};var kf={};function sf(a){this.g=!1;this.h=new Mc;this.i=a}sf.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 tf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function uf(){this.g=new cb}q=uf.prototype;q.release=function(){this.Pc();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new vf(a,b,c,d),this.g.push(b,a))};q.Fa=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=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.nc(),this.g.remove(b,e))}};
|
|
177
|
+
q.Pc=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};J("shaka.util.EventManager",uf);uf.prototype.removeAll=uf.prototype.Pc;uf.prototype.unlisten=uf.prototype.nc;uf.prototype.listenOnce=uf.prototype.Fa;uf.prototype.listen=uf.prototype.o;uf.prototype.release=uf.prototype.release;function vf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=wf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
178
|
+
vf.prototype.nc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function wf(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 xf(a)?b:b.capture||!1}
|
|
179
|
+
function xf(a){var b=yf;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}yf=b}return b||!1}var yf=void 0;function zf(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 Af(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Bf(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 Cf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.B=null;this.ba=this.$=!1;this.J=0;this.g=null;this.A=new uf;this.i=new Map;this.F=[];this.C=new Mc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ea=new Map;this.ua=new Map;this.U=new P(function(){return Df(c)});this.N=!1;this.K=[];this.P=!1;this.aa=(new P(function(){Ef(c)})).ka(b);this.C["catch"](function(){});this.j=new sf(function(){return Ff(c)});this.X=!1;this.H=null}q=Cf.prototype;q.destroy=function(){return this.j.destroy()};
|
|
180
|
+
function Ff(a){return I(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.aa.stop(),a.aa=null,a.U.stop(),a.U=null,u(b,Gf(a),2);case 2:if(!a.l){b.D(3);break}B(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,a.H=null,z(b)}})}q.configure=function(a){this.h=a};function Hf(a,b,c){a.ba=!0;a.F=[];a.N=c;return If(a,b)}
|
|
181
|
+
function Jf(a,b,c){a.F=c;a.N=0<c.length;return If(a,b)}function Kf(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Lf(a,g,[])}
|
|
182
|
+
function If(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){if(1==x.g){if(c=Mf(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=zf(a.h.servers),Nf(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Of(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,Pf(t,zf(a.h.servers),zf(a.h.advanced||{}));return u(x,
|
|
183
|
+
ge(b,a.N,a.X),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.$=!0,x["return"](Promise.resolve());y=Lf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}function Qf(a){var b;return I(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c["return"]();if(!a.H){c.D(2);break}return u(c,a.H,3);case 3:return c["return"]();case 2:return B(c,4),a.H=a.l.setMediaKeys(a.B),u(c,a.H,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new O(2,6,6003,b.message));case 5:tf(a.j),z(c)}})}
|
|
184
|
+
function Rf(a,b){return I(function(c){if(1==c.g)return u(c,Qf(a),2);Sf(a,b.initDataType,Fc(b.initData));z(c)})}
|
|
185
|
+
q.yc=function(a){var b=this,c;return I(function(d){if(1==d.g){if(!b.B)return b.A.Fa(a,"encrypted",function(){b.m(new O(2,6,6010))}),d["return"]();b.l=a;b.A.Fa(b.l,"play",function(){for(var e=r(b.K),f=e.next();!f.done;f=e.next())Tf(b,f.value);b.P=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Gf(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||window.shakaMediaKeysPolyfill||b.F.length?u(d,
|
|
186
|
+
Qf(b),2):d.D(2)}Uf(b);c||b.F.length||b.A.o(b.l,"encrypted",function(e){return Rf(b,e)});z(d)})};
|
|
187
|
+
function Vf(a){var b,c,d,e,f;return I(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=lf([a.g.serverCertificateUri],a.h.retryParameters);B(g,3);c=a.G.Ob.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fc(d.data);va(g,4);break;case 3:throw e=F(g),new O(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
|
|
188
|
+
B(g,6);return u(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new O(2,6,6004,f.message);}})}function Wf(a,b){var c,d,e;return I(function(f){if(1==f.g)return u(f,Xf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.cb=new Mc,d.push(e.cb);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
|
|
189
|
+
function Uf(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Sf(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Xf(a,d.value);b.length||a.F.length||a.C.resolve();return a.C}function Sf(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Dc(c,e.value.initData)&&!Uc("Tizen 2"))return;Yf(a,b,c,a.g.sessionType)}}function Zf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
|
|
190
|
+
function $f(a){a=a.i.keys();a=fb(a,function(b){return b.sessionId});return Array.from(a)}q.Dc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.hd=function(){return Af(this.ua)};
|
|
191
|
+
function Lf(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=ag(a,c,d);x.D(2);break}return u(x,bg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new O(2,6,6001);tf(a.j);B(x,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.I.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var w=
|
|
192
|
+
f.keySystem;var D=d.get(f.keySystem);var C=[],A=[],G=[],E=[],H=new Set;cg(D,C,G,A,E,H);var N=a.N?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||N,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};D=r(D);for(C=D.next();!C.done;C=
|
|
193
|
+
D.next())C=C.value,C.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(w.persistentStateRequired=C.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),C=[],A=[],G=[],E=[],H=new Set,cg(w.drmInfos,C,G,A,E,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
|
|
194
|
+
w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,tf(a.j),a.B=v,a.$=!0,u(x,Vf(a),7);case 7:tf(a.j);va(x,0);break;case 4:y=F(x);tf(a.j,y);a.g=null;a.I.clear();if(y instanceof O)throw y;throw new O(2,6,6002,y.message);}})}
|
|
195
|
+
function ag(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Of(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new O(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Nd:d.Nd},e=a.next())for(d.Nd=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
195
196
|
l.Nd}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
196
|
-
function
|
|
197
|
-
|
|
198
|
-
function
|
|
197
|
+
function bg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,x;return I(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.D(4);break}k=h.value;if(!b.has(k)){w.D(3);break}l=b.get(k);B(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
198
|
+
w.h,w["return"](c);case 6:F(w);case 7:tf(a.j);case 3:h=g.next();w.D(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){w.D(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();w.D(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=n){w.D(13);break}B(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:F(w);case 16:tf(a.j);case 13:h=t.next();w.D(12);break;case 11:return w["return"](c)}})}
|
|
199
|
+
function Mf(a){a=zf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=od(f),h=od(e);g={kty:"oct",kid:md(g,!1),k:md(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fc(hd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
199
200
|
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
200
|
-
function
|
|
201
|
-
case 4:f=h.h;
|
|
202
|
-
function
|
|
201
|
+
function Xf(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(k):Tf(a,k)});a.A.o(c,"keystatuseschange",function(k){return dg(a,k)});e={initData:null,initDataType:null,loaded:!1,ke:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);B(h,2);return u(h,c.load(b),4);
|
|
202
|
+
case 4:f=h.h;tf(a.j);if(!f)return a.i["delete"](c),a.m(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;eg(a)&&a.C.resolve();return h["return"](c);case 2:g=F(h),tf(a.j,g),a.i["delete"](c),a.m(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
203
|
+
function Yf(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new O(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(f):Tf(a,f)});a.A.o(e,"keystatuseschange",function(f){return dg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,ke:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&md(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
203
204
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new O(2,6,6006,f.message,f,h))}})}
|
|
204
|
-
function
|
|
205
|
-
|
|
206
|
-
a.G.onEvent(
|
|
207
|
-
function
|
|
208
|
-
function
|
|
209
|
-
|
|
210
|
-
function
|
|
211
|
-
c],f=new Map,g=function(l){var m,n
|
|
212
|
-
function
|
|
213
|
-
function
|
|
214
|
-
function
|
|
205
|
+
function Tf(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;I(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&md(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=lf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
|
|
206
|
+
Zf(a.g.keySystem)&&fg(g),h=Date.now(),B(x,2),l=a.G.Ob.request(2,g),u(x,l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=F(x),p=new O(2,6,6007,m),a.m(p),d&&d.cb&&d.cb.reject(p),x["return"]();case 3:if(a.j.g)return x["return"]();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&md(k.data);B(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return n=F(x),t=new O(2,6,6008,n.message),a.m(t),d&&d.cb&&d.cb.reject(t),x["return"]();case 6:if(a.j.g)return x["return"]();v=new L("drmsessionupdate");
|
|
207
|
+
a.G.onEvent(v);d&&(d.cb&&d.cb.resolve(),y=new P(function(){d.loaded=!0;eg(a)&&a.C.resolve()}),y.S(gg));z(x)}})}
|
|
208
|
+
function fg(a){var b=fd(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=nd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
209
|
+
function dg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Zf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Ic(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),p=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,p,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=pd(h);a.ea.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),c.close()["catch"](function(){}));
|
|
210
|
+
eg(a)&&(a.C.resolve(),a.U.S(hg))}function Df(a){var b=a.ea,c=a.ua;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new O(2,6,6014));a.G.ud(Af(c))}
|
|
211
|
+
function ig(){var a,b,c,d,e,f,g,h;return I(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
|
|
212
|
+
c],f=new Map,g=function(l){var m,p,n;return I(function(t){switch(t.g){case 1:B(t,2);if("org.w3.clearkey"===l&&$c())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,Uc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:F(t),f.set(l,null),z(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](Af(f))})}
|
|
213
|
+
function jg(a){var b;return I(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).S(mg)}),B(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
|
|
214
|
+
function Gf(a){var b;return I(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return I(function(g){if(1==g.g)return B(g,2),a.ba||a.F.includes(e.sessionId)||"persistent-license"!==f.type?u(g,jg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
|
|
215
|
+
function ng(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={Ta:f.Ta},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ta=[];f.Ta=f.Ta.concat(e.initData||[]);f.Ta=f.Ta.concat(h.initData||[]);f.Ta=f.Ta.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ta.findIndex(function(p){return p.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
|
|
215
216
|
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,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
|
|
216
|
-
initData:f.Ta,keyIds:g});break}}return c}function
|
|
217
|
-
function
|
|
218
|
-
function
|
|
219
|
-
m.Wc;return
|
|
220
|
-
function
|
|
221
|
-
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var
|
|
222
|
-
function
|
|
223
|
-
|
|
224
|
-
q.
|
|
225
|
-
q.skip=function(a){if(this.g+a>this.W.byteLength)throw
|
|
226
|
-
|
|
227
|
-
q.wd=function(a,b,c,d){var e=b.oa();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.R(),g=b.R(),h=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.oa()+8>b.W.byteLength){this.g=!0;return}f=b.lc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==
|
|
228
|
-
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.oa(),b.W.byteLength-b.oa()))}};function
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
if(d)return a;if(0==g.length||!e)throw Za(
|
|
232
|
-
function
|
|
233
|
-
k.setUint32(b,a+1);return e}function
|
|
234
|
-
t||-1===
|
|
235
|
-
function
|
|
236
|
-
function
|
|
237
|
-
var
|
|
238
|
-
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),
|
|
239
|
-
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function
|
|
240
|
-
var
|
|
241
|
-
function
|
|
242
|
-
function
|
|
243
|
-
b=null;c=r(
|
|
244
|
-
b.skip(1),d=
|
|
245
|
-
function
|
|
246
|
-
var
|
|
247
|
-
function
|
|
248
|
-
function
|
|
249
|
-
d=1===(d&1);if(c.h!==
|
|
250
|
-
(e&246)&&32===(d&224))
|
|
251
|
-
0,h-1),
|
|
252
|
-
function
|
|
253
|
-
|
|
254
|
-
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&
|
|
255
|
-
function
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
(k.pb()&31)){var
|
|
259
|
-
|
|
260
|
-
function
|
|
261
|
-
;function
|
|
262
|
-
function
|
|
263
|
-
function
|
|
217
|
+
initData:f.Ta,keyIds:g});break}}return c}function Of(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Ef(a){a.i.forEach(function(b,c){var d=b.ke,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ke=e)})}function eg(a){a=a.i.values();return gb(a,function(b){return b.loaded})}
|
|
218
|
+
function Nf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",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)}
|
|
219
|
+
function cg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ha:g.Ha},h=a.next()){g.Ha=h.value;b.includes(g.Ha.licenseServerUri)||b.push(g.Ha.licenseServerUri);d.includes(g.Ha.serverCertificateUri)||d.push(g.Ha.serverCertificateUri);g.Ha.serverCertificate&&(c.some(function(m){return function(p){return Dc(p,m.Ha.serverCertificate)}}(g))||c.push(g.Ha.serverCertificate));if(g.Ha.initData){h={};for(var k=r(g.Ha.initData),l=k.next();!l.done;h={Wc:h.Wc},l=k.next())h.Wc=l.value,e.some(function(m){return function(p){var n=
|
|
220
|
+
m.Wc;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Dc(p.initData,n.initData)}}(h))||e.push(h.Wc)}if(g.Ha.keyIds)for(h=r(g.Ha.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
221
|
+
function Pf(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||
|
|
222
|
+
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var mg=1,gg=5,hg=.5,og=new Nc(function(){return Gc(new Uint8Array([0]))});function pg(){}function qg(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){if(d&&(e=rg[d.toLowerCase()]))return k["return"](e);if(f=sg(a))if(g=tg[f])return k["return"](g);return d?k.D(2):u(k,ug(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=rg[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
|
|
223
|
+
function ug(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=lf([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function sg(a){a=(new kb(a)).Ka.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}J("shaka.media.ManifestParser",pg);pg.unregisterParserByMime=function(a){delete rg[a]};pg.registerParserByMime=function(a,b){rg[a]=b};
|
|
224
|
+
pg.registerParserByExtension=function(a,b){tg[a]=b};var rg={},tg={};function vg(a,b){this.W=Ic(a);this.h=b==wg;this.g=0}q=vg.prototype;q.Da=function(){return this.g<this.W.byteLength};q.oa=function(){return this.g};q.kg=function(){return this.W.byteLength};q.pb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw xg();}};q.pe=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw xg();}};q.R=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw xg();}};
|
|
225
|
+
q.xf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw xg();}};q.lc=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw xg();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.W.byteLength)throw xg();var b=Fc(this.W,this.g,a);this.g+=a;return b};
|
|
226
|
+
q.skip=function(a){if(this.g+a>this.W.byteLength)throw xg();this.g+=a};q.ah=function(a){if(this.g<a)throw xg();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw xg();this.g=a};q.Oc=function(){for(var a=this.g;this.Da()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Fc(this.W,a,this.g-a);this.g+=1;return dd(a)};function xg(){return new O(2,3,3E3)}J("shaka.util.DataViewReader",vg);vg.prototype.readTerminatedString=vg.prototype.Oc;vg.prototype.seek=vg.prototype.seek;vg.prototype.rewind=vg.prototype.ah;
|
|
227
|
+
vg.prototype.skip=vg.prototype.skip;vg.prototype.readBytes=vg.prototype.Cb;vg.prototype.readUint64=vg.prototype.lc;vg.prototype.readInt32=vg.prototype.xf;vg.prototype.readUint32=vg.prototype.R;vg.prototype.readUint16=vg.prototype.pe;vg.prototype.readUint8=vg.prototype.pb;vg.prototype.getLength=vg.prototype.kg;vg.prototype.getPosition=vg.prototype.oa;vg.prototype.hasMoreData=vg.prototype.Da;var wg=1;vg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:wg};function yg(){this.i=[];this.h=[];this.g=!1}q=yg.prototype;q.box=function(a,b){var c=zg(a);this.i[c]=Ag;this.h[c]=b;return this};q.Y=function(a,b){var c=zg(a);this.i[c]=Bg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new vg(a,0);for(this.g=!1;a.Da()&&!this.g;)this.wd(0,a,b,c)};
|
|
228
|
+
q.wd=function(a,b,c,d){var e=b.oa();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.R(),g=b.R(),h=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.oa()+8>b.W.byteLength){this.g=!0;return}f=b.lc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Bg){if(d&&b.oa()+4>b.W.byteLength){this.g=!0;return}m=b.R();l=m>>>24;m&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.oa(),b=0<d?b.Cb(d):new Uint8Array(0),b=new vg(b,0),k({parser:this,partialOkay:c||
|
|
229
|
+
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.oa(),b.W.byteLength-b.oa()))}};function Cg(a){for(var b=Dg(a);a.reader.Da()&&!a.parser.g;)a.parser.wd(a.start+b,a.reader,a.partialOkay)}function Eg(a){for(var b=Dg(a),c=a.reader.R(),d=0;d<c&&(a.parser.wd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Fg(a){return function(b){a(b.reader.Cb(b.reader.W.byteLength-b.reader.oa()))}}
|
|
230
|
+
function zg(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Gg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Dg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}J("shaka.util.Mp4Parser",yg);yg.headerSize=Dg;yg.typeToString=Gg;yg.allData=Fg;yg.sampleDescription=Eg;yg.children=Cg;yg.prototype.parseNext=yg.prototype.wd;yg.prototype.parse=yg.prototype.parse;yg.prototype.stop=yg.prototype.stop;
|
|
231
|
+
yg.prototype.fullBox=yg.prototype.Y;yg.prototype.box=yg.prototype.box;var Ag=0,Bg=1;function Hg(a){function b(){d=!0}function c(l){f.push(l);Cg(l)}a=Fc(a);var d=!1,e,f=[],g=[];(new yg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).Y("stsd",function(l){e=l;f.push(l);Eg(l)}).Y("encv",b).Y("enca",b).Y("avc1",function(l){g.push({box:l,Mc:1701733238})}).Y("avc3",function(l){g.push({box:l,Mc:1701733238})}).Y("ac-3",function(l){g.push({box:l,Mc:1701733217})}).Y("ec-3",function(l){g.push({box:l,Mc:1701733217})}).Y("mp4a",function(l){g.push({box:l,Mc:1701733217})}).parse(a);
|
|
232
|
+
if(d)return a;if(0==g.length||!e)throw Za(pd(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=Ig(a,e,k.box,f,k.Mc);return a}
|
|
233
|
+
function Ig(a,b,c,d,e){var f=Jg.value(),g=a.subarray(c.start,c.start+c.size),h=Ic(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ic(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Kg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Tc()?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,Kg(e,d.start,d.size+k.byteLength);k=Ic(e,b.start);b=Dg(b);a=k.getUint32(b);
|
|
234
|
+
k.setUint32(b,a+1);return e}function Kg(a,b,c){a=Ic(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 Jg=new Nc(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 Lg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=Mg(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],t=-1,v=-1,y=0;y<n.length;y++)if(null!=n[y]&&""!==n[y].g.trim()){t=y;break}for(y=n.length-1;0<=y;y--)if(null!=n[y]&&""!==n[y].g.trim()){v=y;break}if(-1===
|
|
235
|
+
t||-1===v)n=Ng(d,e),a.nestedCues.push(n);else{for(;t<=v;t++)if(y=n[t]){var x=y.l,w=y.i,D=y.j,C=y.h;if(x!=h||w!=k||D!=l||C!=m)p.payload&&a.nestedCues.push(p),p=Mg(d,e,x,w,D,C),h=x,k=w,l=D,m=C;p.payload+=y.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=Ng(d,e),a.nestedCues.push(p));p=Mg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
236
|
+
function Mg(a,b,c,d,e,f){a=new fc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Ng(a,b){var c=new fc(a,b,"");c.lineBreak=!0;return c}function Og(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Pg(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.A="black";Qg(this)}function Rg(a,b,c){return Lg(new fc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function Qg(a){Sg(a,0,15);a.g=1}function Tg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Ug:d=Vg.has(c)?Vg.get(c):String.fromCharCode(c);break;case Wg:d=Xg.get(c);break;case Yg:a.i[a.g].pop();d=Zg.get(c);break;case $g:a.i[a.g].pop(),d=ah.get(c)}d&&a.i[a.g].push(new Og(d,a.m,a.j,a.A,a.l))}}
|
|
237
|
+
function bh(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Sg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
238
|
+
var Ug=0,Wg=1,Yg=2,$g=3,Vg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Xg=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Zg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
|
|
239
|
+
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),ah=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
240
|
+
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function ch(a,b){this.h=dh;this.A=new Pg(a,b);this.i=new Pg(a,b);this.l=new Pg(a,b);this.g=this.i;this.j=0;this.m=null}function eh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==fh&&a.h!==gh&&(e=Rg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Sg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Sg(c,0,15),d.g=15);a.h=fh;d.h=b;return e}function hh(a){a.h=ih;a.g=a.l;a.g.h=0}function jh(a){Ua("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=gh}
|
|
241
|
+
var dh=0,ih=1,fh=3,gh=4,kh="black green blue cyan red yellow magenta black".split(" "),lh="white green blue cyan red yellow magenta white_italics".split(" ");function mh(){this.l=!1;this.F=this.H=0;this.G=nh;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.m="black";oh(this)}function oh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(ph())}function ph(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function qh(a,b){rh(a)&&(a.i[a.h][a.g]=new Og(b,a.C,a.A,a.m,a.B),a.g++)}function rh(a){var b=a.g<a.F&&0<=a.g;return a.h<a.H&&0<=a.h&&b}mh.prototype.isVisible=function(){return this.l};
|
|
242
|
+
function sh(a,b,c){var d=new fc(a.j,b,"");d.textAlign=a.G===th?"left":a.G===uh?"right":jc;if(c=Lg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var th=0,uh=1,nh=2;function vh(){this.i=[];this.h=null;this.g=0}function wh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new xh(a.h)),a.h=null,a.g=0))}function xh(a){this.g=0;this.h=a}xh.prototype.Da=function(){return this.g<this.h.length};xh.prototype.oa=function(){return this.g};function yh(a){if(!a.Da())throw new O(2,2,3E3);return a.h[a.g++]}xh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function zh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
243
|
+
function Ah(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=yh(b).value;b=null;c=r(Bh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=sh(e,d,a.i)),oh(e);return b}if(137===c)for(b=yh(b).value,b=r(Bh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=yh(b).value;b=null;c=r(Bh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=sh(e,d,a.i)),e.l=!1;return b}if(139===c){c=yh(b).value;
|
|
244
|
+
b=null;c=r(Bh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=sh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=yh(b).value,Ch(a,b,d);if(143===c)return d=Ch(a,255,d),Dh(a),d;if(144===c)b.skip(1),d=yh(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=yh(b).value,c=yh(b).value,b.skip(1),a.g&&(b=Eh((c&48)>>4,(c&12)>>2,c&3),a.g.B=Eh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=yh(b).value,b=yh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
245
|
+
b.skip(1),d=yh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new mh;f.j=d;a.h[c]=f}d=yh(b).value;yh(b);yh(b);f=yh(b).value;var g=yh(b).value;b=yh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function Bh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
|
|
246
|
+
function Ch(a,b,c){var d=null;b=r(Bh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=sh(f,c,a.i));a.h[e]=null}return d}function Dh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Eh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Fh[a<<2|b<<1|c]}
|
|
247
|
+
var Gh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Fh="black blue green cyan red magenta yellow white".split(" ");function Hh(){this.h=[];this.g=[];this.i=new vh;this.l=0;this.B=new Map([["CC1",new ch(0,0)],["CC2",new ch(0,1)],["CC3",new ch(1,0)],["CC4",new ch(1,1)]]);this.A=this.m=0;this.j=new Map;Ih(this)}function Ih(a){a.m=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Qg(b.i),Qg(b.l),Qg(b.A)}
|
|
248
|
+
function Jh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=Kh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())wh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Lh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
|
|
249
|
+
function Kh(a,b){var c=b.type;if(16===(b.Oa&112)){var d=b.Oa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Oa&&255===b.jb||!b.Oa&&!b.jb||!Mh(b.Oa)||!Mh(b.jb))return 45<=++a.l&&Ih(a),null;a.l=0;b.Oa&=127;b.jb&=127;if(!b.Oa&&!b.jb)return null;d=null;if(16===(b.Oa&112))a:{var e=b.Oa;d=b.jb;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=lh[f]:7===f&&(h=!0);
|
|
250
|
+
d=1===(d&1);if(c.h!==gh){f=c.g;if(c.h===fh&&e!==f.g){var k=1+e-f.h;bh(f,k,1+f.g-f.h,f.h);Sg(f,0,k-1);Sg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Tg(c.g,Ug,32),g=!1,e=lh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=kh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))Tg(c.g,Wg,d);else if(18===
|
|
251
|
+
(e&246)&&32===(d&224))Tg(c.g,e&1?$g:Yg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.jb){case 32:hh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=eh(c,2,d);break;case 38:e=eh(c,3,d);break;case 39:e=eh(c,4,d);break;case 40:Tg(c.g,Ug,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Qg(c.A);jh(c);break;case 43:jh(c);break;case 44:e=c.i;g=null;c.h!==gh&&(g=Rg(e,c.j,d));Sg(e,0,15);e=g;break;case 45:e=c.g;c.h!==fh?e=null:(g=Rg(e,c.j,d),h=e.g-e.h+1,bh(e,h-1,h,e.h),Sg(e,
|
|
252
|
+
0,h-1),Sg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Sg(c.l,0,15);break;case 47:e=null,c.h!==gh&&(e=Rg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,hh(c),c.j=d}d=e;break a}d=null}else e=b.jb,Tg(c.g,Ug,b.Oa),Tg(c.g,Ug,e);return d}
|
|
253
|
+
function Lh(a,b){var c=[];try{for(;b.Da();){var d=yh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=yh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new zh(e));for(var g=a.j.get(e),h=b.oa();b.oa()-h<f;){e=b;var k=yh(e),l=k.value,m=k.pts;if(16===l){var p=yh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!rh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=sh(t,n,g.i));if(t.h+1>=t.H){n=t;for(var v=0,y=1;15>y;y++,
|
|
254
|
+
v++)n.i[v]=n.i[y];for(y=0;1>y;y++,v++)n.i[v]=ph()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=sh(t,n,g.i));t.i[t.h]=ph();t.g=0;break;case 12:t.isVisible()&&(e=sh(t,n,g.i)),oh(t),n=t,n.h=0,n.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Ah(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?qh(g.g,"\u266a"):qh(g.g,
|
|
255
|
+
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&qh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Gh.has(e)){var w=Gh.get(e);qh(g.g,w)}else qh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?qh(g.g,"_"):qh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof O&&3E3===D.code)Ua("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Mh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Nh(a,b){var c=null,d=null,e=a.R();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:e,ef:c,Wf:d}}function Oh(a,b){return{Ue:1==b?a.lc():a.R()}}function Ph(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
|
|
256
|
+
function Qh(a,b,c){var d=a.R(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={ue:null,sampleSize:null,zd:null};c&256&&(g.ue=a.R());c&512&&(g.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(g.zd=0==b?a.R():a.xf());e.push(g)}return{Ri:d,zf:e}};function Rh(){this.i=new Map;this.h=this.g=0}
|
|
257
|
+
Rh.prototype.init=function(a){var b=this,c=[],d=[];(new yg).box("moov",Cg).box("mvex",Cg).Y("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.R();f=f.R();b.g=e;b.h=f}).box("trak",Cg).Y("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.R();c.push(e)}).box("mdia",Cg).Y("mdhd",function(e){e=Ph(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new O(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
258
|
+
Rh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new yg).box("moof",Cg).box("traf",Cg).Y("trun",function(k){f=Qh(k.reader,k.version,k.flags).zf}).Y("tfhd",function(k){k=Nh(k.reader,k.flags);d=k.ef||b.g;e=k.Wf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).Y("tfdt",function(k){g=Oh(k.reader,k.version).Ue}).box("mdat",function(k){if(null===g)throw new O(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,t=f,v=0,y=n;for(t.length&&(y=t[0].sampleSize||n);k.Da();){var x=k.R();if(6==
|
|
259
|
+
(k.pb()&31)){var w=0;t.length>v&&(w=t[v].zd||0);w=(l+w)/m;for(var D=[],C,A=k.Cb(x-1),G=C=0;G<A.length;)2==C&&3==A[G]?(C=0,A=[].concat(ia(A)),A.splice(G,1),A=new Uint8Array(A)):0==A[G]?C++:C=0,G++;C=A;for(G=0;G<C.length;){for(A=0;255==C[G];)A+=255,G++;A+=C[G++];for(var E=0;255==C[G];)E+=255,G++;E+=C[G++];4==A&&D.push(C.subarray(G,G+E));G+=E}D=r(D);for(C=D.next();!C.done;C=D.next())c.push({Qg:C.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=t.length>v?l+(t[v].ue||p):l+p,v++,y=t.length>
|
|
260
|
+
v?t[v].sampleSize||n:n)}}).parse(a,!1);return c};function Sh(){this.h=new Rh;this.g=new Hh}Sh.prototype.init=function(a){this.h.init(a)};
|
|
261
|
+
function Th(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fc(e.Qg);if(0<f.length&&(d=a.g,e=e.pts,f=new vg(f,0),181===f.pb()&&49===f.pe()&&1195456820===f.R()&&3===f.pb())){var g=f.pb();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.pb(),l=(k&4)>>2,m=f.pb(),p=f.pb();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Oa:m,jb:p,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:p,order:d.g.length})))}}}}return Jh(a.g)}
|
|
262
|
+
;function Uh(a,b,c,d){this.Pa=a;this.Sa=b;this.Ca=c;this.fe=void 0===d?null:d}Uh.prototype.Gc=function(){return this.Sa};Uh.prototype.Cc=function(){return this.Ca};function Vh(a,b){return a&&b?a.Gc()==b.Gc()&&a.Cc()==b.Cc()&&ec(a.Pa(),b.Pa()):a==b}J("shaka.media.InitSegmentReference",Uh);Uh.prototype.getEndByte=Uh.prototype.Cc;Uh.prototype.getStartByte=Uh.prototype.Gc;
|
|
263
|
+
function Wh(a,b,c,d,e,f,g,h,k,l,m,p,n,t){l=void 0===l?[]:l;t=void 0===t?Xh:t;this.startTime=a;this.j=this.endTime=b;this.m=c;this.Sa=d;this.Ca=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.l=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t}q=Wh.prototype;q.Pa=function(){return this.m()};q.getStartTime=function(){return this.startTime};q.ig=function(){return this.endTime};q.Gc=function(){return this.Sa};
|
|
264
|
+
q.Cc=function(){return this.Ca};q.Bg=function(){return this.tilesLayout};q.Ag=function(){return this.l};q.Wd=function(){return this.status};q.Kg=function(){this.status=Yh};J("shaka.media.SegmentReference",Wh);Wh.prototype.markAsUnavailable=Wh.prototype.Kg;Wh.prototype.getStatus=Wh.prototype.Wd;Wh.prototype.getTileDuration=Wh.prototype.Ag;Wh.prototype.getTilesLayout=Wh.prototype.Bg;Wh.prototype.getEndByte=Wh.prototype.Cc;Wh.prototype.getStartByte=Wh.prototype.Gc;Wh.prototype.getEndTime=Wh.prototype.ig;
|
|
265
|
+
Wh.prototype.getStartTime=Wh.prototype.getStartTime;Wh.prototype.getUris=Wh.prototype.Pa;var Xh=0,Yh=1;Wh.Status={uh:Xh,Hi:Yh,Uh:2};function Zh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function $h(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ai(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
|
|
266
|
+
function bi(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(ci(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function di(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=ci(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function ci(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function ei(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.N={};this.K={};this.g=null;this.H=!1;this.U=d||function(){};this.i={};this.A=new uf;this.C={};this.F=b;this.I=new Mc;this.l=fi(this,this.I);this.G=new sf(function(){return gi(e)});this.J="";this.B=!1;this.P=new Mc}function fi(a,b){var c=new MediaSource;a.A.Fa(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=hi(c);a.j.src=a.J;return c}q=ei.prototype;q.destroy=function(){return this.G.destroy()};
|
|
267
|
+
function gi(a){var b,c,d,e,f,g,h,k;return I(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Ab)),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.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.C)b.push(a.C[k].destroy());return u(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.C={};a.F=null;a.i=
|
|
264
268
|
{};z(l)})}
|
|
265
|
-
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return I(function(
|
|
266
|
-
function(
|
|
267
|
-
function
|
|
268
|
-
function
|
|
269
|
-
a.U(
|
|
270
|
-
D[1],
|
|
271
|
-
q.remove=function(a,b,c){var d=this,e;return I(function(f){e=Ib;return a==e.ha?u(f,d.g.remove(b,c),0):u(f,
|
|
272
|
-
function
|
|
273
|
-
|
|
274
|
-
function
|
|
275
|
-
function
|
|
276
|
-
function
|
|
277
|
-
function
|
|
278
|
-
q.
|
|
279
|
-
|
|
280
|
-
q.
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
function
|
|
286
|
-
.
|
|
287
|
-
function
|
|
288
|
-
|
|
289
|
-
function
|
|
290
|
-
|
|
291
|
-
Pi.prototype.G=function(){this.j.ke()};function Ui(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ri(a,b){var c=Math.max(a.H,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.cc(),f=a.g.kb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Fc(c),k=a.g.Fc(d);c=a.g.Fc(c+d);return b>=g?Ui(a,b):b>f?f:b<e?Th(a.i.buffered,k)?k:c:b>=h||Th(a.i.buffered,b)?b:c}function Ti(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.kb();return b>c?c:b}
|
|
292
|
-
function Qi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new zi(new Ci(a),b.stallThreshold);Bi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Vi(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=Vi.prototype;q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.Kg=function(){this.i=!0};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]};
|
|
269
|
+
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return I(function(p){if(1==p.g)return e=Ib,u(p,d.I,2);d.B=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ga:f.Ga},h=g.next())f.Ga=h.value,k=a.get(f.Ga),l=xd(k.mimeType,k.codecs),f.Ga==e.ha?ii(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!sd(l,f.Ga)||(d.C[f.Ga]=new rd,l=ud(f.Ga,l)),m=d.l.addSourceBuffer(l),d.A.o(m,"error",function(n){return function(){d.i[n.Ga][0].p.reject(new O(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.A.o(m,"updateend",
|
|
270
|
+
function(n){return function(){return ji(d,n.Ga)}}(f)),d.h[f.Ga]=m,d.N[f.Ga]=l,d.i[f.Ga]=[],d.K[f.Ga]=!!k.drmInfos.length);z(p)})};function ii(a,b,c){a.g||(a.g=new Cd(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Hd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Ta('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function ki(a){return a.l?"ended"==a.l.readyState:!0}function li(a,b){return b==Hb?a.g.g:Zh(mi(a,b))}
|
|
271
|
+
function ni(a,b){return b==Hb?a.g.h:$h(mi(a,b))}function oi(a,b,c){if(b==Hb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=mi(a,b);return bi(a,c)}q.yb=function(){var a={total:ci(this.j.buffered),audio:ci(mi(this,"audio")),video:ci(mi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function mi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
272
|
+
function pi(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G;return I(function(E){switch(E.g){case 1:g=Ib;if(b!=g.ha){E.D(2);break}if(!a.B){E.D(3);break}return u(E,a.P,4);case 4:h=E.h,a.g.B=h;case 3:return u(E,Id(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return E["return"]();case 2:if(!a.C[b]){e&&(a.g||ii(a,"text/vtt",a.B),d?(k=Th(a.F,c),k.length&&(l=a.h[g.Ma].timestampOffset,Nd(a.g,k,d.startTime,d.endTime,l))):a.F.init(c));E.D(6);break}return u(E,vd(a.C[b],c),7);case 7:m=E.h,a.g||ii(a,
|
|
273
|
+
"text/vtt",a.B),m.metadata&&(p=a.h[b].timestampOffset,a.U(m.metadata,p,d?d.endTime:null)),m.captions&&m.captions.length&&(n=a.h[g.Ma].timestampOffset,t=Ld(m.captions),Nd(a.g,t,d?d.startTime:null,d?d.endTime:null,n)),c=m.data;case 6:c=qi(a,c,d?d.startTime:null,b);v=a.h[b];y=ri;if(!a.B||v.mode==y||!d){E.D(8);break}x=b==g.Ma||!(g.Ma in a.h);if(!x){E.D(9);break}w=[v.appendWindowStart,v.appendWindowEnd];v.appendWindowStart=0;v.appendWindowEnd=Infinity;D=v.timestampOffset;v.timestampOffset=0;return u(E,
|
|
274
|
+
si(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return v.timestampOffset=D,v.appendWindowStart=w[0],v.appendWindowEnd=w[1],C=Zh(mi(a,b)),A=(d.startTime||0)-(C||0),a.P.resolve(A),u(E,si(a,b,function(){return ti(a,b,0,a.l.duration)}),9);case 9:v.mode=y;case 8:return d&&a.B&&b!=g.ha&&f&&(G=d.startTime,si(a,b,function(){var H=G;0>H&&(H+=.001);a.h[b].timestampOffset=H;ji(a,b)})),u(E,si(a,b,function(){a.h[b].appendBuffer(c)}),12);case 12:z(E)}})}
|
|
275
|
+
function ui(a,b){var c=ni(a,"video")||0;Kd(a.g,b,c)}function vi(a){a.g&&Kd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return I(function(f){e=Ib;return a==e.ha?u(f,d.g.remove(b,c),0):u(f,si(d,a,function(){return ti(d,a,b,c)}),0)})};function wi(a,b){var c;return I(function(d){c=Ib;return b==c.ha?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,si(a,b,function(){return ti(a,b,0,a.l.duration)}),0)})}
|
|
276
|
+
q.flush=function(a){var b=this,c;return I(function(d){c=Ib;return a==c.ha?d["return"]():u(d,si(b,a,function(){b.j.currentTime-=.001;ji(b,a)}),0)})};
|
|
277
|
+
function xi(a,b,c,d,e,f){var g;return I(function(h){g=Ib;return b==g.ha?(f||(a.g.B=c),Jd(a.g,d,e),h["return"]()):u(h,Promise.all([si(a,b,function(){var k=a.h[b].appendWindowStart,l=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=k;a.h[b].appendWindowEnd=l;ji(a,b)}),f?Promise.resolve():si(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;ji(a,b)}),si(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;ji(a,b)})]),0)})}
|
|
278
|
+
q.endOfStream=function(a){var b=this;return I(function(c){return u(c,yi(b,function(){ki(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.bb=function(a){var b=this;return I(function(c){return u(c,yi(b,function(){b.l.duration=a}),0)})};q.getDuration=function(){return this.l.duration};function ti(a,b,c,d){d<=c?ji(a,b):a.h[b].remove(c,d)}function ji(a,b){var c=a.i[b][0];c&&(c.p.resolve(),zi(a,b))}
|
|
279
|
+
function si(a,b,c){tf(a.G);c={start:c,p:new Mc};a.i[b].push(c);1==a.i[b].length&&Ai(a,b);return c.p}
|
|
280
|
+
function yi(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:tf(a.G);c=[];d={};for(e in a.h)d.vc=new Mc,f={start:function(l){return function(){return l.vc.resolve()}}(d),p:d.vc},a.i[e].push(f),c.push(d.vc),1==a.i[e].length&&f.start(),d={vc:d.vc};B(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.h)zi(a,h)}z(k)}})}function zi(a,b){a.i[b].shift();Ai(a,b)}
|
|
281
|
+
function Ai(a,b){var c=a.i[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)),zi(a,b)}}function qi(a,b,c,d){var e=a.K[d];null==c&&e&&(Vc()||Tc())&&"mp4"==a.N[d].split(";")[0].split("/")[1]&&(b=Hg(b));return b}var hi=window.URL.createObjectURL,ri="sequence",Bi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Q(a,b,c){this.l=a;this.xd=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=Q.prototype;q.getDuration=function(){return this.i};q.qg=function(){return this.g};q.bb=function(a){this.i=a};q.vg=function(){return this.l};q.Bf=function(a){this.A=a};q.Tc=function(a){this.B=a};q.Fe=function(a){this.m=a};q.hh=function(a){this.xd=a};q.hg=function(){return this.xd};
|
|
282
|
+
q.ic=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.je(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.ce=function(){this.H=!0};q.je=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.ie=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
|
|
283
|
+
q.T=function(){return Infinity==this.i&&!this.B};q.Lb=function(){return Infinity!=this.i&&!this.B};q.mb=function(){return Math.max(this.C,this.Ib()-this.m)};q.Ef=function(a){this.C=a};q.Ib=function(){return this.T()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Fc=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ib()-this.m+a,this.kb()))};q.cc=function(){return this.Fc(0)};
|
|
284
|
+
q.kb=function(){return Math.max(0,this.Ib()-(this.T()||this.Lb()?this.xd:0))};q.If=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Af=function(a){this.G=a};J("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Af;Q.prototype.usingPresentationStartTime=Q.prototype.If;Q.prototype.getSeekRangeEnd=Q.prototype.kb;Q.prototype.getSeekRangeStart=Q.prototype.cc;Q.prototype.getSafeSeekRangeStart=Q.prototype.Fc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Ib;
|
|
285
|
+
Q.prototype.setUserSeekStart=Q.prototype.Ef;Q.prototype.getSegmentAvailabilityStart=Q.prototype.mb;Q.prototype.isInProgress=Q.prototype.Lb;Q.prototype.isLive=Q.prototype.T;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.ie;Q.prototype.notifyMinSegmentStartTime=Q.prototype.je;Q.prototype.lockStartTime=Q.prototype.ce;Q.prototype.notifySegments=Q.prototype.ic;Q.prototype.getDelay=Q.prototype.hg;Q.prototype.setDelay=Q.prototype.hh;
|
|
286
|
+
Q.prototype.setSegmentAvailabilityDuration=Q.prototype.Fe;Q.prototype.setStatic=Q.prototype.Tc;Q.prototype.setClockOffset=Q.prototype.Bf;Q.prototype.getPresentationStartTime=Q.prototype.vg;Q.prototype.setDuration=Q.prototype.bb;Q.prototype.getMaxSegmentDuration=Q.prototype.qg;Q.prototype.getDuration=Q.prototype.getDuration;function Ci(a,b){this.j=a;this.m=Di(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}Ci.prototype.release=function(){this.j=null;this.i=function(){}};function Ei(a,b){a.i=b}function Fi(a){this.g=a}function Di(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(ci(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 Gi(a,b,c,d){var e=this;this.g=a;this.A=b;this.C=c;this.i=new uf;this.m=!1;this.B=a.readyState;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return Hi(e)});this.j=(new P(function(){Hi(e)})).ka(.25)}Gi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.A=null};Gi.prototype.le=function(){this.l=!0;Hi(this)};
|
|
287
|
+
function Hi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Di(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.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=di(c,b,a.C.gapDetectionThreshold),null==d||0==d&&!a.l||(e=c.start(d),e>=a.A.kb()||
|
|
288
|
+
.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e)))}}};function Ii(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ji.value().get(b),c.Fa(a,b,d))}var Ji=new Nc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ki(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new uf;this.i=new Li(a);Ii(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Mi(d,d.j)})}Ki.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 Ni(a){return a.m?a.g.currentTime:a.j}function Oi(a,b){0<a.g.readyState?Pi(a.i,b):Ii(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Mi(a,a.j)})}
|
|
289
|
+
function Mi(a,b){.001>Math.abs(a.g.currentTime-b)?Qi(a):(a.h.Fa(a.g,"seeking",function(){Qi(a)}),Pi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Qi(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Li(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Li.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
290
|
+
function Pi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function Ri(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.Fa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new uf;Ii(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Ri.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Ri.prototype.A=function(a){this.h=this.j?this.h:a};Ri.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Ri.prototype.G=function(){};
|
|
291
|
+
function Si(a,b,c,d,e){var f=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.l=c;this.F=e;this.C=null;this.j=new Gi(a,b.presentationTimeline,c,Ti(a,c));this.h=new Ki(a,function(){a:{var g=f.j;g.m=!0;g.l=!1;var h=Ni(f.h);g=Ui(f,h);if(.001<Math.abs(g-h)&&(h=Date.now()/1E3,!f.C||f.C<h-1)){f.C=h;Oi(f.h,g);g=void 0;break a}f.F();g=void 0}return g},Vi(this,d));this.B=(new P(function(){if(0!=f.i.readyState&&!f.i.paused){var g=Ni(f.h),h=f.g.cc(),k=f.g.kb();3>k-h&&(h=k-3);g<h&&(g=
|
|
292
|
+
Ui(f,g),f.i.currentTime=g)}})).ka(.25)}Si.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.B&&(this.B.stop(),this.B=null);this.i=this.h=this.g=this.l=null;this.F=function(){}};Si.prototype.A=function(a){Oi(this.h,a)};Si.prototype.m=function(){var a=Ni(this.h);return 0<this.i.readyState&&!this.i.paused?Wi(this,a):a};function Vi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.kb():0>b&&(b=a.g.kb()+b);return Xi(a,Wi(a,b))}
|
|
293
|
+
Si.prototype.G=function(){this.j.le()};function Xi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ui(a,b){var c=Math.max(a.H,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.cc(),f=a.g.kb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Fc(c),k=a.g.Fc(d);c=a.g.Fc(c+d);return b>=g?Xi(a,b):b>f?f:b<e?ai(a.i.buffered,k)?k:c:b>=h||ai(a.i.buffered,b)?b:c}function Wi(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.kb();return b>c?c:b}
|
|
294
|
+
function Ti(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Ci(new Fi(a),b.stallThreshold);Ei(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Yi(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=Yi.prototype;q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.Lg=function(){this.i=!0};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]};
|
|
293
295
|
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.j+=a;c=r(c.h);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};q.Lc=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,ia(a)))};q.hc=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.Lc(a);this.Gb(b)};
|
|
294
296
|
q.Gb=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}};
|
|
295
|
-
q.xb=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
|
|
296
|
-
q.Cd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.M.push.apply(c.M,ia(d)):(c.g.stop(),c.g=null)}),this.g.ka(a))};
|
|
297
|
-
function
|
|
298
|
-
|
|
299
|
-
J("shaka.media.SegmentIterator",
|
|
300
|
-
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.Lc=function(){};q.Gb=function(){};q.hc=function(){};q.xb=function(){};q.Cd=function(){};J("shaka.media.MetaSegmentIndex",
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.
|
|
304
|
-
function(c){b.g["delete"](c.region)})}qa(
|
|
305
|
-
function
|
|
306
|
-
|
|
307
|
-
function
|
|
308
|
-
function
|
|
309
|
-
function
|
|
310
|
-
function
|
|
297
|
+
q.xb=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 Wh(a.startTime,b,a.m,a.Sa,a.Ca,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.l,a.g))}};
|
|
298
|
+
q.Cd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.M.push.apply(c.M,ia(d)):(c.g.stop(),c.g=null)}),this.g.ka(a))};Yi.prototype[Symbol.iterator]=function(){return this.ac(0)};Yi.prototype.ac=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Zi(this,b,d)};
|
|
299
|
+
function $i(a,b,c){return new Yi([new Wh(a,a+b,function(){return c},0,null,null,a,a,a+b)])}J("shaka.media.SegmentIndex",Yi);Yi.forSingleSegment=$i;Yi.prototype.getIteratorForTime=Yi.prototype.ac;Yi.prototype.updateEvery=Yi.prototype.Cd;Yi.prototype.fit=Yi.prototype.xb;Yi.prototype.evict=Yi.prototype.Gb;Yi.prototype.mergeAndEvict=Yi.prototype.hc;Yi.prototype.offset=Yi.prototype.offset;Yi.prototype.get=Yi.prototype.get;Yi.prototype.find=Yi.prototype.find;Yi.prototype.markImmutable=Yi.prototype.Lg;
|
|
300
|
+
Yi.prototype.release=Yi.prototype.release;function Zi(a,b,c){this.i=a;this.h=b;this.g=c}Zi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Pa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Zi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Pa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};
|
|
301
|
+
J("shaka.media.SegmentIterator",Zi);Zi.prototype.next=Zi.prototype.next;Zi.prototype.current=Zi.prototype.current;function aj(){Yi.call(this,[]);this.j=[]}qa(aj,Yi);q=aj.prototype;q.clone=function(){var a=new aj;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};
|
|
302
|
+
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.Lc=function(){};q.Gb=function(){};q.hc=function(){};q.xb=function(){};q.Cd=function(){};J("shaka.media.MetaSegmentIndex",aj);aj.prototype.updateEvery=aj.prototype.Cd;aj.prototype.fit=aj.prototype.xb;aj.prototype.mergeAndEvict=aj.prototype.hc;aj.prototype.evict=aj.prototype.Gb;aj.prototype.merge=aj.prototype.Lc;
|
|
303
|
+
aj.prototype.offset=aj.prototype.offset;aj.prototype.get=aj.prototype.get;aj.prototype.find=aj.prototype.find;aj.prototype.release=aj.prototype.release;function bj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.kd();this.h=new P(function(){b.g.vf(.25*b.i)})}bj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};bj.prototype.set=function(a){this.i=a;cj(this)};bj.prototype.gd=function(){return this.g.gd()};function cj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.kd()!=b&&a.g.De(b);return}catch(c){}a.h.ka(.25);0!=a.g.kd()&&a.g.De(0)};function dj(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){ej(b,!1)})).ka(.25)}dj.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()};function ej(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function fj(a){eb.call(this);this.g=new Map;this.h=a}qa(fj,eb);fj.prototype.release=function(){this.g.clear();eb.prototype.release.call(this)};function gj(a,b){var c=a.g.get(b);c||(c={Nc:[],cf:null,contentType:b},a.g.set(b,c));return c}function hj(a,b,c){var d=gj(a,b.contentType);ij(a,d);a={fe:b,position:c};d=d.Nc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
304
|
+
fj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Nc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.fe;break a}}d=null}if(e=d)e=c.cf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
305
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.cf=d,JSON.stringify(d),c=new L("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ij(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Nc;b.Nc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Nc=[]};function jj(a){eb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new P(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new L("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ka(2)}qa(jj,eb);jj.prototype.release=function(){this.g.clear();this.h.stop();eb.prototype.release.call(this)};function kj(a){eb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Ub:null,Tb:lj,Kb:function(c,d){return mj(b,"enter",c,d)}},{Ub:nj,Tb:lj,Kb:function(c,d){return mj(b,"enter",c,d)}},{Ub:oj,Tb:lj,Kb:function(c,d){return mj(b,"enter",c,d)}},{Ub:lj,Tb:nj,Kb:function(c,d){return mj(b,"exit",c,d)}},{Ub:lj,Tb:oj,Kb:function(c,d){return mj(b,"exit",c,d)}},{Ub:nj,Tb:oj,Kb:function(c,d){return mj(b,"skip",c,d)}},{Ub:oj,Tb:nj,Kb:function(c,d){return mj(b,"skip",c,d)}}];this.h=new uf;this.h.o(this.i,"regionremove",
|
|
306
|
+
function(c){b.g["delete"](c.region)})}qa(kj,eb);kj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;eb.prototype.release.call(this)};kj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?nj:a>d.endTime?oj:lj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Ub==e&&h.Tb==f&&h.Kb(d,b)}};
|
|
307
|
+
function mj(a,b,c,d){b=new L(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var nj=1,lj=2,oj=3;function pj(a,b,c,d,e){a=lf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function qj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.A=this.l=null;this.h=new Map;this.F=!1;this.G=null;this.B=!1;this.j=new sf(function(){return rj(c)})}qj.prototype.destroy=function(){return this.j.destroy()};function rj(a){var b,c,d,e;return I(function(f){if(1==f.g){b=[];c=r(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,sj(e),b.push(tj(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;z(f)})}
|
|
308
|
+
qj.prototype.configure=function(a){this.i=a;this.G=new Te({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};qj.prototype.start=function(){var a=this;return I(function(b){if(1==b.g)return u(b,uj(a),2);tf(a.j);a.F=!0;z(b)})};
|
|
309
|
+
function vj(a,b){var c,d,e,f,g,h;I(function(k){switch(k.g){case 1:return c=Ib,B(k,2),u(k,wi(a.g.V,c.ha),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=xd(b.mimeType,b.codecs);ii(a.g.V,e,a.m.sequenceMode);f=a.g.V.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=wj(b),a.h.set(c.ha,h),xj(a,h,0);z(k)}})}function yj(a){var b=a.h.get(Hb);b&&(sj(b),tj(b)["catch"](function(){}),a.h["delete"](Hb));a.A=null}
|
|
310
|
+
function zj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Qb&&(Aj(a,e,!1,0,!1),c.Qb=d)}else if(d=c.Qb)c.Qb=null,Aj(a,d,!0,0,!1)}}function Bj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&Aj(a,b.video,c,d,e),b.audio&&Aj(a,b.audio,c,d,e))}function Cj(a,b){a.A=b;a.F&&Aj(a,b,!0,0,!1)}
|
|
311
|
+
function Aj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=Hb?f&&(f.Qb&&(b.trickModeVideo?(f.Qb=b,b=b.trickModeVideo):f.Qb=null),f.stream!=b||e)&&(b.type==Hb&&ii(a.g.V,xd(b.mimeType,b.codecs),a.m.sequenceMode),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.sa=null,c&&(f.zc?f.Fd=!0:f.ab?(f.Sb=!0,f.dd=d,f.Fd=!0):(sj(f),Dj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Ej(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):vj(a,b)}
|
|
312
|
+
function Ej(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.Ja)return e["return"]();c=b.stream;d=b.Ja;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ja!=d||b.stream!=c)return e["return"]();var f=a.g.jd();var g=ni(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Qa?b.Qa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Sa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.Ca?k.Ca-k.Sa:null)||0),k=a.g.getBandwidthEstimate(),
|
|
311
313
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Ja.h.g>h?!0:!1):f=!1;f&&b.Ja.abort();z(e)})}
|
|
312
|
-
|
|
313
|
-
function
|
|
314
|
-
function
|
|
315
|
-
a.h.has(k)||(m=
|
|
316
|
-
function
|
|
317
|
-
|
|
318
|
-
function
|
|
319
|
-
var g=Array.from(a.h.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,
|
|
320
|
-
function
|
|
321
|
-
function
|
|
322
|
-
A=
|
|
323
|
-
e.ha&&a.i.ignoreTextStreamFailures)a.h["delete"](e.ha),x.D(0);else if(3017==y.code)
|
|
324
|
-
function
|
|
325
|
-
function
|
|
326
|
-
2),u(
|
|
327
|
-
function
|
|
328
|
-
|
|
329
|
-
function
|
|
330
|
-
function
|
|
331
|
-
function
|
|
332
|
-
function
|
|
333
|
-
function
|
|
334
|
-
function
|
|
335
|
-
function
|
|
336
|
-
q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n
|
|
337
|
-
[];var e={};c=r(c);for(var f=c.next();!f.done;e={Vb:e.Vb},f=c.next())e.Vb=f.value,a.some(function(g){return function(h){return h.startTime==g.Vb.startTime&&h.endTime==g.Vb.endTime&&h.text==g.Vb.payload?!0:!1}}(e))||(f=
|
|
338
|
-
q.destroy=function(){this.g&&(
|
|
339
|
-
function
|
|
340
|
-
function
|
|
341
|
-
!0)}),this.l.observe(this.g))}q=
|
|
342
|
-
q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});
|
|
343
|
-
function
|
|
344
|
-
h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d
|
|
345
|
-
function
|
|
346
|
-
function
|
|
347
|
-
"contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=
|
|
348
|
-
g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=
|
|
314
|
+
qj.prototype.Qc=function(){for(var a=this.g.jd(),b=r(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);c.sa=null;var e=this.g.V;d==Hb?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=mi(e,d),e=ai(e,a));if(!e){(null!=ni(this.g.V,d)||c.ab)&&Fj(this,c);c.Ja&&(c.Ja.abort(),c.Ja=null);if(d===Hb)for(d=this.g.V.F.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,Ih(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())Dh(e.value);c.Qc=!0}}};
|
|
315
|
+
function Fj(a,b){b.zc||b.Sb||(b.ab?(b.Sb=!0,b.dd=0):null==li(a.g.V,b.type)?null==b.eb&&xj(a,b,0):(sj(b),Dj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
316
|
+
function uj(a){var b,c,d,e,f,g,h,k,l,m;return I(function(p){if(1==p.g){b=Ib;if(!a.l)throw new O(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Fb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ma,a.l.video),d.add(a.l.video));a.A&&(c.set(b.ha,a.A),d.add(a.A));e=a.g.V;f=a.i.forceTransmuxTS;return u(p,e.init(c,f,a.m.sequenceMode),2)}tf(a.j);var n=a.m.presentationTimeline.getDuration();Infinity>n?a.g.V.bb(n):a.g.V.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),
|
|
317
|
+
a.h.has(k)||(m=wj(l),a.h.set(k,m),xj(a,m,0));z(p)})}function wj(a){return{stream:a,type:a.type,sa:null,Qa:null,od:null,be:null,ae:null,$d:null,Qb:null,endOfStream:!1,ab:!1,eb:null,Sb:!1,dd:0,Fd:!1,zc:!1,Qc:!0,qe:!1,Hc:!1,Ja:null}}
|
|
318
|
+
function Gj(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:tf(a.j);if(b.ab||null==b.eb||b.zc)return h["return"]();b.eb=null;if(!b.Sb){h.D(2);break}return u(h,Dj(a,b,b.Fd,b.dd),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.eb&&xj(a,b,0),h["return"]();case 4:B(h,6);d=Hj(a,b);null!=d&&(xj(a,b,d),b.Hc=!1);va(h,7);break;case 6:return e=
|
|
319
|
+
F(h),u(h,Ij(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.h.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return u(h,a.g.V.endOfStream(),10);case 10:tf(a.j),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),z(h)}})}
|
|
320
|
+
function Hj(a,b){if(Jj(b))return ui(a.g.V,b.stream.originalId||""),null;b.type==Hb&&vi(a.g.V);var c=a.g.jd(),d=b.Qa?b.Qa.endTime:c,e=oi(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(Hb))&&Jj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=ni(a.g.V,b.type);e=Kj(a,b,c,e);if(!e)return a.i.updateIntervalSeconds;f=Infinity;
|
|
321
|
+
var g=Array.from(a.h.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Jj(h)||h.sa&&!h.sa.current()||(f=Math.min(f,h.Qa?h.Qa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Lj(a,b,c,e)["catch"](function(){});return null}
|
|
322
|
+
function Kj(a,b,c,d){if(b.sa)return b.sa.current();if(b.Qa||d)return b.sa=b.stream.segmentIndex.ac(b.Qa?b.Qa.endTime:d),b.sa&&b.sa.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.sa=b.stream.segmentIndex.ac(d),e=b.sa&&b.sa.next().value);e||(b.sa=b.stream.segmentIndex.ac(c),e=b.sa&&b.sa.next().value);return e}
|
|
323
|
+
function Lj(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){switch(x.g){case 1:return e=Ib,f=b.stream,g=b.sa,b.ab=!0,B(x,2),u(x,Mj(a,b,d),4);case 4:tf(a.j);if(a.B)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h)return p=new Uint8Array(0),n=function(w){var D,C,A;return I(function(G){tf(a.j);if(a.B)return G["return"]();p=Nj(p,w);D=!1;C=0;(new yg).box("mdat",function(E){C=E.size+E.start;D=!0}).parse(p,!1,!0);if(!D)return G.D(0);
|
|
324
|
+
A=p.subarray(0,C);p=p.subarray(C);return u(G,Oj(a,b,c,f,d,A),0)})},u(x,Pj(a,b,d,n),6);l=Pj(a,b,d);return u(x,l,7);case 7:return m=x.h,tf(a.j),a.B?x["return"]():b.Sb?(b.ab=!1,xj(a,b,0),x["return"]()):u(x,Oj(a,b,c,f,d,m),6);case 6:tf(a.j);if(a.B)return x["return"]();b.Qa=d;g.next();b.ab=!1;b.qe=!1;t=a.g.V.yb();v=t[b.type];Ya(JSON.stringify(v));b.Sb||a.g.le();xj(a,b,0);va(x,0);break;case 2:y=F(x);tf(a.j,y);if(a.B)return x["return"]();b.ab=!1;if(7001==y.code)b.ab=!1,b.eb=null,xj(a,b,0),x.D(0);else if(b.type==
|
|
325
|
+
e.ha&&a.i.ignoreTextStreamFailures)a.h["delete"](e.ha),x.D(0);else if(3017==y.code)Qj(a,b,y),x.D(0);else if(1001==y.code&&y.data&&404==y.data[1])b.ab=!1,b.eb=null,xj(a,b,1),x.D(0);else return b.Hc=!0,y.severity=2,u(x,Ij(a,y),0)}})}function Nj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
326
|
+
function Qj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.qe})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Hc=!0;a.B=!0;a.g.onError(c);return}b.qe=!0}xj(a,b,4)}
|
|
327
|
+
function Mj(a,b,c){var d,e,f,g,h,k,l;return I(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.be||e!=b.ae||f!=b.$d)h=function(){var p;return I(function(n){if(1==n.g)return B(n,2),b.ae=e,b.$d=f,b.be=g,u(n,xi(a.g.V,b.type,g,e,f,a.m.sequenceMode),4);if(2!=n.g)return va(n,0);p=F(n);b.ae=null;b.$d=null;b.be=null;throw p;})},d.push(h());!Vh(c.i,b.od)&&(b.od=c.i)&&(k=Pj(a,b,c.i),l=function(){var p,n,t;return I(function(v){switch(v.g){case 1:return B(v,
|
|
328
|
+
2),u(v,k,4);case 4:return p=v.h,tf(a.j),n=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,pi(a.g.V,b.type,p,null,n),5);case 5:va(v,0);break;case 2:throw t=F(v),b.od=null,t;}})},a.g.Og(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
|
|
329
|
+
function Oj(a,b,c,d,e,f){var g,h;return I(function(k){if(1==k.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes)&&(new yg).Y("emsg",function(l){var m=d.emsgSchemeIdUris;if(0===l.version){var p=l.reader.Oc();var n=l.reader.Oc();var t=l.reader.R();var v=l.reader.R();var y=l.reader.R();var x=l.reader.R();var w=e.startTime+v/t}else t=l.reader.R(),w=l.reader.lc()/t+e.timestampOffset,v=w-e.startTime,y=l.reader.R(),x=l.reader.R(),
|
|
330
|
+
p=l.reader.Oc(),n=l.reader.Oc();l=l.reader.Cb(l.reader.W.byteLength-l.reader.oa());if(m&&m.includes(p)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.Pg():(m=(new Map).set("detail",{startTime:w,endTime:w+y/t,schemeIdUri:p,value:n,timescale:t,presentationTimeDelta:v,eventDuration:y,id:x,messageData:l}),m=new L(Rj,m),a.g.onEvent(m))}).parse(f),u(k,Sj(a,b,c),2);if(3!=k.g)return tf(a.j),h=b.Qc,b.Qc=!1,u(k,pi(a.g.V,b.type,f,e,g,h),3);tf(a.j);z(k)})}
|
|
331
|
+
function Sj(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=li(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.V.remove(b.type,e,e+g),2)}tf(a.j);z(h)})}function Jj(a){return a&&a.type==Hb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
332
|
+
function Pj(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=rf,f=pj(c.Pa(),c.Sa,c.Ca,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Uh,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Ob.request(e,f),b.Ja=h,u(l,h.promise,2);k=l.h;b.Ja=null;return l["return"](k.data)})}
|
|
333
|
+
function Dj(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.Sb=!1,b.Fd=!1,b.dd=0,b.zc=!0,b.Qa=null,b.od=null,b.sa=null,d?(e=a.g.jd(),f=a.g.V.getDuration(),u(g,a.g.V.remove(b.type,e+d,f),3)):u(g,wi(a.g.V,b.type),4);if(3!=g.g)return tf(a.j),c?u(g,a.g.V.flush(b.type),3):g.D(3);tf(a.j);b.zc=!1;b.endOfStream=!1;xj(a,b,0);z(g)})}
|
|
334
|
+
function xj(a,b,c){var d=b.type;if(d!=Hb||a.h.has(d))b.eb=(new Oc(function(){var e;return I(function(f){if(1==f.g)return B(f,2),u(f,Gj(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).S(c)}function sj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function tj(a){return I(function(b){return a.Ja?u(b,a.Ja.abort(),0):b.D(0)})}function Ij(a,b){return I(function(c){if(1==c.g)return u(c,Ve(a.G),2);tf(a.j);a.g.onError(b);b.handled||a.i.failureCallback(b);z(c)})};function Tj(a,b){var c=Uj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Vj(d)});this.B=new sf(function(){return Wj(d)})}Tj.prototype.destroy=function(){return this.B.destroy()};function Wj(a){var b,c,d;return I(function(e){if(1==e.g)return a.h&&a.h.abort(),Xj(a),u(e,a.C,2);a.g&&a.g.$a.Pb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Pb();a.g=null;a.m=[];a.j=null;z(e)})}
|
|
335
|
+
function Yj(a,b){var c={jc:function(){},td:function(){},Pb:function(){},onError:function(){},vd:function(){},Qi:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();Xj(a);return c}
|
|
336
|
+
function Vj(a){return I(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.$a.Pb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.jc(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,$a:c.$a}):c.$a.vd();c=!0}c?c=Promise.resolve():a.g?c=Zj(a):(a.j.Ng(a.i),a.A=new Mc,c=a.A);b=u(b,c,1)}return b})}
|
|
337
|
+
function Zj(a){var b,c;return I(function(d){switch(d.g){case 1:return a.i=a.j.sg(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.Xf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.$a.td(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.$a.Pb();else a.g.$a.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Xj(a){a.A&&(a.A.resolve(),a.A=null)};function ak(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=ak.prototype;q.remove=function(a,b){if(!this.g)return!1;bk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
338
|
+
q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(p,n){return p+"<"+n+">"},"");h=h.reduceRight(function(p,n){return p+"</"+n+">"},"");return g.lineBreak?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):
|
|
339
|
+
[];var e={};c=r(c);for(var f=c.next();!f.done;e={Vb:e.Vb},f=c.next())e.Vb=f.value,a.some(function(g){return function(h){return h.startTime==g.Vb.startTime&&h.endTime==g.Vb.endTime&&h.text==g.Vb.payload?!0:!1}}(e))||(f=ck(e.Vb))&&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)};
|
|
340
|
+
q.destroy=function(){this.g&&(bk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
341
|
+
function ck(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}
|
|
342
|
+
function bk(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}J("shaka.text.SimpleTextDisplayer",ak);ak.prototype.setTextVisibility=ak.prototype.setTextVisibility;ak.prototype.isTextVisible=ak.prototype.isTextVisible;ak.prototype.destroy=ak.prototype.destroy;ak.prototype.append=ak.prototype.append;ak.prototype.remove=ak.prototype.remove;function dk(){}function R(a){return document.createElement(a)}function ek(){return document.createElement("button")}function fk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}J("shaka.util.Dom",dk);dk.removeAllChildren=fk;function gk(a,b){var c=this;this.j=!1;this.i=[];this.C=a;this.m=b;this.g=R("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.B=(new P(function(){hk(c)})).ka(.25);this.h=new Map;this.A=new uf;this.A.o(document,"fullscreenchange",function(){hk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){hk(c,
|
|
343
|
+
!0)}),this.l.observe(this.g))}q=gk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Vc:c.Vc},d=a.next())c.Vc=d.value,b.some(function(e){return function(f){return qc(f,e.Vc)}}(c))||this.i.push(c.Vc);hk(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.B&&this.B.stop();this.h.clear();this.A&&(this.A.release(),this.A=null);this.l&&(this.l.disconnect(),this.l=null)};
|
|
344
|
+
q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});hk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
|
|
345
|
+
function ik(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.Jf:null;l&&(g.push(l.bf),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(jk(a,k,e),l=a.h.get(k),p=l.Jf,f=!0));0<k.nestedCues.length&&p&&ik(a,k.nestedCues,p,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(n,t){return n.startTime!=t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});
|
|
346
|
+
h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.bf)}}function hk(a,b){if(a.g){var c=a.C.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(fk(a.g),a.h.clear());if(a.j){for(var d=new Map,e=r(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));ik(a,a.i,a.g,c,[])}}}
|
|
347
|
+
function jk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&kk(a,f,b,c,d);c=f;d&&(c=R("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.h.set(b,{bf:f,Jf:c})}
|
|
348
|
+
function kk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=lk(c.linePadding,c,a.m);f.paddingRight=lk(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
|
|
349
|
+
"contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=mk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");
|
|
350
|
+
g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=lk(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==kc?(f.width="100%",c.lineAlign==mc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==mc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
|
|
349
351
|
mc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Ac?"%":"px",d=c.region.viewportAnchorUnits==Ac?"%":"px",f.height=c.region.height+(c.region.heightUnits==Ac?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==kc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==
|
|
350
352
|
c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==kc?f.width=c.size+"%":f.height=c.size+"%")}
|
|
351
|
-
function
|
|
352
|
-
|
|
353
|
-
"");k=k.reduceRight(function(
|
|
354
|
-
break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}J("shaka.text.WebVttGenerator",function(){});function
|
|
355
|
-
function
|
|
356
|
-
function
|
|
357
|
-
function
|
|
358
|
-
function
|
|
359
|
-
function
|
|
360
|
-
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function
|
|
361
|
-
function
|
|
362
|
-
function
|
|
363
|
-
k),g=!1)}return g}function
|
|
364
|
-
function
|
|
353
|
+
function lk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function mk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}J("shaka.text.UITextDisplayer",gk);gk.prototype.setTextVisibility=gk.prototype.setTextVisibility;
|
|
354
|
+
gk.prototype.isTextVisible=gk.prototype.isTextVisible;gk.prototype.remove=gk.prototype.remove;gk.prototype.destroy=gk.prototype.destroy;gk.prototype.append=gk.prototype.append;function nk(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,t){return n+"<"+t+">"},
|
|
355
|
+
"");k=k.reduceRight(function(n,t){return n+"</"+t+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");break;case "right":k.push("align:right");break;case jc:k.push("align:middle");
|
|
356
|
+
break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}J("shaka.text.WebVttGenerator",function(){});function ok(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function pk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?qk:rk};d.ot=sk(c);var e=d.ot===tk||d.ot===uk||d.ot===vk||d.ot===wk;e&&(d.bl=xk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==wk&&(d.tb=yk(a,d.ot)/1E3);zk(a,b,d)}}catch(f){Ua("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
357
|
+
function Ak(a,b,c){try{if(!a.g.enabled)return b;var d=Bk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=vk;break a;case "application/x-mpegurl":e=Ck;break a}e=void 0}d.ot=e;d.su=!0;var f=Dk(d);return Ek(b,f)}catch(g){return Ua("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Bk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
358
|
+
function zk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Bk(a));c.pr=a.h.zb();var e=c.ot===tk||c.ot===vk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Fk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Dk(c);f&&(b.uris=b.uris.map(function(g){return Ek(g,f)}))}}}
|
|
359
|
+
function sk(a){var b=a.type;if(a.init)return Gk;if("video"==b)return a.codecs.includes(",")?vk:tk;if("audio"==b)return uk;if("text"==b)return"application/mp4"===a.mimeType?wk:Hk}function xk(a,b){var c=a.h.yb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
|
|
360
|
+
function yk(a,b){var c=a.h.Za();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case tk:return d.videoBandwidth||NaN;case uk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
|
|
361
|
+
function Dk(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
362
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Fk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Dk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
363
|
+
function Ek(a,b){if(!b||a.includes("offline:"))return a;var c=new kb(a);c.g.set("CMCD",b);return c.toString()}var Ck="m",uk="a",tk="v",vk="av",Gk="i",Hk="c",wk="tt",rk="v",qk="l";J("shaka.util.CmcdManager.StreamingFormat",{Bh:"d",Ph:"h",wi:"s",ci:"o"});function Ik(){}
|
|
364
|
+
function Jk(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]=cf(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=cf(l)),k=Jk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ra("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ta("Unexpected number of arguments for "+k),a[h]=b[h]):(Ra("Invalid config, unrecognized key "+
|
|
365
|
+
k),g=!1)}return g}function Kk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Lk(a,b){return a&&b}J("shaka.util.ConfigUtils",Ik);Ik.convertToConfigObject=Kk;Ik.mergeConfigObjects=Jk;function Mk(){}
|
|
366
|
+
function Nk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ue(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return Lk([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ue(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",
|
|
365
367
|
ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
366
|
-
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return
|
|
367
|
-
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||
|
|
368
|
-
.5;if(
|
|
369
|
-
abrFactory:function(){return new
|
|
370
|
-
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return I(function(h){return h["return"](
|
|
371
|
-
f.preferredAudioLanguage))})};return f}function
|
|
372
|
-
function
|
|
373
|
-
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Hb&&"image"!=g.type||c.push(g);return c}J("shaka.util.PlayerConfiguration",
|
|
374
|
-
function
|
|
375
|
-
this.ib=this.h.preferForcedSubs;this.fb=[];this.Bc=null;b&&b(this);this.H=
|
|
376
|
-
f){return
|
|
377
|
-
function(e,f){return
|
|
378
|
-
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?u(f,
|
|
379
|
-
q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==
|
|
368
|
+
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Lk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},d={retryParameters:Ue(),failureCallback:function(g){return Lk([g],void 0)},
|
|
369
|
+
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||Vc()||Xc())d.gapDetectionThreshold=
|
|
370
|
+
.5;if(Uc("Web0S")||Vc()||Xc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return I(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return I(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Lk([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,offline:e,
|
|
371
|
+
abrFactory:function(){return new Ce},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",
|
|
372
|
+
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return I(function(h){return h["return"](Ok(g,
|
|
373
|
+
f.preferredAudioLanguage))})};return f}function Pk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Jk(a,b,c||Nk(),d,"")}
|
|
374
|
+
function Ok(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Tb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Lb(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/
|
|
375
|
+
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Hb&&"image"!=g.type||c.push(g);return c}J("shaka.util.PlayerConfiguration",Mk);Mk.mergeConfigObjects=Pk;Mk.createDefault=Nk;function Qk(){this.g=null;this.h=[]}function Rk(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 Sk(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}
|
|
376
|
+
function Tk(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 Uk(){this.i=this.h=null;this.g=[]}function Vk(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 Wk(){this.A=this.B=this.H=this.F=this.m=this.j=this.G=this.l=this.i=this.I=this.J=this.K=this.C=this.N=NaN;this.g=new Qk;this.h=new Uk};function S(a,b){eb.call(this);var c=this;this.l=Xk;this.ld=this.g=null;this.ba=!1;this.pd=new uf;this.hb=new uf;this.A=new uf;this.me=this.C=this.gb=this.i=this.qd=this.J=this.j=this.ea=this.U=this.sd=this.N=this.md=this.I=this.Wa=this.G=this.K=this.m=this.H=null;this.Kf=1E9;this.h=Yk(this);this.Qe={width:Infinity,height:Infinity};this.B=null;this.ya=new Le(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.za=this.h.preferredTextLanguage;this.vb=this.h.preferredTextRole;
|
|
377
|
+
this.ib=this.h.preferForcedSubs;this.fb=[];this.Bc=null;b&&b(this);this.H=Zk(this);this.H.Be(this.h.streaming.forceHTTPS);this.F=null;$k&&(this.F=$k());this.pd.o(window,"online",function(){c.re()});this.P={name:"detach"};this.X={name:"attach"};this.aa={name:"unload"};this.Re={name:"manifest-parser"};this.Ne={name:"manifest"};this.La={name:"media-source"};this.oe={name:"drm-engine"};this.$={name:"load"};this.Se={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};var d=new Map;d.set(this.X,function(e,
|
|
378
|
+
f){return $e(al(c,e,f))});d.set(this.P,function(e){e.O&&(c.hb.Pc(),e.O=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return $e(e)});d.set(this.aa,function(e){return $e(bl(c,e))});d.set(this.La,function(e){e=cl(c,e);return $e(e)});d.set(this.Re,function(e,f){var g=dl(c,e,f);return $e(g)});d.set(this.Ne,function(e){return el(c,e)});d.set(this.oe,function(e){e=fl(c,e);return $e(e)});d.set(this.$,function(e,f){return $e(gl(c,e,f))});d.set(this.Se,function(e,f){var g=hl(c,e,f);return $e(g)});d.set(this.Xa,
|
|
379
|
+
function(e,f){return il(c,e,f)});this.ma=new Tj(this.P,{sg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.O!=h.O?c.P:g==c.X?c.X:g==c.La||g==c.$?c.La:g==c.Xa?c.Se:null);e==c.La&&(k=g==c.$&&f.O==h.O?c.Re:c.aa);e==c.Re&&(k=jl(c.$,c.Ne,c.aa,g,f,h));e==c.Ne&&(k=jl(c.$,c.oe,c.aa,g,f,h));e==c.oe&&(k=jl(c.$,c.$,c.aa,g,f,h));e==c.Se&&(k=g==c.Xa&&f.O==h.O?c.Xa:c.aa);if(e==c.$||e==c.Xa)k=c.aa;e==c.aa&&(k=h.O&&f.O==h.O?c.X:c.P);return k},Xf:function(e,f,g){c.dispatchEvent(kl(ll,
|
|
380
|
+
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?u(f,bl(c,e),2):f["return"](e.O?c.X:c.P)})},Ng:function(e){c.dispatchEvent(kl(ml,(new Map).set("state",e.name)))}});a&&this.yc(a,!0)}qa(S,eb);function kl(a,b){return new L(a,b)}q=S.prototype;
|
|
381
|
+
q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==nl)return c["return"]();a.l=nl;b=Yj(a.ma,function(){return{node:a.P,payload:Uj(),Jb:!1}});return u(c,new Promise(function(d){b.jc=function(){};b.td=function(){d()};b.Pb=function(){d()};b.onError=function(){d()};b.vd=function(){d()}}),2);case 2:return u(c,a.ma.destroy(),3);case 3:a.pd&&(a.pd.release(),a.pd=null);a.hb&&(a.hb.release(),a.hb=null);a.A&&(a.A.release(),a.A=null);a.me=null;a.C=null;a.h=null;a.B=null;a.ld=null;
|
|
380
382
|
a.U=null;if(!a.H){c.D(4);break}return u(c,a.H.destroy(),5);case 5:a.H=null;case 4:eb.prototype.release.call(a),z(c)}})};
|
|
381
|
-
function
|
|
382
|
-
!1:
|
|
383
|
-
q.
|
|
384
|
-
q.load=function(a,b,c){var d=this;this.Bc=null;if(this.l==
|
|
385
|
-
g.onError=function(l){return k(l)}})};function
|
|
386
|
-
function
|
|
387
|
-
8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.K){
|
|
388
|
-
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.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.B=new
|
|
389
|
-
function
|
|
390
|
-
function
|
|
391
|
-
function
|
|
392
|
-
mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(
|
|
393
|
-
onTimelineRegionAdded:function(g){var h=a.sd;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=l;break a}k=null}null==k&&(h.g.add(g),g=new
|
|
394
|
-
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new
|
|
395
|
-
function
|
|
396
|
-
function
|
|
397
|
-
(a.
|
|
398
|
-
a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=
|
|
399
|
-
case 3
|
|
400
|
-
1E3-c.
|
|
401
|
-
function
|
|
402
|
-
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?
|
|
383
|
+
function ol(){window.Promise||Ta("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Ta("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Uc("Trident/"))return!1;var a=$c();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
|
|
384
|
+
!1:Pc()?!0:Rc("application/x-mpegurl")}q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==nl)return Promise.reject(pl());var c=Uj();c.O=a;Pc()||(b=!1);var d=b?this.La:this.X,e=Yj(this.ma,function(){return{node:d,payload:c,Jb:!1}});e.jc=function(){};return ql(e)};q.detach=function(){var a=this;if(this.l==nl)return Promise.reject(pl());var b=Yj(this.ma,function(){return{node:a.P,payload:Uj(),Jb:!1}});b.jc=function(){};return ql(b)};
|
|
385
|
+
q.Oe=function(a){var b=this;a=void 0===a?!0:a;if(this.l==nl)return Promise.reject(pl());Pc()||(a=!1);var c=Uj(),d=Yj(this.ma,function(e){var f=e.O&&a?b.La:e.O?b.X:b.P;c.O=e.O;return{node:f,payload:c,Jb:!1}});d.jc=function(){};return ql(d)};q.nh=function(a){this.Bc=a};
|
|
386
|
+
q.load=function(a,b,c){var d=this;this.Bc=null;if(this.l==nl)return Promise.reject(pl());this.dispatchEvent(kl(rl));var e=Uj();e.uri=a;e.Ie=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=sl(this,e)?this.Xa:this.$,g=Yj(this.ma,function(h){if(null==h.O)return null;e.O=h.O;return{node:f,payload:e,Jb:!0}});this.B=new Wk;this.U=tl(this);g.jc=function(){};return new Promise(function(h,k){g.vd=function(){return k(new O(2,7,7002))};g.td=function(){h();d.dispatchEvent(kl(ul))};g.Pb=function(){return k(pl())};
|
|
387
|
+
g.onError=function(l){return k(l)}})};function sl(a,b){if(!Pc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=sg(d),c=vl[c]);if(c){if(""==(b.O||Sc()).canPlayType(c))return!1;if(!Pc()||!(c in rg||sg(d)in tg)||a.h.streaming.preferNativeHls)return!0;if(Yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function al(a,b,c){null==b.O&&(b.O=c.O,a.hb.o(b.O,"error",function(){var d=wl(a);d&&xl(a,d)}));a.g=b.O;return Promise.resolve()}
|
|
388
|
+
function bl(a,b){var c,d,e,f,g,h,k,l,m;return I(function(p){switch(p.g){case 1:return a.l!=nl&&(a.l=Xk),c=a.fb.map(function(n){return n()}),a.fb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(kl(yl));b.mimeType=null;b.startTime=null;b.uri=null;b.O&&a.A.Pc();a.Wa&&(a.Wa.release(),a.Wa=null);a.md&&(a.md.stop(),a.md=null);if(!a.J){p.D(3);break}return u(p,a.J.stop(),4);case 4:a.J=null,a.qd=null;case 3:if(!a.C){p.D(5);break}return u(p,a.C.stop(),5);case 5:if(!a.j){p.D(7);break}return u(p,a.j.destroy(),
|
|
389
|
+
8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.K){p.D(9);break}return u(p,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.O||!b.O.src){p.D(11);break}return u(p,new Promise(function(n){return(new P(n)).S(.1)}),12);case 12:for(b.O.removeAttribute("src"),b.O.load();b.O.lastChild;)b.O.removeChild(b.O.firstChild);case 11:if(!a.m){p.D(13);break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.gb=null;a.N=null;if(a.i){d=r(a.i.variants);
|
|
390
|
+
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.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.B=new Wk;a.se=null;zl(a);z(p)}})}
|
|
391
|
+
function cl(a,b){var c,d,e,f,g,h;return I(function(k){if(1==k.g)return c=new Sh,d=a.h.textDisplayFactory,e=d(),a.se=d,f=Al(b.O,c,e,function(l,m,p){l=r(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var t=n.cueTime+m,v=p,y=r(n.frames),x=y.next();!x.done;x=y.next())Bl(a,t,v,"ID3",x.value);if(a.F)a.F.onHlsTimedMetadata(n,t)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.H=h,u(k,f.I,2);a.K=f;z(k)})}
|
|
392
|
+
function dl(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.gb=d,f=a,u(h,qg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.qd=h.h;a.J=a.qd();g=cf(a.h.manifest);c.O&&"AUDIO"===c.O.nodeName&&(g.disableVideo=!0);a.J.configure(g);z(h)})}
|
|
393
|
+
function el(a,b){var c=b.uri,d=a.H;a.sd=new jj(function(){return a.Ia()});a.sd.addEventListener("regionadd",function(g){g=g.region;Cl(a,Dl,g);if(a.F)a.F.onDashTimedMetadata(g)});a.ea=null;a.h.streaming.observeQualityChanges&&(a.ea=new fj(function(){return a.yb()}),a.ea.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
|
|
394
|
+
mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(kl(El,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.U;try{k.g.enabled&&(k.A=h.format,zk(k,g,{ot:Ck,su:!k.i}))}catch(l){Ua("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){pk(a.U,g,h)},filter:function(g){return Fl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Gl(a,g)},
|
|
395
|
+
onTimelineRegionAdded:function(g){var h=a.sd;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=l;break a}k=null}null==k&&(h.g.add(g),g=new L("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return xl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
396
|
+
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new We(function(){var g,h,k,l;return I(function(m){if(1==m.g)return g=a,u(m,a.J.start(c,e),2);g.i=m.h;h=kl(Hl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);Il(a.i);k=Date.now()/1E3;l=k-f;a.B.G=l;z(m)})}(),function(){return a.J.stop()})}
|
|
397
|
+
function fl(a,b){var c,d;return I(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Jl(a,{Ob:a.H,onError:function(f){xl(a,f)},ud:function(f){Kl(a,f)},onExpirationUpdated:function(f,g){Ll(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Ml&&d&&(d=!1,a.B.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Jf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.yc(b.O),3):u(e,Fl(a,a.i),0)})}
|
|
398
|
+
function gl(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v;return I(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Bc&&(b.startTime=a.Bc,a.Bc=null);d=b.O;e=b.uri;a.gb=e;a.I=new bj({kd:function(){return d.playbackRate},gd:function(){return d.defaultPlaybackRate},De:function(x){d.playbackRate=x},vf:function(x){d.currentTime+=x}});f=function(){return Nl(a)};g=function(){return Ol(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.me==h||
|
|
399
|
+
(a.me=h,a.C=h(),a.C.configure(a.h.abr));a.ya=new Le(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.za=a.h.preferredTextLanguage;a.vb=a.h.preferredTextRole;a.ib=a.h.preferForcedSubs;Pl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(x,w,D){a.j&&x!=a.j.l&&Ql(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.G=Rl(a,b.startTime);a.Wa=Sl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Tl(a,k);Od(a.i,a.h.preferredVideoCodecs,
|
|
400
|
+
a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Ul(a);a.j.configure(a.h.streaming);a.l=Vl;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":Wl(a,x)}});a.dispatchEvent(kl(Xl));l=null;if(m=a.Za().find(function(x){return x.active})){y.D(2);break}l=Yl(a)?a.C.chooseVariant():null;Ql(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}p=a.G.m();return u(y,Zl(l,p),4);case 4:n=y.h,a.G.A(n);
|
|
401
|
+
case 3:$l(a,null,pe(l));case 2:return t=a.Ab().find(function(x){return x.active}),t||((v=ze(a.i.textStreams,a.za,a.vb,a.ib)[0]||null)&&Vk(a.B.h,v,!0),l&&(v?(l.audio&&am(a,l.audio,v)&&(a.ba=!0),a.ba&&a.K.m.setTextVisibility(!0),bm(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Nb())&&Cj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),cm(a)),de(a.j?a.j.l:null,a.i),dm(a.i),em(a),Yl(a),a.i.variants.some(function(x){return x.primary}),a.A.Fa(d,"loadedmetadata",function(){a.B.l=Date.now()/
|
|
402
|
+
1E3-c.Ie}),z(y)}})}
|
|
403
|
+
function hl(a,b,c){var d,e,f,g,h,k,l;return I(function(m){return 1==m.g?(d=Ib,e=Date.now()/1E3,f=!0,a.m=Jl(a,{Ob:a.H,onError:function(p){xl(a,p)},ud:function(p){Kl(a,p)},onExpirationUpdated:function(p,n){Ll(a,p,n)},onEvent:function(p){a.dispatchEvent(p);p.type==Ml&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=sg(g),k=vl[h],"application/x-mpegurl"==k&&Yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
|
|
404
|
+
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Bd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,u(m,Jf(a.m,[l],[]),2)):u(m,a.m.yc(b.O),
|
|
403
405
|
0)})}
|
|
404
|
-
function
|
|
405
|
-
a.A.Fa(e,"loadedmetadata",function(){a.B.l=Date.now()/1E3-c.
|
|
406
|
-
"change",function(){return
|
|
407
|
-
e.error?h.reject(
|
|
408
|
-
function
|
|
409
|
-
function
|
|
410
|
-
function
|
|
411
|
-
function
|
|
412
|
-
function
|
|
413
|
-
function
|
|
414
|
-
function
|
|
415
|
-
function
|
|
416
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
417
|
-
function
|
|
418
|
-
c);a.
|
|
419
|
-
q
|
|
406
|
+
function il(a,b,c){function d(){return Nl(a)}b.uri=c.uri;b.startTime=c.startTime;a.gb=b.uri;var e=b.O;a.G=new Ri(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.G.A(b.startTime);a.I=new bj({kd:function(){return e.playbackRate},gd:function(){return e.defaultPlaybackRate},De:function(k){e.playbackRate=k},vf:function(k){e.currentTime+=k}});Tl(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return Ol(a)});"none"!=e.preload&&
|
|
407
|
+
a.A.Fa(e,"loadedmetadata",function(){a.B.l=Date.now()/1E3-c.Ie});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return em(a)}),a.A.o(e.audioTracks,"removetrack",function(){return em(a)}),a.A.o(e.audioTracks,"change",function(){return em(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":fm(a,k);break;case "chapters":Wl(a,k);break;default:em(a)}}),a.A.o(e.textTracks,"removetrack",function(){return em(a)}),a.A.o(e.textTracks,
|
|
408
|
+
"change",function(){return em(a)}));var g=sg(b.uri);e.src=Ak(a.U,b.uri,vl[g]);(Vc()||Uc("Web0S"))&&e.load();a.l=gm;a.dispatchEvent(kl(Xl));var h=new Mc;Ii(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){h.resolve()});Ii(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return I(function(l){if(1==l.g)return hm(a),k=im(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):u(l,new Promise(function(m){a.A.Fa(e.textTracks,"change",m);(new P(m)).S(1)}),2);if(f)return l["return"]();jm(a);z(l)})});
|
|
409
|
+
e.error?h.reject(wl(a)):"none"==e.preload&&(Ta('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.A.Fa(e,"error",function(){h.reject(wl(a))});return new We(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})}
|
|
410
|
+
function hm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Bd(b);var c=a.h.preferredVariantRole;""!=c&&a.Bd(b,c)}}function jm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.we(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.we(b,d,c)}}
|
|
411
|
+
function fm(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Bl(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new P(function(){var d=km(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).xa().S(.5);a.fb.push(function(){c.stop()})}}
|
|
412
|
+
function Bl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(kl(lm,b))}function Wl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).xa().S(.5);a.fb.push(function(){c.stop()})}}function Il(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 Jl(a,b){return new Cf(b,a.h.drm.updateExpirationTime)}
|
|
413
|
+
function Zk(a){return new gf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(kl(mm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(kl(nm,b))})}function Rl(a,b){return new Si(a.g,a.i,a.h.streaming,b,function(){a.Wa&&ej(a.Wa,!0);a.j&&a.j.Qc();a.N&&om(a)})}
|
|
414
|
+
function Sl(a){var b=new kj(a.sd);b.addEventListener("enter",function(d){Cl(a,pm,d.region)});b.addEventListener("exit",function(d){Cl(a,qm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Cl(a,pm,e),Cl(a,qm,e))});var c=new dj(a.g);c.g.add(b);a.ea&&c.g.add(a.ea);return c}function Tl(a,b){a.N=new Pe;a.N.g=Re;Se(a.N,b,Math.min(.5,b/2));zl(a);a.md=(new P(function(){om(a)})).ka(.25)}
|
|
415
|
+
function om(a){switch(a.l){case gm:if(a.g.ended)var b=!0;else{var c=$h(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Vl:a:if(a.g.ended||ki(a.K))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Ib();var d=$h(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=bi(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Qe:Re;c.g=d;b!=d&&zl(a)}function Al(a,b,c,d){return new ei(a,b,c,d)}
|
|
416
|
+
function tl(a){return new ok({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},yb:function(){return a.yb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},zb:function(){return a.zb()},T:function(){return a.T()}},a.h.cmcd)}
|
|
417
|
+
function Ul(a){return new qj(a.i,{jd:function(){return a.G.m()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){pk(a.U,b,c)},V:a.K,Ob:a.H,onError:function(b){return xl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Pg:function(){a.J&&a.J.update&&a.J.update()},le:function(){a.G&&a.G.G();om(a)},Og:function(b,c){var d=c.fe;d&&a.ea&&hj(a.ea,d,b)}})}
|
|
418
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Kk(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Pk(this.h,a,Yk(this));rm(this);return c};
|
|
419
|
+
function rm(a){if(a.J){var b=cf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{sm(a,a.i)}catch(f){xl(a,f)}a.C&&Yl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||tm(a)}a.H&&a.H.Be(a.h.streaming.forceHTTPS);if(a.K&&(a.K.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.se!=b)){var c=b(),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
|
|
420
|
+
c);a.se=b;a.j&&(b=a.j,(c=b.h.get(Hb))&&Aj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),cm(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Se(a.N,b,Math.min(.5,b/2)));a.i&&Pl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Yk(this);Pk(a,this.h,Yk(this));return a};
|
|
421
|
+
q.$f=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ia().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Zg=function(){for(var a in this.h)delete this.h[a];Pk(this.h,Yk(this),Yk(this));rm(this)};q.mf=function(){return this.l};q.rg=function(){return this.g};q.Ec=function(){return this.H};q.Vd=function(){return this.gb};
|
|
420
422
|
q.fd=function(){return this.F?this.F:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Lb=function(){return this.i?this.i.presentationTimeline.Lb():!1};q.ec=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
421
|
-
q.Ia=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),end:a.kb()}}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.
|
|
422
|
-
q.Jc=function(){return this.N?this.N.g==
|
|
423
|
-
q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,
|
|
424
|
-
q.Ab=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=
|
|
425
|
-
q.
|
|
426
|
-
|
|
427
|
-
q.
|
|
428
|
-
q.
|
|
429
|
-
|
|
430
|
-
q.Bd=function(a,b){if(this.i&&this.G){this.ya=new
|
|
431
|
-
r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=
|
|
432
|
-
q.
|
|
433
|
-
q.
|
|
434
|
-
q.
|
|
435
|
-
function
|
|
436
|
-
q.
|
|
437
|
-
q.
|
|
438
|
-
q.
|
|
439
|
-
q.getStats=function(){if(this.l!=
|
|
440
|
-
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.B,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.J=b,this.B.I=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.J?a.J:NaN):a=NaN;this.B.m=a;if(this.l==
|
|
441
|
-
(this.B.H=this.i.presentationTimeline.g);a=this.C.getBandwidthEstimate();this.B.A=a}var d=this.B;a=d.N;c=d.C;b=d.B;var e=d.J,f=d.K,g=d.I,h=d.A,k=d.i,l=d.l,m=d.G,
|
|
442
|
-
estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:
|
|
443
|
-
q.
|
|
444
|
-
Ib;
|
|
445
|
-
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};
|
|
446
|
-
q.
|
|
447
|
-
case 5:throw new O(1,2,2012);}})};function
|
|
448
|
-
function
|
|
449
|
-
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return
|
|
450
|
-
function
|
|
451
|
-
q.
|
|
452
|
-
function
|
|
453
|
-
function
|
|
454
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Hb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function
|
|
455
|
-
function
|
|
456
|
-
function
|
|
457
|
-
f.next())g=g.value,
|
|
458
|
-
function
|
|
459
|
-
function
|
|
460
|
-
function
|
|
461
|
-
function
|
|
462
|
-
function
|
|
463
|
-
function
|
|
464
|
-
function
|
|
465
|
-
function
|
|
466
|
-
(e=!0)}}}if(!e||
|
|
467
|
-
function
|
|
468
|
-
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function
|
|
469
|
-
function
|
|
470
|
-
h.push({language:l,role:
|
|
471
|
-
S.prototype.getManifestParserFactory=S.prototype.
|
|
472
|
-
S.prototype.setTextTrackVisibility=S.prototype.
|
|
473
|
-
S.prototype.getAudioLanguagesAndRoles=S.prototype.
|
|
474
|
-
S.prototype.getExpiration=S.prototype.Dc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.
|
|
475
|
-
S.prototype.getLoadMode=S.prototype.
|
|
476
|
-
S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return I(function(h){if(1==h.g)return b={},a?u(h,
|
|
477
|
-
|
|
478
|
-
k={};
|
|
479
|
-
var
|
|
480
|
-
|
|
481
|
-
var
|
|
482
|
-
ssa:"text/x-ssa",ass:"text/x-ssa"};function
|
|
423
|
+
q.Ia=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),end:a.kb()}}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.Dg=function(){this.T()&&(this.g.currentTime=this.Ia().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Dc=function(){return this.m?this.m.Dc():Infinity};q.hd=function(){return this.m?this.m.hd():{}};
|
|
424
|
+
q.Jc=function(){return this.N?this.N.g==Re:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.Me=function(a){0==a?Ta("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Vl&&(this.C.playbackRateChanged(a),zj(this.j,1<Math.abs(a))))};q.We=function(){var a=this.I.gd();this.l==gm&&this.I.set(a);this.l==Vl&&(this.I.set(a),this.C.playbackRateChanged(a),zj(this.j,!1))};
|
|
425
|
+
q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,xe(e)){var f=pe(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 we(g)}):[]};
|
|
426
|
+
q.Ab=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=qe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?im(this).map(function(f){return ue(f)}):[]};q.jg=function(){return this.i?this.i.imageStreams.map(function(a){return re(a)}):[]};
|
|
427
|
+
q.zg=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A;return I(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.D(3):u(G,d.createSegmentIndex(),3):G["return"](null):G.D(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;
|
|
428
|
+
v=m*p;y=f.j-f.startTime;x=f.l||y/v;w=f.startTime;C=D=0;1<v&&(A=Math.floor((b-f.startTime)/x),w=f.startTime+A*x,D=A%m*n,C=Math.floor(A/m)*t);return G["return"]({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:C,startTime:w,duration:x,uris:f.Pa(),width:n})}return G["return"](null)})};
|
|
429
|
+
q.xe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Vk(this.B.h,b,!1),Cj(this.j,b),um(this),this.za=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=im(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,se(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";um(this)}};
|
|
430
|
+
q.ye=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ta("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&xe(d)&&(Ql(this,d,!1,b,c),this.ya=new Ke(d),Yl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
431
|
+
se(c)==a.id){vm(this,c);break}};q.Zf=function(){return wm(this.Za())};q.yg=function(){return wm(this.Ab())};q.Yf=function(){return Array.from(xm(this.Za()))};q.xg=function(){return Array.from(xm(this.Ab()))};
|
|
432
|
+
q.Bd=function(a,b){if(this.i&&this.G){this.ya=new Le(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.ya.create(this.i.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;f?(c=pe(f),this.ye(c,!0)):tm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Lb(a);f=d=null;e=
|
|
433
|
+
r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=we(g);Lb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?vm(this,f):d&&vm(this,d)}};
|
|
434
|
+
q.we=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.za=a,this.vb=b||"",this.ib=c,(a=ze(this.i.textStreams,this.za,this.vb,this.ib)[0]||null)&&a!=this.j.A&&(Vk(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Nb()))Cj(this.j,a),um(this)}else{var d=Lb(a);(a=this.Ab().find(function(e){return Lb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.xe(a)}};
|
|
435
|
+
q.bh=function(a){if(this.i&&this.G){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ya=new Le(b.language,"",0,a),tm(this))}};q.Nb=function(){var a=this.ba;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?im(this).some(function(b){return"showing"==b.mode}):a};q.kf=function(){return this.g&&this.g.src&&this.g.textTracks?ym(this).map(function(a){return ue(a)}):[]};
|
|
436
|
+
q.cg=function(a){var b=Lb(a),c=ym(this).filter(function(f){return Lb(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function im(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
|
|
437
|
+
function km(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function ym(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
438
|
+
q.Ge=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Vl)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ze(this.i.textStreams,this.za,this.vb,this.ib),0<a.length&&(Cj(this.j,a[0]),um(this))):yj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=im(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")}bm(this)}};
|
|
439
|
+
q.ug=function(){if(!this.T())return null;var a=this.ma.l,b=0;if(this.G)b=this.G.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
440
|
+
q.nf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.yb=function(){if(this.l==Vl)return this.K.yb();var a={total:[],audio:[],video:[],text:[]};this.l==gm&&(a.total=ci(this.g.buffered));return a};
|
|
441
|
+
q.getStats=function(){if(this.l!=Vl&&this.l!=gm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Nl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
442
|
+
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.B,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.J=b,this.B.I=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.J?a.J:NaN):a=NaN;this.B.m=a;if(this.l==Vl){if(a=this.j.l)this.B.B=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.B,b=a.video.height||NaN,c.N=a.video.width||NaN,c.C=b);this.T()&&(a=this.nf().valueOf()+1E3*this.Ia().end,this.B.F=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
|
|
443
|
+
(this.B.H=this.i.presentationTimeline.g);a=this.C.getBandwidthEstimate();this.B.A=a}var d=this.B;a=d.N;c=d.C;b=d.B;var e=d.J,f=d.K,g=d.I,h=d.A,k=d.i,l=d.l,m=d.G,p=d.j,n=Sk(d.g,"playing"),t=Sk(d.g,"paused"),v=Sk(d.g,"buffering"),y=d.m,x=d.F,w=d.H,D=Tk(d.g),C=[];d=r(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,C.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
|
|
444
|
+
estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:p,playTime:n,pauseTime:t,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:D,switchHistory:C}};
|
|
445
|
+
q.Pf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,v,y,x,w,D;return I(function(C){switch(C.g){case 1:if(h.l!=Vl&&h.l!=gm)throw new O(1,7,7004);if(d){C.D(2);break}return u(C,zm(h,a),3);case 3:d=C.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(A){}if(h.l!=gm){C.D(4);break}g&&(c="forced");return u(C,Am(h,a,b,c,d,f||"",k),5);case 5:l=h.Ab();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return em(h),C["return"](m);throw new O(1,2,2012);case 4:p=
|
|
446
|
+
Ib;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new O(1,4,4033);if(!k.length){C.D(6);break}return u(C,Bm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=C.h,v=Cm(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=hi(y),d="text/vtt";case 6:x={id:h.Kf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:$i(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ha,primary:!1,trickModeVideo:null,
|
|
447
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=xd(x.mimeType,x.codecs);D=Gd(w);if(!D)throw new O(2,2,2014,d);h.i.textStreams.push(x);em(h);return C["return"](qe(x))}})};
|
|
448
|
+
q.Of=function(a,b,c){var d=this,e,f,g,h;return I(function(k){switch(k.g){case 1:if(d.l!=Vl&&d.l!=gm)throw new O(1,7,7004);if(c){k.D(2);break}return u(k,zm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,Am(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.kf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.A.Fa(f,"load",l);d.A.Fa(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k["return"](h);
|
|
449
|
+
case 5:throw new O(1,2,2012);}})};function zm(a,b){var c,d;return I(function(e){switch(e.g){case 1:c=sg(b);if(d=Dm[c])return e["return"](d);B(e,2);return u(e,ug(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new O(1,2,2011,c);}})}
|
|
450
|
+
function Am(a,b,c,d,e,f,g){var h,k,l,m;return I(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,Bm(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=Cm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=hi(l),e="text/vtt");m=document.createElement("track");var n=a.U,t=b;try{if(n.g.enabled){var v=Bk(n);v.ot=Hk;v.su=!0;var y=Dk(v);var x=Ek(t,y)}else x=t}catch(w){Ua("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),x=t}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
451
|
+
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p["return"](m)})}function Bm(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){e=rf;f=lf([b],d);f.method="GET";var k=a.U;try{k.g.enabled&&zk(k,f,{ot:Hk,su:!0})}catch(l){Ua("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
|
|
452
|
+
function Cm(a,b,c,d){var e=Hd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fc(b),b=c.parseMedia(b,a),nk(b,d);throw new O(2,2,2014,c);}q.Ce=function(a,b){this.Qe.width=a;this.Qe.height=b};q.re=function(){if(this.l==Vl){var a=this.j;if(a.j.g)a=!1;else if(a.B)a=!1;else{for(var b=r(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Hc&&(c.Hc=!1,xj(a,c,.1));a=!0}}else a=!1;return a};
|
|
453
|
+
q.og=function(){Ta("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.pg=function(){return this.qd};
|
|
454
|
+
function Yk(a){var b=Nk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.re())};b.textDisplayFactory=function(){return a.ld?new gk(a.g,a.ld):new ak(a.g)};return b}q.He=function(a){this.ld=a};
|
|
455
|
+
function Gl(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new aj;h={id:a.Kf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
456
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Hb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function Fl(a,b){return I(function(c){if(1==c.g)return u(c,Em(a,b),2);sm(a,b);z(c)})}
|
|
457
|
+
function Em(a,b){var c;return I(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,be(c,b),2);dm(b);z(d)})}
|
|
458
|
+
function sm(a,b){if(a.l!=nl){for(var c=a.h.restrictions,d=a.Qe,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=ae(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&em(a);if((c=a.m?a.m.g:null)&&a.m.B)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
|
|
459
|
+
f.next())g=g.value,Sf(a.m,g.initDataType,g.initData);Fm(a,b)}}
|
|
460
|
+
function Zl(a,b){var c,d,e,f,g;return I(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return I(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t["return"](null);p=(m=k.segmentIndex.ac(l))?m.next().value:null;if(!p)return t["return"](null);n=p.startTime;return t["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
|
|
461
|
+
function zl(a){var b=a.Jc();if(a.B&&a.N&&a.G){var c=a.I;c.j=b;cj(c);a.U&&(c=a.U,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Nl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(kl(Gm,b))}function Ol(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=kl(Hm),a.dispatchEvent(b))}function Nl(a){if(a.B&&a.N){var b=a.B.g;a.N.g==Re?Rk(b,"buffering"):a.g.paused?Rk(b,"paused"):a.g.ended?Rk(b,"ended"):Rk(b,"playing")}}
|
|
462
|
+
function Yl(a){try{Fm(a,a.i)}catch(c){return xl(a,c),!1}var b=a.i.variants.filter(function(c){return xe(c)});b=a.ya.create(b);a.C.setVariants(Array.from(b.values()));return!0}function tm(a){var b;(b=Yl(a)?a.C.chooseVariant():null)&&Ql(a,b,!0,!0,0)}
|
|
463
|
+
function Ql(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Bj(a.j,b,d,e,!0);else{var g=a.B.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Bj(a.j,b,d,e);d=null;f&&(d=pe(f));b=pe(b);c?$l(a,d,b):Im(a,d,b)}}function vm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=we(c);var d=we(b);Im(a,c,d)}
|
|
464
|
+
function am(a,b,c){a=Lb(a.h.preferredTextLanguage);b=Lb(b.language);c=Lb(c.language);return Kb(c,a)&&!Kb(b,c)}function $l(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=kl(Jm,b);Km(a,b)}function em(a){var b=kl(Lm);Km(a,b)}function Im(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=kl(Mm,b);Km(a,b)}function um(a){var b=kl(Nm);Km(a,b)}function bm(a){var b=kl(Om);Km(a,b)}function cm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Km(a,kl(Pm,b))}
|
|
465
|
+
function xl(a,b){if(a.l!=nl){var c=kl(Qm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Cl(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(kl(b,c))}
|
|
466
|
+
function wl(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)}
|
|
467
|
+
function Kl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=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&&!Rm.includes(l)}h!=f.allowedByKeySystem&&
|
|
468
|
+
(e=!0)}}}if(!e||Yl(a))(d=a.j.l)&&!d.allowedByKeySystem&&tm(a),e&&em(a)}}function Ll(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=kl(Sm);a.dispatchEvent(b)}function Pl(a,b,c){0<b&&(a.T()||a.Ef(b));b=a.getDuration();c<b&&(a.T()||a.bb(c))}
|
|
469
|
+
function Fm(a,b){var c=a.m?a.m.hd():{},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 p=m.next();!p.done;p=m.next())if(p=p.value,p.keyIds.size){p=r(p.keyIds);for(var n=p.next();!n.done;n=p.next()){n=n.value;var t=c[d?"00":n];t?Rm.includes(t)&&h.add(t):g.add(n)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
470
|
+
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function dm(a){if(!a.variants.some(xe))throw new O(2,4,4032);}function Km(a,b){I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=nl&&a.dispatchEvent(b);z(c)})}function xm(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(Lb(c.language)):b.add("und");return b}
|
|
471
|
+
function wm(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Lb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(k),p=m.next();!p.done;p=m.next()){p=p.value;var n=null;c.has(l)&&c.get(l).has(p)&&(n=c.get(l).get(p));
|
|
472
|
+
h.push({language:l,role:p,label:n})}});return h}function pl(){return new O(2,7,7E3)}function jl(a,b,c,d,e,f){return d==a&&e.O==f.O&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Uj(){return{O:null,mimeType:null,startTime:null,Ie:NaN,uri:null}}function ql(a){return new Promise(function(b,c){a.Pb=function(){return c(pl())};a.td=function(){return b()};a.onError=function(d){return c(d)};a.vd=function(){return c(pl())}})}J("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.He;
|
|
473
|
+
S.prototype.getManifestParserFactory=S.prototype.pg;S.prototype.getManifest=S.prototype.og;S.prototype.retryStreaming=S.prototype.re;S.prototype.setMaxHardwareResolution=S.prototype.Ce;S.prototype.addChaptersTrack=S.prototype.Of;S.prototype.addTextTrackAsync=S.prototype.Pf;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.yb;S.prototype.getPresentationStartTimeAsDate=S.prototype.nf;S.prototype.getPlayheadTimeAsDate=S.prototype.ug;
|
|
474
|
+
S.prototype.setTextTrackVisibility=S.prototype.Ge;S.prototype.getChapters=S.prototype.cg;S.prototype.getChaptersTracks=S.prototype.kf;S.prototype.isTextTrackVisible=S.prototype.Nb;S.prototype.selectVariantsByLabel=S.prototype.bh;S.prototype.selectTextLanguage=S.prototype.we;S.prototype.selectAudioLanguage=S.prototype.Bd;S.prototype.getTextLanguages=S.prototype.xg;S.prototype.getAudioLanguages=S.prototype.Yf;S.prototype.getTextLanguagesAndRoles=S.prototype.yg;
|
|
475
|
+
S.prototype.getAudioLanguagesAndRoles=S.prototype.Zf;S.prototype.selectVariantTrack=S.prototype.ye;S.prototype.selectTextTrack=S.prototype.xe;S.prototype.getThumbnails=S.prototype.zg;S.prototype.getImageTracks=S.prototype.jg;S.prototype.getTextTracks=S.prototype.Ab;S.prototype.getVariantTracks=S.prototype.Za;S.prototype.cancelTrickPlay=S.prototype.We;S.prototype.trickPlay=S.prototype.Me;S.prototype.getPlaybackRate=S.prototype.zb;S.prototype.isBuffering=S.prototype.Jc;S.prototype.getKeyStatuses=S.prototype.hd;
|
|
476
|
+
S.prototype.getExpiration=S.prototype.Dc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.Dg;S.prototype.seekRange=S.prototype.Ia;S.prototype.isAudioOnly=S.prototype.ec;S.prototype.isInProgress=S.prototype.Lb;S.prototype.isLive=S.prototype.T;S.prototype.getAdManager=S.prototype.fd;S.prototype.getAssetUri=S.prototype.Vd;S.prototype.getNetworkingEngine=S.prototype.Ec;S.prototype.getMediaElement=S.prototype.rg;
|
|
477
|
+
S.prototype.getLoadMode=S.prototype.mf;S.prototype.resetConfiguration=S.prototype.Zg;S.prototype.getBufferFullness=S.prototype.$f;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.nh;S.prototype.unload=S.prototype.Oe;S.prototype.detach=S.prototype.detach;S.prototype.attach=S.prototype.yc;
|
|
478
|
+
S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return I(function(h){if(1==h.g)return b={},a?u(h,ig(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Pc()){for(var l in rg)k[l]=!0;for(var m in tg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=Pc()?!!rg[p]:Rc(p);for(var n in l)k[n]=
|
|
479
|
+
Pc()?!!tg[n]:Rc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ia(Bi));
|
|
480
|
+
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Pc()?Gd(l)?!0:MediaSource.isTypeSupported(l)||sd(l):Rc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Tm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=ol;S.setAdManagerFactory=function(a){$k=a};S.registerSupportPlugin=function(a,b){Tm[a]=b};S.prototype.destroy=S.prototype.destroy;
|
|
481
|
+
var Pm="abrstatuschanged",Jm="adaptation",Gm="buffering",nm="downloadfailed",mm="downloadheadersreceived",Ml="drmsessionupdate",Rj="emsg",Qm="error",Sm="expirationupdated",ul="loaded",rl="loading",Hl="manifestparsed",El="mediaqualitychanged",lm="metadata",ll="onstatechange",ml="onstateidle",Hm="ratechange",Xl="streaming",Nm="textchanged",Om="texttrackvisibility",Dl="timelineregionadded",pm="timelineregionenter",qm="timelineregionexit",Lm="trackschanged",yl="unloading",Mm="variantchanged",Um={vh:Pm,
|
|
482
|
+
wh:Jm,xh:Gm,Ch:nm,Dh:mm,Eh:Ml,Lh:Rj,Error:Qm,Mh:Sm,Sh:ul,Th:rl,Yh:Hl,Zh:El,Metadata:lm,di:ll,ei:ml,pi:Hm,zi:"sessiondata",Ai:Xl,Bi:Nm,Ci:Om,Di:Dl,Ei:pm,Fi:qm,Gi:Lm,Li:yl,Ni:Mm},nl=0,Xk=1,Vl=2,gm=3;S.LoadMode={DESTROYED:nl,NOT_LOADED:Xk,MEDIA_SOURCE:Vl,SRC_EQUALS:gm};S.version="v4.0.4";
|
|
483
|
+
var Rm=["output-restricted","internal-error"],Tm={},$k=null,vl={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"},Dm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
484
|
+
ssa:"text/x-ssa",ass:"text/x-ssa"};function Vm(){this.h=[];this.j=this.i=this.g=0};function Wm(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new uf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Wm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
483
485
|
q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.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()};
|
|
484
486
|
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
485
|
-
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};J("shaka.ads.ClientSideAd",
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
function(f){
|
|
489
|
-
function
|
|
490
|
-
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,
|
|
491
|
-
function
|
|
492
|
-
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
487
|
+
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};J("shaka.ads.ClientSideAd",Wm);Wm.prototype.release=Wm.prototype.release;Wm.prototype.getPositionInSequence=Wm.prototype.getPositionInSequence;Wm.prototype.getSequenceLength=Wm.prototype.getSequenceLength;Wm.prototype.setMuted=Wm.prototype.setMuted;Wm.prototype.resize=Wm.prototype.resize;Wm.prototype.isLinear=Wm.prototype.isLinear;Wm.prototype.isMuted=Wm.prototype.isMuted;
|
|
488
|
+
Wm.prototype.setVolume=Wm.prototype.setVolume;Wm.prototype.getVolume=Wm.prototype.getVolume;Wm.prototype.play=Wm.prototype.play;Wm.prototype.pause=Wm.prototype.pause;Wm.prototype.skip=Wm.prototype.skip;Wm.prototype.canSkipNow=Wm.prototype.canSkipNow;Wm.prototype.getTimeUntilSkippable=Wm.prototype.getTimeUntilSkippable;Wm.prototype.isSkippable=Wm.prototype.isSkippable;Wm.prototype.isPaused=Wm.prototype.isPaused;Wm.prototype.getRemainingTime=Wm.prototype.getRemainingTime;
|
|
489
|
+
Wm.prototype.getMinSuggestedDuration=Wm.prototype.getMinSuggestedDuration;Wm.prototype.getDuration=Wm.prototype.getDuration;function Xm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.j=d;this.m=null;this.h=new uf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.0.4");this.g=null;this.h.Fa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Ym(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
490
|
+
function(f){Zm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Xm.prototype.stop=function(){this.g&&this.g.stop();this.A&&fk(this.A)};Xm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Zm(a,b){b.getError();$m(a,null);a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
491
|
+
function Ym(a,b){a.j(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.j(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",d)))}an(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
|
|
492
|
+
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){$m(a,null)}}function bn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
493
|
+
function an(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new L(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Zm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){cn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){cn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
494
|
+
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){$m(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){$m(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
493
495
|
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.m.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.m.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
|
|
494
496
|
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
|
|
495
|
-
function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function
|
|
496
|
-
function
|
|
497
|
+
function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function cn(a,b){var c=b.getAd();a.m=new Wm(c,a.g,a.i);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new L("ad-started",c));a.m.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
|
|
498
|
+
function $m(a,b){a.j(new L("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function dn(a,b){this.i=a;this.h=null;this.g=b}q=dn.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)};
|
|
497
499
|
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.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
498
|
-
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.h=this.i=null};J("shaka.ads.ServerSideAd",
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new
|
|
502
|
-
var f=e.l.currentTime;e.A&&e.A>f&&(e.l.currentTime=e.A,e.A=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new
|
|
503
|
-
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new
|
|
504
|
-
f;e.i(new
|
|
505
|
-
function
|
|
506
|
-
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);eb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new
|
|
507
|
-
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
|
|
508
|
-
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)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.0.
|
|
509
|
-
(c.H=!0),c.j=new Mc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.0.
|
|
500
|
+
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.h=this.i=null};J("shaka.ads.ServerSideAd",dn);dn.prototype.release=dn.prototype.release;dn.prototype.getPositionInSequence=dn.prototype.getPositionInSequence;dn.prototype.getSequenceLength=dn.prototype.getSequenceLength;dn.prototype.setMuted=dn.prototype.setMuted;
|
|
501
|
+
dn.prototype.resize=dn.prototype.resize;dn.prototype.isLinear=dn.prototype.isLinear;dn.prototype.isMuted=dn.prototype.isMuted;dn.prototype.setVolume=dn.prototype.setVolume;dn.prototype.getVolume=dn.prototype.getVolume;dn.prototype.play=dn.prototype.play;dn.prototype.pause=dn.prototype.pause;dn.prototype.skip=dn.prototype.skip;dn.prototype.canSkipNow=dn.prototype.canSkipNow;dn.prototype.getTimeUntilSkippable=dn.prototype.getTimeUntilSkippable;dn.prototype.isSkippable=dn.prototype.isSkippable;
|
|
502
|
+
dn.prototype.isPaused=dn.prototype.isPaused;dn.prototype.getRemainingTime=dn.prototype.getRemainingTime;dn.prototype.getMinSuggestedDuration=dn.prototype.getMinSuggestedDuration;dn.prototype.getDuration=dn.prototype.getDuration;function en(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new uf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){fn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
|
|
503
|
+
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new dn(f,e.l);e.C&&(e.m.h=e.C);e.i(new L("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
|
|
504
|
+
var f=e.l.currentTime;e.A&&e.A>f&&(e.l.currentTime=e.A,e.A=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new L("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new L("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new L("ad-third-quartile"))});
|
|
505
|
+
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new L("ad-complete"));e.i(new L("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new L("ad-skipped"));e.i(new L("ad-stopped"))});this.h.o(this.g,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({start:h.start,end:h.end});e.G=
|
|
506
|
+
f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}en.prototype.stop=function(){this.F="";this.A=null;this.G=[]};en.prototype.release=function(){this.stop();this.h&&this.h.release()};en.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
507
|
+
function fn(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function T(){eb.call(this);this.g=this.i=null;this.h=new Vm;this.j=navigator.language}qa(T,eb);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new Xm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
508
|
+
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);eb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new Vm};q.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.l.requestAds(a)};
|
|
509
|
+
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 en(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
510
|
+
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)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.0.4";c=this.g;var d=b;c.j?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
511
|
+
(c.H=!0),c.j=new Mc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.0.4";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.G};
|
|
510
512
|
q.getStats=function(){var a=this.h;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.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};J("shaka.ads.AdManager",T);
|
|
511
513
|
T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
|
|
512
514
|
T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
|
|
513
515
|
T.AD_VOLUME_CHANGED="ad-volume-changed";T.AD_MUTED="ad-muted";T.AD_PAUSED="ad-paused";T.AD_RESUMED="ad-resumed";T.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";T.CUEPOINTS_CHANGED="ad-cue-points-changed";T.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";T.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";T.AD_CLICKED="ad-clicked";T.AD_PROGRESS="ad-progress";T.AD_BUFFERING="ad-buffering";T.AD_IMPRESSION="ad-impression";T.AD_DURATION_CHANGED="ad-duration-changed";T.AD_CLOSED="ad-closed";
|
|
514
|
-
T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction"
|
|
515
|
-
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(
|
|
516
|
-
function
|
|
517
|
-
function
|
|
518
|
-
var
|
|
519
|
-
getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},
|
|
520
|
-
|
|
521
|
-
for(m in l)
|
|
522
|
-
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.xa();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(
|
|
523
|
-
a):
|
|
524
|
-
q.cast=function(a){var b=this;return I(function(c){if(!b.m)throw new O(1,8,8E3);if(!
|
|
525
|
-
q.get=function(a,b){var c=this;if("video"==a){if(
|
|
526
|
-
q.set=function(a,b,c){this.g[a][b]=c;
|
|
527
|
-
q.
|
|
528
|
-
function
|
|
529
|
-
function
|
|
530
|
-
q.destroy=function(a){a&&this.g.Zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;eb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.bc=function(){return this.B};q.
|
|
531
|
-
q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=
|
|
532
|
-
q.
|
|
533
|
-
function
|
|
534
|
-
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
535
|
-
function
|
|
536
|
-
function
|
|
537
|
-
function
|
|
538
|
-
function
|
|
539
|
-
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new
|
|
540
|
-
function
|
|
541
|
-
function
|
|
542
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
543
|
-
J("shaka.cast.CastProxy",
|
|
544
|
-
q.
|
|
516
|
+
T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";$k=function(){return new T};function gn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){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
|
|
517
|
+
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(ci(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}})}
|
|
518
|
+
function hn(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=jn(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})}
|
|
519
|
+
function jn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
520
|
+
var kn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ln="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),mn=["loop","playbackRate"],nn=["pause","play"],on={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
|
|
521
|
+
getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},pn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},qn=[["getConfiguration","configure"]],rn=[["isTextTrackVisible","setTextTrackVisibility"]],sn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
522
|
+
tn=["attach","detach","load","unload"];function un(a,b,c,d,e,f){var g=this;this.I=a;this.j=new P(b);this.P=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return vn(g)};this.G=function(h,k){var l=hn(k);switch(l.type){case "event":var m=l.targetName;l=Pa(l.event);g.B(m,l);break;case "update":m=l.update;for(var p in m){l=g.g[p]||{};for(var n in m[p])l[n]=m[p][n]}g.C&&(g.P(),g.C=!1);break;case "asyncComplete":if(p=l.id,l=l.error,n=g.i[p],delete g.i[p],n)if(l){p=new O(l.severity,l.category,l.code);
|
|
523
|
+
for(m in l)p[m]=l[m];n.reject(p)}else n.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;wn.add(this)}q=un.prototype;q.destroy=function(){wn["delete"](this);xn(this);yn&&zn(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.qa=function(){return this.h};q.yd=function(){return this.N};
|
|
524
|
+
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.xa();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(wn),d=c.next();!d.done;d=c.next())An(d.value,b)},function(b){for(var c=r(wn),d=c.next();!d.done;d=c.next())d=d.value,Bn="available"==b,d.j.xa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Bn&&this.j.S(Cn);(a=yn)&&a.status!=chrome.cast.SessionStatus.STOPPED?An(this,
|
|
525
|
+
a):yn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Dn),window.__onGCastApiAvailable!=Dn&&Ta("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.ze=function(a){this.A=a;this.h&&En(this,{type:"appData",appData:this.A})};
|
|
526
|
+
q.cast=function(a){var b=this;return I(function(c){if(!b.m)throw new O(1,8,8E3);if(!Bn)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Mc;chrome.cast.requestSession(function(d){return Fn(b,a,d)},function(d){return Gn(b,d)});return u(c,b.l,0)})};function Hn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Fn(a,b,c)},function(c){return Gn(a,c)})}}q.Zb=function(){if(this.h){xn(this);if(yn){zn(this);try{yn.stop(function(){},function(){})}catch(a){}yn=null}vn(this)}};
|
|
527
|
+
q.get=function(a,b){var c=this;if("video"==a){if(nn.includes(b))return function(){return c.yf.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))}}else if("player"==a){if(pn[b]&&!this.get("player","isLive")())return function(){};if(sn.includes(b))return function(){return c.yf.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if(tn.includes(b))return function(){return c.Wg.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if(on[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
528
|
+
q.set=function(a,b,c){this.g[a][b]=c;En(this,{type:"set",targetName:a,property:b,value:c})};function Fn(a,b,c){yn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);vn(a);En(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Gn(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))}
|
|
529
|
+
q.yf=function(a,b){En(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.Wg=function(a,b){var c=Ha.apply(2,arguments),d=new Mc,e=this.J.toString();this.J++;this.i[e]=d;try{En(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function An(a,b){var c=a.K();a.l=new Mc;a.C=!0;Fn(a,c,b)}function zn(a){var b=yn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
530
|
+
function vn(a){var b=yn?"connected"==yn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};xn(a)}a.h=b;a.N=b?yn.receiver.friendlyName:"";a.j.xa()}function xn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function En(a,b){var c=gn(b),d=yn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Wa)}catch(e){throw c=new O(2,8,8005,e),d=new L("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var Cn=.02,Bn=!1,yn=null,wn=new Set;
|
|
531
|
+
function Dn(a){if(a){a=r(wn);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function In(a,b,c){eb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new un(c,function(){return Jn(d)},function(){return Kn(d)},function(e,f){return Ln(d,e,f)},function(){return Mn(d)},function(){return Nn(d)});On(this)}qa(In,eb);q=In.prototype;
|
|
532
|
+
q.destroy=function(a){a&&this.g.Zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;eb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.bc=function(){return this.B};q.Ve=function(){return this.g.m&&Bn};q.qa=function(){return this.g.qa()};q.yd=function(){return this.g.yd()};
|
|
533
|
+
q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=Nn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Oe(),0):c["return"]()})};q.ze=function(a){this.g.ze(a)};q.Gf=function(){Hn(this.g)};q.Zb=function(){this.g.Zb()};
|
|
534
|
+
q.Ze=function(a){var b=this;return I(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.Zb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new un(a,function(){return Jn(b)},function(){return Kn(b)},function(d,e){return Ln(b,d,e)},function(){return Mn(b)},function(){return Nn(b)});b.g.init();z(c)})};
|
|
535
|
+
function On(a){a.g.init();a.m=new uf;for(var b=r(kn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.qa()||(f=Pa(f),a.j.dispatchEvent(f))});for(var d in Um)a.m.o(a.h,Um[d],function(f){a.g.qa()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.sc=e,Object.defineProperty(a.l,b.sc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Pn(a,f.sc)}}(b),set:function(f){return function(g){var h=f.sc;a.g.qa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={sc:b.sc};a.B={};Qn(a,
|
|
536
|
+
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Rn(a,f)}})});Sn(a);a.j=new eb;a.j.nd=a.l;a.A=new eb;a.A.nd=a.B}function Sn(a){var b=new Map;Qn(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)})}
|
|
537
|
+
function Qn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,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)}}
|
|
538
|
+
function Nn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Vd(),startTime:null};a.i.pause();for(var c=r(mn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(qn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(rn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Jn(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
|
|
539
|
+
function Kn(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
540
|
+
function Mn(a){for(var b=r(qn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(mn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(mn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(rn);for(k=
|
|
541
|
+
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new L(Qm,h);a.h.dispatchEvent(h)})}
|
|
542
|
+
function Pn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.qa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.qa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
|
|
543
|
+
function Rn(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Ec()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.fd()};
|
|
544
|
+
if("setVideoContainer"==b)return function(c){return a.h.He(c)};if(a.g.qa()){if("getManifest"==b||"drmInfo"==b)return function(){Ta(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ta(b+"() does not work while casting!");return Promise.resolve()}}return a.g.qa()&&0==Object.keys(a.g.g.video).length&&on[b]||!a.g.qa()?a.h[b].bind(a.h):a.g.get("player",b)}function Ln(a,b,c){a.g.qa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
|
|
545
|
+
J("shaka.cast.CastProxy",In);In.prototype.changeReceiverId=In.prototype.Ze;In.prototype.forceDisconnect=In.prototype.Zb;In.prototype.suggestDisconnect=In.prototype.Gf;In.prototype.setAppData=In.prototype.ze;In.prototype.cast=In.prototype.cast;In.prototype.receiverName=In.prototype.yd;In.prototype.isCasting=In.prototype.qa;In.prototype.canCast=In.prototype.Ve;In.prototype.getPlayer=In.prototype.bc;In.prototype.getVideo=In.prototype.Bb;In.prototype.destroy=In.prototype.destroy;function Tn(a,b,c,d){eb.call(this);var e=this;this.g=a;this.h=b;this.j=new uf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new P(function(){Un(e)});Vn(this)}qa(Tn,eb);q=Tn.prototype;q.isConnected=function(){return this.H};q.Gg=function(){return this.A};q.fh=function(a){this.i=a};q.Vf=function(){this.i=null};
|
|
546
|
+
q.gh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.eh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.dh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
545
547
|
q.destroy=function(){var a=this,b,c;return I(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.A=!0,a.l=null,a.B=null,eb.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
|
|
546
|
-
function
|
|
547
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
548
|
-
!1;
|
|
549
|
-
function
|
|
550
|
-
function
|
|
551
|
-
a.h[
|
|
552
|
-
function
|
|
553
|
-
function
|
|
554
|
-
function
|
|
555
|
-
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return
|
|
556
|
-
function
|
|
557
|
-
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||
|
|
558
|
-
function
|
|
559
|
-
J("shaka.cast.CastReceiver",
|
|
560
|
-
function
|
|
561
|
-
function
|
|
562
|
-
function
|
|
563
|
-
function
|
|
564
|
-
function
|
|
565
|
-
function
|
|
566
|
-
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{
|
|
567
|
-
function
|
|
568
|
-
function
|
|
569
|
-
function
|
|
570
|
-
226,251,75]),m=new Uint8Array([]);k=[{initData:
|
|
571
|
-
function
|
|
572
|
-
var
|
|
548
|
+
function Vn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Wn(a)};b.onSenderDisconnected=function(){return Wn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Xn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Xn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return Yn(a,
|
|
549
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Zn(a,e)};b.start();b=r(kn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return $n(a,"video",e)});for(var d in Um)a.j.o(a.h,Um[d],function(e){return $n(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Ce(3840,2160):a.h.Ce(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
|
|
550
|
+
!1;ao(a)});a.j.o(a.g,"playing",function(){a.A=!1;ao(a)});a.j.o(a.g,"pause",function(){ao(a)});a.j.o(a.h,"unloading",function(){a.A=!0;ao(a)});a.j.o(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.A=!0,ao(a))})).S(bo)})}function Wn(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ao(a)}
|
|
551
|
+
function ao(a){var b;I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new L("caststatuschanged");a.dispatchEvent(b);co(a)||eo(a);z(c)})}
|
|
552
|
+
function fo(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;I(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,B(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=F(v),h=Qm,k=(new Map).set("detail",g),l=new L(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)p=b.video[m],a.g[m]=p;for(n in b.playerAfterLoad)t=b.playerAfterLoad[n],
|
|
553
|
+
a.h[n](t);a.g.autoplay=f;b.manifest&&(a.g.play(),eo(a));z(v)}})}function $n(a,b,c){a.h&&(Un(a),Xn(a,{type:"event",targetName:b,event:c},a.l))}
|
|
554
|
+
function Un(a){a.I.S(go);for(var b={video:{},player:{}},c=r(ln),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in pn)0==a.m%pn[e]&&(b.player[e]=a.h[e]());for(var f in on)0==a.m%on[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);Xn(a,{type:"update",update:b},a.l);co(a)}function co(a){return a.C&&(a.g.duration||a.h.T())?(ho(a),a.C=!1,!0):!1}
|
|
555
|
+
function ho(a,b){var c={contentId:a.h.Vd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);eo(a,void 0===b?0:b,c)}
|
|
556
|
+
function Zn(a,b){var c=hn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;fo(a,c.initState,c.appData);Un(a);break;case "appData":a.G(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.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
|
|
557
|
+
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return io(a,h,g,null)},function(k){return io(a,h,g,k)})}}
|
|
558
|
+
function Yn(a,b){var c=hn(b.data);switch(c.type){case "PLAY":a.g.play();eo(a);break;case "PAUSE":a.g.pause();eo(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(),eo(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),eo(a));break;case "STOP":a.h.Oe().then(function(){a.h&&eo(a)});break;case "GET_STATUS":ho(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));
|
|
559
|
+
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||eo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&ho(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Xn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:Xn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
|
|
560
|
+
function io(a,b,c,d){a.h&&Xn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Xn(a,b,c,d){a.H&&(a=gn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function eo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?jo:a.h.Jc()?ko:a.g.paused?lo:mo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Xn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
|
|
561
|
+
J("shaka.cast.CastReceiver",Tn);Tn.prototype.destroy=Tn.prototype.destroy;Tn.prototype.setContentArtist=Tn.prototype.dh;Tn.prototype.setContentImage=Tn.prototype.eh;Tn.prototype.setContentTitle=Tn.prototype.gh;Tn.prototype.clearContentMetadata=Tn.prototype.Vf;Tn.prototype.setContentMetadata=Tn.prototype.fh;Tn.prototype.isIdle=Tn.prototype.Gg;Tn.prototype.isConnected=Tn.prototype.isConnected;var go=.5,bo=5,jo="IDLE",mo="PLAYING",ko="BUFFERING",lo="PAUSED";function no(a){var b=this;this.g=[];this.h=[];this.data=[];(new yg).box("moov",Cg).Y("pssh",function(c){if(!(1<c.version)){var d=Fc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(pd(c.reader.Cb(16)));if(0<c.version){d=c.reader.R();for(var e=0;e<d;e++){var f=pd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
|
|
562
|
+
function oo(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Ic(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=r(c),c=b.next();!c.done;c=b.next())c=od(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function po(a,b){var c=qo(a,b);return 1!=c.length?null:c[0]}function ro(a,b,c){a=so(a,b,c);return 1!=a.length?null:a[0]}function qo(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function to(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
563
|
+
function so(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function uo(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function vo(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function wo(a){return Array.from(a.childNodes).every(xo)?a.textContent.trim():null}
|
|
564
|
+
function xo(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function yo(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 zo(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
|
|
565
|
+
function Ao(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
566
|
+
function Bo(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Co(a){a=Number(a);return 0===a%1?a:null}function Do(a){a=Number(a);return 0===a%1&&0<a?a:null}function Eo(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Fo(a){a=Number(a);return isNaN(a)?null:a}function Go(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
567
|
+
function Ho(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function Io(a,b){try{var c=dd(a);return Ho(c,b)}catch(d){return null}};function Jo(a,b,c){var d=Ko(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new O(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.ve?(e=h.init||e,!1):!0}),f.length&&(a=Lo(e,f,c,g),0==a.length&&(a=[Db("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Db(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
|
|
568
|
+
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{df:g,Oi:e,drmInfos:a,jf:!0}}function Mo(a,b,c,d){var e=Jo(a,c,d);if(b.jf){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.jf=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new O(2,4,4008);return e.df||b.df}
|
|
569
|
+
function No(a){var b=0,c=Ic(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=Fc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
570
|
+
function Oo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Po(a){a=ro(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=nd(a.textContent);a=No(a).filter(function(b){return b.type===Qo})[0];if(!a)return"";a=fd(a.value,!0);return(a=Ho(a,"WRMHEADER"))?Oo(a):""}
|
|
571
|
+
function Lo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.ve];if(g){var h;if(h=ro(f.node,"urn:microsoft:playready","pro")){h=nd(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:oo(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.ve)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
|
|
572
|
+
226,251,75]),m=new Uint8Array([]);k=[{initData:oo(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Db(g,f.init||a||h||k);if(g=Ro.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Ko(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=So(c.value))&&b.push(c);return b}
|
|
573
|
+
function So(a){var b=a.getAttribute("schemeIdUri"),c=uo(a,"urn:mpeg:cenc:2013","default_KID"),d=so(a,"urn:mpeg:cenc:2013","pssh").map(wo);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:nd(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,ve:b,keyId:c,init:0<e.length?e:null}}
|
|
574
|
+
var Qo=1,Ro=(new Map).set("com.widevine.alpha",function(a){return(a=ro(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Po).set("com.microsoft.playready.recommendation",Po).set("com.microsoft.playready.software",Po).set("com.microsoft.playready.hardware",Po).set("org.w3.clearkey",function(a){return(a=ro(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function To(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=
|
|
573
575
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
574
|
-
function
|
|
575
|
-
|
|
576
|
-
function
|
|
577
|
-
function
|
|
578
|
-
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;
|
|
579
|
-
function
|
|
580
|
-
function
|
|
581
|
-
function
|
|
582
|
-
d)}function
|
|
583
|
-
function
|
|
584
|
-
function
|
|
585
|
-
function
|
|
586
|
-
function
|
|
587
|
-
|
|
588
|
-
function
|
|
589
|
-
function
|
|
590
|
-
Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.M.length||e.Lc(g);return Promise.resolve(e)}}}function
|
|
591
|
-
function
|
|
592
|
-
function
|
|
593
|
-
|
|
594
|
-
function
|
|
595
|
-
function
|
|
596
|
-
y=b.
|
|
597
|
-
function
|
|
598
|
-
function
|
|
599
|
-
function
|
|
600
|
-
|
|
601
|
-
!xa.length||(La=D++,C.push({id:La,language:V.language,primary:V.primary,audio:V,video:ja,bandwidth:(V.bandwidth||0)+(ja.bandwidth||0),drmInfos:xa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),
|
|
602
|
-
a.l=C;z(Fa)}})}function
|
|
603
|
-
function
|
|
604
|
-
function
|
|
605
|
-
function
|
|
606
|
-
function
|
|
607
|
-
h.value,k.push(
|
|
608
|
-
C.value,A.variantIds=[x++];return Y["return"](t.concat(
|
|
609
|
-
function
|
|
610
|
-
C.next())for(A=t.value,
|
|
611
|
-
function
|
|
612
|
-
function
|
|
613
|
-
function
|
|
614
|
-
function
|
|
615
|
-
function
|
|
616
|
-
function
|
|
617
|
-
(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)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
618
|
-
function
|
|
619
|
-
function
|
|
620
|
-
function
|
|
621
|
-
function
|
|
622
|
-
d
|
|
623
|
-
function
|
|
624
|
-
function
|
|
625
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
626
|
-
function
|
|
627
|
-
function
|
|
628
|
-
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return B(c,2),u(c,
|
|
629
|
-
function
|
|
630
|
-
function
|
|
631
|
-
function
|
|
632
|
-
"timeShiftBufferDepth",
|
|
633
|
-
!isNaN(a.g.availabilityWindowOverride)&&(
|
|
634
|
-
A.
|
|
635
|
-
function
|
|
636
|
-
null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,
|
|
637
|
-
function
|
|
638
|
-
}d=c.filter(function(m){return!m.
|
|
639
|
-
[]:
|
|
640
|
-
function
|
|
641
|
-
function
|
|
642
|
-
l}}var
|
|
643
|
-
10)));m=
|
|
644
|
-
1,null!=t)for(t=r(t.split(";")),x=t.next();!x.done;x=t.next())x=x.value,
|
|
645
|
-
(l=l[0],l.textContent&&(
|
|
646
|
-
m.value,
|
|
647
|
-
function
|
|
648
|
-
throw H;}t=
|
|
649
|
-
(C=l.getAttribute("value")),!C))return null;var A;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var
|
|
650
|
-
(
|
|
651
|
-
hdr:A,tilesLayout:C,matchedStreams:[]};
|
|
652
|
-
function
|
|
653
|
-
m.next())
|
|
654
|
-
"height",
|
|
655
|
-
function
|
|
656
|
-
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function
|
|
657
|
-
function
|
|
658
|
-
function
|
|
659
|
-
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),
|
|
660
|
-
case 9:va(
|
|
661
|
-
function
|
|
662
|
-
function
|
|
663
|
-
|
|
664
|
-
function
|
|
665
|
-
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=
|
|
666
|
-
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new
|
|
667
|
-
var
|
|
668
|
-
J("shaka.net.DataUriPlugin",
|
|
669
|
-
q.start=function(a,b){var c=this,d,e;return I(function(f){if(1==f.g)return c.
|
|
670
|
-
q.update=function(){var a=this,b,c,d;return I(function(e){if(1==e.g){if(a.m==
|
|
671
|
-
function
|
|
672
|
-
function
|
|
673
|
-
function
|
|
674
|
-
function
|
|
675
|
-
function
|
|
676
|
-
|
|
677
|
-
primary:!0,audio:"audio"==H?
|
|
678
|
-
(a.
|
|
679
|
-
|
|
680
|
-
function
|
|
681
|
-
function
|
|
682
|
-
r(m),p
|
|
683
|
-
function
|
|
684
|
-
function
|
|
685
|
-
function
|
|
686
|
-
void 0,A.frameRate=Number(h)||void 0,A.hdr=t||void 0;C=a.h.disableAudio;if(!
|
|
687
|
-
!!
|
|
688
|
-
function
|
|
689
|
-
|
|
690
|
-
function
|
|
691
|
-
function
|
|
692
|
-
|
|
693
|
-
function
|
|
694
|
-
Number(k.split("x")[1])*Number(m.split("x")[1]);if(
|
|
695
|
-
function
|
|
696
|
-
function
|
|
697
|
-
function
|
|
698
|
-
"METHOD"),"NONE"!=Y){
|
|
699
|
-
[];if(
|
|
700
|
-
forced:
|
|
701
|
-
function
|
|
702
|
-
function
|
|
703
|
-
function
|
|
704
|
-
if(!a.l)return null}var y=[];if(a.l)for(var x={},
|
|
705
|
-
1].endTime;(a=
|
|
706
|
-
function
|
|
707
|
-
function
|
|
708
|
-
{},c=0;c<m.length;b={rc:b.rc,qc:b.qc,Uc:b.Uc,rb:b.rb,pc:b.pc},c++)if(b.rb=m[c],null==b.rb.g)for(b.qc=0,b.rc=c,d=function(x){return function(){var
|
|
709
|
-
b.value,b=c.g,c=r(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return m}function
|
|
710
|
-
function
|
|
711
|
-
if(!y){if(b==f.ha)return
|
|
712
|
-
function
|
|
713
|
-
var
|
|
714
|
-
image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},
|
|
715
|
-
if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
|
|
716
|
-
|
|
717
|
-
function
|
|
718
|
-
break}return u(K,g(H.value),5);case 5:
|
|
719
|
-
function
|
|
720
|
-
function
|
|
721
|
-
c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(t){var
|
|
722
|
-
function
|
|
723
|
-
function
|
|
724
|
-
function
|
|
725
|
-
function
|
|
726
|
-
q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
727
|
-
q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,
|
|
728
|
-
function
|
|
729
|
-
function
|
|
730
|
-
function
|
|
731
|
-
|
|
732
|
-
function
|
|
733
|
-
function
|
|
734
|
-
function
|
|
735
|
-
|
|
736
|
-
function
|
|
737
|
-
function
|
|
738
|
-
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}
|
|
739
|
-
function
|
|
740
|
-
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
|
|
741
|
-
|
|
576
|
+
function Uo(a,b){var c=Vo(a,b,"timescale"),d=1;c&&(d=Do(c)||1);var e=Vo(a,b,"duration");c=Do(e||"");"image"==a.L.contentType&&(c=Fo(e||""));c&&(c/=d);var f=Vo(a,b,"startNumber");e=Number(Vo(a,b,"presentationTimeOffset"))||0;var g=Eo(f||"");if(null==f||null==g)g=1;var h=Wo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Z.duration||Infinity;h=qo(h,"S");for(var l=[],m=-e,p=0;p<h.length;++p){var n=h[p],t=h[p+1],v=yo(n,"t",Eo),y=yo(n,"d",Eo);n=yo(n,"r",Co);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;n=
|
|
577
|
+
n||0;if(0>n)if(t){t=yo(t,"t",Eo);if(null==t)break;else if(v>=t)break;n=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;n=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=n;++t)m=v+y,l.push({start:v/f,end:m/f,lh:v}),v=m}f=l}return{timescale:d,wa:c,mc:g,qb:e/d||0,Pe:e,timeline:f}}function Vo(a,b,c){return[b(a.L),b(a.Aa),b(a.ra)].filter(Bb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
578
|
+
function Wo(a,b,c){return[b(a.L),b(a.Aa),b(a.ra)].filter(Bb).map(function(d){return po(d,c)}).reduce(function(d,e){return d||e})}
|
|
579
|
+
function Xo(a,b,c,d,e,f){for(var g=uo(a,"http://www.w3.org/1999/xlink","href"),h=uo(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 Xe(new O(2,4,4028));if("onLoad"!=h)return Xe(new O(2,4,4027));var m=Cb([d],[g]);return e.request(0,lf(m,b)).na(function(p){p=Io(p.data,a.tagName);if(!p)return Xe(new O(2,4,4001,g));
|
|
580
|
+
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Yo(a,b,c,m[0],e,f+1)})}
|
|
581
|
+
function Yo(a,b,c,d,e,f){f=void 0===f?0:f;if(uo(a,"http://www.w3.org/1999/xlink","href")){var g=Xo(a,b,c,d,e,f);c&&(g=g.na(void 0,function(){return Yo(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"==uo(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Yo(k,b,c,d,e,f)));return af(g).na(function(){return a})};function Zo(a,b,c,d,e,f,g){var h,k=(new yg).Y("sidx",function(l){h=$o(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
|
|
582
|
+
function $o(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var p=g.reader.pe();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.R(),t=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.R();g.reader.skip(4);if(1==t)throw new O(2,3,3006);h.push(new Wh(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function ap(a){this.h=Ic(a);this.g=new vg(this.h,0)}ap.prototype.Da=function(){return this.g.Da()};
|
|
583
|
+
function bp(a){var b=cp(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=cp(a);a:{d=r(dp);for(var e=d.next();!e.done;e=d.next())if(Dc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.oa();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.oa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.oa();d=Ic(a.h,a.g.oa(),b);a.g.skip(b);return new ep(c,
|
|
584
|
+
d)}function cp(a){var b=a.g.oa(),c=a.g.pb();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fc(a.h,b,c)}var dp=[[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 ep(a,b){this.id=a;this.g=b}
|
|
585
|
+
function fp(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function gp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ap(a.g);for(var p=null,n=null;a.Da();){var t=bp(a);if(187==t.id){var v=hp(t);v&&(t=c*v.mh,v=b+v.Vg,null!=p&&m.push(new Wh(p+g,t+g,l,n,v-1,f,g,h,k)),p=t,n=v)}}null!=p&&m.push(new Wh(p+g,d+g,l,n,null,f,g,h,k));return m}
|
|
586
|
+
function hp(a){var b=new ap(a.g);a=bp(b);if(179!=a.id)throw new O(2,3,3013);a=fp(a);b=bp(b);if(183!=b.id)throw new O(2,3,3012);b=new ap(b.g);for(var c=0;b.Da();){var d=bp(b);if(241==d.id){c=fp(d);break}}return{mh:a,Vg:c}};function ip(a,b){var c=Wo(a,b,"Initialization");if(!c)return null;var d=a.L.Na,e=c.getAttribute("sourceURL");e&&(d=Cb(a.L.Na,[e]));e=0;var f=null;if(c=yo(c,"range",Bo))e=c.start,f=c.end;return new Uh(function(){return d},e,f,jp(a))}
|
|
587
|
+
function kp(a,b){var c=Number(Vo(a,lp,"presentationTimeOffset"))||0,d=Vo(a,lp,"timescale"),e=1;d&&(e=Do(d)||1);var f=c/e||0,g=ip(a,lp);np(a,g);var h=df(a);return{$b:function(){var k=Wo(h,lp,"RepresentationIndex"),l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Cb(h.L.Na,[k]));k=op(h);return pp(h,b,g,l,k.start,k.end,f)}}}
|
|
588
|
+
function pp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,x,w,D,C,A,G;return I(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.wb||!a.Z.uf,l=a.Z.start,m=a.Z.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,v=[n(d,e,f),"webm"==p?n(c.Pa(),c.Sa,c.Ca):null],n=null,u(E,Promise.all(v),2);y=E.h;x=y[0];w=y[1]||null;D=null;C=l-g;A=l;G=m?l+m:Infinity;if("mp4"==p)var H=Zo(x,e,d,c,C,A,G);else{H=new ap(w);if(440786851!=bp(H).id)throw new O(2,3,3008);var N=bp(H);if(408125543!=N.id)throw new O(2,3,3009);H=N.g.byteOffset;
|
|
589
|
+
N=new ap(N.g);for(var K=null;N.Da();){var M=bp(N);if(357149030==M.id){K=M;break}}if(!K)throw new O(2,3,3010);K=new ap(K.g);M=1E6;for(N=null;K.Da();){var V=bp(K);if(2807729==V.id)M=fp(V);else if(17545==V.id)if(4==V.g.byteLength)N=V.g.getFloat32(0);else if(8==V.g.byteLength)N=V.g.getFloat64(0);else throw new O(2,3,3003);}if(null==N)throw new O(2,3,3011);K=M/1E9;N*=K;M=bp(new ap(x));if(475249515!=M.id)throw new O(2,3,3007);H=gp(M,H,K,N,d,c,C,A,G)}D=H;h.ic(D);t=new Yi(D);k&&t.xb(A,G,!0);return E["return"](t)})}
|
|
590
|
+
function lp(a){return a.Rc}function op(a){var b=Wo(a,lp,"RepresentationIndex");a=Vo(a,lp,"indexRange");a=Bo(a||"");b&&(a=yo(b,"range",Bo,a));return a}function np(a,b){qp(a,b);if(!op(a))throw new O(2,4,4002);}function qp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Hb&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
|
|
591
|
+
function jp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.rd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function rp(a,b){var c=ip(a,sp),d=tp(a);if(!d.wa&&!d.timeline&&1<d.fc.length)throw new O(2,4,4002);if(!d.wa&&!a.Z.duration&&!d.timeline&&1==d.fc.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.ra.id&&a.L.id&&(f=b[a.ra.id+","+a.L.id])&&(e=f.segmentIndex);var g=up(a.Z.start,a.Z.duration,a.L.Na,d,c);c=!e;e?e.hc(g,a.presentationTimeline.mb()):e=new Yi(g);a.presentationTimeline.ic(g);a.wb&&a.Z.uf||e.xb(a.Z.start,a.Z.duration?a.Z.start+a.Z.duration:
|
|
592
|
+
Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.M.length||e.Lc(g);return Promise.resolve(e)}}}function sp(a){return a.Db}function tp(a){var b=vp(a);a=Uo(a,sp);var c=a.mc;0==c&&(c=1);var d=0;a.wa?d=a.wa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{wa:a.wa,startTime:d,mc:c,qb:a.qb,timeline:a.timeline,fc:b}}
|
|
593
|
+
function up(a,b,c,d,e){var f=d.fc.length;d.timeline&&d.timeline.length!=d.fc.length&&(f=Math.min(d.timeline.length,d.fc.length));for(var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Ld:m.Ld},p++){var n=d.fc[p];m.Ld=Cb(c,[n.Mg]);var t=void 0;t=null!=d.wa?l+d.wa:d.timeline?d.timeline[p].end:l+b;k.push(new Wh(a+l,a+t,function(v){return function(){return v.Ld}}(m),n.start,n.end,e,g,a,h));l=t}return k}
|
|
594
|
+
function vp(a){return[a.L.Db,a.Aa.Db,a.ra.Db].filter(Bb).map(function(b){return qo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.rf&&(a.rf=!0);var c=b.getAttribute("media");b=yo(b,"mediaRange",Bo,{start:0,end:null});return{Mg:c,start:b.start,end:b.end}})};function wp(a,b,c,d,e,f){var g=xp(a),h=yp(a);zp(h);var k=df(a);if(h.Ic)return qp(a,g),{$b:function(){var t=To(h.Ic,k.L.id,null,k.bandwidth||null,null);t=Cb(k.L.Na,[t]);return pp(k,b,g,t,0,null,h.qb)}};if(h.wa)return d||(a.presentationTimeline.ie(h.wa),a.presentationTimeline.je(a.Z.start)),{$b:function(){return Ap(k,h,e,g,f)}};var l=null;d=d=null;a.ra.id&&a.L.id&&(d=a.ra.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Bp(k,h,g);c=a.Z.start;var p=a.Z.duration?a.Z.start+a.Z.duration:Infinity,n=Infinity!=
|
|
595
|
+
p;l?(n&&(new Yi(m)).xb(c,p,!0),l.hc(m,a.presentationTimeline.mb())):l=new Yi(m);a.presentationTimeline.ic(m);n&&l.xb(c,p);d&&a.wb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.M.length||l.Lc(m);return Promise.resolve(l)}}}function Cp(a){return a.Sc}function yp(a){var b=Uo(a,Cp),c=Vo(a,Cp,"media");a=Vo(a,Cp,"index");return{wa:b.wa,timescale:b.timescale,mc:b.mc,qb:b.qb,Pe:b.Pe,timeline:b.timeline,ge:c,Ic:a}}
|
|
596
|
+
function zp(a){var b=a.Ic?1:0;b+=a.timeline?1:0;b+=a.wa?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Ic&&(a.timeline=null),a.wa=null);if(!a.Ic&&!a.ge)throw new O(2,4,4002);}
|
|
597
|
+
function Ap(a,b,c,d,e){function f(K){var M=(K-t)*n,V=M+b.qb,Y=M+l;M=Y+n;var ha=Math.min(M,h());Y=new Wh(Y,ha,function(){var ja=To(y,w,K,x,V*v);return Cb(D,[ja])},0,null,d,C,l,h());Y.j=M;return Y}function g(){var K=[Math.max(k.mb(),l),Math.min(k.Ib(),h())].map(function(M){return M-l});return[Math.ceil(K[0]/n),Math.ceil(K[1]/n)-1].map(function(M){return M+t})}function h(){var K=null!=m&&e[m]||p;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Z.start,m=a.ra.id,p=a.Z.duration,n=b.wa,t=b.mc,v=b.timescale,
|
|
598
|
+
y=b.ge,x=a.bandwidth||null,w=a.L.id,D=a.L.Na,C=l-b.qb,A=g();a=a.wb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var G=a;G<=A;++G){var E=f(G);c.push(E)}var H=new Yi(c);c=k.Ib()<h();G=k.T();if(c||G){var N=Math.max(a,A+1);H.Cd(n,function(){var K=k.mb();H.Gb(K);var M=r(g());M.next();M=M.next().value;for(var V=[];N<=M;){var Y=f(N);V.push(Y);N++}return K>h()&&!V.length?null:V})}return Promise.resolve(H)}
|
|
599
|
+
function Bp(a,b,c){var d=a.Z.start,e=a.Z.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Kd:h.Kd,Od:h.Od,Rd:h.Rd,Hd:h.Hd,Td:h.Td,Id:h.Id},k++){var l=b.timeline[k],m=l.start,p=l.lh;l=l.end;h.Rd=k+b.mc;h.Td=p+b.Pe;h.Od=a.L.id;h.Hd=a.bandwidth||null;h.Kd=b.ge;h.Id=a.L.Na;g.push(new Wh(d+m,d+l,function(n){return function(){var t=To(n.Kd,n.Od,n.Rd,n.Hd||null,n.Td);return Cb(n.Id,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
600
|
+
function xp(a){var b=Vo(a,Cp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new Uh(function(){var f=To(b,c,null,d,null);return Cb(e,[f])},0,null,jp(a))};function Dp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Dp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
601
|
+
function Ep(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja,xa,La;return I(function(Fa){switch(Fa.g){case 1:d=Ib;Fp(b);Gp(b);Hp(b);Ip(b);if(!c&&1==b.length){e=b[0];a.g=e.bd;a.h=e.Ed;a.j=e.textStreams;a.i=e.imageStreams;Fa.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Fa["return"]();k=b.map(function(Sa){return Sa.bd});l=b.map(function(Sa){return Sa.Ed});m=b.map(function(Sa){return Sa.textStreams});p=b.map(function(Sa){return Sa.imageStreams});
|
|
602
|
+
n=r(m);for(t=n.next();!t.done;t=n.next())v=t.value,v.push(Jp(d.ha));y=r(p);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(Jp(d.xc));return u(Fa,Kp(a.g,k,f,Lp,Mp),3);case 3:return u(Fa,Kp(a.h,l,f,Lp,Mp),4);case 4:return u(Fa,Kp(a.j,m,f,Lp,Mp),5);case 5:return u(Fa,Kp(a.i,p,f,Lp,Mp),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(K=r(a.g),M=K.next();!M.done;M=K.next())for(V=M.value,Y=r(a.h),ha=Y.next();!ha.done;ha=Y.next())ja=ha.value,xa=ng(V.drmInfos,ja.drmInfos),V.drmInfos.length&&ja.drmInfos.length&&
|
|
603
|
+
!xa.length||(La=D++,C.push({id:La,language:V.language,primary:V.primary,audio:V,video:ja,bandwidth:(V.bandwidth||0)+(ja.bandwidth||0),drmInfos:xa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),G=r(A),E=G.next();!E.done;E=G.next())H=E.value,N=D++,C.push({id:N,language:H.language,primary:H.primary,audio:H.type==d.Fb?H:null,video:H.type==d.Ma?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
604
|
+
a.l=C;z(Fa)}})}function Fp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.bd),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&&dc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.bd=c}}
|
|
605
|
+
function Hp(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&&e.bandwidth==h.bandwidth&&dc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
606
|
+
function Gp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Ed),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&&dc(e.roles,h.roles)&&Bf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Ed=c}}
|
|
607
|
+
function Ip(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
|
|
608
|
+
function Np(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V;return I(function(Y){switch(Y.g){case 1:b=Ib;if(1==a.length)return Y["return"](a[0]);c=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.Fb})});d=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.Ma})});e=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.ha})});f=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.xc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
|
|
609
|
+
h.value,k.push(Op(b.ha));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(Op(b.xc));return u(Y,Kp([],c,0,Pp,Qp),2);case 2:return n=Y.h,u(Y,Kp([],d,0,Pp,Qp),3);case 3:return t=Y.h,u(Y,Kp([],e,0,Pp,Qp),4);case 4:return v=Y.h,u(Y,Kp([],f,0,Pp,Qp),5);case 5:y=Y.h;x=0;if(t.length&&n.length)for(G=r(n),E=G.next();!E.done;E=G.next())for(H=E.value,N=r(t),K=N.next();!K.done;K=N.next())M=K.value,V=x++,M.variantIds.push(V),H.variantIds.push(V);else for(w=t.concat(n),D=r(w),C=D.next();!C.done;C=D.next())A=
|
|
610
|
+
C.value,A.variantIds=[x++];return Y["return"](t.concat(n).concat(v).concat(y))}})}
|
|
611
|
+
function Kp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K;return I(function(M){switch(M.g){case 1:f=Ib;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){M.D(4);break}m=l.value;return u(M,Rp(m,b,c,e,g),5);case 5:p=M.h;if(!p)throw new O(2,4,4037);l=k.next();M.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(v=t.value,y=r(v),x=y.next();!x.done;x=y.next())w=x.value,(D=Sp(w,b,d,e,g))&&a.push(D);C=r(g);for(t=C.next();!t.done;t=
|
|
612
|
+
C.next())for(A=t.value,G={},E=r(A),x=E.next();!x.done;G={ub:G.ub},x=E.next())if(G.ub=x.value,H=G.ub.type==f.ha&&!G.ub.language,N=G.ub.type==f.xc&&!G.ub.tilesLayout,!H&&!N&&(K=a.some(function(V){return function(Y){return Y.mimeType==V.ub.mimeType&&zd(Y.codecs)==zd(V.ub.codecs)}}(G))))throw new O(2,4,4037);return M["return"](a)}})}
|
|
613
|
+
function Rp(a,b,c,d,e){return I(function(f){if(1==f.g)return Tp(b,a),a.matchedStreams?a.segmentIndex?u(f,Up(a,c),2):f.D(2):f["return"](!1);Vp(a,c,d,e);return f["return"](!0)})}
|
|
614
|
+
function Up(a,b){var c,d,e,f,g,h,k;return I(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof aj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
|
|
615
|
+
function Sp(a,b,c,d,e){var f=c(a);Tp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return I(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new aj;return u(g,Up(f,0),0)})});if(!f.matchedStreams)return null;Vp(f,0,d,e);return f}function Vp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Rb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
|
|
616
|
+
function Lp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
617
|
+
function Pp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
618
|
+
function Mp(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))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=ng(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||
|
|
619
|
+
(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)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Lp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Mp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Mp(a.trickModeVideo,b)}
|
|
620
|
+
function Qp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(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)}}}
|
|
621
|
+
function Tp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Wp,video:Wp,text:Xp,image:Yp}[f.type],h={audio:Zp,video:$p,text:aq,image:bq}[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;c.push(f)}b.matchedStreams=c}function Wp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||zd(b.codecs)!=zd(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ng(c,d).length:1)}return c?!1:!0}
|
|
622
|
+
function Xp(a,b){return a.language?b.language?0==Rb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Yp(a){return a.tilesLayout?!0:!1}
|
|
623
|
+
function Zp(a,b,c){if(a.id==c.id)return!0;var d=Rb(a.language,b.language),e=Rb(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;
|
|
624
|
+
d=cq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==dq)return!0;if(d==eq)return!1;d=cq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==dq?!0:d==eq?!1:a.bandwidth&&fq(a.bandwidth,b.bandwidth,c.bandwidth)==dq?!0:!1}
|
|
625
|
+
function $p(a,b,c){if(a.id==c.id)return!0;var d=cq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==dq)return!0;if(d==eq)return!1;if(a.frameRate){d=cq(a.frameRate,b.frameRate,c.frameRate);if(d==dq)return!0;if(d==eq)return!1}return a.bandwidth&&fq(a.bandwidth,b.bandwidth,c.bandwidth)==dq?!0:!1}
|
|
626
|
+
function aq(a,b,c){if(a.id==c.id)return!0;var d=Rb(a.language,b.language),e=Rb(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!=
|
|
627
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function bq(a,b,c){return a.id==c.id?!0:cq(a.width*a.height,b.width*b.height,c.width*c.height)==dq?!0:!1}function Op(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
628
|
+
function Jp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Yi([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
629
|
+
function cq(a,b,c){if(b==a&&a!=c)return eq;if(c==a&&a!=b)return dq;if(b>a){if(c<=a||c-a<b-a)return dq;if(c-a>b-a)return eq}else{if(c>a)return eq;if(a-c<a-b)return dq;if(a-c>a-b)return eq}return gq}function fq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?dq:b<a?eq:gq}var dq=1,gq=0,eq=-1;function hq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new Dp;this.H=0;this.J=new Zb(5);this.G=new P(function(){iq(a)});this.A=new ef;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=hq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return I(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,jq(c),2);d=e.h;c.h&&kq(c,d);if(!c.h)throw new O(2,7,7001);return e["return"](c.i)})};
|
|
630
|
+
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return B(c,2),u(c,jq(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};q.onExpirationUpdated=function(){};
|
|
631
|
+
function jq(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g)return b=lf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),ff(a.A,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,lq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
|
|
632
|
+
function lq(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g){d=Io(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](mq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Yo(d,a.g.retryParameters,f,c,a.h.networkingEngine);ff(a.A,g);return u(k,g.promise,2)}h=k.h;return k["return"](mq(a,h,c))})}
|
|
633
|
+
function mq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja,xa,La,Fa,Sa;return I(function(Ga){switch(Ga.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=qo(b,"Location").map(wo).filter(Bb);0<f.length&&(g=Cb(e,f),e=a.m=g);h=qo(b,"BaseURL");k=h.map(wo);l=Cb(e,k);m=0;h&&h.length&&(m=yo(h[0],"availabilityTimeOffset",Fo)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=yo(b,"minBufferTime",Ao)||0);a.H=yo(b,"minimumUpdatePeriod",Ao,-1);t=yo(b,"availabilityStartTime",zo);v=yo(b,
|
|
634
|
+
"timeShiftBufferDepth",Ao);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=yo(b,"suggestedPresentationDelay",Ao));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=yo(b,"maxSegmentDuration",Ao));C=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.Gb(A.mb());else N=a.g.defaultPresentationDelay||1.5*n,K=null!=x?x:N,A=new Q(t,K,a.g.dash.autoCorrectDrift);A.Tc("static"==C);(M=A.T())&&
|
|
635
|
+
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Fe(v);V=b.getAttribute("profiles")||"";Y={wb:"static"!=C,presentationTimeline:A,ra:null,Z:null,Aa:null,L:null,bandwidth:0,rf:!1,Yb:m,profiles:V.split(",")};ha=nq(a,Y,l,b);ja=ha.duration;xa=ha.periods;"static"!=C&&ha.gf||A.bb(ja||Infinity);a.C&&!a.F&&(La=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.Af(a.C):a.C&&Ta("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
636
|
+
A.ie(D||1);return u(Ga,Ep(a.j,xa,Y.wb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ga.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!A.If()){Ga.D(4);break}Fa=qo(b,"UTCTiming");return u(Ga,oq(a,l,Fa),5);case 5:Sa=Ga.h;if(!a.h)return Ga["return"]();A.Bf(Sa);case 4:A.ce();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ga)}})}
|
|
637
|
+
function nq(a,b,c,d){var e=yo(d,"mediaPresentationDuration",Ao),f=[],g=0;d=qo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=yo(k,"start",Ao,g),p=k.id,n=yo(k,"duration",Ao),t=null;if(l){var v=yo(l,"start",Ao);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=pq(a,b,c,{start:m,duration:t,node:k,uf:null==t||!l});f.push(g);b.ra.id&&t&&(a.N[b.ra.id]=t);if(null==t){g=
|
|
638
|
+
null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,gf:!1}:{periods:f,duration:g,gf:!0}}
|
|
639
|
+
function pq(a,b,c,d){b.ra=qq(d.node,null,c);b.Z=d;b.ra.Yb=b.Yb;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=qo(d.node,"EventStream");c=b.presentationTimeline.mb();e=r(e);for(var f=e.next();!f.done;f=e.next())rq(a,d.start,d.duration,f.value,c);c=qo(d.node,"AdaptationSet").map(function(m){return sq(a,b,m)}).filter(Bb);if(b.wb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Yg);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);
|
|
640
|
+
}d=c.filter(function(m){return!m.Le});c=c.filter(function(m){return m.Le});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Le.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={Zc:h.Zc},l=k.next())h.Zc=l.value,h.Zc.trickModeVideo=e.streams.find(function(m){return function(p){return zd(m.Zc.codecs)==zd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:tq(d,"audio");g=a.g.disableVideo?[]:tq(d,"video");f=a.g.disableText?
|
|
641
|
+
[]:tq(d,Hb);c=a.g.disableThumbnails?[]:tq(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ra.id,bd:d,Ed:e,textStreams:g,imageStreams:f}}
|
|
642
|
+
function tq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
643
|
+
function sq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Aa=qq(c,b.ra,null);var e=!1,f=qo(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(Bb),h=void 0,k=b.Aa.contentType==Hb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
644
|
+
l}}var p;m=qo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=qo(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
|
|
645
|
+
10)));m=qo(c,"Accessibility");var v=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var y=r(t),x=y.next();!x.done;x=y.next()){var w=x.value,D=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(x="CC"+n,2==t.length?n+=2:n++,D=w);v.set(x,Lb(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
|
|
646
|
+
1,null!=t)for(t=r(t.split(";")),x=t.next();!x.done;x=t.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+n,n++,w=x),v.set(y,Lb(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=qo(c,"ContentProtection");var C=Jo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Lb(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=qo(c,"Label"))&&l.length&&
|
|
647
|
+
(l=l[0],l.textContent&&(G=l.textContent));l=qo(c,"Representation");c=l.map(function(E){if(E=uq(a,b,C,h,A,G,e,g,v,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.Aa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.Aa.contentType||"application"==b.Aa.contentType)for(b.Aa.contentType=vq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Aa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
648
|
+
m.value,n=r(C.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(Bb);return{id:b.Aa.id||"__fake__"+a.I++,contentType:b.Aa.contentType,language:A,Pi:e,streams:c,drmInfos:C.drmInfos,Le:f,Yg:k}}
|
|
649
|
+
function uq(a,b,c,d,e,f,g,h,k,l){b.L=qq(l,b.Aa,null);a.C=Math.min(a.C,b.L.Yb);if(!wq(b.L))return null;var m=b.Z.start;b.bandwidth=yo(l,"bandwidth",Do)||0;var p=b.L.contentType,n=p==Hb||"application"==p;p="image"==p;try{var t=function(H,N,K){return xq(a,H,N,K)};if(b.L.Rc)var v=kp(b,t);else if(b.L.Db)v=rp(b,a.l);else if(b.L.Sc)v=wp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Na,x=b.Z.duration||0;v={$b:function(){return Promise.resolve($i(m,x,y))}}}}catch(H){if((n||p)&&4002==H.code)return null;
|
|
650
|
+
throw H;}t=qo(l,"ContentProtection");t=Mo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;qo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(p&&((l=qo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
651
|
+
(C=l.getAttribute("value")),!C))return null;var A;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var G=b.L.id?b.ra.id+","+b.L.id:"",E={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,N,K;return I(function(M){if(1==M.g){N=(H=G&&b.wb&&a.l[G])?a.l[G]:E;if(N.segmentIndex)return M.D(0);K=N;return u(M,v.$b(),3)}K.segmentIndex=M.h;z(M)})},closeSegmentIndex:function(){E.segmentIndex&&
|
|
652
|
+
(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,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:t,language:e,label:f,type:b.Aa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.rd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
|
|
653
|
+
hdr:A,tilesLayout:C,matchedStreams:[]};G&&b.wb&&!a.l[G]&&(a.l[G]=E);return E}function iq(a){var b,c;I(function(d){switch(d.g){case 1:return b=0,B(d,2),u(d,jq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();kq(a,b);z(d)}})}function kq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,$b(a.J)))}
|
|
654
|
+
function qq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,rd:null,audioSamplingRate:null,Yb:0};c=c||b.Na;var d=qo(a,"BaseURL"),e=d.map(wo),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=yo(a,"frameRate",Go)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=qo(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
|
|
655
|
+
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=qo(a,"AudioChannelConfiguration");m=yq(m)||b.rd;n=yo(a,"audioSamplingRate",Eo)||b.audioSamplingRate;f||(f=vq(g,h));var t=po(a,"SegmentBase"),v=po(a,"SegmentTemplate"),y=t?yo(t,"availabilityTimeOffset",Fo)||0:0,x=v?yo(v,"availabilityTimeOffset",Fo)||0:0;d=d&&d.length?yo(d[0],"availabilityTimeOffset",Fo)||0:0;d=b.Yb+d+y+x;return{Na:Cb(c,e),Rc:t||b.Rc,Db:po(a,"SegmentList")||b.Db,Sc:v||b.Sc,width:yo(a,"width",Eo)||b.width,height:yo(a,
|
|
656
|
+
"height",Eo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),rd:m,audioSamplingRate:n,Yb:d}}
|
|
657
|
+
function yq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
658
|
+
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function wq(a){var b=a.Rc?1:0;b+=a.Db?1:0;b+=a.Sc?1:0;if(0==b)return a.contentType==Hb||"application"==a.contentType?!0:!1;1!=b&&(a.Rc&&(a.Db=null),a.Sc=null);return!0}
|
|
659
|
+
function zq(a,b,c,d){var e,f,g,h,k,l;return I(function(m){if(1==m.g)return e=Cb(b,[c]),f=lf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),ff(a.A,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=dd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
660
|
+
function oq(a,b,c){var d,e,f,g,h,k,l,m;return I(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.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){p.D(4);break}h=g.value;B(p,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 p.D(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 p.D(8);
|
|
661
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p["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":Ta("NTP UTCTiming scheme is not supported");break;default:Ta("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return u(p,zq(a,b,l,"HEAD"),10);case 10:return p["return"](p.h);case 8:return u(p,zq(a,b,l,"GET"),11);case 11:return p["return"](p.h);
|
|
662
|
+
case 9:va(p,3);break;case 5:F(p);case 3:g=f.next();p.D(2);break;case 4:return Ta("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p["return"](0)}})}
|
|
663
|
+
function rq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=yo(d,"timescale",Eo)||1;d=r(qo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=yo(k,"presentationTime",Eo)||0,m=yo(k,"duration",Eo)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
|
|
664
|
+
function xq(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=rf,f=pj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),ff(a.A,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function vq(a,b){return Gd(xd(a,b))?Hb:a.split("/")[0]}J("shaka.dash.DashParser",hq);tg.mpd=function(){return new hq};rg["application/dash+xml"]=function(){return new hq};rg["video/vnd.mpeg.dash.mpd"]=function(){return new hq};function Aq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Bq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Bq.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};
|
|
665
|
+
Bq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function U(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Cq(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function Dq(a,b,c){c=void 0===c?[]:c;this.h=b;this.i=a;this.g=c}function Eq(a,b){this.name=a;this.value=b};function Fq(a,b){return a.filter(function(c){return c.name==b})}function Gq(a,b){return a.filter(function(c){return Cq(c,"TYPE")==b})}function Hq(a,b){var c=Fq(a,b);return c.length?c[0]:null}function Iq(a){var b=0;b=void 0===b?0:b;return(a=Hq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b};function Jq(a){this.h=a;this.g=0}function Kq(a){Lq(a,/[ \t]+/gm)}function Lq(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 Mq(a){return a.g==a.h.length?null:(a=Lq(a,/[^ \t\n]*/gm))?a[0]:null};function Nq(){this.g=0}
|
|
666
|
+
function Oq(a,b,c){b=dd(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=Pq(a,g),--a.g,Qq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Pq(a,h);if(Rq.includes(h.name)){if(1!=b)throw new O(2,4,4017);
|
|
667
|
+
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Pq(a,m),Qq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==U(m,"TYPE")?k.push(m):"MAP"==U(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Cb([d],[m.trim()])[0],h&&g.push(h),e.push(new Dq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Dq("",g,k)));return new Aq(c,b,f,e)}f.push(h);
|
|
668
|
+
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Eq("URI",k)),e=!0)}}return new Aq(c,b,f)}function Pq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new O(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Jq(f);var h;(h=Lq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Lq(f,k);)d.push(new Eq(h[1],h[2]||h[3])),Kq(f)}return new Bq(c,e,d,g)}
|
|
669
|
+
var Qq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Rq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Sq(){}function Tq(a){try{var b=Uq(a);return Ze({uri:a,wf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Xe(c)}}function Uq(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=nd(a):e=hd(a);return{data:e,contentType:c}}
|
|
670
|
+
J("shaka.net.DataUriPlugin",Sq);Sq.parse=Tq;hf("data",Tq);function Vq(){var a=this;this.h=this.j=null;this.ya=1;this.A=new Map;this.C=new Map;this.ma=new Set;this.g=new Map;this.i=null;this.K="";this.$=new Nq;this.ea=0;this.U=!1;this.N=null;this.F=new P(function(){Wq(a)});this.m=Xq;this.I=null;this.aa=0;this.H=Infinity;this.X=this.ba=0;this.G=new ef;this.P=[];this.J=new Map;this.za=!1;this.B=new Map;this.ua=new Map;this.l=!1}q=Vq.prototype;q.configure=function(a){this.h=a};
|
|
671
|
+
q.start=function(a,b){var c=this,d,e;return I(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,Yq(c,a),2);if(3!=f.g)return d=f.h,c.K=d.uri,u(f,Zq(c,d.data,a),3);e=c.ea;0<e&&c.F.S(e);return f["return"](c.I)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.h=this.j=null;this.ma.clear();this.I=null;this.g.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
|
|
672
|
+
q.update=function(){var a=this,b,c,d;return I(function(e){if(1==e.g){if(a.m==Xq)return e["return"]();b=[];c=Array.from(a.g.values());return c.length?u(e,$q(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push($q(a,c[d]));return u(e,Promise.all(b),0)})};
|
|
673
|
+
function $q(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v;return I(function(y){if(1==y.g)return c=ar,d=b.Nf,e=new kb(d),a.l&&b.Sf&&nb(e,new pb("_HLS_skip=YES")),u(y,Yq(a,e.toString()),2);f=y.h;g=Oq(a.$,f.data,f.uri);if(1!=g.type)throw new O(2,4,4017);h=Fq(g.g,"EXT-X-DEFINE");k=br(a,h);l=b.stream;m=cr(a,g,l.type,b.Kc,k);l.segmentIndex.hc(m,a.i.mb());m.length&&(p=Iq(g.g),n=b.Kc.get(p),l.segmentIndex.Gb(n));t=m[m.length-1];if(v=Hq(g.g,"EXT-X-ENDLIST"))dr(a,c.Mf),a.i.bb(t.endTime);z(y)})}q.onExpirationUpdated=function(){};
|
|
674
|
+
function er(a){if(!a.U){for(var b=-1,c=new Map,d=r(a.g.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.M[0]||null))for(var g=r(e.Kc),h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.N=b;b=r(a.g.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.N-c.get(d),e.M.splice(0,f),(e=e.M[0]||null)&&fr(d,-e.startTime);a.U=!0}}}
|
|
675
|
+
function gr(a){if(!a.U){for(var b=Infinity,c=r(a.g.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.M[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){c=r(a.g.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;null!=e&&(e=e.M[0]||null,null==e.g?Ra("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Dd,"Expect AV sync issues!"):fr(d,e.g-b-e.startTime))}a.U=!0}}}
|
|
676
|
+
function fr(a,b){a.stream.segmentIndex.offset(b);a.ee+=b;for(var c=r(a.Kc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.Kc.set(d,e+b)}}
|
|
677
|
+
function Zq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja,xa,La,Fa,Sa,Ga,rc,Qc,Dd,Ed,qb,Fd,sc,Ee;return I(function(ab){switch(ab.g){case 1:d=Oq(a.$,b,a.K);e=Fq(d.g,"EXT-X-DEFINE");hr(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.h.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],N=Bd(G),K=new Map,u(ab,ir(a,d,c,c,N,H,"",!0,"Media Playlist",null,K,null,!1,!1,E),8);k=Fq(d.g,"EXT-X-MEDIA");l=Fq(d.g,"EXT-X-STREAM-INF");m=Fq(d.g,"EXT-X-IMAGE-STREAM-INF");jr(a,l);p=
|
|
678
|
+
Fq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(v=t.value,y=U(v,"DATA-ID"),x=U(v,"URI"),w=U(v,"LANGUAGE"),D=U(v,"VALUE"),C=(new Map).set("id",y),x&&C.set("uri",Cb([a.K],[x])[0]),w&&C.set("language",w),D&&C.set("value",D),A=new L("sessiondata",C),a.j)a.j.onEvent(A);return u(ab,kr(a,k),4);case 4:return lr(a,k),u(ab,mr(a,l),5);case 5:return f=ab.h,u(ab,nr(a,k),6);case 6:return g=ab.h,u(ab,or(a,m),7);case 7:h=ab.h;ab.D(3);break;case 8:M=ab.h,a.g.set(c,M),f.push({id:0,language:"und",
|
|
679
|
+
primary:!0,audio:"audio"==H?M.stream:null,video:"video"==H?M.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new O(2,7,7001);a.h.hls.ignoreManifestProgramDateTime?er(a):gr(a);if(a.za&&0==f.length)throw new O(2,4,4034);V=Infinity;Y=r(a.g.values());for(ha=Y.next();!ha.done;ha=Y.next())ja=ha.value,"text"!=ja.stream.type&&(V=Math.min(V,ja.ee));a.m!=Xq?(a.i=new Q(0,a.h.defaultPresentationDelay?a.h.defaultPresentationDelay:a.X?a.X:3*a.aa),a.i.Tc(!1)):
|
|
680
|
+
(a.i=new Q(null,0),a.i.Tc(!0));if(a.m!=Xq)a.ea=a.H,xa=ar,a.m==xa.Te&&(La=a.i.xd,isNaN(a.h.availabilityWindowOverride)||(La=a.h.availabilityWindowOverride),a.i.Fe(La));else for(a.i.bb(V),Fa=r(a.g.values()),ha=Fa.next();!ha.done;ha=Fa.next())Sa=ha.value,Sa.stream.segmentIndex.xb(0,V);a.P=[];Ga=[];rc=r(f);for(Qc=rc.next();!Qc.done;Qc=rc.next())for(Dd=Qc.value,Ed=r([Dd.video,Dd.audio]),qb=Ed.next();!qb.done;qb=Ed.next())(Fd=qb.value)&&Ga.push(Fd);return u(ab,Promise.all(Ga.map(function(kg){return I(function(lg){return u(lg,
|
|
681
|
+
kg.createSegmentIndex(),0)})})),9);case 9:sc=r(Ga);for(qb=sc.next();!qb.done;qb=sc.next())Ee=qb.value,a.P.push(Ee.segmentIndex.M);pr(a);a.i.ce();a.I={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.I);z(ab)}})}function hr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=U(e,"NAME");e=U(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}
|
|
682
|
+
function br(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=U(f,"NAME");var g=U(f,"VALUE");f=U(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}function jr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=U(e,"AUDIO");d=U(e,"VIDEO");var g=U(e,"SUBTITLES");e=qr(a,e);if(g){var h=Fb(Hb,e);a.B.set(g,h);cc(e,h)}f&&(g=Eb("audio",e),a.B.set(f,g));d&&(f=Eb("video",e),a.B.set(d,f))}}
|
|
683
|
+
function nr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return I(function(v){if(1==v.g)return c=Gq(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return I(function(C){if(1==C.g){if(x=a.h.disableText)return C["return"](null);B(C,2);return u(C,rr(a,y),4)}if(2!=C.g)return w=C.h,C["return"](w.stream);D=F(C);if(a.h.hls.ignoreTextStreamFailures)return C["return"](null);throw D;})}),u(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=Cq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(p=
|
|
684
|
+
r(m),n=p.next();!n.done;n=p.next())t=n.value,t.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
|
|
685
|
+
function or(a,b){var c,d;return I(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return I(function(l){if(1==l.g){if(g=a.h.disableThumbnails)return l["return"](null);B(l,2);return u(l,sr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.h.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
|
|
686
|
+
function kr(a,b){var c;return I(function(d){b=b.filter(function(e){var f=U(e,"URI")||"";return"SUBTITLES"!=U(e,"TYPE")&&""!=f});c=b.map(function(e){return rr(a,e)});return u(d,Promise.all(c),0)})}
|
|
687
|
+
function mr(a,b){var c,d,e;return I(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,t,v;return I(function(y){if(1==y.g)return h=U(g,"FRAME-RATE"),k=Number(U(g,"AVERAGE-BANDWIDTH"))||Number(Cq(g,"BANDWIDTH")),l=U(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,t=U(g,"VIDEO-RANGE"),u(y,tr(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,D=v.video,C=r(D),A=C.next();!A.done;A=C.next())if(A=A.value.stream)A.width=Number(p)||void 0,A.height=Number(n)||
|
|
688
|
+
void 0,A.frameRate=Number(h)||void 0,A.hdr=t||void 0;C=a.h.disableAudio;if(!w.length||C)w=[null];C=a.h.disableVideo;if(!D.length||C)D=[null];C=[];w=r(w);for(A=w.next();!A.done;A=w.next()){A=A.value;for(var G=r(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=A?A.stream:null;var N=H?H.stream:null,K=A?A.stream.drmInfos:null,M=H?H.stream.drmInfos:null;H=(H?H.Dd:"")+" - "+(A?A.Dd:"");E&&N&&K.length&&M.length&&!(0<ng(K,M).length)||a.ma.has(H)||(E={id:a.ya++,language:E?E.language:"und",primary:!!E&&E.primary||
|
|
689
|
+
!!N&&N.primary,audio:E,video:N,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(E),a.ma.add(H))}}y=x.call(y,C)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(zb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
690
|
+
function tr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){if(1==x.g)return c=Ib,d=qr(a,b),e=U(b,"AUDIO"),f=U(b,"VIDEO"),h=(g=e||f)&&a.C.has(g)?a.C.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=Cq(b,"URI"),n=k.audio.find(function(w){return w&&w.Dd==p}),t=Fb(c.Ma,d),(v=Fb(c.Fb,d))&&!t?l=c.Fb:!h.length&&v&&t?(l=c.Ma,d=[[t,v].join()]):k.audio.length&&n?(l=c.Fb,m=!0):l=k.video.length?c.Fb:c.Ma,m?x.D(2):u(x,ur(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
|
|
691
|
+
vr(k);return x["return"](k)})}function qr(a,b){var c=[];a.h.disableVideo||c.push(a.h.hls.defaultVideoCodec);a.h.disableAudio||c.push(a.h.hls.defaultAudioCodec);var d=U(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=Ad(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function wr(a){a=U(a,"LANGUAGE")||"und";return Lb(a)}
|
|
692
|
+
function vr(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 lr(a,b){var c=Gq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=wr(e);var f=Cq(e,"GROUP-ID");e=Cq(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
|
|
693
|
+
function rr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){if(1==x.g){c=Cq(b,"GROUP-ID");d="";var w=Cq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Hb);e=w;e!=Hb&&c&&a.B.has(c)&&(d=a.B.get(c));f=xr(Cq(b,"URI"),a.A);if(a.g.has(f))return x["return"](a.g.get(f));g=wr(b);h=U(b,"NAME");k=U(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=U(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=U(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=U(b,"CHARACTERISTICS");t=U(b,"FORCED");
|
|
694
|
+
v="YES"==t;return u(x,yr(a,f,d,e,g,l,h,m,null,n,v,p),2)}y=x.h;a.C.has(c)?a.C.get(c).push(y):a.C.set(c,[y]);if(null==y)return x["return"](null);if(a.g.has(f))return x["return"](a.g.get(f));a.g.set(f,y);return x["return"](y)})}
|
|
695
|
+
function sr(a,b){var c,d,e,f,g,h,k,l,m,p;return I(function(n){if(1==n.g){c=xr(Cq(b,"URI"),a.A);d=U(b,"CODECS","jpeg")||"";if(a.g.has(c))return n["return"](a.g.get(c));e=wr(b);f=U(b,"NAME");g=U(b,"CHARACTERISTICS");return u(n,yr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(null==h)return n["return"](null);if(a.g.has(c))return n["return"](a.g.get(c));if(k=U(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
|
|
696
|
+
Number(k.split("x")[1])*Number(m.split("x")[1]);if(p=U(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.g.set(c,h);return n["return"](h)})}
|
|
697
|
+
function ur(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){e=xr(Cq(b,"URI"),a.A);if(a.g.has(e))return k["return"](a.g.get(e));var l=U(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=Eb(d,c);return u(k,yr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
|
|
698
|
+
function yr(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,v;return I(function(y){if(1==y.g)return n=Cb([a.K],[b])[0],u(y,Yq(a,n),2);t=y.h;n=t.uri;v=Oq(a.$,t.data,n);return y["return"](ir(a,v,b,n,c,d,e,f,g,h,k,l,m,p))})}
|
|
699
|
+
function ir(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){var y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja,xa,La,Fa,Sa,Ga,rc,Qc,Dd,Ed,qb,Fd,sc,Ee,ab,kg,lg;return I(function(tc){if(1==tc.g){if(1!=b.type)throw new O(2,4,4017);y=Fq(b.g,"EXT-X-DEFINE");x=br(a,y);zr(a,b);return v?tc.D(2):u(tc,Ar(a,f,e,b,x),3)}2!=tc.g&&(v=tc.h);w=[];if(b.segments)for(D=r(b.segments),C=D.next();!C.done;C=D.next())A=C.value,G=Fq(A.h,"EXT-X-KEY"),w.push.apply(w,ia(G));E=!1;H=[];N=new Set;K=r(w);for(M=K.next();!M.done;M=K.next())if(V=M.value,Y=Cq(V,
|
|
700
|
+
"METHOD"),"NONE"!=Y){E=!0;if("AES-128"==Y)return a.za=!0,tc["return"](null);ha=Cq(V,"KEYFORMAT");if(xa=(ja=Br[ha])?ja(V,v):null){if(xa.keyIds)for(La=r(xa.keyIds),Fa=La.next();!Fa.done;Fa=La.next())Sa=Fa.value,N.add(Sa);H.push(xa)}}if(E&&!H.length)throw new O(2,4,4026);Bi.includes(v)&&(e="");Ga=new Map;try{rc=cr(a,b,f,Ga,x)}catch(mp){if(4035==mp.code)return Ta("Skipping unsupported HLS stream",v,c),tc["return"](null);throw mp;}Qc=rc[rc.length-1].endTime;Dd=new Yi(rc);Ed=f==Hb?"subtitle":void 0;qb=
|
|
701
|
+
[];if(p)for(Fd=r(p.split(",")),sc=Fd.next();!sc.done;sc=Fd.next())Ee=sc.value,qb.push(Ee);kg=(ab=Hq(b.g,"EXT-X-SERVER-CONTROL"))?null!=ab.getAttribute("CAN-SKIP-UNTIL"):!1;lg={id:a.ya++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Dd,mimeType:v,codecs:e,kind:Ed,encrypted:E,drmInfos:H,keyIds:N,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:qb,
|
|
702
|
+
forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return tc["return"]({stream:lg,Dd:c,Nf:d,ee:Qc,Kc:Ga,Sf:kg})})}
|
|
703
|
+
function zr(a,b){var c=Hq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Hq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)dr(a,Xq);else{c?dr(a,Cr):dr(a,Dr);d=Hq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Hq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Cq(c,"PART-TARGET")),a.H=Math.min(a.ba,a.H),c=Hq(b.g,"EXT-X-SERVER-CONTROL"),a.X=c?Number(Cq(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.aa=Math.max(d,a.aa)}}
|
|
704
|
+
function Er(a,b,c,d){c=Hq(c,"EXT-X-MAP");if(!c)return null;var e=Cq(c,"URI");d=xr(Cb([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.ua.has(b)||(c=Fr(d,c),a.ua.set(b,c));return a.ua.get(b)}function Fr(a,b){var c=0,d=null,e=U(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Uh(function(){return[a]},c,d)}
|
|
705
|
+
function Gr(a,b,c,d,e,f,g,h){var k=d.h,l=xr(d.i,f),m=Hq(k,"EXTINF"),p=f=0,n=null;d.g.length&&!a.l&&Ta("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var t=null;if(!a.h.hls.ignoreManifestProgramDateTime){var v=Hq(k,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(t=zo(v.value))}v=Xh;Hq(k,"EXT-X-GAP")&&(v=2);if(!m){if(0==d.g.length)throw new O(2,4,4024,"EXTINF");
|
|
706
|
+
if(!a.l)return null}var y=[];if(a.l)for(var x={},w=0;w<d.g.length;x={Md:x.Md},w++){var D=d.g[w],C=0==w?c:y[y.length-1],A=0==w?e:C.endTime,G=Number(U(D,"DURATION"))||a.ba;if(G){G=A+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(C=U(D,"BYTERANGE-START"))?Number(C):0:(E=U(D,"BYTERANGE"),C=r(Hr(C,E)),E=C.next().value,H=C.next().value);if(D=U(D,"URI"))x.Md=Cb([g],[D])[0],y.push(new Wh(A,G,function(N){return function(){return[N.Md]}}(x),E,H,b,0,0,Infinity))}}m?f=e+Number(m.value.split(",")[0]):f=y[y.length-
|
|
707
|
+
1].endTime;(a=Hq(k,"EXT-X-BYTERANGE"))?(n=r(Hr(c,a.value)),p=n.next().value,n=n.next().value):y.length&&(p=y[0].Sa,n=y[y.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=Hq(k,"EXT-X-TILES"))&&(c=Cq(h,"LAYOUT"),(h=U(h,"DURATION"))&&(a=Number(h)));return new Wh(e,f,function(){return l.length?[l]:[]},p,n,b,0,0,Infinity,y,c,a,t,v)}function Hr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+d-1);return[c,d]}
|
|
708
|
+
function pr(a){if(a.i){for(var b=r(a.P),c=b.next();!c.done;c=b.next())a.i.ic(c.value);a.P=[]}}
|
|
709
|
+
function cr(a,b,c,d,e){var f=b.segments,g=Iq(b.g),h=Hq(b.g,"EXT-X-SKIP");h=h?Number(U(h,"SKIPPED-SEGMENTS")):0;var k=g+h,l=0;a.m!=Xq&&d.has(k)&&(l=d.get(k));for(var m=[],p=null,n=0;n<f.length;n++){var t=f[n],v=0==n?l:p.endTime;k=g+h+n;d.set(k,v);var y=Er(a,b.h,t.h,e);!a.l&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());(p=y=Gr(a,y,p,t,v,e,b.h,c))&&(a.h.hls.ignoreManifestProgramDateTime&&null!=a.N&&k<a.N||m.push(y))}if(a=m.some(function(x){return null!=x.g}))for(b=
|
|
710
|
+
{},c=0;c<m.length;b={rc:b.rc,qc:b.qc,Uc:b.Uc,rb:b.rb,pc:b.pc},c++)if(b.rb=m[c],null==b.rb.g)for(b.qc=0,b.rc=c,d=function(x){return function(){var w=m[x.rc];if(w){if(null!=w.g)return w.g+x.qc;x.qc-=w.endTime-w.startTime;x.rc+=1}return null}}(b),b.pc=0,b.Uc=c,e=function(x){return function(){var w=m[x.Uc];if(w){w!=x.rb&&(x.pc+=w.endTime-w.startTime);if(null!=w.g)return w.g+x.pc;--x.Uc}return null}}(b);null==b.rb.g;)b.rb.g=e(),null==b.rb.g&&(b.rb.g=d());if(a)for(a=r(m),b=a.next();!b.done;b=a.next())for(c=
|
|
711
|
+
b.value,b=c.g,c=r(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return m}function xr(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}
|
|
712
|
+
function Ar(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,x;return I(function(w){if(1==w.g){f=Ib;g=rf;h=Math.trunc((d.segments.length-1)/2);k=xr(d.segments[h].i,e);l=new kb(k);m=l.Ka.split(".").pop();p=Ir[b];if(n=p[m])return w["return"](n);if(b==f.ha){if("vtt"==c||"wvtt"==c)return w["return"]("text/vtt");if(c&&""!==c)return w["return"]("application/mp4")}if(b==f.xc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");t=lf([k],a.h.retryParameters);t.method="HEAD";return u(w,Jr(a,t,g),2)}v=w.h;y=v.headers["content-type"];
|
|
713
|
+
if(!y){if(b==f.ha)return w["return"]("text/vtt");x=p.mp4;return w["return"](x)}return w["return"](y.split(";")[0])})}function Yq(a,b){var c=lf([b],a.h.retryParameters);a.j.modifyManifestRequest(c,{format:"h"});return Jr(a,c,0)}function Wq(a){var b,c;I(function(d){if(1==d.g){if(!a.j)return d["return"]();B(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ea,a.F.S(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.F.S(.1);z(d)})}
|
|
714
|
+
function dr(a,b){a.m=b;a.i&&a.i.Tc(a.m==Xq);a.m!=Xq||a.F.stop()}function Jr(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.j.networkingEngine.request(c,b);ff(a.G,b);return b.promise}J("shaka.hls.HlsParser",Vq);
|
|
715
|
+
var Ir={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"},
|
|
716
|
+
image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Br={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);return Db("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Cq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Cq(a,"URI");b=Uq(b);b=Fc(b.data);b=Db("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);
|
|
717
|
+
if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Cq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Cq(a,"URI");a=Uq(a);a=Fc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=oo(a,b,new Set,0);return Db("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Xq="VOD",Dr="EVENT",Cr="LIVE",ar={Mf:Xq,Hh:Dr,Te:Cr};
|
|
718
|
+
Uc("Tizen 3")||Uc("Tizen 2")||Wc()||(tg.m3u8=function(){return new Vq},rg["application/x-mpegurl"]=function(){return new Vq},rg["application/vnd.apple.mpegurl"]=function(){return new Vq});function Kr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,wf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Lr(){}function Mr(a,b,c,d,e){var f=new Nr;zf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Or,h={Xe:!1,Hf:!1};a=Pr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new We(a,function(){h.Xe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new P(function(){h.Hf=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
|
|
719
|
+
function Pr(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,x,w,D,C;return I(function(A){switch(A.g){case 1:return h=Qr,k=Rr,n=p=0,t=Date.now(),B(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(Sr(l.headers)),v=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=function(G){function E(){var H,N;return I(function(K){switch(K.g){case 1:return B(K,2),u(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return F(K),K["return"]();case 3:if(H.done){K.D(5);break}p+=H.value.byteLength;if(!g){K.D(5);
|
|
720
|
+
break}return u(K,g(H.value),5);case 5:N=Date.now();if(100<N-t||H.done)e(N-t,p-n,x-p),n=p,t=N;H.done?G.close():(G.enqueue(H.value),E());z(K)}})}E()},new k({start:w}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=F(A);if(d.Xe)throw new O(1,1,7001,a,b);if(d.Hf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,D,b);case 3:return C=Sr(l.headers),A["return"](Kr(C,m,l.status,a,l.url,b))}})}function Sr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
721
|
+
function Tr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}J("shaka.net.HttpFetchPlugin",Lr);Lr.isSupported=Tr;Lr.parse=Mr;var Qr=window.fetch,Or=window.AbortController,Rr=window.ReadableStream,Nr=window.Headers;Tr()&&(hf("http",Mr,2,!0),hf("https",Mr,2,!0),hf("blob",Mr,2,!0));function Ur(){}
|
|
722
|
+
function Vr(a,b,c,d,e){var f=new Wr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new O(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=Xr(f);e(t);p=!0}};f.onload=function(){var t=Xr(f),v=f.response;try{var y=Kr(t,v,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(t){m(new O(1,1,1002,a,t,
|
|
723
|
+
c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new We(k,function(){f.abort();return Promise.resolve()})}
|
|
724
|
+
function Xr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}J("shaka.net.HttpXHRPlugin",Ur);Ur.parse=Vr;var Wr=window.XMLHttpRequest;hf("http",Vr,1,!0);hf("https",Vr,1,!0);hf("blob",Vr,1,!0);function Yr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Zr(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Sa+":"+a.Ca}function $r(a,b){return pj(a.g.Pa(),a.g.Sa,a.g.Ca,b.streaming.retryParameters)};function as(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function bs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}as.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 cs(a){var b=this;this.A=a;this.j=new Map;this.i=new sf(function(){return ds(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new as}cs.prototype.destroy=function(){return this.i.destroy()};function es(a,b,c){a.m=b;a.l=c}function ds(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
725
|
+
function fs(a,b,c,d,e,f){tf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return I(function(v){if(1==v.g)return u(v,gs(a,c),2);h=v.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=Fc(h),l=new no(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function hs(a){return I(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
|
|
726
|
+
function gs(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=rf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;cc(a.h,e);return g["return"](f.data)})};function is(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Mc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}is.prototype.abort=function(){var a=this;return I(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);z(b)})};
|
|
727
|
+
function js(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return I(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}is.prototype.store=function(){return this.h};is.prototype.promise=function(){return this.g};function ks(a){this.h=a;this.g=[]}ks.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function ls(a,b){return ms(a,b,"readwrite")}function ms(a,b,c){c=a.h.transaction([b],c);var d=new is(c,b);a.g.push(d);d.promise().then(function(){cc(a.g,d)},function(){cc(a.g,d)});return d};function ns(a,b,c){this.h=new ks(a);this.i=b;this.g=c}q=ns.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return os(this.i)};q.removeSegments=function(a,b){return ps(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,qs(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.$e(e)}))})};q.addManifests=function(){return os(this.g)};
|
|
728
|
+
q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function rs(a,b,c){a=ls(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=ls(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return ps(this,this.g,a,b)};
|
|
729
|
+
q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,qs(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Ac(e)})))})};q.getAllManifests=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=ms(a.h,a.g,"readonly"),c=new Map,u(d,js(b,function(e,f){var g;return I(function(h){if(1==h.g)return u(h,a.Ac(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.$e=function(a){return a};q.Ac=function(a){return Promise.resolve(a)};
|
|
730
|
+
function os(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=ls(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Yc:g.Yc},k=h.next())l=k.value,g.Yc=e.add(l),g.Yc.onsuccess=function(p){return function(){f.push(p.Yc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
|
|
731
|
+
function ps(a,b,c,d){a=ls(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Xc:e.Xc},f=c.next())e.Xc=f.value,b["delete"](e.Xc).onsuccess=function(g){return function(){return d(g.Xc)}}(e);return a.promise()}
|
|
732
|
+
function qs(a,b,c){var d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=ms(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={wc:h.wc,tc:h.tc},l=k.next())h.tc=l.value,h.wc=e.get(h.tc),h.wc.onsuccess=function(p){return function(){void 0==p.wc.result&&g.push(p.tc);f[p.tc]=p.wc.result}}(h);return u(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(p){return f[p]}))})};function ss(a){this.g=new ks(a)}ss.prototype.destroy=function(){return this.g.destroy()};ss.prototype.getAll=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=ms(a.g,"session-ids","readonly"),c=[],u(d,js(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};ss.prototype.add=function(a){var b=ls(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()};
|
|
733
|
+
ss.prototype.remove=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=ls(b.g,"session-ids"),u(d,js(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function ts(){this.g=new Map}ts.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)};ts.prototype.init=function(){var a=this;us.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)};
|
|
734
|
+
function vs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ra:d,Ba:f},Ba:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function ws(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ra:d,Ba:f},e)})})}
|
|
735
|
+
function xs(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 ys(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function zs(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()}
|
|
736
|
+
function As(a){var b,c,d;return I(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=us,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Bs(a,b){us.set(a,b)}J("shaka.offline.StorageMuxer",ts);ts.unregister=function(a){us["delete"](a)};ts.register=Bs;ts.prototype.destroy=ts.prototype.destroy;var us=new Map;function Cs(){ns.apply(this,arguments)}qa(Cs,ns);Cs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return I(function(g){d=ls(c.h,c.g);e=d.store();f=new Mc;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 u(g,Promise.all([d.promise(),f]),0)})};
|
|
737
|
+
Cs.prototype.Ac=function(a){var b,c,d,e,f,g;return I(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=Ds(a.periods[c],e),b.push(f);return u(h,Np(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
738
|
+
function Ds(a,b){Es(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Fs(e,a.startTime,b)})}
|
|
739
|
+
function Fs(a,b,c){var d=a.initSegmentUri?Gs(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Gs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
740
|
+
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Cs.prototype.$e=function(a){return{data:a.data}};function Gs(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);}
|
|
741
|
+
function Es(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++,
|
|
742
|
+
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 Hs(){ns.apply(this,arguments)}qa(Hs,ns);
|
|
743
|
+
Hs.prototype.Ac=function(a){var b,c,d,e,f,g;return I(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),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(Is(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Np(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
|
|
742
744
|
a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
743
|
-
function
|
|
744
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function
|
|
745
|
-
q.init=function(){var a=this,b=new Mc,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
|
|
746
|
-
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new
|
|
745
|
+
function Is(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
746
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Js(){ns.apply(this,arguments)}qa(Js,ns);q=Js.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return rs(this,a,b)};q.Ac=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ks(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ks.prototype;
|
|
747
|
+
q.init=function(){var a=this,b=new Mc,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 Cs(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Hs(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Hs(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
|
|
748
|
+
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Js(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new ss(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};
|
|
747
749
|
q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
|
|
748
750
|
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};
|
|
749
|
-
q.erase=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,
|
|
750
|
-
function
|
|
751
|
-
function
|
|
752
|
-
function
|
|
751
|
+
q.erase=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Ls(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
752
|
+
function Ls(){var a=new Mc,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}Bs("idb",function(){return Xc()||Tc()||!window.indexedDB?null:new Ks});function Ms(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ms.prototype.Ra=function(){return this.i};Ms.prototype.Ba=function(){return this.h};Ms.prototype.key=function(){return this.l};Ms.prototype.toString=function(){return this.j};
|
|
753
|
+
function Ns(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 Ms(b,c,d,Number(a[4])):null};function Os(a,b){this.h=a;this.g=b}
|
|
754
|
+
function Ps(a,b){var c=new Q(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Qs(a,d,e,c);e=b.streams.filter(function(l){return l.type==Hb}).map(function(l){return Rs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Rs(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
753
755
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
|
|
754
|
-
function
|
|
755
|
-
e.value,g=
|
|
756
|
-
function
|
|
757
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function
|
|
758
|
-
function
|
|
759
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:d=
|
|
760
|
-
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
761
|
-
|
|
762
|
-
function
|
|
763
|
-
function
|
|
764
|
-
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return I(function(h){if(1==h.g)return B(h,2),u(h,
|
|
765
|
-
function
|
|
766
|
-
function
|
|
767
|
-
case 4:b.h=null,b.g=null,z(k)}})})}function
|
|
768
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
769
|
-
function
|
|
770
|
-
|
|
771
|
-
function
|
|
772
|
-
return u(ha,
|
|
773
|
-
|
|
774
|
-
function
|
|
775
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(
|
|
776
|
-
function
|
|
777
|
-
|
|
778
|
-
for(
|
|
779
|
-
function
|
|
780
|
-
p&&n
|
|
781
|
-
function
|
|
782
|
-
function
|
|
783
|
-
function
|
|
784
|
-
function
|
|
785
|
-
function
|
|
786
|
-
q.list=function(){return
|
|
787
|
-
function
|
|
788
|
-
g),2);if(3!=l.g)return h=l.h,
|
|
789
|
-
function
|
|
790
|
-
function
|
|
791
|
-
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;
|
|
792
|
-
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function
|
|
793
|
-
function
|
|
794
|
-
function
|
|
795
|
-
function
|
|
796
|
-
function
|
|
797
|
-
|
|
798
|
-
var
|
|
799
|
-
|
|
800
|
-
function
|
|
801
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
802
|
-
function
|
|
803
|
-
function
|
|
804
|
-
l=
|
|
805
|
-
|
|
806
|
-
function
|
|
807
|
-
function
|
|
808
|
-
function
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
function
|
|
813
|
-
function
|
|
814
|
-
function
|
|
815
|
-
function
|
|
756
|
+
function Qs(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
|
|
757
|
+
e.value,g=Rs(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=Rs(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}
|
|
758
|
+
function Rs(a,b,c){var d=b.segments.map(function(e){return Ss(a,e)});c.ic(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Yi(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
759
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Ss(a,b){var c=new Ms("segment",a.h,a.g,b.dataKey);return new Wh(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ts(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
760
|
+
function Ts(a,b){var c=new Ms("segment",a.h,a.g,b);return new Uh(function(){return[c.toString()]},0,null)};function Us(){this.g=null}q=Us.prototype;q.configure=function(){};
|
|
761
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:d=Ns(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new ts;ua(m);return u(m,e.init(),4);case 4:return u(m,xs(e,d.Ra(),d.Ba()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Os(d.Ra(),d.Ba()),l=Ps(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
762
|
+
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return d=c.g,e=new ts,B(m,2,3),u(m,e.init(),5);case 5:return u(m,xs(e,d.Ra(),d.Ba()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:F(m),m.D(3)}})};
|
|
763
|
+
rg["application/x-offline-manifest"]=function(){return new Us};function Vs(){}function Ws(a){var b=Ns(a);b&&"manifest"==b.g?(a={uri:a,wf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ze(a)):a=b&&"segment"==b.g?Xs(b.key(),b):Xe(new O(2,1,9004,a));return a}
|
|
764
|
+
function Xs(a,b){var c=new ts;return Ze(void 0).na(function(){return c.init()}).na(function(){return xs(c,b.Ra(),b.Ba())}).na(function(d){return d.getSegments([b.key()])}).na(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}J("shaka.offline.OfflineScheme",Vs);Vs.plugin=Ws;hf("offline",Ws);function Ys(a,b,c){var d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,Zs(y.info,n)){y.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=$s(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
|
|
765
|
+
function $s(a,b,c){var d,e;return I(function(f){switch(f.g){case 1:return d=new Cf({Ob:b,onError:function(){},ud:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),u(f,Kf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),u(f,Vf(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
|
|
766
|
+
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return I(function(h){if(1==h.g)return B(h,2),u(h,Wf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
767
|
+
function Zs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&dc(a.audioCapabilities,b.audioCapabilities,c)&&dc(a.videoCapabilities,b.videoCapabilities,c)};function at(a,b,c){var d=b.presentationTimeline.getDuration();b=bt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ct(a,b){var c=Ps(new Os(a.Ra(),a.Ba()),b),d=b.appMetadata||{};c=bt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
768
|
+
function bt(a){var b=[],c=ye(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(pe(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(qe(c.value));return b};function dt(){this.g={}}function et(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function ft(a,b){a.g[b.id]=b.bandwidth||2048}function gt(a,b){var c=a.g[b];null==c&&(c=0);return c};function ht(a){var b=this;if(a&&a.constructor!=S)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ec()):(this.h=Nk(),this.g=new gf);this.i=[];this.j=[];var c=!a;this.l=new sf(function(){var d,e,f,g,h;return I(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return ds(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return u(k,b.g.destroy(),4);
|
|
769
|
+
case 4:b.h=null,b.g=null,z(k)}})})}function it(){if(Pc())a:{var a=r(us.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=ht.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Kk(a,b));return Pk(this.h,a)};q.getConfiguration=function(){var a=Nk();Pk(a,this.h,Nk());return a};q.Ec=function(){return this.g};
|
|
770
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new cs(this.g);this.j.push(f);b=jt(this,a,b||{},function(){var g;return I(function(h){if(1==h.g)return u(h,qg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new We(b,function(){return ds(f)});b["finally"](function(){cc(d.j,f)});return kt(this,b)};
|
|
771
|
+
function jt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,x,w,D,C;return I(function(A){switch(A.g){case 1:return lt(),h=g=null,k=new ts,p=m=l=null,B(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,mt(a,b,g,e),6);case 6:n=A.h;nt(a);t=!n.presentationTimeline.T()&&!n.presentationTimeline.Lb();if(!t)throw new O(2,9,9005,b);return u(A,ot(a,n,function(G){p=p||G},e),7);case 7:h=A.h;nt(a);if(p)throw p;return u(A,pt(n,e),8);case 8:return u(A,k.init(),9);case 9:return nt(a),u(A,vs(k),10);case 10:return l=A.h,nt(a),v=qt(h,
|
|
772
|
+
n,b,c,e,f),y=v.Jg,x=v.Je,u(A,l.Ba.addManifests([y]),11);case 11:w=A.h;nt(a);m=w[0];nt(a);if(p)throw p;return u(A,rt(a,x,m,y,f,e,l.Ba,n,h),12);case 12:return nt(a),D=new Ms("manifest",l.path.Ra,l.path.Ba,m),A["return"](ct(D,y));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.D(14);break}return u(A,g.stop(),14);case 14:if(!h){A.D(16);break}return u(A,h.destroy(),16);case 16:ya(A,0);break;case 2:C=F(A);if(null==m){A.D(18);break}return u(A,st(m),18);case 18:throw p||C;}})}
|
|
773
|
+
function rt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,v,y,x,w,D;return I(function(C){switch(C.g){case 1:l={};m=0;p=function(A,G){var E,H,N,K,M,V,Y;return I(function(ha){if(1==ha.g){E={};H=r(A);for(N=H.next();!N.done;E={Eb:E.Eb},N=H.next())E.Eb=N.value,K=$r(E.Eb,f),M=E.Eb.i,V=E.Eb.h,Y=function(ja){return function(xa){var La,Fa,Sa;return I(function(Ga){if(1==Ga.g)return u(Ga,g.addSegments([{data:xa}]),2);La=Ga.h;nt(a);Fa=ja.Eb.g;Sa=Zr(Fa);l[Sa]=La[0];m+=xa.byteLength;z(Ga)})}}(E),fs(e,E.Eb.groupId,K,M,V,Y);
|
|
774
|
+
return u(ha,hs(e),2)}if(!G)return ha.D(0);nt(a);tt(h,d,k,f);return u(ha,g.updateManifest(c,d),0)})};n=!1;B(C,2);if(!ut(h)||!n||vt(h)){C.D(4);break}return u(C,p(b.filter(function(A){return A.h}),!0),5);case 5:return nt(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,u(C,wt(g,c,d,t,v,function(){return nt(a)}),6);case 6:nt(a);case 4:if(n){C.D(7);break}return u(C,p(b,!1),8);case 8:return nt(a),y=l,x=m,l={},m=0,u(C,wt(g,c,d,y,x,function(){return nt(a)}),9);case 9:nt(a);case 7:va(C,0);break;case 2:return w=
|
|
775
|
+
F(C),D=Object.values(l),u(C,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function st(a){var b,c,d,e;return I(function(f){switch(f.g){case 1:return b=new ts,u(f,b.init(),2);case 2:return u(f,vs(b),3);case 3:return c=f.h,d=new Ms("manifest",c.path.Ra,c.path.Ba,a),u(f,b.destroy(),4);case 4:return e=new ht,u(f,e.remove(d.toString()),0)}})}
|
|
776
|
+
function wt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,x;return I(function(w){switch(w.g){case 1:g=!1;B(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
|
|
777
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return y=F(w),u(w,st(b),5);case 5:if(g){w.D(6);break}x=Object.values(d);return u(w,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
|
|
778
|
+
function pt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja;return I(function(xa){switch(xa.g){case 1:return c={width:Infinity,height:Infinity},$d(a,b.restrictions,c),u(xa,ce(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Od(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(pe(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=
|
|
779
|
+
n.value,d.push(qe(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(re(x));return u(xa,b.offline.trackSelectionCallback(d),3);case 3:w=xa.h;D=a.presentationTimeline.getDuration();C=0;A=r(w);for(G=A.next();!G.done;G=A.next())E=G.value,H=E.bandwidth*D/8,C+=H;B(xa,4);return u(xa,b.offline.downloadSizeCallback(C),6);case 6:N=xa.h;if(!N)throw new O(2,9,9014);va(xa,5);break;case 4:K=F(xa);if(K instanceof O)throw K;throw new O(2,9,9015);case 5:M=new Set;V=new Set;Y=new Set;ha=r(w);
|
|
780
|
+
for(G=ha.next();!G.done;G=ha.next())ja=G.value,"variant"==ja.type&&M.add(ja.id),"text"==ja.type&&V.add(ja.id),"image"==ja.type&&Y.add(ja.id);a.variants=a.variants.filter(function(La){return M.has(La.id)});a.textStreams=a.textStreams.filter(function(La){return V.has(La.id)});a.imageStreams=a.imageStreams.filter(function(La){return Y.has(La.id)});xt(a);z(xa)}})}
|
|
781
|
+
function qt(a,b,c,d,e,f){var g=at(c,b,d),h=e.offline.progressCallback;es(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Sf(a,"cenc",t)});var k=ut(b)&&!vt(b),l=null;k&&(l=yt.get(a.g.keySystem));for(var m=new dt,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())ft(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())et(m,p.value);m=zt(f,m,b,e);f=m.streams;m=m.Je;n=a.g;p=e.offline.usePersistentLicense;
|
|
782
|
+
n&&p&&(n.initData=[]);return{Jg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Dc(),streams:f,sessionIds:p?$f(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Je:m}}function ut(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
783
|
+
function vt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function tt(a,b,c,d){b.expiration=c.Dc();c=$f(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(ut(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}q.remove=function(a){return At(this,Bt(this,a))};
|
|
784
|
+
function Bt(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:lt();c=Ns(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new ts;ua(k);return u(k,e.init(),4);case 4:return u(k,xs(e,d.Ra(),d.Ba()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([Ct(a,h,e),Dt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
785
|
+
function Et(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:xd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:xd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ct(a,b,c){return I(function(d){return u(d,Ft(a.g,a.h.drm,c,b),0)})}
|
|
786
|
+
function Dt(a,b,c){function d(){}var e=Gt(c);ct(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Xg=function(){return At(this,Ht(this))};
|
|
787
|
+
function Ht(a){var b,c,d,e,f,g,h,k,l,m;return I(function(p){switch(p.g){case 1:return lt(),b=a.g,c=a.h.drm,d=new ts,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],ys(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,Ys(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:ya(p,3);break;case 3:return p["return"](!e)}})}
|
|
788
|
+
q.list=function(){return At(this,It())};function It(){var a,b,c;return I(function(d){switch(d.g){case 1:return lt(),a=[],b=new ts,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ws(b,function(e,f){c=c.then(function(){var g;return I(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ct(new Ms("manifest",e.Ra,e.Ba,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
|
|
789
|
+
function mt(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),nt(a),u(l,c.start(b,
|
|
790
|
+
g),2);if(3!=l.g)return h=l.h,nt(a),k=Jt(h),u(l,Promise.all(fb(k,function(m){return m.createSegmentIndex()})),3);nt(a);if(e)throw e;return l["return"](h)})}function ot(a,b,c,d){var e;return I(function(f){switch(f.g){case 1:return e=new Cf({Ob:a.g,onError:c,ud:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Hf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Vf(e),3);case 3:return u(f,Uf(e),4);case 4:return f["return"](e)}})}
|
|
791
|
+
function zt(a,b,c,d){var e=new Map,f=Jt(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Kt(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Je:Array.from(e.values())}}
|
|
792
|
+
function Kt(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
|
|
793
|
+
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Lt(d,c.presentationTimeline.mb(),function(l){var m=Zr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=gt(b,d.id)*n;n=bs(a.g,n);f.set(m,new Yr(l,n,k,!1))}l.i&&(p=Zr(l.i),f.has(p)||(n=.5*gt(b,d.id),n=bs(a.g,n),f.set(p,new Yr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
|
|
794
|
+
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Lt(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 nt(a){if(a.l.g)throw new O(2,9,7001);}function lt(){if(!it())throw new O(2,9,9E3);}function At(a,b){return I(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);cc(a.i,b);return ya(c,0)})}
|
|
795
|
+
function kt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){cc(a.i,c)})}function Gt(a){var b=new Set;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.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
796
|
+
function Ft(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=zs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Et(d,!1),videoCapabilities:Et(d,!0)}});return u(h,Ys(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
797
|
+
function Jt(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
798
|
+
function xt(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());}J("shaka.offline.Storage",ht);ht.deleteAll=function(){var a;return I(function(b){return 1==b.g?(a=new ts,ua(b),u(b,As(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):ya(b,0)})};ht.prototype.list=ht.prototype.list;
|
|
799
|
+
ht.prototype.removeEmeSessions=ht.prototype.Xg;ht.prototype.remove=ht.prototype.remove;ht.prototype.store=ht.prototype.store;ht.prototype.getNetworkingEngine=ht.prototype.Ec;ht.prototype.getConfiguration=ht.prototype.getConfiguration;ht.prototype.configure=ht.prototype.configure;ht.prototype.destroy=ht.prototype.destroy;ht.support=it;
|
|
800
|
+
var yt=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
801
|
+
Tm.offline=it;function Mt(){}function Nt(){for(var a=r(Ot),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Rf()}catch(c){Ta("Error installing polyfill!",c)}}}function Pt(a,b){for(var c={priority:b||0,Rf:a},d=0;d<Ot.length;d++)if(Ot[d].priority<c.priority){Ot.splice(d,0,c);return}Ot.push(c)}J("shaka.polyfill",Mt);Mt.register=Pt;Mt.installAll=Nt;var Ot=[];function Qt(){}function Rt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())St(b.value)}function St(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Mt.Aria=Qt;Qt.install=Rt;Pt(Rt);function Tt(){}function Ut(){Vt()}Mt.EncryptionScheme=Tt;Tt.install=Ut;Pt(Ut,-2);function Wt(){}
|
|
802
|
+
function Xt(){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}}),
|
|
803
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Yt);document.addEventListener("webkitfullscreenerror",Yt);document.addEventListener("mozfullscreenchange",Yt);document.addEventListener("mozfullscreenerror",Yt);document.addEventListener("MSFullscreenChange",Yt);document.addEventListener("MSFullscreenError",Yt)}}
|
|
804
|
+
function Yt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Mt.Fullscreen=Wt;Wt.install=Xt;Pt(Xt);function Zt(){}function $t(){var a=!0;if(Yc()||Uc("PlayStation 5")||Zc()||Xc())a=!1;Xc()&&Uc("Android")&&(a=!0);a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),au=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=bu)}
|
|
805
|
+
function bu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,x;return I(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!Pc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Rc(g),!h)||a.audio&&(k=a.audio.contentType,
|
|
806
|
+
l=Rc(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;p=[];n=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},p.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},n.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
|
|
807
|
+
p.length&&(y.audioCapabilities=p);n.length&&(y.videoCapabilities=n);B(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}Mt.MediaCapabilities=Zt;Zt.install=$t;var au=null;Zt.originalMcap=au;Pt($t,-1);function cu(){}function du(){var a=$c();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?eu():a?12>=a?(fu(),gu()):fu():(Uc("Tizen 2")||Uc("Tizen 3")||Uc("Tizen 4"))&&hu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&iu()}
|
|
808
|
+
function fu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function gu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function hu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Ad(b)[0]&&a(b)}}
|
|
809
|
+
function eu(){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)}}
|
|
810
|
+
function iu(){var a=MediaSource.isTypeSupported;Uc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Mt.MediaSource=cu;cu.install=du;Pt(du);function ju(){}function ku(){screen.orientation||void 0!=window.orientation&&lu()}function lu(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new mu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}Mt.Orientation=ju;
|
|
811
|
+
ju.install=ku;function mu(){eb.call(this);this.type="";this.angle=0}qa(mu,eb);
|
|
812
|
+
mu.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
813
|
+
mu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Pt(ku);function nu(){}function ou(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=pu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qu,window.MediaKeys=ru,window.MediaKeySystemAccess=su,window.shakaMediaKeysPolyfill=!0)}function pu(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
814
|
+
function qu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Mt.PatchedMediaKeysNop=nu;nu.install=ou;function ru(){throw new TypeError("Illegal constructor.");}ru.prototype.createSession=function(){};ru.prototype.setServerCertificate=function(){};function su(){this.keySystem="";throw new TypeError("Illegal constructor.");}su.prototype.getConfiguration=function(){};su.prototype.createMediaKeys=function(){};Pt(ou,-10);function tu(){}
|
|
815
|
+
function uu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)vu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=wu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=xu;window.MediaKeys=yu;window.MediaKeySystemAccess=zu;window.shakaMediaKeysPolyfill=!0}}
|
|
816
|
+
function Au(a){var b=vu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function wu(a,b){try{var c=new zu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function xu(a){var b=this.mediaKeys;b&&b!=a&&Bu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Bu(a,this);return Promise.resolve()}Mt.PatchedMediaKeysWebkit=tu;tu.install=uu;
|
|
817
|
+
function zu(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),
|
|
816
818
|
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"]):
|
|
817
|
-
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;}
|
|
818
|
-
function
|
|
819
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=
|
|
820
|
-
function
|
|
821
|
-
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?
|
|
822
|
-
function
|
|
823
|
-
function
|
|
824
|
-
function
|
|
825
|
-
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=
|
|
826
|
-
q.forEach=function(a){this.g&&a(this.g,
|
|
827
|
-
function
|
|
828
|
-
function
|
|
829
|
-
function
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
m=
|
|
833
|
-
|
|
834
|
-
Number(
|
|
835
|
-
function
|
|
836
|
-
a=[];if(!y)for(var x=r(
|
|
837
|
-
c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),
|
|
838
|
-
(g=
|
|
839
|
-
function
|
|
840
|
-
f))a.backgroundColor=g;if(g=
|
|
841
|
-
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=
|
|
842
|
-
|
|
843
|
-
function
|
|
844
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&cc(a.textDecoration,"overline")}}function
|
|
845
|
-
function
|
|
846
|
-
function
|
|
847
|
-
function
|
|
848
|
-
function
|
|
849
|
-
function
|
|
850
|
-
function
|
|
851
|
-
var
|
|
852
|
-
end:"end"},
|
|
853
|
-
J("shaka.text.Mp4TtmlParser",
|
|
854
|
-
|
|
855
|
-
c}}f=[];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
|
|
856
|
-
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");
|
|
857
|
-
/^\s*([^:]+):\s*(.*)/.exec(k[
|
|
858
|
-
!0;m.opacity=parseFloat(
|
|
859
|
-
""):h=new fc(m,
|
|
860
|
-
function
|
|
861
|
-
function
|
|
862
|
-
function
|
|
863
|
-
"italic";break;case "u":e.textDecoration.push("underline")}}if(
|
|
864
|
-
function
|
|
865
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
866
|
-
function
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
c+t.zd:m;m=y+(
|
|
870
|
-
function
|
|
871
|
-
function
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Sd:e.Sd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
875
|
-
function
|
|
819
|
+
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;}zu.prototype.createMediaKeys=function(){var a=new yu(this.g);return Promise.resolve(a)};zu.prototype.getConfiguration=function(){return this.h};function yu(a){this.l=a;this.h=null;this.g=new uf;this.i=[];this.j=new Map}
|
|
820
|
+
function Bu(a,b){a.h=b;a.g.Pc();var c=vu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=Cu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Wd()?"licenserequest":"licenserenewal").set("message",d.message),d=new L("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=Cu(a,d.sessionId))Du(d,"usable"),
|
|
821
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=Cu(a,d.sessionId);e&&e.handleError(d)}))}yu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Eu(b,this.l,a);this.i.push(a);return a};yu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
822
|
+
function Cu(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 Eu(a,b,c){eb.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 Mc;this.keyStatuses=new Fu}qa(Eu,eb);q=Eu.prototype;
|
|
823
|
+
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?Du(this,"output-restricted"):1==b?Du(this,"expired"):Du(this,"internal-error"))};
|
|
824
|
+
function Gu(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=Fc(hd("LOAD_SESSION|"+c));else{var e=hd("PERSISTENT|");d=qd(e,b)}else d=Fc(b)}catch(g){return Promise.reject(g)}a.h=new Mc;var f=Au("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
|
|
825
|
+
function Hu(a,b,c){if(a.g)a.g.then(function(){return Hu(a,b,c)})["catch"](function(){return Hu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=dd(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=nd(e.keys[0].k);e=nd(e.keys[0].kid)}else d=Fc(c),e=null;var f=Au("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
826
|
+
function Du(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new L("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return Gu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Gu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Mc;Hu(this,b,a);return b};
|
|
827
|
+
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=Au("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 Fu(){this.size=0;this.g=void 0}q=Fu.prototype;q.Wd=function(){return this.g};
|
|
828
|
+
q.forEach=function(a){this.g&&a(this.g,og.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=og.value();return this.g&&Dc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var vu="";Pt(uu);function Iu(){}function Ju(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Ku,Object.defineProperty(a,"disablePictureInPicture",{get:Lu,set:Mu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Nu,document.addEventListener("webkitpresentationmodechanged",Ou,!0))}}
|
|
829
|
+
function Ou(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)}
|
|
830
|
+
function Ku(){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 Nu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
831
|
+
function Lu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Mu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Mt.PiPWebkit=Iu;Iu.install=Ju;Pt(Ju);function Pu(){}function Qu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Ru))}function Ru(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Mt.RandomUUID=Pu;Pu.install=Qu;Pt(Qu);function Su(){}function Tu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Uu)}function Uu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Mt.StorageEstimate=Su;Su.install=Tu;Pt(Tu);function Vu(){}function Wu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Xu})}function Xu(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Mt.Symbol=Vu;Vu.install=Wu;Pt(Wu);function Yu(){}function Zu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Mt.VideoPlayPromise=Yu;Yu.install=Zu;Pt(Zu);function $u(){}function av(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Wc())&&(a.getVideoPlaybackQuality=bv)}}function bv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Mt.VideoPlaybackQuality=$u;$u.install=av;Pt(av);function cv(){}function dv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ev;else if(6==b)a=fv;else{try{var c=!!ev(1,2,"")}catch(d){c=!1}c&&(a=ev)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ev(a,b,c){return new window.TextTrackCue(a,b,c)}function fv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Mt.VTTCue=cv;cv.install=dv;Pt(dv);function gv(){}gv.prototype.parseInit=function(){};gv.prototype.setSequenceMode=function(){};gv.prototype.parseMedia=function(a,b){var c=null,d=[],e=dd(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=hv.exec(f))){var g=iv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new fc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};J("shaka.text.LrcTextParser",gv);gv.prototype.parseMedia=gv.prototype.parseMedia;
|
|
832
|
+
gv.prototype.setSequenceMode=gv.prototype.setSequenceMode;gv.prototype.parseInit=gv.prototype.parseInit;var hv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,iv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Hd["application/x-subtitle-lrc"]=function(){return new gv};function jv(){}jv.prototype.parseInit=function(){};jv.prototype.setSequenceMode=function(){};
|
|
833
|
+
jv.prototype.parseMedia=function(a,b){var c=dd(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){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);var g=f.getElementsByTagName("tt")[0];if(!g)throw new O(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=vo(g,kv,"frameRate"),k=vo(g,kv,"subFrameRate"),l=vo(g,kv,"frameRateMultiplier"),
|
|
834
|
+
m=vo(g,kv,"tickRate"),p=vo(g,kv,"cellResolution");c=g.getAttribute("xml:space")||"default";e=vo(g,lv,"extent");if("default"!=c&&"preserve"!=c)throw new O(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new mv(h,k,l,m);p=p?(p=/^(\d+) (\d+)$/.exec(p))?{columns:parseInt(p[1],10),rows:parseInt(p[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?to(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var n=r(g),t=n.next();!t.done;t=
|
|
835
|
+
n.next()){var v=t.value;t=new hc;var y=v.getAttribute("xml:id");if(y){t.id=y;var x=null;e&&(x=nv.exec(e)||ov.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=pv(v,l,"extent"))w=(D=nv.exec(w))||ov.exec(w),null!=w&&(t.width=Number(w[1]),t.height=Number(w[2]),D||(null!=y&&(t.width=100*t.width/y),null!=x&&(t.height=100*t.height/x)),t.widthUnits=D||null!=y?Ac:0,t.heightUnits=D||null!=x?Ac:0);if(v=pv(v,l,"origin"))w=(D=nv.exec(v))||ov.exec(v),null!=w&&(t.viewportAnchorX=Number(w[1]),t.viewportAnchorY=
|
|
836
|
+
Number(w[2]),D||(null!=x&&(t.viewportAnchorY=100*t.viewportAnchorY/x),null!=y&&(t.viewportAnchorX=100*t.viewportAnchorX/y)),t.viewportAnchorUnits=D||null!=y?Ac:0)}else t=null;t&&m.push(t)}if(qo(f,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");e=r(qo(f,"div"));for(n=e.next();!n.done;n=e.next())if(qo(n.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");(f=qv(f,b.periodStart,h,k,l,g,m,c,p,null,!1))&&d.push(f)}return d};
|
|
837
|
+
function qv(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,v=r(rv),y=v.next();!y.done&&!(t=sv(n,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(n.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
|
|
838
|
+
a=[];if(!y)for(var x=r(n.childNodes),w=x.next();!w.done;w=x.next())(w=qv(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;x=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||x||"br"==n.tagName||0!=a.length||d&&!h))return null;w=tv(n,c);x=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=uv(p,c,x,w),x=w.start,w=w.end,p=p.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(x=Infinity,w=0,b=r(a),
|
|
839
|
+
c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new fc(x,w,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new fc(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=sv(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==C})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&
|
|
840
|
+
(g=sv(l,"region",f,"")[0]);vv(b,n,g,t,e,v,0==a.length);return b}
|
|
841
|
+
function vv(a,b,c,d,e,f,g){f=f||g;"rtl"==wv(b,c,e,"direction",f)&&(a.direction="rtl");g=wv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=gc);(g=wv(b,c,e,"textAlign",!0))?(a.positionAlign=xv[g],a.lineAlign=yv[g],a.textAlign=uc[g.toUpperCase()]):a.textAlign=jc;if(g=wv(b,c,e,"displayAlign",!0))a.displayAlign=vc[g.toUpperCase()];if(g=wv(b,c,e,"color",f))a.color=g;if(g=wv(b,c,e,"backgroundColor",
|
|
842
|
+
f))a.backgroundColor=g;if(g=wv(b,c,e,"border",f))a.border=g;if(g=wv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=wv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=wv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=wv(b,c,e,"lineHeight",f))&&g.match(zv)&&(a.lineHeight=g);(g=wv(b,c,e,"fontSize",f))&&(g.match(zv)||g.match(Av))&&(a.fontSize=g);if(g=wv(b,c,e,"fontStyle",f))a.fontStyle=zc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
|
|
843
|
+
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=wv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(zv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(zv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=wv(b,c,e,"letterSpacing",f))&&d.match(zv)&&(a.letterSpacing=d);(d=wv(b,c,e,"linePadding",f))&&d.match(zv)&&(a.linePadding=d);if(f=wv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=pv(c,e,"textDecoration"))&&Bv(a,c);(b=
|
|
844
|
+
Cv(b,e,"textDecoration"))&&Bv(a,b)}
|
|
845
|
+
function Bv(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")&&cc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&cc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
846
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&cc(a.textDecoration,"overline")}}function wv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Cv(a,c,d))?a:e?pv(b,c,d):null}function pv(a,b,c){if(!a)return null;var d=vo(a,lv,c);return d?d:Dv(a,b,c)}function Cv(a,b,c){var d=vo(a,lv,c);return d?d:Dv(a,b,c)}
|
|
847
|
+
function Dv(a,b,c){a=sv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=uo(a[e],"urn:ebu:tt:style",c);f||(f=vo(a[e],lv,c));f||(f=Cv(a[e],b,c));f&&(d=f)}return d}
|
|
848
|
+
function sv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?uo(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function uv(a,b,c,d){a=tv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
|
|
849
|
+
function tv(a,b){var c=Ev(a.getAttribute("begin"),b),d=Ev(a.getAttribute("end"),b),e=Ev(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
|
|
850
|
+
function Ev(a,b){var c=null;if(Fv.test(a)){c=Fv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(Gv.test(a))c=Hv(Gv,a);else if(Iv.test(a))c=Hv(Iv,a);else if(Jv.test(a))c=Jv.exec(a),c=Number(c[1])/b.frameRate;else if(Kv.test(a))c=Kv.exec(a),c=Number(c[1])/b.g;else if(Lv.test(a))c=Hv(Lv,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
851
|
+
function Hv(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)}J("shaka.text.TtmlTextParser",jv);jv.prototype.parseMedia=jv.prototype.parseMedia;jv.prototype.setSequenceMode=jv.prototype.setSequenceMode;jv.prototype.parseInit=jv.prototype.parseInit;
|
|
852
|
+
function mv(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]))}
|
|
853
|
+
var nv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Av=/^(\d{1,2}(?:\.\d+)?|100)%$/,zv=/^(\d+px|\d+em|\d*\.?\d+c)$/,ov=/^(\d+)px (\d+)px$/,Fv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Gv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Iv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Jv=/^(\d*(?:\.\d*)?)f$/,Kv=/^(\d*(?:\.\d*)?)t$/,Lv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),yv={left:mc,center:"center",right:"end",start:mc,
|
|
854
|
+
end:"end"},xv={left:"line-left",center:"center",right:"line-right"},kv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],lv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],rv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Hd["application/ttml+xml"]=function(){return new jv};function Mv(){this.g=new jv}Mv.prototype.parseInit=function(a){var b=!1;(new yg).box("moov",Cg).box("trak",Cg).box("mdia",Cg).box("minf",Cg).box("stbl",Cg).Y("stsd",Eg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};Mv.prototype.setSequenceMode=function(){};Mv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new yg).box("mdat",Fg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};
|
|
855
|
+
J("shaka.text.Mp4TtmlParser",Mv);Mv.prototype.parseMedia=Mv.prototype.parseMedia;Mv.prototype.setSequenceMode=Mv.prototype.setSequenceMode;Mv.prototype.parseInit=Mv.prototype.parseInit;Hd['application/mp4; codecs="stpp"']=function(){return new Mv};Hd['application/mp4; codecs="stpp.ttml"']=function(){return new Mv};Hd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Mv};Hd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Mv};function Nv(){this.g=!1}Nv.prototype.parseInit=function(){};Nv.prototype.setSequenceMode=function(a){this.g=a};
|
|
856
|
+
Nv.prototype.parseMedia=function(a,b){var c=dd(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.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Ov(new Jq(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-
|
|
857
|
+
c}}f=[];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 Jq(g);var h=new hc;Mq(g);Kq(g);for(var k=Mq(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))?
|
|
858
|
+
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Kq(g);k=Mq(g)}f.push(h)}e=new Map;Pv(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new fc(0,0,"");for(var p=!1,n=0;n<k.length;n++){var t=
|
|
859
|
+
/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(t){var v=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":p=!0;m.backgroundColor=v;break;case "color":p=!0;m.color=v;break;case "font-family":p=!0;m.fontFamily=v;break;case "font-size":p=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(p=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":p=!0;m.fontStyle=pc;break;case "italic":p=!0;m.fontStyle="italic";break;case "oblique":p=!0,m.fontStyle="oblique"}break;case "opacity":p=
|
|
860
|
+
!0;m.opacity=parseFloat(v);break;case "white-space":p=!0,m.wrapLine="noWrap"!=v}}}p&&e.set(l,m)}n=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Jq(h[0]);m=Ov(k);t=Lq(k,/[ \t]+--\x3e[ \t]+/g);p=Ov(k);if(null==m||null==t||null==p)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");m+=n;p+=n;n=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=p,h.payload=
|
|
861
|
+
""):h=new fc(m,p,"");Qv(n,h,e);Kq(k);for(m=Mq(k);m;)Rv(h,m,f),Kq(k),m=Mq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Pv(a){for(var b=r(Object.entries(xc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new fc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(yc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new fc(0,0,""),e.backgroundColor=d,a.set(c,e)}
|
|
862
|
+
function Qv(a,b,c){0===c.size&&Pv(c);a=Sv(a);var d=Ho("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())Tv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
|
|
863
|
+
function Sv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Uv(a,b){return a&&0<a.length?a:b}
|
|
864
|
+
function Tv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Uv(h.backgroundColor,e.backgroundColor),e.color=Uv(h.color,e.color),e.fontFamily=Uv(h.fontFamily,e.fontFamily),e.fontSize=Uv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
|
|
865
|
+
"italic";break;case "u":e.textDecoration.push("underline")}}if(xo(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())Tv(a.value,e,c,d)}
|
|
866
|
+
function Rv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=jc:a.textAlign=uc[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"==
|
|
867
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Vv(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=wc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=lc,a.line=Number(c[1]),c[2]&&(a.lineAlign=wc[c[2].toUpperCase()])}function Vv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
868
|
+
function Ov(a){a=Lq(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)}J("shaka.text.VttTextParser",Nv);Nv.prototype.parseMedia=Nv.prototype.parseMedia;Nv.prototype.setSequenceMode=Nv.prototype.setSequenceMode;Nv.prototype.parseInit=Nv.prototype.parseInit;Hd["text/vtt"]=function(){return new Nv};Hd['text/vtt; codecs="vtt"']=function(){return new Nv};
|
|
869
|
+
Hd['text/vtt; codecs="wvtt"']=function(){return new Nv};function Wv(){this.g=null}Wv.prototype.parseInit=function(a){var b=this,c=!1;(new yg).box("moov",Cg).box("trak",Cg).box("mdia",Cg).Y("mdhd",function(d){d=Ph(d.reader,d.version);b.g=d.timescale}).box("minf",Cg).box("stbl",Cg).Y("stsd",Eg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};Wv.prototype.setSequenceMode=function(){};
|
|
870
|
+
Wv.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 yg).box("moof",Cg).box("traf",Cg).Y("tfdt",function(A){g=!0;c=Oh(A.reader,A.version).Ue}).Y("tfhd",function(A){l=Nh(A.reader,A.flags).ef}).Y("trun",function(A){h=!0;d=Qh(A.reader,A.version,A.flags).zf}).box("mdat",Fg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,p=new vg(e,0),n=r(d),t=n.next();!t.done;t=n.next()){t=t.value;var v=t.ue||l,y=t.zd?
|
|
871
|
+
c+t.zd:m;m=y+(v||0);var x=0;do{var w=p.R();x+=w;var D=p.R(),C=null;"vttc"==Gg(D)?8<w&&(C=p.Cb(w-8)):p.skip(w-8);v&&C&&(w=Xv(C,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(t.sampleSize&&x<t.sampleSize)}return f.filter(Bb)};function Xv(a,b,c){var d,e,f;(new yg).box("payl",Fg(function(g){d=dd(g)})).box("iden",Fg(function(g){e=dd(g)})).box("sttg",Fg(function(g){f=dd(g)})).parse(a);return d?Yv(d,e,f,b,c):null}
|
|
872
|
+
function Yv(a,b,c,d,e){d=new fc(d,e,"");Qv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Jq(c),b=Mq(a);b;)Rv(d,b,[]),Kq(a),b=Mq(a);return d}J("shaka.text.Mp4VttParser",Wv);Wv.prototype.parseMedia=Wv.prototype.parseMedia;Wv.prototype.setSequenceMode=Wv.prototype.setSequenceMode;Wv.prototype.parseInit=Wv.prototype.parseInit;Hd['application/mp4; codecs="wvtt"']=function(){return new Wv};function Zv(){}Zv.prototype.parseInit=function(){};Zv.prototype.setSequenceMode=function(){};Zv.prototype.parseMedia=function(a){var b=dd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Jq(c[0]),e=$v(d),f=Lq(d,/,/g);d=$v(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new fc(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
873
|
+
function $v(a){a=Lq(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)}J("shaka.text.SbvTextParser",Zv);Zv.prototype.parseMedia=Zv.prototype.parseMedia;Zv.prototype.setSequenceMode=Zv.prototype.setSequenceMode;Zv.prototype.parseInit=Zv.prototype.parseInit;Hd["text/x-subviewer"]=function(){return new Zv};function aw(){this.g=new Nv}aw.prototype.parseInit=function(){};aw.prototype.setSequenceMode=function(){};aw.prototype.parseMedia=function(a,b){var c=dd(a);c=bw(c);c=Fc(hd(c));return this.g.parseMedia(c,b)};function bw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}J("shaka.text.SrtTextParser",aw);
|
|
874
|
+
aw.srt2webvtt=bw;aw.prototype.parseMedia=aw.prototype.parseMedia;aw.prototype.setSequenceMode=aw.prototype.setSequenceMode;aw.prototype.parseInit=aw.prototype.parseInit;Hd["text/srt"]=function(){return new aw};function cw(){}cw.prototype.parseInit=function(){};cw.prototype.setSequenceMode=function(){};
|
|
875
|
+
cw.prototype.parseMedia=function(a){var b="",c="";a=dd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=dw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=ew.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(fw);else if("Style"==e){e=f.split(fw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
876
|
+
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Sd:e.Sd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=ew.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(fw);else if("Dialogue"==f){g=g.split(fw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=gw(f.Start);var k=gw(f.End);g=new fc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Sd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Sd}}(e)))&&hw(g,f);d.push(g)}return d};
|
|
877
|
+
function hw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=iw(c))a.color=c;if(c=b.BackColour)if(c=iw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=nc;a.textAlign="start";break;case 2:a.displayAlign=nc;a.textAlign=jc;break;case 3:a.displayAlign=nc;a.textAlign="end";
|
|
876
878
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=jc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=jc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
|
|
877
|
-
function
|
|
878
|
-
var
|
|
879
|
-
|
|
880
|
-
|
|
879
|
+
function iw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function gw(a){a=jw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}J("shaka.text.SsaTextParser",cw);cw.prototype.parseMedia=cw.prototype.parseMedia;cw.prototype.setSequenceMode=cw.prototype.setSequenceMode;cw.prototype.parseInit=cw.prototype.parseInit;
|
|
880
|
+
var dw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,ew=/^\s*([^:]+):\s*(.*)/,fw=/\s*,\s*/,jw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Hd["text/x-ssa"]=function(){return new cw};function kw(){}J("shaka.util.FairPlayUtils",kw);kw.commonFairPlayResponse=function(a,b){if(2===a){try{var c=dd(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Gc(nd(c)))}};
|
|
881
|
+
kw.spcFairPlayRequest=function(a,b){if(2===a){var c=Fc(b.body);c=md(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=hd("spc="+c)}};kw.initDataTransform=function(a,b,c){function d(h){Ic(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=id(b,!0):e=b;a=gd(a);a=id(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f};
|
|
882
|
+
kw.defaultGetContentId=function(a){a=gd(a);return(new kb(a)).Ya};kw.isFairPlaySupported=function(){var a;return I(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},B(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);F(b);return b["return"](!1)})};/*
|
|
881
883
|
@license
|
|
882
884
|
EME Encryption Scheme Polyfill
|
|
883
885
|
Copyright 2019 Google LLC
|
|
884
886
|
SPDX-License-Identifier: Apache-2.0
|
|
885
887
|
*/
|
|
886
|
-
function
|
|
887
|
-
function
|
|
888
|
+
function lw(){}var mw;function nw(){mw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(mw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=ow):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
889
|
+
function ow(a,b){var c=this,d;return I(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,mw.call(c,a,b),2);d=e.h;if(pw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=mw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=qw;return e["return"](qw.call(c,
|
|
888
890
|
a,b))})}
|
|
889
|
-
function
|
|
890
|
-
|
|
891
|
-
function
|
|
892
|
-
function
|
|
893
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
894
|
-
function
|
|
895
|
-
new
|
|
896
|
-
function
|
|
897
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}J("McEncryptionSchemePolyfill",
|
|
898
|
-
|
|
899
|
-
function
|
|
900
|
-
function
|
|
891
|
+
function qw(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return I(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=rw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=sw(h.videoCapabilities,d),l=sw(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 p=Error("Unsupported keySystem or supportedConfigurations."),
|
|
892
|
+
p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,mw.call(c,a,e),2)}n=t.h;return t["return"](new tw(n,d))})}function sw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}J("EmeEncryptionSchemePolyfill",lw);lw.install=nw;function uw(){}var vw;
|
|
893
|
+
function ww(){vw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(vw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=xw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
894
|
+
function xw(a){var b=this,c,d,e;return I(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,vw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&pw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=vw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
895
|
+
navigator.mediaCapabilities.decodingInfo=yw;if(d){f.D(3);break}e=c;return u(f,zw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](yw.call(b,a))}})}
|
|
896
|
+
function yw(a){var b=this,c,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=rw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,vw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
897
|
+
new tw(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return u(m,zw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
|
|
898
|
+
function zw(a){var b,c;return I(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
|
|
899
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}J("McEncryptionSchemePolyfill",uw);uw.install=ww;function tw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
900
|
+
tw.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};tw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
901
|
+
function rw(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 pw(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 Aw(){}
|
|
902
|
+
function Vt(){nw();ww()}J("EncryptionSchemePolyfills",Aw);Aw.install=Vt;"undefined"!==typeof module&&module.exports&&(module.exports=Aw);/*
|
|
901
903
|
@license
|
|
902
904
|
Copyright 2013 Ali Al Dallal
|
|
903
905
|
|
|
@@ -921,7 +923,7 @@ function St(){kw();tw()}J("EncryptionSchemePolyfills",xw);xw.install=St;"undefin
|
|
|
921
923
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
922
924
|
SOFTWARE.
|
|
923
925
|
*/
|
|
924
|
-
for(var
|
|
926
|
+
for(var Bw={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
|
|
925
927
|
"ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
|
|
926
928
|
u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
|
|
927
929
|
u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
|
|
@@ -942,55 +944,55 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
|
|
|
942
944
|
sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
|
|
943
945
|
u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
944
946
|
u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
|
|
945
|
-
u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},
|
|
946
|
-
|
|
947
|
-
W.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};J("shaka.ui.Element",W);W.prototype.release=W.prototype.release;function
|
|
948
|
-
function
|
|
949
|
-
""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.xa();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.xa(),this.g.ka(.5))}qa(
|
|
950
|
-
"ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&
|
|
951
|
-
c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?
|
|
952
|
-
J("shaka.ui.PlayButton",
|
|
953
|
-
!1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});
|
|
954
|
-
|
|
955
|
-
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,
|
|
956
|
-
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}qa(
|
|
957
|
-
q.setValue=function(a){this.g||(this.bar.value=a)};function
|
|
958
|
-
|
|
959
|
-
"locale-changed",function(){return
|
|
960
|
-
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);
|
|
961
|
-
q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ia(),g=f.end-f.start;this.setRange(f.start,f.end)
|
|
947
|
+
u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},Cw=r(Object.keys(Bw)),Dw=Cw.next();!Dw.done;Dw=
|
|
948
|
+
Cw.next()){var Ew=Dw.value;Bw[Ew.toLowerCase()]=Bw[Ew]};function W(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new uf;this.localization=this.controls.za;this.player=this.controls.bc();this.video=this.controls.Bb();this.adManager=this.player.fd();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
|
|
949
|
+
W.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};J("shaka.ui.Element",W);W.prototype.release=W.prototype.release;function Fw(a){return Gw(a,"shaka-back-to-overflow-button")}function Gw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function Hw(a){a&&(a=Gw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Iw(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
950
|
+
function Jw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function Kw(a,b){W.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new P(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=Jw(e-d,!1)+" / "+Jw(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
|
|
951
|
+
""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.xa();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.xa(),this.g.ka(.5))}qa(Kw,W);Kw.prototype.release=function(){this.g.stop();this.g=null;W.prototype.release.call(this)};J("shaka.ui.AdCounter",Kw);function Lw(a,b){W.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&Mw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Mw(c)});this.eventManager.o(this.adManager,"ad-started",function(){Mw(c)});this.eventManager.o(this.adManager,
|
|
952
|
+
"ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&Mw(this)}qa(Lw,W);function Mw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}J("shaka.ui.AdPosition",Lw);function Nw(a,b){W.call(this,a,b);var c=this;this.button=ek();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
|
|
953
|
+
c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?Ow(c.controls):Pw(c.controls)});this.ad&&(this.g(),this.h())}qa(Nw,W);Nw.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.B.paused&&!a.$;return a};Nw.prototype.g=function(){};Nw.prototype.h=function(){};
|
|
954
|
+
J("shaka.ui.PlayButton",Nw);function Qw(a,b){Nw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}qa(Qw,Nw);Qw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};Qw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};J("shaka.ui.BigPlayButton",Qw);function Rw(a,b){W.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";X(c.g,!0)}else X(c.g,
|
|
955
|
+
!1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});Sw(this)}qa(Rw,W);Rw.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];W.prototype.release.call(this)};function Tw(a,b){Uw.set(a,b)}function Sw(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=Uw.get(c);d?a.i.push(d.create(a.g,a.controls)):Ta("Unrecognized context menu element:",c)}}J("shaka.ui.ContextMenu",Rw);
|
|
956
|
+
Rw.registerElement=Tw;var Uw=new Map;function Vw(a,b,c,d){W.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new P(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
|
|
957
|
+
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,Ww(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(Ww(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,Ww(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
|
|
958
|
+
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}qa(Vw,W);q=Vw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);W.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
|
|
959
|
+
q.setValue=function(a){this.g||(this.bar.value=a)};function Ww(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}J("shaka.ui.RangeElement",Vw);Vw.prototype.setValue=Vw.prototype.setValue;Vw.prototype.getValue=Vw.prototype.getValue;Vw.prototype.changeTo=Vw.prototype.changeTo;Vw.prototype.onChangeEnd=Vw.prototype.onChangeEnd;Vw.prototype.onChange=Vw.prototype.onChange;
|
|
960
|
+
Vw.prototype.onChangeStart=Vw.prototype.onChangeStart;Vw.prototype.setRange=Vw.prototype.setRange;function Xw(a,b){Vw.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=R("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new P(function(){c.video.currentTime=c.getValue()});this.A=new P(function(){Yw(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Zw(c)});this.eventManager.o(this.localization,
|
|
961
|
+
"locale-changed",function(){return Zw(c)});this.eventManager.o(this.adManager,"ad-started",function(){$w(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){$w(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;ax(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];ax(c)});this.setValue(this.video.currentTime);this.update();Zw(this);this.ad&&X(this.container,!1)}qa(Xw,Vw);q=Xw.prototype;
|
|
962
|
+
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);Vw.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ee(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.xa();this.controls.Ee(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
963
|
+
q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ia(),g=f.end-f.start;this.setRange(f.start,f.end);$w(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
|
|
962
964
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):X(this.container,!1)};
|
|
963
|
-
function
|
|
964
|
-
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.A){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.La&&(a.La.stop(),a.La=null);
|
|
968
|
-
null;case 6:a.F=null,a.A=null,a.B=null,a.za=null,a.ma.clear(),eb.prototype.release.call(a),z(b)}})};function
|
|
969
|
-
q.configure=function(a){this.i=a;this.C.
|
|
970
|
-
|
|
971
|
-
q.
|
|
972
|
-
q.
|
|
965
|
+
function Yw(a){if(a.i.length){for(var b=a.player.Ia(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
966
|
+
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function ax(a){Yw(a);var b=a.player.Ia();b=b.end-b.start;a.player.T()&&5<b&&a.A.ka(1)}function $w(a){var b=a.player.Ia();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Zw(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}J("shaka.ui.SeekBar",Xw);function bx(){}
|
|
967
|
+
bx.prototype.create=function(a,b){return new Xw(a,b)};Xw.Factory=bx;function Z(a,b,c,d){eb.call(this);var e=this;this.U=!0;this.i=d;this.C=new In(c,a,this.i.castReceiverAppId);this.gb=!0;this.B=this.C.Bb();this.A=c;this.F=this.C.bc();this.ya=a;this.j=b;this.Wa=this.F.fd();this.m=this.l=null;this.$=!1;this.G=[];this.vb=[];this.ib=!1;this.aa=new P(function(){e.j.style.cursor="none";e.ib=!1;cx(e)});this.ea=new P(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new P(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.La=new P(function(){e.Mb()&&
|
|
968
|
+
dx(e)});this.J=null;this.H=[];this.za=ex();this.h=new uf;this.configure(this.i);fx(this);this.ma=new Set;gx(this);this.La.ka(.125);this.h.o(this.za,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}qa(Z,eb);q=Z.prototype;
|
|
969
|
+
q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.A){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.La&&(a.La.stop(),a.La=null);hx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ya){b.D(6);break}return u(b,a.ya.destroy(),7);case 7:a.ya=
|
|
970
|
+
null;case 6:a.F=null,a.A=null,a.B=null,a.za=null,a.ma.clear(),eb.prototype.release.call(a),z(b)}})};function hx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function ix(a,b){jx.set(a,b)}q.Qf=function(a){this.gb=a;gx(this)};q.Ig=function(){cx(this)};
|
|
971
|
+
q.configure=function(a){this.i=a;this.C.Ze(a.castReceiverAppId);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Xa&&(this.Xa=null);this.g?(fk(this.g),hx(this)):(kx(this),lx(this));this.j.classList.add("shaka-video-container");this.A.classList.add("shaka-video");mx(this);this.i.addBigPlayButton&&nx(this);this.i.customContextMenu&&(this.Xa=new Rw(this.X,this),this.H.push(this.Xa));this.ba||ox(this);this.hb=R("div");this.hb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.hb);
|
|
972
|
+
px(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));qx(this);this.vb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));cx(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",c)}};
|
|
973
|
+
q.Ae=function(a){(this.U=a)?(this.j.setAttribute("shaka-controls","true"),this.A.tabIndex=-1,this.A.controls=!1):this.j.removeAttribute("shaka-controls");cx(this)};q.Cf=function(a){this.A.controls=a;this.A.tabIndex=a?0:-1;a&&this.Ae(!1)};q.getAd=function(){return this.l};q.ag=function(){return this.C};q.ng=function(){return this.za};q.Cg=function(){return this.j};q.Bb=function(){return this.B};q.mg=function(){return this.A};q.bc=function(){return this.F};q.lg=function(){return this.ya};q.gg=function(){return this.g};
|
|
974
|
+
q.wg=function(){return this.hb};q.dg=function(){return this.P};q.eg=function(){return this.i};q.Hg=function(){return this.$};q.Ee=function(a){this.$=a};q.Fg=function(){return this.gb};q.lf=function(){return this.m?this.m.getValue():this.B.currentTime};q.Df=function(a){this.J=a};q.$c=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.dc=function(){this.I.xa()};q.Yd=function(){return document.fullscreenEnabled||this.A.webkitSupportsFullscreen?!0:!1};
|
|
973
975
|
q.Xd=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.A;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
974
|
-
q.
|
|
975
|
-
9);case 9:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(10);break}B(d,11);return u(d,screen.orientation.lock("landscape"),13);case 13:va(d,10,5);break;case 11:
|
|
976
|
-
function
|
|
977
|
-
function
|
|
978
|
-
function
|
|
979
|
-
function
|
|
976
|
+
q.Ke=function(){var a=this,b,c;return I(function(d){switch(d.g){case 1:if(!document.fullscreenEnabled){b=a.A;b.webkitSupportsFullscreen&&(b.webkitDisplayingFullscreen?b.webkitExitFullscreen():b.webkitEnterFullscreen());d.D(0);break}if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),u(d,document.exitFullscreen(),0);B(d,5);if(!document.pictureInPictureElement){d.D(7);break}return u(d,document.exitPictureInPicture(),7);case 7:return u(d,a.j.requestFullscreen({navigationUI:"hide"}),
|
|
977
|
+
9);case 9:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(10);break}B(d,11);return u(d,screen.orientation.lock("landscape"),13);case 13:va(d,10,5);break;case 11:F(d,5);case 10:va(d,0);break;case 5:c=F(d),a.dispatchEvent(new L("error",(new Map).set("detail",c))),d.D(0)}})};q.Ff=function(){X(this.K,!0);X(this.P,!0);this.g.setAttribute("ad-active","true")};q.pf=function(){X(this.K,!1);X(this.P,!1);this.g.removeAttribute("ad-active")};
|
|
978
|
+
function Pw(a){a.U&&a.B.duration&&(a.F.We(),a.B.paused&&!a.$?a.B.play():a.B.pause())}function Ow(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
|
|
979
|
+
function kx(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.B.duration&&(a.Mb()?a.J=Date.now():(rx(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){sx(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.Yd()&&a.Ke()})}function nx(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new Qw(b,a);a.H.push(a.fb)}
|
|
980
|
+
function mx(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function tx(a){a.K=R("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new Lw(a.K,a);a.H.push(b);b=new Kw(a.K,a);a.H.push(b)}
|
|
981
|
+
function ox(a){a.ba=R("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=R("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
|
|
980
982
|
b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
|
|
981
|
-
function
|
|
982
|
-
(c=
|
|
983
|
-
function
|
|
984
|
-
a.h.o(a.C,"caststatuschanged",function(){
|
|
985
|
-
case "End":a.m&&
|
|
986
|
-
function
|
|
987
|
-
function
|
|
988
|
-
function
|
|
989
|
-
function
|
|
990
|
-
function
|
|
991
|
-
function
|
|
992
|
-
function
|
|
993
|
-
function
|
|
983
|
+
function px(a){a.N=R("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(d){d.target.closest(".shaka-overflow-button")||a.dc()});tx(a);a.X=R("div");a.X.classList.add("shaka-controls-button-panel");a.X.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.X.classList.add("shaka-tooltips-on");a.N.appendChild(a.X);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,jx.get(c)?
|
|
984
|
+
(c=jx.get(c).create(a.X,a),a.H.push(c)):Ta("Unrecognized control panel element requested:",c)}function qx(a){if(a.i.addSeekBar)a.m=ux.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function lx(a){a.P=R("div");a.P.classList.add("shaka-client-side-ad-container");X(a.P,!1);a.h.o(a.P,"click",function(){sx(a)});a.j.appendChild(a.P)}
|
|
985
|
+
function fx(a){a.h.o(a.F,"buffering",function(){a.U&&X(a.ba,a.F.Jc())});a.U&&X(a.ba,a.F.Jc());a.h.o(window,"keydown",function(b){vx(a,b)});a.h.o(window,"click",function(){return a.dc()});a.h.o(a,"submenuopen",function(){a.dc()});a.h.o(a.B,"play",function(){cx(a)});a.h.o(a.B,"pause",function(){cx(a)});a.h.o(a.j,"mousemove",function(b){rx(a,b)});a.h.o(a.j,"touchmove",function(b){rx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){rx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.xa()});
|
|
986
|
+
a.h.o(a.C,"caststatuschanged",function(){gx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&rx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),wx(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),wx(a,a.m.getValue()+5));break;case "Home":a.m&&wx(a,a.F.Ia().start);break;
|
|
987
|
+
case "End":a.m&&wx(a,a.F.Ia().end);break;case " ":e&&xx(a)}});a.h.o(a.j,"keyup",function(b){a.ma["delete"](b.key)});a.h.o(a.Wa,"ad-started",function(b){a.l=b.ad;a.Ff()});a.h.o(a.Wa,"ad-stopped",function(){a.l=null;a.pf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return I(function(b){return u(b,yx(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.A.offsetWidth,a.A.offsetHeight)})}
|
|
988
|
+
function yx(a){return I(function(b){return a.B&&0!=a.B.readyState&&!a.C.qa()&&a.i.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?u(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?u(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
|
|
989
|
+
function rx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),cx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.ib=!0,a.I.stop(),a.Mb()||(dx(a),cx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function zx(a){return window.matchMedia("hover: hover").matches?a.vb.some(function(b){return b.matches(":hover")}):!1}
|
|
990
|
+
function cx(a){var b=a.l?a.l.isPaused():!1,c=a.B.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.ib||d||zx(a)?(dx(a),a.g.setAttribute("shown","true"),a.ea.stop()):a.ea.S(a.i.fadeDelay)}function sx(a){a.U&&(a.$c()?a.I.xa():a.i.singleClickForPlayAndPause&&xx(a))}function xx(a){a.l&&a.l.isLinear()?Ow(a):Pw(a)}
|
|
991
|
+
function gx(a){var b=a.C.qa();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Mb=function(){return this.U?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function wx(a,b){a.m.changeTo(b);a.Mb()&&dx(a)}
|
|
992
|
+
function dx(a){if(a.m)if(a.m.setValue(a.B.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new L("timeandseekrangeupdated"))}
|
|
993
|
+
function vx(a,b){a.ma.add(b.key);var c=a.$c();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),cx(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.xa();c&&a.ma.has("Tab")&&Ax(a,b)}
|
|
994
|
+
function Ax(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ma.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
995
|
+
function ex(){var a=new Ub("en");a.ia("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
|
|
994
996
|
["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
|
|
995
997
|
["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
|
|
996
998
|
["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
|
|
@@ -1048,77 +1050,77 @@ a.ia("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1048
1050
|
["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.ia("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
|
|
1049
1051
|
["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
|
|
1050
1052
|
["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
|
|
1051
|
-
["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.
|
|
1052
|
-
Z.prototype.toggleFullScreen=Z.prototype.
|
|
1053
|
-
Z.prototype.getClientSideAdContainer=Z.prototype.
|
|
1054
|
-
Z.prototype.setEnabledNativeControls=Z.prototype.
|
|
1055
|
-
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);
|
|
1056
|
-
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){
|
|
1057
|
-
function
|
|
1058
|
-
J("shaka.ui.OverflowMenu",
|
|
1059
|
-
this.i=R("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);
|
|
1060
|
-
c.player.
|
|
1061
|
-
|
|
1062
|
-
q.getConfiguration=function(){var a=
|
|
1063
|
-
function
|
|
1064
|
-
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},trackLabelFormat:
|
|
1053
|
+
["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Ye(navigator.languages||[]);return a}J("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.Mb;Z.prototype.hideAdUI=Z.prototype.pf;Z.prototype.showAdUI=Z.prototype.Ff;
|
|
1054
|
+
Z.prototype.toggleFullScreen=Z.prototype.Ke;Z.prototype.isFullScreenEnabled=Z.prototype.Xd;Z.prototype.isFullScreenSupported=Z.prototype.Yd;Z.prototype.hideSettingsMenus=Z.prototype.dc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.$c;Z.prototype.setLastTouchEventTime=Z.prototype.Df;Z.prototype.getDisplayTime=Z.prototype.lf;Z.prototype.isCastAllowed=Z.prototype.Fg;Z.prototype.setSeeking=Z.prototype.Ee;Z.prototype.isSeeking=Z.prototype.Hg;Z.prototype.getConfig=Z.prototype.eg;
|
|
1055
|
+
Z.prototype.getClientSideAdContainer=Z.prototype.dg;Z.prototype.getServerSideAdContainer=Z.prototype.wg;Z.prototype.getControlsContainer=Z.prototype.gg;Z.prototype.getLocalPlayer=Z.prototype.lg;Z.prototype.getPlayer=Z.prototype.bc;Z.prototype.getLocalVideo=Z.prototype.mg;Z.prototype.getVideo=Z.prototype.Bb;Z.prototype.getVideoContainer=Z.prototype.Cg;Z.prototype.getLocalization=Z.prototype.ng;Z.prototype.getCastProxy=Z.prototype.ag;Z.prototype.getAd=Z.prototype.getAd;
|
|
1056
|
+
Z.prototype.setEnabledNativeControls=Z.prototype.Cf;Z.prototype.setEnabledShakaControls=Z.prototype.Ae;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ig;Z.prototype.allowCast=Z.prototype.Qf;Z.registerSeekBar=function(a){ux=a};Z.registerElement=ix;Z.prototype.destroy=Z.prototype.destroy;var jx=new Map,ux=new bx;function Bx(a,b){W.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=ek();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=R("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
|
|
1057
|
+
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);Cx(this);this.eventManager.o(this.localization,"locale-updated",function(){Dx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Dx(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Df(Date.now());
|
|
1058
|
+
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){Ex(c)});Dx(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}qa(Bx,W);Bx.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];W.prototype.release.call(this)};function Fx(a,b){Gx.set(a,b)}
|
|
1059
|
+
function Cx(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Gx.get(c)?(c=Gx.get(c),a.i.push(c.create(a.h,a.controls))):Ta("Unrecognized overflow menu element requested:",c)}function Ex(a){if(a.controls.$c())a.controls.dc();else{X(a.h,!0);cx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};hb(a.h.childNodes,b)&&ib(a.h.childNodes,b)[0].focus()}}function Dx(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1060
|
+
J("shaka.ui.OverflowMenu",Bx);Bx.registerElement=Fx;function Hx(){}Hx.prototype.create=function(a,b){return new Bx(a,b)};ix("overflow_menu",new Hx);var Gx=new Map;function Ix(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=R("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");d.appendChild(this.j);
|
|
1061
|
+
this.i=R("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);Jx(this);Kx(this);this.eventManager.o(this.localization,"locale-updated",function(){Jx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Jx(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
|
|
1062
|
+
c.player.mf()==gm;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){Kx(c)})}qa(Ix,W);function Kx(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Jx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}J("shaka.ui.AirPlayButton",Ix);function Lx(){}Lx.prototype.create=function(a,b){return new Ix(a,b)};Fx("airplay",new Lx);
|
|
1063
|
+
ix("airplay",new Lx);function Mx(a,b,c){this.i=a;this.h=Nx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Zd()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.He(b);b.ui=this;c.ui=this}q=Mx.prototype;q.destroy=function(){var a=this;return I(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.D(4);a.i=null;z(b)})};q.Zd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Yc()&&1<navigator.maxTouchPoints};
|
|
1064
|
+
q.getConfiguration=function(){var a=Nx(this);Jk(a,this.h,Nx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Kk(a,b));Jk(this.h,a,Nx(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new L("uiupdated"))};q.fg=function(){return this.g};q.ih=function(a){this.g.Ae(a)};
|
|
1065
|
+
function Nx(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
|
|
1066
|
+
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},trackLabelFormat:Ox,fadeDelay:0,
|
|
1065
1067
|
doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Zd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1066
|
-
function
|
|
1067
|
-
case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;
|
|
1068
|
-
function
|
|
1069
|
-
function
|
|
1070
|
-
k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;B(m,5);return u(m,d.g.bc().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
break;case 3:
|
|
1074
|
-
function
|
|
1075
|
-
function
|
|
1076
|
-
function
|
|
1077
|
-
R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function
|
|
1078
|
-
function(){
|
|
1079
|
-
function
|
|
1080
|
-
d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);
|
|
1081
|
-
function
|
|
1082
|
-
function
|
|
1083
|
-
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1084
|
-
c.controls.
|
|
1085
|
-
J("shaka.ui.FullscreenButton",
|
|
1086
|
-
d.appendChild(this.l);this.g.appendChild(d);
|
|
1087
|
-
function
|
|
1088
|
-
this.eventManager.o(this.video,"volumechange",function(){
|
|
1089
|
-
function
|
|
1090
|
-
this.h=R("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);
|
|
1068
|
+
function Px(){var a,b,c,d,e,f,g,h,k,l,m,p,n;return I(function(t){switch(t.g){case 1:Nt();if(!ol())return Qx("shaka-ui-load-failed",Rx),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),Sx(f,e));t.D(2);break}h=r(a);k=h.next();
|
|
1069
|
+
case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;p=r(b);for(d=p.next();!d.done;d=p.next())if(n=d.value,n.parentElement==l){m=n;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));B(t,7);return u(t,Sx(l,m),9);case 9:va(t,5);break;case 7:return F(t),Qx("shaka-ui-load-failed",Tx),t["return"]();case 5:k=h.next();t.D(4);break;case 2:Qx("shaka-ui-loaded"),z(t)}})}
|
|
1070
|
+
function Qx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
|
|
1071
|
+
function Sx(a,b){var c,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:c=new S(b);d=new Mx(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.Cf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
|
|
1072
|
+
k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;B(m,5);return u(m,d.g.bc().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:F(m);case 3:k=h.next(),m.D(2)}})}J("shaka.ui.Overlay",Mx);Mx.prototype.setEnabled=Mx.prototype.ih;Mx.prototype.getControls=Mx.prototype.fg;Mx.prototype.configure=Mx.prototype.configure;Mx.prototype.getConfiguration=Mx.prototype.getConfiguration;Mx.prototype.isMobile=Mx.prototype.Zd;Mx.prototype.destroy=Mx.prototype.destroy;var Ox=0;
|
|
1073
|
+
Mx.TrackLabelFormat={LANGUAGE:Ox,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var Rx=0,Tx=1;Mx.FailReasonCode={NO_BROWSER_SUPPORT:Rx,PLAYER_FAILED_TO_LOAD:Tx};"complete"==document.readyState?I(function(a){if(1==a.g)return u(a,Promise.resolve(),2);Px();z(a)}):window.addEventListener("load",Px);function Ux(a,b,c,d,e,f,g){function h(C,A){return C+": "+A}function k(C){return"variant"==C.type?C.audioRoles?C.audioRoles.join(", "):void 0:C.roles.join(", ")}var l=a.find(function(C){return 1==C.active}),m=Fw(b);fk(b);b.appendChild(m);m=new Map;for(var p=r(a),n=p.next();!n.done;n=p.next())n=n.value,m.has(n.language)||m.set(n.language,new Set),m.get(n.language).add(k(n));m=new Set;l=l?h(l.language,k(l)):"";p={};a=r(a);for(n=a.next();!n.done;p={Ua:p.Ua},n=a.next()){p.Ua=n.value;n=p.Ua.language;var t=
|
|
1074
|
+
p.Ua.forced,v=f.resolve(Yb.Lf),y=k(p.Ua),x=h(n,y);if(!m.has(x)){m.add(x);var w=ek();w.addEventListener("click",function(C){return function(){c(C.Ua)}}(p));var D=R("span");w.appendChild(D);D.textContent=Vx(n,f);switch(g){case Ox:t&&(D.textContent+=" ("+v+")");break;case 1:y?D.textContent=y:(Ta("Track #"+p.Ua.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");t&&(D.textContent+=" ("+v+")");break;case 2:y&&(D.textContent+=": "+y);t&&(D.textContent+=" ("+v+")");
|
|
1075
|
+
break;case 3:p.Ua.label?D.textContent=p.Ua.label:(Ta("Track #"+p.Ua.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&x==l&&(w.appendChild(Iw()),D.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=D.textContent);b.appendChild(w)}}}
|
|
1076
|
+
function Vx(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Qb(a);return a in Bw?Bw[a].s:c in Bw?Bw[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function Wx(a,b,c){W.call(this,a,b);var d=this;Xx(this,c);Yx(this);Zx(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new L("submenuopen")),X(d.menu,!0),Hw(d.menu)):X(d.menu,!1)})}qa(Wx,W);
|
|
1077
|
+
function Xx(a,b){a.button=ek();a.button.classList.add("shaka-overflow-button");a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=R("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=R("span");c.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
|
|
1078
|
+
function Yx(a){a.menu=R("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=ek();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.dc()});var b=R("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1079
|
+
R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Zx(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){X(a.parent,!0);a.parent.childNodes[0].focus();cx(a.controls)}))}J("shaka.ui.SettingsMenu",Wx);function $x(a,b){Wx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){ay(c)});this.eventManager.o(this.localization,"locale-changed",function(){ay(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Za().length;X(c.button,d);by(c)});this.eventManager.o(this.player,"variantchanged",
|
|
1080
|
+
function(){by(c)});ay(this);by(this)}qa($x,Wx);function by(a){var b=a.player.Za();Ux(b,a.menu,function(c){a.player.Bd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);Hw(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
|
|
1081
|
+
function ay(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}J("shaka.ui.AudioLanguageSelection",$x);function cy(){}cy.prototype.create=function(a,b){return new $x(a,b)};Fx("language",new cy);ix("language",new cy);function dy(a,b){W.call(this,a,b);var c=this;this.h=this.controls.C;this.g=ek();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");
|
|
1082
|
+
d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);ey(this);fy(this);this.eventManager.o(this.localization,"locale-updated",function(){ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){ey(c)});this.eventManager.o(this.g,"click",function(){gy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){fy(c)})}qa(dy,W);
|
|
1083
|
+
function gy(a){var b;I(function(c){if(1==c.g){if(a.h.qa())return a.h.Gf(),c.D(0);B(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}function fy(a){var b=a.h.Ve()&&a.controls.gb,c=a.h.qa();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");hy(a)}
|
|
1084
|
+
function hy(a){a.j.textContent=a.h.qa()?a.h.yd():a.localization.resolve("OFF")}function ey(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");hy(a)}J("shaka.ui.CastButton",dy);function iy(){}iy.prototype.create=function(a,b){return new dy(a,b)};Fx("cast",new iy);ix("cast",new iy);function jy(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);ky(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){ky(c)});
|
|
1085
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Me(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(jy,W);function ky(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}J("shaka.ui.FastForwardButton",jy);function ly(){}ly.prototype.create=function(a,b){return new jy(a,b)};ix("fast_forward",new ly);function my(a,b){W.call(this,a,b);var c=this;this.h=this.controls.A;this.g=ek();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");ny(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);oy(this);this.eventManager.o(this.localization,"locale-updated",function(){oy(c)});this.eventManager.o(this.localization,"locale-changed",function(){oy(c)});this.eventManager.o(this.g,"click",function(){return I(function(d){return u(d,
|
|
1086
|
+
c.controls.Ke(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Xd()?"fullscreen_exit":"fullscreen";oy(c)});this.eventManager.o(this.h,"loadedmetadata",function(){ny(c)});this.eventManager.o(this.h,"loadeddata",function(){ny(c)})}qa(my,W);function ny(a){a.controls.Yd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function oy(a){a.g.ariaLabel=a.localization.resolve(a.controls.Xd()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1087
|
+
J("shaka.ui.FullscreenButton",my);function py(){}py.prototype.create=function(a,b){return new my(a,b)};ix("fullscreen",new py);function qy(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=R("span");this.l.classList.add("shaka-current-selection-span");
|
|
1088
|
+
d.appendChild(this.l);this.g.appendChild(d);ry(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){ry(c)});this.eventManager.o(this.localization,"locale-changed",function(){ry(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.xa();c.h.ka(1)});this.m=this.video.loop;this.h=new P(function(){c.m!=c.video.loop&&(ry(c),c.m=c.video.loop)});this.h.ka(1)}qa(qy,W);qy.prototype.release=function(){this.h.stop();this.h=null;W.prototype.release.call(this)};
|
|
1089
|
+
function ry(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}J("shaka.ui.LoopButton",qy);function sy(){}sy.prototype.create=function(a,b){return new qy(a,b)};Fx("loop",new sy);ix("loop",new sy);Tw("loop",new sy);function ty(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);uy(this);vy(this);this.eventManager.o(this.localization,"locale-updated",function(){uy(c)});this.eventManager.o(this.localization,"locale-changed",function(){uy(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
|
|
1090
|
+
this.eventManager.o(this.video,"volumechange",function(){uy(c);vy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){uy(c);vy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){uy(c);vy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;uy(c);vy(c)})}qa(ty,W);function uy(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1091
|
+
function vy(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}J("shaka.ui.MuteButton",ty);function wy(){}wy.prototype.create=function(a,b){return new ty(a,b)};ix("mute",new wy);function xy(a,b){W.call(this,a,b);var c=this;this.l=this.controls.A;this.g=ek();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);
|
|
1092
|
+
this.h=R("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);yy(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){yy(c)});this.eventManager.o(this.g,"click",function(){zy(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
|
|
1091
1093
|
"branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("ON")});this.eventManager.o(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.o(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):
|
|
1092
|
-
document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){
|
|
1093
|
-
function
|
|
1094
|
-
function
|
|
1095
|
-
"x",d]}));
|
|
1096
|
-
function
|
|
1097
|
-
"x")}function
|
|
1098
|
-
!1):(
|
|
1099
|
-
"abrstatuschanged",function(){
|
|
1100
|
-
function
|
|
1101
|
-
for(var e={},f=r(b),g=f.next();!g.done;e={Xb:e.Xb},g=f.next()){e.Xb=g.value;g=
|
|
1102
|
-
a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=
|
|
1103
|
-
a.currentSelection.textContent);a.menu.appendChild(e);
|
|
1104
|
-
function
|
|
1105
|
-
|
|
1106
|
-
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1107
|
-
d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){
|
|
1108
|
-
"click",function(){c.ad.skip()});this.ad&&
|
|
1109
|
-
J("shaka.ui.SmallPlayButton",
|
|
1094
|
+
document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){Ay(c)})}qa(xy,W);function zy(a){var b;I(function(c){if(1==c.g)return B(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=F(c);a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}
|
|
1095
|
+
function yy(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
|
|
1096
|
+
function Ay(a){I(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.ec())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.D(0)})}J("shaka.ui.PipButton",xy);function By(){}By.prototype.create=function(a,b){return new xy(a,b)};Fx("picture_in_picture",new By);ix("picture_in_picture",new By);Tw("picture_in_picture",new By);function Cy(a,b){Wx.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){Dy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Dy(c)});this.eventManager.o(this.player,"ratechange",function(){Ey(c,c.player.zb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
|
|
1097
|
+
"x",d]}));Dy(this);Fy(this);Ey(this,this.player.zb())}qa(Cy,Wx);function Dy(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
|
|
1098
|
+
function Ey(a,b){var c=Gw(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(Iw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1099
|
+
"x")}function Fy(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={uc:b.uc},d=c.next()){b.uc=d.value;d=ek();var e=R("span");e.textContent=b.uc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.uc);a.video.defaultPlaybackRate=a.g.get(f.uc)}}(b));a.menu.appendChild(d)}Hw(a.menu)}J("shaka.ui.PlaybackRateSelection",Cy);function Gy(){}Gy.prototype.create=function(a,b){return new Cy(a,b)};Fx("playback_rate",new Gy);ix("playback_rate",new Gy);function Hy(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("shaka-current-time");Iy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.Ia().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.lf(),f=c.video.duration,g=c.player.Ia(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Iy(c,"- "+Jw(e,f)),c.g.disabled=
|
|
1100
|
+
!1):(Iy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Jw(e,d),f&&(e+=" / "+Jw(f,d)),Iy(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}qa(Hy,W);function Iy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}J("shaka.ui.PresentationTimeTracker",Hy);function Jy(){}Jy.prototype.create=function(a,b){return new Hy(a,b)};ix("time_and_duration",new Jy);function Ky(a,b){Wx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){Ly(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ly(c)});this.eventManager.o(this.player,"variantchanged",function(){My(c)});this.eventManager.o(this.player,"trackschanged",function(){My(c)});this.eventManager.o(this.player,
|
|
1101
|
+
"abrstatuschanged",function(){My(c)});My(this)}qa(Ky,Wx);
|
|
1102
|
+
function My(a){var b=a.player.Za(),c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return(a.player.ec()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ec()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Fw(a.menu);fk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
|
|
1103
|
+
for(var e={},f=r(b),g=f.next();!g.done;e={Xb:e.Xb},g=f.next()){e.Xb=g.value;g=ek();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Xb;a.player.configure({abr:{enabled:!1}});a.player.ye(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.ec()?Math.round(e.Xb.bandwidth/1E3)+" kbits/s":e.Xb.height+"p";g.appendChild(h);d||e.Xb!=c||(g.ariaSelected="true",g.appendChild(Iw()),h.classList.add("shaka-chosen-item"),
|
|
1104
|
+
a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=ek();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});My(a)});a.g=R("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(Iw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
|
|
1105
|
+
a.currentSelection.textContent);a.menu.appendChild(e);Hw(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"));Ly(a)}
|
|
1106
|
+
function Ly(a){var b=a.player.ec()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}J("shaka.ui.ResolutionSelection",Ky);function Ny(){}
|
|
1107
|
+
Ny.prototype.create=function(a,b){return new Ky(a,b)};Fx("quality",new Ny);ix("quality",new Ny);function Oy(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);Py(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){Py(c)});this.eventManager.o(this.localization,"locale-changed",function(){Py(c)});
|
|
1108
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Me(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(Oy,W);function Py(a){a.g.ariaLabel=a.localization.resolve("REWIND")}J("shaka.ui.RewindButton",Oy);function Qy(){}Qy.prototype.create=function(a,b){return new Oy(a,b)};ix("rewind",new Qy);function Ry(a,b){W.call(this,a,b);var c=this;this.j=R("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=R("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=ek();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);Sy(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1109
|
+
d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){Sy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Sy(c)});this.eventManager.o(this.adManager,"ad-started",function(){Ty(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
|
|
1110
|
+
"click",function(){c.ad.skip()});this.ad&&Ty(this)}qa(Ry,W);Ry.prototype.release=function(){this.i.stop();this.i=null;W.prototype.release.call(this)};function Sy(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function Ty(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.xa(),a.i.ka(.5))}J("shaka.ui.SkipAdButton",Ry);function Uy(a,b){Nw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}qa(Uy,Nw);Uy.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};Uy.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
|
|
1111
|
+
J("shaka.ui.SmallPlayButton",Uy);function Vy(){}Vy.prototype.create=function(a,b){return new Uy(a,b)};ix("play_pause",new Vy);function Wy(a,b){W.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}qa(Wy,W);J("shaka.ui.Spacer",Wy);function Xy(){}Xy.prototype.create=function(a,b){return new Wy(a,b)};ix("spacer",new Xy);function Yy(a,b){function c(l){return Jw(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}W.call(this,a,b);var h=this;this.i=ek();this.i.classList.add("shaka-statistics-button");this.j=R("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);var k=R("label");k.classList.add("shaka-overflow-button-label");
|
|
1110
1112
|
this.A=R("span");k.appendChild(this.A);this.m=R("span");this.m.classList.add("shaka-current-selection-span");k.appendChild(this.m);this.i.appendChild(k);this.parent.appendChild(this.i);this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.g.appendChild(this.g);this.F=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
|
|
1111
|
-
this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new P(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});
|
|
1112
|
-
"locale-updated",function(){
|
|
1113
|
-
function
|
|
1114
|
-
function
|
|
1115
|
-
|
|
1116
|
-
"texttrackvisibility",function(){
|
|
1117
|
-
function
|
|
1118
|
-
function
|
|
1119
|
-
a.currentSelection.textContent);
|
|
1120
|
-
function
|
|
1121
|
-
this.eventManager.o(this.localization,"locale-changed",function(){return
|
|
1122
|
-
function
|
|
1113
|
+
this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new P(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});Zy(this);$y(this);this.eventManager.o(this.localization,
|
|
1114
|
+
"locale-updated",function(){Zy(h)});this.eventManager.o(this.localization,"locale-changed",function(){Zy(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));Zy(h)})}qa(Yy,W);
|
|
1115
|
+
function Zy(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
|
|
1116
|
+
function $y(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=R("div"),h=R("label");h.textContent=c+":";g.appendChild(h);h=R("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Ta("Unrecognized statistic element:",c)}Yy.prototype.release=function(){this.l.stop();this.l=null;W.prototype.release.call(this)};J("shaka.ui.StatisticsButton",Yy);function az(){}
|
|
1117
|
+
az.prototype.create=function(a,b){return new Yy(a,b)};Fx("statistics",new az);Tw("statistics",new az);function bz(a,b){Wx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Nb()?this.button.ariaPressed="true":this.button.ariaPressed="false";cz(this);this.eventManager.o(this.localization,"locale-updated",function(){dz(c);ez(c)});this.eventManager.o(this.localization,"locale-changed",function(){dz(c);ez(c)});this.eventManager.o(this.player,
|
|
1118
|
+
"texttrackvisibility",function(){fz(c);ez(c)});this.eventManager.o(this.player,"textchanged",function(){ez(c)});this.eventManager.o(this.player,"trackschanged",function(){gz(c)});fz(this);dz(this);ez(this);gz(this)}qa(bz,Wx);function cz(a){var b=ek();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(Iw());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1119
|
+
function fz(a){a.player.Nb()?(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption",a.button.ariaPressed="false");a.controls.dispatchEvent(new L("captionselectionupdated"))}
|
|
1120
|
+
function ez(a){var b=a.player.Ab();Ux(b,a.menu,function(c){return hz(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=ek();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Ge(!1);ez(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.ariaSelected="true",b.appendChild(Iw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
|
|
1121
|
+
a.currentSelection.textContent);Hw(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}function hz(a,b){return I(function(c){a.player.xe(b);return u(c,a.player.Ge(!0),0)})}function dz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
|
|
1122
|
+
function gz(a){var b=0<a.player.Ab().length;X(a.button,b);ez(a)}J("shaka.ui.TextSelection",bz);function iz(){}iz.prototype.create=function(a,b){return new bz(a,b)};Fx("captions",new iz);ix("captions",new iz);function jz(a,b){Vw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return kz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return lz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return lz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return kz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return mz(c)});
|
|
1123
|
+
this.eventManager.o(this.localization,"locale-changed",function(){return mz(c)});kz(this);mz(this);if(this.ad)this.onChange()}qa(jz,Vw);jz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function kz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);nz(a)}function lz(a){var b=a.ad.getVolume();a.setValue(b);nz(a)}
|
|
1124
|
+
function nz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function mz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}J("shaka.ui.VolumeBar",jz);function oz(){}oz.prototype.create=function(a,b){return new jz(a,b)};ix("volume",new oz);}).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})();
|
|
1123
1125
|
|
|
1124
1126
|
//# sourceMappingURL=shaka-player.ui.map
|