mirror of
https://github.com/Xinrea/bili-shadowreplay.git
synced 2025-11-24 20:15:34 +08:00
1865 lines
813 KiB
JavaScript
1865 lines
813 KiB
JavaScript
/*
|
|
@license
|
|
Shaka Player
|
|
Copyright 2016 Google LLC
|
|
SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/*
|
|
|
|
Copyright The Closure Library Authors.
|
|
SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
var q;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function ea(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
|
|
ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
|
|
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}
|
|
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function ha(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
|
|
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;
|
|
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.jm=b.prototype}function ra(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function sa(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}ra.prototype.u=function(a){this.h=a};
|
|
function ta(a,b){a.i={Gh:b,Rh:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function x(a,b,c){a.g=c;return{value:b}}ra.prototype.B=function(a){this.g=a};function H(a){a.g=0}function ua(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function va(a,b){a.m=0;a.j=b||0}function wa(a,b,c){a.g=b;a.m=c||0}function xa(a,b){a.m=b||0;b=a.i.Gh;a.i=null;return b}function ya(a){a.A=[a.i];a.m=0;a.j=0}
|
|
function za(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Rh?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Aa(a){this.g=new ra;this.h=a}function Ba(a,b){sa(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
|
|
function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Rh)throw b.Gh;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
function Ea(a){this.next=function(b){sa(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Da(a));return b};this.throw=function(b){sa(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.u):(ta(a.g,b),b=Da(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(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 Fa(new Ea(new Aa(a)))}function Ga(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
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)}};
|
|
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.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.A()};b.prototype.I=function(){var g=this;e(function(){if(g.C()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
|
|
function(){if(this.s)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.A=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
b.prototype.J=function(g){var h=this.j();g.pe(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(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.pe(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.pe=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).pe(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){p[u]=v;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).pe(n(p.length-1),m),k=h.next();
|
|
while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ha(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({}),
|
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ha(k,
|
|
g)&&Ha(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
ea("Map",function(a){function b(){var h={};return h.jc=h.next=h.head=h}function c(h,k){var l=h[1];return fa(function(){if(l){for(;l.head!=h[1];)l=l.jc;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[0][l];if(m&&Ha(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
|
|
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=
|
|
m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],jc:this[1].jc,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].jc.next=l.entry,this[1].jc=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.jc.next=
|
|
h.entry.next,h.entry.next.jc=h.entry.jc,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].jc=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
|
|
function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});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})}});
|
|
ea("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
|
|
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}});
|
|
ea("Array.prototype.values",function(a){return a?a:function(){return Ja(this,function(b,c){return c})}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
|
|
function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});
|
|
ea("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(0>e||1114111<e||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);65535>=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
|
|
function Ma(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{Ph:e,v:f}}return{Ph:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ma(this,b,c).Ph}});
|
|
ea("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
|
|
ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ma(this,b,c).v}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=La(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});
|
|
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)Ha(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Na});ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
|
|
ea("Array.prototype.entries",function(a){return a?a:function(){return Ja(this,function(b,c){return[b,c]})}});ea("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ea("String.prototype.repeat",function(a){return a?a:function(b){var c=La(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Number.EPSILON",function(){return Math.pow(2,-52)});
|
|
ea("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});ea("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
|
|
ea("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=La(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});function Oa(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]}
|
|
ea("Array.prototype.at",function(a){return a?a:Oa});function Qa(a){return a?a:Oa}ea("Int8Array.prototype.at",Qa);ea("Uint8Array.prototype.at",Qa);ea("Uint8ClampedArray.prototype.at",Qa);ea("Int16Array.prototype.at",Qa);ea("Uint16Array.prototype.at",Qa);ea("Int32Array.prototype.at",Qa);ea("Uint32Array.prototype.at",Qa);ea("Float32Array.prototype.at",Qa);ea("Float64Array.prototype.at",Qa);ea("String.prototype.at",function(a){return a?a:Oa});var Ra=this||self;
|
|
function P(a,b){a=a.split(".");var c=Ra;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
|
|
@license
|
|
Shaka Player
|
|
Copyright 2016 Google LLC
|
|
SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function Sa(){}function Ta(){};function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
function Ua(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};P("shaka.util.FakeEvent",S);
|
|
var Wa={Zk:"abrstatuschanged",$k:"adaptation",al:"audiotrackchanged",cl:"buffering",fl:"complete",hl:"downloadfailed",il:"downloadheadersreceived",jl:"drmsessionupdate",ll:"emsg",Kl:"prft",Error:"error",ol:"expirationupdated",ql:"firstquartile",rl:"gapjumped",wl:"keystatuschanged",Al:"loaded",Bl:"loading",Dl:"manifestparsed",El:"manifestupdated",Fl:"mediaqualitychanged",Gl:"mediasourcerecovered",Metadata:"metadata",Hl:"midpoint",Il:"nospatialvideoinfo",Jl:"onstatechange",Ll:"ratechange",Nl:"segmentappended",
|
|
Ol:"sessiondata",Pl:"spatialvideoinfo",Ql:"stalldetected",Rl:"started",Sl:"statechanged",Tl:"streaming",Ul:"textchanged",Vl:"texttrackvisibility",Wl:"thirdquartile",Xl:"timelineregionadded",Yl:"timelineregionenter",Zl:"timelineregionexit",$l:"trackschanged",bm:"unloading",dm:"variantchanged"};function Xa(){}function Ya(){}function Za(){}function $a(a){var b=Ga.apply(1,arguments);cb.has(a)||(cb.add(a),Za.apply(Xa,ha(b)))}function db(){}function eb(){}function fb(){}var cb=new Set;window.console&&(Za=function(){return console.warn.apply(console,ha(Ga.apply(0,arguments)))},Ya=function(){console.error.apply(console,ha(Ga.apply(0,arguments)))});function gb(){this.g={}}q=gb.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])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function hb(){this.Da=new gb;this.ee=this}hb.prototype.addEventListener=function(a,b){this.Da&&this.Da.push(a,b)};hb.prototype.removeEventListener=function(a,b){this.Da&&this.Da.remove(a,b)};hb.prototype.dispatchEvent=function(a){if(!this.Da)return!0;var b=this.Da.get(a.type)||[],c=this.Da.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.ee;a.currentTarget=this.ee;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
hb.prototype.release=function(){this.Da=null};function ib(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function kb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function lb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function mb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
|
|
@license
|
|
Copyright 2008 The Closure Library Authors
|
|
SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
var nb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
|
@license
|
|
Copyright 2006 The Closure Library Authors
|
|
SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function ob(a){var b;a instanceof ob?(pb(this,a.Yb),this.Yc=a.Yc,qb(this,a.bc),rb(this,a.td),this.rb=a.rb,sb(this,a.g.clone()),this.Jc=a.Jc):a&&(b=String(a).match(nb))?(pb(this,b[1]||"",!0),this.Yc=tb(b[2]||""),qb(this,b[3]||"",!0),rb(this,b[4]),this.rb=tb(b[5]||"",!0),sb(this,b[6]||"",!0),this.Jc=tb(b[7]||"")):this.g=new ub(null)}q=ob.prototype;q.Yb="";q.Yc="";q.bc="";q.td=null;q.rb="";q.Jc="";
|
|
q.toString=function(){var a=[],b=this.Yb;b&&a.push(vb(b,wb,!0),":");if(b=this.bc){a.push("//");var c=this.Yc;c&&a.push(vb(c,wb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.td;null!=b&&a.push(":",String(b))}if(b=this.rb)this.bc&&"/"!=b.charAt(0)&&a.push("/"),a.push(vb(b,"/"==b.charAt(0)?xb:yb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Jc)&&a.push("#",vb(b,zb));return a.join("")};
|
|
q.resolve=function(a){var b=this.clone();"data"===b.Yb&&(b=new ob);var c=!!a.Yb;c?pb(b,a.Yb):c=!!a.Yc;c?b.Yc=a.Yc:c=!!a.bc;c?qb(b,a.bc):c=null!=a.td;var d=a.rb;if(c)rb(b,a.td);else if(c=!!a.rb){if("/"!=d.charAt(0))if(this.bc&&!this.rb)d="/"+d;else{var e=b.rb.lastIndexOf("/");-1!=e&&(d=b.rb.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.rb=d:c=""!==a.g.toString();c?sb(b,a.g.clone()):c=!!a.Jc;c&&(b.Jc=a.Jc);return b};q.clone=function(){return new ob(this)};function pb(a,b,c){a.Yb=c?tb(b,!0):b;a.Yb&&(a.Yb=a.Yb.replace(/:$/,""))}function qb(a,b,c){a.bc=c?tb(b,!0):b}function rb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.td=b}else a.td=null}
|
|
function sb(a,b,c){b instanceof ub?a.g=b:(c||(b=vb(b,Ab)),a.g=new ub(b))}function tb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function vb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Cb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Cb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var wb=/[#\/\?@]/g,yb=/[#\?:]/g,xb=/[#\?]/g,Ab=/[#\?@]/g,zb=/#/g;function ub(a){this.g=a||null}
|
|
function Db(a){if(!a.fb&&(a.fb={},a.Gd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=ub.prototype;q.fb=null;q.Gd=null;function Eb(a){Db(a);return a.Gd}q.add=function(a,b){Db(this);this.g=null;var c=this.fb.hasOwnProperty(a)?this.fb[a]:null;c||(this.fb[a]=c=[]);c.push(b);this.Gd++;return this};
|
|
q.set=function(a,b){Db(this);this.g=null;this.fb.hasOwnProperty(a)?this.fb[a]=[b]:this.add(a,b);return this};q.get=function(a){Db(this);return this.fb[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.fb)return"";var a=[],b;for(b in this.fb)for(var c=encodeURIComponent(b),d=this.fb[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
q.clone=function(){var a=new ub;a.g=this.g;if(this.fb){var b={},c;for(c in this.fb)b[c]=this.fb[c].concat();a.fb=b;a.Gd=this.Gd}return a};function Fb(){}function Gb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Hb(a);b=Hb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Jb(a){return ArrayBuffer.isView(a)?0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
|
|
function Hb(a,b,c){c=void 0===c?Infinity:c;return Kb(a,void 0===b?0:b,c,Uint8Array)}function Lb(a,b,c){c=void 0===c?Infinity:c;return Kb(a,void 0===b?0:b,c,Uint16Array)}function Nb(a,b,c){c=void 0===c?Infinity:c;return Kb(a,void 0===b?0:b,c,DataView)}
|
|
function Kb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}P("shaka.util.BufferUtils",Fb);Fb.toDataView=Nb;Fb.toUint16=Lb;Fb.toUint8=Hb;Fb.toArrayBuffer=Jb;Fb.equal=Gb;function T(a,b,c){var d=Ga.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Ob)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}T.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};P("shaka.util.Error",T);var Ob=!0;T.Severity={RECOVERABLE:1,CRITICAL:2};T.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
T.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
|
|
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
|
|
DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
|
|
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,
|
|
AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,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,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,
|
|
CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,
|
|
CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Qb(a){this.h=a;this.g=void 0}Qb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Rb(a,b){return a.length&&b.length&&a!==b?0<Sb(a,b).length:!0}
|
|
function Sb(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(ha(d.keyIds),ha(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
|
|
function Tb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Wb=new Qb(function(){return Jb(new Uint8Array([0]))}),Xb=new Map;function Yb(a){this.h=a;this.g=null}Yb.prototype.X=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Yb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Zb(a){this.h=a;this.g=null}Zb.prototype.Sa=function(){this.stop();this.h();return this};Zb.prototype.X=function(a){var b=this;this.stop();this.g=(new Yb(function(){b.h()})).X(a);return this};Zb.prototype.Ba=function(a){var b=this;this.stop();this.g=(new Yb(function(){b.g.X(a);b.h()})).X(a);return this};Zb.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};P("shaka.util.Timer",Zb);Zb.prototype.stop=Zb.prototype.stop;Zb.prototype.tickEvery=Zb.prototype.Ba;
|
|
Zb.prototype.tickAfter=Zb.prototype.X;Zb.prototype.tickNow=Zb.prototype.Sa;function $b(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function ac(a){return""!=bc().canPlayType(a)}function cc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function dc(){return ec("Xbox One")}function fc(){return ec("Tizen")}function gc(){return ec("Tizen 3")}function hc(){return ec("Web0S")}function ic(){return ec("CrKey")}
|
|
function jc(){if(!ec("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function kc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!fc()&&!ec("PC=EOS")&&!ec("PC=APL")&&!ec("VirginMedia")&&!lc()&&!mc()&&!ec("AFT")&&!ec("WPE")&&!ec("DT_STB_BCM")&&!ec("Sky_STB")}function nc(){return ec("PlayStation 5")}function mc(){return ec("PlayStation 4")}function oc(){return ec("Hisense")||ec("VIDAA")}
|
|
function lc(){return ec("SOPOpenBrowser")}function pc(){if(!kc())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 qc(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function rc(){return ec("Android")}
|
|
function sc(){return fc()||hc()||dc()||mc()||nc()||ec("AFT")||ec("PC=EOS")||ec("PC=APL")||ec("VirginMedia")||lc()||ec("WPE")||ic()||oc()||ec("DT_STB_BCM")?!0:!1}function ec(a){return(navigator.userAgent||"").includes(a)}function bc(){if(tc)return tc;uc||(uc=new Zb(function(){tc=null}));(tc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(tc=document.createElement("video"));uc.X(1);return tc}
|
|
function vc(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
|
|
function wc(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u;return I(function(v){switch(v.g){case 1:a={width:Infinity,height:Infinity};if(ic()){n=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;ua(v,14);if(!(p=n)){v.B(16);break}return x(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(fc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(w){Za("Tizen: Error detecting screen size, default screen size 1920x1080.")}v.B(3);break}if(hc()){try{c=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,c.screenWidth),a.height=Math.max(1080,c.screenHeight)}catch(w){Za("WebOS: Error detecting screen size, default screen size 1920x1080."),
|
|
a.width=1920,a.height=1080}v.B(3);break}if(oc()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.B(3);break}if(!mc()&&!nc()){d=void 0;try{d="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(w){}if(d){a.width=1920;a.height=1080;try{e=new d.Media.Protection.ProtectionCapabilities;f=d.Media.Protection.ProtectionCapabilityResult;g=null;do g=e.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',
|
|
"com.microsoft.playready.recommendation");while(g===f.maybe);g===f.probably&&(a.width=3840,a.height=2160)}catch(w){Za("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else dc()&&(a.width=1920,a.height=1080,Za("Xbox: Error detecting screen size, default screen size 1920x1080."));v.B(3);break}h=!1;ua(v,8);return x(v,window.msdk.device.getDisplayInfo(),10);case 10:k=v.h;h="4K"===k.resolution;wa(v,9);break;case 8:return xa(v),ua(v,11),x(v,window.msdk.device.getDisplayInfoImmediate(),
|
|
13);case 13:l=v.h;h="4K"===l.resolution;wa(v,9);break;case 11:m=xa(v),Za("PlayStation: Failed to get the display info:",m);case 9:h?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.B(3);break;case 17:p=v.h;case 16:if(p){a.width=3840;a.height=2160;v.B(18);break}if(!(r=n)){v.B(19);break}return x(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:r=v.h;case 19:r&&(a.width=1920,a.height=1080);case 18:wa(v,3);break;case 14:u=xa(v),Ya("Failed to check canDisplayType:",
|
|
u);case 3:return v.return(a)}})}var uc=null,tc=null;function xc(){}
|
|
function yc(a){if(!a)return"";a=Hb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!mc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ya('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
function zc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Nb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Ac(d)}
|
|
function Bc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Hb(a);if(239==c[0]&&187==c[1]&&191==c[2])return yc(c);if(254==c[0]&&255==c[1])return zc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return zc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return zc(a,!1);if(0==c[1]&&0==c[3])return zc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return yc(a);throw new T(2,2,2003);}
|
|
function Cc(a){if(window.TextEncoder&&!mc()){var b=new TextEncoder;return Jb(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 Jb(b)}function Dc(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 Ac(a){return Ec.value()(a)}
|
|
function Fc(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}P("shaka.util.StringUtils",xc);xc.resetFromCharCode=function(){Ec.g=void 0};
|
|
xc.toUTF16=Dc;xc.toUTF8=Cc;xc.fromBytesAutoDetect=Bc;xc.fromUTF16=zc;xc.fromUTF8=yc;var Ec=new Qb(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={Dc:65536};0<b.Dc;b={Dc:b.Dc},b.Dc/=2)if(a(b.Dc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Dc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Dc));return e}}(b);return null});function Gc(){}function Hc(a){a=Ac(Hb(a));return btoa(a)}function Ic(a,b){b=void 0==b?!0:b;a=Hc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Jc(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 Kc(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}
|
|
function Lc(a){var b=Hb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Mc(){for(var a=Ga.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&1===e.BYTES_PER_ELEMENT?b.set(e,c):b.set(Hb(e),c);c+=e.byteLength}return b}P("shaka.util.Uint8ArrayUtils",Gc);Gc.concat=Mc;Gc.toHex=Lc;Gc.fromHex=Kc;Gc.fromBase64=Jc;Gc.toBase64=Ic;
|
|
Gc.toStandardBase64=Hc;function Nc(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new ob(a[0]);b=new ob(b[0]);b=d.resolve(b);c&&sb(b,c);return[b.toString()]}b=b.map(function(h){return new ob(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new ob(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&sb(g,c),d.push(g.toString())}return d}
|
|
function Oc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
|
|
function Pc(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Ic(Kc(h),!1));var l=g;22!=l.length&&(l=Ic(Kc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Hb(Cc(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Qc(a,b){if(1==b.length)return b[0];a=Rc(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Rc(a,b){for(var c=t(Sc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Tc?"":null}
|
|
function Wc(a,b){var c=[];a=t(Sc[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Tc="text",Xc={ya:"video",ia:"audio",Na:Tc,Cf:"image",Xk:"application"},Yc=1/15,Sc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Zc(){}function $c(a,b){a=ad(a);b=ad(b);return a.split("-")[0]==b.split("-")[0]}function bd(a,b){a=ad(a);b=ad(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function cd(a,b){a=ad(a);b=ad(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
|
|
function ad(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=dd.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function ed(a,b){var c=fd(a),d=fd(b);return a!=c&&b!=d&&c==d}function gd(a,b){a=ad(a);b=ad(b);return b==a?4:bd(b,a)?3:cd(b,a)?2:bd(a,b)?1:0}
|
|
function fd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=dd.get(a)||a}function hd(a){return a.language?ad(a.language):a.audio&&a.audio.language?ad(a.audio.language):a.video&&a.video.language?ad(a.video.language):"und"}
|
|
function id(a,b){a=ad(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(ad(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,bd(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,cd(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,bd(a,b))return b;return null}P("shaka.util.LanguageUtils",Zc);Zc.findClosestLocale=id;Zc.getLocaleForVariant=hd;
|
|
Zc.getLocaleForText=function(a){return ad(a.language||"und")};Zc.getBase=fd;Zc.relatedness=gd;Zc.areSiblings=ed;Zc.normalize=ad;Zc.isSiblingOf=cd;Zc.isParentOf=bd;Zc.areLanguageCompatible=$c;Zc.areLocaleCompatible=function(a,b){a=ad(a);b=ad(b);return a==b};
|
|
var dd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
|
|
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
"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",
|
|
"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",
|
|
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function jd(a){hb.call(this);this.j=ad(a);this.i=new Map;this.g=new Set;this.h=new Map}qa(jd,hb);q=jd.prototype;q.release=function(){hb.prototype.release.call(this)};
|
|
q.wh=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(ad(c.value));kd(this);a=mb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new S("unknown-locales",(new Map).set("locales",a)));a=mb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new S("locale-changed",a))};
|
|
q.Pa=function(a,b,c){a=ad(a);void 0===c&&(c=ld);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=ld||d.set(f,e)});this.h.set(a,d);kd(this);this.dispatchEvent(new S("locale-updated"));return this};q.Bk=function(a){for(var b=t(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 S("unknown-localization",a));return""};
|
|
q.mj=function(){return this.g};
|
|
function kd(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f=t(d),g=f.next(),h={};!g.done;h={Sd:void 0},g=f.next()){h.Sd=g.value;e.add(h.Sd);e.add(fd(h.Sd));g=mb(b.keys(),function(l){return function(m){return ed(m,l.Sd)}}(h));g.sort();g=t(g);for(var k=g.next();!k.done;k=g.next())e.add(k.value);h=mb(b.keys(),function(l){return function(m){return fd(m)==l.Sd}}(h));h.sort();h=t(h);for(g=h.next();!g.done;g=h.next())e.add(g.value)}e.add(c);c=[];e=t(e);for(f=e.next();!f.done;f=e.next())(f=b.get(f.value))&&c.push(f);
|
|
c.reverse();a.i.clear();b=t(c);for(e=b.next();!e.done;e=b.next())e.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(f=c.next();!f.done;f=c.next())f=a.h.get(f.value)||new Map,md(f,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new S("missing-localizations",d)))}function md(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}P("shaka.ui.Localization",jd);jd.prototype.getCurrentLocales=jd.prototype.mj;
|
|
jd.prototype.resolve=jd.prototype.resolve;jd.prototype.resolveDictionary=jd.prototype.Bk;jd.prototype.insert=jd.prototype.Pa;jd.prototype.changeLocale=jd.prototype.wh;jd.prototype.release=jd.prototype.release;var ld=1;jd.ConflictResolution={USE_OLD:0,USE_NEW:ld};jd.UNKNOWN_LOCALES="unknown-locales";jd.UNKNOWN_LOCALIZATION="unknown-localization";jd.MISSING_LOCALIZATIONS="missing-localizations";jd.LOCALE_CHANGED="locale-changed";jd.LOCALE_UPDATED="locale-updated";function nd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}nd.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function od(a){return a.h/(1-Math.pow(a.g,a.i))};function pd(){this.h=new nd(2);this.j=new nd(5);this.g=0;this.i=128E3;this.l=16E3}pd.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)};pd.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};pd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(od(this.h),od(this.j))};function rd(){this.g=new gb}q=rd.prototype;q.release=function(){this.Za();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new td(a,b,c,d),this.g.push(b,a))};q.sa=function(a,b,c,d){function e(g){f.Ma(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.Ma=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ma(),this.g.remove(b,e))}};
|
|
q.Za=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ma();this.g.g={}}};P("shaka.util.EventManager",rd);rd.prototype.removeAll=rd.prototype.Za;rd.prototype.unlisten=rd.prototype.Ma;rd.prototype.listenOnce=rd.prototype.sa;rd.prototype.listen=rd.prototype.o;rd.prototype.release=rd.prototype.release;function td(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ud(a,d);this.target.addEventListener(b,c,this.g)}
|
|
td.prototype.Ma=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ud(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 vd(a)?b:b.capture||!1}
|
|
function vd(a){var b=wd;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}wd=b}return b||!1}var wd=void 0;function xd(a){if(yd.has(a))return yd.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),yd.set(a,b),b):!1}function zd(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}var yd=new Map;function Ad(a,b){this.g=a;this.h=b}Ad.prototype.toString=function(){return"v"+this.g+"."+this.h};function Bd(a,b){var c=new Ad(5,0),d=Cd,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Dd(a,b,c,d){Za([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ed(a,b,c,d){Ya([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Cd=null;function Fd(){}Fd.prototype.extract=function(){};Fd.prototype.decode=function(){return[]};Fd.prototype.clear=function(){};Fd.prototype.getStreams=function(){return[]};function Gd(){}Gd.prototype.init=function(){};Gd.prototype.parse=function(){return[]};function Hd(){}Hd.prototype.init=function(){};Hd.prototype.i=function(){};Hd.prototype.g=function(){};Hd.prototype.j=function(){};P("shaka.media.IClosedCaptionParser",Hd);function Id(a){this.l=new Gd;if(a=Jd[a.toLowerCase()])this.l=a();this.h=new Fd;if(a=Kd)this.h=a()}Id.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Id.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Hb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
Id.prototype.g=function(){this.h.clear()};Id.prototype.j=function(){return this.h.getStreams()};P("shaka.media.ClosedCaptionParser",Id);Id.findDecoder=function(){return Kd};Id.unregisterDecoder=function(){Kd=null};Id.registerDecoder=function(a){Kd=a};Id.findParser=function(a){return Jd[a]};Id.unregisterParser=function(a){delete Jd[a]};Id.registerParser=function(a,b){Jd[a]=b};var Jd={},Kd=null;function Ld(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Md;this.scroll=Nd}P("shaka.text.CueRegion",Ld);var Md=1;Ld.units={PX:0,PERCENTAGE:Md,LINES:2};var Nd="";Ld.scrollMode={NONE:Nd,UP:"up"};function Od(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Pd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Qd(a,b,c){c||(c=Od);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={Uh:void 0},d=a.next()){e.Uh=d.value;d=b.findIndex(function(f){return function(g){return c(f.Uh,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
|
|
function Rd(a,b,c){c||(c=Od);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 Sd(a){this.h=a||"";this.g=0}function Td(a){Vd(a,/[ \t]+/gm)}function Vd(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Xd(a){return a.g==a.h.length?null:(a=Vd(a,/[^ \t\n]*/gm))?a[0]:null}
|
|
function Yd(a){a=Vd(a,Zd);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:(Number(a[6])||0)/1E3+c+60*b+3600*(Number(a[1])||0)}function $d(a){return a?Yd(new Sd(a)):null}var Zd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function ae(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function be(a){var b={},c;for(c in a)b[c]=a[c];return b}
|
|
function ce(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];void 0!==e&&(e=ce(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if("function"==typeof a)a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=t(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],void 0!==e&&(e=ce(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a};/*
|
|
@license
|
|
tXml
|
|
Copyright 2015 Tobias Nickel
|
|
SPDX-License-Identifier: MIT
|
|
*/
|
|
function de(a,b){var c=void 0===c?!1:c;a=Bc(a);return ee(a,b,c)}function ee(a,b,c){a=fe(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function ge(a){return he.has(a)?he.get(a):""}
|
|
function fe(a,b){function c(f,g){g=void 0===g?!1:g;for(var h=[];a[e];)if(60==a.charCodeAt(e)){if(47===a.charCodeAt(e+1)){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0<l&&(k=g.indexOf(f.substring(0,l)))}if(-1==k)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(33===a.charCodeAt(e+1)){if(45==a.charCodeAt(e+2)){for(;-1!==e&&(62!==a.charCodeAt(e)||
|
|
45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var p=a.charCodeAt(e);if(64<p&&91>p||96<p&&123>p){p=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123>
|
|
r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(p.startsWith("xmlns:")){r=u;var v=p.split(":")[1];he.set(r,v);ie.set(v,r)}"tt"===m&&"xml:space"===p&&"preserve"===u&&(l=!0);n[p]=u}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n=
|
|
0;n<m;n++)p=k[n],"string"!==typeof p?b&&(p.parent=l):n==m-1&&"\n"==p&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,ha(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
|
|
function je(a){return"string"===typeof a}function ke(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function le(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function me(a){if("string"===typeof a)return Fc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Fc(a)}
|
|
function pe(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=me(a))&&(a=a.trim());return a}function qe(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())qe(d.value,b,c)}return c}function re(a,b){a=le(a,b);return 1!=a.length?null:a[0]}function se(a,b,c){a=te(a,b,c);return 1!=a.length?null:a[0]}
|
|
function ue(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function ve(a,b,c){b=ge(b);return a.attributes[b+":"+c]||null}function te(a,b,c){var d=ge(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=t(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function we(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=ve(a,d.value,c))return d;return null}
|
|
function xe(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}function ye(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}
|
|
function ze(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 Ae(a){a=Number(a);return 0===a%1?a:null}function Be(a){a=Number(a);return 0===a%1&&0<a?a:null}function Ce(a){a=Number(a);return 0===a%1&&0<=a?a:null}function De(a){a=Number(a);return isNaN(a)?null:a}function Ee(a){return a?"true"===a.toLowerCase():!1}
|
|
function Fe(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
function Ge(a){var b=[];a=Fc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,nc:c.split("/@")[1]||
|
|
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].nc=c.slice(1))}return b}
|
|
function He(a,b){var c=Ge(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Ie(a,"t",d.t)),null!==d.n&&(c=Ie(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.nc)&&a[c]?Je(a[c],e,d,pe(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(ha(b.children))))}}
|
|
function Ie(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Je(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
function Ke(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=ie.has(b)?ie.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Ke(d),b.appendChild(c);return b}
|
|
function Le(a){if(!a)return null;var b={tagName:a.tagName,attributes:be(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Le(c),c.parent=b,b.children.push(c));return b}var he=new Map,ie=new Map;function Me(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Ld;this.position=null;this.positionAlign=Oe;this.size=0;this.textAlign=Pe;this.direction=Re;this.writingMode=Se;this.lineInterpretation=Te;this.line=null;this.lineHeight="";this.lineAlign=Ue;this.displayAlign=Ve;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=We;this.fontStyle=Xe;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Ic:32,rows:15}}function Ye(a,b){a=new Me(a,b,"");a.lineBreak=!0;return a}Me.prototype.clone=function(){var a=new Me(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
function Ze(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(!Rd(a.nestedCues,b.nestedCues,Ze))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(!Rd(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
|
|
function $e(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&af(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(bf)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&
|
|
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=cf(c);a.payload="";try{var m=ee("<span>"+c+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=
|
|
m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())df(c.value,a,b);else a.payload=Fc(c);else a.payload=Fc(c)}else a.payload=Fc(c)}function af(a){for(var b=t(Object.entries(ef)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Me(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(ff));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Me(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
function cf(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
|
|
function df(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ld;d.position=null;d.size=0;d.textAlign=Pe;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=gf(g.backgroundColor,h.backgroundColor),h.color=gf(g.color,h.color),h.fontFamily=gf(g.fontFamily,h.fontFamily),
|
|
h.fontSize=gf(g.fontSize,h.fontSize),h.textShadow=gf(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=Ye(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=hf;break;case "i":d.fontStyle=jf;break;case "u":d.textDecoration.push(kf);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
|
|
if(f=$d(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(je(a)||1==e.length&&je(e[0]))for(c=me(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Ye(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Fc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())df(a.value,d,c)}function gf(a,b){return a&&0<a.length?a:b}P("shaka.text.Cue",Me);Me.parseCuePayload=$e;Me.equal=Ze;
|
|
Me.prototype.clone=Me.prototype.clone;var Oe="auto";Me.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Oe};var Pe="center",lf={LEFT:"left",RIGHT:"right",CENTER:Pe,START:"start",END:"end"};Me.textAlign=lf;var Ve="after",mf={BEFORE:"before",CENTER:"center",AFTER:Ve};Me.displayAlign=mf;var Re="ltr";Me.direction={HORIZONTAL_LEFT_TO_RIGHT:Re,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Se="horizontal-tb";Me.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Se,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
|
|
var Te=0;Me.lineInterpretation={LINE_NUMBER:Te,PERCENTAGE:1};var Ue="start",nf={CENTER:"center",START:Ue,END:"end"};Me.lineAlign=nf;var ef={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Me.defaultTextColor=ef;var ff={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Me.defaultTextBackgroundColor=ff;var We=400,hf=700;Me.fontWeight={NORMAL:We,BOLD:hf};
|
|
var Xe="normal",jf="italic",of={NORMAL:Xe,ITALIC:jf,OBLIQUE:"oblique"};Me.fontStyle=of;var kf="underline";Me.textDecoration={UNDERLINE:kf,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var bf=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function pf(){}pf.prototype.destroy=function(){};function qf(a,b,c){rf[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,Xe:b}}function sf(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([tf,uf,vf,wf]),e=d.next();!e.done;e=d.next())if(e=rf[c+"-"+e.value]){var f=e.Xe(),g=f.isSupported(a,b);f.destroy();if(g)return e.Xe}return null}P("shaka.transmuxer.TransmuxerEngine",pf);pf.findTransmuxer=sf;pf.unregisterTransmuxer=function(a,b){delete rf[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
pf.registerTransmuxer=qf;pf.prototype.destroy=pf.prototype.destroy;var rf={},wf=1,vf=2,uf=3,tf=4;pf.PluginPriority={FALLBACK:wf,PREFERRED_SECONDARY:vf,PREFERRED:uf,APPLICATION:tf};function xf(){}function yf(a,b){var c=a;b&&!zf.includes(a)&&(c+='; codecs="'+b+'"');return c}function Af(a,b){b&&(a+='; codecs="'+b+'"');return a}function Bf(a,b,c){var d=yf(a,b);b=Af(a,b);sf(b)?(a=sf(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
function Cf(a,b,c){var d=[b];Df.forEach(function(e,f){var g=a[f];"codecs"==f?zf.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Ef(a){return a.split(";")[0].split("/")[1]}
|
|
function Ff(a){var b=Gf(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "vp09"===a:return"vp9";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a}
|
|
function Hf(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Gf(c.value),b.push(c[0]);return b.sort().join(",")}function If(a){return a.split(";")[0]}function Jf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Kf(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function Gf(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
|
|
P("shaka.util.MimeUtils",xf);xf.getFullTypeWithAllCodecs=Af;xf.getFullType=yf;var Df=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),zf=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Lf(a){this.i=null;this.j=a;this.C=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.s=new Map}function Mf(a){return Nf[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Kd:!1}Lf.prototype.destroy=function(){this.j=this.i=null;this.s.clear();return Promise.resolve()};
|
|
function Of(a,b,c,d,e){var f,g,h,k,l,m,n;return I(function(p){if(1==p.g)return x(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Hb(b)),p.return();f=a.C?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Hb(b),g,e,[]);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(p)})}
|
|
Lf.prototype.remove=function(a,b){var c=this;return I(function(d){if(1==d.g)return x(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));H(d)})};function Pf(a,b,c){a.l=b;a.m=c}function Qf(a,b,c){a.G=b;if(b=a.s.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
function Tf(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Tf(a,d.value,c)}
|
|
function Uf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Tf(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.G&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.s.has(f)||a.s.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.s.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}P("shaka.text.TextEngine",Lf);Lf.prototype.destroy=Lf.prototype.destroy;Lf.findParser=function(a){return Nf[a]};Lf.unregisterParser=function(a){delete Nf[a]};Lf.registerParser=function(a,b){Nf[a]=b};var Nf={};function Vf(a,b){return a.concat(b)}function Wf(){}function Xf(a){return null!=a}function Yf(a,b){return Promise.race([b,new Promise(function(c,d){(new Zb(d)).X(a)})])};function Zf(){}
|
|
function $f(a,b,c,d){var e=a.variants;if(b.length||c.length)e=eg(e,b,c);if(d.length){b=new gb;e=t(e);for(c=e.next();!c.done;c=e.next())c=c.value,b.push(String(c.video.width||0),c);var f=[];b.forEach(function(v,w){v=0;var z=[];w=t(w);for(var y=w.next(),B={};!y.done;B={tf:void 0},y=w.next())B.tf=y.value,y=d.filter(function(C){return function(D){return C.tf.decodingInfos[0][D]}}(B)).length,y>v?(v=y,z=[B.tf]):y==v&&z.push(B.tf);f.push.apply(f,ha(z))});e=f}c=new Set;b=new Set;e=t(e);for(var g=e.next();!g.done;g=
|
|
e.next())g=g.value,g.audio&&c.add(g.audio),g.video&&b.add(g.video);c=Array.from(c).sort(function(v,w){return v.bandwidth-w.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Ff(m.codecs),p=Ff(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);
|
|
e.set(k,l)}var r={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};c=Array.from(b).sort(function(v,w){if(!v.bandwidth||!w.bandwidth||v.bandwidth==w.bandwidth){if(v.codecs&&w.codecs&&v.codecs!=w.codecs&&v.width==w.width){var z=Ff(v.codecs),y=Ff(w.codecs);if(z!=y)return(r[z]||1)-(r[y]||1)}return v.width-w.width}return v.bandwidth-w.bandwidth});b=zd();var u=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||
|
|
0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Ff(m.codecs),p=Ff(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),u.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Ff(m.codecs),p=Ff(g.codecs),n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),u.push(g.id)))}else l.push(g),u.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(v){var w=v.audio;v=v.video;return w&&!h.includes(w.id)||v&&!u.includes(v.id)?!1:
|
|
!0})}function eg(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={Ni:void 0},d=b.next())if(e.Ni=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Ni)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={qh:void 0},b=c.next())if(d.qh=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.qh)}}(d)),b.length){a=b;break}return a}function fg(a,b,c){a.variants=a.variants.filter(function(d){return gg(d,b,c)})}
|
|
function gg(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
|
|
!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function hg(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return I(function(e){if(1==e.g)return x(e,ig(a,b,0<b.offlineSessionIds.length,c,d),2);jg(b);return x(e,kg(b),0)})}
|
|
function ig(a,b,c,d,e){var f,g;return I(function(h){if(1==h.g)return dc()&&lg(b.variants),x(h,mg(b.variants,c,!1,d),2);f=null;a&&(g=a.g)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=ng(k,f,e);if(!l){var m=[];k.audio&&m.push(og(k.audio));k.video&&m.push(og(k.video))}return l});H(h)})}
|
|
function lg(a){var b={dvav:"avc3",dva1:"avc1",dvhe:"hev1",dvh1:"hvc1",dvc1:"vvc1",dvi1:"vvi1"},c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(Object.keys(b));for(var e=d.next();!e.done;e=d.next())if(e=e.value,a.codecs.includes(e)){a.codecs=a.codecs.replace(e,b[e]);break}}}
|
|
function ng(a,b,c){if(!a.decodingInfos.some(function(k){return!k.supported||b&&(k=k.keySystemAccess)&&(c[k.keySystem]||k.keySystem)!=b?!1:!0}))return!1;var d=dc(),e=ec("Firefox")&&rc(),f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(d&&f&&(1920<g||1080<h)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3.")))return!1;a=a.audio;return e&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")?!1:!0}
|
|
function pg(a,b){var c,d,e,f,g,h,k;return I(function(l){if(1==l.g){c=function(m,n){if(m){var p=be(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,oe:void 0},g=f.next())k=g.value,h.oe=ce(k),h.cache=qg,h.cache[h.oe]?d=c(d,h.cache[h.oe]):e.push(rg(k).then(function(m){return function(n){var p=
|
|
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.cache[m.oe]=p,d=c(d,p))}}(h)));return x(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
|
|
function rg(a){var b=[""];a.video&&(b=Jf(a.video.contentType).split(","));var c=[""];a.audio&&(c=Jf(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={cd:void 0},g=f.next())g=g.value,h.cd=ae(a),a.video&&(h.cd.video.contentType=yf(If(h.cd.video.contentType),e)),a.audio&&(h.cd.audio.contentType=yf(If(h.cd.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){Yf(1,navigator.mediaCapabilities.decodingInfo(k.cd)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
return null})}
|
|
function mg(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G;return I(function(A){switch(A.g){case 1:if(e=a.some(function(E){return E.decodingInfos.length}))return A.return();f=t(d);g=f.next();h={};case 2:if(g.done){A.B(4);break}h.gi=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){A.B(7);break}n=m.value;p=sg(n,b,c).filter(function(E){return function(F){F=F[0];return(F.keySystemConfiguration&&F.keySystemConfiguration.keySystem)===E.gi}}(h));r=t(p);u=r.next();case 8:if(u.done){A.B(10);break}v=u.value;
|
|
return x(A,pg(n,v),9);case 9:u=r.next();A.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();A.B(5);break;case 7:if(k)return A.return();h={gi:void 0};g=f.next();A.B(2);break;case 4:w=t(a),z=w.next();case 12:if(z.done){A.B(0);break}y=z.value;B=sg(y,b,c).filter(function(E){E=E[0];E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||!d.includes(E)});C=t(B);D=C.next();case 15:if(D.done){z=w.next();A.B(12);break}G=D.value;return x(A,pg(y,G),16);case 16:D=C.next(),A.B(15)}})}
|
|
function sg(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=Jf(k);if(l.includes(",")&&!d){var m=l.split(","),n=If(k);l=Qc("video",m);m=Qc("audio",m);m=tg(m,n);n=Bf(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=ug(l);k={contentType:Bf(If(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
|
|
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=If(l),l=tg(Jf(l),k),k=Bf(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
|
|
k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=n.next();!m.done;m=
|
|
n.next()){m=Object.assign({},m.value);var p=c.get(k),r={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=t(p);for(var u=p.next();!u.done;u=p.next()){u=u.value;if(u.initData&&u.initData.length){for(var v=new Set,w=t(u.initData),z=w.next();!z.done;z=w.next())v.add(z.value.initDataType);r.initDataType=u.initData[0].initDataType}u.distinctiveIdentifierRequired&&(r.distinctiveIdentifier="required");u.persistentStateRequired&&(r.persistentState="required");
|
|
u.sessionType&&(r.sessionTypes=[u.sessionType]);d&&(r.audio?(u.encryptionScheme&&(r.audio.encryptionScheme=r.audio.encryptionScheme||u.encryptionScheme),r.audio.robustness=r.audio.robustness||u.audioRobustness):(r.audio={robustness:u.audioRobustness},u.encryptionScheme&&(r.audio.encryptionScheme=u.encryptionScheme)),""==r.audio.robustness&&delete r.audio.robustness);e&&(r.video?(u.encryptionScheme&&(r.video.encryptionScheme=r.video.encryptionScheme||u.encryptionScheme),r.video.robustness=r.video.robustness||
|
|
u.videoRobustness):(r.video={robustness:u.videoRobustness},u.encryptionScheme&&(r.video.encryptionScheme=u.encryptionScheme)),""==r.video.robustness&&delete r.video.robustness)}m.keySystemConfiguration=r;l.push(m)}a.push(l)}return a}function tg(a,b){return"flac"==a.toLowerCase()?pc()?"fLaC":"flac":"opus"===a.toLowerCase()?pc()?"mp4"==Ef(b)?"Opus":"opus":"opus":a}
|
|
function ug(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function jg(a){a.textStreams=a.textStreams.filter(function(b){b=yf(b.mimeType,b.codecs);return Mf(b)})}
|
|
function kg(a){var b,c,d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(vg.has(f)){l.B(5);break}g=wg.get(f);if(!g){vg.set(f,!1);l.B(5);break}return x(l,xg(g),7);case 7:h=l.h,vg.set(f,h);case 5:(k=vg.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,H(l)}})}
|
|
function xg(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 yg(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout: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,accessibilityPurpose:null,
|
|
originalLanguage:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null,a.hdr=c.hdr||null,a.colorGamut=c.colorGamut||null,a.videoLayout=c.videoLayout||null,g.includes(",")&&(a.channelsCount=c.channelsCount,a.audioSamplingRate=c.audioSamplingRate,a.spatialAudio=c.spatialAudio,a.originalLanguage=c.originalLanguage));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,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage);return a}
|
|
function zg(a){return{id:a.id,active:!1,type:Tc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout: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,originalAudioId:null,originalTextId:a.originalId,originalImageId:null,accessibilityPurpose:a.accessibilityPurpose,originalLanguage:a.originalLanguage}}
|
|
function Ag(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=Bg(a.segmentIndex));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,colorGamut:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,
|
|
videoCodec:null,primary:!1,roles:[],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,accessibilityPurpose:null,originalLanguage:null}}function Cg(a){a.__shaka_id||(a.__shaka_id=Dg++);return a.__shaka_id}
|
|
function Eg(a){var b=Fg(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="unknown");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function Gg(a){var b=Fg(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}
|
|
function Fg(a){var b=a.language;return{id:Cg(a),active:!1,type:"",bandwidth:0,language:ad(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout: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,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function Hg(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function Ig(a){return a.filter(function(b){return Hg(b)})}
|
|
function Jg(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=id(ad(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return ad(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Kg(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(Vf,[]);return a.length?
|
|
Kg(e,a[0]):e}function Kg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Lg(a,b){b.length&&(b=b.filter(function(c){return Ff(a.codecs)==Ff(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],1<b.length&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
|
|
function og(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"}P("shaka.util.StreamUtils",Zf);Zf.meetsRestrictions=gg;
|
|
var qg={},Dg=0,vg=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),wg=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Mg(){var a=this;this.A=null;this.i=!1;this.j=new pd;this.H=new rd;navigator.connection&&navigator.connection.addEventListener&&this.H.o(navigator.connection,"change",function(){if(a.i&&a.g.useNetworkInformation){a.j=new pd;a.g&&a.j.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.u=[];this.C=1;this.I=!1;this.h=this.s=this.g=this.l=null;this.G=new Zb(function(){if(a.i&&a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=null}q=Mg.prototype;q.stop=function(){this.A=null;this.i=!1;this.u=[];this.C=1;this.s=this.l=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop();this.m=null};q.release=function(){this.H.release();this.G=null};q.init=function(a){this.A=a};
|
|
q.chooseVariant=function(){var a=Infinity,b=Infinity;if(this.g.restrictToScreenSize){var c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;a=window.screen.height*c;b=window.screen.width*c}this.h&&this.g.restrictToElementSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=Math.min(a,this.s.clientHeight*c),b=Math.min(b,this.s.clientWidth*c));c=this.u.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});c.length||(c=this.u);var d=c;c.length!=
|
|
this.u.length&&(d=this.u.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));c=Ng(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=a||Infinity!=b){c=Og(c);c=t(c);for(var e=c.next();!e.done;e=c.next())if(e=e.value,e.height>=a&&e.width>=b){a=e.height;b=e.width;break}c=Ng(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&&!c.length&&(c=Ng(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d<c.length;d++){e=c[d];
|
|
for(var f=isNaN(this.C)?1:Math.abs(this.C),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<c.length;k++)if(e.bandwidth!=c[k].bandwidth){h=c[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;a>=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width<e.video.width||b.video.height<e.video.height))&&(b=e)}this.l=Date.now();return b};q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};
|
|
q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.j.sample(a,b),c&&null!=this.l&&this.i&&Pg(this))};q.trySuggestStreams=function(){null!=this.l&&this.i&&Pg(this)};
|
|
q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.j.getBandwidthEstimate(a);return this.m?this.m.getBandwidthEstimate(a):a};q.setVariants=function(a){this.u=a};q.playbackRateChanged=function(a){this.C=a};
|
|
q.setMediaElement=function(a){var b=this;this.s=a;this.h&&(this.h.disconnect(),this.h=null);this.s&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.X(Qg)}),this.h.observe(this.s))};q.setCmsdManager=function(a){this.m=a};q.configure=function(a){this.g=a;this.j&&this.g&&this.j.configure(this.g.advanced)};
|
|
function Pg(a){if(!a.I){var b=a.j;if(!(b.g>=b.i))return;a.I=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Ng(a,b,c,d,e){if(a.m){var f=a.m.Lh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return gg(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
function Og(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}P("shaka.abr.SimpleAbrManager",Mg);Mg.prototype.configure=Mg.prototype.configure;Mg.prototype.setCmsdManager=Mg.prototype.setCmsdManager;Mg.prototype.setMediaElement=Mg.prototype.setMediaElement;Mg.prototype.playbackRateChanged=Mg.prototype.playbackRateChanged;Mg.prototype.setVariants=Mg.prototype.setVariants;
|
|
Mg.prototype.getBandwidthEstimate=Mg.prototype.getBandwidthEstimate;Mg.prototype.trySuggestStreams=Mg.prototype.trySuggestStreams;Mg.prototype.segmentDownloaded=Mg.prototype.segmentDownloaded;Mg.prototype.disable=Mg.prototype.disable;Mg.prototype.enable=Mg.prototype.enable;Mg.prototype.chooseVariant=Mg.prototype.chooseVariant;Mg.prototype.init=Mg.prototype.init;Mg.prototype.release=Mg.prototype.release;Mg.prototype.stop=Mg.prototype.stop;var Qg=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Rg(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}
|
|
Rg.prototype.add=function(a,b,c){var d=this.h;b=void 0===b?!0:b;c=void 0===c?!1:c;var e;if(!(e=!!d.audio!=!!a.audio||!!d.video!=!!a.video||d.language!=a.language)&&(e=d.audio&&a.audio)){e=d.audio;var f=a.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||b&&!Sg(e,f)||!Tg(e.roles,f.roles)||c&&e.groupId!==f.groupId)}!(c=e)&&(c=d.video&&a.video)&&(d=d.video,c=a.video,c=!((!b||Sg(d,c))&&Tg(d.roles,c.roles)));
|
|
return c?!1:(this.g.add(a),!0)};Rg.prototype.values=function(){return this.g.values()};function Sg(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Hf(d)});b=b.codecs.split(",").map(function(d){return Hf(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}
|
|
function Tg(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Ug(a,b,c){this.g=new Vg(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,a.video&&a.video.hdr?a.video.hdr:"",a.audio&&a.audio.spatialAudio?a.audio.spatialAudio:!1,a.video&&a.video.videoLayout?a.video.videoLayout:"","","",b,c,a.audio&&a.audio.codecs?a.audio.codecs:"")}Ug.prototype.create=function(a){return this.g.create(a)};function Vg(a,b,c,d,e,f,g,h,k,l,m){this.A=a;this.C=b;this.i=c;this.j=d;this.G=e;this.m=f;this.h=g;this.l=h;this.s=k;this.u=l;this.g=m}
|
|
Vg.prototype.create=function(a){var b=[];b=Wg(a,this.A);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Xg(b,this.C);a.length&&(b=a);this.m&&(a=Yg(b,this.m),a.length&&(b=a));this.j&&(a=Zg(b,this.j),a.length&&(b=a));this.i&&(a=$g(b,this.i),a.length&&(b=a));this.h&&(a=ah(b,this.h),a.length&&(b=a));this.l&&(a=bh(b,this.l),a.length&&(b=a));a=ch(b,this.G);a.length&&(b=a);this.g&&(a=dh(b,this.g),a.length&&(b=a));return new Rg(b[0],b,!("smooth"==this.s&&zd()),this.u)};
|
|
function Wg(a,b){b=ad(b);var c=id(b,a.map(function(d){return hd(d)}));return c?a.filter(function(d){return c==hd(d)}):[]}function Xg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function ah(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function bh(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
function $g(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Zg(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?a.some(function(c){return c.video&&c.video.hdr&&"HLG"==c.video.hdr?!0:!1})?"HLG":"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Yg(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}
|
|
function ch(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function dh(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function eh(){this.g=fh;this.i=(new Map).set(fh,2).set(gh,1);this.h=0}function hh(a,b,c){a.i.set(fh,c).set(gh,b)}var gh=0,fh=1;function ih(a,b){var c=jh();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
function kh(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 T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return x(d,new Promise(function(e){(new Zb(e)).X(c/1E3)}),2)}a.h*=a.m;H(d)})}function jh(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function lh(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}lh.prototype.resolve=function(){};lh.prototype.reject=function(){};function mh(a,b){this.promise=a;this.i=b;this.g=null}function nh(a){return new mh(Promise.reject(a),function(){return Promise.resolve()})}function oh(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new mh(a,function(){return Promise.resolve()})}function ph(a){return new mh(Promise.resolve(a),function(){return Promise.resolve()})}function qh(a){return new mh(a,function(){return a.catch(function(){})})}mh.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
|
|
function rh(a){return new mh(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}mh.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
mh.prototype.Ta=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=sh(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new lh;f.catch(function(){});var g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new mh(f,function(){return d()})};
|
|
function sh(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()}}}da.Object.defineProperties(mh.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});P("shaka.util.AbortableOperation",mh);mh.prototype.chain=mh.prototype.Ta;mh.prototype["finally"]=mh.prototype.finally;
|
|
mh.all=rh;mh.prototype.abort=mh.prototype.abort;mh.notAbortable=qh;mh.completed=ph;mh.aborted=oh;mh.failed=nh;function th(){this.g=[]}function uh(a,b){a.g.push(b.finally(function(){Pd(a.g,b)}))}th.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function vh(a,b,c,d,e,f){hb.call(this);this.i=!1;this.s=new th;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.C=c||null;this.G=d||null;this.I=e||null;this.H=f||null;this.u=this.A=!1;this.m=16E3}qa(vh,hb);q=vh.prototype;q.Xg=function(a){this.A=a};q.Yg=function(a){this.u=a};function wh(a,b,c,d){c=c||xh;var e=yh[a];if(!e||c>=e.priority)yh[a]={priority:c,Xe:b,nk:void 0===d?!1:d}}
|
|
function zh(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.rk=function(a){this.g.add(a)};q.Sk=function(a){this.g.delete(a)};q.yh=function(){this.g.clear()};q.tk=function(a){this.h.add(a)};q.Tk=function(a){this.h.delete(a)};q.Ah=function(){this.h.clear()};
|
|
function Ah(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();hb.prototype.release.call(this);return this.s.destroy()};
|
|
q.request=function(a,b,c){var d=this,e=new Bh;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new Dh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ae(b.retryParameters):jh();b.uris=ae(b.uris);f=Eh(this,a,b,c);var g=f.Ta(function(){return Fh(d,a,b,c,new ih(b.retryParameters,!1),0,null,e)}),h=g.Ta(function(p){return Gh(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Ta(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.Qj||!d.l||u.fromCache||"HEAD"==b.method||a!=Hh||d.l(u.timeMs,u.data.byteLength,Ih(c));d.H&&d.H(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new Dh(n.promise,function(){return n.abort()},e);uh(this.s,f);return f};
|
|
function Eh(a,b,c,d){function e(h){f=f.Ta(function(){c.body&&(c.body=Jb(c.body));return h(b,c,d)})}var f=ph(void 0);a.G&&e(a.G);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Ta(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
function Fh(a,b,c,d,e,f,g,h){a.A&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.u&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.I&&a.I(b,d,c.uris[f],c.uris[f-1]);var k=new ob(c.uris[f]),l=k.Yb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),pb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=yh[l])?l.Xe:null;if(!n)return nh(new T(2,1,1E3,k));var p=l.nk,r=null,u=null,v=!1,w=!1,z;return qh(kh(e)).Ta(function(){if(a.i)return oh();z=Date.now();var y=0;c.requestStartTime=Date.now();
|
|
var B=n(c.uris[f],c,b,function(G,A,E){r&&r.stop();u&&u.X(D/1E3);a.l&&b==Hh&&(y++,c.packetNumber=y,a.l(G,A,Ih(d),c),m=!0,h.g=E)},function(G){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.j&&a.j(G,c,b)},{minBytesForProgressEvents:a.m});if(!p)return B;var C=c.retryParameters.connectionTimeout;C&&(r=new Zb(function(){v=!0;B.abort()}),r.X(C/1E3));var D=c.retryParameters.stallTimeout;D&&(u=new Zb(function(){v=!0;B.abort()}));return B}).Ta(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=
|
|
Date.now()-z);var B={response:y,Qj:m};!w&&a.j&&a.j(y.headers,c,b);return B},function(y){r&&r.stop();u&&u.stop();if(a.C){var B=null,C=0;y instanceof T&&(B=y,1001==y.code&&(C=y.data[1]));a.C(c,B,C,v)}if(a.i)return oh();v&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return B=(new Map).set("error",y),B=new S("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,Fh(a,b,c,d,e,f,y,h)}throw y;})}
|
|
function Gh(a,b,c,d){var e=ph(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={mi:void 0},f=a.next())g.mi=f.value,e=e.Ta(function(h){return function(){var k=c.response;k.data&&(k.data=Jb(k.data));return(0,h.mi)(b,k,d)}}(g));return e.Ta(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function Ih(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.s)return!1}return!0}P("shaka.net.NetworkingEngine",vh);
|
|
vh.prototype.request=vh.prototype.request;vh.prototype.destroy=vh.prototype.destroy;vh.makeRequest=Ah;vh.defaultRetryParameters=function(){return jh()};vh.prototype.clearAllResponseFilters=vh.prototype.Ah;vh.prototype.unregisterResponseFilter=vh.prototype.Tk;vh.prototype.registerResponseFilter=vh.prototype.tk;vh.prototype.clearAllRequestFilters=vh.prototype.yh;vh.prototype.unregisterRequestFilter=vh.prototype.Sk;vh.prototype.registerRequestFilter=vh.prototype.rk;vh.unregisterScheme=function(a){delete yh[a]};
|
|
vh.registerScheme=wh;vh.prototype.setForceHTTPS=vh.prototype.Yg;vh.prototype.setForceHTTP=vh.prototype.Xg;function Bh(){this.g=0}vh.NumBytesRemainingClass=Bh;function Dh(a,b,c){mh.call(this,a,b);this.h=c}qa(Dh,mh);vh.PendingRequest=Dh;var Hh=1;vh.RequestType={MANIFEST:0,SEGMENT:Hh,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};
|
|
vh.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var xh=3;vh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:xh};var yh={};function Jh(a){this.g=!1;this.h=new lh;this.i=a}Jh.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 Kh(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Lh(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Mh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Nh(a,b){this.h=Nb(a);this.i=b==Rh;this.g=0}q=Nh.prototype;q.Ga=function(){return this.g<this.h.byteLength};q.Oa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.Z=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Sh();}};q.Aa=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Sh();}};q.U=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Sh();}};
|
|
q.ji=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Sh();}};q.ud=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Sh();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Rb=function(a){if(this.g+a>this.h.byteLength)throw Sh();var b=Hb(this.h,this.g,a);this.g+=a;return b};
|
|
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Sh();this.g+=a};q.ni=function(a){if(this.g<a)throw Sh();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Sh();this.g=a};q.Uc=function(){for(var a=this.g;this.Ga()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Hb(this.h,a,this.g-a);this.g+=1;return yc(a)};function Sh(){return new T(2,3,3E3)}P("shaka.util.DataViewReader",Nh);Nh.prototype.readTerminatedString=Nh.prototype.Uc;Nh.prototype.seek=Nh.prototype.seek;Nh.prototype.rewind=Nh.prototype.ni;
|
|
Nh.prototype.skip=Nh.prototype.skip;Nh.prototype.readBytes=Nh.prototype.Rb;Nh.prototype.readUint64=Nh.prototype.ud;Nh.prototype.readInt32=Nh.prototype.ji;Nh.prototype.readUint32=Nh.prototype.U;Nh.prototype.readUint16=Nh.prototype.Aa;Nh.prototype.readUint8=Nh.prototype.Z;Nh.prototype.getLength=Nh.prototype.getLength;Nh.prototype.getPosition=Nh.prototype.Oa;Nh.prototype.hasMoreData=Nh.prototype.Ga;var Rh=1;Nh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Rh};function Th(){this.i=[];this.h=[];this.g=!1}q=Th.prototype;q.box=function(a,b){a=Uh(a);this.i[a]=Vh;this.h[a]=b;return this};q.W=function(a,b){a=Uh(a);this.i[a]=Wh;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Nh(a,0);for(this.g=!1;a.Ga()&&!this.g;)this.rd(0,a,b,c)};
|
|
q.rd=function(a,b,c,d){var e=b.Oa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.U(),g=b.U(),h=Xh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Oa()+8>b.getLength()){this.g=!0;return}f=b.ud();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Wh){if(d&&b.Oa()+4>b.getLength()){this.g=!0;return}n=b.U();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Oa(),b=0<d?b.Rb(d):new Uint8Array(0),b=new Nh(b,0),l({name:h,parser:this,
|
|
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Oa(),b.getLength()-b.Oa()))}};function Yh(a){for(var b=Zh(a);a.reader.Ga()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}function $h(a){for(var b=Zh(a),c=a.reader.U(),d=0;d<c&&(a.parser.rd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function ai(a){var b=Zh(a);for(a.reader.skip(78);a.reader.Ga()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}
|
|
function bi(a){var b=Zh(a);a.reader.skip(8);var c=a.reader.Aa();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Ga()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}function ci(a){return function(b){a(b.reader.Rb(b.reader.getLength()-b.reader.Oa()))}}function Uh(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Xh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
function Zh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",Th);Th.headerSize=Zh;Th.typeToString=Xh;Th.allData=ci;Th.audioSampleEntry=bi;Th.visualSampleEntry=ai;Th.sampleDescription=$h;Th.children=Yh;Th.prototype.parseNext=Th.prototype.rd;Th.prototype.parse=Th.prototype.parse;Th.prototype.stop=Th.prototype.stop;Th.prototype.fullBox=Th.prototype.W;Th.prototype.box=Th.prototype.box;var Vh=0,Wh=1;function di(a){var b=this;this.g=[];this.h=[];this.data=[];(new Th).box("moov",Yh).box("moof",Yh).W("pssh",function(c){if(!(1<c.version)){var d=Hb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Lc(c.reader.Rb(16)));if(0<c.version){d=c.reader.U();for(var e=0;e<d;e++){var f=Lc(c.reader.Rb(16));b.h.push(f)}}}}).parse(a)}
|
|
function ei(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Nb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Kc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function fi(a){var b=this;this.G=a;this.l=this.A=null;this.ha=this.$=!1;this.J=0;this.g=null;this.s=new rd;this.i=new Map;this.C=new Map;this.m=new lh;this.h=null;this.u=function(c){2==c.severity&&b.m.reject(c);a.onError(c)};this.V=new Map;this.aa=new Map;this.L=new Zb(function(){return gi(b)});this.O=!1;this.M=[];this.S=!1;this.K=new Zb(function(){hi(b)});this.m.catch(function(){});this.j=new Jh(function(){return ii(b)});this.Y=!1;this.H=this.I=null;this.P=function(){return!1}}q=fi.prototype;
|
|
q.destroy=function(){return this.j.destroy()};function ii(a){return I(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.m.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,x(b,ji(a),2);case 2:if(!a.l){b.B(3);break}ua(b,4);return x(b,a.l.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:xa(b);case 5:a.l=null;case 3:a.g=null,a.A=null,a.C=new Map,a.h=null,a.u=function(){},a.G=null,a.Y=!1,a.I=null,H(b)}})}q.configure=function(a,b){this.h=a;b&&(this.P=b);this.K&&this.K.Ba(this.h.updateExpirationTime)};
|
|
function ki(a,b,c){a.ha=!0;a.C=new Map;a.O=c;return li(a,b)}function mi(a,b,c){a.C=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.C.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.C.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.O=0<a.C.size;return li(a,b)}
|
|
function ni(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 oi(a,g,[])}
|
|
function li(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return I(function(D){if(1==D.g){if(c=pi(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(G){return G.video&&G.video.drmInfos.length||G.audio&&G.audio.drmInfos.length?!0:!1});g||(h=Lh(a.h.servers),qi(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=ri(n),r=t(p),u=r.next();!u.done;u=r.next())v=u.value,k.add(v);w=t(k);for(z=w.next();!z.done;z=
|
|
w.next())y=z.value,si(y,Lh(a.h.servers),Lh(a.h.advanced||{}),a.h.keySystemsMapping);return x(D,mg(b,a.O,a.Y,a.h.preferredKeySystems),2)}Kh(a.j);B=g||Object.keys(a.h.servers).length;if(!B)return a.$=!0,D.return(Promise.resolve());C=oi(a,void 0,b);return D.return(g?C:C.catch(function(){}))})}
|
|
function ti(a){var b;return I(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.I){c.B(2);break}return x(c,a.I,3);case 3:return Kh(a.j),c.return();case 2:return ua(c,4),a.I=a.l.setMediaKeys(a.A),x(c,a.I,6);case 6:wa(c,5);break;case 4:b=xa(c),a.u(new T(2,6,6003,b.message));case 5:Kh(a.j),H(c)}})}function ui(a,b){return I(function(c){if(1==c.g)return x(c,ti(a),2);vi(a,b.initDataType,Hb(b.initData));H(c)})}
|
|
q.$b=function(a){var b=this;return I(function(c){if(1==c.g){if(!b.A)return b.s.sa(a,"encrypted",function(){b.u(new T(2,6,6010))}),c.return();b.l=a;b.s.sa(b.l,"play",function(){for(var d=t(b.M),e=d.next();!e.done;e=d.next())wi(b,e.value);b.S=!0;b.M=[]});b.l.remote?(b.s.o(b.l.remote,"connect",function(){return ji(b)}),b.s.o(b.l.remote,"connecting",function(){return ji(b)}),b.s.o(b.l.remote,"disconnect",function(){return ji(b)})):"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",
|
|
function(){return ji(b)});b.H=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.H||"com.apple.fps"!==b.g.keySystem||b.C.size?x(c,ti(b),2):c.B(2)}xi(b).catch(function(){});b.H||b.C.size||b.h.parseInbandPsshEnabled||b.s.o(b.l,"encrypted",function(d){return ui(b,d)});H(c)})};
|
|
function yi(a){var b,c,d,e,f;return I(function(g){switch(g.g){case 1:if(!a.A||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=Ah([a.g.serverCertificateUri],a.h.retryParameters);ua(g,3);c=a.G.ic.request(5,b,{isPreload:a.P()});return x(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Hb(d.data);wa(g,4);break;case 3:throw e=xa(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
ua(g,6);return x(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=xa(g),new T(2,6,6004,f.message);}})}function zi(a,b){var c,d,e;return I(function(f){if(1==f.g)return x(f,Ai(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Fb=new lh,d.push(e.Fb);d.push(c.remove());return x(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
|
|
function xi(a){var b,c,d,e,f;return I(function(g){if(1==g.g){if(!a.C.size)return g.B(2);a.C.forEach(function(h,k){Ai(a,k,h)});return x(g,a.m,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Bi(a))return g.return(a.m);a.m=new lh;a.m.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,vi(a,f.initDataType,f.initData);Ci(a)&&a.m.resolve();return g.return(a.m)})}
|
|
function vi(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Gb(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Gb(c,g.initData)&&(f=!0)});if(f)return}0<a.i.size&&Ci(a)&&(a.m.resolve(),a.m=new lh,a.m.catch(function(){}));Di(a,b,c,a.g.sessionType)}}function Ei(a){a=a.i.keys();a=ib(a,function(b){return b.sessionId});return Array.from(a)}
|
|
q.jg=function(){var a=this,b=this.i.keys();b=ib(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Jd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.ze=function(){return Mh(this.aa)};
|
|
function oi(a,b,c){var d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:d=new Map;if(c.length){e=Fi(a,c,d);n.B(2);break}return x(n,Gi(a,b),3);case 3:e=n.h;case 2:f=e;if(!f)throw new T(2,6,6001);Kh(a.j);ua(n,4);f.getConfiguration();g=a.h.keySystemsMapping[f.keySystem]||f.keySystem;if(c.length){var p=g;var r=d.get(g);var u=[],v=[],w=[],z=[],y=[],B=new Set,C=new Set;Hi(r,u,v,z,w,y,B,C);var D=a.O?"persistent-license":"temporary";p={keySystem:p,encryptionScheme:u[0],licenseServerUri:v[0],distinctiveIdentifierRequired:r[0].distinctiveIdentifierRequired,
|
|
persistentStateRequired:r[0].persistentStateRequired,sessionType:r[0].sessionType||D,audioRobustness:r[0].audioRobustness||"",videoRobustness:r[0].videoRobustness||"",serverCertificate:z[0],serverCertificateUri:w[0],initData:y,keyIds:B};0<C.size&&(p.keySystemUris=C);r=t(r);for(C=r.next();!C.done;C=r.next())C=C.value,C.distinctiveIdentifierRequired&&(p.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(p.persistentStateRequired=C.persistentStateRequired);r=p}else r=
|
|
g,C=b.get(g),p=[],u=[],v=[],w=[],z=[],y=new Set,Hi(C.drmInfos,p,u,w,v,z,y),r={keySystem:r,encryptionScheme:p[0],licenseServerUri:u[0],distinctiveIdentifierRequired:"required"==C.distinctiveIdentifier,persistentStateRequired:"required"==C.persistentState,sessionType:C.sessionTypes[0]||"temporary",audioRobustness:(C.audioCapabilities?C.audioCapabilities[0].robustness:"")||"",videoRobustness:(C.videoCapabilities?C.videoCapabilities[0].robustness:"")||"",serverCertificate:w[0],serverCertificateUri:v[0],
|
|
initData:z,keyIds:y};a.g=r;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return x(n,f.createMediaKeys(),6);case 6:h=n.h;Kh(a.j);a.A=h;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.A)){n.B(7);break}ua(n,8);return x(n,a.A.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:k=n.h;if("usable"!=k)throw new T(2,6,6018);Kh(a.j);wa(n,7,4);break;case 8:l=xa(n,4);if(l instanceof T)throw l;throw new T(2,6,6019,l.message);case 7:return a.$=!0,x(n,yi(a),11);case 11:Kh(a.j);
|
|
wa(n,0);break;case 4:m=xa(n);Kh(a.j,m);a.g=null;if(m instanceof T)throw m;throw new T(2,6,6002,m.message);}})}
|
|
function Fi(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(ri(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);d=t(a.h.preferredKeySystems);f=d.next();for(e={};!f.done;e={ii:void 0},f=d.next()){e.ii=f.value;f=t(b);for(var g=f.next();!g.done;g=f.next())if(g=g.value.decodingInfos.find(function(m){return function(n){return n.supported&&null!=n.keySystemAccess&&n.keySystemAccess.keySystem==
|
|
m.ii}}(e)))return g.keySystemAccess}d=t([!0,!1]);for(e=d.next();!e.done;e=d.next())for(e=e.value,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.decodingInfos);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.supported&&h.keySystemAccess){var k=h.keySystemAccess.keySystem,l=c.get(k);!l&&a.h.keySystemsMapping[k]&&(l=c.get(a.h.keySystemsMapping[k]));k=t(l);for(l=k.next();!l.done;l=k.next())if(!!l.value.licenseServerUri==e)return h.keySystemAccess}}return null}
|
|
function Gi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z;return I(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new T(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){y.B(4);break}k=h.value;if(!b.has(k)){y.B(3);break}l=b.get(k);ua(y,6);return x(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
y.h,y.return(c);case 6:xa(y);case 7:Kh(a.j);case 3:h=g.next();y.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.B(11);break}p=n.value;r=t(b.keys());u=r.next();case 12:if(u.done){n=m.next();y.B(9);break}v=u.value;w=b.get(v);z=w.drmInfos.some(function(B){return!!B.licenseServerUri});if(z!=p){y.B(13);break}ua(y,15);return x(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:xa(y);case 16:Kh(a.j);case 13:u=r.next();y.B(12);break;case 11:return y.return(c)}})}
|
|
function pi(a){a=Lh(a.h.clearKeys);return 0==a.size?null:Pc(a)}function Ii(a){Ci(a)&&a.m.resolve()}function Ji(a,b){(new Zb(function(){b.loaded=!0;Ii(a)})).X(Ki)}
|
|
function Ai(a,b,c){var d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:try{d=a.A.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.u(e),m.return(Promise.reject(e))}a.s.o(d,"message",function(n){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.S?a.M.push(n):wi(a,n)});a.s.o(d,"keystatuseschange",function(n){return Li(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Fg:Infinity,Fb:null,type:"persistent-license"};a.i.set(d,f);ua(m,2);return x(m,
|
|
d.load(b),4);case 4:return g=m.h,Kh(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.u(new T(h,6,6013)),f.loaded=!0),Ji(a,f),Ii(a),m.return(d);case 2:k=xa(m),Kh(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.u(new T(l,6,6005,k.message)),f.loaded=!0,Ii(a);case 3:return m.return(Promise.resolve())}})}
|
|
function Di(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.u(new T(2,6,6005,f.message));return}a.s.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.S?a.M.push(f):wi(a,f)});a.s.o(e,"keystatuseschange",function(f){return Li(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Fg:Infinity,Fb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.u(b);return}a.h.logLicenseExchange&&Ic(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
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.u(new T(2,6,6006,f.message,f,h))}})}
|
|
function wi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;I(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Ic(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=Ah([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
|
|
f.headers[h];if("org.w3.clearkey"===a.g.keySystem){var z=g,y=a.g;try{var B=Bc(z.body);if(B){var C=JSON.parse(B);C.type||(C.type=y.sessionType,z.body=Cc(JSON.stringify(C)))}}catch(D){}}if(Tb(a.g.keySystem))if(z=zc(g.body,!0,!0),z.includes("PlayReadyKeyMessage")){z=ee(z,"PlayReadyKeyMessage");y=qe(z,"HttpHeader");y=t(y);for(B=y.next();!B.done;B=y.next())C=B.value,B=qe(C,"name")[0],C=qe(C,"value")[0],g.headers[me(B)]=me(C);z=qe(z,"Challenge")[0];g.body=Jc(me(z))}else g.headers["Content-Type"]="text/xml; charset=utf-8";
|
|
k=Date.now();ua(w,2);m=a.G.ic.request(2,g,{isPreload:a.P()});return x(w,m.promise,4);case 4:l=w.h;wa(w,3);break;case 2:n=xa(w);if(a.j.g)return w.return();p=new T(2,6,6007,n);1==a.i.size?(a.u(p),d&&d.Fb&&d.Fb.reject(p)):(d&&d.Fb&&d.Fb.reject(p),a.i.delete(c),Ci(a)&&(a.m.resolve(),a.L.X(.1)));return w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Ic(l.data);ua(w,5);return x(w,c.update(l.data),7);case 7:wa(w,6);break;case 5:return r=xa(w),u=new T(2,6,6008,
|
|
r.message),a.u(u),d&&d.Fb&&d.Fb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new S("drmsessionupdate");a.G.onEvent(v);d&&(d.Fb&&d.Fb.resolve(),Ji(a,d));H(w)}})}
|
|
function Li(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Tb(a.g.keySystem)&&16==g.byteLength&&(cc()||mc())){h=Nb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Lc(g).slice(0,32);a.V.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Fb&&(a.i.delete(b),b.close().catch(function(){}));
|
|
Ci(a)&&(a.m.resolve(),a.L.X(Mi))}function gi(a){var b=a.V,c=a.aa;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.u(new T(2,6,6014));a.G.Ue(Mh(c))}
|
|
function Ni(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L;return I(function(K){if(1==K.g){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.widevine.alpha.experiment":b,
|
|
"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(O,M){var N,R,Q,Y,ia,X,ja,Pa;return I(function(Ka){switch(Ka.g){case 1:return ua(Ka,2),x(Ka,M.createMediaKeys(),4);case 4:wa(Ka,3);
|
|
break;case 2:return xa(Ka),Ka.return();case 3:R=(N=M.getConfiguration().sessionTypes)?N.includes("persistent-license"):!1,gc()&&(R=!1),Q=M.getConfiguration().videoCapabilities,Y=M.getConfiguration().audioCapabilities,ia={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(O)&&k.get(O)?ia=k.get(O):k.set(O,ia),(X=Q[0].encryptionScheme)&&!ia.encryptionSchemes.includes(X)&&ia.encryptionSchemes.push(X),(ja=Q[0].robustness)&&!ia.videoRobustnessLevels.includes(ja)&&
|
|
ia.videoRobustnessLevels.push(ja),(Pa=Y[0].robustness)&&!ia.audioRobustnessLevels.includes(Pa)&&ia.audioRobustnessLevels.push(Pa),H(Ka)}})};m=function(O,M,N,R){var Q,Y,ia,X,ja,Pa,Ka,jb,ab,Ia;return I(function(Va){switch(Va.g){case 1:ua(Va,2);Q=ae(g);Y=t(Q.videoCapabilities);for(ia=Y.next();!ia.done;ia=Y.next())X=ia.value,X.encryptionScheme=M,X.robustness=N;ja=t(Q.audioCapabilities);for(Pa=ja.next();!Pa.done;Pa=ja.next())Ka=Pa.value,Ka.encryptionScheme=M,Ka.robustness=R;jb=ae(Q);jb.persistentState=
|
|
"required";jb.sessionTypes=["persistent-license"];ab=[jb,Q];return x(Va,Yf(1,navigator.requestMediaKeySystemAccess(O,ab)),4);case 4:return Ia=Va.h,x(Va,l(O,Ia),5);case 5:wa(Va,0);break;case 2:xa(Va),H(Va)}})};n=function(O,M,N,R){var Q,Y,ia;return I(function(X){switch(X.g){case 1:return ua(X,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:O,
|
|
video:{encryptionScheme:M,robustness:N},audio:{encryptionScheme:M,robustness:R}}},x(X,Yf(1,navigator.mediaCapabilities.decodingInfo(Q)),4);case 4:return Y=X.h,ia=Y.keySystemAccess,x(X,l(O,ia),5);case 5:wa(X,0);break;case 2:xa(X),H(X)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(z=w.next();!z.done;z=w.next())for(y=z.value,B=t(a),C=B.next();!C.done;C=B.next())D=C.value,"org.w3.clearkey"===D&&pc()||(v.push(m(D,y,"","")),v.push(n(D,y,"","")));G=t(a);for(A=G.next();!A.done;A=
|
|
G.next())for(E=A.value,F=t(d[E]||[]),J=F.next();!J.done;J=F.next())L=J.value,v.push(m(E,null,L,"")),v.push(m(E,null,"",L)),v.push(n(E,null,L,"")),v.push(n(E,null,"",L));return x(K,Promise.all(v),2)}return K.return(Mh(k))})}function Oi(a){return I(function(b){if(1==b.g)return ua(b,2),x(b,Yf(Pi,Promise.all([a.close(),a.closed])),4);if(2!=b.g)return wa(b,0);xa(b);H(b)})}
|
|
function ji(a){var b;return I(function(c){b=Array.from(a.i.entries());a.i.clear();return x(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return I(function(g){if(1==g.g)return ua(g,2),a.ha||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?x(g,Oi(e),5):x(g,e.remove(),5);if(2!=g.g)return wa(g,0);xa(g);H(g)})})),0)})}function ri(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
function hi(a){a.i.forEach(function(b,c){var d=b.Fg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Fg=e)})}function Ci(a){a=a.i.values();return kb(a,function(b){return b.loaded})}function Bi(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.V.get(c.value))return!1;return!0}
|
|
function qi(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
function Hi(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Ka:void 0},l=a.next()){m.Ka=l.value;b.includes(m.Ka.encryptionScheme)||b.push(m.Ka.encryptionScheme);"org.w3.clearkey"==m.Ka.keySystem&&m.Ka.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ka.licenseServerUri)||k.push(m.Ka.licenseServerUri):c.includes(m.Ka.licenseServerUri)||c.push(m.Ka.licenseServerUri);e.includes(m.Ka.serverCertificateUri)||e.push(m.Ka.serverCertificateUri);m.Ka.serverCertificate&&
|
|
(d.some(function(r){return function(u){return Gb(u,r.Ka.serverCertificate)}}(m))||d.push(m.Ka.serverCertificate));if(m.Ka.initData){l=t(m.Ka.initData);for(var n=l.next(),p={};!n.done;p={vg:void 0},n=l.next())p.vg=n.value,f.some(function(r){return function(u){var v=r.vg;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&Gb(u.initData,v.initData)}}(p))||f.push(p.vg)}if(m.Ka.keyIds)for(l=t(m.Ka.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ka.keySystemUris&&h)for(m=t(m.Ka.keySystemUris),
|
|
l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0<k.length){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,ha(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
|
|
function si(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Pi=1,Ki=5,Mi=.5;/*
|
|
@license
|
|
Shaka Player
|
|
Copyright 2023 Google LLC
|
|
SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function Qi(a,b,c){this.h=a;this.i=b;this.g=c}function Ri(a,b){return I(function(c){if(1==c.g)return x(c,hg(a.g,b,a.h.drm.preferredKeySystems,a.h.drm.keySystemsMapping),2);a.h.streaming.dontChooseCodecs||$f(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(Hg))throw new T(2,4,4032);return c.return(Si(a,b))})}
|
|
function Ti(a,b){var c=a.h.restrictions;a=a.i;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=gg(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}function Si(a,b){var c=Ti(a,b);if(b){var d=a.g?a.g.g:null;if(d&&a.g.A)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,Ui(a,d.keySystem,f.video),Ui(a,d.keySystem,f.audio);Vi(a,b)}return c}
|
|
function Ui(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,vi(a.g,e.initDataType,e.initData)}}}
|
|
function Vi(a,b){a=a.g?a.g.ze():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?Wi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var Wi=["output-restricted","internal-error"];function Xi(){}function Yi(a,b){if(b){var c=Zi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}P("shaka.media.ManifestParser",Xi);Xi.unregisterParserByMime=function(a){delete Zi[a]};Xi.registerParserByMime=function(a,b){Zi[a]=b};Xi.registerParserByExtension=function(){Bd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Xi.AccessibilityPurpose={cm:"visually impaired",ul:"hard of hearing"};var Zi={};function $i(a,b){function c(){f=!0}function d(m){h.push(m);Yh(m)}var e=a=Hb(a),f=!1,g,h=[],k=[];(new Th).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).W("stsd",function(m){g=m;h.push(m);$h(m)}).W("encv",c).W("enca",c).W("dvav",function(m){k.push({box:m,qb:1701733238})}).W("dva1",function(m){k.push({box:m,qb:1701733238})}).W("dvh1",function(m){k.push({box:m,qb:1701733238})}).W("dvhe",function(m){k.push({box:m,qb:1701733238})}).W("dvc1",function(m){k.push({box:m,qb:1701733238})}).W("dvi1",
|
|
function(m){k.push({box:m,qb:1701733238})}).W("hev1",function(m){k.push({box:m,qb:1701733238})}).W("hvc1",function(m){k.push({box:m,qb:1701733238})}).W("avc1",function(m){k.push({box:m,qb:1701733238})}).W("avc3",function(m){k.push({box:m,qb:1701733238})}).W("ac-3",function(m){k.push({box:m,qb:1701733217})}).W("ec-3",function(m){k.push({box:m,qb:1701733217})}).W("ac-4",function(m){k.push({box:m,qb:1701733217})}).W("mp4a",function(m){k.push({box:m,qb:1701733217})}).parse(a);if(f)return a;if(0==k.length||
|
|
!g)throw fb(Lc(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,e=aj(e,g,l.box,h,l.qb);return cc()&&qc()&&!dc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
function aj(a,b,c,d,e){var f=bj.value(),g=a.subarray(c.start,c.start+c.size),h=Nb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Nb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);cj(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=dc()||cc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,cj(e,d.start,d.size+k.byteLength);k=Nb(e,b.start);b=Zh(b);
|
|
a=k.getUint32(b);k.setUint32(b,a+1);return e}function cj(a,b,c){a=Nb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var bj=new Qb(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 dj(a,b,c,d,e,f,g){this.R=a;this.$a=b;this.La=c;this.pd=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}dj.prototype.Kb=function(){return this.$a};dj.prototype.Ib=function(){return this.La};dj.prototype.ec=function(){return this.g};function ej(a,b){return a===b?!0:a&&b?a.Kb()==b.Kb()&&a.Ib()==b.Ib()&&Rd(a.R().sort(),b.R().sort())&&Gb(a.ec(),b.ec()):a==b}P("shaka.media.InitSegmentReference",dj);
|
|
dj.prototype.getEndByte=dj.prototype.Ib;dj.prototype.getStartByte=dj.prototype.Kb;
|
|
function fj(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?gj:r;this.startTime=a;this.j=this.endTime=b;this.H=c;this.$a=d;this.La=e;this.ma=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.C=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=-1;this.u=void 0===v?!1:v;this.I=this.s=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
a.next())b.value.Zh();this.u&&this.g.length&&this.g[this.g.length-1].Yh();this.G=this.bandwidth=this.mimeType=this.codecs=null}q=fj.prototype;q.R=function(){return this.H()};q.getStartTime=function(){return this.startTime};q.oj=function(){return this.endTime};q.Kb=function(){return this.$a};q.Ib=function(){return this.La};q.Jj=function(){return this.tilesLayout};q.Ij=function(){return this.C};q.tc=function(){return this.status};q.fk=function(){this.status=hj};q.Cg=function(){this.preload=!0};
|
|
q.isPreload=function(){return this.preload};q.od=function(){this.l=!1};q.Vj=function(){return this.l};q.Zh=function(){this.s=!0};q.Xj=function(){return this.s};q.Yh=function(){this.I=!0};q.Wj=function(){return this.I};q.Xh=function(){this.m=!0};q.Rj=function(){return this.m};q.Ai=function(a){this.A=a};q.Hj=function(){return this.A};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
q.eh=function(a){null==this.h?Ya("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Nk=function(a){this.G=a};q.ec=function(){return this.G};function ij(a,b){a.ma=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())ij(c.value,b)}P("shaka.media.SegmentReference",fj);fj.prototype.getSegmentData=fj.prototype.ec;fj.prototype.setSegmentData=fj.prototype.Nk;fj.prototype.syncAgainst=fj.prototype.eh;fj.prototype.offset=fj.prototype.offset;
|
|
fj.prototype.getThumbnailSprite=fj.prototype.Hj;fj.prototype.setThumbnailSprite=fj.prototype.Ai;fj.prototype.hasByterangeOptimization=fj.prototype.Rj;fj.prototype.markAsByterangeOptimization=fj.prototype.Xh;fj.prototype.isLastPartial=fj.prototype.Wj;fj.prototype.markAsLastPartial=fj.prototype.Yh;fj.prototype.isPartial=fj.prototype.Xj;fj.prototype.markAsPartial=fj.prototype.Zh;fj.prototype.isIndependent=fj.prototype.Vj;fj.prototype.markAsNonIndependent=fj.prototype.od;fj.prototype.isPreload=fj.prototype.isPreload;
|
|
fj.prototype.markAsPreload=fj.prototype.Cg;fj.prototype.markAsUnavailable=fj.prototype.fk;fj.prototype.getStatus=fj.prototype.tc;fj.prototype.getTileDuration=fj.prototype.Ij;fj.prototype.getTilesLayout=fj.prototype.Jj;fj.prototype.getEndByte=fj.prototype.Ib;fj.prototype.getStartByte=fj.prototype.Kb;fj.prototype.getEndTime=fj.prototype.oj;fj.prototype.getStartTime=fj.prototype.getStartTime;fj.prototype.getUris=fj.prototype.R;var gj=0,hj=1;fj.Status={Yk:gj,am:hj,Cl:2};function jj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function kj(a){return!a||jj(a)?null:a.length?a.end(a.length-1):null}function lj(a,b){return!a||!a.length||jj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function mj(a,b){if(!a||!a.length||jj(a))return 0;var c=0;a=t(nj(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
function oj(a,b,c){if(!a||!a.length||jj(a))return null;a=nj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function nj(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};/*
|
|
@license
|
|
Shaka Player
|
|
Copyright 2022 Google LLC
|
|
SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function pj(){}function qj(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function rj(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function sj(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
|
|
function tj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=yc(Hb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=yc(Hb(a.data,3+c,f)),h;"--\x3e"===d?h=yc(Hb(a.data,4+c+f)):h=Jb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
|
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=yc(Hb(a.data,1,d));a=yc(Hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=yc(Hb(a.data,1,d));a=yc(Hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=yc(Hb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Jb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=yc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=yc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Jb(a.data),b):null}
|
|
function uj(a){for(var b=0,c=[];qj(a,b);){var d=sj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=sj(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=tj(e))&&c.push(f);b+=e.size+10}rj(a,b)&&(b+=10)}return c}function vj(a,b){for(var c=b=void 0===b?0:b,d=0;qj(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=sj(a,b+6),rj(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}P("shaka.util.Id3Utils",pj);pj.getID3Data=vj;
|
|
pj.getID3Frames=uj;function wj(a,b){var c=null,d=null,e=null,f=a.U();b&1&&(e=a.ud());b&2&&a.skip(4);b&8&&(c=a.U());b&16&&(d=a.U());return{trackId:f,Hd:c,ue:d,em:e}}function xj(a,b){return 1==b?(b=a.U(),a=a.U(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.U()}}function yj(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.U();a.skip(4);a=a.Aa();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
function zj(a,b,c){var d=a.U(),e=[],f=null;c&1&&(f=a.U());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Qg:null,sampleSize:null,$e:null};c&256&&(h.Qg=a.U());c&512&&(h.sampleSize=a.U());c&1024&&a.skip(4);c&2048&&(h.$e=0==b?a.U():a.ji());e.push(h)}return{im:d,oi:e,cj:f}}function Aj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.Aa();a.skip(2);a.skip(2);a.skip(2);a=a.Aa()+a.Aa()/65536;return{channelCount:b,sampleRate:a}}function Bj(a){a=a.U();return{codec:Xh(a)}}
|
|
function Cj(a){var b=null,c=null,d=a.Rb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.Aa()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.Aa();a.Aa();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,ce:c}}
|
|
function Dj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Ej(a){return(10>a?"0":"")+a};/*
|
|
|
|
Copyright Brightcove, Inc.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
function Fj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Hb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Gj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Nh(c,0)).U(),a.g=8*d,a.i-=d)}function Hj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Gj(a)}a.h<<=b;a.g-=b}
|
|
function Ij(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Gj(a);c=b-c;return 0<c?d<<c|Ij(a,c):d}function Jj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Gj(a);return b+Jj(a)}function Kj(a){Hj(a,1+Jj(a))}function U(a){var b=Jj(a);return Ij(a,b+1)-1}function Lj(a){a=U(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Mj(a){return 1===Ij(a,1)}function Nj(a){return Ij(a,8)}
|
|
function Oj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Lj(a),d=(c+d+256)%256),c=0===d?c:d}function Pj(a){Nj(a);U(a);return U(a)}P("shaka.util.ExpGolomb",Fj);function Qj(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.A=this.C=null;this.i=[];this.h=[];this.G=null;this.l=[];this.H=this.s=this.u=null}q=Qj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Sj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Ee:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=Ac(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
|
|
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.H={channelCount:0===(u&15)?2:u&15,$i:u,sampleRate:48E3}))}n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Ee&&(g.Ee=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
|
|
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.K=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.C=f.audio,this.A=f.audioCodec);-1!=f.Ee&&(this.G=f.Ee);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.C:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
function Tj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=Uj(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=Uj(d,
|
|
a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.lk=function(a){Bd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Ig(a,{Ud:null,state:null})};
|
|
q.Ig=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(1===f)f=n?0:2;else if(n)if(1==n){n=h-f-1;if(0<=l)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.Ud)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
|
|
g)),0<n&&(n=a.subarray(0,n),f.data=Mc(f.data,n),f.fullData=Mc(f.fullData,n),f.state=0);h<d?(m="hvc"==this.m?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.Ud&&(c=k.length?k[k.length-1]:b.Ud)&&(c.data=Mc(c.data,a),c.fullData=Mc(c.fullData,a));b.state=f;return k};
|
|
q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Mc.apply(Gc,ha(c.value)),(c=Tj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:uj(c.data),dts:c.dts,pts:c.pts});return a};
|
|
q.vb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Mc.apply(Gc,ha(c.value)),e=Tj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Mc(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
q.Mc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Mc.apply(Gc,ha(d.value)),f=Tj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Mc(d.data,e),this.g.push(d))}if(a){c={Ud:null,state:null};d=[];e=t(this.g);for(f=e.next();!f.done;f=e.next())f=f.value,
|
|
f.nalus=this.Ig(f,c),f.nalus.length&&(d.push(f),c.Ud=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.vb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Mc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Id=function(){return{audio:this.A,video:this.m}};
|
|
q.De=function(){for(var a=[],b=t(this.Mc()),c=b.next();!c.done;c=b.next())a.push.apply(a,ha(c.value.nalus));return a};q.Oj=function(){Bd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.pg();return{height:a.height,width:a.width}};q.pg=function(){return"hvc"==this.m?Vj(this):Wj(this)};function Xj(a){var b=a.Mc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
|
|
function Wj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.De();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new Fj(c.data);var d=Nj(c),e=Nj(c),f=Nj(c);Kj(c);if(Yj.includes(d)){var g=U(c);3===g&&Hj(c,1);Kj(c);Kj(c);Hj(c,1);if(Mj(c)){g=3!==g?8:12;for(var h=0;h<g;h++)Mj(c)&&(6>h?Oj(c,16):Oj(c,64))}}Kj(c);g=U(c);if(0===g)U(c);else if(1===g)for(Hj(c,1),Kj(c),Kj(c),g=U(c),h=0;h<g;h++)Kj(c);Kj(c);Hj(c,1);g=U(c);h=U(c);var k=Ij(c,1);0===k&&Hj(c,1);Hj(c,
|
|
1);var l=0,m=0,n=0,p=0;Mj(c)&&(l=U(c),m=U(c),n=U(c),p=U(c));b.height=String((2-k)*(h+1)*16-2*n-2*p);b.width=String(16*(g+1)-2*l-2*m);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Xj(a);return b}
|
|
function Vj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.De();if(!c.length)return b;c=c.find(function(D){return 33==D.type});if(!c)return b;var d=new Fj(c.fullData,!0);Nj(d);Nj(d);Ij(d,4);var e=Ij(d,3);Mj(d);var f=Ij(d,2),g=Ij(d,1),h=Ij(d,5),k=Ij(d,32);c=Nj(d);for(var l=Nj(d),m=Nj(d),n=Nj(d),p=Nj(d),r=Nj(d),u=Nj(d),v=[],w=[],z=0;z<e;z++)v.push(Mj(d)),w.push(Mj(d));if(0<e)for(z=e;8>z;z++)Ij(d,2);for(z=0;z<e;z++)v[z]&&Ij(d,88),w[z]&&Nj(d);U(d);e=U(d);3==e&&Ij(d,1);v=U(d);w=U(d);var y=
|
|
z=0,B=0,C=0;Mj(d)&&(z+=U(d),y+=U(d),B+=U(d),C+=U(d));b.width=String(v-(z+y)*(1===e||2===e?2:1));b.height=String(w-(B+C)*(1===e?2:1));d=function(D){for(var G=0,A=0;32>A;A++)G|=(D>>A&1)<<31-A;return G>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
|
|
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Xj(a);return b}function Uj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Zj(a){return 0>Sj(a)?!1:!0}function Sj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}P("shaka.util.TsParser",Qj);Qj.syncOffset=Sj;Qj.probe=Zj;Qj.prototype.getVideoInfo=Qj.prototype.pg;Qj.prototype.getVideoResolution=Qj.prototype.Oj;
|
|
Qj.prototype.getVideoNalus=Qj.prototype.De;Qj.prototype.getCodecs=Qj.prototype.Id;Qj.prototype.getStartTime=Qj.prototype.getStartTime;Qj.prototype.getVideoData=Qj.prototype.Mc;Qj.prototype.getAudioData=Qj.prototype.vb;Qj.prototype.getMetadata=Qj.prototype.getMetadata;Qj.prototype.parseNalus=Qj.prototype.Ig;Qj.prototype.parseAvcNalus=Qj.prototype.lk;Qj.prototype.parse=Qj.prototype.parse;Qj.prototype.clearData=Qj.prototype.clearData;Qj.Timescale=9E4;
|
|
var Yj=[100,110,122,244,44,83,86,118,128,138,139,134];function ak(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Za("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,Bd("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Za("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Za("Could not find LCEVC Library on this page"),
|
|
a=!1):(this.h.SupportObject.SupportStatus||Za(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function bk(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
ak.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ck(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",ak);ak.prototype.release=ak.prototype.release;function dk(a,b,c,d){var e=this;this.j=a;this.V=c;this.A=null;this.Y=b;this.g={};this.G={};this.Ia={};this.h=null;this.ha=!1;this.S=d||null;this.m={};this.u=new rd;this.i={};this.J=null;this.H=new lh;this.za="";this.Ja=!1;this.l=ek(this,this.H);this.I=!1;this.K=new Jh(function(){return fk(e)});this.C=!1;this.M="UNKNOWN";this.Ea=this.Ha=!1;this.Da=new lh;this.s=!1;this.aa=!0;this.$=null;this.L={};this.oa=this.O=this.ra=this.P=null;this.ka=new lh}
|
|
function ek(a,b){a.aa=!0;if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.u.o(c,"startstreaming",function(){a.aa=!0});a.u.o(c,"endstreaming",function(){a.aa=!1})}else c=new MediaSource;a.u.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.za);b.resolve()});a.u.sa(a.j,"playing",function(){a.Ja=!0});a.za=gk(c);a.j.src=a.za;return c}
|
|
function hk(a,b){var c,d,e,f,g,h,k,l,m,n,p;return I(function(r){if(1==r.g)return a.createSegmentIndex?x(r,a.createSegmentIndex(),2):r.B(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Xc;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",h!=a.mimeType||k!=a.codecs)if(l=h+":"+k,!d.has(l))if(d.add(l),b==c.Na){if(m=yf(h,k),!Mf(m))return r.return(!1)}else if(b==c.ya?
|
|
k=ug(k):b==c.ia&&(k=tg(k,h)),n=Cf(a,h,k),p=Af(h,k),!xd(n)&&!sf(p))return r.return(!1);return r.return(!0)})}q=dk.prototype;q.destroy=function(){return this.K.destroy()};
|
|
function fk(a){var b,c,d,e,f,g,h,k;return I(function(l){if(1==l.g){b=[];for(c in a.m)for(d=a.m[c],e=d[0],a.m[c]=d.slice(0,1),e&&b.push(e.p.catch(Wf)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.h&&b.push(a.h.destroy());for(k in a.i)b.push(a.i[k].destroy());return x(l,Promise.all(b),2)}a.u&&(a.u.release(),a.u=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.A=null;a.l=null;a.h=null;a.Y=null;a.g={};a.i={};a.J=null;a.m={};a.S=null;a.L={};
|
|
a.V=null;H(l)})}
|
|
q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return f=Xc,x(m,e.H,2);case 2:if(!ik(e)&&(e.I||e.l&&"closed"!=e.l.readyState)){m.B(3);break}Ya("Expected MediaSource to be open during init(); reopening the media source.");e.H=new lh;e.l=ek(e,e.H);return x(m,e.H,3);case 3:e.C=b,e.M=c,e.Ha=d,e.Ea=!e.C&&"HLS"==e.M&&!e.Ha,e.L={},g=t(a.keys()),h=g.next();case 5:if(h.done){m.B(0);break}k=h.value;l=a.get(k);
|
|
return x(m,jk(e,k,l,l.codecs),8);case 8:e.s?(e.m[f.ia]=[],e.m[f.ya]=[]):e.m[k]=[],h=g.next(),m.B(5)}})};
|
|
function jk(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return I(function(w){switch(w.g){case 1:return e=Xc,f=Sa,g=Ta,x(w,hk(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=yf(c.mimeType,d);if(b==e.Na){kk(a,h,a.C,c.external);w.B(0);break}k=a.A.forceTransmux;if(!xd(h)||!a.C&&zf.includes(h))k=!0;l=Af(c.mimeType,d);if(!k){w.B(4);break}m=Rc(e.ia,(d||"").split(","));n=Rc(e.ya,(d||"").split(","));if(!m||!n){w.B(5);break}a.s=!0;return x(w,jk(a,e.ia,c,m),6);case 6:return x(w,
|
|
jk(a,e.ya,c,n),7);case 7:return w.return();case 5:if(p=sf(l))r=p(),a.i[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Kh(a.K);try{v=a.l.addSourceBuffer(u)}catch(z){throw new T(2,3,3015,z,"The mediaSource_ status was "+a.l.readyState+" expected 'open'",null);}a.C&&(v.mode=lk);a.u.o(v,"error",function(){var z=a.m[b][0];z.p.reject(new T(2,3,3014,a.j.error?a.j.error.code:0,z.uri))});a.u.o(v,"updateend",function(){return mk(a,b)});a.g[b]=v;a.G[b]=h;a.Ia[b]=!!c.drmInfos.length;
|
|
H(w)}})}q.configure=function(a){this.A=a;this.h&&(this.h.A=a.modifyCueCallback)};
|
|
function kk(a,b,c,d){a.h||(a.h=new Lf(a.Y),a.h&&(a.h.A=a.A.modifyCueCallback));var e=a.h;d=d||a.ha;a=a.M;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Nf[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Bd("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Bd("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.C=d)}
|
|
function ik(a){return a.I?!1:a.l?"ended"==a.l.readyState:!0}function nk(a,b){Object.keys(a.g).length?b==Tc?a=a.h.g:(a=ok(a,b),a=!a||jj(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function pk(a,b){return Object.keys(a.g).length?b==Tc?a.h.h:kj(ok(a,b)):null}function qk(a,b,c){if(b==Tc)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=ok(a,b);return mj(a,c)}
|
|
q.Vb=function(){var a={total:this.I?[]:nj(this.j.buffered),audio:nj(ok(this,"audio")),video:nj(ok(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function ok(a,b){if(a.I)return null;try{return a.g[b].buffered}catch(c){return null}}
|
|
function rk(a,b,c,d,e){var f=null,g=[],h=Hb(c);if(zf.includes(e))b=uj(h),b.length&&d&&((c=b.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&(f=Math.round(c.data)/1E3),a.V.onMetadata([{cueTime:d.startTime,data:h,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ma&&d.ma.timescale){var k=d.ma.timescale;if(!isNaN(k)){var l=0,m=!1;(new Th).box("moof",Yh).box("traf",Yh).W("tfdt",function(n){l=xj(n.reader,
|
|
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(f=l)}}else e.includes("/mp4")||e.includes("/webm")||!Zj(h)||(a.L[b]?a.L[b].clearData():a.L[b]=new Qj,a=a.L[b].parse(h),d=a.getStartTime(b),null!=d&&(f=d),g=a.getMetadata());return{timestamp:f,metadata:g}}
|
|
function sk(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L;return I(function(K){switch(K.g){case 1:m=Xc;if(b!=m.Na){K.B(2);break}if("HLS"!=a.M){K.B(3);break}return x(K,a.Da,4);case 4:n=K.h,a.h.u=n;case 3:return x(K,Of(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.R()[0]:null),5);case 5:return K.return();case 2:if(l||!a.s){K.B(6);break}return x(K,sk(a,m.ia,c,d,e,f,g,h,k,!0),7);case 7:return x(K,sk(a,m.ya,c,d,e,f,
|
|
g,h,k,!0),8);case 8:return K.return();case 6:if(!a.g[b])return K.return();p=a.g[b].timestampOffset;r=a.G[b];a.i[b]&&(r=a.i[b].getOriginalMimeType());if(d&&(u=rk(a,b,c,d,r),v=u.timestamp,w=u.metadata,null!=v&&(null==a.P&&b==m.ya&&(a.P=v,a.ra=d.startTime,null!=a.O&&(z=0,a.ra==a.oa&&(z=a.P-a.O),a.ka.resolve(z))),null==a.O&&b==m.ia&&(a.O=v,a.oa=d.startTime,null!=a.P&&(y=0,a.ra==a.oa&&(y=a.P-a.O),a.ka.resolve(y))),B=v,C=zf,!a.C&&C.includes(a.G[b])&&(B=0),D=d.startTime-B,G=Math.abs(p-D),(.001<=G||g||h)&&
|
|
(!k||0<D||!p)&&(p=D,a.Ea&&(tk(a,b,function(){return uk(a,b)},null),tk(a,b,function(){return vk(a,b,p)},null))),(A=b==m.ya||!(m.ya in a.g))&&a.Da.resolve(p)),w.length))a.V.onMetadata(w,p,d?d.endTime:null);f&&b==m.ya&&(a.h||kk(a,"application/cea-608",a.C,!1),a.J||(E=r.split(";",1)[0],a.J=new Id(E)),d?(F=a.J.i(c),F.length&&Uf(a.h,F,d.startTime,d.endTime,p)):a.J.init(c,h));if(!a.i[b]){K.B(9);break}return x(K,a.i[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=K.h;case 9:c=wk(a,c,d?d.startTime:null,b,
|
|
d?d.R()[0]:null);if(!d||!a.C||b==m.Na){K.B(11);break}if(!g&&!h){K.B(11);break}J=d.startTime;if("HLS"!=a.M||a.s||b!=m.ia||!a.g[m.ya]){K.B(13);break}return x(K,a.ka,14);case 14:L=K.h,.1<Math.abs(L)&&(J-=L);case 13:tk(a,b,function(){return uk(a,b)},null),tk(a,b,function(){return vk(a,b,J)},null);case 11:return x(K,tk(a,b,function(){var O=c;if("video"==b&&a.S){var M=a.S;M.g&&M.g.appendBuffer(O,"video",M.s,-p)}a.g[b].appendBuffer(O)},d?d.R()[0]:null),15);case 15:H(K)}})}
|
|
function xk(a,b){var c=pk(a,"video")||0;Qf(a.h,b,c)}function yk(a){a.h&&Qf(a.h,"",0)}q.remove=function(a,b,c){var d=this,e;return I(function(f){return 1==f.g?(e=Xc,a==e.Na?x(f,d.h.remove(b,c),0):x(f,tk(d,a,function(){return Hk(d,a,b,c)},null),4)):d.s?x(f,tk(d,e.ia,function(){return Hk(d,e.ia,b,c)},null),0):f.B(0)})};
|
|
function Ik(a,b){var c;return I(function(d){return 1==d.g?(c=Xc,b==c.Na?a.h?x(d,a.h.remove(0,Infinity),0):d.return():x(d,tk(a,b,function(){return Hk(a,b,0,a.l.duration)},null),4)):a.s?x(d,tk(a,c.ia,function(){return Hk(a,c.ia,0,a.l.duration)},null),0):d.B(0)})}q.flush=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=Xc,a==c.Na?d.return():x(d,tk(b,a,function(){b.j.currentTime-=.001;mk(b,a)},null),2)):b.s?x(d,tk(b,c.ia,function(){var e=c.ia;b.j.currentTime-=.001;mk(b,e)},null),0):d.B(0)})};
|
|
function Jk(a,b,c,d,e,f,g,h,k){var l,m,n;return I(function(p){if(1==p.g){l=Xc;if(b==l.Na)return f||(a.h.u=c),Pf(a.h,d,e),p.return();m=[];return x(p,Kk(a,b,g,h,k),2)}n=p.h;n||(m.push(tk(a,b,function(){return uk(a,b)},null)),a.s&&m.push(tk(a,l.ia,function(){return uk(a,l.ia)},null)));f||(m.push(tk(a,b,function(){return vk(a,b,c)},null)),a.s&&m.push(tk(a,l.ia,function(){return vk(a,l.ia,c)},null)));if(0!=d||Infinity!=e)m.push(tk(a,b,function(){a.g[b].appendWindowStart=0;a.g[b].appendWindowEnd=e;a.g[b].appendWindowStart=
|
|
d;mk(a,b)},null)),a.s&&m.push(tk(a,l.ia,function(){var r=l.ia;a.g[r].appendWindowStart=0;a.g[r].appendWindowEnd=e;a.g[r].appendWindowStart=d;mk(a,r)},null));return m.length?x(p,Promise.all(m),0):p.B(0)})}
|
|
function Lk(a,b,c){var d,e;return I(function(f){if(1==f.g){d=Xc;if(b==d.Na)return f.return();b==d.ya&&(a.Da=new lh);if(!a.C||(e=pk(a,b))&&.1>Math.abs(e-c))return f.return();tk(a,b,function(){return uk(a,b)},null);a.s&&tk(a,d.ia,function(){return uk(a,d.ia)},null);return x(f,tk(a,b,function(){return vk(a,b,c)},null),2)}return a.s?x(f,tk(a,d.ia,function(){return vk(a,d.ia,c)},null),0):f.B(0)})}
|
|
q.endOfStream=function(a){var b=this;return I(function(c){return x(c,Mk(b,function(){ik(b)||(b.I?0:b.l?"closed"==b.l.readyState:1)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.zb=function(a){var b=this;return I(function(c){return x(c,Mk(b,function(){if(a<b.l.duration)for(var d in b.g){var e={start:function(){},p:new lh,uri:null};b.m[d].unshift(e)}b.l.duration=a;b.$=a}),0)})};q.getDuration=function(){return this.l.duration};function Hk(a,b,c,d){d<=c?mk(a,b):a.g[b].remove(c,d)}
|
|
function uk(a,b){var c=a.g[b].appendWindowStart,d=a.g[b].appendWindowEnd;a.g[b].abort();a.g[b].appendWindowStart=c;a.g[b].appendWindowEnd=d;mk(a,b)}function vk(a,b,c){0>c&&(c+=.001);a.g[b].timestampOffset=c;mk(a,b)}function mk(a,b){if(!a.I){var c=a.m[b][0];c&&(c.p.resolve(),Nk(a,b))}}function tk(a,b,c,d){Kh(a.K);c={start:c,p:new lh,uri:d};a.m[b].push(c);1==a.m[b].length&&Ok(a,b);return c.p}
|
|
function Mk(a,b){var c,d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:Kh(a.K);c=[];d={};for(e in a.g)d={ready:void 0},d.ready=new lh,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.m[e].push(f),c.push(d.ready),1==a.m[e].length&&f.start();ua(l,2);return x(l,Promise.all(c),4);case 4:wa(l,3);break;case 2:throw g=xa(l),g;case 3:return ua(l,5,6),x(l,b(),6);case 6:ya(l);for(h in a.g)Nk(a,h);za(l,0);break;case 5:throw k=xa(l),new T(2,3,3015,k,a.j.error||"No error in the media element",
|
|
null);}})}function Nk(a,b){a.m[b].shift();Ok(a,b)}function Ok(a,b){var c=a.m[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.j.error||"No error in the media element",c.uri)),Nk(a,b)}}function wk(a,b,c,d,e){var f=null==c,g=a.Ia[d];c=a.V.sj();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Tb(c),f=fc()||dc()||lc()||cc()&&qc()&&c;f&&"mp4"==Ef(a.G[d])&&(b=$i(b,e));return b}
|
|
function Pk(a,b,c,d){return tk(a,b,function(){b!==Tc&&(zd()&&(a.i[b]&&(a.i[b].destroy(),delete a.i[b]),d&&(a.i[b]=d),a.g[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),mk(a,b))},null)}
|
|
function Qk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J;return I(function(L){switch(L.g){case 1:c=Xc;a.I=!0;a.s=!1;d=a.j.currentTime;e=a.j.autoplay;f=a.j.paused;a.Ja&&(a.j.autoplay=!1);va(L,2);a.u.Za();g=[];for(h in a.i)g.push(a.i[h].destroy());for(k in a.m)for(l=a.m[k],m=l[0],a.m[k]=l.slice(0,1),m&&g.push(m.p.catch(Wf)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new T(2,7,7003,void 0));for(u in a.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(K){}}return x(L,
|
|
Promise.all(g),4);case 4:return a.i={},w=a.l.duration,a.H=new lh,a.l=ek(a,a.H),x(L,a.H,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.$)&&a.$&&(a.l.duration=a.$),z=new lh,y=a.l.sourceBuffers,B=b.size,C=0,D=function(){C++;C===B&&(z.resolve(),a.u.Ma(y,"addsourcebuffer",D))},a.u.o(y,"addsourcebuffer",D),G=t(b.keys()),A=G.next();case 6:if(A.done)return a.j.currentTime=d,x(L,z,2);E=A.value;F=a.g[E]?{timestampOffset:a.g[E].timestampOffset,appendWindowStart:a.g[E].appendWindowStart,appendWindowEnd:a.g[E].appendWindowEnd}:
|
|
null;J=b.get(E);return x(L,jk(a,E,J,J.codecs),9);case 9:a.s?(a.m[c.ia]=[],a.m[c.ya]=[]):a.m[E]=[];F&&a.g[E]&&(a.g[E].timestampOffset=F.timestampOffset,a.g[E].appendWindowEnd=F.appendWindowEnd,a.g[E].appendWindowStart=F.appendWindowStart);A=G.next();L.B(6);break;case 2:ya(L),a.I=!1,Kh(a.K),a.u.sa(a.j,"canplaythrough",function(){a.K.g||(a.j.autoplay=e,f||a.j.play())}),za(L,0)}})}function Rk(a,b){return Mk(a,function(){return Qk(a,b)})}
|
|
function Sk(a,b,c,d){var e=!1,f=Rc("audio",(d||"").split(",")),g=Rc("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=yf(c,h);var k=a.A.forceTransmux;if(!xd(d)||!a.C&&zf.includes(d))k=!0;if(k&&(a=Af(c,h),c=sf(a))){var l=c();f&&g&&(e=!0);d=l.convertCodecs(b,a)}b=Ff(Jf(d));return{hh:l,Qk:e,sh:If(d),codec:b,mimeType:d}}
|
|
function Kk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,z,y;return I(function(B){if(1==B.g){f=Xc;if(b==f.Na)return B.return(!1);g=Ff(Jf(a.G[b]));h=If(a.G[b]);k=Sk(a,b,c,d);l=k.hh;m=k.Qk;n=k.sh;p=k.codec;r=k.mimeType;u=!0;m&&(v=Sk(a,f.ia,c,d),w=Ff(Jf(a.G[f.ia])),z=If(a.G[f.ia]),u=w==v.codec&&z==v.sh,v.hh&&v.hh.destroy());if(g===p&&h===n&&u)return a.i[b]&&!l?(a.i[b].destroy(),delete a.i[b]):!a.i[b]&&l?a.i[b]=l:l&&(a.i[b]&&a.i[b].transmux!=l.transmux?(a.i[b].destroy(),delete a.i[b],a.i[b]=l):l.destroy()),
|
|
B.return(!1);y=!0;if(a.s||m&&l&&!a.i[b])y=!1;if(y&&"smooth"===a.A.codecSwitchingStrategy&&zd())return x(B,Pk(a,b,r,l),3);l&&l.destroy();return x(B,Rk(a,e),3)}return B.return(!0)})}function Tk(a,b,c,d){if(b==Tc)var e=!1;else{e=Ff(Jf(a.G[b]));var f=If(a.G[b]),g=yf(c,d),h=a.A.forceTransmux;if(!xd(g)||!a.C&&zf.includes(g))h=!0;c=Af(c,d);h&&(h=sf(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Ff(Jf(g));g=If(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!zd()||a.s:!1}
|
|
var gk=window.URL.createObjectURL,lk="sequence";function Uk(a,b,c){this.i=a;this.G=b;this.s=this.l=Infinity;this.h=1;this.g=this.j=null;this.A=0;this.C=!0;this.K=!1;this.J=0;this.H=void 0===c?!0:c;this.I=0;this.u=!1;this.m=a}q=Uk.prototype;q.getDuration=function(){return this.l};q.xj=function(){return this.h};q.zi=function(a){this.i=a};q.zb=function(a){this.l=a};q.Bj=function(){return this.i};q.si=function(a){this.A=a};q.Xc=function(a){a&&!this.C&&(this.K=!0);this.C=a};q.ef=function(a){this.s=a};q.Ce=function(){return this.s};
|
|
q.Vg=function(a){this.G=a};q.nj=function(){return this.G};q.di=function(a,b){if(0!=a.length){var c=(Date.now()+this.A)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.Se(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.H&&!this.u&&(this.i=c-this.g-this.h)}}};
|
|
q.Vd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.Se(b);this.g=Math.max(this.g,c);null!=this.i&&this.H&&!this.u&&(this.i=d-this.g-this.h)}};q.ci=function(a,b){this.Se(a);Infinity==b||this.T()||(this.g=Math.max(this.g,b))};q.yj=function(){return this.g};q.Ne=function(){this.u=!0};
|
|
q.Zj=function(){return this.u};q.wi=function(a){this.m=a};q.rj=function(){return this.m};q.Se=function(a){null==this.j?this.j=a:this.K||(this.j=Math.min(this.j,a))};q.Dg=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.T=function(){return Infinity==this.l&&!this.C};q.Qc=function(){return Infinity!=this.l&&!this.C};q.Cb=function(){return Math.max(this.J,this.sc()-this.s)};q.Ci=function(a){this.J=a};
|
|
q.sc=function(){return this.T()||this.Qc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.h-this.i)+this.I,this.l):this.g?Math.min(this.g,this.l):this.l};q.Ld=function(a){var b=Math.max(this.j,this.J);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.sc()-this.s+a,this.Wb()))};q.rc=function(){return this.Ld(0)};q.Wb=function(){return Math.max(0,this.sc()-(this.T()||this.Qc()?this.G:0))};q.Li=function(){return null==this.i||null!=this.g&&this.H?!1:!0};
|
|
q.ri=function(a){this.I=a};q.gj=function(){return this.I};P("shaka.media.PresentationTimeline",Uk);Uk.prototype.getAvailabilityTimeOffset=Uk.prototype.gj;Uk.prototype.setAvailabilityTimeOffset=Uk.prototype.ri;Uk.prototype.usingPresentationStartTime=Uk.prototype.Li;Uk.prototype.getSeekRangeEnd=Uk.prototype.Wb;Uk.prototype.getSeekRangeStart=Uk.prototype.rc;Uk.prototype.getSafeSeekRangeStart=Uk.prototype.Ld;Uk.prototype.getSegmentAvailabilityEnd=Uk.prototype.sc;Uk.prototype.setUserSeekStart=Uk.prototype.Ci;
|
|
Uk.prototype.getSegmentAvailabilityStart=Uk.prototype.Cb;Uk.prototype.isInProgress=Uk.prototype.Qc;Uk.prototype.isLive=Uk.prototype.T;Uk.prototype.offset=Uk.prototype.offset;Uk.prototype.notifyMaxSegmentDuration=Uk.prototype.Dg;Uk.prototype.notifyMinSegmentStartTime=Uk.prototype.Se;Uk.prototype.getInitialProgramDateTime=Uk.prototype.rj;Uk.prototype.setInitialProgramDateTime=Uk.prototype.wi;Uk.prototype.isStartTimeLocked=Uk.prototype.Zj;Uk.prototype.lockStartTime=Uk.prototype.Ne;
|
|
Uk.prototype.getMaxSegmentEndTime=Uk.prototype.yj;Uk.prototype.notifyPeriodDuration=Uk.prototype.ci;Uk.prototype.notifySegments=Uk.prototype.Vd;Uk.prototype.notifyTimeRange=Uk.prototype.di;Uk.prototype.getDelay=Uk.prototype.nj;Uk.prototype.setDelay=Uk.prototype.Vg;Uk.prototype.getSegmentAvailabilityDuration=Uk.prototype.Ce;Uk.prototype.setSegmentAvailabilityDuration=Uk.prototype.ef;Uk.prototype.setStatic=Uk.prototype.Xc;Uk.prototype.setClockOffset=Uk.prototype.si;
|
|
Uk.prototype.getPresentationStartTime=Uk.prototype.Bj;Uk.prototype.setDuration=Uk.prototype.zb;Uk.prototype.setPresentationStartTime=Uk.prototype.zi;Uk.prototype.getMaxSegmentDuration=Uk.prototype.xj;Uk.prototype.getDuration=Uk.prototype.getDuration;function Vk(a,b,c){this.j=c;this.l=a;this.u=Wk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.A=b;this.i=function(){}}Vk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function Xk(a,b){a.i=b}function Yk(a){this.g=a}function Wk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(nj(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 Zk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.G=b;this.s=c;this.m=new rd;this.l=this.C=!1;this.I=a.readyState;this.H=this.i=0;this.h=d;this.u=!1;this.m.o(a,"waiting",function(){return $k(f)});this.j=new Zb(function(){$k(f)})}Zk.prototype.release=function(){this.m&&(this.m.release(),this.m=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.G=this.A=null};Zk.prototype.Gg=function(){this.u=!0;$k(this)};
|
|
function $k(a){if(0!=a.g.readyState&&a.C){if(a.g.seeking){if(!a.l)return}else a.l=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.I&&(a.I=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Wk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new S("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=oj(c,b,a.s.gapDetectionThreshold),
|
|
null!=d&&(0!=d||a.u))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||dc()||fc())e=Math.ceil(100*(e+a.s.gapPadding))/100;e>=a.G.Wb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.H++,a.A(new S("gapjumped")))}}}};function al(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=bl.value().get(b),c.sa(a,b,d))}var bl=new Qb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function cl(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new rd;this.i=new dl(a);al(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){el(e,e.j())})}cl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function fl(a){return a.s?a.g.currentTime:a.j()}
|
|
function gl(a,b){0<a.g.readyState?hl(a.i,b):al(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){el(a,a.j())})}function el(a,b){.001>Math.abs(a.g.currentTime-b)?il(a):(a.h.sa(a.g,"seeking",function(){il(a)}),hl(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function il(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
|
|
function dl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Zb(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}dl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function hl(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ba(.1)};function jl(a){this.h=a;this.j=!1;this.g=null;this.i=new rd}q=jl.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.sa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;al(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.Ef=function(a){this.g=this.j?this.g:a};
|
|
q.ke=function(){return(this.j?this.h.currentTime:this.g)||0};q.mh=function(){return 0};q.lh=function(){return 0};q.bi=function(){};
|
|
function kl(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.C=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.s=ll(a,c,f);this.j=new Zk(a,b.presentationTimeline,c,this.s,f);this.h=new cl(a,function(){a:{var h=g.j;h.l=!0;h.u=!1;$k(h);var k=fl(g.h);h=ml(g,k);if(.001<Math.abs(h-k)){k=!1;if(!ic()||ic()&&rc())k=!0;else{var l=Date.now()/1E3,m=ic()&&ec("Fuchsia")?3:1;if(!g.u||g.u<l-m)g.u=l,k=!0}if(k){gl(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.C=
|
|
!0;k.g.seeking&&!k.l&&(k.l=!0,k.i=h);k.j&&k.j.Ba(k.s.gapJumpTimerTime);$k(k)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.rc():g.g.Wb():0>h&&(h=g.g.Wb()+h);return nl(g,ol(g,h))});this.m=new Zb(function(){if(0!=g.i.readyState&&!g.i.paused){var h=fl(g.h),k=g.g.rc(),l=g.g.Wb();3>l-k&&(k=l-3);h<k&&(h=ml(g,h),g.i.currentTime=h)}})}q=kl.prototype;q.ready=function(){this.m.Ba(.25)};
|
|
q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};q.Ef=function(a){gl(this.h,a)};q.ke=function(){var a=fl(this.h);return 0<this.i.readyState&&!this.i.paused?ol(this,a):a};q.mh=function(){return this.s?this.s.s:0};q.lh=function(){return this.j.H};q.bi=function(){this.j.Gg()};function nl(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
function ml(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.rc(),f=a.g.Wb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ld(c),k=a.g.Ld(d);c=a.g.Ld(c+d);return b>=g?nl(a,b):b>f?f:b<e?lj(a.i.buffered,k)?k:c:b>=h||lj(a.i.buffered,b)?b:c}function ol(a,b){var c=a.g.rc();if(b<c)return c;a=a.g.Wb();return b>a?a:b}
|
|
function ll(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Vk(new Yk(a),b.stallThreshold,c);Xk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function pl(a){this.g=a;this.m=null;this.i=0;this.s=!1}q=pl.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.gk=function(){this.s=!0};q.Ub=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Bg(a){return a.g[0]||null}
|
|
q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
q.Pe=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,ha(a))}};q.Td=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Pe(a);this.Ya(b)};q.Ya=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
|
|
q.fd=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new fj(a.startTime,b,a.H,a.$a,a.La,a.ma,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.C,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
|
|
q.lf=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new Zb(function(){var d=b();d?c.g.push.apply(c.g,ha(d)):(c.m.stop(),c.m=null)}),this.m.Ba(a))};pl.prototype[Symbol.iterator]=function(){return this.dc(0)};
|
|
pl.prototype.dc=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Ya("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new ql(this,d,f,c)};function rl(a,b,c){a=new fj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new pl([a])}
|
|
P("shaka.media.SegmentIndex",pl);pl.forSingleSegment=rl;pl.prototype.getIteratorForTime=pl.prototype.dc;pl.prototype.updateEvery=pl.prototype.lf;pl.prototype.fit=pl.prototype.fd;pl.prototype.evict=pl.prototype.Ya;pl.prototype.mergeAndEvict=pl.prototype.Td;pl.prototype.offset=pl.prototype.offset;pl.prototype.get=pl.prototype.get;pl.prototype.find=pl.prototype.find;pl.prototype.markImmutable=pl.prototype.gk;pl.prototype.release=pl.prototype.release;pl.prototype.getNumEvicted=pl.prototype.getNumEvicted;
|
|
pl.prototype.getNumReferences=pl.prototype.getNumReferences;function ql(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}q=ql.prototype;q.yd=function(a){this.reverse=a};q.bj=function(){return this.h};q.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.u&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
q.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.u&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};q.Og=function(){var a=this.current();if(a.s&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
|
|
P("shaka.media.SegmentIterator",ql);ql.prototype.resetToLastIndependent=ql.prototype.Og;ql.prototype.next=ql.prototype.next;ql.prototype.current=ql.prototype.current;ql.prototype.currentPosition=ql.prototype.bj;ql.prototype.setReverse=ql.prototype.yd;function sl(){pl.call(this,[]);this.h=[]}qa(sl,pl);q=sl.prototype;q.clone=function(){var a=new sl;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};
|
|
q.Ub=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ub(a)};q.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Pe=function(){};
|
|
q.Ya=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ya(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};q.Td=function(){};q.fd=function(){};q.lf=function(){};P("shaka.media.MetaSegmentIndex",sl);sl.prototype.updateEvery=sl.prototype.lf;sl.prototype.fit=sl.prototype.fd;sl.prototype.mergeAndEvict=sl.prototype.Td;sl.prototype.evict=sl.prototype.Ya;sl.prototype.merge=sl.prototype.Pe;sl.prototype.offset=sl.prototype.offset;
|
|
sl.prototype.get=sl.prototype.get;sl.prototype.find=sl.prototype.find;sl.prototype.forEachTopLevelReference=sl.prototype.Ub;sl.prototype.release=sl.prototype.release;function tl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Be();this.h=new Zb(function(){b.g.ai(.25*b.i)})}tl.prototype.release=function(){this.set(this.Lc());this.h&&(this.h.stop(),this.h=null);this.g=null};tl.prototype.set=function(a){this.i=a;ul(this)};tl.prototype.Lc=function(){return this.g.Lc()};function ul(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Be()!=b&&a.g.Zg(b);return}catch(c){}a.h.Ba(.25);0!=a.g.Be()&&a.g.Zg(0)};function vl(a){var b=this;this.h=a;this.g=new Set;this.i=(new Zb(function(){wl(b,!1)})).Ba(.25)}vl.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function wl(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function xl(){this.g=null;this.h=[]}function yl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function zl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Al(){this.i=this.h=null;this.g=[]}function Bl(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 Cl(){this.Hc=this.Wh=this.u=this.A=this.K=this.C=this.s=this.j=this.J=this.G=this.i=this.S=this.V=this.M=this.O=this.P=this.l=this.m=NaN;this.L=0;this.H=this.I=NaN;this.g=new xl;this.h=new Al};function Dl(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.s=d}function El(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
function Fl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.dc(b,!0,a.s)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.isPreload()&&null!=b.La&&(c=!1);2==b.tc()&&(c=!1);b.ec()&&(c=!1);c&&b.ma&&Gl(a,b.ma);c&&!a.h.has(b)&&(c=new Hl(a.l),Il(c,b,a.i),a.h.set(b,c))}Jl(a)}}function Gl(a,b){if(a.i.segmentIndex&&!b.ec()&&!Array.from(a.j.keys()).some(function(d){return ej(d,b)})){var c=new Hl(a.l);Il(c,b,a.i);a.j.set(b,c)}}
|
|
function Kl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Ll(a,c)}function Ml(a){Kl(a,a.h);Kl(a,a.j);a.g=null}Dl.prototype.Ya=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Ll(this,d);b&&Jl(this)};Dl.prototype.yd=function(a){this.s=a;this.g&&this.g.yd(a)};
|
|
function Jl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={wg:void 0},d=c.next())e.wg=d.value,b.some(function(f){return function(g){return ej(g.ma,f.wg)}}(e))||Ll(a,e.wg)}function Nl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Ll(a,d)}Jl(a)}function Ol(a,b){b&&b!==a.i&&(Ml(a),a.i=b)}function Ll(a,b){var c=a.h;b instanceof dj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function Hl(a){this.g=a;this.Ve=this.dh=null}
|
|
function Il(a,b,c){var d=new Uint8Array(0);a.Ve=a.g(b,c,function(e){return I(function(f){if(1==f.g)return 0<d.byteLength?d=Mc(d,e):d=e,a.dh?x(f,a.dh(d),3):f.B(0);d=new Uint8Array(0);H(f)})})}Hl.prototype.abort=function(){this.Ve&&this.Ve.abort()};function Pl(a){hb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Zb(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ba(2)}qa(Pl,hb);Pl.prototype.release=function(){this.g.clear();this.h.stop();hb.prototype.release.call(this)};function Ql(a){hb.call(this);this.g=new Map;this.h=a}qa(Ql,hb);Ql.prototype.release=function(){this.g.clear();hb.prototype.release.call(this)};function Rl(a,b){var c=a.g.get(b);c||(c={Yd:[],Sf:null,contentType:b},a.g.set(b,c));return c}function Sl(a,b,c){var d=Rl(a,b.contentType);Tl(a,d);a={pd:b,position:c};d=d.Yd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
Ql.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Sf;a:{var e=c.Yd;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.pd;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
|
|
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Rd(d.roles,e.roles);(g||h||d)&&Ul(this,a,e.contentType)&&(c.Sf=e,d=new S("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Ul(this,a,e.contentType)&&(c.Sf=e,JSON.stringify(e),c=new S("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
|
|
function Ul(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Tl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Yd;b.Yd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Yd=[]}
|
|
function Vl(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
|
|
a.language);return b};function Wl(a){var b=If(a),c=b.split("/")[0];a=Jf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,ce:null,colorGamut:null,frameRate:null}}
|
|
function Xl(a,b,c){function d(A){z=A.name;var E=A.reader;E.skip(24);var F=E.Aa(),J=E.Aa();E.skip(50);p=String(F);n=String(J);A.reader.Ga()&&Yh(A)}function e(A){var E=Aj(A.reader);r=E.channelCount;u=E.sampleRate;f(A.name)}function f(A){A=A.toLowerCase();switch(A){case "avc1":case "avc3":h.push(A+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(A+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(A+".05.04");l=!0;break;case "vp09":h.push(A+".00.10.08");l=!0;break;case "av01":h.push(A+".0.01M.08");
|
|
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(A),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,p=null,r=null,u=null,v=null,w=null,z;(new Th).box("moov",Yh).box("trak",Yh).box("mdia",Yh).W("mdhd",function(A){m=yj(A.reader,A.version).language}).box("minf",Yh).box("stbl",Yh).W("stsd",$h).box("mp4a",function(A){var E=Aj(A.reader);r=E.channelCount;u=E.sampleRate;A.reader.Ga()?Yh(A):f(A.name)}).box("esds",function(A){A=A.reader;for(var E=
|
|
"mp4a",F,J;A.Ga();){F=A.Z();for(var L=A.Z();L&128;)L=A.Z();if(3==F)A.Aa(),L=A.Z(),L&128&&A.Aa(),L&64&&A.skip(A.Z()),L&32&&A.Aa();else if(4==F)J=A.Z(),A.skip(12);else if(5==F)break}J&&(E+="."+Dj(J),5==F&&A.Ga()&&(F=A.Z(),J=(F&248)>>3,31===J&&A.Ga()&&(J=32+((F&7)<<3)+((A.Z()&224)>>5)),E+="."+J));g.push(E);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09",
|
|
d).box("av01",d).box("avcC",function(A){var E=z||"";switch(z){case "dvav":E="avc3";break;case "dva1":E="avc1"}A=A.reader;A.skip(1);A=E+"."+Dj(A.Z())+Dj(A.Z())+Dj(A.Z());h.push(A);l=!0}).box("hvcC",function(A){var E=z||"";switch(z){case "dvh1":E="hvc1";break;case "dvhe":E="hev1"}var F=A.reader;F.skip(1);A=F.Z();var J=["","A","B","C"][A>>6],L=A&31,K=F.U(),O=(A&32)>>5?"H":"L";A=[F.Z(),F.Z(),F.Z(),F.Z(),F.Z(),F.Z()];F=F.Z();for(var M=0,N=0;32>N;N++){M|=K&1;if(31==N)break;M<<=1;K>>=1}E=E+("."+J+L)+("."+
|
|
Dj(M,!0));E+="."+O+F;J="";for(L=A.length;L--;)if((O=A[L])||J)J="."+O.toString(16).toUpperCase()+J;E+=J;h.push(E);l=!0}).box("dvcC",function(A){var E=z||"";switch(z){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break;case "avc1":E="dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var F=A.reader;F.skip(2);A=F.Z();F=F.Z();h.push(E+"."+Ej(A>>1&127)+"."+Ej(A<<5&32|F>>3&31));l=!0}).box("dvvC",function(A){var E=z||"";switch(z){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break;case "avc1":E=
|
|
"dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var F=A.reader;F.skip(2);A=F.Z();F=F.Z();h.push(E+"."+Ej(A>>1&127)+"."+Ej(A<<5&32|F>>3&31));l=!0}).W("vpcC",function(A){var E=z||"",F=A.reader;A=F.Z();var J=F.Z();F=F.Z()>>4&15;h.push(E+"."+Ej(A)+"."+Ej(J)+"."+Ej(F));l=!0}).box("av1C",function(A){var E=z||"";switch(z){case "dav1":E="av01"}var F=A.reader;F.skip(1);A=F.Z();F=F.Z();var J=A>>>5,L=(F&64)>>6;h.push(E+"."+J+"."+Ej(A&31)+(F>>>7?"H":"M")+"."+Ej(2===J&&L?(F&32)>>5?12:10:L?10:8)+"."+
|
|
((F&16)>>4)+"."+((F&8)>>3)+((F&4)>>2)+(F&3)+"."+Ej(1)+"."+Ej(1)+"."+Ej(1)+".0");l=!0}).box("enca",bi).box("encv",ai).box("sinf",Yh).box("frma",function(A){A=Bj(A.reader).codec;f(A)}).box("colr",function(A){h=h.map(function(J){if(J.startsWith("av01.")){var L=A.reader,K=L.Oa(),O=L.Rb(4);var M=String.fromCharCode(O[0]);M+=String.fromCharCode(O[1]);M+=String.fromCharCode(O[2]);M+=String.fromCharCode(O[3]);if("nclx"===M){O=L.Aa();M=L.Aa();var N=L.Aa(),R=L.Z()>>7,Q=J.split(".");10==Q.length&&(Q[6]=Ej(O),
|
|
Q[7]=Ej(M),Q[8]=Ej(N),Q[9]=String(R),J=Q.join("."))}L.seek(K)}return J});var E=Cj(A.reader),F=E.colorGamut;v=E.ce;w=F}).parse(a||b,!0);if(!g.length&&!h.length)return null;var y=k&&!l,B=new Map;if(l&&!c){c=new Id("video/mp4");a&&c.init(a);try{c.i(b);for(var C=t(c.j()),D=C.next();!D.done;D=C.next()){var G=D.value;B.set(G,G)}}catch(A){}c.g()}return{type:y?"audio":"video",mimeType:y?"audio/mp4":"video/mp4",codecs:Yl(g.concat(h)).join(", "),language:m,height:n,width:p,channelCount:r,sampleRate:u,closedCaptions:B,
|
|
ce:v,colorGamut:w,frameRate:null}}function Yl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Hf(d);b.has(e)||(c.push(d),b.add(e))}b=Wc("audio",c);d=Wc("video",c);a=Wc(Tc,c);d=Zl(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
function Zl(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?xd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
function $l(a){var b=null;(new Th).box("moov",Yh).box("trak",Yh).box("mdia",Yh).box("minf",Yh).box("stbl",Yh).W("stsd",$h).box("encv",ai).box("enca",bi).box("sinf",Yh).box("schi",Yh).W("tenc",function(c){c=c.reader;c.Z();c.Z();c.Z();c.Z();b=Lc(c.Rb(16))}).parse(a,!0);return b}
|
|
function am(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g)return d=b,d.cryptoKey?k.B(2):x(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Hb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function bm(a,b,c,d,e){a=Ah(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function cm(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.I=new Map;this.C=1;this.u=this.j=null;this.L=0;this.J=!1;this.i=new Map;this.H=!1;this.M=null;this.A=!1;this.m=new Jh(function(){return dm(c)});this.O=Date.now()/1E3;this.s=new Map;this.K={projection:null,hfov:null};this.S=0;this.P=Infinity;this.G=null}q=cm.prototype;q.destroy=function(){return this.m.destroy()};
|
|
function dm(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,em(e),b.push(fm(e)),e.ba&&(Ml(e.ba),e.ba=null);f=t(a.s.values());for(g=f.next();!g.done;g=f.next())h=g.value,Ml(h);return x(k,Promise.all(b),2)}a.i.clear();a.s.clear();a.g=null;a.l=null;a.h=null;H(k)})}
|
|
q.configure=function(a){this.h=a;this.M=new ih({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.ba&&(Ml(b.ba),b.ba=null);b=t(this.s.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Ml(this.s.get(c)),this.s.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Tc))&&
|
|
b.ba&&(Ml(b.ba),b.ba=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ba&&(Ml(b.ba),b.ba=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ba?(Nl(c.ba,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(Ml(c.ba),c.ba=null)):0<a.segmentPrefetchLimit&&(c.ba=gm(this,c.stream));a.disableAudioPrefetch||hm(this)};function im(a,b,c){a.l.presentationTimeline.T()||(a.S=b,a.P=c)}
|
|
q.start=function(a){var b=this;return I(function(c){if(1==c.g)return x(c,jm(b,a||new Map),2);Kh(b.m);b.H=!0;H(c)})};function km(a,b){var c,d,e,f,g,h,k;I(function(l){switch(l.g){case 1:return c=Xc,a.L++,d=a.L,ua(l,2),x(l,Ik(a.g.na,c.Na),4);case 4:wa(l,3);break;case 2:if(e=xa(l),a.g)a.g.onError(e);case 3:f=yf(b.mimeType,b.codecs),kk(a.g.na,f,a.l.sequenceMode,b.external),g=a.g.na.Y,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.L==d&&(k=lm(a,b),a.i.set(c.Na,k),mm(a,k,0)),H(l)}})}
|
|
function nm(a){var b=a.i.get(Tc);b&&(em(b),fm(b).catch(function(){}),a.G=a.i.get(Tc),a.i.delete(Tc));a.u=null}function om(a,b){for(var c=0>a.g.Ua(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.va&&e.va.yd(c),e.ba&&e.ba.yd(c);d=t(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.yd(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Ac&&(pm(a,b,!1,0,!1),c.Ac=d);else if(b=c.Ac)c.Ac=null,pm(a,b,!0,0,!1)}
|
|
function qm(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.H&&(b.video&&pm(a,b.video,c,d,e,f),b.audio&&pm(a,b.audio,c,d,e,f))}function rm(a,b){I(function(c){if(1==c.g)return a.G=null,a.u=b,a.H?b.segmentIndex?c.B(2):x(c,b.createSegmentIndex(),2):c.return();pm(a,b,!0,0,!1);H(c)})}function sm(a,b){for(var c=t(a.I.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.I.delete(d))}}
|
|
function pm(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Tc?g&&(g.Ac&&(b.trickModeVideo?(g.Ac=b,b=b.trickModeVideo):g.Ac=null),g.stream!=b||e)&&(a.s.has(b)?g.ba=a.s.get(b):g.ba&&Ol(g.ba,b),b.type==Tc&&(e=yf(b.mimeType,b.codecs),kk(a.g.na,e,a.l.sequenceMode,b.external)),!a.s.has(g.stream)&&g.stream.closeSegmentIndex&&(g.gb?(e="("+g.type+":"+g.stream.id+")",a.I.has(e)||a.I.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.va=null,g.oh=!!f,c?g.Ed?g.vf=!0:g.gb?(g.Gc=!0,g.se=
|
|
d,g.vf=!0):(em(g),tm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.gb||g.Tb||mm(a,g,0),um(a,g).catch(function(h){if(a.g)a.g.onError(h)})):km(a,b)}
|
|
function um(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.Eb)return e.return();c=b.stream;d=b.Eb;return c.segmentIndex?e.B(2):x(e,c.createSegmentIndex(),2)}if(b.Eb!=d||b.stream!=c)return e.return();var f=a.g.Kd();var g=pk(a.g.na,b.type),h=b.stream.segmentIndex.find(b.pb?b.pb.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.La?k.La-k.$a:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ma)&&(h+=(k.La?k.La-k.$a:null)||0),k=a.g.getBandwidthEstimate(),
|
|
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.Eb.h.g>h?!0:!1):f=!1;f&&b.Eb.abort();H(e)})}
|
|
q.wd=function(){if(this.g)for(var a=this.g.Kd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.na;d==Tc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=ok(e,d),e=lj(e,a));if(!e){c.ba&&(c.ba.g=null);if("audio"===c.type){e=t(this.s.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.va=null;(null!=pk(this.g.na,d)||c.gb)&&vm(this,c);c.Eb&&(c.Eb.abort(),c.Eb=null);d===Tc&&(d=this.g.na,d.J&&d.J.g());c.wd=!0}}};
|
|
function vm(a,b){b.Ed||b.Gc||(b.gb?(b.Gc=!0,b.se=0):null==nk(a.g.na,b.type)?null==b.Tb&&mm(a,b,0):(em(b),tm(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
function jm(a,b){var c,d,e,f,g,h,k,l,m,n;return I(function(p){if(1==p.g){c=Xc;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.ia,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ya,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Na,a.u),e.add(a.u));f=a.g.na;return x(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Kh(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=lm(a,l),b.has(l.id)&&(n=
|
|
b.get(l.id),El(n,function(r,u,v){return wm(r,u,v||null,a.h.retryParameters,a.g.ic)}),m.ba=n),a.i.set(k,m),mm(a,m,0));H(p)})}function lm(a,b){return{stream:b,type:b.type,va:null,ba:gm(a,b),pb:null,nd:null,Me:null,Le:null,Ke:null,Ac:null,endOfStream:!1,gb:!1,Tb:null,Gc:!1,se:0,vf:!1,Ed:!1,wd:!0,Mg:!1,Nd:!1,Eb:null}}
|
|
function gm(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Tc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Tc&&a.h.disableTextPrefetch)return null;if(a.s.has(b))return a.s.get(b);var c=a.i.get(b.type);return(c=c&&c.ba)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new Dl(a.h.segmentPrefetchLimit,b,function(d,e,f){return wm(d,e,f||null,a.h.retryParameters,a.g.ic)},0>a.g.Ua()):null}
|
|
function hm(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={Hb:void 0},e=d.next())if(f.Hb=e.value,f.Hb.audio)if(a.s.has(f.Hb.audio)){if(e=a.s.get(f.Hb.audio),Nl(e,b),!(0<b&&c.some(function(h){return function(k){return $c(h.Hb.audio.language,k)}}(f)))){var g=a.i.get(f.Hb.audio.type);e!==(g&&g.ba)&&Ml(e);a.s.delete(f.Hb.audio)}}else 0>=b||!c.some(function(h){return function(k){return $c(h.Hb.audio.language,k)}}(f))||!(e=gm(a,f.Hb.audio))||
|
|
(f.Hb.audio.segmentIndex||f.Hb.audio.createSegmentIndex(),a.s.set(f.Hb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.na.zb(a):this.g.na.zb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
function xm(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:Kh(a.m);if(b.gb||null==b.Tb||b.Ed)return k.return();b.Tb=null;if(!b.Gc){k.B(2);break}return x(k,tm(a,b,b.vf,b.se),3);case 3:return k.return();case 2:sm(a,b);if(b.stream.segmentIndex){k.B(4);break}c=b.stream;ua(k,5);return x(k,b.stream.createSegmentIndex(),7);case 7:wa(k,6);break;case 5:return d=xa(k),x(k,ym(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.gb||b.Tb||
|
|
mm(a,b,0),k.return();case 4:ua(k,9);e=zm(a,b);null!=e&&(mm(a,b,e),b.Nd=!1);wa(k,10);break;case 9:return f=xa(k),x(k,ym(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.H||!g.every(function(l){return l.endOfStream})){k.B(0);break}return x(k,a.g.na.endOfStream(),13);case 13:Kh(a.m),h=a.g.na.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.zb(h),H(k)}})}
|
|
function zm(a,b){if(Am(b))return xk(a.g.na,b.stream.originalId||""),null;b.type==Tc&&yk(a.g.na);if(!a.g.na.aa&&b.type!=Tc)return a.h.updateIntervalSeconds/2;var c=a.g.Kd();if("audio"===b.type)for(var d=t(a.s.keys()),e=d.next();!e.done;e=d.next())e=a.s.get(e.value),e.Ya(c,!0),Fl(e,c);d=b.pb?b.pb.endTime:c;var f=qk(a.g.na,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C),h=a.l.presentationTimeline.getDuration()-d;e=pk(a.g.na,b.type);if(1E-6>h&&e)return b.endOfStream=
|
|
!0,"video"==b.type&&(a=a.i.get(Tc))&&Am(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.va;e=Bm(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.oh&&(f=!0,b.oh=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,Am(k)||k.va&&!k.va.current()||(g=Math.min(g,k.pb?k.pb.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.ba&&b.va&&!a.s.has(b.stream)&&(b.ba.Ya(e.startTime),Fl(b.ba,
|
|
e.startTime));Cm(a,b,c,e,f).catch(function(){});return null}
|
|
function Bm(a,b,c,d){if(b.va)return b.va.current();if(b.pb||d)return c=b.pb?b.pb.endTime:d,a=0>a.g.Ua(),b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.dc(c,!1,a)),b.va&&b.va.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ua();var f=null;d&&(b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.dc(e,!1,a)),f=b.va&&b.va.next().value);f||(b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.dc(c,!1,a)),f=b.va&&b.va.next().value);return f}
|
|
function Cm(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D;return I(function(G){switch(G.g){case 1:f=Xc;g=b.stream;h=b.va;b.gb=!0;ua(G,2);if(2==d.tc())throw new T(1,1,1011);return x(G,Dm(a,b,d,e),4);case 4:Kh(a.m);if(a.A)return G.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.l.isLowLatency)&&l&&k&&("HLS"!=a.l.type||d.m))return r=new Uint8Array(0),v=u=!1,z=function(A){var E,F,J,L;return I(function(K){switch(K.g){case 1:if(u)return K.return();
|
|
v=!0;Kh(a.m);if(a.A)return K.return();ua(K,2);r=Em(r,A);E=!1;F=0;(new Th).box("mdat",function(O){F=O.size+O.start;E=!0}).parse(r,!1,!0);if(!E){K.B(4);break}J=r.subarray(0,F);r=r.subarray(F);return x(K,Fm(a,b,c,g,d,J,!0,e),5);case 5:b.ba&&b.va&&Fl(b.ba,d.startTime,!0);case 4:wa(K,0);break;case 2:w=L=xa(K),H(K)}})},x(G,Gm(a,b,d,z),9);n=Gm(a,b,d);return x(G,n,7);case 7:p=G.h;Kh(a.m);if(a.A)return G.return();Kh(a.m);return b.Gc?(b.gb=!1,mm(a,b,0),G.return()):x(G,Fm(a,b,c,g,d,p,!1,e),6);case 9:y=G.h;if(w)throw w;
|
|
if(v){G.B(10);break}u=!0;Kh(a.m);return a.A?G.return():b.Gc?(b.gb=!1,mm(a,b,0),G.return()):x(G,Fm(a,b,c,g,d,y,!1,e),10);case 10:b.ba&&b.va&&Fl(b.ba,d.startTime,!0);case 6:Kh(a.m);if(a.A)return G.return();b.pb=d;h.next();b.gb=!1;b.Mg=!1;B=a.g.na.Vb();C=B[b.type];eb(JSON.stringify(C));b.Gc||a.g.Gg(d,b.stream);mm(a,b,0);wa(G,0);break;case 2:D=xa(G);Kh(a.m,D);if(a.A)return G.return();b.gb=!1;if(7001==D.code)b.gb=!1,em(b),mm(a,b,0),G.B(0);else if(b.type==f.Na&&a.h.ignoreTextStreamFailures)a.i.delete(f.Na),
|
|
G.B(0);else{if(3017==D.code)return x(G,Hm(a,b,D),0);b.Nd=!0;1==D.category&&b.ba&&Ll(b.ba,d);D.severity=2;return x(G,ym(a,b,D),0)}}})}function Em(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
function Hm(a,b,c){var d,e,f,g,h,k;return I(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Mg}))return l.B(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.C);if(20<h)a.C-=.2;else if(4<h)a.C-=.04;else return b.Nd=!0,a.A=!0,a.g.onError(c),l.return();b.Mg=!0;k=a.g.Kd();return x(l,Im(a,b,k),2)}mm(a,b,4);H(l)})}
|
|
function Dm(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B;return I(function(C){switch(C.g){case 1:e=Xc;f=null==b.pb;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.S)-.1);k=Math.min(c.appendWindowEnd,a.P)+.01;l=c.codecs||b.stream.codecs;m=Hf(l);n=If(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.Me&&h==b.Le&&k==b.Ke&&m==b.zg&&n==b.Ag){C.B(2);break}r=b.zg&&b.Ag&&Tk(a.g.na,b.type,n,l);if(!r){C.B(3);break}u=null;b.type===e.ya?u=a.i.get(e.ia):b.type===e.ia&&(u=a.i.get(e.ya));if(!u){C.B(3);
|
|
break}return x(C,fm(u).catch(function(){}),5);case 5:u.nd=null,vm(a,u);case 3:return x(C,Jm(a,b,p,h,k,c,m,n),2);case 2:return ej(c.ma,b.nd)||(b.nd=c.ma,c.l&&c.ma&&(v=Gm(a,b,c.ma),w=function(){var D,G,A,E,F,J,L;return I(function(K){switch(K.g){case 1:return ua(K,2),x(K,v,4);case 4:return D=K.h,Kh(a.m),G=null,A=new Map,E={projection:null,hfov:null},F=new Th,F.box("moov",Yh).box("trak",Yh).box("mdia",Yh).W("mdhd",function(O){G=yj(O.reader,O.version).timescale}).box("hdlr",function(O){O=O.reader;O.skip(8);
|
|
switch(O.Uc()){case "soun":A.set(e.ia,G);break;case "vide":A.set(e.ya,G)}G=null}).box("minf",Yh).box("stbl",Yh).W("stsd",$h).box("encv",ai).box("avc1",ai).box("avc3",ai).box("hev1",ai).box("hvc1",ai).box("dvav",ai).box("dva1",ai).box("dvh1",ai).box("dvhe",ai).box("dvc1",ai).box("dvi1",ai).box("vexu",Yh).box("proj",Yh).W("prji",function(O){O=O.reader.Uc();E.projection=O}).box("hfov",function(O){O=O.reader.U()/1E3;E.hfov=O}).parse(D),Km(a,E),A.has(b.type)?c.ma.timescale=A.get(b.type):null!=G&&(c.ma.timescale=
|
|
G),J=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,x(K,a.g.uh(b.type,D),5);case 5:return x(K,sk(a.g.na,b.type,D,null,b.stream,J,b.wd,d),6);case 6:wa(K,0);break;case 2:throw L=xa(K),b.nd=null,L;}})},z=c.startTime,f&&(y=pk(a.g.na,b.type),null!=y&&(z=y)),a.g.jk(z,c.ma),g.push(w()))),B=b.pb?b.pb.i:null,c.i!=B&&g.push(Lk(a.g.na,b.type,c.startTime)),x(C,Promise.all(g),0)}})}
|
|
function Jm(a,b,c,d,e,f,g,h){var k,l,m,n;return I(function(p){if(1==p.g)return k=Xc,l=new Map,a.j.audio&&l.set(k.ia,a.j.audio),a.j.video&&l.set(k.ya,a.j.video),ua(p,2),b.Le=d,b.Ke=e,g&&(b.zg=g),h&&(b.Ag=h),b.Me=c,m=a.l.sequenceMode||"HLS"==a.l.type,x(p,Jk(a.g.na,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return wa(p,0);n=xa(p);b.Le=null;b.Ke=null;b.zg=null;b.Ag=null;b.Me=null;throw n;})}
|
|
function Fm(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r,u,v;return I(function(w){switch(w.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.J;p="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;r=null;e.ma&&(r=e.ma.timescale);u=p&&r&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(m||n||u)l=new Th;m&&l.W("emsg",function(z){var y=d.emsgSchemeIdUris;
|
|
if(0===z.version){var B=z.reader.Uc();var C=z.reader.Uc();var D=z.reader.U();var G=z.reader.U();var A=z.reader.U();var E=z.reader.U();var F=e.startTime+G/D}else D=z.reader.U(),F=z.reader.ud()/D+e.timestampOffset,G=F-e.startTime,A=z.reader.U(),E=z.reader.U(),B=z.reader.Uc(),C=z.reader.Uc();z=z.reader.Rb(z.reader.getLength()-z.reader.Oa());if(y&&y.includes(B)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==B)a.g.kk();else if(y=F+A/D,D=(new Map).set("detail",{startTime:F,endTime:y,schemeIdUri:B,
|
|
value:C,timescale:D,presentationTimeDelta:G,eventDuration:A,id:E,messageData:z}),D=new S("emsg",D),D.cancelable=!0,a.g.onEvent(D),!D.defaultPrevented&&("https://aomedia.org/emsg/ID3"==B||"https://developer.apple.com/streaming/emsg-id3"==B)&&(B=uj(z),B.length))a.g.onMetadata([{cueTime:F,data:z,frames:B,dts:F,pts:F}],0,y)});n&&l.W("prft",function(z){if(!a.J&&e.ma.timescale){var y=z.reader,B=z.version;y.U();z=y.U();var C=y.U();z=1E3*z+C/Math.pow(2,32)*1E3;0===B?y=y.U():(B=y.U(),y=y.U(),y=B*Math.pow(2,
|
|
32)+y);z=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+z)).getTime();y=(new Map).set("detail",{wallClockTime:z,programStartDate:new Date(z-y/e.ma.timescale*1E3)});y=new S("prft",y);a.g.onEvent(y);a.J=!0}});u&&l.box("moof",Yh).box("traf",Yh).W("tfdt",function(z){var y,B,C,D,G,A;return I(function(E){y=xj(z.reader,z.version);B=y.baseMediaDecodeTime;if(!B)return E.return();C=-B/r;D=Number(b.Me)||0;if(!(D<C))return E.B(0);G=b.Le;A=b.Ke;return x(E,Jm(a,b,C,G,A,e),0)})});(m||n||u)&&l.parse(f,
|
|
!1,g);return x(w,Im(a,b,c),2);case 2:return Kh(a.m),v=b.wd,b.wd=!1,x(w,a.g.uh(b.type,f),3);case 3:return x(w,sk(a.g.na,b.type,f,e,d,k,v,h,g),4);case 4:Kh(a.m),H(w)}})}
|
|
function Im(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof sl&&d.Ya(a.l.presentationTimeline.Cb());e=Math.max(a.h.bufferBehind*a.C,a.l.presentationTimeline.h);f=nk(a.g.na,b.type);if(null==f)return a.G==b&&(a.G=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():x(k,a.g.na.remove(b.type,f,f+h),2)}if(4!=k.g)return Kh(a.m),a.G?x(k,Im(a,a.G,c),4):k.B(0);Kh(a.m);H(k)})}
|
|
function Am(a){return a&&a.type==Tc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
function Gm(a,b,c,d){var e,f,g,h,k;return I(function(l){switch(l.g){case 1:if(e=c.ec())return l.return(e);f=null;if(b.ba){var m=b.ba,n=m.h;c instanceof dj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.dh=d),f=m.Ve):f=null}f||(f=wm(c,b.stream,d||null,a.h.retryParameters,a.g.ic));g=0;b.va&&(g=b.va.h);b.Eb=f;return x(l,f.promise,2);case 2:h=l.h;b.Eb=null;k=h.data;if(!c.aesKey){l.B(3);break}return x(l,am(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
function wm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof fj?a:void 0,h=g?1:0;a=bm(a.R(),a.$a,a.La,d,c);a.contentType=b.type;return e.request(Hh,a,{type:h,stream:b,segment:g,isPreload:f})}
|
|
function tm(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.Gc=!1,b.vf=!1,b.se=0,b.Ed=!0,b.pb=null,b.va=null,b.ba&&!a.s.has(b.stream)&&Ml(b.ba),d?(e=a.g.Kd(),f=a.g.na.getDuration(),x(g,a.g.na.remove(b.type,e+d,f),3)):x(g,Ik(a.g.na,b.type),4);if(3!=g.g)return Kh(a.m),c?x(g,a.g.na.flush(b.type),3):g.B(3);Kh(a.m);b.Ed=!1;b.endOfStream=!1;b.gb||b.Tb||mm(a,b,0);H(g)})}
|
|
function mm(a,b,c){var d=b.type;if(d!=Tc||a.i.has(d))b.Tb=(new Yb(function(){var e;return I(function(f){if(1==f.g)return ua(f,2),x(f,xm(a,b),4);if(2!=f.g)return wa(f,0);e=xa(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function em(a){null!=a.Tb&&(a.Tb.stop(),a.Tb=null)}function fm(a){return I(function(b){return a.Eb?x(b,a.Eb.abort(),0):b.B(0)})}
|
|
function ym(a,b,c){var d;return I(function(e){if(1==e.g)return x(e,kh(a.M),2);Kh(a.m);if(1===c.category&&1003!=c.code){if(b.Ac)return om(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
|
|
function Lm(a){var b,c,d,e,f,g;return I(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.O<c)return h.return(!1);a.O=b;d=Xc;if(e=a.i.get(d.ia))e.nd=null,vm(a,e),fm(e).catch(function(){}),e.va&&e.va.Og();if(f=a.i.get(d.ya))f.nd=null,vm(a,f),fm(f).catch(function(){}),f.va&&f.va.Og();g=new Map;a.j.audio&&g.set(d.ia,a.j.audio);a.j.video&&g.set(d.ya,a.j.video);return x(h,Rk(a.g.na,g),2)}return h.return(!0)})}
|
|
function Km(a,b){if(a.K.projection!=b.projection||a.K.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new S("spatialvideoinfo",c)}else c=new S("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.K=b}};function Mm(){}
|
|
function Nm(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=ae(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=ae(n)),m=Nm(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Ya("Invalid config, wrong type for "+m),
|
|
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&Za("Unexpected number of arguments for "+m),a[l]=b[l]):(Ya("Invalid config, unrecognized key "+m),k=!1)}return k}function Om(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 Pm(a,b){return a&&b}
|
|
function Qm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]=
|
|
m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}P("shaka.util.ConfigUtils",Mm);Mm.getDifferenceFromConfigObjects=Qm;Mm.convertToConfigObject=Om;Mm.mergeConfigObjects=Nm;function Rm(){}function Sm(a){a=Bc(a);return(new ob(a)).bc}function Tm(a,b,c){function d(h){Nb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Hb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Dc(b,!0):e=b;a=Bc(a);a=Dc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Um(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Bc(a).split("skd://").pop();return Tm(a,c,b)}
|
|
function Vm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}P("shaka.util.FairPlayUtils",Rm);Rm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=yc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Jb(Jc(c)))}};Rm.expressplayFairPlayRequest=function(a,b){Vm(a,b)};
|
|
Rm.conaxFairPlayRequest=function(a,b){Vm(a,b)};Rm.ezdrmFairPlayRequest=function(a,b){Vm(a,b)};Rm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Hb(b.body),a=Ic(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Cc("spc="+a))};Rm.expressplayInitDataTransform=function(a,b,c){return Um(a,b,c)};
|
|
Rm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Bc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Lb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Tm(a,d,b)};Rm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Bc(a).split(";").pop();return Tm(a,c,b)};Rm.verimatrixInitDataTransform=function(a,b,c){return Um(a,b,c)};Rm.initDataTransform=Tm;
|
|
Rm.defaultGetContentId=Sm;Rm.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"'}]},ua(b,2),x(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);xa(b);return b.return(!1)})};function Wm(){}
|
|
function Xm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:jh(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){vc()&&"skd"==n&&(n=p.serverCertificate,p=Sm(m),m=Tm(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:dc(),minHdcpVersion:"",ignoreDuplicateInitData:!ec("Tizen 2")};
|
|
(dc()||mc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!zd()||fc()||mc()||nc()||hc()&&79===jc()||!(!ic()||ic()&&rc()||ic()&&ec("Fuchsia"))||qc()&&cc()||(c="smooth",d=!0);d={retryParameters:jh(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,dash:{clockSyncUri:"",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","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},
|
|
manifestPreprocessor:Ym,manifestPreprocessorTXml:Zm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:gc()||ec("Tizen 2")||
|
|
hc()&&38===jc()||mc()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:Ym,manifestPreprocessorTXml:Zm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:jh(),failureCallback:function(m){return Pm([m])},rebufferingGoal:2,bufferingGoal:10,
|
|
bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,
|
|
parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,
|
|
vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:mc()||nc(),dontChooseCodecs:!1,shouldFixTimestampOffset:hc()||fc()},f=pc();f&&17<=f&&(e.infiniteLiveStreamDuration=!0);if(hc()||fc()||ic()||oc())e.stallSkip=0;fc()&&(e.gapPadding=2);f={trackSelectionCallback:function(m){return I(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return I(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?
|
|
x(p,navigator.storage.estimate(),3):p.return(!0);n=p.h;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return Pm([m,n])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={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,
|
|
minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:kc()?.5:0,preferNetworkInformationBandwidth:!1};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return Pm([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return Pm([m,
|
|
n])}};var g=!1,h=!1,k=!0;sc()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new Mg},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],
|
|
restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},
|
|
lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return I(function(n){return n.return($m(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
function an(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Nm(a,b,c||Xm(),d,"")}
|
|
function $m(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1})?"HLG":"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=id(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return ad(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&
|
|
480>=h.height});g.length&&(g.sort(function(h,k){return k.height-h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Tc&&"image"!=c.type||b.push(c);return b}function Ym(a){return Pm([a],a)}function Zm(a){return Pm([a],a)}P("shaka.util.PlayerConfiguration",Wm);Wm.mergeConfigObjects=an;Wm.createDefault=Xm;function bn(a,b,c,d){hb.call(this);this.O=a;this.V=b;this.Ia=d.networkingEngine;this.C=c;this.s=null;this.Ea=0;this.bb=d.dd;this.H=d.dk;this.kb=d.ek;this.g=d.config;this.j=this.I=this.h=null;this.ka=!1;this.J=d.qk;this.ra=!1;this.l=null;this.aa=!1;this.i=this.G=null;this.$=!1;this.M=new Map;this.za=!1;this.Ha=d.pk;this.Y=new Cl;this.ha=new lh;this.m=new lh;this.P=null;this.u=!1;this.Xa=d.Zi;this.oa=null;this.Ja=d.Yi;this.S=!1;this.L=[];this.K=[];this.A=!0}qa(bn,hb);
|
|
function cn(a,b,c){(a=b?a.K:a.L)?a.push(c):c()}function dn(a){if(a.K)for(var b=t(a.K),c=b.next();!c.done;c=b.next())c=c.value,c();a.K=null}function en(a,b){a.P=b;a.S=!0;if(a.L){b=t(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}q=bn.prototype;q.getStartTime=function(){return this.C};q.hd=function(){return this.O};q.mg=function(){return this.h};function fn(a){a.$=!0;return a.i}function gn(a){a.ra=!0;return a.J}q.getStats=function(){return this.Y};
|
|
function hn(a){a.aa=!0;return a.l}function jn(a){a.za=!0;return a.M}
|
|
q.start=function(){var a=this;(function(){var b;return I(function(c){switch(c.g){case 1:return x(c,Promise.resolve(),2);case 2:return ua(c,3),x(c,kn(a),5);case 5:return ln(a),x(c,mn(a),6);case 6:ln(a);a.s||(a.s=new Vg(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups,""));
|
|
if(a.Ja){var d=a.g.abrFactory;a.G=d;a.i=d();a.i.configure(a.g.abr)}if(a.Xa){d=a.h.presentationTimeline.T();var e=Ig(a.h.variants);e=a.s.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant())a.oa=e,e.video&&nn(a,e.video,d),e.audio&&nn(a,e.audio,d)}return x(c,void 0,7);case 7:ln(a);a.m.resolve();wa(c,0);break;case 3:b=xa(c),b instanceof T&&(7001==b.code||7003==b.code)||a.m.reject(b),H(c)}})})()};
|
|
q.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):hb.prototype.dispatchEvent.call(this,a)};q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new S("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function ln(a){if(a.u)throw new T(2,7,7003);}function on(a,b){a.dispatchEvent(new S("onstatechange",(new Map).set("state",b)))}
|
|
function kn(a){var b,c,d,e;return I(function(f){switch(f.g){case 1:on(a,"manifest-parser");a.j||(a.I=Yi(a.O,a.V),a.j=a.I(),a.j.configure(a.g.manifest,function(){return a.A}));b=Date.now()/1E3;on(a,"manifest");if(a.h){f.B(2);break}return x(f,a.j.start(a.O,a.kb),3);case 3:a.h=f.h;case 2:return a.ha.resolve(),c=new S("manifestparsed",void 0),x(f,Promise.resolve(),4);case 4:a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);pn(a.h);d=Date.now()/1E3;e=d-b;a.Y.J=e;H(f)}})}
|
|
function mn(a){var b,c,d,e,f;return I(function(g){switch(g.g){case 1:on(a,"drm-engine");a.Ea=Date.now()/1E3;a.l=a.bb();a.H.g=a.l;a.l.configure(a.g.drm,function(){return a.A});b=Ti(a.H,a.h);if(!b){g.B(2);break}c=new S("trackschanged",void 0);return x(g,Promise.resolve(),3);case 3:ln(a),a.dispatchEvent(c);case 2:return d=Ig(a.h.variants),x(g,mi(a.l,d,a.h.offlineSessionIds),4);case 4:return ln(a),x(g,Ri(a.H,a.h),5);case 5:e=g.h;if(!e){g.B(0);break}f=new S("trackschanged",void 0);return x(g,Promise.resolve(),
|
|
7);case 7:a.dispatchEvent(f),H(g)}})}q.configure=function(a,b){a=Om(a,b);an(this.g,a)};q.getConfiguration=function(){return ae(this.g)};
|
|
function nn(a,b,c){var d,e,f,g,h;I(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Dl(d,b,function(l,m,n){return wm(l,m,n||null,a.g.streaming.retryParameters,a.Ia,a.A)},!1),a.M.set(b.id,e),x(k,b.createSegmentIndex(),2);f=a.C||0;(h=(g=b.segmentIndex.dc(f))?g.current():null)||(h=Bg(b.segmentIndex));h&&(c?h.ma&&Gl(e,h.ma):Fl(e,h.startTime));H(k)})}q.Wk=function(){return this.m};
|
|
q.destroy=function(){var a=this,b,c,d;return I(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.ka){e.B(2);break}return x(e,a.j.stop(),2);case 2:if(!a.i||a.$){e.B(4);break}return x(e,a.i.stop(),4);case 4:a.J&&!a.ra&&a.J.release();if(!a.l||a.aa){e.B(6);break}return x(e,a.l.destroy(),6);case 6:if(0<a.M.size&&!a.za)for(b=t(a.M.values()),c=b.next();!c.done;c=b.next())d=c.value,Ml(d);H(e)}})};
|
|
function pn(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))}P("shaka.media.PreloadManager",bn);bn.prototype.destroy=bn.prototype.destroy;bn.prototype.waitForFinish=bn.prototype.Wk;function qn(a,b){hb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{$c:null,Zc:rn,Oc:function(d,e){return sn(c,"enter",d,e)}},{$c:tn,Zc:rn,Oc:function(d,e){return sn(c,"enter",d,e)}},{$c:un,Zc:rn,Oc:function(d,e){return sn(c,"enter",d,e)}},{$c:rn,Zc:tn,Oc:function(d,e){return sn(c,"exit",d,e)}},{$c:rn,Zc:un,Oc:function(d,e){return sn(c,"exit",d,e)}},{$c:tn,Zc:un,Oc:function(d,e){return sn(c,"skip",d,e)}},{$c:un,Zc:tn,Oc:function(d,e){return sn(c,"skip",d,e)}}];this.h=new rd;this.h.o(this.i,
|
|
"regionremove",function(d){c.g.delete(d.region)})}qa(qn,hb);qn.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;hb.prototype.release.call(this)};qn.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?tn:a>d.endTime?un:rn;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.$c==e&&h.Zc==f&&h.Oc(d,b)}}};
|
|
function sn(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var tn=1,rn=2,un=3;function vn(a,b,c){var d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:var n=(new ob(a)).rb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=wn[d])return m.return(e);f=0;g=Ah([a],c);ua(m,2);g.method="HEAD";return x(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];wa(m,3);break;case 2:k=xa(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return x(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
e.toLowerCase().split(";").shift():"")}})}
|
|
var wn={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",mov:"video/quicktime",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
ssa:"text/x-ssa",ass:"text/x-ssa",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function xn(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return xn(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=hf,e=a.fontStyle==jf,f=a.textDecoration.includes(kf);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=yn(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=yn(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
|
|
k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
function yn(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function zn(a,b){var c=[];a=t(An(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,ha(zn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=xn(d,b);c.push(e)}return c}
|
|
function An(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Pf:void 0},c=a.next())d.Pf=c.value,b.some(function(e){return function(f){return Ze(e.Pf,f)}}(d))||b.push(d.Pf);return b}
|
|
function Bn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
|
|
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c}
|
|
function Cn(a){if(Infinity===a.endTime||a.endTime<a.startTime)return null;var b=new Me(a.startTime,a.endTime,a.text);b.line="number"===typeof a.line?a.line:null;a.lineAlign&&(b.lineAlign=a.lineAlign);b.lineInterpretation=a.snapToLines?Te:1;b.position="number"===typeof a.position?a.position:null;a.positionAlign&&(b.positionAlign=a.positionAlign);b.size=a.size;b.textAlign=a.align;"lr"===a.vertical?b.writingMode="vertical-lr":"rl"===a.vertical&&(b.writingMode="vertical-rl");a.region&&(b.region.id=a.region.id,
|
|
b.region.height=a.region.lines,b.region.heightUnits=2,b.region.regionAnchorX=a.region.regionAnchorX,b.region.regionAnchorY=a.region.regionAnchorY,b.region.scroll=a.region.scroll,b.region.viewportAnchorX=a.region.viewportAnchorX,b.region.viewportAnchorY=a.region.viewportAnchorY,b.region.viewportAnchorUnits=Md,b.region.width=a.region.width,b.region.widthUnits=Md);$e(b);return b};function Dn(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}q=Dn.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;En(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
q.append=function(a){if(this.g){var b=zn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={ld:void 0},d=b.next())e.ld=d.value,!a.some(function(f){return function(g){return g.startTime==f.ld.startTime&&g.endTime==f.ld.endTime&&g.text==f.ld.payload?!0:!1}}(e))&&e.ld.payload&&(d=Bn(e.ld))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-
|
|
c.indexOf(f):c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)}};q.destroy=function(){this.g&&(En(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};q.setTextVisibility=function(a){this.g&&(this.g.mode=a?"showing":"hidden")};
|
|
function En(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}P("shaka.text.SimpleTextDisplayer",Dn);Dn.prototype.setTextVisibility=Dn.prototype.setTextVisibility;Dn.prototype.isTextVisible=Dn.prototype.isTextVisible;Dn.prototype.destroy=Dn.prototype.destroy;Dn.prototype.append=Dn.prototype.append;Dn.prototype.remove=Dn.prototype.remove;Dn.prototype.configure=Dn.prototype.configure;function Fn(){}q=Fn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",Fn);Fn.prototype.setTextVisibility=Fn.prototype.setTextVisibility;Fn.prototype.isTextVisible=Fn.prototype.isTextVisible;Fn.prototype.destroy=Fn.prototype.destroy;Fn.prototype.append=Fn.prototype.append;Fn.prototype.remove=Fn.prototype.remove;Fn.prototype.configure=Fn.prototype.configure;function Gn(){}function V(a){return document.createElement(a)}function Hn(){var a=document.createElement("button");a.setAttribute("type","button");return a}function In(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Gn);Gn.removeAllChildren=In;function Jn(a,b){var c=this;document.fullscreenEnabled||Za("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.m=!1;this.h=[];this.A=a;this.u=b;this.l=null;this.g=V("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.u.appendChild(this.g);this.G=(new Zb(function(){c.A.paused||
|
|
Kn(c)})).Ba(.25);this.i=new Map;this.j=new rd;this.j.o(document,"fullscreenchange",function(){Kn(c,!0)});this.j.o(this.A,"seeking",function(){Kn(c,!0)});this.j.o(this.A,"resize",function(){var d=c.A,e=d.videoWidth;d=d.videoHeight;e&&d?c.l=e/d:c.l=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){Kn(c,!0)}),this.s.observe(this.g));this.C=new Map}q=Jn.prototype;q.configure=function(a){this.G&&this.G.Ba(a.captionsUpdatePeriod)};
|
|
q.append=function(a){var b=[].concat(ha(this.h));a=t(An(a));for(var c=a.next(),d={};!c.done;d={Qf:void 0},c=a.next())d.Qf=c.value,b.some(function(e){return function(f){return Ze(f,e.Qf)}}(d))||this.h.push(d.Qf);Kn(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.G&&this.G.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.s&&(this.s.disconnect(),this.s=null);return Promise.resolve()};
|
|
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Kn(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a;Kn(this,!0)};function Ln(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
function Mn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Qi:null;l&&(g.push(l.Rf),l.Wc&&g.push(l.Wc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Ln(a,n)||(f=!0):(Nn(a,k,e),l=a.i.get(k),n=l.Qi,f=!0));0<k.nestedCues.length&&n&&Mn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
|
|
r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.Wc?(d.Wc.contains(c)&&d.Wc.removeChild(c),c.appendChild(d.Wc),d.Wc.appendChild(d.Rf)):c.appendChild(d.Rf)}}function Kn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.C.values());for(var d=b.next();!d.done;d=b.next())In(d.value);In(a.g);a.i.clear();a.C.clear()}a.m&&Mn(a,a.h,a.g,c,[])}}
|
|
function Nn(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=V(e);"br"!=e&&On(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Md?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Md?"%":"px");if(a.C.has(c))c=a.C.get(c);else{e=V("span");var k=g.heightUnits==Md?"%":"px",l=g.widthUnits==Md?"%":"px",m=g.viewportAnchorUnits==
|
|
Md?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.l===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*n/100+m,e.style.left=
|
|
g.viewportAnchorX-g.regionAnchorX*p/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":
|
|
"center"==b.displayAlign?"center":"flex-end";a.C.set(c,e);c=e}}e=f;d&&(e=V("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Rf:f,Qi:e,Wc:c})}function Pn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Oe?c:"left"===a||"start"===a&&b===Re||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Re?"line-right":"center"}
|
|
function On(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=Qn(c.linePadding,c,a.u);f.paddingRight=Qn(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=V("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Rn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-1].isContainer)f.display=
|
|
"inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Qn(c.fontSize,
|
|
c,a.u);d=c.line;null!=d&&(g=c.lineInterpretation,g==Te&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Se?(f.width="100%",c.lineAlign==Ue?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Ue?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Ue?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=Pn(c);"line-left"==a?(f.cssFloat=
|
|
"left",null!==c.position&&(f.position="absolute",c.writingMode==Se?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Se?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Se?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");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==Se?f.width=c.size+"%":f.height=c.size+"%")}function Qn(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 Rn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}P("shaka.text.UITextDisplayer",Jn);Jn.prototype.setTextVisibility=Jn.prototype.setTextVisibility;Jn.prototype.isTextVisible=Jn.prototype.isTextVisible;Jn.prototype.remove=Jn.prototype.remove;Jn.prototype.destroy=Jn.prototype.destroy;Jn.prototype.append=Jn.prototype.append;Jn.prototype.configure=Jn.prototype.configure;function Sn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=zn(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
break;case "right":g.push("align:right");break;case Pe:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}P("shaka.text.WebVttGenerator",function(){});function Tn(a,b){this.h=a;this.g=b;this.i=void 0;this.l=!1;this.s=!0;this.j=this.m=!1}Tn.prototype.configure=function(a){this.g=a};function Un(a){a.l=!1;a.s=!0;a.m=!1;a.j=!1}function Vn(a,b){a.j=b;a.j?a.i==Wn?a.i=Xn:a.i==Yn&&(a.i=Zn):a.i==Xn?a.i=Wn:a.i==Zn&&(a.i=Yn)}
|
|
function $n(a,b,c){try{if(!a.g.enabled)return b;var d=ao(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=bo;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=co;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=eo;break a}e=void 0}d.ot=e;d.su=
|
|
!0;var f=fo(d);return go(b,f)}catch(g){return $a("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function ao(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
function ho(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,ao(a));c.pr=a.h.Ua();var e=c.ot===io||c.ot===co;a.m&&e&&(c.bs=!0,c.su=!0,a.m=!1);null==c.su&&(c.su=a.s);a=jo(a,c);if(d)d=ko(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=fo(a);f&&(b.uris=b.uris.map(function(g){return go(g,f)}))}}}function jo(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
|
|
function lo(a){if(0===a.type)return mo;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?co:io;if("audio"==b)return bo;if("text"==b)return"application/mp4"===a.mimeType?no:oo}}function po(a,b){b=a.h.Vb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
function qo(a,b){b=a.h.Vb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function ro(a,b){var c=a.h.Lb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case io:return a.videoBandwidth||NaN;case bo:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
function fo(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function ko(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=fo(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
function go(a,b){if(!b||a.includes("offline:"))return a;a=new ob(a);a.g.set("CMCD",b);return a.toString()}var eo="m",bo="a",io="v",co="av",mo="i",oo="c",no="tt",Wn="d",Xn="ld",Yn="h",Zn="lh";P("shaka.util.CmcdManager.StreamingFormat",{DASH:Wn,yl:Xn,HLS:Yn,zl:Zn,Ml:"s",OTHER:"o"});function so(a){this.h=a;this.g=null}q=so.prototype;q.configure=function(a){this.h=a};q.Lh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(to)?1E3*this.g.get(to):null};q.Kh=function(){return this.h.enabled&&this.g&&this.g.has(uo)?1E3*this.g.get(uo):null};q.Cj=function(){return this.h.enabled&&this.g&&this.g.has(vo)?this.g.get(vo):null};q.Dj=function(){return this.h.enabled&&this.g&&this.g.has(wo)?this.g.get(wo):null};
|
|
q.getBandwidthEstimate=function(a){var b=this.Kh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function xo(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",so);so.prototype.getBandwidthEstimate=so.prototype.getBandwidthEstimate;so.prototype.getRoundTripTime=so.prototype.Dj;so.prototype.getResponseDelay=so.prototype.Cj;so.prototype.getEstimatedThroughput=so.prototype.Kh;
|
|
so.prototype.getMaxBitrate=so.prototype.Lh;var uo="etp",to="mb",vo="rd",wo="rtt";function yo(){this.g=null;this.h=[]}function zo(a,b){return I(function(c){if(1==c.g)return a.g?x(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;H(c)})}yo.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function W(a,b,c){b=void 0===b?null:b;hb.call(this);var d=this;this.m=Ao;this.h=null;this.uf=b;this.oa=!1;this.fe=new rd;this.zc=new rd;this.l=new rd;this.Ja=new rd;this.bb=new rd;this.I=this.K=this.C=this.H=null;this.ie=0;this.V=new yo;this.ka=this.Af=this.$=this.i=this.Xa=this.J=this.j=this.wc=this.M=this.nh=this.aa=this.P=this.yc=this.O=this.wf=this.L=this.Db=null;this.ra=!1;this.Ea=this.s=null;this.Bf=1E9;this.be=[];this.zf=-1;this.g=Bo(this);this.S=null;this.je=-1;this.Ha=null;this.ha={width:Infinity,
|
|
height:Infinity};this.rf=new Qi(this.g,this.ha,null);this.yf=[];this.A=null;this.Ia=new Vg(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,"");this.kb=this.g.preferredTextLanguage;this.$d=this.g.preferredTextRole;this.Zd=this.g.preferForcedSubs;
|
|
this.Xd=[];c&&c(this);this.P=Co(this);this.aa=new so(this.g.cmsd);this.H=Do(this);this.H.Xg(this.g.streaming.forceHTTP);this.H.Yg(this.g.streaming.forceHTTPS);this.H.m=this.g.streaming.minBytesForProgressEvents;this.Nb=this.Y=this.u=null;this.Ff=!1;this.Df=new Zb(function(){return I(function(e){if(1==e.g)return d.Y?x(e,d.$b(d.Nb,!0),3):e.B(0);if(4!=e.g)return x(e,d.load(d.Y),4);d.Ff?d.Nb.pause():d.Nb.play();d.Y=null;d.Ff=!1;H(e)})});Eo&&(this.u=Eo(),this.u.configure(this.g.ads),this.bb.o(this.u,"ad-content-pause-requested",
|
|
function(e){var f;return I(function(g){if(1==g.g){d.Df.stop();if(d.Y)return g.B(0);d.Nb=d.h;d.Ff=d.isEnded();f=e.saveLivePosition||!1;return x(g,d.Eh(!0,f),3)}d.Y=g.h;H(g)})}),this.bb.o(this.u,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.Y){var f=d.Y;f.C&&e&&(f.C+=e)}d.Df.X(.1)}),this.bb.o(this.u,"ad-content-attach-requested",function(){return I(function(e){return d.h||!d.Nb?e.B(0):x(e,d.$b(d.Nb,!0),0)})}));this.fe.o(window,"online",function(){Fo(d);d.Pg()});this.xf=new Zb(function(){for(var e=
|
|
Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.xf.stop();f&&Go(d,!1,void 0,!1,!1)});this.za=null;a&&(Bd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.$b(a,!0));this.G=null}qa(W,hb);function Ho(a){null!=a.M&&(bk(a.M),a.M.release(),a.M=null)}
|
|
function Io(a,b){b.lcevc.enabled?(Ho(a),null==a.M&&(a.M=new ak(a.h,a.nh,b.lcevc),a.K&&(a.K.S=a.M))):Ho(a)}function Xo(a,b){return new S(a,b)}q=W.prototype;
|
|
q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.m==Yo)return c.return();Ho(a);b=a.detach();a.m=Yo;return x(c,b,2);case 2:return x(c,a.Tf(),3);case 3:a.fe&&(a.fe.release(),a.fe=null);a.zc&&(a.zc.release(),a.zc=null);a.l&&(a.l.release(),a.l=null);a.Ja&&(a.Ja.release(),a.Ja=null);a.bb&&(a.bb.release(),a.bb=null);a.Ea=null;a.g=null;a.A=null;a.uf=null;a.P=null;a.aa=null;if(!a.H){c.B(4);break}return x(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.s&&(a.s.release(),a.s=null),
|
|
hb.prototype.release.call(a),H(c)}})};function Zo(){window.Promise||Za("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||ec("Trident/"))return!1;var a=pc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:$b()?!0:ac("application/x-mpegurl")}
|
|
function $o(a,b){a.dispatchEvent(Xo("onstatechange",(new Map).set("state",b)))}
|
|
q.$b=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return I(function(g){switch(g.g){case 1:if(c.m==Yo)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return x(g,c.detach(),2);case 2:return x(g,ap(c,"attach"),4);case 4:if(g.h)return g.return();ua(g,5,6);d||($o(c,"attach"),e=function(){var h=bp(c,!1);h&&cp(c,h)},c.zc.o(a,"error",e),c.h=a);if(!b||!$b()||c.K){g.B(6);break}return x(g,dp(c),6);case 6:ya(g);c.V.release();za(g,0);break;case 5:return f=xa(g),x(g,c.detach(),10);case 10:throw f;
|
|
}})};q.ph=function(a){this.nh=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return I(function(c){if(1==c.g){if(b.m==Yo)throw new T(2,7,7E3);return x(c,b.mc(!1,a),2)}if(3!=c.g)return x(c,ap(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.zc.Za(),b.h=null),$o(b,"detach"),b.u&&!a&&b.u.release()}finally{b.V.release()}H(c)})};function ap(a,b){var c;return I(function(d){return 1==d.g?(c=++a.ie,x(d,zo(a.V,b),2)):c!=a.ie?(a.V.release(),d.return(!0)):d.return(!1)})}
|
|
q.mc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return I(function(r){switch(r.g){case 1:return c.m!=Yo&&(c.m=Ao),x(r,ap(c,"unload"),2);case 2:if(r.h)return r.return();va(r,3);c.ra=!1;$o(c,"unload");a&&!$b()&&(a=!1);Ho(c);d=c.Xd.map(function(u){return u()});c.Xd=[];return x(r,Promise.all(d),5);case 5:c.dispatchEvent(Xo("unloading"));c.yc&&(c.yc.release(),c.yc=null);c.h&&(c.l.Za(),c.Ja.Za());c.xf.stop();c.Db&&(c.Db.release(),c.Db=null);c.wf&&(c.wf.stop(),c.wf=null);
|
|
if(!c.J){r.B(6);break}return x(r,c.J.stop(),7);case 7:c.J=null,c.Xa=null;case 6:if(!c.s){r.B(8);break}return x(r,c.s.stop(),8);case 8:if(!c.j){r.B(10);break}return x(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.L&&(c.L.release(),c.L=null);c.I&&(c.I.release(),c.I=null);if(!vc("webkit")||!c.C){r.B(12);break}return x(r,c.C.destroy(),13);case 13:c.C=null;case 12:if(!c.K){r.B(14);break}return x(r,c.K.destroy(),15);case 15:c.K=null;case 14:if(c.u&&!b)c.u.onAssetUnload();c.Y&&!b&&(c.Y.destroy(),c.Y=null);
|
|
b||c.Df.stop();c.P&&Un(c.P);c.aa&&(c.aa.g=null);if(!c.G){r.B(16);break}return x(r,c.G.destroy(),17);case 17:c.G=null;case 16:c.h&&In(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.C){r.B(18);break}return x(r,c.C.destroy(),19);case 19:c.C=null;case 18:c.za&&c.$!=c.za.hd()&&(c.za.u||c.za.destroy(),c.za=null);c.$=null;c.Af=null;c.O=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&
|
|
l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(qg={},Xb.clear());c.i=null;c.A=new Cl;c.ge=null;c.Ha=null;c.S=null;c.je=-1;c.be=[];c.zf=-1;ep(c);case 3:ya(r);c.V.release();za(r,4);break;case 4:if(a&&$b()&&!c.K&&c.h)return x(r,dp(c),0);r.B(0)}})};q.Vk=function(a){this.ka=a};
|
|
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return I(function(z){switch(z.g){case 1:if(d.m==Yo)throw new T(2,7,7E3);e=null;f="";a instanceof bn?(e=a,f=e.hd()||""):f=a||"";return x(z,zo(d.V,"load"),2);case 2:d.V.release();if(!d.h)throw new T(2,7,7002);if(!d.$){z.B(3);break}d.$=f;return x(z,d.mc(!1),3);case 3:g=++d.ie;h=function(){return I(function(y){if(1==y.g)return d.ie==g?y.B(0):e?x(y,e.destroy(),3):y.B(3);throw new T(2,7,7E3);})};k=function(y,B){return I(function(C){switch(C.g){case 1:return va(C,
|
|
2),x(C,zo(d.V,B),4);case 4:return x(C,h(),5);case 5:return x(C,y(),6);case 6:return x(C,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:ya(C),d.V.release(),za(C,0)}})};ua(z,5,6);null==b&&e&&(b=e.getStartTime());d.ka=b;d.ra=!1;d.dispatchEvent(Xo("loading"));if(e){c=e.V;z.B(8);break}if(c){z.B(8);break}return x(z,k(function(){return I(function(y){if(1==y.g)return x(y,fp(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){en(e,d);d.A=e.getStats();z.B(11);break}return x(z,gp(d,f,b,c,!0),12);case 12:(e=
|
|
z.h)?(e.A=!1,en(e,d),d.A=e.getStats(),e.start(),e.m.catch(function(){})):d.A=new Cl;case 11:return m=!e,n=Date.now()/1E3,d.A=e?e.getStats():new Cl,d.$=f,d.Af=c||null,m?x(z,k(function(){return I(function(y){return x(y,hp(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):x(z,k(function(){return I(function(y){if(1==y.g)return x(y,Promise.race([e.ha,e.m]),2);d.Xa=e.I;var B=e;B.ka=!0;d.J=B.j;d.i=e.mg();H(y)})},"waitForFinish"),15);case 15:if(d.K){z.B(16);break}return x(z,k(function(){return I(function(y){return x(y,
|
|
dp(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return x(z,k(function(){return I(function(y){return x(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.rf=e.H;d.J&&d.J.setMediaElement&&d.h&&d.J.setMediaElement(d.h);d.yc=gn(e);d.wc=e.Ha;if(p=e.s)d.Ia=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(ip(d),d.configure("manifest.disableVideo",!0));d.C=hn(e);return x(z,k(function(){return I(function(y){return x(y,d.C.$b(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.G)||d.Ea&&
|
|
d.Ea==r||(d.s=fn(e),d.Ea=e.G,"function"!=typeof d.s.setMediaElement&&(Bd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(Bd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(Bd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),
|
|
d.s.trySuggestStreams=function(){})),u=jn(e),v=e.oa,x(z,k(function(){return I(function(y){return x(y,jp(d,n,v,u),0)})},"loadInner_"),20);case 20:dn(e);z.B(14);break;case 21:return x(z,k(function(){return I(function(y){return x(y,kp(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Xo("loaded"));case 6:ya(z);if(!e){z.B(23);break}return x(z,e.destroy(),23);case 23:d.za=null;za(z,0);break;case 5:w=xa(z);if(!w||7E3==w.code){z.B(25);break}return x(z,d.mc(!1),25);case 25:throw w;}})};
|
|
function ip(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.Rk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return I(function(e){return 1==e.g?x(e,lp(c),2):3!=e.g?(d=e.h,x(e,c.mc(a,b),3)):e.return(d)})};
|
|
q.Eh=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return I(function(e){return 1==e.g?x(e,lp(c,b),2):3!=e.g?(d=e.h,x(e,c.detach(a),3)):e.return(d)})};
|
|
function lp(a,b){b=void 0===b?!1:b;var c,d;return I(function(e){if(1==e.g){c=null;if(!(a.i&&a.J&&a.Xa&&a.$))return e.B(2);d=a.h.currentTime;a.T()&&!b&&(d=null);return x(e,mp(a,a.$,d,a.Af,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.yf.push(c);a.J&&a.J.setMediaElement&&a.J.setMediaElement(null);var f=c,g=a.J,h=a.Xa;f.h=a.i;f.j=g;f.I=h;f=c;g=a.Ea;f.i=a.s;f.G=g;c.s=a.Ia;c.start();a.i=null;a.J=null;a.Xa=null;a.s=null;a.Ea=null}return e.return(c)})}
|
|
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return I(function(f){if(1==f.g)return x(f,gp(d,a,b,c),2);(e=f.h)?e.start():cp(d,new T(2,7,7005));return f.return(e)})};q.Tf=function(){var a=this,b,c,d,e;return I(function(f){b=[];c=t(a.yf);for(d=c.next();!d.done;d=c.next())e=d.value,e.u||b.push(e.destroy());a.yf=[];return x(f,Promise.all(b),0)})};
|
|
function gp(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return I(function(l){if(1==l.g)return d?l.B(2):x(l,fp(a,b),3);2!=l.g&&(d=l.h);if(f=np(a,d))return l.return(null);g=!1;h=!0;e&&(a.s&&a.Ea==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=mp(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.A=!1;return m}):k.then(function(m){a.yf.push(m);return m});return l.return(k)})}
|
|
function mp(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,v,w,z,y,B,C,D;return I(function(G){if(1==G.g)return h=null,k=ae(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.S&&h.u?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(A,E){l()?h.configure(A,E):a.configure(A,E)},Infinity!=a.ha.width||Infinity!=a.ha.height?G.B(2):x(G,wc(),3);2!=G.g&&(p=G.h,a.ha.width=p.width,a.ha.height=p.height);r=new Qi(k,a.ha,null);u={networkingEngine:a.H,
|
|
filter:function(A){var E,F;return I(function(J){if(1==J.g)return x(J,Ri(r,A),2);if(4!=J.g){E=J.h;if(!E)return J.B(0);F=Xo("trackschanged");return x(J,Promise.resolve(),4)}h.dispatchEvent(F);H(J)})},makeTextStreamsForClosedCaptions:function(A){return op(a,A)},onTimelineRegionAdded:function(A){var E=h.J;a:{var F=t(E.g);for(var J=F.next();!J.done;J=F.next())if(J=J.value,J.schemeIdUri==A.schemeIdUri&&J.id==A.id&&J.startTime==A.startTime&&J.endTime==A.endTime){F=J;break a}F=null}null==F&&(E.g.add(A),A=
|
|
new S("regionadd",new Map([["region",A]])),E.dispatchEvent(A))},onEvent:function(A){return h.dispatchEvent(A)},onError:function(A){return h.onError(A)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.S&&a.j.updateDuration()},newDrmInfo:function(A){var E=h.l,F=E?E.g:null;F&&E.A&&Ui(r,F.keySystem,A)},onManifestUpdated:function(){var A=
|
|
(new Map).set("isLive",a.T());h.dispatchEvent(Xo("manifestupdated",A));cn(h,!1,function(){if(a.u)a.u.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},onMetadata:function(A,E,F,J){var L=A;if("com.apple.hls.interstitial"==A&&(L="com.apple.quicktime.HLS",A={startTime:E,endTime:F,values:J},a.u))a.u.onHLSInterstitialMetadata(a,a.h,A);J=t(J);A=J.next();for(var K={};!A.done;K={Kg:void 0},A=J.next())K.Kg=A.value,"ID"!=K.Kg.name&&cn(h,!1,function(O){return function(){pp(a,
|
|
E,F,L,O.Kg)}}(K))},disableStream:function(A){return a.disableStream(A,a.g.streaming.maxDisabledTime)},addFont:function(A,E){return a.addFont(A,E)}};v=new Pl(function(){return a.xa()});v.addEventListener("regionadd",function(A){var E=A.region;qp(a,"timelineregionadded",E,h);cn(h,!1,function(){a.u&&(a.u.onDashTimedMetadata(E),a.u.onDASHInterstitialMetadata(a,a.h,E))})});w=null;k.streaming.observeQualityChanges&&(w=new Ql(function(){return a.Vb()}),w.addEventListener("qualitychange",function(A){rp(a,
|
|
A.quality,A.position)}),w.addEventListener("audiotrackchange",function(A){rp(a,A.quality,A.position,!0)}));z=!0;y={ic:a.H,onError:function(A){return h.onError(A)},Ue:function(A){cn(h,!0,function(){a:{var E=A,F=Xo("keystatuschanged");a.dispatchEvent(F);var J=Object.keys(E);1==J.length&&""==J[0]&&(J=["00"],E={"00":E[""]});F=1==J.length&&"00"==J[0];var L=!1;if(J.length){J=t(a.i.variants);for(var K=J.next();!K.done;K=J.next()){K=K.value;var O=[];K.audio&&O.push(K.audio);K.video&&O.push(K.video);O=t(O);
|
|
for(var M=O.next();!M.done;M=O.next()){var N=M.value;M=K.allowedByKeySystem;if(N.keyIds.size){K.allowedByKeySystem=!0;N=t(N.keyIds);for(var R=N.next();!R.done;R=N.next())if(R=R.value,(R=E[F?"00":R])||a.C.H)K.allowedByKeySystem=K.allowedByKeySystem&&!!R&&!Wi.includes(R)}M!=K.allowedByKeySystem&&(L=!0)}}}if(L&&(sp(a),!tp(a)))break a;(E=a.j.j)&&!E.allowedByKeySystem&&Go(a)}})},onExpirationUpdated:function(A,E){var F=Xo("expirationupdated");h.dispatchEvent(F);if((F=h.j)&&F.onExpirationUpdated)F.onExpirationUpdated(A,
|
|
E)},onEvent:function(A){h.dispatchEvent(A);"drmsessionupdate"==A.type&&z&&(z=!1,A=Date.now()/1E3-h.Ea,(a.A||h.getStats()).j=A,a.M&&bk(a.M))}};B=Do(a,l);zh(a.H,B);C=function(){return a.dd(y)};D={config:k,ek:u,qk:v,pk:w,dd:C,dk:r,networkingEngine:B,Zi:e,Yi:g};h=new bn(b,d,c,D);return G.return(h)})}
|
|
function fp(a,b){var c,d;return I(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,x(e,vn(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&kc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}function np(a,b){if(!$b())return!0;if(b){if(""==(a.h||bc()).canPlayType(b))return!1;if(!($b()&&b in Zi))return!0;if(Kf(b))return kc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls}return!1}
|
|
function up(a){var b=a.g.textDisplayFactory;b!==a.ge&&(a.G=b(),a.G.configure?a.G.configure(a.g.textDisplayer):Bd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.ge=b,a.G.setTextVisibility(a.oa))}
|
|
function dp(a){var b,c,d;return I(function(e){if(1==e.g)return $o(a,"media-source"),up(a),b=vp(a.h,a.G,{sj:function(){return a.keySystem()},onMetadata:function(f,g,h){wp(a,f,g,h)}},a.M),b.configure(a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.ha=d,x(e,b.H,2);a.K=b;H(e)})}
|
|
function xp(a,b,c){function d(){return yp(a)}a.l.o(b,"playing",d);a.l.o(b,"pause",d);a.l.o(b,"ended",d);a.l.o(b,"ratechange",function(){var e=a.h.playbackRate;0!=e&&(a.L&&a.L.set(e),e=Xo("ratechange"),a.dispatchEvent(e))});b.remote&&(a.l.o(b.remote,"connect",function(){return sp(a)}),a.l.o(b.remote,"connecting",function(){return sp(a)}),a.l.o(b.remote,"disconnect",function(){return I(function(e){if(1==e.g)return a.j&&"disconnected"==b.remote.state?x(e,Lm(a.j),2):e.B(2);sp(a);H(e)})}));b.audioTracks&&
|
|
(a.l.o(b.audioTracks,"addtrack",function(){return sp(a)}),a.l.o(b.audioTracks,"removetrack",function(){return sp(a)}),a.l.o(b.audioTracks,"change",function(){return sp(a)}));b.textTracks&&(a.l.o(b.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case "metadata":zp(a,e);break;case "chapters":Ap(a,e);break;default:sp(a)}}),a.l.o(b.textTracks,"removetrack",function(){return sp(a)}),a.l.o(b.textTracks,"change",function(){return sp(a)}));"none"!=b.preload&&a.l.sa(b,"loadedmetadata",
|
|
function(){a.A.G=Date.now()/1E3-c})}
|
|
function jp(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E;return I(function(F){switch(F.g){case 1:$o(a,"load"),e=a.h,a.L=new tl({Be:function(){return e.playbackRate},Lc:function(){return e.defaultPlaybackRate},Zg:function(J){e.playbackRate=J},ai:function(J){e.currentTime+=J}}),xp(a,e,b),Io(a,a.g),a.kb=a.g.preferredTextLanguage,a.$d=a.g.preferredTextRole,a.Zd=a.g.preferForcedSubs,Bp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.s.init(function(J,L,K){a.i&&a.j&&J!=a.j.j&&
|
|
Cp(a,J,!0,void 0===L?!1:L,void 0===K?0:K)}),a.s.setMediaElement(e),a.s.setCmsdManager(a.aa),a.j=Dp(a),a.j.configure(a.g.streaming),a.m=Ep,a.dispatchEvent(Xo("streaming")),f=c;case 2:(h=a.j.j)||f||(f=tp(a)?a.s.chooseVariant():null);k=[];g=h||f;l=t([g.video,g.audio]);for(m=l.next();!m.done;m=l.next())(n=m.value)&&!n.segmentIndex&&k.push(n.createSegmentIndex());if(!(0<k.length)){F.B(4);break}return x(F,Promise.all(k),4);case 4:if(!g||0!=g.disabledUntilTime){F.B(2);break}if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(g);
|
|
a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&Za("Low-latency 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.");a.P&&Vn(a.P,a.i.isLowLatency&&a.g.streaming.lowLatencyMode);Bp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);im(a.j,a.g.playRangeStart,a.g.playRangeEnd);p=function(J){a.I=Fp(a,J);a.Db=Gp(a,J);Hp(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};
|
|
a.g.streaming.startAtSegmentBoundary||(r=a.ka,null==r&&a.i.startTime&&(r=a.i.startTime),p(r));if(h){F.B(7);break}if(!a.g.streaming.startAtSegmentBoundary){F.B(8);break}u=a.i.presentationTimeline;v=a.ka||a.h.currentTime;null==a.ka&&a.i.startTime&&(v=a.i.startTime);w=u.rc();z=u.Wb();v<w?v=w:v>z&&(v=z);return x(F,Ip(f,v),9);case 9:y=F.h,p(y);case 8:Cp(a,f,!0,!1,0);case 7:return a.I.ready(),B=a.uc().find(function(J){return J.active}),B||((C=Jg(a.i.textStreams,a.kb,a.$d,a.Zd)[0]||null)&&Bl(a.A.h,C,!0),
|
|
f&&(C?(Jp(a,f.audio,C)&&(a.oa=!0),a.oa&&a.G.setTextVisibility(!0),Kp(a)):a.oa=!1),C&&(a.g.streaming.alwaysStreamText||a.Sc())&&rm(a.j,C)),x(F,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Lp(a));sp(a);tp(a);a.i.variants.some(function(J){return J.primary});if((D=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)G=function(){return Mp(a)},a.l.o(e,"timeupdate",G);D||(A=function(){return Np(a)},
|
|
a.l.o(e,"timeupdate",A),Np(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(E=function(){var J;return I(function(L){if(1==L.g){J=a.xa().end-a.h.currentTime;if(isNaN(J)||!(J<=a.g.streaming.preloadNextUrlWindow))return L.B(0);a.l.Ma(e,"timeupdate",E);return x(L,a.preload(a.i.nextUrl),4)}a.za=L.h;H(L)})},a.l.o(e,"timeupdate",E)),a.l.o(e,"ended",function(){a.load(a.za||a.i.nextUrl)})));if(a.u)a.u.onManifestUpdated(D);a.ra=!0;H(F)}})}
|
|
function hp(a,b){var c,d,e,f,g;return I(function(h){return 1==h.g?(c=Xc,d=Date.now()/1E3,e=!0,a.C=a.dd({ic:a.H,onError:function(k){cp(a,k)},Ue:function(){},onExpirationUpdated:function(){var k=Xo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.A.j=Date.now()/1E3-d)}}),a.C.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?If(b):"",codecs:b?Jf(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ya,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(yf(g.mimeType,
|
|
g.codecs)),b.startsWith("audio/")?(g.type=c.ia,f.audio=g):f.video=g,a.C.Y=!0,x(h,mi(a.C,[f],[]),2)):x(h,a.C.$b(a.h),0)})}
|
|
function kp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return I(function(v){if(1==v.g)return $o(a,"src-equals"),d=a.h,a.I=new jl(d),e=!1,a.Xd.push(function(){e=!0}),null!=a.ka&&a.I.Ef(a.ka),a.L=new tl({Be:function(){return d.playbackRate},Lc:function(){return d.defaultPlaybackRate},Zg:function(w){d.playbackRate=w},ai:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,Hp(a,d,f),d.textTracks&&(up(a),g=function(){var w=Op(a).find(function(z){return"disabled"!==z.mode});w&&(w.mode="showing")},h=
|
|
function(){var w=Op(a).find(function(z){return"disabled"!==z.mode});w&&(w.mode="hidden")},a.l.o(d,"enterpictureinpicture",function(){return g()}),a.l.o(d,"leavepictureinpicture",function(){return h()}),d.remote?(a.l.o(d.remote,"connect",function(){return h()}),a.l.o(d.remote,"connecting",function(){return h()}),a.l.o(d.remote,"disconnect",function(){return h()})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.l.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return h()}),k=d,k.webkitSupportsFullscreen&&
|
|
a.l.o(k,"webkitpresentationmodechanged",function(){"inline"!=k.webkitPresentationMode?g():h()})),xp(a,d,b),l=$n(a.P,a.$,c),!l.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(l+="#t=",0<a.g.playRangeStart&&(l+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(l+=","+a.g.playRangeEnd)),d.src=l,a.K&&window.ManagedMediaSource&&(d.disableRemotePlayback=!1),(fc()||hc())&&d.load(),"none"!=d.preload&&!d.autoplay&&Kf(c)&&pc()&&d.load(),a.m=Pp,a.dispatchEvent(Xo("streaming")),m=new lh,
|
|
al(d,HTMLMediaElement.HAVE_METADATA,a.l,function(){a.I.ready();m.resolve()}),al(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var w,z,y,B,C;return I(function(D){if(1==D.g)return Qp(a),w=Op(a),w.find(function(G){return"disabled"!=G.mode})?(0<w.length&&(a.oa=!0,a.G.setTextVisibility(!0)),D.B(2)):x(D,new Promise(function(G){a.l.sa(d.textTracks,"change",G);(new Zb(G)).X(1)}),2);if(e)return D.return();z=!1;y=t(w);for(B=y.next();!B.done;B=y.next())C=B.value,"disabled"!==C.mode&&(z?(C.mode="disabled",
|
|
Za("Found more than one enabled text track, disabling it",C)):(Rp(a,C),z=!0));Sp(a);H(D)})}),d.error?m.reject(bp(a)):"none"==d.preload&&(Za('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.'),m.resolve()),a.l.sa(d,"error",function(){m.reject(bp(a))}),x(v,Yf(a.g.streaming.loadTimeout,m),2);if((n=a.T())&&(a.g.streaming.liveSync&&
|
|
a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return Mp(a)},a.l.o(d,"timeupdate",p);n||(r=function(){return Np(a)},a.l.o(d,"timeupdate",r),Np(a));a.u&&(a.u.onManifestUpdated(n),n&&(u=a.xa().end,a.l.o(d,"progress",function(){var w=a.xa().end;u!=w&&(a.u.onManifestUpdated(a.T()),u=w)})));a.ra=!0;H(v)})}function Qp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Rg(b,a.g.preferredVariantRole)}
|
|
function Sp(a){var b=a.g.preferredTextLanguage;""!=b&&a.Sg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
function zp(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,pp(a,e.startTime,e.endTime,e.type,e.value),a.u)a.u.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={pc:void 0},f=e.next())g.pc=f.value,"com.apple.quicktime.HLS"==g.pc.type&&null!=g.pc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.pc.startTime&&k.endTime==h.pc.endTime}}(g)),
|
|
f||(f={startTime:g.pc.startTime,endTime:g.pc.endTime,values:[]},d.push(f)),f.values.push(g.pc.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.u&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.u.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new Zb(function(){var d=Tp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Sa().X(.5);
|
|
a.Xd.push(function(){c.stop()})}}function wp(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())pp(a,f,g,"org.id3",k.value);if(a.u)a.u.onHlsTimedMetadata(e,f)}}function pp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Xo("metadata",b))}
|
|
function Ap(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Zb(function(){b.mode="hidden"})).Sa().X(.5);a.Xd.push(function(){c.stop()})}}q.wk=function(){for(var a=this.V;a.g;)a.release()};q.dd=function(a){return new fi(a)};
|
|
function Do(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?cn(b(),!0,e):e()}b||(b=function(){return null});return new vh(function(e,f,g,h){var k=b()?b().i:a.s;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Xo("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
xo(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],xo(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Xo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.P,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)ho(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
h.j?Xn:Wn;break a;case 3:case 2:l=h.j?Zn:Yn;break a;case 5:l="s";break a}l=void 0}h.i=l}ho(h,f,{ot:eo,su:!h.l})}}catch(M){$a("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case Hh:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.T()?"l":"v"};n.ot=lo(k);var p=n.ot===io||n.ot===bo||n.ot===co||n.ot===no,r=k.stream;if(r){var u=h.h.Ua();if(p&&(n.bl=po(h,r.type),n.ot!==no)){var v=qo(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/
|
|
1E3);if(r.segmentIndex&&m){var w=r.segmentIndex.dc(m.endTime,!0,0>u);if(w){var z=w.next().value;if(z&&z!=m){if(!Rd(m.R(),z.R())){var y=z.R()[0],B=f.uris[0],C=new URL(y),D=new URL(B);if(C.origin!==D.origin)var G=y;else{for(var A=C.pathname.split("/").slice(1),E=D.pathname.split("/").slice(1,-1);A[0]===E[0];)A.shift(),E.shift();for(;E.length;)E.shift(),A.unshift("..");G=A.join("/")}n.nor=G}if((z.$a||z.La)&&(m.$a!=z.$a||m.La!=z.La)){var F=z.$a+"-";z.La&&(F+=z.La);n.nrr=F}}}var J=h.h.Ua()||1,L=qo(h,r.type)||
|
|
500,K=r.bandwidth;var O=K?K*(m.endTime-m.startTime)/1E3/(L/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}p&&n.ot!==no&&(n.tb=ro(h,n.ot)/1E3);ho(h,f,n)}}catch(M){$a("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:ho(h,f,{ot:"k"});break;case 4:ho(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.A;g&&(g.Hc=isNaN(g.Hc)?f:g.Hc+f,0===e&&(g.Wh=f))}})}
|
|
function Fp(a,b){return new kl(a.h,a.i,a.g.streaming,b,function(){a.Db&&wl(a.Db,!0);a.j&&a.j.wd();a.O&&Up(a)},function(c){return a.dispatchEvent(c)})}
|
|
function Gp(a,b){b=new qn(a.yc,a.T()||0<b);b.addEventListener("enter",function(d){qp(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){qp(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(qp(a,"timelineregionenter",e),qp(a,"timelineregionexit",e))});var c=new vl(a.h);c.g.add(b);a.wc&&c.g.add(a.wc);return c}
|
|
function Hp(a,b,c){a.O=new eh;a.O.g=gh;hh(a.O,c,Math.min(.5,c/2));ep(a);a.wf=(new Zb(function(){Up(a)})).Ba(.25);a.l.o(b,"waiting",function(){return Up(a)});a.l.o(b,"stalled",function(){return Up(a)});a.l.o(b,"canplaythrough",function(){return Up(a)});a.l.o(b,"progress",function(){return Up(a)})}
|
|
function Up(a){switch(a.m){case Pp:if(a.isEnded())var b=!0;else{var c=kj(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Ep:a:if(a.isEnded()||ik(a.K))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.sc();var d=kj(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=mj(a.h.buffered,a.h.currentTime);c=a.O;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?fh:gh;c.g=d;(b=b!=d)&&d===fh&&(c.h=Date.now());b&&ep(a)}function vp(a,b,c,d){return new dk(a,b,c,d)}
|
|
function Co(a){return new Tn({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Vb:function(){return a.Vb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Ua:function(){return a.Ua()},Jb:function(){return a.Jb()},Lb:function(){return a.Lb()},T:function(){return a.T()}},a.g.cmcd)}
|
|
function Dp(a){return new cm(a.i,{Kd:function(){return a.I?a.I.ke():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Ua:function(){return a.Ua()},na:a.K,ic:a.H,onError:function(b){return cp(a,b)},onEvent:function(b){return a.dispatchEvent(b)},kk:function(){a.J&&a.J.update&&a.J.update()},Gg:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Tc){if(a.I){a.I.bi();var f=nk(a.K,e);!a.T()&&a.h.paused&&null!=f&&0<f&&a.I.ke()<f&&a.I.Ef(f)}Up(a)}d=
|
|
(new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(Xo("segmentappended",d))},jk:function(b,c){(c=c.pd)&&a.wc&&Sl(a.wc,c,b)},uh:function(b,c){var d=a.C;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new di(Hb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;vi(d,"cenc",c);d=
|
|
d.m}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){wp(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
|
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Om(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Bd("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Bd("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(Bd("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&kc(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){Bd("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled=
|
|
c}if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){c=a.streaming.liveSyncMinLatency||0;var d=Math.abs((a.streaming.liveSyncMaxLatency||1)-c)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=c+d;a.streaming.liveSync.targetLatencyTolerance=d}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(Bd("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),
|
|
delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(Bd("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in a.streaming&&(Bd("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency=
|
|
a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.streaming&&"liveSyncTargetLatencyTolerance"in a.streaming&&(Bd("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatencyTolerance=a.streaming.liveSyncTargetLatencyTolerance,delete a.streaming.liveSyncTargetLatencyTolerance);a.streaming&&"liveSyncPlaybackRate"in a.streaming&&(Bd("streaming.liveSyncPlaybackRate",
|
|
"Please Use streaming.liveSync.maxPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.maxPlaybackRate=a.streaming.liveSyncPlaybackRate,delete a.streaming.liveSyncPlaybackRate);a.streaming&&"liveSyncMinPlaybackRate"in a.streaming&&(Bd("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.minPlaybackRate=a.streaming.liveSyncMinPlaybackRate,delete a.streaming.liveSyncMinPlaybackRate);
|
|
a.streaming&&"liveSyncPanicMode"in a.streaming&&(Bd("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(Bd("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold=
|
|
a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){Bd("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var e=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return e};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(Bd("manifest.hls.useSafariBehaviorForLive configuration",
|
|
"Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&
|
|
(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=
|
|
100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));c=an(this.g,a,Bo(this));Vp(this);return c};
|
|
function Vp(a){a.rf=new Qi(a.g,a.ha,a.C);if(a.J){var b=ae(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.C&&a.C.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=Yo&&Si(a.rf,a.i)&&sp(a)}catch(e){cp(a,e)}a.s&&tp(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Go(a)}a.H&&(a.H.Xg(a.g.streaming.forceHTTP),a.H.Yg(a.g.streaming.forceHTTPS),a.H.m=a.g.streaming.minBytesForProgressEvents);a.K&&(a.K.configure(a.g.mediaSource),a.K.ha=a.g.manifest.segmentRelativeVttTiming);
|
|
if(a.G)if(b=a.g.textDisplayFactory,a.ge!=b){var c=a.G;a.G=b();a.G.configure?a.G.configure(a.g.textDisplayer):Bd("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.G.setTextVisibility(c.isTextVisible());c.destroy();if(a.K){c=a.K;var d=a.G;c.Y=d;c.h&&(c.h.j=d)}a.ge=b;a.j&&(b=a.j,(c=b.i.get(Tc))&&pm(b,c.stream,!0,0,!0))}else a.G.configure&&a.G.configure(a.g.textDisplayer);a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),Lp(a));a.O&&(b=a.g.streaming.rebufferingGoal,
|
|
a.i&&(b=Math.max(b,a.i.minBufferTime)),hh(a.O,b,Math.min(.5,b/2)));a.i&&Bp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u&&a.u.configure(a.g.ads);a.P&&a.P.configure(a.g.cmcd);a.aa&&a.aa.configure(a.g.cmsd)}q.getConfiguration=function(){var a=Bo(this);an(a,this.g,Bo(this));return a};q.Mh=function(){var a=Bo(this);an(a,this.g,Bo(this));return Qm(this.g,Bo(this))};
|
|
q.Ih=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.xa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Ak=function(){for(var a in this.g)delete this.g[a];an(this.g,Bo(this),Bo(this));Vp(this)};q.jd=function(){return this.m};q.Ae=function(){return this.i?this.i.type:null};q.zj=function(){return this.h};
|
|
q.Jb=function(){return this.H};q.hd=function(){return this.$};q.xe=function(){return this.u?this.u:null};q.T=function(){return this.i&&!this.eb()?this.i.presentationTimeline.T():this.h&&this.h.src?Infinity==this.h.duration:!1};q.Qc=function(){return this.i?this.i.presentationTimeline.Qc():!1};q.Pc=function(){if(this.i&&!this.eb()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
|
|
q.xa=function(){if(this.i&&!this.eb()){if(!this.ra&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.rc(),end:a.Wb()}}if(this.h&&this.h.src&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};q.Pj=function(){this.T()&&(this.h.currentTime=this.xa().end)};q.Sh=function(){return this.ra};
|
|
q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.C?this.C.g:null};q.Jd=function(){return this.C?this.C.Jd():Infinity};q.jg=function(){return this.C?this.C.jg():[]};q.ze=function(){return this.C?this.C.ze():{}};q.Ge=function(){return this.O?this.O.g==gh:!1};q.Ua=function(){return this.h?this.L?this.L.i:1:0};
|
|
q.Fc=function(a,b){var c=this;b=void 0===b?!0:b;0==a?Za("A trick play rate of 0 is unsupported!"):(this.Ja.Za(),this.L.set(a),this.m==Ep&&(this.s.playbackRateChanged(a),om(this.j,b&&1<Math.abs(a))),this.T()&&this.Ja.o(this.h,"timeupdate",function(){var d=c.h.currentTime,e=c.xa(),f=c.g.streaming.safeSeekOffset;0<a?Math.floor(d)>=Math.floor(e.end)&&c.bd():Math.floor(d)<=Math.floor(e.start+f)&&c.bd()}))};
|
|
q.bd=function(){var a=this.L.Lc();this.m==Pp&&this.L.set(a);this.m==Ep&&(this.L.set(a),this.s.playbackRateChanged(a),om(this.j,!1));this.Ja.Za()};
|
|
q.Lb=function(){if(this.i&&!this.eb()){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Hg(e)){var f=yg(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return Gg(g)}):[]};
|
|
q.uc=function(){if(this.i&&!this.eb()){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=zg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Op(this).map(function(f){return Eg(f)}):[]};q.ye=function(){var a=this.be;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Ag(b)})};
|
|
q.dj=function(a){var b=this,c,d,e,f;return I(function(g){if(1==g.g){if(b.m!=Ep&&b.m!=Pp)return g.return(null);c=b.be;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):x(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Ub(function(h){var k=Wp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Ic;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.og(a,h.startTime+l*m/k))}}),x(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
function Wp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Ic:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
q.og=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return I(function(D){if(1==D.g){if(c.m!=Ep&&c.m!=Pp)return D.return(null);d=c.be;c.i&&(d=c.i.imageStreams);return(e=d.find(function(G){return G.id==a}))?e.segmentIndex?D.B(2):x(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=Wp(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Ic;n=l/h.rows;p=h.Ic*h.rows;r=g.j-g.startTime;
|
|
u=g.C||r/p;v=g.startTime;z=w=0;1<p&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.Ic*m,z=Math.floor(y/h.Ic)*n);B=!1;if(C=g.A)B=!0,n=C.height,w=C.positionX,z=C.positionY,m=C.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:z,startTime:v,duration:u,uris:g.R(),width:m,sprite:B})})};
|
|
q.Tg=function(a){if(this.i&&this.j&&!this.eb()){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.u&&(Bl(this.A.h,b,!1),rm(this.j,b),Xp(this),this.kb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){var c=Op(this);b=c.find(function(d){return"disabled"!==d.mode});c=c.find(function(d){return Cg(d)===a.id});b!==c&&(b&&(b.mode="disabled",this.l.Ma(b,"cuechange"),this.G.remove(0,Infinity)),c&&Rp(this,c));Xp(this)}};
|
|
function Rp(a,b){a.l.o(b,"cuechange",function(){a.G.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c=Array.from(b.activeCues||[]).map(Cn).filter(Xf);a.G.append(c)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
|
|
q.df=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j&&!this.eb()){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&Hg(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Za("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Cp(this,d,!1,b,c);
|
|
this.Ia=new Ug(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);tp(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,Cg(c)==a.id){Yp(this,c);break}};q.fj=function(){return Zp(this.Lb())};q.Gj=function(){return Zp(this.uc())};q.ej=function(){return Array.from($p(this.Lb()))};q.Fj=function(){return Array.from($p(this.uc()))};
|
|
q.Rg=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.I&&!this.eb()){this.Ia=new Vg(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;e=this.Ia.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=
|
|
f.value,Hg(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=yg(c),this.df(a,!0,d)):Go(this))}else this.h&&this.h.audioTracks&&(d=Jg(this.Lb(),a,b||"",!1)[0])&&this.df(d)};q.Sg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.I&&!this.eb()){if(this.kb=a,this.$d=b||"",this.Zd=c,(a=Jg(this.i.textStreams,this.kb,this.$d,this.Zd)[0]||null)&&a!=this.j.u&&(Bl(this.A.h,a,!1),this.g.streaming.alwaysStreamText||this.Sc()))rm(this.j,a),Xp(this)}else(a=Jg(this.uc(),a,b||"",c)[0])&&this.Tg(a)};
|
|
q.Gk=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.I&&!this.eb()){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.Ia=new Vg(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,""),Go(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Yp(this,
|
|
b)}};q.Sc=function(){var a=this.oa;return this.G?this.G.isTextVisible():a};q.Jh=function(){return this.h&&this.h.src&&this.h.textTracks?aq(this).map(function(a){return Eg(a)}):[]};
|
|
q.kg=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=ad(a),c=aq(this).filter(function(h){return ad(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
function Op(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Tp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function aq(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
q.gf=function(a){a=!!a;this.oa!=a&&(this.oa=a,this.m==Ep?(this.G.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=Jg(this.i.textStreams,this.kb,this.$d,this.Zd),0<a.length&&(rm(this.j,a[0]),Xp(this))):nm(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.G.setTextVisibility(a),Kp(this))};
|
|
q.Aj=function(){if(this.I)var a=this.I.ke();else{if(null==this.ka)return new Date;a=this.ka}if(this.i&&!this.eb()){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.Nh=function(){if(this.i&&!this.eb()){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
q.Ce=function(){return this.T()?this.i?this.i.presentationTimeline.Ce():null:null};q.Vb=function(){if(this.m==Ep)return this.K.Vb();var a={total:[],audio:[],video:[],text:[]};this.m==Pp&&(a.total=nj(this.h.buffered));return a};
|
|
q.getStats=function(){if(this.m!=Ep&&this.m!=Pp)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],
|
|
stateHistory:[]};yp(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.T()){var c=this.A;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.I&&(this.A.S=this.I.lh(),this.A.V=this.I.mh());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.A;var d=Number(c.totalVideoFrames);b.P=Number(c.droppedVideoFrames);b.O=d;this.A.M=Number(c.corruptedVideoFrames)}this.C?(c=this.C,c=c.J?c.J:NaN):c=NaN;this.A.s=c;if(this.m==Ep){c=this.j.j;b=this.j.u;if(c){d=this.L?this.L.i:1;
|
|
var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.A.A=e}c&&c.video&&(b=this.A,d=c.video.height||NaN,b.m=c.video.width||NaN,b.l=d);this.T()&&(c=this.Nh().valueOf()+1E3*a.currentTime,this.A.C=(Date.now()-c)/1E3);this.i&&(this.A.I=this.i.periodCount,this.A.H=this.i.gapCount,this.i.presentationTimeline&&(this.A.K=this.i.presentationTimeline.h));c=this.s.getBandwidthEstimate();this.A.u=c}this.m==Pp&&(c=this.A,c.Hc=isNaN(c.Hc)?NaN:c.Hc+NaN,c=this.A,b=a.videoHeight||NaN,c.m=a.videoWidth||NaN,c.l=
|
|
b);var f=this.A;a=f.m;c=f.l;b=f.A;d=f.O;e=f.P;var g=f.M,h=f.V,k=f.S,l=f.u,m=f.i,n=f.G,p=f.J,r=f.j,u=yl(f.g,"playing"),v=yl(f.g,"paused"),w=yl(f.g,"buffering"),z=f.s,y=f.C,B=f.K,C=f.Wh,D=f.Hc,G=f.L,A=f.I,E=f.H,F=zl(f.g),J=[];f=t(f.h.g);for(var L=f.next();!L.done;L=f.next())L=L.value,J.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,
|
|
estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:z,liveLatency:y,maxSegmentDuration:B,manifestSizeBytes:C,bytesDownloaded:D,nonFatalErrorCount:G,manifestPeriodCount:A,manifestGapCount:E,stateHistory:F,switchHistory:J}};
|
|
q.Ui=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,z,y,B,C;return I(function(D){switch(D.g){case 1:if(h.m!=Ep&&h.m!=Pp)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&Za("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){D.B(2);break}return x(D,bq(h,a),3);case 3:d=D.h;case 2:k=[];h.u&&(k=h.u.getCuePoints());if(h.m!=Pp){D.B(4);break}g&&(c="forced");return x(D,cq(h,a,b,c,d,f||"",k),5);case 5:l=ad(b);m=h.uc();if(n=m.find(function(G){return ad(G.language)==
|
|
l&&G.label==(f||"")&&G.kind==c}))return sp(h),D.return(n);throw new T(1,2,2012);case 4:p=Xc;r=h.xa();u=r.end-r.start;h.i&&(u=h.i.presentationTimeline.getDuration());if(Infinity==u)throw new T(1,4,4033);if(!k.length){D.B(6);break}return x(D,dq(h,a,h.H,h.g.streaming.retryParameters),7);case 7:v=D.h,w=eq(h,v,d,k),z=new Blob([w],{type:"text/vtt"}),a=gk(z),d="text/vtt";case 6:y={id:h.Bf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:rl(0,u,[a]),mimeType:d||
|
|
"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([yf(d||"",e||"")])};B=yf(y.mimeType,y.codecs);C=Mf(B);if(!C)throw new T(2,2,2014,d);h.i.textStreams.push(y);sp(h);return D.return(zg(y))}})};
|
|
q.Vi=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return I(function(D){switch(D.g){case 1:if(c.m!=Ep&&c.m!=Pp)throw new T(1,7,7004);if(b){D.B(2);break}return x(D,bq(c,a),3);case 3:b=D.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Xc;e=c.xa();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(Infinity==f)throw new T(1,4,4045);return x(D,dq(c,a,c.H,c.g.streaming.retryParameters),4);case 4:g=D.h;h=Nf[b];if(!h)throw new T(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,
|
|
segmentEnd:f,vttOffset:0};m=Hb(g);n=k.parseMedia(m,l,a,[]);p=[];r=t(n);u=r.next();for(v={};!u.done;v={qf:void 0,ed:void 0},u=r.next())v.ed=u.value,v.qf=null,w=function(G){return function(){null==G.qf&&(G.qf=Nc([a],[G.ed.payload]));return G.qf||[]}}(v),z=new fj(v.ed.startTime,v.ed.endTime,w,0,null,null,0,0,Infinity),v.ed.payload.includes("#xywh")&&(y=v.ed.payload.split("#xywh=")[1].split(","),4===y.length&&z.Ai({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],
|
|
10)})),p.push(z);B=b;if(!p.length){D.B(5);break}return x(D,vn(p[0].R()[0],c.H,c.g.manifest.retryParameters),6);case 6:B=D.h;case 5:return C={id:c.Bf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new pl(p),mimeType:B||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Cf,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,
|
|
spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([yf(B||"","")])},c.m==Pp?c.be.push(C):c.i.imageStreams.push(C),sp(c),D.return(Ag(C))}})};
|
|
q.Ti=function(a,b,c){var d=this,e,f,g,h;return I(function(k){switch(k.g){case 1:if(d.m!=Ep&&d.m!=Pp)throw new T(1,7,7004);if(c){k.B(2);break}return x(k,bq(d,a),3);case 3:c=k.h;case 2:return e=[],d.u&&(e=d.u.getCuePoints()),x(k,cq(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Jh();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return x(k,new Promise(function(l,m){d.l.sa(f,"load",l);d.l.sa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return sp(d),k.return(h);case 5:throw new T(1,
|
|
2,2012);}})};function bq(a,b){var c;return I(function(d){switch(d.g){case 1:return ua(d,2),x(d,vn(b,a.H,a.g.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:xa(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
function cq(a,b,c,d,e,f,g){var h,k,l,m;return I(function(n){if(1==n.g)return"text/vtt"!=e||g.length?x(n,dq(a,b,a.H,a.g.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=eq(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=gk(l),e="text/vtt");m=document.createElement("track");var p=a.P,r=b;try{if(p.g.enabled){var u=ao(p);u.ot=oo;u.su=!0;var v=fo(u);var w=go(r,v)}else w=r}catch(z){$a("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),w=r}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function dq(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){e=Hh;f=Ah([b],d);f.method="GET";var k=a.P;try{k.g.enabled&&ho(k,f,{ot:oo,su:!0})}catch(l){$a("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return x(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
function eq(a,b,c,d){var e=Nf[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Hb(b),b=c.parseMedia(b,a,null,[]),Sn(b,d);throw new T(2,2,2014,c);}q.Mk=function(a,b){this.ha.width=a;this.ha.height=b};q.Pg=function(a){if(this.m==Ep){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Nd||d.gb||d.Tb||(d.Nd=!1,mm(b,d,a));b=!0}}else b=!1;return b};
|
|
q.mg=function(){Za("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.wj=function(){return this.Xa};
|
|
q.pj=function(){var a={video:null,audio:null,text:null};if(this.m!=Ep)return a;var b=this.j.j,c=this.h.currentTime;b=t([b.video,b.audio,this.j.u]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==Tc&&(a.text=e)}return a};
|
|
function Bo(a){var b=Xm();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Pg(d))}};b.textDisplayFactory=function(){return!a.uf||pc()&&!document.fullscreenEnabled?HTMLMediaElement.prototype.addTextTrack?new Dn(a.h,"Shaka Player TextTrack"):new Fn:new Jn(a.h,a.uf)};return b}q.ah=function(a){this.uf=a};
|
|
function op(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new sl,l=e.closedCaptions.get(g);h={id:a.Bf++,originalId:g,groupId:null,
|
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Tc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([yf(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
function Ip(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,n,p;return I(function(r){if(1==r.g)return k?x(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.dc(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},x(h,e(c,b),2);if(3!=h.g)return f=h.h,x(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)})}
|
|
function ep(a){var b=a.Ge();if(a.A&&a.O&&a.I){var c=a.L;c.j=b;ul(c);a.P&&(c=a.P,b||c.l||(c.l=!0),c.l&&b&&(c.m=!0),c.s=b);yp(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.je<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.S&&(a.S=Math.min(a.S+ ++a.je*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(Xo("buffering",
|
|
b))}function yp(a){if(a.A&&a.O){var b=a.A.g,c="playing";a.O.g==gh?c="buffering":a.isEnded()?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Xo("statechanged",c)))}}
|
|
function Mp(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Ih();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Fc(d,!1):1==e&&b!==a.L.Lc()&&a.bd()}if(c&&(c=a.xa(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
|
|
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?
|
|
k=Math.max(0,a.i.serviceDescription.targetLatency-d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.S||"number"!==typeof g||(a.S=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ha&&null!==a.S&&"number"===typeof g&&a.je<n&&Date.now()-a.Ha>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
|
|
a.S=Math.max(a.S-(g-f)/2,f+d),a.Ha=Date.now());e&&null!==a.S&&(h=a.S+d,k=a.S-d);g=c.end-a.h.currentTime;d=0;a.m==Pp&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.O.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Fc(m,!1):void 0!=h&&l&&g-d>h?(b!=l&&a.Fc(l,!1),a.Ha=null):void 0!=k&&m&&g-d<k?(b!=m&&a.Fc(m,!1),a.Ha=null):b!==a.L.Lc()&&(a.bd(),a.Ha=Date.now())}}
|
|
function Np(a){if(a.h){var b=function(e,f){var g=void 0===g?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.zf<e?(a.zf=e,!0):!1},c=a.xa();c=c.end-c.start;c=0<c?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=Xo("started");else b(25,c)?d=Xo("firstquartile"):b(50,c)?d=Xo("midpoint"):b(75,c)?d=Xo("thirdquartile"):(b(100,c)&&(d=Xo("complete")),a.g&&Infinity!=a.g.playRangeEnd&&a.isEnded()&&a.h.pause());d&&
|
|
a.dispatchEvent(d)}}}function tp(a){try{Vi(a.rf,a.i)}catch(c){return cp(a,c),!1}var b=Ig(a.i.variants);b=a.Ia.create(b);a.s.setVariants(Array.from(b.values()));return!0}function Go(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=tp(a)?a.s.chooseVariant():null)&&Cp(a,f,e,b,c,d)}
|
|
function Cp(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&qm(a.j,b,d,e,!0);else{var h=a.A.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));qm(a.j,b,d,e,f,c);d=null;g&&(d=yg(g));b=yg(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.M&&ck(a.M,b,a.Ae()),c=Xo("adaptation",c),fq(a,c)):gq(a,d,b)}}
|
|
function Yp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=Gg(c),b=Gg(b),gq(a,c,b))}function Jp(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=ad(a.g.preferredTextLanguage);c=ad(c.language);if(2==a.g.autoShowText)return $c(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=ad(b.language);return $c(c,d)&&!$c(a,c)}Za("Invalid autoShowText setting!");return!1}
|
|
function sp(a){var b=Xo("trackschanged");fq(a,b)}function gq(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&ck(a.M,c,a.Ae());c=Xo("variantchanged",b);fq(a,c)}function Xp(a){var b=Xo("textchanged");fq(a,b)}function Kp(a){var b=Xo("texttrackvisibility");fq(a,b)}function Lp(a){a.g.abr.enabled||Fo(a);var b=(new Map).set("newStatus",a.g.abr.enabled);fq(a,Xo("abrstatuschanged",b))}
|
|
function Fo(a,b){b=void 0===b?!0:b;if(a.m==Ep){a.xf.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&tp(a)}}
|
|
q.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===Yo||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.xf.Ba(1);b=this.Vb().video.reduce(function(h,
|
|
k){return h+k.end-k.start},0);Go(this,!1,b,!0,!1);return!0}return!1};
|
|
function cp(a,b){var c,d,e,f;return I(function(g){switch(g.g){case 1:if(a.m==Yo)return g.return();1===b.severity&&a.A.L++;c=!0;if(!(a.ra&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){g.B(2);break}ua(g,3);return x(g,Lm(a.j),5);case 5:d=g.h;c=!d;d&&(e=Xo("mediasourcerecovered"),a.dispatchEvent(e));wa(g,2);break;case 3:xa(g),c=!0;case 2:if(!c)return g.return();2===b.severity&&Fo(a,!1);f=Xo("error",(new Map).set("detail",b));a.dispatchEvent(f);f.defaultPrevented&&(b.handled=!0);
|
|
H(g)}})}q.addFont=function(a,b){var c,d,e,f,g;return I(function(h){if(1==h.g)return"fonts"in document&&"FontFace"in window?x(h,document.fonts.ready,3):h.B(0);if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();!1===m.done;)l.push(m.value),m=k.next();return l};d=t(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family==a&&"swap"==f.display)return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);H(h)})};
|
|
function qp(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(Xo(b,a))}
|
|
function rp(a,b,c,d){d=void 0===d?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(Xo(d?"audiotrackchanged":"mediaqualitychanged",b))}
|
|
function bp(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}function Bp(a,b,c){0<b&&(a.T()||a.Ci(b));b=a.getDuration();c<b&&(a.T()||a.zb(c))}function fq(a,b){I(function(c){if(1==c.g)return x(c,Promise.resolve(),2);a.m!=Yo&&a.dispatchEvent(b);H(c)})}
|
|
function $p(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(ad(c.language)):b.add("und");return b}
|
|
function Zp(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=ad(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
h.push({language:l,role:m,label:n})}});return h}q.eb=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};q.isEnded=function(){return!this.h||this.h.ended?!0:this.ra&&!this.T()&&this.h.currentTime>=this.xa().end};P("shaka.Player",W);W.prototype.isEnded=W.prototype.isEnded;W.prototype.isRemotePlayback=W.prototype.eb;W.prototype.addFont=W.prototype.addFont;W.prototype.setVideoContainer=W.prototype.ah;W.prototype.getFetchedPlaybackInfo=W.prototype.pj;
|
|
W.prototype.getManifestParserFactory=W.prototype.wj;W.prototype.getManifest=W.prototype.mg;W.prototype.retryStreaming=W.prototype.Pg;W.prototype.setMaxHardwareResolution=W.prototype.Mk;W.prototype.addChaptersTrack=W.prototype.Ti;W.prototype.addThumbnailsTrack=W.prototype.Vi;W.prototype.addTextTrackAsync=W.prototype.Ui;W.prototype.getStats=W.prototype.getStats;W.prototype.getBufferedInfo=W.prototype.Vb;W.prototype.getSegmentAvailabilityDuration=W.prototype.Ce;
|
|
W.prototype.getPresentationStartTimeAsDate=W.prototype.Nh;W.prototype.getPlayheadTimeAsDate=W.prototype.Aj;W.prototype.setTextTrackVisibility=W.prototype.gf;W.prototype.getChapters=W.prototype.kg;W.prototype.getChaptersTracks=W.prototype.Jh;W.prototype.isTextTrackVisible=W.prototype.Sc;W.prototype.selectVariantsByLabel=W.prototype.Gk;W.prototype.selectTextLanguage=W.prototype.Sg;W.prototype.selectAudioLanguage=W.prototype.Rg;W.prototype.getTextLanguages=W.prototype.Fj;
|
|
W.prototype.getAudioLanguages=W.prototype.ej;W.prototype.getTextLanguagesAndRoles=W.prototype.Gj;W.prototype.getAudioLanguagesAndRoles=W.prototype.fj;W.prototype.selectVariantTrack=W.prototype.df;W.prototype.selectTextTrack=W.prototype.Tg;W.prototype.getThumbnails=W.prototype.og;W.prototype.getAllThumbnails=W.prototype.dj;W.prototype.getImageTracks=W.prototype.ye;W.prototype.getTextTracks=W.prototype.uc;W.prototype.getVariantTracks=W.prototype.Lb;W.prototype.cancelTrickPlay=W.prototype.bd;
|
|
W.prototype.trickPlay=W.prototype.Fc;W.prototype.getPlaybackRate=W.prototype.Ua;W.prototype.isBuffering=W.prototype.Ge;W.prototype.getKeyStatuses=W.prototype.ze;W.prototype.getActiveSessionsMetadata=W.prototype.jg;W.prototype.getExpiration=W.prototype.Jd;W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.keySystem=W.prototype.keySystem;W.prototype.isFullyLoaded=W.prototype.Sh;W.prototype.goToLive=W.prototype.Pj;W.prototype.seekRange=W.prototype.xa;W.prototype.isAudioOnly=W.prototype.Pc;
|
|
W.prototype.isInProgress=W.prototype.Qc;W.prototype.isLive=W.prototype.T;W.prototype.getAdManager=W.prototype.xe;W.prototype.getAssetUri=W.prototype.hd;W.prototype.getNetworkingEngine=W.prototype.Jb;W.prototype.getMediaElement=W.prototype.zj;W.prototype.getManifestType=W.prototype.Ae;W.prototype.getLoadMode=W.prototype.jd;W.prototype.resetConfiguration=W.prototype.Ak;W.prototype.getBufferFullness=W.prototype.Ih;W.prototype.getNonDefaultConfiguration=W.prototype.Mh;W.prototype.getConfiguration=W.prototype.getConfiguration;
|
|
W.prototype.configure=W.prototype.configure;W.prototype.releaseAllMutexes=W.prototype.wk;W.prototype.destroyAllPreloads=W.prototype.Tf;W.prototype.preload=W.prototype.preload;W.prototype.detachAndSavePreload=W.prototype.Eh;W.prototype.unloadAndSavePreload=W.prototype.Rk;W.prototype.load=W.prototype.load;W.prototype.updateStartTime=W.prototype.Vk;W.prototype.unload=W.prototype.mc;W.prototype.detach=W.prototype.detach;W.prototype.attachCanvas=W.prototype.ph;W.prototype.attach=W.prototype.$b;
|
|
W.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:b={};if(!a){k.B(2);break}return x(k,Ni(),3);case 3:b=k.h;case 2:var l={};if($b())for(var m in Zi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=$b()?!!Zi[n]:ac(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ha(zf));
|
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Mf(n)?!0:$b()?xd(n)||(sf(n)?!0:!1):ac(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return x(k,wc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=hq;for(h in g)f[h]=g[h]();return k.return(f)}})};W.isBrowserSupported=Zo;W.setAdManagerFactory=function(a){Eo=a};W.registerSupportPlugin=function(a,b){hq[a]=b};W.prototype.destroy=W.prototype.destroy;var Yo=0,Ao=1,Ep=2,Pp=3;
|
|
W.LoadMode={DESTROYED:Yo,NOT_LOADED:Ao,MEDIA_SOURCE:Ep,SRC_EQUALS:Pp};W.version="v4.11.21";var iq=["4","11"];Cd=new function(a){this.g=a;this.i=Dd;this.h=Ed}(new Ad(Number(iq[0]),Number(iq[1])));var hq={},Eo=null;function jq(){this.g=[];this.i=this.l=this.j=this.h=0}function kq(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function lq(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new rd;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=lq.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};
|
|
q.isPaused=function(){return this.i};q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",lq);lq.prototype.release=lq.prototype.release;
|
|
lq.prototype.getPodIndex=lq.prototype.getPodIndex;lq.prototype.getTimeOffset=lq.prototype.getTimeOffset;lq.prototype.getMediaUrl=lq.prototype.getMediaUrl;lq.prototype.getAdvertiserName=lq.prototype.getAdvertiserName;lq.prototype.getCreativeAdId=lq.prototype.getCreativeAdId;lq.prototype.getAdId=lq.prototype.getAdId;lq.prototype.getVastMediaWidth=lq.prototype.getVastMediaWidth;lq.prototype.getVastMediaHeight=lq.prototype.getVastMediaHeight;lq.prototype.getVastMediaBitrate=lq.prototype.getVastMediaBitrate;
|
|
lq.prototype.getDescription=lq.prototype.getDescription;lq.prototype.getTitle=lq.prototype.getTitle;lq.prototype.getPositionInSequence=lq.prototype.getPositionInSequence;lq.prototype.getSequenceLength=lq.prototype.getSequenceLength;lq.prototype.setMuted=lq.prototype.setMuted;lq.prototype.resize=lq.prototype.resize;lq.prototype.isLinear=lq.prototype.isLinear;lq.prototype.isMuted=lq.prototype.isMuted;lq.prototype.setVolume=lq.prototype.setVolume;lq.prototype.getVolume=lq.prototype.getVolume;
|
|
lq.prototype.play=lq.prototype.play;lq.prototype.pause=lq.prototype.pause;lq.prototype.skip=lq.prototype.skip;lq.prototype.canSkipNow=lq.prototype.canSkipNow;lq.prototype.getTimeUntilSkippable=lq.prototype.getTimeUntilSkippable;lq.prototype.isSkippable=lq.prototype.isSkippable;lq.prototype.isPaused=lq.prototype.isPaused;lq.prototype.getRemainingTime=lq.prototype.getRemainingTime;lq.prototype.getMinSuggestedDuration=lq.prototype.getMinSuggestedDuration;lq.prototype.getDuration=lq.prototype.getDuration;
|
|
lq.prototype.isClientRendering=lq.prototype.isClientRendering;lq.prototype.needsSkipUI=lq.prototype.needsSkipUI;function mq(){}
|
|
function nq(a,b){var c=[],d=0;null!=b&&(d=b);a=t(le(a,"Ad"));for(var e=a.next();!e.done;e=a.next())if(e=re(e.value,"InLine"))if(e=re(e,"Creatives")){e=t(le(e,"Creative"));for(var f=e.next();!f.done;f=e.next()){var g=re(f.value,"Linear");if(g&&(f=null,g.attributes.skipoffset&&(f=$d(g.attributes.skipoffset),isNaN(f)&&(f=null)),g=re(g,"MediaFiles"))){var h=le(g,"MediaFile");g=h;h=h.filter(function(k){return"streaming"==k.attributes.delivery});h.length&&(g=h);g=g.sort(function(k,l){return(parseInt(l.attributes.height,10)||
|
|
0)-(parseInt(k.attributes.height,10)||0)});g=t(g);for(h=g.next();!h.done;h=g.next())if(h=me(h.value)){c.push({id:null,startTime:d,endTime:null,uri:h,isSkippable:null!=f,skipOffset:f,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1});break}}}}return c}P("shaka.ads.Utils",mq);mq.ADS_LOADED="ads-loaded";mq.AD_STARTED="ad-started";mq.AD_FIRST_QUARTILE="ad-first-quartile";mq.AD_MIDPOINT="ad-midpoint";mq.AD_THIRD_QUARTILE="ad-third-quartile";
|
|
mq.AD_COMPLETE="ad-complete";mq.AD_STOPPED="ad-stopped";mq.AD_SKIPPED="ad-skipped";mq.AD_VOLUME_CHANGED="ad-volume-changed";mq.AD_MUTED="ad-muted";mq.AD_PAUSED="ad-paused";mq.AD_RESUMED="ad-resumed";mq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";mq.CUEPOINTS_CHANGED="ad-cue-points-changed";mq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";mq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";mq.AD_CLICKED="ad-clicked";mq.AD_PROGRESS="ad-progress";mq.AD_BUFFERING="ad-buffering";
|
|
mq.AD_IMPRESSION="ad-impression";mq.AD_DURATION_CHANGED="ad-duration-changed";mq.AD_CLOSED="ad-closed";mq.AD_LOADED="ad-loaded";mq.ALL_ADS_COMPLETED="all-ads-completed";mq.AD_LINEAR_CHANGED="ad-linear-changed";mq.AD_METADATA="ad-metadata";mq.AD_RECOVERABLE_ERROR="ad-recoverable-error";mq.AD_ERROR="ad-error";mq.AD_BREAK_READY="ad-break-ready";mq.AD_INTERACTION="ad-interaction";mq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";mq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";
|
|
mq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function oq(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.A=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new rd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.11.21");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
|
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){pq(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){qq(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.sa(this.i,"play",function(){f.H=!0})}oq.prototype.configure=function(a){this.s=a};oq.prototype.stop=function(){this.g&&this.g.stop();this.u&&In(this.u)};
|
|
oq.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.G.destroy()};function qq(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new S("ad-error",b));rq(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
function pq(a,b){a.l(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.C);a.l(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}sq(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,tq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,tq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
a.i.offsetHeight,tq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,tq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.s.skipPlayDetection?a.g.start():a.h.sa(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){rq(a,null)}}
|
|
function tq(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
function sq(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new S(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){qq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){uq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){uq(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,
|
|
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){rq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){rq(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")});
|
|
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&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,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,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 uq(a,b){var c=b.getAd();c?(a.j=new lq(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.s.supportsMultipleMediaElements||a.l(new S("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new S("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Za("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
function rq(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new S("ad-content-resume-requested"));a.l(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function vq(a,b,c,d,e,f){this.g=a;this.h=b;this.j=c;this.l=d;this.m=e;this.i=f}q=vq.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!0};q.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h};
|
|
q.getTimeUntilSkippable=function(){if(this.h){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.l()};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};q.getSequenceLength=function(){return this.m};q.getPositionInSequence=function(){return this.i};q.getTitle=function(){return""};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return""};q.getCreativeAdId=function(){return""};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};
|
|
q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.g=null};P("shaka.ads.InterstitialAd",vq);vq.prototype.release=vq.prototype.release;vq.prototype.getPodIndex=vq.prototype.getPodIndex;vq.prototype.getTimeOffset=vq.prototype.getTimeOffset;vq.prototype.getMediaUrl=vq.prototype.getMediaUrl;vq.prototype.getAdvertiserName=vq.prototype.getAdvertiserName;vq.prototype.getCreativeAdId=vq.prototype.getCreativeAdId;vq.prototype.getAdId=vq.prototype.getAdId;
|
|
vq.prototype.getVastMediaWidth=vq.prototype.getVastMediaWidth;vq.prototype.getVastMediaHeight=vq.prototype.getVastMediaHeight;vq.prototype.getVastMediaBitrate=vq.prototype.getVastMediaBitrate;vq.prototype.getDescription=vq.prototype.getDescription;vq.prototype.getTitle=vq.prototype.getTitle;vq.prototype.getPositionInSequence=vq.prototype.getPositionInSequence;vq.prototype.getSequenceLength=vq.prototype.getSequenceLength;vq.prototype.setMuted=vq.prototype.setMuted;vq.prototype.resize=vq.prototype.resize;
|
|
vq.prototype.isLinear=vq.prototype.isLinear;vq.prototype.isMuted=vq.prototype.isMuted;vq.prototype.setVolume=vq.prototype.setVolume;vq.prototype.getVolume=vq.prototype.getVolume;vq.prototype.play=vq.prototype.play;vq.prototype.pause=vq.prototype.pause;vq.prototype.skip=vq.prototype.skip;vq.prototype.canSkipNow=vq.prototype.canSkipNow;vq.prototype.getTimeUntilSkippable=vq.prototype.getTimeUntilSkippable;vq.prototype.isSkippable=vq.prototype.isSkippable;vq.prototype.isPaused=vq.prototype.isPaused;
|
|
vq.prototype.getRemainingTime=vq.prototype.getRemainingTime;vq.prototype.getMinSuggestedDuration=vq.prototype.getMinSuggestedDuration;vq.prototype.getDuration=vq.prototype.getDuration;vq.prototype.isClientRendering=vq.prototype.isClientRendering;vq.prototype.needsSkipUI=vq.prototype.needsSkipUI;function wq(a,b,c,d){function e(){if(!f.J&&f.j&&!f.C.eb()){f.j=f.g.currentTime;f.l&&!f.l.pre&&!f.l.post&&f.j<f.l.startTime&&(f.l=null);var k=xq(f);k&&yq(f,k,1,1,Date.now())}}var f=this;this.O=null;this.I=a;this.C=b;this.g=c;this.H=null;this.A=!0;this.m=this.g;this.i=d;this.K=new Set;this.G=new Set;this.u=new Map;this.h=new W;zq(this);this.L=new rd;this.s=new rd;this.J=!1;this.l=this.j=null;this.L.o(this.g,"timeupdate",function(){if(!(f.J||f.j||f.C.eb())){f.j=f.g.currentTime;var k=xq(f,!0);k&&yq(f,
|
|
k,1,1,Date.now())}});this.L.o(this.g,"ended",function(){e()});this.M=new Zb(e);if("requestVideoFrameCallback"in this.g&&!sc()){var g=this.g,h=function(){e();g.requestVideoFrameCallback(h)};g.requestVideoFrameCallback(h)}else this.M.Ba(.025);this.P=(new Zb(function(){var k,l,m,n,p,r,u,v,w,z,y;return I(function(B){switch(B.g){case 1:if(!f.G.size||null==f.j){B.B(0);break}k=f.C.jd();if(k==Yo||k==Ao)return B.return();l=!1;m=Array.from(f.G);n=f.C.xa();p=t(m);r=p.next();case 3:if(r.done){B.B(5);break}u=
|
|
r.value;if(u==f.l){B.B(4);break}v=u.endTime||u.startTime;if(!(1<=n.start-v)){w=u.startTime-f.j;0<w&&10>=w&&(f.u.has(u)||f.u.set(u,f.h.preload(u.uri)));B.B(4);break}if(!f.u.has(u)){B.B(7);break}return x(B,f.u.get(u),8);case 8:(z=B.h)&&z.destroy(),f.u.delete(u);case 7:y=JSON.stringify(u),f.K.has(y)&&f.K.delete(y),f.G.delete(u),l=!0;case 4:r=p.next();B.B(3);break;case 5:l&&Aq(f),H(B)}})})).Ba(1)}wq.prototype.configure=function(a){this.O=a;Bq(this)};
|
|
function Bq(a){if(a.I&&a.O&&!a.J){var b=a.O.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.A==b&&(a.A=!b,a.A?(a.m=a.g,a.H&&(a.H.parentElement&&a.I.removeChild(a.H),a.H=null)):(a.H||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.backgroundColor="rgb(0, 0, 0)",b.setAttribute("playsinline",""),a.H=b),a.m=a.H))}}
|
|
wq.prototype.stop=function(){this.s&&this.s.Za();this.K.clear();this.G.clear();this.h.Tf();this.u.clear();this.h.detach();this.J=!1;this.l=this.j=null};wq.prototype.release=function(){this.stop();this.L&&this.L.release();this.s&&this.s.release();this.I&&In(this.I);this.M&&(this.M.stop(),this.M=null);this.P&&(this.P.stop(),this.P=null);this.h.destroy()};function Cq(a,b){var c;I(function(d){if(1==d.g)return zq(a),x(d,Dq(a,b),2);c=d.h;c.length?Eq(a,c):Za("Unsupported HLS interstitial",b);H(d)})}
|
|
wq.prototype.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return c={type:12},x(n,Fq(b,a,c),2);case 2:d=n.h;e=de(d,"VAST,vmap:VMAP");if(!e)throw new T(2,10,10007);f=[];if("VAST"==e.tagName){f=nq(e,b.j);n.B(3);break}if("vmap:VMAP"!=e.tagName){n.B(3);break}for(var p=[],r=t(le(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var v=u.value,w=v.attributes.timeOffset;w&&(u=null,"start"==w?u=0:"end"==w?u=Infinity:u=$d(w),(v=re(v,"vmap:AdSource"))&&
|
|
(v=re(v,"vmap:AdTagURI"))&&(v=me(v))&&p.push({time:u,uri:v}))}g=t(p);h=g.next();case 5:if(h.done){n.B(3);break}k=h.value;return x(n,Fq(b,k.uri,c),8);case 8:l=n.h;m=de(l,"VAST");if(!m)throw new T(2,10,10007);f.push.apply(f,ha(nq(m,k.time)));h=g.next();n.B(5);break;case 3:Eq(b,f),H(n)}})};
|
|
function Eq(a,b){var c=!1;b=t(b);for(var d=b.next();!d.done;d=b.next()){d=d.value;var e=d.id||JSON.stringify(d);if(!a.K.has(e)){c=!0;a.K.add(e);a.G.add(d);e=!1;if(d.pre&&null==a.j)e=!0;else if(0==d.startTime&&!d.canJump)e=!0;else if(null!=a.j){var f=d.startTime-a.j;0<f&&10>=f&&(e=!0)}e&&(a.u.has(d)||a.u.set(d,a.h.preload(d.uri)))}}c&&Aq(a)}
|
|
function xq(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.G.size&&null!=a.j){var f=a.g.ended,g=Array.from(a.G).sort(function(m,n){return n.startTime-m.startTime}),h=g;h=b?g.filter(function(m){return m.pre}):f?g.filter(function(m){return m.post}):g.filter(function(m){return!m.pre&&!m.post});g=t(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.j-Math.round(1E3*h.startTime)/1E3;0<l&&(1>=l||!h.canJump)&&(k=null==
|
|
c&&a.l&&!a.l.pre&&!a.l.post&&a.l.startTime>=h.startTime?!1:!0)}k&&(!a.l||h.startTime>=a.l.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001<Math.round(1E3*h.startTime)/1E3-Math.round(1E3*e.startTime)/1E3&&(e=h,d=0),d++)}}return e}
|
|
function yq(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D;I(function(G){switch(G.g){case 1:Bq(a);a.l=b;g=Date.now();!a.m.parentElement&&a.I&&a.I.appendChild(a.m);1==d&&1==c&&(c=Array.from(a.G).filter(function(A){return b.pre?A.pre==b.pre:b.post?A.post==b.post:.001>Math.abs(A.startTime-b.startTime)}).length);b.once&&(f++,a.G.delete(b),Aq(a));a.J=!0;if(!a.A||1!=d){G.B(2);break}a.i(new S("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new lh;k=function(A){return I(function(E){if(1==
|
|
E.g)return"detach"!=A.state?E.B(0):sc()?x(E,new Promise(function(F){return(new Zb(F)).X(.1)}),3):E.B(3);h.resolve();a.s.Ma(a.C,"onstatechange",k);H(E)})};a.s.o(a.C,"onstatechange",k);return x(G,h,2);case 2:return a.A||(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset)),l=!1,m=null,n=function(){if(!a.A&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&Infinity!=b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var A=Date.now();a.g.currentTime+=
|
|
(A-e)/1E3;e=A}},p=function(){var A,E;return I(function(F){if(1==F.g){n();m&&m.stop();if(A=xq(a,b.pre,d-f))return a.i(new S("ad-stopped")),a.s.Za(),yq(a,A,c,++d,e,f),F.B(0);b.post&&(a.j=null,a.l=null);return a.A?x(F,a.h.detach(),4):x(F,a.h.mc(),4)}a.A&&(E=b.resumeOffset,null==E&&(E=b.timelineRange&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.j||0):(Date.now()-e)/1E3),a.i(new S("ad-content-resume-requested",(new Map).set("offset",E))));a.i(new S("ad-stopped"));a.s.Za();a.J=!1;a.A?Aq(a):(n(),a.g.ended||
|
|
a.g.play());Bq(a);H(F)})},r=function(A){return I(function(E){if(l)return E.return();l=!0;a.i(new S("ad-error",(new Map).set("originalEvent",A)));return x(E,p(),0)})},u=function(){return I(function(A){if(1==A.g){if(l)return A.return();l=!0;return x(A,p(),2)}a.i(new S("ad-complete"));H(A)})},v=function(){return I(function(A){if(l)return A.return();l=!0;a.i(new S("ad-skipped"));return x(A,p(),0)})},w=new vq(a.m,b.isSkippable,b.skipOffset,v,c,d),a.A||(w.setMuted(a.g.muted),w.setVolume(a.g.volume)),a.i(new S("ad-started",
|
|
(new Map).set("ad",w))),w.canSkipNow()&&a.i(new S("ad-skip-state-changed")),z=new Set,a.s.sa(a.h,"error",r),a.s.o(a.m,"timeupdate",function(){var A=a.m.duration;A&&(b.isSkippable&&b.skipOffset&&w.canSkipNow()&&0<w.getRemainingTime()&&0<w.getDuration()&&a.i(new S("ad-skip-state-changed")),A=100*a.m.currentTime/A,25<=A&&!z.has("firstquartile")?(n(),a.i(new S("ad-first-quartile")),z.add("firstquartile")):50<=A&&!z.has("midpoint")?(n(),a.i(new S("ad-midpoint")),z.add("midpoint")):75<=A&&!z.has("thirdquartile")&&
|
|
(n(),a.i(new S("ad-third-quartile")),z.add("thirdquartile")))}),a.s.sa(a.h,"complete",u),a.s.o(a.m,"play",function(){a.i(new S("ad-resumed"))}),a.s.o(a.m,"pause",function(){var A=a.h.getConfiguration();a.m.currentTime>=A.playRangeEnd?u():a.i(new S("ad-paused"))}),a.s.o(a.m,"volumechange",function(){a.m.muted?a.i(new S("ad-muted")):a.i(new S("ad-volume-changed"))}),ua(G,4),zq(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(y=b.endTime-b.startTime,0<y&&a.h.configure("playRangeEnd",
|
|
y)),b.playoutLimit&&(m=(new Zb(function(){w.skip()})).X(b.playoutLimit),a.h.configure("playRangeEnd",b.playoutLimit)),x(G,a.h.$b(a.m),6);case 6:return a.u.has(b)?x(G,a.u.get(b),10):x(G,a.h.load(b.uri),8);case 10:return B=G.h,a.u.delete(b),B?x(G,a.h.load(B),8):x(G,a.h.load(b.uri),8);case 8:b.playoutLimit&&(m&&m.stop(),m=(new Zb(function(){w.skip()})).X(b.playoutLimit));C=(Date.now()-g)/1E3;a.i(new S("ads-loaded",(new Map).set("loadTime",C)));a.A&&a.g.play();wa(G,0);break;case 4:D=xa(G),r(D),H(G)}})}
|
|
function Dq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N,R,Q,Y,ia;return I(function(X){switch(X.g){case 1:c=[];if(!b)return X.return(c);d=b.values.find(function(ja){return"X-ASSET-URI"==ja.key});e=b.values.find(function(ja){return"X-ASSET-LIST"==ja.key});if(!d&&!e)return X.return(c);f=null;if(g=b.values.find(function(ja){return"ID"==ja.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"==typeof b.endTime&&(k=null==
|
|
f?Math.floor(10*b.endTime)/10:b.endTime);l=b.values.find(function(ja){return"X-RESTRICT"==ja.key});n=m=!0;l&&l.data&&(p=l.data,m=!p.includes("SKIP"),n=!p.includes("JUMP"));r=null;if(u=b.values.find(function(ja){return"X-RESUME-OFFSET"==ja.key}))v=u.data,r=parseFloat(v),isNaN(r)&&(r=null);w=null;if(z=b.values.find(function(ja){return"X-PLAYOUT-LIMIT"==ja.key}))y=z.data,w=parseFloat(y),isNaN(w)&&(w=null);D=C=B=!1;if(G=b.values.find(function(ja){return"CUE"==ja.key}))A=G.data,B=A.includes("ONCE"),C=
|
|
A.includes("PRE"),D=A.includes("POST");E=!1;(F=b.values.find(function(ja){return"X-TIMELINE-OCCUPIES"==ja.key}))?(J=F.data,E=J.includes("RANGE")):!u&&a.C.T()&&(E=!C&&!D);if(d){L=d.data;if(!L)return X.return(c);c.push({id:f,startTime:h,endTime:k,uri:L,isSkippable:m,skipOffset:m?0:null,canJump:n,resumeOffset:r,playoutLimit:w,once:B,pre:C,post:D,timelineRange:E});X.B(2);break}if(!e){X.B(2);break}K=e.data;if(!K)return X.return(c);ua(X,4);O={type:11};return x(X,Fq(a,K,O),6);case 6:M=X.h;N=yc(M);R=JSON.parse(N);
|
|
Q=t(R.ASSETS);for(Y=Q.next();!Y.done;Y=Q.next())ia=Y.value,ia.URI&&c.push({id:f,startTime:h,endTime:k,uri:ia.URI,isSkippable:m,skipOffset:m?0:null,canJump:n,resumeOffset:r,playoutLimit:w,once:B,pre:C,post:D,timelineRange:E});wa(X,2);break;case 4:xa(X);case 2:return X.return(c)}})}
|
|
function Aq(a){for(var b=[],c=t(a.G),d=c.next(),e={};!d.done;e={lc:void 0},d=c.next())d=d.value,e.lc={start:d.startTime,end:null},d.pre?(e.lc.start=0,e.lc.end=null):d.post?(e.lc.start=-1,e.lc.end=null):d.timelineRange&&(e.lc.end=d.endTime),b.find(function(f){return function(g){return f.lc.start==g.start&&f.lc.end==g.end}}(e))||b.push(e.lc);a.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
|
|
function zq(a){a.h.configure(a.C.Mh());a.h.configure("ads.disableHLSInterstitial",!0);a.h.configure("ads.disableDASHInterstitial",!0);var b=a.h.Jb();b.yh();b.Ah();zh(a.C.Jb(),b)}function Fq(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=Ah([b],jh()),e=a.C.Jb().request(7,d,c),x(g,e.promise,2);f=g.h;return g.return(f.data)})};function Gq(a,b,c,d,e){this.h=a;this.j=$d(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.s=d;this.m=!1}q=Gq.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!1};q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};q.isPaused=function(){return this.g.paused};
|
|
q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;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 this.s};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};
|
|
q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",Gq);Gq.prototype.release=Gq.prototype.release;Gq.prototype.getPodIndex=Gq.prototype.getPodIndex;Gq.prototype.getTimeOffset=Gq.prototype.getTimeOffset;
|
|
Gq.prototype.getMediaUrl=Gq.prototype.getMediaUrl;Gq.prototype.getAdvertiserName=Gq.prototype.getAdvertiserName;Gq.prototype.getCreativeAdId=Gq.prototype.getCreativeAdId;Gq.prototype.getAdId=Gq.prototype.getAdId;Gq.prototype.getVastMediaWidth=Gq.prototype.getVastMediaWidth;Gq.prototype.getVastMediaHeight=Gq.prototype.getVastMediaHeight;Gq.prototype.getVastMediaBitrate=Gq.prototype.getVastMediaBitrate;Gq.prototype.getDescription=Gq.prototype.getDescription;Gq.prototype.getTitle=Gq.prototype.getTitle;
|
|
Gq.prototype.getPositionInSequence=Gq.prototype.getPositionInSequence;Gq.prototype.getSequenceLength=Gq.prototype.getSequenceLength;Gq.prototype.setMuted=Gq.prototype.setMuted;Gq.prototype.resize=Gq.prototype.resize;Gq.prototype.isLinear=Gq.prototype.isLinear;Gq.prototype.isMuted=Gq.prototype.isMuted;Gq.prototype.setVolume=Gq.prototype.setVolume;Gq.prototype.getVolume=Gq.prototype.getVolume;Gq.prototype.play=Gq.prototype.play;Gq.prototype.pause=Gq.prototype.pause;Gq.prototype.skip=Gq.prototype.skip;
|
|
Gq.prototype.canSkipNow=Gq.prototype.canSkipNow;Gq.prototype.getTimeUntilSkippable=Gq.prototype.getTimeUntilSkippable;Gq.prototype.isSkippable=Gq.prototype.isSkippable;Gq.prototype.isPaused=Gq.prototype.isPaused;Gq.prototype.getRemainingTime=Gq.prototype.getRemainingTime;Gq.prototype.getMinSuggestedDuration=Gq.prototype.getMinSuggestedDuration;Gq.prototype.getDuration=Gq.prototype.getDuration;Gq.prototype.isClientRendering=Gq.prototype.isClientRendering;Gq.prototype.needsSkipUI=Gq.prototype.needsSkipUI;function Hq(a,b,c,d){this.C=a;this.L=b;this.h=c;this.l=null;this.S=NaN;this.i=d;this.K=!1;this.A=null;this.j=[];this.O=[];this.M=this.G=this.g=null;this.H=new Map;this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.s=new rd}Hq.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.Ma(b.target,b.type,b.listener);Iq(this);this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.A=null;this.j=[];this.O=[];this.H.clear()};
|
|
Hq.prototype.release=function(){this.stop();this.s&&this.s.release()};Hq.prototype.onManifestUpdated=function(a){this.K=a;""!=this.I&&(Jq(this,this.I,this.P),this.P=!1)};Hq.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
function Kq(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;I(function(v){if(1==v.g)return d={type:7},e=Ah([b],jh()),e.method="POST",c&&(f=JSON.stringify(c),e.body=Cc(f)),g=a.L.request(7,e,d),ua(v,2),x(v,g.promise,4);if(2!=v.g){h=v.h;k=yc(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new ob(b),n=new ob(l.trackingUrl),a.I=m.resolve(n).toString(),p=Date.now()/1E3,r=p-a.S,a.i(new S("ads-loaded",(new Map).set("loadTime",r))),u=new ob(l.manifestUrl),a.l.resolve(m.resolve(u).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
return wa(v,0)}xa(v);if(!a.J.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,v.return();a.l.resolve(a.J);a.l=null;H(v)})}
|
|
function Jq(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y;I(function(B){if(1==B.g)return d={type:8},e=Ah([b],jh()),f=a.L.request(7,e,d),ua(B,2),x(B,f.promise,4);if(2!=B.g){g=B.h;h=[];k=yc(g.data);l=JSON.parse(k);if(0<l.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=t(a.j);for(n=m.next();!n.done;n=m.next())for(p=n.value,r=t(p.nonLinearAdsList),u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v.nonLinearAdList),z=w.next();!z.done;z=w.next())y=z.value,Lq(a,y);h=a.getCuePoints();
|
|
a.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",h))),Iq(a),a.j=[];c&&(a.K||0<h.length)&&Mq(a);return wa(B,0)}xa(B);H(B)})}
|
|
function Lq(a,b){var c,d,e,f,g,h,k,l,m;I(function(n){if(1==n.g){if(!b.staticResource)return n.return();c=Nq(b);if(d=a.H.get(c))return n.return();e={type:9};f=Ah([b.staticResource],jh());g=a.L.request(7,f,e);ua(n,2);a.H.set(c,[]);return x(n,g.promise,4)}if(2!=n.g)return h=n.h,k=yc(h.data),l=JSON.parse(k),m=l.apps,a.H.set(c,m),wa(n,0);xa(n);a.H.delete(c);H(n)})}
|
|
function Nq(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Mq(a){Oq(a);a.K||(Pq(a),a.s.o(a.h,"seeked",function(){Pq(a)}),a.s.o(a.h,"ended",function(){Iq(a)}));a.s.o(a.h,"timeupdate",function(){Oq(a)})}
|
|
function Pq(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.O.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
function Oq(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.G,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),Qq(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),Qq(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),Qq(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Qq(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Iq(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.O.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Iq(a);a.M=e;a.g=new Gq(g,f+1,e.ads.length,!0,a.h);a.G=g;0===f&&Qq(a,"breakStart");Rq(a);break}}}if(!a.g)for(d=
|
|
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.H.get(Nq(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Iq(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
|
|
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.C.appendChild(m)}a.M=e;a.g=new Gq(g,f+1,e.ads.length,!1,a.h);a.G=g;0===f&&Qq(a,"breakStart");Rq(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
function Iq(a){if(a.g){for(;a.C.lastChild;)a.C.removeChild(a.C.firstChild);a.K||a.O.push(a.G.adId);var b=a.g.m;(void 0===b?0:b)?Qq(a,"skip"):Qq(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.s.Ma(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Qq(a,"breakEnd");a.g=null;a.G=null;a.M=null}}
|
|
function Rq(a){var b=!1;a.h.paused?b=!0:(Qq(a,"impression"),Qq(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Qq(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Qq(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Qq(a,"impression"),Qq(a,"start"),b=!1):Qq(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Qq(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target,
|
|
d.type,d.listener)}
|
|
function Qq(a,b){var c=a.G.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=t(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=Ah([e],jh()),e.method="POST",a.L.request(7,e,d))}switch(b){case "impression":a.i(new S("ad-impression"));break;case "start":a.i(new S("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new S("ad-muted"));break;case "unmute":a.i(new S("ad-volume-changed"));break;
|
|
case "resume":a.i(new S("ad-resumed"));break;case "pause":a.i(new S("ad-paused"));break;case "firstQuartile":a.i(new S("ad-first-quartile"));break;case "midpoint":a.i(new S("ad-midpoint"));break;case "thirdQuartile":a.i(new S("ad-third-quartile"));break;case "complete":a.i(new S("ad-complete"));a.i(new S("ad-stopped"));break;case "skip":a.i(new S("ad-skipped"));a.i(new S("ad-stopped"));break;case "breakStart":a.C.setAttribute("ad-active","true");break;case "breakEnd":a.C.removeAttribute("ad-active");
|
|
break;case "skipStateChanged":a.i(new S("ad-skip-state-changed"))}};function Sq(a,b){this.g=a;this.i=null;this.h=b}q=Sq.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!1};q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};
|
|
q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};
|
|
q.setMuted=function(a){this.h.muted=a};q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd",Sq);Sq.prototype.release=Sq.prototype.release;
|
|
Sq.prototype.getPodIndex=Sq.prototype.getPodIndex;Sq.prototype.getTimeOffset=Sq.prototype.getTimeOffset;Sq.prototype.getMediaUrl=Sq.prototype.getMediaUrl;Sq.prototype.getAdvertiserName=Sq.prototype.getAdvertiserName;Sq.prototype.getCreativeAdId=Sq.prototype.getCreativeAdId;Sq.prototype.getAdId=Sq.prototype.getAdId;Sq.prototype.getVastMediaWidth=Sq.prototype.getVastMediaWidth;Sq.prototype.getVastMediaHeight=Sq.prototype.getVastMediaHeight;Sq.prototype.getVastMediaBitrate=Sq.prototype.getVastMediaBitrate;
|
|
Sq.prototype.getDescription=Sq.prototype.getDescription;Sq.prototype.getTitle=Sq.prototype.getTitle;Sq.prototype.getPositionInSequence=Sq.prototype.getPositionInSequence;Sq.prototype.getSequenceLength=Sq.prototype.getSequenceLength;Sq.prototype.setMuted=Sq.prototype.setMuted;Sq.prototype.resize=Sq.prototype.resize;Sq.prototype.isLinear=Sq.prototype.isLinear;Sq.prototype.isMuted=Sq.prototype.isMuted;Sq.prototype.setVolume=Sq.prototype.setVolume;Sq.prototype.getVolume=Sq.prototype.getVolume;
|
|
Sq.prototype.play=Sq.prototype.play;Sq.prototype.pause=Sq.prototype.pause;Sq.prototype.skip=Sq.prototype.skip;Sq.prototype.canSkipNow=Sq.prototype.canSkipNow;Sq.prototype.getTimeUntilSkippable=Sq.prototype.getTimeUntilSkippable;Sq.prototype.isSkippable=Sq.prototype.isSkippable;Sq.prototype.isPaused=Sq.prototype.isPaused;Sq.prototype.getRemainingTime=Sq.prototype.getRemainingTime;Sq.prototype.getMinSuggestedDuration=Sq.prototype.getMinSuggestedDuration;Sq.prototype.getDuration=Sq.prototype.getDuration;
|
|
Sq.prototype.isClientRendering=Sq.prototype.isClientRendering;Sq.prototype.needsSkipUI=Sq.prototype.needsSkipUI;function Tq(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.I=!1;this.A=this.m=this.s=null;this.C="";this.G=[];this.h=new rd;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Uq(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
|
|
e.j.resolve(e.C):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 Sq(f,e.l);e.A&&(e.m.i=e.A);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
|
|
var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))});
|
|
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
|
|
f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=Tq.prototype;q.configure=function(){};q.stop=function(){this.C="";this.s=null;this.G=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.G};
|
|
function Uq(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.I||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function Vq(){hb.call(this);this.g=this.i=this.j=this.h=null;this.m=new jq;this.s=navigator.language;this.l=null}qa(Vq,hb);q=Vq.prototype;q.setLocale=function(a){this.s=a};q.configure=function(a){this.l=a;this.h&&this.h.configure(this.l);this.j&&this.j.configure(this.l);this.g&&this.g.configure(this.l)};q.initInterstitial=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new wq(a,b,c,function(e){return Wq(d,e)});this.h.configure(this.l)};
|
|
q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.j&&this.j.release();this.j=new oq(a,b,this.s,c,function(e){return Wq(d,e)});this.j.configure(this.l)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);hb.prototype.release.call(this)};
|
|
q.onAssetUnload=function(){this.h&&this.h.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.dispatchEvent(new S("ad-content-attach-requested"));this.m=new jq};q.requestClientSideAds=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.I=Date.now()/1E3;b.m.requestAds(a)};
|
|
q.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};q.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Hq(a,b,c,function(e){return Wq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new T(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new lh,Kq(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
q.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new T(1,10,10005);var b=this.i;b.I=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Tq(a,b,this.s,function(d){return Wq(c,d)});this.g.configure(this.l)};
|
|
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Za('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.11.21";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
(c.I=!0),c.j=new lh,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Za('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.11.21";this.g.g.replaceAdTagParameters(a)};
|
|
q.getServerSideCuePoints=function(){Bd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:kq(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};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)};q.onHLSInterstitialMetadata=function(a,b,c){this.h||this.initInterstitial(null,a,b);this.h&&Cq(this.h,c)};
|
|
q.onDASHInterstitialMetadata=function(a,b,c){if("urn:mpeg:dash:event:alternativeMPD:2022"==c.schemeIdUri&&(this.h||this.initInterstitial(null,a,b),this.h)){a=this.h;b=t(c.eventNode.children);for(var d=b.next();!d.done;d=b.next()){var e=d.value;if("AlternativeMPD"==e.tagName&&(d=e.attributes.uri,e=e.attributes.mode,d)){var f=d;var g=e;break}}f?(b="replace"==g,g="insert"==g,(b||g)&&Eq(a,[{id:c.id,startTime:c.startTime,endTime:c.endTime,uri:f,isSkippable:!1,skipOffset:null,canJump:!0,resumeOffset:g?
|
|
0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:b&&!g}])):Za("Unsupported MPD alternate",c)}};q.addCustomInterstitial=function(a){if(!this.h)throw new T(1,10,10006);Eq(this.h,[a])};q.addAdUrlInterstitial=function(a){if(!this.h)throw new T(1,10,10006);return this.h.addAdUrlInterstitial(a)};
|
|
function Wq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}P("shaka.ads.AdManager",Vq);Vq.prototype.addAdUrlInterstitial=Vq.prototype.addAdUrlInterstitial;Vq.prototype.addCustomInterstitial=Vq.prototype.addCustomInterstitial;Vq.prototype.onDASHInterstitialMetadata=Vq.prototype.onDASHInterstitialMetadata;
|
|
Vq.prototype.onHLSInterstitialMetadata=Vq.prototype.onHLSInterstitialMetadata;Vq.prototype.onCueMetadataChange=Vq.prototype.onCueMetadataChange;Vq.prototype.onHlsTimedMetadata=Vq.prototype.onHlsTimedMetadata;Vq.prototype.onDashTimedMetadata=Vq.prototype.onDashTimedMetadata;Vq.prototype.onManifestUpdated=Vq.prototype.onManifestUpdated;Vq.prototype.getStats=Vq.prototype.getStats;Vq.prototype.getCuePoints=Vq.prototype.getCuePoints;Vq.prototype.getServerSideCuePoints=Vq.prototype.getServerSideCuePoints;
|
|
Vq.prototype.replaceServerSideAdTagParameters=Vq.prototype.replaceServerSideAdTagParameters;Vq.prototype.requestServerSideStream=Vq.prototype.requestServerSideStream;Vq.prototype.initServerSide=Vq.prototype.initServerSide;Vq.prototype.addMediaTailorTrackingUrl=Vq.prototype.addMediaTailorTrackingUrl;Vq.prototype.requestMediaTailorStream=Vq.prototype.requestMediaTailorStream;Vq.prototype.initMediaTailor=Vq.prototype.initMediaTailor;Vq.prototype.updateClientSideAdsRenderingSettings=Vq.prototype.updateClientSideAdsRenderingSettings;
|
|
Vq.prototype.requestClientSideAds=Vq.prototype.requestClientSideAds;Vq.prototype.onAssetUnload=Vq.prototype.onAssetUnload;Vq.prototype.release=Vq.prototype.release;Vq.prototype.initClientSide=Vq.prototype.initClientSide;Vq.prototype.initInterstitial=Vq.prototype.initInterstitial;Vq.prototype.configure=Vq.prototype.configure;Vq.prototype.setLocale=Vq.prototype.setLocale;Vq.ADS_LOADED="ads-loaded";Vq.AD_STARTED="ad-started";Vq.AD_FIRST_QUARTILE="ad-first-quartile";Vq.AD_MIDPOINT="ad-midpoint";
|
|
Vq.AD_THIRD_QUARTILE="ad-third-quartile";Vq.AD_COMPLETE="ad-complete";Vq.AD_STOPPED="ad-stopped";Vq.AD_SKIPPED="ad-skipped";Vq.AD_VOLUME_CHANGED="ad-volume-changed";Vq.AD_MUTED="ad-muted";Vq.AD_PAUSED="ad-paused";Vq.AD_RESUMED="ad-resumed";Vq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Vq.CUEPOINTS_CHANGED="ad-cue-points-changed";Vq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Vq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Vq.AD_CLICKED="ad-clicked";Vq.AD_PROGRESS="ad-progress";
|
|
Vq.AD_BUFFERING="ad-buffering";Vq.AD_IMPRESSION="ad-impression";Vq.AD_DURATION_CHANGED="ad-duration-changed";Vq.AD_CLOSED="ad-closed";Vq.AD_LOADED="ad-loaded";Vq.ALL_ADS_COMPLETED="all-ads-completed";Vq.AD_LINEAR_CHANGED="ad-linear-changed";Vq.AD_METADATA="ad-metadata";Vq.AD_RECOVERABLE_ERROR="ad-recoverable-error";Vq.AD_ERROR="ad-error";Vq.AD_BREAK_READY="ad-break-ready";Vq.AD_INTERACTION="ad-interaction";Vq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Vq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";
|
|
Vq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Eo=function(){return new Vq};function Xq(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
|
|
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(nj(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&1===c.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
function Yq(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=Zq(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
function Zq(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
var $q="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ar="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),br=["loop","playbackRate"],cr=["pause","play"],dr={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1,isEnded:1},er={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},fr={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},gr=[["getConfiguration","configure"]],hr=[["isTextTrackVisible","setTextTrackVisibility"]],ir="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
jr=["attach","attachCanvas","detach","load","unload"];function kr(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new Zb(b);this.M=c;this.u=!1;this.A=d;this.H=e;this.O=f;this.h=this.m=!1;this.K="";this.s=null;this.C=function(){return lr(h)};this.G=function(k,l){k=Yq(l);switch(k.type){case "event":var m=k.targetName,n=Ua(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.M(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
|
|
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;mr.add(this)}q=kr.prototype;q.destroy=function(){mr.delete(this);nr(this);or&&pr(this);this.l&&(this.l.stop(),this.l=null);this.H=this.A=null;this.h=this.m=!1;this.G=this.C=this.j=this.i=this.g=this.s=null;return Promise.resolve()};q.Ra=function(){return this.h};q.Ye=function(){return this.K};
|
|
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Sa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(mr),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new lh;d.u=!0;qr(d,e)}},function(b){for(var c=t(mr),d=c.next();!d.done;d=c.next())d=d.value,rr="available"==b,d.l.Sa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});rr&&this.l.X(sr);(a=or)&&
|
|
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new lh,this.u=!0,qr(this,a)):or=null}else window.__onGCastApiAvailable!==tr&&(ur=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=tr)};q.Ug=function(a){this.s=a;this.h&&vr(this,{type:"appData",appData:this.s})};
|
|
q.cast=function(){var a=this;return I(function(b){if(!a.m)throw new T(1,8,8E3);if(!rr)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new lh;chrome.cast.requestSession(function(c){return qr(a,c)},function(c){return wr(a,c)});return x(b,a.j,0)})};function xr(a){a.h&&chrome.cast.requestSession(function(b){return qr(a,b)},function(b){return wr(a,b)})}q.gd=function(){if(this.h){nr(this);if(or){pr(this);try{or.stop(function(){},function(){})}catch(a){}or=null}lr(this)}};
|
|
q.get=function(a,b){var c=this;if("video"==a){if(cr.includes(b))return function(){return c.li.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))}}else if("player"==a){if(fr[b]&&!this.get("player","isLive")())return function(){};if(ir.includes(b))return function(){return c.li.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(jr.includes(b))return function(){return c.xk.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(dr[b]||er[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
q.set=function(a,b,c){this.g[a][b]=c;vr(this,{type:"set",targetName:a,property:b,value:c})};function qr(a,b){var c=a.O();or=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);lr(a);vr(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function wr(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
|
|
q.li=function(a,b){vr(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.xk=function(a,b){var c=Ga.apply(2,arguments),d=new lh,e=this.J.toString();this.J++;this.i[e]=d;try{vr(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function pr(a){var b=or;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
function lr(a){var b=or?"connected"==or.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};nr(a)}a.h=b;a.K=b?or.receiver.friendlyName:"";a.l.Sa()}function nr(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function vr(a,b){b=Xq(b);var c=or;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.A("player",c),a.gd(),b;}}var sr=.02,rr=!1,or=null,ur=null,mr=new Set;
|
|
function tr(a){ur?window.__onGCastApiAvailable=ur:delete window.__onGCastApiAvailable;ur=null;if(a)for(var b=t(mr),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function yr(a,b,c,d){d=void 0===d?!1:d;hb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.C=d;this.A=new Map;this.g=new kr(c,function(){return zr(e)},function(){return Ar(e)},function(f,g){return Br(e,f,g)},function(){return Cr(e)},function(){return Dr(e)},d);Er(this)}qa(yr,hb);q=yr.prototype;
|
|
q.destroy=function(a){a&&this.g.gd();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.u=this.l=this.i=null;hb.prototype.release.call(this);return Promise.all(a)};q.vc=function(){return this.l};q.kd=function(){return this.u};q.Jf=function(){return this.g.m&&rr};q.Ra=function(){return this.g.Ra()};q.Ye=function(){return this.g.Ye()};
|
|
q.cast=function(){var a=this;return I(function(b){return 1==b.g?x(b,a.g.cast(),2):a.h?x(b,a.h.mc(),0):b.return()})};q.Ug=function(a){this.g.Ug(a)};q.Hi=function(){xr(this.g)};q.gd=function(){this.g.gd()};
|
|
q.xh=function(a,b){b=void 0===b?!1:b;var c=this;return I(function(d){if(1==d.g){if(a==c.G&&b==c.C)return d.return();c.G=a;c.C=b;c.g.gd();return x(d,c.g.destroy(),2)}c.g=null;c.g=new kr(a,function(){return zr(c)},function(){return Ar(c)},function(e,f){return Br(c,e,f)},function(){return Cr(c)},function(){return Dr(c)},b);c.g.init();H(d)})};
|
|
function Er(a){a.g.init();a.m=new rd;for(var b=t($q),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ra()||(f=Ua(f),a.j.dispatchEvent(f))});for(var d in Wa)a.m.o(a.h,Wa[d],function(f){a.g.Ra()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={Rd:b.Rd},b.Rd=e,Object.defineProperty(a.l,b.Rd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Fr(a,f.Rd)}}(b),set:function(f){return function(g){var h=f.Rd;a.g.Ra()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};Gr(a,
|
|
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Hr(a,f)}})});Ir(a);a.j=new hb;a.j.ee=a.l;a.s=new hb;a.s.ee=a.u}function Ir(a){var b=new Map;Gr(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
function Gr(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
function Dr(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.hd(),startTime:null};a.i.pause();for(var c=t(br),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(gr);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(hr);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 zr(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
|
|
function Ar(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
function Cr(a){for(var b=t(gr),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(br);for(d=c.next();!d.done;d=c.next())d=
|
|
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(br),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(hr);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.gf(h);g&&a.h.Sg(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new S("error",l);a.h.dispatchEvent(l)})}
|
|
function Fr(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.Ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ra()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
function Hr(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Jb()};if("getDrmEngine"==b)return function(){return a.h.C};if("getAdManager"==b)return function(){return a.h.xe()};
|
|
if("setVideoContainer"==b)return function(c){return a.h.ah(c)};if(a.g.Ra()){if("getManifest"==b||"drmInfo"==b)return function(){Za(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Za(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ra()&&0==Object.keys(a.g.g.video).length&&(dr[b]||er[b])||!a.g.Ra()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
function Br(a,b,c){a.g.Ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}P("shaka.cast.CastProxy",yr);yr.prototype.changeReceiverId=yr.prototype.xh;yr.prototype.forceDisconnect=yr.prototype.gd;yr.prototype.suggestDisconnect=yr.prototype.Hi;yr.prototype.setAppData=yr.prototype.Ug;yr.prototype.cast=yr.prototype.cast;yr.prototype.receiverName=yr.prototype.Ye;yr.prototype.isCasting=yr.prototype.Ra;yr.prototype.canCast=yr.prototype.Jf;yr.prototype.getPlayer=yr.prototype.kd;
|
|
yr.prototype.getVideo=yr.prototype.vc;yr.prototype.destroy=yr.prototype.destroy;function Jr(a,b,c,d){hb.call(this);var e=this;this.g=a;this.h=b;this.j=new rd;this.J={video:a,player:b};this.H=c||function(){};this.K=d||function(f){return f};this.i=null;this.I=!1;this.s=!0;this.m=0;this.C=!1;this.A=!0;this.u=this.l=null;this.G=new Zb(function(){Kr(e)});Lr(this)}qa(Jr,hb);q=Jr.prototype;q.isConnected=function(){return this.I};q.Uj=function(){return this.s};q.Jk=function(a){this.i=a};q.aj=function(){this.i=null};
|
|
q.Kk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Ik=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Hk=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
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.G&&(a.G.stop(),a.G=null),a.g=null,a.J=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,hb.prototype.release.call(a),x(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
|
|
function Lr(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Mr(a)};b.onSenderDisconnected=function(){return Mr(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Nr(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Nr(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return Or(a,
|
|
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Pr(a,e)};b.start();b=t($q);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Qr(a,"video",e)});for(var d in Wa)a.j.o(a.h,Wa[d],function(e){return Qr(a,"player",e)});a.j.o(a.g,"loadeddata",function(){a.C=!0});a.j.o(a.h,"loading",function(){a.s=!1;Rr(a)});a.j.o(a.g,"playing",function(){a.s=!1;Rr(a)});a.j.o(a.g,"pause",function(){Rr(a)});a.j.o(a.h,"unloading",function(){a.s=!0;Rr(a)});
|
|
a.j.o(a.g,"ended",function(){(new Zb(function(){a.g&&a.g.ended&&(a.s=!0,Rr(a))})).X(Sr)})}function Mr(a){a.m=0;a.A=!0;a.I=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Rr(a)}function Rr(a){var b;I(function(c){if(1==c.g)return x(c,Promise.resolve(),2);if(!a.h)return c.return();b=new S("caststatuschanged");a.dispatchEvent(b);Tr(a)||Ur(a);H(c)})}
|
|
function Vr(a,b,c){var d,e,f,g,h,k,l,m,n,p;I(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.H(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ua(r,5),x(r,a.h.load(b.manifest,b.startTime),7)):x(r,Promise.resolve(),3);case 7:wa(r,3);break;case 5:return g=xa(r),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
a.g.autoplay=f;b.manifest&&(a.g.play(),Ur(a));H(r)}})}function Qr(a,b,c){a.h&&(Kr(a),Nr(a,{type:"event",targetName:b,event:c},a.l))}
|
|
function Kr(a){a.G.X(Wr);for(var b={video:{},player:{}},c=t(ar),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 fr)0==a.m%fr[e]&&(b.player[e]=a.h[e]());for(var f in dr)0==a.m%dr[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Nr(a,{type:"update",update:b},a.l);for(var g in er)0==a.m%er[g]&&(b={player:{}},b.player[g]=a.h[g](),Nr(a,{type:"update",update:b},a.l));a.C&&(a.m+=
|
|
1);Tr(a)}function Tr(a){return a.A&&(a.g.duration||a.h.T())?(Xr(a),a.A=!1,!0):!1}function Xr(a,b){var c={contentId:a.h.hd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Ur(a,void 0===b?0:b,c)}
|
|
function Pr(a,b){var c=Yq(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.A=!0;Vr(a,c.initState,c.appData);Kr(a);break;case "appData":a.H(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.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=c.methodName;
|
|
"player"==d&&"load"==e&&(a.m=0,a.C=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Yr(a,g,f,null)},function(h){return Yr(a,g,f,h)})}}
|
|
function Or(a,b){var c=Yq(b.data);switch(c.type){case "PLAY":a.g.play();Ur(a);break;case "PAUSE":a.g.pause();Ur(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Ur(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Ur(a));break;case "STOP":a.h.mc().then(function(){a.h&&Ur(a)});break;case "GET_STATUS":Xr(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Ur(a);break;case "LOAD":a.m=0;a.C=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.H(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Xr(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Nr(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:Nr(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
function Yr(a,b,c,d){a.h&&Nr(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Nr(a,b,c,d){a.I&&(a=Xq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Ur(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?Zr:a.h.Ge()?$r:a.g.paused?as:bs,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Nr(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
P("shaka.cast.CastReceiver",Jr);Jr.prototype.destroy=Jr.prototype.destroy;Jr.prototype.setContentArtist=Jr.prototype.Hk;Jr.prototype.setContentImage=Jr.prototype.Ik;Jr.prototype.setContentTitle=Jr.prototype.Kk;Jr.prototype.clearContentMetadata=Jr.prototype.aj;Jr.prototype.setContentMetadata=Jr.prototype.Jk;Jr.prototype.isIdle=Jr.prototype.Uj;Jr.prototype.isConnected=Jr.prototype.isConnected;var Wr=.5,Sr=5,Zr="IDLE",bs="PLAYING",$r="BUFFERING",as="PAUSED";function cs(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(C){return null!=C&&""!=C.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=ds(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
r||-1===u)p=es(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,z=v.i,y=v.j,B=v.h;if(w!=h||z!=k||y!=l||B!=m)n.payload&&a.nestedCues.push(n),n=ds(d,e,w,z,y,B),h=w,k=z,l=y,m=B;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=es(d,e),a.nestedCues.push(n));n=ds(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function ds(a,b,c,d,e,f){a=new Me(a,b,"");c&&a.textDecoration.push(kf);d&&(a.fontStyle=jf);a.color=e;a.backgroundColor=f;return a}
|
|
function es(a,b){a=new Me(a,b,"");a.lineBreak=!0;return a}function fs(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function gs(a,b){this.i=[];this.g=1;this.h=0;this.G=a;this.C=b;this.j=this.m=!1;this.l="white";this.s="black";this.u=this.A=null;hs(this)}function is(a,b,c){var d="CC"+((a.G<<1|a.C)+1),e=new Me(b,c,"");e.lineInterpretation=1;var f=js.get(a.g);f&&(e.line=f);null!=a.u&&null!=a.A&&(e.position=10+Math.min(70,10*a.u)+2.5*a.A);(b=cs(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=js.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function hs(a){ks(a,0,15);a.g=1}
|
|
function ls(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=ms.has(c)?ms.get(c):String.fromCharCode(c);break;case 1:d=ns.get(c);break;case 2:a.i[a.g].pop();d=os.get(c);break;case 3:a.i[a.g].pop(),d=ps.get(c)}d&&a.i[a.g].push(new fs(d,a.m,a.j,a.s,a.l))}}function qs(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function ks(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
var ms=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"]]),ns=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),os=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[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"]]),ps=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[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"]]),js=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function rs(a,b){this.h=0;this.s=new gs(a,b);this.i=new gs(a,b);this.g=this.j=new gs(a,b);this.l=0;this.m=null}function ss(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=is(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,ks(c,0,15),c=a.j,c.g=0<c.h?c.h:0,ks(c,0,15),d.g=15);a.h=3;d.h=b;return e}function ts(a){a.h=1;a.g=a.j;a.g.h=0}function us(a){$a("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=4}var vs="black green blue cyan red yellow magenta black".split(" "),ws="white green blue cyan red yellow magenta white_italics".split(" ");function xs(a,b){this.K=b;this.O=a;this.L=this.l=!1;this.m=this.s=this.I=this.M=this.J=0;this.H=2;this.i=[];this.g=this.h=this.j=0;this.G=this.A=!1;this.C="white";this.u="black";ys(this)}function ys(a){a.i=[];for(var b=0;16>b;b++)a.i.push(zs())}function zs(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function As(a,b){Bs(a)&&(a.i[a.h][a.g]=new fs(b,a.G,a.A,a.u,a.C),a.g++)}function Bs(a){var b=a.g<a.m&&0<=a.g;return a.h<a.s&&0<=a.h&&b}xs.prototype.isVisible=function(){return this.l};
|
|
function Cs(a){for(var b=0,c=1;16>c;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=zs()}
|
|
function Ds(a,b,c){var d=new Me(a.j,b,"");d.textAlign=0===a.H?"left":1===a.H?"right":Pe;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?Md:2;switch(a.I){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
|
|
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=cs(d,"svc"+c,a.i,a.j,b))a.j=b;return c}xs.prototype.display=function(){this.l=!0};function Es(){this.i=[];this.h=null;this.g=0}function Fs(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 Gs(a.h)),a.h=null,a.g=0))}function Gs(a){this.g=0;this.h=a}Gs.prototype.Ga=function(){return this.g<this.h.length};Gs.prototype.Oa=function(){return this.g};function Hs(a){if(!a.Ga())throw new T(2,2,3E3);return a.h[a.g++]}Gs.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};
|
|
Gs.prototype.ni=function(a){if(0>this.g-a)throw new T(2,2,3E3);this.g-=a};function Is(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
function Js(a,b,c,d){if(!a.g)return null;if(24==c)return c=Hs(b).value,d=Hs(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),As(a.g,String.fromCharCode(parseInt(c,16))),null;b=a.g;var e=null;switch(c){case 8:!Bs(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=Ds(b,d,a.i));b.h+1>=b.s?Cs(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=Ds(b,d,a.i));b.i[b.h]=zs();b.g=0;break;case 12:b.isVisible()&&
|
|
(e=Ds(b,d,a.i)),ys(b),b.h=0,b.g=0}return e}
|
|
function Ks(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=Hs(b).value;b=null;c=t(Ls(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ds(e,d,a.i)),ys(e);return b}if(137===c)for(b=Hs(b).value,b=t(Ls(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=Hs(b).value;b=null;c=t(Ls(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ds(e,d,a.i)),e.l=!1;return b}if(139===c){c=Hs(b).value;
|
|
b=null;c=t(Ls(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Ds(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Hs(b).value,Ms(a,b,d);if(143===c)return d=Ms(a,255,d),Ns(a),d;if(144===c)b.skip(1),d=Hs(b).value,a.g&&(a.g.A=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=Hs(b).value,c=Hs(b).value,b.skip(1),a.g&&(b=Os((c&48)>>4,(c&12)>>2,c&3),a.g.C=Os((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=Hs(b).value,b=Hs(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
b.skip(1),d=Hs(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new xs(c,a.i);f.j=d;a.h[c]=f}d=Hs(b).value;f=Hs(b).value;var g=Hs(b).value,h=Hs(b).value,k=Hs(b).value;b=Hs(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.A=!1,b.C="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.M=f&127;b.J=g;b.I=(h&240)>>4;b.L=0<(f&128);b.s=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
function Ls(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Ms(a,b,c){var d=null;b=t(Ls(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Ds(f,c,a.i));a.h[e]=null}return d}function Ns(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Os(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Ps[a<<2|b<<1|c]}
|
|
var Qs=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"]]),Ps="black blue green cyan red magenta yellow white".split(" ");function Rs(){this.h=[];this.g=[];this.i=new Es;this.l=0;this.m=new Map([["CC1",new rs(0,0)],["CC2",new rs(0,1)],["CC3",new rs(1,0)],["CC4",new rs(1,1)]]);this.u=this.s=0;this.j=new Map;this.C=!0;this.A=new Set;Ss(this)}Rs.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Ss(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Ns(b.value)};
|
|
function Ss(a){a.s=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,hs(c.i),hs(c.j),hs(c.s);a.C=!0}
|
|
Rs.prototype.extract=function(a,b){if(this.C){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new Nh(a,0);if(!(8>a.getLength())&&181===a.Z()&&49===a.Aa()&&1195456820===a.U()&&3===a.Z()&&(c=a.Z(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.Z(),f=(e&4)>>2,g=a.Z(),h=a.Z();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Bb:g,ac:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
Rs.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Ts(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Fs(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Us(this,d.value),b.push.apply(b,ha(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
function Ts(a,b){var c=b.type;if(16===(b.Bb&112)){var d=b.Bb>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.Bb&&255===b.ac||!b.Bb&&!b.ac||!Vs(b.Bb)||!Vs(b.ac))return 45<=++a.l&&Ss(a),null;a.l=0;b.Bb&=127;b.ac&=127;var e=b.Bb;if(1<=e&&15>=e||!b.Bb&&!b.ac)return null;e=null;if(16===(b.Bb&112))a:{a.A.add(d),d=b.Bb;a=b.ac;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
|
|
null;var g=95<a?a-96:a-64;13>=g?d=ws[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,qs(g,c,1+g.g-g.h,g.h),ks(g,0,c-1),ks(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ls(c.g,0,32),d=!1,b=ws[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=vs[(a&
|
|
14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))ls(c.g,1,a);else if(18===(d&246)&&32===(a&224))ls(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.ac){case 32:ts(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=ss(c,2,a);break;case 38:d=ss(c,3,a);break;case 39:d=ss(c,4,a);break;case 40:ls(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:hs(c.s);us(c);break;case 43:us(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=is(b,c.l,a));ks(b,0,15);break;case 45:b=
|
|
c.g;3!==c.h?d=null:(d=is(b,c.l,a),e=b.g-b.h+1,qs(b,e-1,e,b.h),ks(b,0,e-1),ks(b,b.g,15-b.g),c.l=a);break;case 46:ks(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=is(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,ts(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.A=a-32)}e=null}else a=b.ac,ls(c.g,0,b.Bb),ls(c.g,0,a);return e}
|
|
function Us(a,b){var c=[];try{for(;b.Ga();){var d=Hs(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Hs(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Is(e));for(var g=a.j.get(e),h=b.Oa();b.Oa()-h<f;){e=g;var k=b,l=Hs(k),m=l.value,n=l.pts;if(16===m){var p=Hs(k);m=m<<16|p.value}if(0<=m&&31>=m)var r=Js(e,k,m,n);else if(128<=m&&159>=m)r=Ks(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&
|
|
255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?As(e.g,"\u266a"):As(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&As(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Qs.has(k)){var u=Qs.get(k);As(e.g,u)}else As(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?As(e.g,"_"):As(e.g,"[CC]"));r=null}(e=r)&&c.push(e)}}}}catch(v){if(v instanceof T&&3E3===v.code)$a("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
|
|
else throw v;}return c}function Vs(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Rs.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",Rs);Kd=function(){return new Rs};function Ws(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(ha(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Xs(){this.j=new Map;this.i=this.h=0;this.g=Ys}
|
|
Xs.prototype.init=function(a){function b(f){f=f.name;f in Zs&&(c.g=Zs[f])}var c=this,d=[],e=[];(new Th).box("moov",Yh).box("mvex",Yh).W("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.U();g=g.U();c.h=f;c.i=g}).box("trak",Yh).W("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.U();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.Aa();g.Aa();g.Aa();g.Aa();d.push(h)}).box("mdia",Yh).W("mdhd",
|
|
function(f){f=yj(f.reader,f.version);e.push(f.timescale)}).box("minf",Yh).box("stbl",Yh).W("stsd",$h).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",ai).box("sinf",Yh).box("frma",function(f){f=Bj(f.reader).codec;f in Zs&&(c.g=Zs[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Ys&&Za("Unable to determine bitstream format for CEA parsing!");
|
|
d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
Xs.prototype.parse=function(a){var b=this;if(this.g==Ys)return[];var c=[],d=0,e=[];(new Th).box("moof",function(f){d=f.start;e=[];Yh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Hd:b.h,ue:b.i,ei:[],timescale:9E4});Yh(f)}).W("trun",function(f){var g=e[e.length-1];f=zj(f.reader,f.version,f.flags);g.ei.push(f)}).W("tfhd",function(f){var g=e[e.length-1];f=wj(f.reader,f.flags);g.Hd=f.Hd||b.h;g.ue=f.ue||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).W("tfdt",function(f){var g=e[e.length-
|
|
1];f=xj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Oa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Za("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);$s(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Hd,l.ue,g,l.ei,c)}}).parse(a,!1);return c};
|
|
function $s(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.oi});n=[].concat.apply([],ha(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].cj);b.Ga();){g=b.U();var p=b.Z(),r=null;r=!1;h=1;switch(a.g){case at:r=p&31;r=6==r;break;case bt:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case ct:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].$e||0),p=(c+p)/d,h=t(Ws(b.Rb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
|
|
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Qg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",Xs);var Ys=0,at=1,bt=2,ct=3,Zs={avc1:at,avc3:at,dvav:at,dva1:at,hev1:bt,hvc1:bt,dvh1:bt,dvhe:bt,vvc1:ct,vvi1:ct,dvc1:ct,dvi1:ct};Jd["video/mp4"]=function(){return new Xs};function dt(){this.g=null}dt.prototype.init=function(){};dt.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Qj;var b=[];a=Hb(a);if(!Zj(a))return b;a=this.g.parse(a);var c=a.Id(),d=a.De();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Ws(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
P("shaka.cea.TsCeaParser",dt);Jd["video/mp2t"]=function(){return new dt};function et(a,b,c){var d=ft(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.vd});if(1<f.length)throw new T(2,4,4050);f.length&&(g=gt(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.vd}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.vd?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
l.vd});f.length&&(a=ht(e,k,f,c,h),0==a.length&&(a=[Oc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Oc(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Ch:h,fm:e,drmInfos:a,Gf:g,Hh:!0}}
|
|
function it(a,b,c,d){var e=et(a,c,d);if(b.Hh){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.Hh=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.Ch||b.Ch}
|
|
function jt(a){var b=0,c=Nb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function kt(a){a=t(qe(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return me(c)}return""}
|
|
function lt(a){var b=se(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=me(b)))return b;a=se(a.node,"urn:microsoft:playready","pro");if(!a||!me(a))return"";a=me(a);a=Jc(a);a=jt(a).filter(function(c){return c.type===mt})[0];if(!a)return"";a=zc(a.value,!0);return(a=ee(a,"WRMHEADER"))?kt(a):""}
|
|
function ht(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.vd];if(h){var k;if((k=se(g.node,"urn:microsoft:playready","pro"))&&me(k)){k=me(k);k=Jc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:ei(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.vd){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
|
|
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:ei(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Oc(h,b,g.init||a||k||l);if(h=nt.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function ft(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=ot(c.value))&&b.push(c);return b}
|
|
function ot(a){var b=a.attributes.schemeIdUri,c=ve(a,"urn:mpeg:cenc:2013","default_KID"),d=te(a,"urn:mpeg:cenc:2013","pssh").map(pe),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Jc(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,vd:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
function gt(a){if(!window.crypto||!window.crypto.subtle)throw Za("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=se(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=se(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Fc(b.attributes.keyUriTemplate);
|
|
if(!a||!b)throw new T(2,4,4051);a=Kc(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{$j:b,iv:a}}
|
|
var mt=1,nt=(new Map).set("com.widevine.alpha",function(a){var b=se(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=me(b))?b:(a=se(a.node,"urn:microsoft","laurl"))?Fc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",lt).set("com.microsoft.playready.recommendation",lt).set("com.microsoft.playready.software",lt).set("com.microsoft.playready.hardware",lt).set("org.w3.clearkey",function(a){var b=se(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=me(b))?b:(a=se(a.node,"http://dashif.org/guidelines/clearKey",
|
|
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=me(a))?a:""});function pt(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Za("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
function qt(a,b){var c=rt(a,b,"timescale"),d=1;c&&(d=Be(c)||1);c=rt(a,b,"duration");var e=(c=Be(c||""))?c/d:null,f=rt(a,b,"startNumber"),g=Number(rt(a,b,"presentationTimeOffset"))||0,h=Ce(f||"");if(null==f||null==h)h=1;f=null;if(b=st(a,b,"SegmentTimeline")){b=le(b,"S");f=d;a=a.wa.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var p=b[n],r=b[n+1],u=ue(p,"t",Ce),v=ue(p,"d",Ce),w=ue(p,"r",Ae);p=ue(p,"k",Ae)||0;null!=u&&(u-=g);if(v){u=null!=u?u:m;w=w||0;if(0>w)if(r){r=ue(r,"t",Ce);if(null==
|
|
r)break;else if(u>=r)break;w=Math.ceil((r-u)/v)-1}else{if(Infinity==a)break;else if(u/f>=a)break;w=Math.ceil((a*f-u)/v)-1}0<l.length&&u!=m&&(l[l.length-1].end=u/f);for(r=0;r<=w;++r)m=u+v,l.push({start:u/f,end:m/f,kh:u,Xb:p,Fk:l.length+k}),u=m}}f=l}return{timescale:d,kf:c,hb:e,ae:h,Bc:g/d||0,jh:g,timeline:f}}function tt(a,b){return[b(a.N),b(a.ua),b(a.Ca)].filter(Xf)}function rt(a,b,c){b=tt(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
function st(a,b,c){b=tt(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=re(d.value,c));d=b.next());return a}
|
|
function ut(a,b,c,d,e,f){for(var g=ve(a,"http://www.w3.org/1999/xlink","href"),h=ve(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=ge("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return nh(new T(2,4,4028));if("onLoad"!=h)return nh(new T(2,4,4027));var p=Nc([d],[g]);return e.request(0,Ah(p,b)).Ta(function(r){r=de(r.data,a.tagName);if(!r)return nh(new T(2,4,4001,g));for(a.children=
|
|
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return vt(a,b,c,p[0],e,f+1)})}
|
|
function vt(a,b,c,d,e,f){f=void 0===f?0:f;if(ve(a,"http://www.w3.org/1999/xlink","href")){var g=ut(a,b,c,d,e,f);c&&(g=g.Ta(void 0,function(){return vt(a,b,c,d,e,f)}));return g}g=[];for(var h=t(ke(a)),k=h.next(),l={};!k.done;l={Dd:void 0},k=h.next())l.Dd=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==ve(l.Dd,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Dd}}(l)):"SegmentTimeline"!=l.Dd.tagName&&g.push(vt(l.Dd,b,c,d,e,f));return rh(g).Ta(function(){return a})}
|
|
;function wt(a,b,c,d,e,f,g){var h,k=(new Th).W("sidx",function(l){h=xt(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
function xt(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.U();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.U();var m=g.reader.U()}else l=g.reader.ud(),m=g.reader.ud();g.reader.skip(2);var n=g.reader.Aa();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.U(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.U();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new fj(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function yt(a){this.h=Nb(a);this.g=new Nh(this.h,0)}yt.prototype.Ga=function(){return this.g.Ga()};
|
|
function zt(a){var b=At(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=At(a);a:{d=t(Bt);for(var e=d.next();!e.done;e=d.next())if(Gb(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 T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Oa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Oa();d=Nb(a.h,a.g.Oa(),b);a.g.skip(b);return new Ct(c,
|
|
d)}function At(a){var b=a.g.Oa(),c=a.g.Z();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Hb(a.h,b,c)}var Bt=[[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 Ct(a,b){this.id=a;this.g=b}
|
|
function Dt(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Et(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new yt(a.g);for(var n=null,p=null;a.Ga();){var r=zt(a);if(187==r.id){var u=Ft(r);u&&(r=c*u.Uk,u=b+u.vk,null!=n&&m.push(new fj(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new fj(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
function Ft(a){var b=new yt(a.g);a=zt(b);if(179!=a.id)throw new T(2,3,3013);a=Dt(a);b=zt(b);if(183!=b.id)throw new T(2,3,3012);b=new yt(b.g);for(var c=0;b.Ga();){var d=zt(b);if(241==d.id){c=Dt(d);break}}return{Uk:a,vk:c}};function Gt(a,b,c){b=st(a,b,"Initialization");if(!b)return null;var d=a.N.cb(),e=b.attributes.sourceURL;e&&(d=Nc(d,[Fc(e)],a.Gb()));e=0;var f=null;if(b=ue(b,"range",ze))e=b.start,f=b.end;c=new dj(function(){return d},e,f,Ht(a),null,null,c);c.codecs=a.N.codecs;c.mimeType=a.N.mimeType;return c}
|
|
function It(a,b,c){var d=Number(rt(a,Jt,"presentationTimeOffset"))||0,e=rt(a,Jt,"timescale"),f=1;e&&(f=Be(e)||1);var g=d/f||0,h=Gt(a,Jt,c);Kt(a,h);var k=be(a);return{Kc:function(){var l=st(k,Jt,"RepresentationIndex");var m=k.N.cb();l&&(l=Fc(l.attributes.sourceURL))&&(m=Nc(m,[l],k.Gb()));l=Lt(k);return Mt(k,b,h,m,l.start,l.end,g)}}}
|
|
function Mt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E;return I(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.cc||!a.wa.Th,l=a.wa.start,m=a.wa.duration,n=a.N.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.R(),c.$a,c.La,!0):null],p=null,x(F,Promise.all(u),2);v=F.h;w=v[0];z=v[1]||null;y=null;B=l-g;C=l;D=m?l+m:Infinity;if("mp4"==n)var J=wt(w,e,d,c,B,C,D);else{J=w;var L=new yt(z);if(440786851!=zt(L).id)throw new T(2,3,3008);var K=zt(L);if(408125543!=K.id)throw new T(2,
|
|
3,3009);L=K.g.byteOffset;K=new yt(K.g);for(var O=null;K.Ga();){var M=zt(K);if(357149030==M.id){O=M;break}}if(!O)throw new T(2,3,3010);O=new yt(O.g);M=1E6;for(K=null;O.Ga();){var N=zt(O);if(2807729==N.id)M=Dt(N);else if(17545==N.id)if(4==N.g.byteLength)K=N.g.getFloat32(0);else if(8==N.g.byteLength)K=N.g.getFloat64(0);else throw new T(2,3,3003);}if(null==K)throw new T(2,3,3011);O=M/1E9;K*=O;J=zt(new yt(J));if(475249515!=J.id)throw new T(2,3,3007);J=Et(J,L,O,K,d,c,B,C,D)}y=J;G=t(y);for(A=G.next();!A.done;A=
|
|
G.next())E=A.value,E.codecs=a.N.codecs,E.mimeType=a.N.mimeType,E.bandwidth=a.bandwidth;h.Vd(y);r=new pl(y);k&&r.fd(C,D,!0);return F.return(r)})}function Jt(a){return a.xd}function Lt(a){var b=st(a,Jt,"RepresentationIndex");a=rt(a,Jt,"indexRange");a=ze(a||"");b&&(a=ue(b,"range",ze,a));return a}function Kt(a,b){Nt(a,b);if(!Lt(a))throw new T(2,4,4002);}
|
|
function Nt(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Tc&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
function Ht(a){var b=a.N;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.Te,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ua.label||null,roles:a.roles||null,language:a.ua.language||null}};function Ot(a,b,c){var d=Gt(a,Pt,c),e=Qt(a);if(!e.hb&&!e.timeline&&1<e.qd.length)throw new T(2,4,4002);if(!e.hb&&!a.wa.duration&&!e.timeline&&1==e.qd.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.Ca.id&&a.N.id&&(g=b[a.Ca.id+","+a.N.id])&&(f=g.segmentIndex);var h=Rt(a.wa.start,a.wa.duration,a.N.cb,e,d,c,a.N.mimeType,a.N.codecs,a.bandwidth,a.Gb);b=!f;f?f.Td(h,a.presentationTimeline.Cb()):f=new pl(h);a.presentationTimeline.Vd(h);a.cc&&a.wa.Th||
|
|
f.fd(a.wa.start,a.wa.duration?a.wa.start+a.wa.duration:Infinity,b);g&&(g.segmentIndex=f);return{Kc:function(){f&&0!=f.getNumReferences()||f.Pe(h);return Promise.resolve(f)}}}function Pt(a){return a.kc}function Qt(a){var b=St(a);a=qt(a,Pt);var c=a.ae;0==c&&(c=1);var d=0;a.hb?d=a.hb*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{hb:a.hb,startTime:d,ae:c,Bc:a.Bc,timeline:a.timeline,qd:b}}
|
|
function Rt(a,b,c,d,e,f,g,h,k,l){var m=d.qd.length;d.timeline&&d.timeline.length!=d.qd.length&&(m=Math.min(d.timeline.length,d.qd.length));for(var n=a-d.Bc,p=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={mf:void 0,bf:void 0},w++){v.bf=d.qd[w];var z=u;u=void 0;u=null!=d.hb?z+d.hb:d.timeline?d.timeline[w].end:z+b;v.mf=null;v=new fj(a+z,a+u,function(y){return function(){null==y.mf&&(y.mf=Nc(c(),[y.bf.hk],l()));return y.mf}}(v),v.bf.start,v.bf.end,e,n,a,p,[],"",null,null,gj,f);v.codecs=h;v.mimeType=
|
|
g;v.bandwidth=k;r.push(v)}return r}function St(a){return[a.N.kc,a.ua.kc,a.Ca.kc].filter(Xf).map(function(b){return le(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.ug&&(a.ug=!0);var c=Fc(b.attributes.media);b=ue(b,"mediaRange",ze,{start:0,end:null});return{hk:c,start:b.start,end:b.end}})};function Tt(a,b,c,d,e,f,g,h,k){k||a.N.Fe||(a.N.Fe=rt(a,Ut,"initialization"));var l=a.N.Fe?Vt(a,g):null,m=Wt(a);Xt(m);var n=be(a);if(m.Pd)return Nt(a,l),{Kc:function(){var v=pt(m.Pd,n.N.id,null,null,n.bandwidth||null,null);v=Nc(n.N.cb(),[v]);return Mt(n,b,l,v,0,null,m.Bc)}};if(m.hb)return d||"image"===a.ua.contentType||"text"===a.ua.contentType||(c=a.wa.start,d=a.Ca.id,k=a.wa.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.Dg(m.hb),a.presentationTimeline.ci(c,d)),{Kc:function(){return Yt(n,
|
|
m,e,l,f,g,h,a.N.cf)}};var p=null;d=d=null;a.Ca.id&&a.N.id&&(d=a.Ca.id+","+a.N.id,d=c[d])&&(p=d.segmentIndex);var r=a.wa.start,u=a.wa.duration?r+a.wa.duration:Infinity;p?(c=p,Zt(c,m,r,u,l),c.Ya(a.presentationTimeline.Cb())):p=new $t(m,a.N.id,a.bandwidth,a.N.cb,a.Gb,r,u,l,g,a.N.cf);m.timeline&&"image"!==a.ua.contentType&&"text"!==a.ua.contentType&&a.presentationTimeline.di(p.h?p.h.timeline:[],r);d&&a.cc&&(d.segmentIndex=p);return{Kc:function(){p instanceof $t&&0==p.getNumReferences()&&Zt(p,m,r,u,l);
|
|
return Promise.resolve(p)}}}function Ut(a){return a.Cc}function Wt(a){var b=qt(a,Ut),c=rt(a,Ut,"media"),d=rt(a,Ut,"index"),e=rt(a,Ut,"k"),f=0;e&&(f=parseInt(e,10));return{kf:b.kf,hb:b.hb,timescale:b.timescale,ae:b.ae,Bc:b.Bc,jh:b.jh,timeline:b.timeline,xc:c&&Fc(c),Pd:d,mimeType:a.N.mimeType,codecs:a.N.codecs,bandwidth:a.bandwidth,ik:f}}
|
|
function Xt(a){var b=a.Pd?1:0;b+=a.timeline?1:0;b+=a.hb?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.Pd&&(a.timeline=null),a.kf=null,a.hb=null);if(!a.Pd&&!a.xc)throw new T(2,4,4002);}
|
|
function Yt(a,b,c,d,e,f,g,h){function k(K){var O=K-w,M=O*v,N=b.kf,R=O*N;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(N));M+=p;O=M+v;N=Math.min(O,m());var Q=[],Y=b.ik;if(Y)for(var ia=(N-M)/Y,X={},ja=0;ja<Y;X={Fi:void 0},ja++){var Pa=M+ia*ja,Ka=Pa+ia;X.Fi=ja+1;X=new fj(Pa,Ka,function(jb){return function(){var ab=pt(z,B,K,jb.Fi,y,R);return Nc(C(),[ab],D())}}(X),0,null,d,G,p,m(),[],"",null,null,gj,f);X.codecs=a.N.codecs;X.mimeType=a.N.mimeType;0==h?0<ja&&X.od():0!=ja%h&&X.od();Q.push(X)}M=
|
|
new fj(M,N,function(){if(Y)return[];var jb=pt(z,B,K,null,y,R);return Nc(C(),[jb],D())},0,null,d,G,p,m(),Q,"",null,null,gj,f,0<Q.length);M.codecs=a.N.codecs;M.mimeType=a.N.mimeType;M.bandwidth=a.bandwidth;M.j=O;return M}function l(){var K=[Math.max(n.Cb(),p),Math.min(n.sc(),m())].map(function(O){return O-p});K=[Math.ceil(K[0]/v),Math.ceil(K[1]/v)-1];a.N.sb&&K[1]++;return K.map(function(O){return O+w})}function m(){var K=null!=r&&e[r]||u;return K?p+K:Infinity}var n=a.presentationTimeline,p=a.wa.start,
|
|
r=a.Ca.id,u=a.wa.duration,v=b.hb,w=b.ae,z=b.xc,y=a.bandwidth||null,B=a.N.id,C=a.N.cb,D=a.Gb,G=p-b.Bc,A=l();c=a.cc?Math.max(A[0],A[1]-c+1):A[0];g=g||A[1];A=[];for(var E=c;E<=g;++E){var F=k(E);A.push(F)}var J=new pl(A);A=n.sc()<m();E=n.T();if(A||E){var L=Math.max(c,g+1);c=v;a.N.sb&&(c=.1);J.lf(c,function(){var K=n.Cb();J.Ya(K);var O=t(l());O.next();O=O.next().value;for(var M=[];L<=O;){var N=k(L);M.push(N);L++}return K>m()&&!M.length?null:M})}return Promise.resolve(J)}
|
|
function Vt(a,b){var c=a.N.Fe;c||(c=rt(a,Ut,"initialization"));if(!c)return null;c=Fc(c);var d=a.N.id,e=a.bandwidth||null,f=a.N.cb,g=a.Gb;b=new dj(function(){var h=pt(c,d,null,null,e,null);return Nc(f(),[h],g())},0,null,Ht(a),null,null,b);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;return b}function $t(a,b,c,d,e,f,g,h,k,l){pl.call(this,[]);this.h=a;this.H=b;this.C=c;this.G=d;this.J=e;this.j=f;this.l=g;this.u=h;this.A=k;this.I=l;au(this)}qa($t,pl);q=$t.prototype;
|
|
q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){pl.prototype.release.call(this);this.h=null};q.Ya=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
|
|
function Zt(a,b,c,d,e){bu(a,e);if(a.h){c=a.h.timeline;a.h.xc!==b.xc&&(a.h.xc=b.xc);if(c.length){var f=c[c.length-1];b=b.timeline.filter(function(g){return g.end>f.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,ha(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;au(a)}function bu(a,b){if(a.u!==b){a.u=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&ij(c,b)}}
|
|
function au(a){if(!a.s){for(var b=[],c=t(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||0>=d.end||b.push(d);a.h.timeline=b;a.Ya(a.j)}}
|
|
q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
|
|
q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Fk,f=d.kh+this.h.jh;c=this.j-this.h.Bc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Xb,r={},u=0;u<d.Xb;r={nf:void 0,Gi:void 0},u++){var v=d.start+p*u,w=v+p;r.Gi=u+1;r.nf=null;r=new fj(this.j+v,this.j+w,function(z){return function(){if(!b.h)return[];
|
|
null==z.nf&&(z.nf=cu(b.h.xc,b.H,e,b.C,f,z.Gi,b.G,b.J));return z.nf}}(r),0,null,this.u,c,this.j,this.l,[],"",null,null,gj,this.A);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.I?0<u&&r.od():0!=u%this.I&&r.od();n.push(r)}c=new fj(this.j+d.start,h,function(){return 0<d.Xb||!b.h?[]:cu(b.h.xc,b.H,e,b.C,f,null,b.G,b.J)},0,null,this.u,c,this.j,this.l,n,"",null,null,gj,this.A,0<d.Xb);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
|
|
q.Ub=function(a){au(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function cu(a,b,c,d,e,f,g,h){a=pt(a,b,c,f,d||null,e);return Nc(g(),[a],h()).map(function(k){return k.toString()})};function du(a){this.s=null;this.A=a;this.I=new th;this.i=[];this.h=null;this.m=[];this.C=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}du.prototype.configure=function(a){this.s=a};du.prototype.destroy=function(){this.A=this.s=null;this.i=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};du.prototype.setManifestType=function(a){this.u=a};
|
|
function eu(a,b){var c,d,e,f,g,h,k;return I(function(l){if(1==l.g)return c=Nc(a.i,[fu(a,b)]),d=Ah(c,a.s.retryParameters),e=a.A.networkingEngine.request(8,d),uh(a.I,e),ua(l,2),x(l,e.promise,4);if(2!=l.g)return f=l.h,g=yc(f.data),h=JSON.parse(g),1==h.VERSION&&gu(a,h,f.uri),wa(l,0);if((k=xa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Zb(function(){eu(a,b)});a.g.X(a.G);H(l)})}
|
|
function fu(a,b){if(!a.m.length)return b;b=new ob(b);var c=a.C||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Eb(e)&&sb(b,e);return b.toString()}function gu(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Zb(function(){eu(a,d)});if(c=b.TTL)a.G=c;a.g.X(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
function hu(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}du.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
function iu(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={sd:void 0},f=e.next())if(g.sd=f.value,f=b.get(g.sd))d.push({Jg:g.sd,location:f});else if(f=a.H.find(function(k){return function(l){return l.vl==k.sd}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].Ri?(h=new ob(h),qb(h,f["URI-REPLACEMENT"].Ri),d.push({Jg:g.sd,location:h.toString()})):d.push({Jg:g.sd,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new ob(k.location)).bc))return!1;return!0});d.length&&(a.C=d[0].Jg);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Nc(a.i,d)};function ju(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}q=ju.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.s=!1;this.m.clear()};q.Mj=function(){return this.l};q.ng=function(){return this.j.slice()};q.qj=function(){return this.i};
|
|
q.Dh=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Tc)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
|
|
d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
|
|
function ku(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[lu(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[mu(n),n]})),l=new Map(h.textStreams.map(function(n){return[nu(n),n]}));h=new Map(h.imageStreams.map(function(n){return[ou(n),n]}));if(b){var m=pu(Tc);l.set(nu(m),m);m=pu("image");h.set(ou(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{rh:c,Oi:d,Ii:e,Qh:f}}
|
|
q.Nf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N,R,Q;return I(function(Y){if(1==Y.g){e=Xc;if(!b&&1==a.length)return f=ku(a,!1),g=f.rh,h=f.Oi,k=f.Ii,l=f.Qh,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),Y.B(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return Y.return();u=ku(a,!0);v=u.rh;w=u.Oi;z=u.Ii;y=u.Qh;return x(Y,
|
|
Promise.all([qu(d,d.h,v,n,ru,su,m),qu(d,d.g,w,n,ru,su,m),qu(d,d.j,z,n,ru,su,m),qu(d,d.i,y,n,ru,su,m)]),2)}B=0;C=[];if(d.g.length&&d.h.length)for(J=t(d.h),L=J.next();!L.done;L=J.next())for(K=L.value,O=t(d.g),M=O.next();!M.done;M=O.next())N=M.value,R=Sb(K.drmInfos,N.drmInfos),K.drmInfos.length&&N.drmInfos.length&&!R.length||(Q=B++,C.push({id:Q,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K,video:N,bandwidth:(K.bandwidth||0)+(N.bandwidth||0),drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
decodingInfos:[]}));else for(D=d.g.length?d.g:d.h,G=t(D),A=G.next();!A.done;A=G.next())E=A.value,F=B++,C.push({id:F,language:E.language,disabledUntilTime:0,primary:E.primary,audio:E.type==e.ia?E:null,video:E.type==e.ya?E:null,bandwidth:E.bandwidth||0,drmInfos:E.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=C;H(Y)})};
|
|
function tu(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M;return I(function(N){switch(N.g){case 1:b=Xc;if(1==a.length)return N.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ia}).map(function(Q){return[lu(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ya}).map(function(Q){return[mu(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Na}).map(function(Q){return[nu(Q),
|
|
Q]}))});f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Cf}).map(function(Q){return[ou(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=uu(b.Na),k.set(nu(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=uu(b.Cf),p.set(ou(r),r);u=new ju;return x(N,qu(u,[],c,0,vu,wu,0),2);case 2:return v=N.h,x(N,qu(u,[],d,0,vu,wu,0),3);case 3:return w=N.h,x(N,qu(u,[],e,0,vu,wu,0),4);case 4:return z=N.h,x(N,qu(u,[],f,0,vu,wu,0),5);case 5:y=N.h;B=0;if(w.length&&v.length)for(E=
|
|
t(v),F=E.next();!F.done;F=E.next())for(J=F.value,L=t(w),K=L.next();!K.done;K=L.next())O=K.value,M=B++,O.variantIds.push(M),J.variantIds.push(M);else for(C=w.concat(v),D=t(C),G=D.next();!G.done;G=D.next())A=G.value,A.variantIds=[B++];return N.return(w.concat(v).concat(z).concat(y))}})}
|
|
function qu(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J;return I(function(L){switch(L.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){L.B(4);break}n=m.value;return x(L,xu(a,n,c,d,f,h,g),5);case 5:p=L.h;if(!p)throw new T(2,4,4037);m=l.next();L.B(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),z=w.next();!z.done;z=w.next())y=z.value,(B=yu(a,y,c,e,f,h))&&b.push(B);C=t(h);for(D=C.next();!D.done;D=
|
|
C.next())for(G=D.value,A=t(G),E=A.next(),F={};!E.done;F={bh:void 0},E=A.next())if(F.bh=E.value,!zu(F.bh)&&(J=b.some(function(K){return function(O){return Au(a,K.bh,O)}}(F))))throw new T(2,4,4037);return L.return(b)}})}function xu(a,b,c,d,e,f,g){return I(function(h){if(1==h.g)return Bu(a,c,b,0<g),b.matchedStreams?b.segmentIndex?x(h,Cu(b,d+g),2):h.B(2):h.return(!1);Du(b,d,e,f,g);return h.return(!0)})}
|
|
function Cu(a,b){var c,d,e,f,g,h;return I(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex());return x(k,Promise.all(c),2)}if(a.segmentIndex instanceof sl)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);H(k)})}
|
|
function yu(a,b,c,d,e,f){if(zu(b))return null;var g=d(b);Bu(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return I(function(h){if(g.segmentIndex)return h.B(0);g.segmentIndex=new sl;return x(h,Cu(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Du(g,0,e,f,0);return g}
|
|
function Du(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==gd(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
function ru(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):
|
|
null;b.trickModeVideo=null;return b}function vu(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set;b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
|
|
function su(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Sb(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,
|
|
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=ru(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
|
|
for(var g=new sl,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),su(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),su(a.trickModeVideo,b))}
|
|
function wu(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
function Bu(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=Eu(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
function Eu(a,b,c){var d={audio:lu,video:mu,text:nu,image:ou}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return Au(a,l,m)},video:function(l,m){return Au(a,l,m)},text:Fu,image:Gu}[c.type];for(var g={audio:Hu,video:Iu,text:Ju,image:Ku}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!zu(e)&&b.delete(d(e));return e}
|
|
function Lu(a,b){return a.mimeType!=b.mimeType?!1:Mu(a.codecs)===Mu(b.codecs)}q.pi=function(a){this.s=a};q.Bi=function(a){this.u=a};function Au(a,b,c){return!Lu(b,c)&&!a.s||b.drmInfos&&!Rb(b.drmInfos,c.drmInfos)?!1:!0}function Fu(a,b){return b.language?a.forced!==b.forced||0==gd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Gu(){return!0}
|
|
function Hu(a,b,c){var d=Lu(a,b),e=Lu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=gd(a.language,b.language);e=gd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){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;if(c.roles.length!==b.roles.length)return c.roles.length<
|
|
b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Nu(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Ou)return!0;if(d==Pu)return!1;d=Nu(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Ou?!0:d==Pu?!1:a.bandwidth&&Qu(a.bandwidth,b.bandwidth,c.bandwidth)==Ou?!0:!1}
|
|
function Iu(a,b,c){var d=Lu(a,b),e=Lu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Nu(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Ou)return!0;if(d==Pu)return!1;if(a.frameRate){d=Nu(a.frameRate,b.frameRate,c.frameRate);if(d==Ou)return!0;if(d==Pu)return!1}return a.bandwidth&&Qu(a.bandwidth,b.bandwidth,c.bandwidth)==Ou?!0:!1}
|
|
function Ju(a,b,c){var d=gd(a.language,b.language),e=gd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Ku(a,b,c){return Nu(a.width*a.height,b.width*b.height,c.width*c.height)==Ou?!0:!1}
|
|
function uu(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
|
|
function pu(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new pl([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
|
|
function Nu(a,b,c){if(b==a&&a!=c)return Pu;if(c==a&&a!=b)return Ou;if(b>a){if(c<=a||c-a<b-a)return Ou;if(c-a>b-a)return Pu}else{if(c>a)return Pu;if(a-c<a-b)return Ou;if(a-c>a-b)return Pu}return Ru}function Qu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ou:b<a?Pu:Ru}function zu(a){switch(a.type){case Tc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
function mu(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,Mu(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function lu(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,Mu(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function nu(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
function ou(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Mu(a){if(!Su.has(a)){var b=Ff(a);Su.set(a,b)}return Su.get(a)}P("shaka.util.PeriodCombiner",ju);ju.prototype.setUseStreamOnce=ju.prototype.Bi;ju.prototype.setAllowMultiTypeVariants=ju.prototype.pi;ju.prototype.combinePeriods=ju.prototype.Nf;ju.prototype.deleteStream=ju.prototype.Dh;ju.prototype.getImageStreams=ju.prototype.qj;ju.prototype.getTextStreams=ju.prototype.ng;ju.prototype.getVariants=ju.prototype.Mj;
|
|
var Ou=1,Ru=0,Pu=-1,Su=new Map;function Tu(a,b){var c=new DOMParser,d=Uu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Vu(a,b){try{var c=Bc(a);return Tu(c,b)}catch(d){return null}}
|
|
var Uu=new Qb(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Wu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.Da=1;this.H=[];this.l={Re:"",type:"",profiles:[],hc:null,sb:0,cb:null,Wd:0};this.u=new Map;this.s={};this.C={};this.oa={};this.m=new ju;this.L=0;this.ra=new nd(5);this.M=new Zb(function(){if(a.K&&!a.g.continueLoadingWhenPaused&&(a.I.Ma(a.K,"timeupdate"),a.K.paused)){a.I.sa(a.K,"timeupdate",function(){return Xu(a)});return}Xu(a)});this.S=new th;this.P=null;this.G=[];this.aa=Infinity;this.J=!1;this.h=null;this.O=0;this.ka=!1;this.I=
|
|
new rd;this.K=null;this.V=!1;this.$="";this.ha=function(){return!1};this.Y=[]}q=Wu.prototype;q.configure=function(a,b){var c=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&(this.ha=b);c&&this.i&&this.i.presentationTimeline.T()&&this.M.Sa();this.h&&this.h.configure(this.g);this.m&&(this.m.pi(this.g.dash.multiTypeVariantsAllowed&&zd()),this.m.Bi(this.g.dash.useStreamOnceInPeriodFlattening))};
|
|
q.start=function(a,b){var c=this,d;return I(function(e){if(1==e.g)return c.J=b.isLowLatencyMode(),c.A=[a],c.j=b,x(e,Yu(c),2);d=e.h;c.j&&Zu(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
q.stop=function(){for(var a=t(Object.values(this.s)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.s={};this.C={};this.u.clear();this.l={Re:"",type:"",profiles:[],hc:null,sb:0,cb:null,Wd:0};this.m=null;null!=this.M&&(this.M.stop(),this.M=null);this.h&&this.h.destroy();this.I&&(this.I.release(),this.I=null);return this.S.destroy()};
|
|
q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return ua(c,2),x(c,Yu(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.T()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.sc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.L=b.endTime-a,Zu(this,0))}}};
|
|
q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.K=a};
|
|
function Yu(a){var b,c,d,e,f,g,h,k,l,m,n;return I(function(p){if(1==p.g)return b=4,c="MPD",d=$u(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=iu(a.h,"Location",!0),f.length&&(e=f)),g=Ah(e,a.g.retryParameters),h=Date.now(),x(p,av(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new ob(k.uri);a.$=l.g.toString();return x(p,bv(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.ra.sample(1,n);return p.return(n)})}
|
|
function bv(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return I(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=Ym;if(f!=g){Bd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Vu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Cc(h.outerHTML)}k=de(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Zm;l!=m&&l(k);if("Patch"===d)return v.return(cv(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(dv(a,k,c));
|
|
p=a.g.dash.xlinkFailGracefully;r=vt(k,a.g.retryParameters,p,c,a.j.networkingEngine);uh(a.S,r);return x(v,r.promise,2)}u=v.h;return v.return(dv(a,u,c))})}
|
|
function dv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N,R,Q,Y,ia,X,ja,Pa,Ka,jb,ab,Ia,Va,Mb,bb,Bb,Ud,Ub,qd,Vb,Ib,Ch,Uc,Ne,Rf,Sf,Rj;return I(function(Vc){switch(Vc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=le(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=pe(l))p=Nc(d,[n])[0],m&&(a.h?hu(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=iu(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Re=b.attributes.id||
|
|
"";a.l.Wd=ue(b,"publishTime",xe)||0;a.H=le(b,"PatchLocation");u=Promise.resolve();if((v=re(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new du(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,z=pe(v))(y=ue(v,"queryBeforeStart",Ee,!1))?u=eu(a.h,z):eu(a.h,z);B=t(f.keys());for(C=B.next();!C.done;C=B.next())D=C.value,G=f.get(D),hu(a.h,"Location",D,G)}A=le(b,"BaseURL");E=!1;if(a.h)for(F=t(A),J=F.next();!J.done;J=F.next())L=J.value,
|
|
K=L.attributes.serviceLocation,O=pe(L),K&&O&&(hu(a.h,"BaseURL",K,O),E=!0);a.Y=null;E&&a.h||(M=A.map(pe),a.Y=Nc(d,M));N=function(){return a.h&&E?iu(a.h,"BaseURL"):a.Y?a.Y:[]};a.l.cb=N;R=0;A&&A.length&&(R=ue(A[0],"availabilityTimeOffset",De)||0);a.l.sb=R;Q=a.g.dash.ignoreMinBufferTime;Y=0;Q||(Y=ue(b,"minBufferTime",ye)||0);a.L=ue(b,"minimumUpdatePeriod",ye,-1);ia=ue(b,"availabilityStartTime",xe);X=ue(b,"timeShiftBufferDepth",ye);ja=a.g.dash.ignoreSuggestedPresentationDelay;Pa=null;ja||(Pa=ue(b,"suggestedPresentationDelay",
|
|
ye));Ka=a.g.dash.ignoreMaxSegmentDuration;jb=null;Ka||(jb=ue(b,"maxSegmentDuration",ye));ab=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.V=a.i.presentationTimeline.T()&&"static"==ab);a.l.type=ab;ev(a);if(a.i)for(Ia=a.i.presentationTimeline,Va=Ia.Cb(),Mb=t(Object.values(a.s)),bb=Mb.next();!bb.done;bb=Mb.next())Bb=bb.value,Bb.segmentIndex&&Bb.segmentIndex.Ya(Va);else Ud=0,Ud=null!=Pa?Math.min(Pa,X||Infinity):0<a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:Math.min(1.5*Y,
|
|
X||Infinity),Ia=new Uk(ia,Ud,a.g.dash.autoCorrectDrift);Ia.Xc("static"==ab);(Ub=Ia.T())&&!isNaN(a.g.availabilityWindowOverride)&&(X=a.g.availabilityWindowOverride);null==X&&(X=Infinity);Ia.ef(X);qd=b.attributes.profiles||"";a.l.profiles=qd.split(",");Vb={cc:"static"!=ab,presentationTimeline:Ia,Ca:null,wa:null,ua:null,N:null,bandwidth:0,ug:!1,sb:R,hc:null,profiles:qd.split(","),roles:null,Gb:function(){return""}};a.O=0;Ib=fv(a,Vb,N,b,!1);Ch=Ib.duration;Uc=Ib.periods;("static"!=ab||a.V)&&Ib.Fh||Ia.zb(Ch||
|
|
Infinity);a.ka&&!a.J&&(Ne=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.J=a.j.isLowLatencyMode());a.J&&Ia.ri(a.aa);Ia.Dg(jb||1);return x(Vc,u,2);case 2:a.J&&(Y=0,Rf=null!=Pa?Pa:a.g.defaultPresentationDelay,Ia.Vg(Rf));if(!a.i)return x(Vc,a.m.Nf(Uc,Vb.cc),6);a.i.periodCount=Uc.length;a.i.gapCount=a.O;return x(Vc,gv(a,Uc,!1),4);case 6:a.i={presentationTimeline:Ia,variants:a.m.l,textStreams:a.m.ng(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:Y||0,sequenceMode:a.g.dash.sequenceMode,
|
|
ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:hv(b),nextUrl:iv(b),periodCount:Uc.length,gapCount:a.O,isLowLatency:a.ka,startTime:null};if(!Ia.Li()){Vc.B(7);break}Sf=le(b,"UTCTiming");return x(Vc,jv(a,N,Sf),8);case 8:Rj=Vc.h;if(!a.j)return Vc.return();Ia.si(Rj);case 7:Ia.Ne();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(Vc)}})}
|
|
function gv(a,b,c){var d;return I(function(e){if(1==e.g)return x(e,a.m.Nf(b,!0,c),2);a.i.variants=a.m.l;d=a.m.ng();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
|
|
function cv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K;return I(function(O){if(1==O.g){c=b.attributes.mpdId;d=ue(b,"originalPublishTime",xe);if(!c||c!==a.l.Re||d!==a.l.Wd)throw a.H=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(ke(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Ge(l.attributes.sel||""),n=m[m.length-1],p=pe(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.nc){r=pe(l)||"";var M=ye(r);if(null!=M){a.l.hc=M;for(var N=t(a.u.values()),R=N.next();!R.done;R=N.next())R.value.hc=
|
|
M}}else if("type"===n.nc){a.i.presentationTimeline.Xc("static"==p);a.l.type=p;M=t(a.u.values());for(N=M.next();!N.done;N=M.next())N.value.cc="dynamic"==p;"static"==p&&(a.L=-1)}else"publishTime"===n.nc?a.l.Wd=xe(p)||0:null===n.nc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)He(a.H,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&kv(a,n.id);else if("SegmentTemplate"===n.name){N=Ge(l.attributes.sel||"");M=N[N.length-1];if(M.nc){N=lv(a,N);R=pe(l)||
|
|
"";for(var Q=t(N),Y=Q.next();!Y.done;Y=Q.next())Y=a.u.get(Y.value),Je(Y.N.Cc,l.tagName,M.nc,R);M=N}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())z=w.value,g.add(z)}else if("SegmentTimeline"===n.name||"S"===n.name){M=Ge(l.attributes.sel||"");M=lv(a,M);N=t(M);for(R=N.next();!R.done;R=N.next())R=a.u.get(R.value),R=st(R,Ut,"SegmentTimeline"),Q=le(R,"S"),He(Q,l),R.children=Q;y=M;B=t(y);for(C=B.next();!C.done;C=B.next())D=C.value,g.add(D)}G=t(g);for(A=G.next();!A.done;A=G.next())E=A.value,mv(a,
|
|
E);F=t(f);for(J=F.next();!J.done;J=F.next())L=J.value,e.push.apply(e,ha(nv(a,L)));if(!e.length)return O.B(2);a.i.periodCount+=e.length;a.i.gapCount=a.O;return x(O,gv(a,e,!0),2)}"static"==a.l.type&&(K=a.l.hc,a.i.presentationTimeline.zb(K||Infinity));H(O)})}
|
|
function nv(a,b){return fv(a,{cc:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,Ca:null,wa:null,ua:null,N:null,bandwidth:0,ug:!1,sb:a.l.sb,profiles:a.l.profiles,hc:a.l.hc,roles:null,Gb:function(){return""}},a.l.cb,b,!0).periods}function kv(a,b){a.i.periodCount--;for(var c=t(a.u.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.u.get(d);st(e,Ut,"SegmentTimeline").children=[];mv(a,d);a.u.delete(d)}a.G=a.G.filter(function(f){return f!==b})}
|
|
function lv(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.u.values()),a=e.next();!a.done;a=e.next())a=a.value,a.Ca.id===c&&a.ua.id===d&&a.N.id&&b.push(c+","+a.N.id);else if(-1<e)for(d=t(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.Ca.id===c&&a.ua.position===e&&a.N.id&&b.push(c+
|
|
","+a.N.id);return b}function mv(a,b){var c=a.u.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ya(a.i.presentationTimeline.Cb());try{var e=Tt(c,function(f,g,h,k){return ov(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.oa,c.N.aesKey,null,!0);d.createSegmentIndex=function(){return I(function(f){if(1==f.g)return d.segmentIndex?f.B(0):x(f,e.Kc(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.N.contentType,b!=Tc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
function hv(a){var b=re(a,"ServiceDescription");if(!b)return null;a=re(b,"Latency");b=re(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
|
|
return c}function iv(a){a=le(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
|
|
function fv(a,b,c,d,e){var f=b.hc;f||(f=ue(d,"mediaPresentationDuration",ye),a.l.hc=f);var g=0;a.i&&a.i.presentationTimeline&&a.V&&(g=a.i.presentationTimeline.rc());var h=[],k=g;d=le(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=ue(m,"start",ye,k),r=m.attributes.id,u=ue(m,"duration",ye);p=0==l&&0==p&&a.V?g:p;var v=null;if(n){var w=ue(n,"start",ye);null!=w&&(v=w-p+g)}else null!=f&&(v=f-p+g);w=Yc;v&&u&&Math.abs(v-u)>w&&v>u&&a.O++;null==v&&(v=u);if(!(null!==a.P&&null!==r&&null!==p&&p<
|
|
a.P)||a.G.includes(r)||l+1==d.length){null!==p&&(null===a.P||p>a.P)&&(a.P=p);k=pv(a,b,c,{start:p,duration:v,node:m,Th:null==v||!n});h.push(k);b.Ca.id&&v&&(a.oa[b.Ca.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(z){return z.id});return null!=f?{periods:h,duration:f+g,Fh:!1}:{periods:h,duration:k,Fh:!0}}
|
|
function ev(a){var b=Object.keys(a.C).filter(function(f){return!a.G.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.C[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.Dh(a.s[e],c),delete a.s[e];delete a.C[c]}}
|
|
function pv(a,b,c,d){b.Ca=qv(a,d.node,null,c);b.wa=d;b.Ca.sb=b.sb;b.Ca.id||(b.Ca.id="__shaka_period_"+d.start);var e=le(d.node,"EventStream");c=b.presentationTimeline.Cb();e=t(e);for(var f=e.next();!f.done;f=e.next())rv(a,d.start,d.duration,f.value,c);c=le(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=sv(a,e)))b.Gb=e;c=le(d.node,"AdaptationSet").map(function(l,m){return tv(a,b,m,l)}).filter(Xf);if(b.cc){d=
|
|
[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.zk);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);}d=c.filter(function(l){return!l.ih});c=c.filter(function(l){return l.ih});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ih.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next();!k.done;k=h.next())Lg(k.value,e.streams)}}c=uv(a.g.disableAudio,d,"audio");e=uv(a.g.disableVideo,
|
|
d,"video");f=uv(a.g.disableText,d,Tc);d=uv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.Ca.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function uv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,ha(e.streams));return d},[])}
|
|
function tv(a,b,c,d){function e(L){var K=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];K&&L&&(L=Nc(b.ua.cb(),[L],b.Gb()),a.j.addFont(K,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=qv(a,d,b.Ca,null);b.ua.position=c;var h=!1;c=le(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(Xf),
|
|
l=void 0,m=b.ua.contentType==Tc;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var p=n.attributes.schemeIdUri;if(null==p||"urn:mpeg:dash:role:2011"==p)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=le(d,"EssentialProperty");c=null;var u=!1;n=null;p=!1;r=t(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==w)c=v.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==
|
|
w)var z=g(parseInt(v.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==w)var y=f(parseInt(v.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:"urn:dvb:dash:fontdownload:2014"==w?e(v):"urn:mpeg:dash:urlparam:2014"==w?(n=sv(a,v))||(p=!0):p=!0)}if(p)return null;var B=null;p=le(d,"SupplementalProperty");p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,v=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==
|
|
v?B=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?z=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v?y=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==v?e(r):"urn:mpeg:dash:urlparam:2014"==v&&(n=sv(a,r));n&&(b.Gb=n);n=le(d,"Accessibility");var C=new Map,D;n=t(n);for(p=n.next();!p.done;p=n.next())if(r=p.value,p=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=p||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=
|
|
p||a.g.disableText)"urn:mpeg:dash:role:2011"==p?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==r?D="visually impaired":"2"==r&&(D="hard of hearing"));else if(p=1,null!=r)for(r=t(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var G=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],G=w[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,G=w);C.set(v,ad(G))}else C.set("svc1","und");else if(p=1,null!=r)for(r=r.split(";"),v=t(r),w=v.next();!w.done;w=
|
|
v.next()){G=w.value;var A=w=void 0;G.includes("=")?(G=G.split("="),w=G[0].startsWith("CC")?G[0]:"CC"+G[0],A=G[1]||"und"):(w="CC"+p,2==r.length?p+=2:p++,A=G);C.set(w,ad(A))}else C.set("CC1","und");n=le(d,"ContentProtection");var E=et(n,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),F=ad(b.ua.language||"und"),J=b.ua.label;n=le(d,"Representation");d=n.map(function(L){if(L=vv(a,b,E,l,F,J,h,k,C,L,D,B))L.hdr=L.hdr||z,L.colorGamut=L.colorGamut||y,L.fastSwitching=u;return L}).filter(function(L){return!!L});
|
|
if(0==d.length){c="image"==b.ua.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new T(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=wv(d[0].mimeType,d[0].codecs),m=t(d),p=m.next();!p.done;p=m.next())p.value.type=b.ua.contentType;m=b.ua.id||"__fake__"+a.Da++;p=t(d);for(r=p.next();!r.done;r=p.next()){r=r.value;v=t(E.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(ha(w.keyIds),ha(r.keyIds))):
|
|
w.keyIds||r.keyIds;a.g.dash.enableAudioGroups&&(r.groupId=m)}n=n.map(function(L){return L.attributes.id}).filter(Xf);return{id:m,contentType:b.ua.contentType,language:F,gm:h,streams:d,drmInfos:E.drmInfos,ih:c,zk:n}}
|
|
function sv(a,b){if((b=se(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&ue(b,"useMPDUrlQuery",Ee,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.$:c.split("&").map(function(d){if("$querypart$"==d)return a.$;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new ub(a.$)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
|
|
function vv(a,b,c,d,e,f,g,h,k,l,m,n){b.N=qv(a,l,b.ua,null);var p=b.N.id;a.aa=Math.min(a.aa,b.N.sb);a.ka=0<a.aa;if(!xv(b.N))return null;var r=b.wa.start;b.bandwidth=ue(l,"bandwidth",Be)||0;b.roles=h;var u=le(l,"SupplementalProperty"),v=le(l,"EssentialProperty"),w=null,z=v.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri});z?w=sv(a,z):(z=u.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri}))&&(w=sv(a,z));w&&(b.Gb=w);z=b.N.contentType;w=z==Tc||
|
|
"application"==z;z="image"==z;try{var y=void 0;if(c.Gf){var B=b.N.cb,C=b.Gb,D=Nc(B(),[c.Gf.$j],C()),G=Ah(D,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.Gf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,R,Q;return I(function(Y){if(1==Y.g)return x(Y,av(a,G,6),2);if(3!=Y.g){N=Y.h;if(!N.data||16!=N.data.byteLength)throw new T(2,4,4049);R={name:"AES-CBC"};Q=y;return x(Y,window.crypto.subtle.importKey("raw",N.data,R,!0,["decrypt"]),3)}Q.cryptoKey=Y.h;y.fetchKey=void 0;H(Y)})}}}b.N.aesKey=
|
|
y;B=function(N,R,Q,Y){return ov(a,N,R,Q,Y)};if(b.N.xd)var A=It(b,B,y);else if(b.N.kc)A=Ot(b,a.s,y);else if(b.N.Cc)A=Tt(b,B,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.oa,y,n,!1);else{var E=b.wa.duration||0,F=b.N.cb,J=b.N.mimeType,L=b.N.codecs;A={Kc:function(){var N=rl(r,E,F());N.Ub(function(R){R.mimeType=J;R.codecs=L});return Promise.resolve(N)}}}}catch(N){if((w||z)&&4002==N.code)return null;throw N;}l=le(l,"ContentProtection");l=it(l,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);l=new Set(l?[l]:
|
|
[]);B=u.some(function(N){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==N.attributes.schemeIdUri&&"JOC"==N.attributes.value});u=b.N.codecs;C=u.includes("ec-3")&&384E3<=b.bandwidth;n=!1;if(B||C)n=!0;B=!1;w&&(B=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(z&&((v=v.find(function(N){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(N.attributes.schemeIdUri)}))&&(K=v.attributes.value),!K))return null;var O;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&
|
|
(u.includes("hvc1.2.4.L153.B0")||u.includes("hev1.2.4.L153.B0"))&&(O="PQ");v=b.N.id?b.Ca.id+","+b.N.id:"";a.H.length&&p&&a.u.set(b.Ca.id+","+p,yv(b));var M=v&&a.s[v]?a.s[v]:{id:a.Da++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){M.segmentIndex&&(M.segmentIndex.release(),M.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:u,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,
|
|
height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:l,language:e,originalLanguage:b.ua.language,label:f,type:b.ua.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:B,channelsCount:b.N.Te,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:n,closedCaptions:k,hdr:O,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([yf(b.N.mimeType,b.N.codecs)])};M.createSegmentIndex=
|
|
function(){var N;return I(function(R){if(1==R.g){if(M.segmentIndex)return R.B(0);N=M;return x(R,A.Kc(),3)}N.segmentIndex=R.h;H(R)})};v&&b.cc&&!a.s[v]&&(b=b.Ca.id||"",a.C[b]||(a.C[b]=[]),a.s[v]=M,a.C[b].push(v));return M}function yv(a){function b(c){if(!c)return null;c=be(c);c.xd=null;c.kc=null;c.Cc=Le(c.Cc);return c}a=be(a);a.Ca=b(a.Ca);a.ua=b(a.ua);a.N=b(a.N);a.wa&&(a.wa=be(a.wa),a.wa.node=null);return a}
|
|
function Xu(a){var b,c;return I(function(d){switch(d.g){case 1:return b=0,ua(d,2),x(d,Yu(a),4);case 4:b=d.h;wa(d,3);break;case 2:if(c=xa(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Zu(a,b);H(d)}})}function Zu(a,b){if(!(0>a.L)){var c=a.L;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.M.X(Math.max(c-b,od(a.ra)))}}
|
|
function qv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Te:null,audioSamplingRate:null,sb:0,cf:0};d=d||c.cb;var e=b.attributes.id,f=le(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=pe(m);l&&m&&(hu(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(pe));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=ve(b,
|
|
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=Yl(m).join(",");n=ue(b,"frameRate",Fe)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=zv(le(b,"InbandEventStream"),c.emsgSchemeIdUris),u=le(b,"AudioChannelConfiguration");u=Av(u)||c.Te;var v=ue(b,"audioSamplingRate",Ce)||c.audioSamplingRate;k||(k=wv(l,m));var w=re(b,"SegmentBase"),z=re(b,"SegmentTemplate"),y=w?ue(w,"availabilityTimeOffset",De)||0:0,B=z?ue(z,"availabilityTimeOffset",De)||0:0,C=f&&f.length?ue(f[0],"availabilityTimeOffset",
|
|
De)||0:0;y=c.sb+C+y+B;B=null;(C=re(b,"SegmentSequenceProperties"))&&(C=re(C,"SAP"))&&(B=ue(C,"cadence",Ae));C=b.attributes.label;var D=le(b,"Label");D&&D.length&&(D=D[0],me(D)&&(C=me(D)));return{cb:function(){return Nc(d(),f.length?a.h&&h?iu(a.h,e):g?g:[]:[])},xd:w||c.xd,kc:re(b,"SegmentList")||c.kc,Cc:z||c.Cc,width:ue(b,"width",Ce)||c.width,height:ue(b,"height",Ce)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,Te:u,audioSamplingRate:v,
|
|
sb:y,Fe:null,cf:B||c.cf,label:C||null}}function zv(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
function Av(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
|
|
16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&0<b&&b<c.length)return c[b]}}return null}
|
|
function xv(a){var b=a.xd?1:0;b+=a.kc?1:0;b+=a.Cc?1:0;if(0==b)return a.contentType==Tc||"application"==a.contentType?!0:!1;1!=b&&(a.xd&&(a.kc=null),a.Cc=null);return!0}
|
|
function Bv(a,b,c,d){var e,f,g,h,k,l,m;return I(function(n){if(1==n.g)return e=[Fc(c)],f=Nc(b(),e),g=Ah(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ha()}),uh(a.S,h),x(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=yc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
function jv(a,b,c){var d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;ua(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
|
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Za("NTP UTCTiming scheme is not supported");break;default:Za("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return x(n,Bv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return x(n,Bv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:wa(n,
|
|
3);break;case 5:xa(n);case 3:g=f.next();n.B(2);break;case 4:return Za("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
function rv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=ue(d,"timescale",Ce)||1,k=ue(d,"presentationTimeOffset",Ce)||0;d=t(le(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=ue(l,"presentationTime",Ce)||0,n=ue(l,"duration",Ce)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Ke(l),eventNode:Le(l)},a.j.onTimelineRegionAdded(l))}}
|
|
function ov(a,b,c,d,e){var f,g,h,k;return I(function(l){if(1==l.g)return f=Hh,g=e?0:1,h=bm(b,c,d,a.g.retryParameters),x(l,av(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function wv(a,b){b=yf(a,b);return Mf(b)?Tc:a.split("/")[0]}function av(a,b,c,d){d||(d={});d.isPreload=a.ha();b=a.j.networkingEngine.request(c,b,d);uh(a.S,b);return b.promise}
|
|
function $u(a){var b=a.l.Wd;if(!a.l.Re||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=Ce(e.attributes.ttl);return!e||b+e>c}).map(pe).filter(Xf);return d.length?Nc(a.A,d):[]}P("shaka.dash.DashParser",Wu);Zi["application/dash+xml"]=function(){return new Wu};Zi["video/vnd.mpeg.dash.mpd"]=function(){return new Wu};function Cv(){}P("shaka.dependencies",Cv);Cv.has=function(a){return Dv.has(a)};Cv.add=function(a,b){if(!Ev[a])throw Error(a+" is not supported");a==Fv?Bd("mux.js","mux.js is no longer used in Shaka Player."):Dv.set(a,function(){return b})};var Fv="muxjs",Ev={hm:Fv,ISOBoxer:"ISOBoxer"};Cv.Allowed=Ev;var Dv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Gv(a,b,c){this.type=a;this.ea=b;this.segments=c||null}function Hv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Hv.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
function Iv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Jv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Kv(a,b,c){return(a=Jv(a,b))?a.value:c||null}function Lv(a,b){a=Jv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Mv(a,b,c){c=void 0===c?[]:c;this.ea=b;this.g=a;this.Xb=c}function Nv(a,b){this.name=a;this.value=b};function Ov(a,b){return a.filter(function(c){return c.name==b})}function Pv(a,b){return a.filter(function(c){return Lv(c,"TYPE")==b})}function Qv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Rv(a,b,c){c=void 0===c?0:c;return(a=Qv(a,b))?Number(a.value):c}function Sv(a,b,c){return b?Tv(a,[b],c):[]}function Tv(a,b,c){if(!b.length)return[];b=Nc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(Uv(d.value,c));return a}
|
|
function Uv(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new T(2,4,4039,e);}}return a};function Vv(){this.g=0}
|
|
function Wv(a,b){b=yc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Xv(a,f),--a.g,Yv.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Xv(a,g);if(Zv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Xv(a,k),Yv.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Kv(k,"TYPE")?f.push(k):"MAP"==Kv(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Mv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Mv("",d,f)));return new Gv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
g.name&&(g.attributes.push(new Nv("URI",h)),d=!0)}}return new Gv(b,e)}function Xv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Sd(d);var f;(f=Vd(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Vd(d,g);)c.push(new Nv(f[1],f[2]||f[3])),Td(d)}return new Hv(a,b,c,e)}
|
|
var Yv="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),Zv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function $v(){}function aw(a){try{var b=bw(a);return ph({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return nh(c)}}
|
|
function bw(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Jc(a):e=Cc(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",$v);$v.parse=aw;wh("data",aw);function cw(){var a=this;this.g=this.h=null;this.G=1;this.A=new Map;this.J=new Map;this.P=new Map;this.P.set("video",new Map);this.P.set("audio",new Map);this.P.set(Tc,new Map);this.P.set("image",new Map);this.Db=new Set;this.i=new Map;this.l=null;this.O="";this.Xa=new Vv;this.K=-1;this.ka=Infinity;this.ha=this.zc=this.kb=!1;this.C=new Zb(function(){if(a.$&&!a.g.continueLoadingWhenPaused&&(a.Y.Ma(a.$,"timeupdate"),a.$.paused)){a.Y.sa(a.$,"timeupdate",function(){return dw(a)});return}dw(a)});this.Ea=
|
|
ew;this.m=null;this.bb=0;this.s=Infinity;this.Ja=this.Ia=this.V=0;this.aa=new th;this.H=new Map;this.I=new Map;this.za=new Map;this.oa=new Map;this.M=new Map;this.ra=new Map;this.Da=new Map;this.yc=this.L=!1;this.Nb=new nd(5);this.j=null;this.S=!0;this.Ha=new Set;this.Y=new rd;this.u=this.$=null;this.wc=function(){return!1}}q=cw.prototype;q.configure=function(a,b){this.g=a;b&&(this.wc=b);this.j&&this.j.configure(this.g)};
|
|
q.start=function(a,b){var c=this,d;return I(function(e){return 1==e.g?(c.h=b,c.L=b.isLowLatencyMode(),x(e,fw(c,[a]).promise,2)):3!=e.g?(d=e.h,c.O=d.uri,x(e,gw(c,d.data,a),3)):e.return(c.m)})};
|
|
q.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.aa&&(a.push(this.aa.destroy()),this.aa=null);this.g=this.h=null;this.Db.clear();this.m=null;this.i.clear();this.J.clear();this.I.clear();this.A.clear();this.za.clear();this.oa.clear();this.M.clear();this.ra.clear();this.Da.clear();this.Ha.clear();this.j&&this.j.destroy();this.Y&&(this.Y.release(),this.Y=null);return Promise.all(a)};
|
|
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return I(function(r){if(1==r.g){if(!hw(a))return r.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(iw(a,g));return x(r,Promise.all(b),2)}jw(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.Md});d.length&&!h&&(k=kw,lw(a,k.Si),l=d.map(function(u){return u.fc}),a.l.zb(Math.min.apply(Math,ha(l))),
|
|
a.h.updateDuration());h&&mw(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.segmentIndex&&!Bg(p.stream.segmentIndex)&&a.h.disableStream(p.stream);H(r)})};function nw(a,b){return hw(a)?a.P.get(b.type):b.Oe}
|
|
function iw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N,R,Q,Y,ia,X;return I(function(ja){switch(ja.g){case 1:c=[];d=t(b.R());for(e=d.next();!e.done;e=d.next())f=e.value,g=new ob(f),h=g.g,b.qe&&(0<=b.Pb&&h.add("_HLS_msn",String(b.Pb)),0<=b.Qb&&h.add("_HLS_part",String(b.Qb))),b.re&&h.add("_HLS_skip","YES"),Eb(h)&&sb(g,h),c.push(g.toString());ua(ja,2);return x(ja,fw(a,c,!0).promise,4);case 4:k=ja.h;wa(ja,3);break;case 2:throw l=xa(ja),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return ja.return();
|
|
m=Wv(a.Xa,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.R().includes(n)||b.ki.push(n);p=Ov(m.ea,"EXT-X-DEFINE");r=ow(a,p,n);u=b.stream;v=nw(a,b);return x(ja,pw(a,m,u.mimeType,b.R,r),5);case 5:w=ja.h;z=w.keyIds;y=w.drmInfos;B=function(Pa,Ka){return Pa.size===Ka.size&&[].concat(ha(Pa)).every(function(jb){return Ka.has(jb)})};B(u.keyIds,z)||(u.keyIds=z,u.drmInfos=y,a.h.newDrmInfo(u));C=qw(a,m,v,r,b.R,b.type);D=C.segments;if(G=C.bandwidth)u.bandwidth=G;A=Vl(u);E=t(D);for(F=E.next();!F.done;F=
|
|
E.next())J=F.value,J.ma&&(J.ma.pd=A);u.segmentIndex.Td(D,a.l.Cb());D.length&&(L=Rv(m.ea,"EXT-X-MEDIA-SEQUENCE",0),O=(K=Qv(m.ea,"EXT-X-SKIP"))?Number(Kv(K,"SKIPPED-SEGMENTS")):0,M=rw(L,D),N=M.Pb,R=M.Qb,b.Pb=N+O,b.Qb=R,Q=v.get(L),u.segmentIndex.Ya(Q));if(Y=Bg(u.segmentIndex))b.Tc=Y.startTime,ia=D[D.length-1],b.fc=ia.endTime;if(X=Qv(m.ea,"EXT-X-ENDLIST"))b.Md=!0;sw(a,m);tw(a,m.ea,u.type,r,b.R);H(ja)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
|
|
q.banLocation=function(a){this.j&&this.j.banLocation(a)};q.setMediaElement=function(a){this.$=a};
|
|
function uw(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.K,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=nw(a,f);if(g=Bg(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.K=Math.max(a.K,l));f.Uf=l;break}}}}if(!(0>a.K))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,vw(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.Uf,0<f&&(e.g.splice(0,f),e=Bg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
ww(a,d,e)}
|
|
function xw(a,b){if(Infinity==a.ka){b=t(b);for(var c=b.next();!c.done;c=b.next())c=Bg(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.ka=Math.min(a.ka,c.h))}b=a.ka;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!vw(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=Bg(e);if(f)if(null==f.h)Ya("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.R(),"Expect AV sync issues!");else for(ww(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.eh(b)}}}}
|
|
function ww(a,b,c){b.Tc+=c;b.fc+=c;a=nw(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.R()}
|
|
function gw(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N,R,Q,Y,ia;return I(function(X){switch(X.g){case 1:d=Xc;e=Wv(a.Xa,b);f=Ov(e.ea,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new Uk(null,0);a.l.Xc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.S=!1,C=Ov(e.ea,"EXT-X-DEFINE"),n=ow(a,C,a.O),m=d.ya,D="",G=new Map,x(X,yw(a,a.G++,n,e,l,"",m,D,!0,"Media Playlist",null,G,null,!1,null,!1),7);zw(a,f);p=Ov(e.ea,"EXT-X-MEDIA");r=Ov(e.ea,"EXT-X-STREAM-INF");u=Ov(e.ea,"EXT-X-IMAGE-STREAM-INF");
|
|
v=Ov(e.ea,"EXT-X-I-FRAME-STREAM-INF");w=Ov(e.ea,"EXT-X-SESSION-KEY");z=Ov(e.ea,"EXT-X-SESSION-DATA");y=Ov(e.ea,"EXT-X-CONTENT-STEERING");Aw(a,z);return x(X,Bw(a,y),4);case 4:return Cw(a,r),Dw(a,p),B=Ew(a,v),x(X,Fw(a,r,w,p,l,a.A,B),5);case 5:return g=X.h,h=Gw(a,p),x(X,Hw(a,u,v),6);case 6:k=X.h;X.B(3);break;case 7:A=X.h,a.i.set(c,A),A.stream&&(E=Vl(A.stream),A.stream.segmentIndex.Ub(function(ja){ja.ma&&(ja.ma.pd=E)})),m=A.stream.type,g.push({id:0,language:ad(D||"und"),disabledUntilTime:0,primary:!0,
|
|
audio:"audio"==m?A.stream:null,video:"video"==m?A.stream:null,bandwidth:A.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);Iw(a,e);1==e.type&&(hw(a)&&(Jw(a,e),F=a.s,a.C.X(F)),J=Array.from(a.i.values()),Kw(a,J),mw(a),tw(a,e.ea,m,n,l));a.m={presentationTimeline:a.l,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.u};if(a.ha||!a.g.hls.disableCodecGuessing){X.B(8);break}L=[];K=t(a.m.variants);for(O=K.next();!O.done;O=K.next())M=O.value,M.audio&&""===M.audio.codecs&&L.push(M.audio.createSegmentIndex()),M.video&&""===M.video.codecs&&L.push(M.video.createSegmentIndex());return x(X,Promise.all(L),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];R=g[0];Q=t([R.video,R.audio]);for(Y=Q.next();!Y.done;Y=
|
|
Q.next())(ia=Y.value)&&!ia.segmentIndex&&N.push(ia.createSegmentIndex());if(0<N.length)return x(X,Promise.all(N),0)}X.B(0)}})}
|
|
function Lw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E;return I(function(F){switch(F.g){case 1:c=Wl(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return F.return(c);d=Mw(a,b);e=d.segment;f=d.segmentIndex;g=e.R();h=g[0];k=new ob(h);l=k.rb.split(".").pop();if(m=Nw[l])return F.return(Wl(m));n=Hh;r=p=null;u=e.ma;if(!u){F.B(2);break}v=bm(u.R(),u.Kb(),u.Ib(),a.g.retryParameters);return x(F,Ow(a,v,n,{type:0}).promise,3);case 3:w=F.h;p=w.data;if(!u.aesKey){F.B(4);break}return x(F,am(p,u.aesKey,
|
|
0),5);case 5:p=F.h;case 4:(r=w.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return z=bm(e.R(),e.Kb(),e.Ib(),a.g.retryParameters),x(F,Ow(a,z,n,{type:1}).promise,6);case 6:y=F.h;B=y.data;if(!e.aesKey){F.B(7);break}return x(F,am(B,e.aesKey,f),8);case 8:B=F.h;case 7:(C=y.headers["content-type"])&&(C=C.split(";")[0].toLowerCase());D="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");G=["audio/mp4","video/mp4","video/iso.segment"];if(Zj(Hb(B))){var J=B,L=a.g.disableAudio,
|
|
K=a.g.disableVideo,O=a.g.disableText;var M=Hb(J);var N=(new Qj).parse(M),R=N.Id();M=N.pg();var Q=[],Y=!1,ia=!1;if(!L)switch(R.audio){case "aac":case "aac-loas":N.vb().length&&(Q.push("mp4a.40.2"),Y=!0);break;case "mp3":N.vb().length&&(Q.push("mp4a.40.34"),Y=!0);break;case "ac3":N.vb().length&&(Q.push("ac-3"),Y=!0);break;case "ec3":N.vb().length&&(Q.push("ec-3"),Y=!0);break;case "opus":N.vb().length&&(Q.push("opus"),Y=!0)}if(!K)switch(R.video){case "avc":M.codec?Q.push(M.codec):Q.push("avc1.42E01E");
|
|
ia=!0;break;case "hvc":M.codec?Q.push(M.codec):Q.push("hvc1.1.6.L93.90");ia=!0;break;case "av1":Q.push("av01.0.01M.08"),ia=!0}if(Q.length){L=Y&&!ia;K=new Map;if(ia&&!O){O=new Id("video/mp2t");O.i(J);J=t(O.j());for(ia=J.next();!ia.done;ia=J.next())ia=ia.value,K.set(ia,ia);O.g()}M={type:L?"audio":"video",mimeType:"video/mp2t",codecs:Q.join(", "),language:null,height:M.height,width:M.width,channelCount:null,sampleRate:null,closedCaptions:K,ce:null,colorGamut:null,frameRate:M.frameRate}}else M=null;if(A=
|
|
M)return F.return(A)}else if(D.includes(l)||G.includes(C)||r&&G.includes(r))if(E=Xl(p,B,a.g.disableText))return F.return(E);return C?F.return(Wl(C)):r?F.return(Wl(r)):F.return(c)}})}
|
|
function mw(a){if(hw(a)){if(a.Ea==Pw){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.fc),c=Math.min(c,e.Tc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ef(b)}}else a.l.zb(Qw(a));if(!a.l.u)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=Bg(c.stream.segmentIndex))&&c.h&&a.l.wi(c.h);
|
|
a.l.Ne()}function zw(a,b){var c=(new ob(a.O)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Kv(e,"NAME");var f=Kv(e,"VALUE");e=Kv(e,"QUERYPARAM");d&&f&&(a.A.has(d)||a.A.set(d,f));e&&(d=c.get(e)[0])&&!a.A.has(d)&&a.A.set(e,d)}}
|
|
function ow(a,b,c){c=(new ob(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Kv(f,"NAME"),h=Kv(f,"VALUE");e=Kv(f,"QUERYPARAM");f=Kv(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.A.get(f))&&d.set(f,e)}return d}
|
|
function Cw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Kv(d,"AUDIO");c=Kv(d,"VIDEO");var f=Kv(d,"SUBTITLES");d=Rw(a,d);if(f){var g=Rc(Tc,d);a.I.set(f,g);Pd(d,g)}e&&(f=Rc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=Rc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}}
|
|
function Aw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Kv(d,"DATA-ID");c=Kv(d,"URI");var f=Kv(d,"LANGUAGE");d=Kv(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Sv([a.O],c,a.A)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new S("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
function Bw(a,b){var c,d,e,f,g,h;return I(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Kv(f,"PATHWAY-ID"),h=Kv(f,"SERVER-URI"),g&&h){a.j=new du(a.h);a.j.configure(a.g);a.j.i=[a.O];a.j.setManifestType("HLS");a.j.h=g;c=eu(a.j,h);break}return x(k,c,0)})}
|
|
function Gw(a,b){var c=Pv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Sw(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Lv(d.value,"GROUP-ID");if(d=a.I.get(e))if(e=a.J.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Tw(Tc,d)||Uw(Tc),Vw(f.stream)}}return b.filter(function(g){return g})}
|
|
function Vw(a){var b=new Set([yf(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Ub(function(c){c.mimeType&&b.add(yf(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
function Hw(a,b,c){var d,e;return I(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return I(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ua(m,2);return x(m,Ww(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=xa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Xw(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
|
|
throw k;}})),x(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function Yw(a,b,c){b=b.filter(function(h){var k=Kv(h,"URI")||"";return"SUBTITLES"!=Kv(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Iv(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Sw(a,d[g],c)}function Ew(a,b){return b.map(function(c){c=Xw(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})}
|
|
function Fw(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N,R,Q,Y,ia,X,ja,Pa,Ka,jb,ab;return I(function(Ia){switch(Ia.g){case 1:h=[];k=new Set;if(!(0<c.length)){Ia.B(2);break}l=t(c);m=l.next();case 3:if(m.done){Ia.B(2);break}n=m.value;p=Lv(n,"METHOD");r=Kv(n,"KEYFORMAT")||"identity";u=null;if("NONE"==p){Ia.B(4);break}if(Zw(p)){v=Sv(e(),Lv(n,"URI"),f);w=v.sort().join("");a.M.has(w)||(z=Ah(v,a.g.retryParameters),y=Ow(a,z,6).promise,a.M.set(w,y));Ia.B(4);break}if("identity"!=r){u=
|
|
(B=$w[r])?B(n,""):null;Ia.B(6);break}return x(Ia,ax(a,n,"",e,null,f),9);case 9:u=Ia.h;case 6:if(u){if(u.keyIds)for(C=t(u.keyIds),D=C.next();!D.done;D=C.next())G=D.value,k.add(G);h.push(u)}case 4:m=l.next();Ia.B(3);break;case 2:A={};E=t(b);for(F=E.next();!F.done;F=E.next())J=F.value,L=Iv(J,!a.j),A[L]?A[L].push(J):A[L]=[J];K=[];for(O in A)M=A[O],N=M[0],R=Kv(N,"FRAME-RATE"),Q=Number(Kv(N,"AVERAGE-BANDWIDTH"))||Number(Lv(N,"BANDWIDTH")),Y=Kv(N,"RESOLUTION"),ia=t(Y?Y.split("x"):[null,null]),X=ia.next().value,
|
|
ja=ia.next().value,Pa=Kv(N,"VIDEO-RANGE"),(Ka=Kv(N,"REQ-VIDEO-LAYOUT"))&&Ka.includes(",")&&(jb=Ka.split(",").filter(function(Va){return"CH-STEREO"==Va||"CH-MONO"==Va}),Ka=jb[0]),Ka=Ka||"CH-MONO",ab=bx(a,M,d),K.push.apply(K,ha(cx(a,ab.audio,ab.video,Q,X,ja,R,Pa,Ka,h,k,g)));return Ia.return(K.filter(function(Va){return null!=Va}))}})}
|
|
function bx(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Kv(m,"AUDIO");var n=Kv(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Kv(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(Lv(v,"GROUP-ID"))}),Yw(a,k,e));k=(e=f.sort().join(","))&&a.J.has(e)?a.J.get(e):[];g?d.audio.push.apply(d.audio,ha(k)):h&&d.video.push.apply(d.video,ha(k));l=!1;var r=b.map(function(v){return Lv(v,
|
|
"URI")});h=d.audio.find(function(v){return v&&v.R().find(function(w){return r.includes(w)})});g=Rw(a,b[0]);n=Rc("video",g);(p=Rc("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(v){var w=Kv(v,"URI")||"",z=Kv(v,"TYPE");v=Lv(v,"GROUP-ID");return"SUBTITLES"!=z&&""==w&&f.includes(v)}))&&(l=Kv(c,"LANGUAGE"),
|
|
n=Kv(c,"NAME"),p=dx(c),ex(c),m=Kv(c,"CHARACTERISTICS"),u=fx(c));a=gx(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
function Rw(a,b){var c=Kv(b,"CODECS")||"";b=Kv(b,"SUPPLEMENTAL-CODECS");a.ha=0<c.length;a.ha||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,ha(b)));return Yl(a)}function dx(a){return(a=Kv(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
function fx(a){return(a=Kv(a,"SAMPLE-RATE"))?parseInt(a,10):null}function ex(a){return(a=Kv(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
function cx(a,b,c,d,e,f,g,h,k,l,m,n){for(var p=t(c),r=p.next();!r.done;r=p.next())hx(r.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var u=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=u?u.stream:null)k.drmInfos=l,k.keyIds=m,Lg(k,n);k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);p=f?f.stream.drmInfos:null;r=u?u.stream.drmInfos:
|
|
null;u=u?u.R().sort().join(","):"";var v=f?f.R().sort().join(","):"";u=u+" - "+v;h&&k&&!Rb(p,r)||a.Db.has(u)||(h={id:a.G++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Db.add(u))}return e}
|
|
function Dw(a,b){b=Pv(b,"CLOSED-CAPTIONS");a.S=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Kv(d,"LANGUAGE");c=ad(e||"und");e||(e=Kv(d,"NAME"))&&(c=e);e=Lv(d,"GROUP-ID");d=Lv(d,"INSTREAM-ID").replace("SERVICE","svc");a.H.get(e)||a.H.set(e,new Map);a.H.get(e).set(d,c)}}
|
|
function Sw(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Lv(k,"URI");k=Lv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Lv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Tc);if(k==Tc)b=Kv(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.I.has(l)){b=a.I.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.G++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
m=n.next().value;n=n.next().value;(m=c.get(m))&&hu(a.j,l,m,n)}}c=Kv(h,"LANGUAGE");f=Kv(h,"NAME");m="YES"==Kv(h,"DEFAULT");n="audio"==k?dx(h):null;var p="audio"==k?ex(h):!1,r=Kv(h,"CHARACTERISTICS"),u="YES"==Kv(h,"FORCED");h="audio"==k?fx(h):null;d=ix(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.J.has(g)?a.J.get(g).push(d):a.J.set(g,[d]);a.i.set(e,d);return d}
|
|
function Ww(a,b){var c,d,e,f,g,h,k,l,m,n;return I(function(p){if(1==p.g){c=Lv(b,"URI");d=Kv(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Kv(b,"LANGUAGE");f=Kv(b,"NAME");g=Kv(b,"CHARACTERISTICS");h=ix(a,a.G++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Kv(b,"RESOLUTION"))?x(p,h.stream.createSegmentIndex(),3):p.B(2)}2!=p.g&&(l=Bg(h.stream.segmentIndex),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
Number(m.split("x")[1]));if(n=Kv(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
function Xw(a,b){var c="video",d=Lv(b,"URI"),e=Kv(b,"CODECS")||"";"mjpg"==e&&(c="image");if(a.i.has(d))return a.i.get(d);var f=Kv(b,"LANGUAGE"),g=Kv(b,"NAME"),h=Kv(b,"CHARACTERISTICS");c=ix(a,a.G++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=Kv(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=Kv(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
|
|
function gx(a,b,c,d,e,f,g,h,k){for(var l=a.G++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=Lv(r,"URI");r=Kv(r,"PATHWAY-ID");a.j&&r&&hu(a.j,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Kv(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.S=!1;b=null;break a}if(b){if("NONE"!=b){b=a.H.get(b);break a}a.S=!1}else if(!b&&a.H.size)for(b=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=Qc(d,c);d=ix(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);
|
|
a.i.set(n,d);return d}
|
|
function ix(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(D){var G,A,E,F,J,L,K,O,M,N,R,Q,Y,ia,X,ja,Pa,Ka,jb,ab,Ia,Va,Mb;return I(function(bb){switch(bb.g){case 1:return G=Xc,ua(bb,2),A=y.R(),x(bb,D.promise,4);case 4:E=bb.h;if(D.aborted)return bb.return();F=E.uri;F==E.originalUri||A.includes(F)||z.push(F);J=Wv(a.Xa,E.data);if(1!=J.type)throw new T(2,4,4017);L=Ov(J.ea,"EXT-X-DEFINE");K=ow(a,L,F);O=!1;(!a.ha&&a.g.hls.disableCodecGuessing||a.S&&e==G.ya&&!a.g.hls.disableClosedCaptionsDetection)&&0<J.segments.length&&
|
|
(a.S=!1,O=!0);M=!a.ha&&a.g.hls.disableCodecGuessing;N=hw(a);return x(bb,yw(a,0,K,J,v,d,e,f,g,h,k,l,m,n,p,r,void 0,O,M),5);case 5:R=bb.h;if(D.aborted)return bb.return();Q=R.stream;Iw(a,J);hw(a)&&!N&&Jw(a,J);y.Tc=R.Tc;y.fc=R.fc;y.re=R.re;y.qe=R.qe;y.Md=R.Md;y.Oe=R.Oe;y.Pb=R.Pb;y.Qb=R.Qb;y.Bg=!0;w.segmentIndex=Q.segmentIndex;w.encrypted=Q.encrypted;w.drmInfos=Q.drmInfos;w.keyIds=Q.keyIds;w.mimeType=Q.mimeType;w.bandwidth=w.bandwidth||Q.bandwidth;w.codecs=w.codecs||Q.codecs;w.closedCaptions=w.closedCaptions||
|
|
Q.closedCaptions;w.width=w.width||Q.width;w.height=w.height||Q.height;w.hdr=w.hdr||Q.hdr;w.colorGamut=w.colorGamut||Q.colorGamut;w.frameRate=w.frameRate||Q.frameRate;"und"==w.language&&"und"!=Q.language&&(w.language=Q.language);w.language=w.language||Q.language;w.channelsCount=w.channelsCount||Q.channelsCount;w.audioSamplingRate=w.audioSamplingRate||Q.audioSamplingRate;Vw(w);w.drmInfos.length&&a.h.newDrmInfo(w);Y=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)Y=!0;
|
|
a.m&&Y&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==G.ya||e==G.ia)for(ia=t(a.i.values()),X=ia.next();!X.done;X=ia.next())ja=X.value,ja.Bg||ja.type!=e||(ja.stream.mimeType=Q.mimeType,Vw(ja.stream));e==G.Na&&(Pa=Bg(Q.segmentIndex))&&Pa.ma&&(w.mimeType="application/mp4",Vw(w));Ka=Vl(w);w.segmentIndex.Ub(function(Bb){Bb.ma&&(Bb.ma.pd=Ka)});jx(a)&&(a.zc?Kw(a,[y]):(a.zc=!0,jb=Array.from(a.i.values()),ab=jb.filter(function(Bb){return Bb.stream.segmentIndex}),Kw(a,ab),mw(a),Ia=a.s,0<Ia&&a.C.X(Ia)));tw(a,
|
|
J.ea,w.type,K,v);a.m&&(a.m.startTime=a.u);wa(bb,0);break;case 2:Va=xa(bb);w.closeSegmentIndex();if(7001===Va.code)return bb.return();Mb=a.h.disableStream(w);if(!Mb)throw Va;H(bb)}})}function v(){return a.j&&1<c.length?iu(a.j,b):z.concat(Tv([a.O],c,a.A))}var w=kx(a,d,e,f,g,h,k,l,m,n,p,r),z=[],y={stream:w,type:e,ki:z,R:v,Tc:0,fc:0,Oe:new Map,re:!1,qe:!1,Md:!1,Uf:-1,Pb:-1,Qb:-1,Bg:!1},B=null,C;w.createSegmentIndex=function(){if(B)return B;C=fw(a,y.R(),!0);return B=new Promise(function(D){D(u(C))})};
|
|
w.closeSegmentIndex=function(){B&&!w.segmentIndex&&C.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);B=null};return y}function Qw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.fc));return b}function jw(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Ub(function(e){c.push(e)});a.l.Vd(c)}
|
|
function Kw(a,b){if(!hw(a))for(var c=Qw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.fd(0,c);jw(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return"audio"==f.stream.type});e=d.some(function(f){return"video"==f.stream.type});d=hw(a)&&!a.kb;c=!hw(a)&&a.kb&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?uw(a,b,d):(xw(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&uw(a,
|
|
b))}function vw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function jx(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
function yw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y){z=void 0===z?!0:z;y=void 0===y?!0:y;var B,C,D,G,A,E,F,J,L,K,O,M,N,R,Q,Y,ia,X,ja,Pa,Ka,jb,ab,Ia,Va,Mb,bb,Bb,Ud;return I(function(Ub){switch(Ub.g){case 1:B=d.segments||[];C=B.every(function(qd){return Qv(qd.ea,"EXT-X-GAP")?!0:!1});if(!B.length||C)throw new T(2,4,4053);lx(a,d);hw(a)&&sw(a,d);D=hw(a)?a.P.get(g):new Map;G=qw(a,d,D,c,e,g);A=G.segments;E=G.bandwidth;O=K=L=J=F=null;if(!(0<A.length&&z)){Ub.B(2);break}return x(Ub,Lw(a,A),3);case 3:M=Ub.h,g=
|
|
M.type,h=M.language,m=M.channelCount,u=M.sampleRate,a.g.disableText||(n=M.closedCaptions),J=M.height,F=M.width,L=M.ce,K=M.colorGamut,O=M.frameRate,y&&(w=M.mimeType,f=M.codecs);case 2:if(w){Ub.B(4);break}return x(Ub,mx(a,g,f,A),5);case 5:w=Ub.h,g!=Tc||f||"application/mp4"!=w||!A[0]||A[0].ma||(w="text/vtt");case 4:return x(Ub,pw(a,d,w,e,c),6);case 6:N=Ub.h;R=N.drmInfos;Q=N.keyIds;Y=N.encrypted;ia=N.Wi;if(Y&&!R.length&&!ia)throw new T(2,4,4026);X=kx(a,f,g,h,k,l,m,n,p,r,u,v);X.encrypted=Y;X.drmInfos=
|
|
R;X.keyIds=Q;X.mimeType=w;E&&(X.bandwidth=E);Vw(X);"video"==g&&(F||J||L||K)&&hx(X,F,J,O,L,null,K);hw(a)&&sw(a,d);ja=A[0].startTime;Pa=A[A.length-1];Ka=Pa.endTime;jb=new pl(A);X.segmentIndex=jb;Ia=(ab=Qv(d.ea,"EXT-X-SERVER-CONTROL"))?null!=Jv(ab,"CAN-SKIP-UNTIL"):!1;Va=ab?null!=Jv(ab,"CAN-BLOCK-RELOAD"):!1;Mb=Rv(d.ea,"EXT-X-MEDIA-SEQUENCE",0);bb=rw(Mb,A);Bb=bb.Pb;Ud=bb.Qb;return Ub.return({stream:X,type:g,ki:[],R:e,Tc:ja,fc:Ka,re:Ia,qe:Va,Md:!1,Uf:-1,Pb:Bb,Qb:Ud,Oe:D,Bg:!1})}})}
|
|
function rw(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Pb:a,Qb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Pb:a,Qb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Pb:a,Qb:c}}
|
|
function kx(a,b,c,d,e,f,g,h,k,l,m,n){var p=Tw(c,b)||Uw(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Tc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.G++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Tc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ad(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
fullMimeTypes:new Set};Vw(a);return a}
|
|
function pw(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N,R;return I(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Ov(k.ea,"EXT-X-KEY"),m=null,l.length)for(m=nx(a,b,k.ea,d,e),n=t(l),p=n.next();!p.done;p=n.next())r=p.value,f.set(r,m);v=u=!1;w=[];z=new Set;y=t(f);B=y.next();case 2:if(B.done){Q.B(4);break}C=B.value;D=t(C);G=D.next().value;A=D.next().value;E=G;F=A;J=Lv(E,"METHOD");if("NONE"==J){Q.B(3);break}u=
|
|
!0;L=Kv(E,"KEYFORMAT")||"identity";K=null;if(Zw(J)){v=!0;Q.B(3);break}if("identity"!=L){K=(O=$w[L])?O(E,c):null;Q.B(6);break}return x(Q,ax(a,E,c,d,F,e),8);case 8:K=Q.h;case 6:if(K){if(K.keyIds)for(M=t(K.keyIds),N=M.next();!N.done;N=M.next())R=N.value,z.add(R);w.push(K)}case 3:B=y.next();Q.B(2);break;case 4:return Q.return({drmInfos:w,keyIds:z,encrypted:u,Wi:v})}})}
|
|
function ox(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Za("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Kv(b,"IV","");if(g){var h=Kc(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Rv(c.ea,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.oa.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Lv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u;return I(function(v){if(1==v.g)return l=Sv(d(),Lv(b,"URI"),e),m=l.sort().join(""),a.M.has(m)||(n=Ah(l,a.g.retryParameters),p=Ow(a,n,6).promise,a.M.set(m,p)),x(v,a.M.get(m),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return x(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;
|
|
H(v)})};a.oa.set(c,k)}return a.oa.get(c)}function Iw(a,b){null==a.u&&(b=Qv(b.ea,"EXT-X-START"))&&(a.u=Number(Lv(b,"TIME-OFFSET")))}function lx(a,b){var c=Qv(b.ea,"EXT-X-PLAYLIST-TYPE");b=Qv(b.ea,"EXT-X-ENDLIST");b=c&&"VOD"==c.value||b;c=c&&"EVENT"==c.value&&!b;c=!b&&!c;b?lw(a,ew):c?lw(a,Pw):lw(a,px)}
|
|
function sw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Qv(d[e].ea,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Qv(b.ea,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Qv(b.ea,"EXT-X-PART-INF"))a.V=Number(Lv(e,"PART-TARGET"));b=Qv(b.ea,"EXT-X-SERVER-CONTROL");a.L&&a.V?(a.s=a.yc?5*a.V<=c?Math.min(a.V,a.s):Math.min(c,a.s):Math.min(a.V,a.s),a.Ja=b?Number(Lv(b,"PART-HOLD-BACK")):0):(a.s=Math.min(c,a.s),
|
|
c=b?Jv(b,"HOLD-BACK"):null,a.Ia=c?Number(c.value):0);a.bb=Math.max(d,a.bb)}function Jw(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Ja)c=a.Ja;else if(a.Ia)c=a.Ia;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=Qv(b.segments[e].ea,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.bb}}a.u&&0>a.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.zi(0);a.l.Vg(c);a.l.Xc(!1)}
|
|
function nx(a,b,c,d,e){var f=Qv(c,"EXT-X-MAP");if(!f)return null;var g=Lv(f,"URI"),h=Sv(d(),g,e);g=[h.toString(),Kv(f,"BYTERANGE","")].join("-");if(!a.za.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Zw(Lv(m,"METHOD"))&&m.id<f.id&&(k=ox(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=qx(h,f,l,k);a.za.set(g,b)}return a.za.get(g)}
|
|
function qx(a,b,c,d){var e=0,f=null;b=Kv(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new dj(function(){return a},e,f,null,null,null,d)}
|
|
function rx(a,b,c,d,e,f,g,h,k){function l(Y){Y=(new ob(Y)).rb.split(".").pop();var ia=sx[g][Y];ia||(ia=Nw[Y]);return ia}var m=d.ea,n=Qv(m,"EXTINF"),p=0,r=0,u=null;d.Xb.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Qv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=xe(w.value),a.kb=!0)}var z=gj;Qv(m,"EXT-X-GAP")&&(a.m.gapCount++,z=2);if(!n){if(0==d.Xb.length)throw new T(2,4,4024,"EXTINF");if(!a.L)return null}var y=[];w=!1;var B=null,C=!1,D=!1;if(a.L&&d.Xb.length){p=
|
|
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var G=v,A={},E=0;E<d.Xb.length;A={pf:void 0,We:void 0},E++){var F=d.Xb[E],J=0==E?c:y[y.length-1],L=0==E?e:J.endTime,K=Number(Kv(F,"DURATION"))||a.V;if(K){var O=L+K,M=0,N=null;"EXT-X-PRELOAD-HINT"==F.name?(M=(M=Kv(F,"BYTERANGE-START"))?Number(M):0,(J=Kv(F,"BYTERANGE-LENGTH"))?N=M+Number(J)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=Kv(F,"BYTERANGE"),N=t(tx(J,M)),M=N.next().value,N=N.next().value);A.We=Kv(F,"URI");if(A.We){J=gj;"YES"==
|
|
Kv(F,"GAP")&&(a.m.gapCount++,J=2,C=!0);A.pf=null;var R=function(Y){return function(){null==Y.pf&&(Y.pf=Sv(h(),Y.We,f));return Y.pf}}(A);p&&0<=M&&null!=N&&(B=R,w=!0);L=new fj(L,O,R,M,N,b,0,0,Infinity,[],"",null,G,J,k);"EXT-X-PRELOAD-HINT"==F.name&&(L.Cg(),D=!0);"YES"!=Kv(F,"INDEPENDENT")&&0<E&&L.od();if(A=l(A.We))L.mimeType=A,ux.has(A)&&(L.ma=null);y.push(L);G&&(G+=K)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;w&&(C||
|
|
0!=y[0].$a?(w=!1,B=null):y=[]);(n=Qv(m,"EXT-X-BYTERANGE"))?(u=t(tx(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].$a,u=y[y.length-1].La);c="";n=null;"image"==g&&(c="1x1",m=Qv(m,"EXT-X-TILES"))&&(c=Lv(m,"LAYOUT"),(m=Kv(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new fj(e,p,function(){if(B)return B();null==Q&&(Q=Sv(h(),d.g,f));return Q||[]},r,u,b,0,0,Infinity,y,c,n,v,z,k,0<y.length&&!!d.g);if(e=l(d.g))b.mimeType=e,ux.has(e)&&(b.ma=null);w&&(a.yc=!0,b.Xh(),D&&b.Cg());return b}
|
|
function tx(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.La+1,d=c+b-1);return[c,d]}
|
|
function tw(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!vw(a,c))for(b=Ov(b,"EXT-X-DATERANGE"),b=b.filter(function(L){return null!=Jv(L,"START-DATE")}).sort(function(L,K){L=Lv(L,"START-DATE");K=Lv(K,"START-DATE");return L<K?-1:L>K?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=Lv(g,"ID");if(!a.Ha.has(h)){var k=Lv(g,"START-DATE"),l=xe(k);if(!isNaN(l)){var m=Math.max(0,l-f),n=null,p=Kv(g,"END-DATE");if(p){var r=xe(p);if(!isNaN(r)&&(n=r-f,0>n))continue}if(null==n){var u=Kv(g,"DURATION")||
|
|
Kv(g,"PLANNED-DURATION");if(u){var v=parseFloat(u);isNaN(v)||(n=m+v);if(0>l-f+v)continue}}var w=Kv(g,"CLASS")||"com.apple.quicktime.HLS",z="YES"==Kv(g,"END-ON-NEXT");if(null==n&&z){for(var y=c+1;y<b.length;y++){var B=Kv(b[y],"CLASS")||"com.apple.quicktime.HLS";if(w==B){var C=Lv(b[y],"START-DATE"),D=xe(C);if(!isNaN(D)&&D&&D>l){n=Math.max(0,D-f);break}}}if(null==n)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var G=[],A=t(g.attributes),E=A.next();!E.done;E=A.next()){var F=
|
|
E.value;if(!y.includes(F.name)){var J=Uv(F.value,d);if("X-ASSET-URI"==F.name||"X-ASSET-LIST"==F.name)J=Sv(e(),F.value,d)[0];G.push({key:F.name,description:"",data:J,mimeType:null,pictureType:null})}}if(1<G.length)a.h.onMetadata(w,m,n,G);a.Ha.add(h)}}}catch(L){}}}}
|
|
function qw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Rv(b.ea,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=Rv(b.ea,"EXT-X-MEDIA-SEQUENCE",0),m=Qv(b.ea,"EXT-X-SKIP"),n=m?Number(Kv(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;hw(a)&&c.has(p)&&(r=c.get(p));0===r&&a.Ea==Pw&&0<c.size&&!c.has(p)&&null!=a.l.i&&(r=a.l.Cb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var z=g[w],y=0==w?r:v.endTime;p=l+n+w;Qv(z.ea,"EXT-X-DISCONTINUITY")&&k++;var B=t(z.ea);for(var C=B.next();!C.done;C=B.next())C=C.value,"EXT-X-KEY"==C.name&&
|
|
(Zw(Lv(C,"METHOD"))?h=ox(a,C,b,e,d):h=void 0);c.set(p,y);B=nx(a,b,z.ea,e,d);!a.L&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.L=a.h.isLowLatencyMode());if(y=rx(a,B,v,z,y,d,f,e,h))(v=Rv(z.ea,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.i=k,vw(a,f)&&null!=a.K&&p<a.K||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(D,G){return D+G.duration},0),b=Math.round(m.reduce(function(D,G){return D+G.bitrate*
|
|
G.duration},0)/b*1E3));if(m=u.some(function(D){return null!=D.h}))for(c={},d=0;d<u.length;c={we:void 0,ve:void 0,me:void 0,Vc:void 0,le:void 0},d++)if(c.Vc=u[d],null==c.Vc.h)for(c.ve=0,c.we=d,e=function(D){return function(){var G=u[D.we];if(G){if(null!=G.h)return G.h+D.ve;D.ve-=G.endTime-G.startTime;D.we+=1}return null}}(c),c.le=0,c.me=d,g=function(D){return function(){var G=u[D.me];if(G){G!=D.Vc&&(D.le+=G.endTime-G.startTime);if(null!=G.h)return G.h+D.le;--D.me}return null}}(c);null==c.Vc.h;)c.Vc.h=
|
|
g(),null==c.Vc.h&&(c.Vc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ka;if(m&&Infinity!=c&&!vw(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.eh(c);return{segments:u,bandwidth:b}}
|
|
function Tw(a,b){if(a==Tc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function Uw(a){return a==Tc?"text/vtt":sx[a].mp4}function Mw(a,b){a=hw(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.tc()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
|
|
function mx(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z;return I(function(y){switch(y.g){case 1:e=Hh;f=Mw(a,d);g=f.segment;if(2==g.status)return y.return(Uw(b));h=g.R();k=new ob(h[0]);l=k.rb.split(".").pop();m=sx[b];if((n=m[l])||(n=Nw[l])||(n=Tw(b,c)))return y.return(n);r=1;u=Ah(h,a.g.retryParameters);ua(y,2);u.method="HEAD";return x(y,Ow(a,u,e,{type:r}).promise,4);case 4:v=y.h;p=v.headers["content-type"];wa(y,3);break;case 2:w=xa(y);if(!w||1002!=w.code&&1001!=w.code){y.B(3);break}u.method="GET";return x(y,
|
|
Ow(a,u,e,{type:r}).promise,6);case 6:z=y.h,p=z.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return(Uw(b))}})}function hx(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function fw(a,b,c){return Ow(a,Ah(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
function dw(a){var b,c,d,e,f,g;return I(function(h){switch(h.g){case 1:if(!a.h)return h.return();ua(h,2);b=Date.now();return x(h,a.update(),4);case 4:c=Date.now();hw(a)&&(d=(c-b)/1E3,a.Nb.sample(1,d),e=a.s,f=Math.max(0,e-od(a.Nb)),a.C.X(f));wa(h,3);break;case 2:g=xa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.C.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
|
|
function hw(a){return a.Ea!=ew}function lw(a,b){a.Ea=b;a.l&&a.l.Xc(!hw(a));hw(a)||a.C.stop()}function Ow(a,b,c,d){if(!a.aa)throw new T(2,7,7001);d||(d={});d.isPreload=a.wc();b=a.h.networkingEngine.request(c,b,d);uh(a.aa,b);return b}function Zw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
function ax(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return I(function(D){switch(D.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(vc())throw new T(2,4,4041);g=Lv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return D.return(null);k=Sv(d(),Lv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Lc(Jc(k[0].split("data:text/plain;base64,").pop()));D.B(2);break}m=k.sort().join("");a.ra.has(m)||(n=Ah(k,a.g.retryParameters),p=Ow(a,n,6).promise,a.ra.set(m,p));return x(D,
|
|
a.ra.get(m),3);case 3:r=D.h,l=Lc(r.data);case 2:u="00000000000000000000000000000000";if(!e){D.B(4);break}if(a.Da.has(e)){v=a.Da.get(e);D.B(5);break}w=bm(e.R(),e.Kb(),e.Ib(),a.g.retryParameters);z=Hh;return x(D,Ow(a,w,z,{type:0}).promise,6);case 6:y=D.h,v=$l(y.data),a.Da.set(e,v);case 5:v&&(u=v);case 4:return B=new Map,B.set(u,l),C="cenc","SAMPLE-AES"==g&&(C="cbcs"),D.return(Pc(B,C))}})}P("shaka.hls.HlsParser",cw);
|
|
var Nw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},sx={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},ux=new Set(["video/mp2t"].concat(ha(zf))),$w={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(vc())throw new T(2,4,4041);b=Lv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Oc("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
keyId:null}],Lv(a,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Lv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Lv(a,"URI");b=bw(b.split("?")[0]);b=Hb(b.data);c=Oc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Kv(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Lv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Lv(a,"URI");a=bw(a.split("?")[0]);a=Hb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=ei(a,b,new Set,0);return Oc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},ew="VOD",px="EVENT",Pw="LIVE",kw={Si:ew,kl:px,xl:Pw};Zi["application/x-mpegurl"]=function(){return new cw};Zi["application/vnd.apple.mpegurl"]=function(){return new cw};function vx(a){var b=0,c=Nb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function wx(a){if(a=xx(a))a:{a=t(qe(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=re(b.value,"LA_URL")){a=me(b);break a}a=""}else a="";return a}
|
|
function xx(a){a=Jc(me(a));a=vx(a).filter(function(b){return b.type===yx})[0];if(!a)return null;a=zc(a.value,!0);return(a=ee(a,"WRMHEADER"))?a:null}var yx=1,zx=(new Map).set("com.microsoft.playready",wx).set("com.microsoft.playready.recommendation",wx).set("com.microsoft.playready.software",wx).set("com.microsoft.playready.hardware",wx);function Ax(a){if(!Bx){Bx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Cx=Dx("ftyp",b,d,b,c);b=Dx("dref",Ex);Fx=Dx("dinf",b)}this.g=a}
|
|
function Gx(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Dx;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Hx+1));m=Math.floor(m%(Hx+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(ha(Ix(h,4)),[0,0,0,0],ha(Ix(n,4)),ha(Ix(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],ha(Ix(k,2)),[0,0],ha(Ix(l,
|
|
2)),[0,0]));h=Dx("tkhd",h);k=Dx;n=g.duration*g.timescale;l=Math.floor(n/(Hx+1));n=Math.floor(n%(Hx+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(ha(Ix(g.timescale,4)),ha(Ix(l,4)),ha(Ix(n,4)),ha(Ix(m,2)),[0,0]));l=Dx("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Jx;break;case "audio":m=Kx}n=Dx("hdlr",m);a:{switch(g.type){case "video":g=Dx("minf",Dx("vmhd",Lx),Fx,Mx(g));break a;
|
|
case "audio":g=Dx("minf",Dx("smhd",Nx),Fx,Mx(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Mc.apply(Gc,ha(b));f=a.g[0];c=Dx;d=f.duration*f.timescale;e=Math.floor(d/(Hx+1));d=Math.floor(d%(Hx+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(ha(Ix(f.timescale,4)),ha(Ix(e,4)),ha(Ix(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,
|
|
255,255]));e=Dx("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(ha(Ix(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Dx("trex",k),h.call(g,k);a=Mc.apply(Gc,ha(d));a=Dx("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Mc.apply(Gc,ha(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Cx.byteLength+
|
|
a.byteLength);b.set(Cx);b.set(a,Cx.byteLength);return b}
|
|
function Mx(a){var b=Dx,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.Qa.byteLength)var e=Dx("avcC",a.Qa);else{e=Dx;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Ab.length;n++){var p=Ox(a.Ab[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(ha(Ix(c,2)),ha(Ix(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Px(a);g=new Uint8Array([]);
|
|
a.encrypted&&(g=ey(a),d="encv");c=Dx(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Qa.byteLength&&(c=Dx("hvcC",a.Qa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(ha(Ix(d,2)),ha(Ix(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Px(a),g=new Uint8Array([]),a.encrypted&&(g=ey(a),e="encv"),c=Dx(e,
|
|
d,c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Dx(".mp3",fy(a));else if(a.codecs.includes("ac-3"))c=Dx("dac3",a.Fa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=ey(a),d="enca"),a=Dx(d,fy(a),c,e);else if(a.codecs.includes("ec-3"))c=Dx("dec3",a.Fa),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=ey(a),d="enca"),a=Dx(d,fy(a),c,e);else if(a.codecs.includes("opus"))c=Dx("dOps",a.Fa),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=ey(a),d="enca"),a=Dx(d,fy(a),c,e);else{if(0<a.Fa.byteLength)c=Dx("esds",
|
|
a.Fa);else{c=Dx;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Qc("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(ha(Ix(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=ey(a),d="enca");
|
|
a=Dx(d,fy(a),c,e)}c=a}a=Dx("stsd",gy,c);return b("stbl",a,Dx("stts",hy),Dx("stsc",iy),Dx("stsz",jy),Dx("stco",ky))}function Px(a){if(!a.Va&&!a.Wa)return new Uint8Array([]);var b=a.Wa;a=new Uint8Array([].concat(ha(Ix(a.Va,4)),ha(Ix(b,4))));return Dx("pasp",a)}function fy(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(ha(Ix(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
function ey(a){var b=Dx;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(ha(Ix(d,4))));c=Dx("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Dx("schm",d);e=Dx;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Ox(h.value)}a=new Uint8Array([0,
|
|
0,0,0,0,0,1,8]);f=Dx("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
function ly(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Dx;var g=new Uint8Array([0,0,0,0].concat(ha(Ix(c.data?c.data.Sb:0,4))));g=Dx("mfhd",g);var h;var k=c.data?c.data.yb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.jb<<4|m.ob<<2|m.mb}k=Dx("sdtp",l);var n=k.length+92;l=Dx;h=new Uint8Array([0,0,0,58].concat(ha(Ix(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Dx("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
0;var p=Math.floor(m%(Hx+1));m=new Uint8Array([1,0,0,0].concat(ha(Ix(Math.floor(m/(Hx+1)),4)),ha(Ix(p,4))));m=Dx("tfdt",m);var r=n;n=c.data?c.data.yb:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);r+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(ha(Ix(p,4)),ha(Ix(r,4))),0);for(r=0;r<p;r++){var w=n[r];u=Ix(w.duration,4);var z=Ix(w.size,4),y=w.flags;w=Ix(w.ub,4);v.set([].concat(ha(u),ha(z),[y.wb<<2|y.jb,y.ob<<6|y.mb<<4|y.xb,y.ib&61440,y.ib&15],ha(w)),12+16*r)}n=Dx("trun",v);k=l("traf",h,m,n,k);f=
|
|
f("moof",g,k);e.call(d,b,[f,my(c)])}return Mc.apply(Gc,ha(b))}function my(a){a=(a.data?a.data.yb:[]).map(function(b){return b.data});a=Mc.apply(Gc,ha(a));return Dx("mdat",a)}function Ix(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Ox(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
function Dx(a){var b=Ga.apply(1,arguments),c=ny[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],ny[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
var Bx=!1,Hx=Math.pow(2,32)-1,ny={},Jx=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Kx=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),hy=new Uint8Array([0,0,0,0,0,0,0,0]),iy=new Uint8Array([0,0,0,0,0,0,0,0]),ky=new Uint8Array([0,0,0,0,0,0,0,0]),jy=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Lx=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Nx=new Uint8Array([0,
|
|
0,0,0,0,0,0,0]),gy=new Uint8Array([0,0,0,0,0,0,0,1]),Cx=new Uint8Array([]),Ex=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Fx=new Uint8Array([]);function oy(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.G=new nd(5);this.s=new Zb(function(){py(a)});this.C=new th;this.m=new Map;this.A=function(){return!1}}q=oy.prototype;q.configure=function(a,b){this.g=a;b&&(this.A=b)};q.start=function(a,b){var c=this;return I(function(d){if(1==d.g)return c.l=[a],c.h=b,x(d,qy(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
|
|
function py(a){var b;I(function(c){switch(c.g){case 1:return ua(c,2),x(c,qy(a),4);case 4:wa(c,3);break;case 2:b=xa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.s&&(this.s.stop(),this.s=null);this.m.clear();return this.C.destroy()};
|
|
q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return ua(c,2),x(c,qy(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};
|
|
function qy(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g)return b=Ah(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.A()}),uh(a.C,e),x(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=Ym){Bd("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Vu(m,"SmoothStreamingMedia");if(!m)throw new T(2,
|
|
4,4046,l);n(m);m=Cc(m.outerHTML)}var p=de(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=Zm&&l(p);a.i||(a.i=new Uk(null,0));if(l=ue(p,"IsLive",Ee,!1))throw new T(2,4,4047);a.i.Xc(!l);n=ue(p,"TimeScale",Ce,1E7);m=ue(p,"DVRWindowLength",Ce);l&&(0===m||isNaN(m))&&(m=Infinity);var r=ue(p,"CanSeek",Ee,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.ef(r);
|
|
m=ue(p,"Duration",Ce,Infinity);l||a.i.zb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=le(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(le(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),z=n[w];if(z){var y=xx(v);if(y)a:{y=t(qe(y,"DATA"));for(var B=y.next();!B.done;B=y.next())if(B=re(B.value,"KID")){y=Jc(me(B));y=new Uint8Array([y[3],y[2],y[1],y[0],
|
|
y[5],y[4],y[7],y[6]].concat(ha(y.slice(8))));y=Lc(y);break a}y=null}else y=null;B=Jc(me(v));w=Kc(w.replace(/-/g,""));w=[{initData:ei(B,w,new Set,0),initDataType:"cenc",keyId:y}];w=Oc(z,"cenc",w);y&&w.keyIds.add(y);if(z=zx.get(z))w.licenseServerUri=z(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=le(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;z=le(v,"QualityLevel");w=l.timescale;y=l.duration;B=le(v,"c");for(var C=[],D=0,G=0;G<B.length;++G){var A=B[G],E=B[G+1],F=ue(A,"t",
|
|
Ce),J=ue(A,"d",Ce);A=ue(A,"r",Ae);if(!J)break;F=null!=F?F:D;(A=A||0)&&A--;if(0>A)if(E){E=ue(E,"t",Ce);if(null==E)break;else if(F>=E)break;A=Math.ceil((E-F)/J)-1}else{if(Infinity==y)break;else if(F/w>=y)break;A=Math.ceil((y*w-F)/J)-1}for(E=0;E<=A;++E)D=F+J,C.push({start:F/w,end:D/w,kh:F}),F=D}w=C;z=t(z);for(y=z.next();!y.done;y=z.next())(y=ry(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Tc||a.g.disableText||m.push(y):n.push(y):r.push(y))}p=[];r=
|
|
t(0<r.length?r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(0<n.length?n:[null]),C=v.next();!C.done;C=v.next())z=p,w=z.push,y=a,B=u,C=C.value,G=0,B&&B.bandwidth&&0<B.bandwidth&&(G+=B.bandwidth),C&&C.bandwidth&&0<C.bandwidth&&(G+=C.bandwidth),y={id:y.u++,language:B?B.language:"und",disabledUntilTime:0,primary:!!B&&B.primary||!!C&&C.primary,audio:B,video:C,bandwidth:G,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(z,y);l.variants=p;l.textStreams=m;a.j?(a.j.variants=
|
|
l.variants,a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.Ne());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.G.sample(1,h);H(k)})}
|
|
function ry(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Za("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=ue(c,"Bitrate",Be),m=ue(c,"MaxWidth",Be),n=ue(c,"MaxHeight",Be),p=ue(c,"Channels",Be),r=ue(c,"SamplingRate",Be),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.zb(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:ad(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=sy[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Za('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!ty.includes(e.toUpperCase()))return Za("Codec not supported:",
|
|
e),null;c=uy(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Za("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=vy(e,c);break;case "video":if(!c)return Za("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=wy(c);break;case "text":if(w.type=Tc,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(yf(w.mimeType,w.codecs));
|
|
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var z=a.m.get(w.id);else z=[],"video"==w.type&&(z=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Ab:z,Fa:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:null,stream:w},z=Gx(new Ax([z])),a.m.set(w.id,z);z=xy(a,new dj(function(){return[]},0,null,Vl(w),w.mssPrivateData.timescale,
|
|
z),w,b,d);w.segmentIndex=new pl(z);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
function uy(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function vy(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function wy(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
function xy(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={hf:void 0},g=e.next())h.hf=g.value,d.push(new fj(h.hf.start,h.hf.end,function(k){return function(){return Nc(a.l,[f.replace("{start time}",String(k.hf.kh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",oy);var ty="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),sy={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
Zi["application/vnd.ms-sstr+xml"]=function(){return new oy};function yy(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=Bc(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function zy(){}
|
|
function Ay(a,b,c,d,e,f){var g=new By;Lh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new Cy,k={vh:!1,Ki:!1};a=Dy(a,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new mh(a,function(){k.vh=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Zb(function(){k.Ki=!0;h.abort()});l.X(b/1E3);a.finally(function(){l.stop()})}return a}
|
|
function Dy(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,v,w,z,y,B,C;return I(function(D){switch(D.g){case 1:return k=Ey,l=Fy,n=new ArrayBuffer(0),r=p=0,u=Date.now(),ua(D,2),x(D,k(a,c),4);case 4:m=D.h;f(Gy(m.headers));if("HEAD"==c.method){D.B(5);break}v=m.clone().body.getReader();z=(w=m.headers.get("Content-Length"))?parseInt(w,10):0;y=function(G){function A(){var E,F,J,L;return I(function(K){switch(K.g){case 1:return ua(K,2),x(K,v.read(),4);case 4:E=K.h;wa(K,3);break;case 2:return xa(K),K.return();case 3:if(E.done){K.B(5);
|
|
break}p+=E.value.byteLength;if(!g){K.B(5);break}return x(K,g(E.value),5);case 5:F=Date.now();J=p-r;if(100<F-u&&J>=h||E.done)L=E.done?0:z-p,e(F-u,J,L),r=p,u=F;E.done?G.close():(G.enqueue(E.value),A());H(K)}})}A()};new l({start:y});return x(D,m.arrayBuffer(),6);case 6:n=D.h;case 5:wa(D,3);break;case 2:B=xa(D);if(d.vh)throw new T(1,1,7001,a,b);if(d.Ki)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,B,b);case 3:return C=Gy(m.headers),D.return(yy(C,n,m.status,a,m.url,b))}})}
|
|
function Gy(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Hy(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",zy);zy.isSupported=Hy;zy.parse=Ay;var Ey=window.fetch,Cy=window.AbortController,Fy=window.ReadableStream,By=window.Headers;
|
|
Hy()&&(wh("http",Ay,2,!0),wh("https",Ay,2,!0),wh("blob",Ay,2,!0));function Iy(){}
|
|
function Jy(a,b,c,d,e,f){var g=new Ky,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;g.onabort=function(){n(new T(1,1,7001,a,c))};var p=!1;g.onreadystatechange=function(){if(2==g.readyState&&!p){var u=Ly(g);e(u);p=!0}};g.onload=function(u){var v=Ly(g),w=g.response;try{d(Date.now()-h,u.loaded-k,0);var z=yy(v,w,g.status,a,g.responseURL,c);m(z)}catch(y){n(y)}};g.onerror=
|
|
function(u){n(new T(1,1,1002,a,u,c))};g.ontimeout=function(){n(new T(1,1,1003,a,c))};g.onprogress=function(u){var v=Date.now(),w=f.minBytesForProgressEvents||0,z=u.loaded-k;if(100<v-h&&z>=w||u.lengthComputable&&u.loaded==u.total)d(v-h,z,4==g.readyState?0:u.total-u.loaded),k=u.loaded,h=v};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),b.headers[r]);g.send(b.body)});return new mh(l,function(){g.abort();return Promise.resolve()})}
|
|
function Ly(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}P("shaka.net.HttpXHRPlugin",Iy);Iy.parse=Jy;var Ky=window.XMLHttpRequest;wh("http",Jy,1,!0);wh("https",Jy,1,!0);wh("blob",Jy,1,!0);function My(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ny(a){var b=a.ec();return b?Ic(b):a.R().map(function(c){return"{"+encodeURI(c)+"}"}).join("")+":"+a.$a+":"+a.La}function Oy(a,b){return bm(a.g.R(),a.g.$a,a.g.La,b.streaming.retryParameters)};function Py(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function Qy(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}Py.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function Ry(a){return 0==a.i?0:a.j/a.i};function Sy(a){var b=this;this.s=a;this.i=new Map;this.h=new Jh(function(){return Ty(b).catch(function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new Py}Sy.prototype.destroy=function(){return this.h.destroy()};function Uy(a,b,c){a.m=b;a.l=c}function Ty(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
|
|
function Vy(a,b,c,d,e,f){Kh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return I(function(u){if(1==u.g)return x(u,Wy(a,c),2);h=u.h;if(a.h.g)throw new T(2,9,7001);if(e)for(m in k=Hb(h),l=new di(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);a.m(Ry(a.g),a.g.g);return u.return(f(h))})});a.i.set(b,g)}
|
|
function Xy(a,b,c,d,e,f){Kh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new T(2,9,7001);if(e){var h=Hb(c);h=new di(h);for(var k in h.data){var l=Number(k);a.l(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.m(Ry(a.g),a.g.g);return f(c)});a.i.set(b,g)}function Yy(a){return I(function(b){return 1==b.g?x(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
|
|
function Wy(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=Hh,d=a.s.request(c,b),e=function(){return d.abort()},a.j.push(e),x(g,d.promise,2);f=g.h;Pd(a.j,e);return g.return(f.data)})};function Zy(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new lh;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Zy.prototype.abort=function(){var a=this;return I(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ua(b,2);return x(b,a.g,4)}if(2!=b.g)return wa(b,0);xa(b);H(b)})};
|
|
function $y(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 x(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}Zy.prototype.store=function(){return this.h};Zy.prototype.promise=function(){return this.g};function az(a){this.h=a;this.g=[]}az.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function bz(a,b){return cz(a,b,"readwrite")}function cz(a,b,c){c=a.h.transaction([b],c);var d=new Zy(c,b);a.g.push(d);d.promise().then(function(){Pd(a.g,d)},function(){Pd(a.g,d)});return d};function dz(a,b,c){this.h=new az(a);this.i=b;this.g=c}q=dz.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ez(this.i)};q.removeSegments=function(a,b){return fz(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return x(d,gz(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Bh(e)}))})};q.addManifests=function(){return ez(this.g)};
|
|
q.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function hz(a,b,c){a=bz(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=bz(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 fz(this,this.g,a,b)};
|
|
q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return x(d,gz(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Fd(e)})))})};q.getAllManifests=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=cz(a.h,a.g,"readonly"),c=new Map,x(d,$y(b,function(e,f){var g;return I(function(h){if(1==h.g)return x(h,a.Fd(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?x(d,b.promise(),3):d.return(c)})};q.Bh=function(a){return a};q.Fd=function(a){return Promise.resolve(a)};
|
|
function ez(a){return Promise.reject(new T(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=bz(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={Ng:void 0},h=g.next())l=h.value,k.Ng=e.add(l),k.Ng.onsuccess=function(n){return function(){f.push(n.Ng.result)}}(k);return x(m,d.promise(),2)}return m.return(f)})};
|
|
function fz(a,b,c,d){a=bz(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={yg:void 0},e=c.next())f.yg=e.value,b.delete(f.yg).onsuccess=function(g){return function(){return d(g.yg)}}(f);return a.promise()}
|
|
function gz(a,b,c){var d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=cz(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={Ze:void 0,Je:void 0},k=h.next())l.Je=k.value,l.Ze=e.get(l.Je),l.Ze.onsuccess=function(n){return function(){void 0==n.Ze.result&&g.push(n.Je);f[n.Je]=n.Ze.result}}(l);return x(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function iz(a){this.g=new az(a)}iz.prototype.destroy=function(){return this.g.destroy()};iz.prototype.getAll=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=cz(a.g,"session-ids","readonly"),c=[],x(d,$y(b,function(e,f){c.push(f)}),2)):3!=d.g?x(d,b.promise(),3):d.return(c)})};iz.prototype.add=function(a){var b=bz(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
iz.prototype.remove=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=bz(b.g,"session-ids"),x(d,$y(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):x(d,c.promise(),0)})};function jz(){this.g=new Map}jz.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};jz.prototype.init=function(){var a=this;kz.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
function lz(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ob:d,ab:f},ab:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function mz(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ob:d,ab:f},e)})})}
|
|
function nz(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function oz(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function pz(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
function qz(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=kz,d.forEach(function(f){(f=f())&&b.push(f)})),x(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):x(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function rz(a,b){kz.set(a,b)}P("shaka.offline.StorageMuxer",jz);jz.unregister=function(a){kz.delete(a)};jz.register=rz;jz.prototype.destroy=jz.prototype.destroy;var kz=new Map;function sz(){dz.apply(this,arguments)}qa(sz,dz);sz.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return I(function(g){d=bz(c.h,c.g);e=d.store();f=new lh;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return x(g,Promise.all([d.promise(),f]),0)})};
|
|
sz.prototype.Fd=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=tz(a.periods[c],e),b.push(f);return x(h,tu(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})})};
|
|
function tz(a,b){uz(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return vz(e,a.startTime,b)})}
|
|
function vz(a,b,c){var d=a.initSegmentUri?wz(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
wz(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}sz.prototype.Bh=function(a){return{data:a.data}};
|
|
function wz(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new T(2,9,9004,"Could not parse uri "+a);}
|
|
function uz(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
|
|
e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function xz(){dz.apply(this,arguments)}qa(xz,dz);
|
|
xz.prototype.Fd=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=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(yz(n,k.startTime,k.startTime+e));f=l;b.push(f)}return x(h,tu(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
function yz(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function zz(){dz.apply(this,arguments)}qa(zz,dz);q=zz.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 hz(this,a,b)};q.Fd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Az(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Az.prototype;
|
|
q.init=function(){var a=this,b=new lh,c=!1,d=new Zb(function(){c=!0;b.reject(new T(2,9,9017))});d.X(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new sz(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new xz(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
new xz(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new zz(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new iz(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new T(2,
|
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return x(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return x(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return x(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return x(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return x(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})};
|
|
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};
|
|
q.erase=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return x(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return x(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return x(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return x(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),x(b,Bz(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,x(b,a.init(),0)}})};
|
|
function Bz(){var a=new lh,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}rz("idb",function(){return ic()||dc()||!window.indexedDB?null:new Az});function Cz(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Cz.prototype.Ob=function(){return this.i};Cz.prototype.ab=function(){return this.h};Cz.prototype.key=function(){return this.l};Cz.prototype.toString=function(){return this.j};
|
|
function Dz(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 Cz(b,c,d,Number(a[4])):null};function Ez(a,b){this.h=a;this.g=b}
|
|
function Fz(a,b){var c=new Uk(null,0);c.zb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Gz(a,d,e,c);e=b.streams.filter(function(l){return l.type==Tc}).map(function(l){return Hz(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Hz(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}
|
|
function Gz(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
b.next())for(g=e.value,e=Hz(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Hz(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
|
|
function Hz(a,b,c){var d=b.segments.map(function(e){return Iz(a,e,b)});c.Vd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new pl(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,mssPrivateData:b.mssPrivateData,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([yf(b.mimeType,b.codecs)])}}
|
|
function Iz(a,b,c){var d=new Cz("segment",a.h,a.g,b.dataKey);a=new fj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Jz(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function Jz(a,b){var c=new Cz("segment",a.h,a.g,b);return new dj(function(){return[c.toString()]},0,null)};function Kz(){this.g=null}q=Kz.prototype;q.configure=function(){};
|
|
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=Dz(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new jz;va(m,2);return x(m,e.init(),4);case 4:return x(m,nz(e,d.Ob(),d.ab()),5);case 5:return f=m.h,x(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ez(d.Ob(),d.ab()),l=Fz(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return ya(m),x(m,e.destroy(),7);case 7:za(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
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 jz,ua(m,2,3),x(m,e.init(),5);case 5:return x(m,nz(e,d.Ob(),d.ab()),6);case 6:return f=m.h,x(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return x(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),x(m,e.destroy(),10);case 10:za(m,0);break;case 2:xa(m),m.B(3)}})};
|
|
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};Zi["application/x-offline-manifest"]=function(){return new Kz};function Lz(){}function Mz(a){var b=Dz(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=ph(a)):a=b&&"segment"==b.g?Nz(b.key(),b):nh(new T(2,1,9004,a));return a}
|
|
function Nz(a,b){var c=new jz;return ph(void 0).Ta(function(){return c.init()}).Ta(function(){return nz(c,b.Ob(),b.ab())}).Ta(function(d){return d.getSegments([b.key()])}).Ta(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",Lz);Lz.plugin=Mz;wh("offline",Mz);function Oz(a,b,c){var d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Pz(v.info,p)){v.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Qz(a,b,g);return x(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
|
|
function Qz(a,b,c){var d,e;return I(function(f){switch(f.g){case 1:return d=new fi({ic:b,onError:function(){},Ue:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ua(f,2),d.configure(a),x(f,ni(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return xa(f),x(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],x(f,Promise.all(c.sessionIds.map(function(g){return I(function(h){if(1==
|
|
h.g)return ua(h,2),x(h,zi(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);xa(h);H(h)})})),6);case 6:return x(f,d.destroy(),7);case 7:return f.return(e)}})}function Pz(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Qd(a.audioCapabilities,b.audioCapabilities,c)&&Qd(a.videoCapabilities,b.videoCapabilities,c)};function Rz(a,b,c){var d=b.presentationTimeline.getDuration();b=Sz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Tz(a,b){var c=Fz(new Ez(a.Ob(),a.ab()),b),d=b.appMetadata||{};c=Sz(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}}
|
|
function Sz(a){var b=[],c=Ig(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(yg(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(zg(c.value));return b};function Uz(){this.g={}}function Vz(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 Wz(a,b){a.g[b.id]=b.bandwidth||2048}function Xz(a,b){a=a.g[b];null==a&&(a=0);return a};function Yz(a){var b=this;if(a&&a.constructor!=W)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Jb()):(this.h=Xm(),this.g=new vh);this.i=[];this.j=[];var c=!a;this.l=new Jh(function(){var d,e,f,g,h;return I(function(k){switch(k.g){case 1:return x(k,Promise.all(b.j.map(function(l){return Ty(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return x(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return x(k,b.g.destroy(),4);
|
|
case 4:b.h=null,b.g=null,H(k)}})})}function Zz(){if($b())a:{var a=t(kz.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=Yz.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Om(a,b));return an(this.h,a)};q.getConfiguration=function(){var a=Xm();an(a,this.h,Xm());return a};q.Jb=function(){return this.g};
|
|
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Sy(this.g);this.j.push(f);b=$z(this,a,b||{},function(){var g;return I(function(h){if(1==h.g)return c?h.B(2):x(h,vn(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Yi(a,c||null);return h.return(g())})},e,f);b=new mh(b,function(){return Ty(f)});b.finally(function(){Pd(d.j,f)});return aA(this,b)};
|
|
function $z(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,z,y,B;return I(function(C){switch(C.g){case 1:return bA(),h=g=null,k=new jz,n=m=l=null,ua(C,2,3),x(C,d(),5);case 5:return g=C.h,x(C,cA(a,b,g,e),6);case 6:p=C.h;dA(a);r=!p.presentationTimeline.T()&&!p.presentationTimeline.Qc();if(!r)throw new T(2,9,9005,b);return x(C,a.dd(p,function(D){n=n||D},e),7);case 7:h=C.h;dA(a);if(n)throw n;return x(C,eA(p,h,e),8);case 8:return x(C,k.init(),9);case 9:return dA(a),x(C,lz(k),10);case 10:return l=C.h,dA(a),u=fA(h,
|
|
p,b,c,e,f),v=u.ck,w=u.gh,x(C,l.ab.addManifests([v]),11);case 11:z=C.h;dA(a);m=z[0];dA(a);if(n)throw n;return x(C,gA(a,w,m,v,f,e,l.ab,p,h),12);case 12:return dA(a),hA(p,v,h,e),x(C,l.ab.updateManifest(m,v),13);case 13:return dA(a),y=new Cz("manifest",l.path.Ob,l.path.ab,m),C.return(Tz(y,v));case 3:return ya(C),x(C,k.destroy(),14);case 14:if(!g){C.B(15);break}return x(C,g.stop(),15);case 15:if(!h){C.B(17);break}return x(C,h.destroy(),17);case 17:za(C,0);break;case 2:B=xa(C);if(null==m){C.B(19);break}return x(C,
|
|
iA(m),19);case 19:throw n||B;}})}
|
|
function gA(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,z,y;return I(function(B){switch(B.g){case 1:l={};m=0;n=function(C,D){var G,A,E,F,J,L,K,O,M;return I(function(N){if(1==N.g){G=t(C);A=G.next();for(E={};!A.done;E={qc:void 0},A=G.next())E.qc=A.value,F=Oy(E.qc,f),J=E.qc.i,L=E.qc.h,K=function(R){return function(Q){var Y,ia,X;return I(function(ja){if(1==ja.g)return x(ja,g.addSegments([{data:Q}]),2);Y=ja.h;dA(a);ia=R.qc.g;X=Ny(ia);l[X]=Y[0];m+=Q.byteLength;H(ja)})}}(E),O=E.qc.g,(M=O.ec())?Xy(e,E.qc.groupId,
|
|
M,J,L,K):Vy(e,E.qc.groupId,F,J,L,K);return x(N,Yy(e),2)}if(!D)return N.B(0);dA(a);hA(h,d,k,f);return x(N,g.updateManifest(c,d),0)})};p=!1;ua(B,2);if(!jA(h)||!p||kA(h)){B.B(4);break}return x(B,n(b.filter(function(C){return C.h}),!0),5);case 5:return dA(a),b=b.filter(function(C){return!C.h}),r=l,u=m,l={},m=0,x(B,lA(g,c,d,r,u,function(){return dA(a)}),6);case 6:dA(a);case 4:if(p){B.B(7);break}return x(B,n(b,!1),8);case 8:return dA(a),v=l,w=m,l={},m=0,x(B,lA(g,c,d,v,w,function(){return dA(a)}),9);case 9:dA(a);
|
|
case 7:wa(B,0);break;case 2:return z=xa(B),y=Object.values(l),x(B,g.removeSegments(y,function(){}),10);case 10:throw z;}})}function iA(a){var b,c,d,e;return I(function(f){switch(f.g){case 1:return b=new jz,x(f,b.init(),2);case 2:return x(f,lz(b),3);case 3:return c=f.h,d=new Cz("manifest",c.path.Ob,c.path.ab,a),x(f,b.destroy(),4);case 4:return e=new Yz,x(f,e.remove(d.toString()),0)}})}
|
|
function lA(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return I(function(z){switch(z.g){case 1:g=!1;ua(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
|
|
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return x(z,a.updateManifest(b,c),4);case 4:g=!0;f();wa(z,0);break;case 2:return v=xa(z),x(z,iA(b),5);case 5:if(g){z.B(6);break}w=Object.values(d);return x(z,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
|
|
function eA(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N;return I(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},fg(a,c.restrictions,d),x(R,ig(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;$f(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(yg(m));n=t(a.textStreams);for(p=n.next();!p.done;p=
|
|
n.next())r=p.value,e.push(zg(r));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(Ag(w));return x(R,c.offline.trackSelectionCallback(e),3);case 3:z=R.h;y=a.presentationTimeline.getDuration();B=0;C=t(z);for(D=C.next();!D.done;D=C.next())G=D.value,A=G.bandwidth*y/8,B+=A;ua(R,4);return x(R,c.offline.downloadSizeCallback(B),6);case 6:E=R.h;if(!E)throw new T(2,9,9014);wa(R,5);break;case 4:F=xa(R);if(F instanceof T)throw F;throw new T(2,9,9015);case 5:J=new Set;L=new Set;K=new Set;
|
|
O=t(z);for(M=O.next();!M.done;M=O.next())N=M.value,"variant"==N.type&&J.add(N.id),"text"==N.type&&L.add(N.id),"image"==N.type&&K.add(N.id);a.variants=a.variants.filter(function(Q){return J.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return L.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return K.has(Q.id)});mA(a);H(R)}})}
|
|
function fA(a,b,c,d,e,f){var g=Rz(c,b,d),h=e.offline.progressCallback;Uy(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&vi(a,"cenc",r)});var k=jA(b)&&!kA(b),l=null;k&&(l=nA.get(a.g.keySystem));for(var m=new Uz,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Wz(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Vz(m,p.value);m=oA(f,m,b,e);f=m.streams;m=m.gh;n=a.g;p=e.offline.usePersistentLicense;
|
|
n&&p&&(n.initData=[]);return{ck:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Jd(),streams:f,sessionIds:p?Ei(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},gh:m}}function jA(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
function kA(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 hA(a,b,c,d){b.expiration=c.Jd();c=Ei(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(jA(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return pA(this,qA(this,a))};
|
|
function qA(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:bA();c=Dz(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new jz;va(k,2);return x(k,e.init(),4);case 4:return x(k,nz(e,d.Ob(),d.ab()),5);case 5:return f=k.h,x(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],x(k,Promise.all([rA(a,h,e),sA(f,d,h)]),2);case 2:return ya(k),x(k,e.destroy(),8);case 8:za(k,0)}})}
|
|
function tA(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:yf(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:yf(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function rA(a,b,c){return I(function(d){return x(d,uA(a.g,a.h.drm,c,b),0)})}
|
|
function sA(a,b,c){function d(){}var e=vA(c);Tz(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.yk=function(){return pA(this,wA(this))};
|
|
function wA(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return bA(),b=a.g,c=a.h.drm,d=new jz,e=!1,va(n,2),x(n,d.init(),4);case 4:f=[],oz(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return x(n,k.getAll(),8);case 8:return l=n.h,x(n,Oz(c,b,l),9);case 9:return m=n.h,x(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return ya(n),x(n,d.destroy(),11);case 11:za(n,3);break;case 3:return n.return(!e)}})}
|
|
q.list=function(){return pA(this,xA())};function xA(){var a,b,c;return I(function(d){switch(d.g){case 1:return bA(),a=[],b=new jz,va(d,2),x(d,b.init(),4);case 4:return c=Promise.resolve(),mz(b,function(e,f){c=c.then(function(){var g;return I(function(h){if(1==h.g)return x(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Tz(new Cz("manifest",e.Ob,e.ab,l),k);a.push(k)});H(h)})})}),x(d,c,2);case 2:return ya(d),x(d,b.destroy(),6);case 6:za(d,3);break;case 3:return d.return(a)}})}
|
|
function cA(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,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},
|
|
onMetadata:function(){},disableStream:function(){},addFont:function(){}},c.configure(d.manifest),dA(a),x(l,c.start(b,g),2);if(3!=l.g)return h=l.h,dA(a),k=yA(h),x(l,Promise.all(ib(k,function(m){return m.createSegmentIndex()})),3);dA(a);if(e)throw e;return l.return(h)})}
|
|
q.dd=function(a,b,c){var d=this,e;return I(function(f){return 1==f.g?(e=new fi({ic:d.g,onError:b,Ue:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),x(f,ki(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?x(f,xi(e),3):f.return(e)})};
|
|
function oA(a,b,c,d){var e=new Map,f=yA(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=zA(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),gh:Array.from(e.values())}}
|
|
function zA(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;AA(d,c.presentationTimeline.Cb(),function(l){var m=Ny(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Xz(b,d.id)*p;p=Qy(a.g,p);f.set(m,new My(l,p,k,!1))}l.ma&&(n=Ny(l.ma),f.has(n)||(p=.5*Xz(b,d.id),p=Qy(a.g,p),f.set(n,new My(l.ma,p,k,
|
|
!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});0!==h&&(k=(k+1)%h)});return g}function AA(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 dA(a){if(a.l.g)throw new T(2,9,7001);}function bA(){if(!Zz())throw new T(2,9,9E3);}function pA(a,b){return I(function(c){if(1==c.g)return a.i.push(b),va(c,2),x(c,b,4);if(2!=c.g)return c.return(c.h);ya(c);Pd(a.i,b);return za(c,0)})}function aA(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Pd(a.i,c)})}
|
|
function vA(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
function uA(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=pz(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:tA(d,!1),videoCapabilities:tA(d,!0)}});return x(h,Oz(b,a,f),2)}return 3!=h.g?(g=h.h,x(h,e.remove(g),3)):x(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
function yA(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
|
|
function mA(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}P("shaka.offline.Storage",Yz);Yz.deleteAll=function(){var a;return I(function(b){return 1==b.g?(a=new jz,va(b,2),x(b,qz(a),2)):5!=b.g?(ya(b),x(b,a.destroy(),5)):za(b,0)})};
|
|
Yz.prototype.list=Yz.prototype.list;Yz.prototype.removeEmeSessions=Yz.prototype.yk;Yz.prototype.remove=Yz.prototype.remove;Yz.prototype.store=Yz.prototype.store;Yz.prototype.getNetworkingEngine=Yz.prototype.Jb;Yz.prototype.getConfiguration=Yz.prototype.getConfiguration;Yz.prototype.configure=Yz.prototype.configure;Yz.prototype.destroy=Yz.prototype.destroy;Yz.support=Zz;
|
|
var nA=(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");hq.offline=Zz;function BA(){}function CA(){for(var a=t(DA),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Za("Error installing polyfill!",c)}}}function EA(a,b){a={priority:b||0,callback:a};for(b=0;b<DA.length;b++)if(DA[b].priority<a.priority){DA.splice(b,0,a);return}DA.push(a)}P("shaka.polyfill",BA);BA.register=EA;BA.installAll=CA;var DA=[];function FA(){}function GA(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())HA(b.value)}function HA(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)}})}BA.Aria=FA;FA.install=GA;EA(GA);function IA(){}function JA(){mc()||ec("Sky_STB")||KA()}BA.EncryptionScheme=IA;IA.install=JA;EA(JA,-2);function LA(){}
|
|
function MA(){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}}),
|
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",NA);document.addEventListener("webkitfullscreenerror",NA);document.addEventListener("mozfullscreenchange",NA);document.addEventListener("mozfullscreenerror",NA);document.addEventListener("MSFullscreenChange",NA);document.addEventListener("MSFullscreenError",NA)}}
|
|
function NA(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)}BA.Fullscreen=LA;LA.install=MA;EA(MA);function OA(){}function PA(){var a=!0;!ic()||ic()&&rc()||ic()&&ec("Fuchsia")||(a=!1);if(kc()||nc()||mc()||hc()||fc()||ec("PC=EOS")||oc()||ec("WPE"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),QA=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=RA)}
|
|
function RA(a){var b,c,d,e,f,g,h,k,l,m,n;return I(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=ac(e),!f)||d&&(g=d.contentType,h=ac(g),!h))return p.return(b)}else return p.return(b);p.B(2);break}if(!$b())return p.return(b);if(!c){p.B(3);break}return x(p,SA(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var r=d.contentType;ic()&&d.spatialRendering&&
|
|
(r+="; spatialRendering=true");l=xd(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return x(p,TA(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
|
|
function SA(a){var b,c;return I(function(d){return 1==d.g?ic()?x(d,UA(a),3):fc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(xd(b))):d.B(2):2!=d.g?(c=d.h,d.return(c)):d.return(xd(a.contentType))})}
|
|
function TA(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return I(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},fc()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h=
|
|
{initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=If(k)+";"+Hf(k);n=If(l)+";"+Hf(l);p=c.keySystem;r=null;ua(u,2);if(Xb.has(m+"#"+n+"#"+p)){r=Xb.get(m+"#"+n+"#"+p)||null;u.B(4);break}return x(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=u.h,Xb.set(m+"#"+n+"#"+p,r);case 4:wa(u,
|
|
3);break;case 2:xa(u);case 3:return u.return(r)}})}
|
|
function UA(a){var b,c,d,e;return I(function(f){if(1==f.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return f.return(xd(a.contentType));b=a.contentType;a.width&&a.height&&1280<a.width&&720<a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),24>c||30<c)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;default:return f.return(!1)}e=
|
|
!1;return b in VA?(e=VA[b],f.B(2)):x(f,cast.__platform__.canDisplayType(b),3)}2!=f.g&&(e=f.h,VA[b]=e);return f.return(e)})}BA.MediaCapabilities=OA;OA.install=PA;var QA=null;OA.originalMcap=QA;var VA={};OA.memoizedCanDisplayTypeRequests_=VA;EA(PA,-1);function WA(){}function XA(){var a=pc();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(YA(),ZA()):15>=a&&YA():ec("DT_STB_BCM")?(YA(),ZA()):ec("Tizen 2")||gc()||ec("Tizen 4")?$A():ec("WPE")&&(YA(),ZA());(window.MediaSource||window.ManagedMediaSource)&&aB();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&bB()}
|
|
function YA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function ZA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
function aB(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Ef(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Ef(c)&&b(c)}}}
|
|
function $A(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Hf(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Hf(c)&&b(c)}}}
|
|
function bB(){var a=MediaSource.isTypeSupported;hc()||(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)})}BA.MediaSource=WA;WA.install=XA;EA(XA);function cB(){}function dB(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?eB():void 0!=window.orientation&&fB())}function eB(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
function fB(){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 gB;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}BA.Orientation=cB;cB.install=dB;function gB(){hb.call(this);this.type="";this.angle=0}qa(gB,hb);
|
|
gB.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)};
|
|
gB.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};EA(dB);function hB(){}var iB,jB,kB,lB,mB,nB;function oB(a,b){try{var c=new pB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function qB(a){var b=this.mediaKeys;b&&b!=a&&rB(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?rB(a,this):Promise.resolve()}
|
|
function sB(a){a=Hb(a.initData);if(Nb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=zc(a.subarray(4),!0);a=Cc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Jb(a);this.dispatchEvent(b)}BA.PatchedMediaKeysApple=hB;
|
|
hB.uninstall=function(){iB&&(iB=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",jB),HTMLMediaElement.prototype.setMediaKeys=kB,window.MediaKeys=lB,window.MediaKeySystemAccess=mB,navigator.requestMediaKeySystemAccess=nB,jB=nB=kB=mB=lB=null,window.shakaMediaKeysPolyfill="")};
|
|
hB.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)iB=!0,jB=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),kB=HTMLMediaElement.prototype.setMediaKeys,lB=window.MediaKeys,mB=window.MediaKeySystemAccess,nB=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=qB;window.MediaKeys=tB;window.MediaKeySystemAccess=pB;navigator.requestMediaKeySystemAccess=
|
|
oB;window.shakaMediaKeysPolyfill=uB}};
|
|
function pB(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
pB.prototype.createMediaKeys=function(){var a=new tB(this.keySystem);return Promise.resolve(a)};pB.prototype.getConfiguration=function(){return this.g};function tB(a){this.h=new WebKitMediaKeys(a);this.g=new rd}tB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new vB(this.h,a)};tB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
function rB(a,b){a.g.Za();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",sB);try{return al(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}tB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function vB(a){hb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new rd;this.sessionId="";this.expiration=NaN;this.closed=new lh;this.keyStatuses=new wB}qa(vB,hb);q=vB.prototype;
|
|
q.generateRequest=function(a,b){var c=this;this.h=new lh;try{var d=this.l.createSession("video/mp4",Hb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.tc()?"license-request":"license-renewal").set("message",Jb(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(xB(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
|
|
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:xB(c,"output-not-allowed");break;default:xB(c,"internal-error")}});xB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
q.update=function(a){this.g=new lh;try{this.i.update(Hb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Za()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function xB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}
|
|
function wB(){this.size=0;this.g=void 0}q=wB.prototype;q.tc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Wb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Wb.value();return this.g&&Gb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var uB="apple";function yB(){}function zB(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||gc()||ec("Tizen 4")||ec("Tizen 5.0")||hc()&&38===jc())&&(MediaKeys.prototype.setServerCertificate=AB)}function AB(){return Promise.resolve(!1)}BA.PatchedMediaKeysCert=yB;yB.install=zB;EA(zB);function BB(){}function CB(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=DB,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=EB,window.MediaKeys=FB,window.MediaKeySystemAccess=GB,window.shakaMediaKeysPolyfill=HB)}function DB(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
function EB(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}BA.PatchedMediaKeysNop=BB;BB.install=CB;function FB(){throw new TypeError("Illegal constructor.");}FB.prototype.createSession=function(){};FB.prototype.setServerCertificate=function(){};FB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function GB(){this.keySystem="";throw new TypeError("Illegal constructor.");}GB.prototype.getConfiguration=function(){};
|
|
GB.prototype.createMediaKeys=function(){};var HB="nop";EA(CB,-10);function IB(){}
|
|
function JB(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)KB="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=LB;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=MB;window.MediaKeys=NB;window.MediaKeySystemAccess=OB;window.shakaMediaKeysPolyfill=PB}}
|
|
function QB(a){var b=KB;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function LB(a,b){try{var c=new OB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function MB(a){var b=this.mediaKeys;b&&b!=a&&RB(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&RB(a,this);return Promise.resolve()}BA.PatchedMediaKeysWebkit=IB;IB.install=JB;
|
|
function OB(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}OB.prototype.createMediaKeys=function(){var a=new NB(this.g);return Promise.resolve(a)};OB.prototype.getConfiguration=function(){return this.h};function NB(a){this.l=a;this.h=null;this.g=new rd;this.i=[];this.j=new Map}
|
|
function RB(a,b){a.h=b;a.g.Za();var c=KB;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=SB(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.tc()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=SB(a,d.sessionId))&&d.ready()}),
|
|
a.g.o(b,c+"keyerror",function(d){var e=SB(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?TB(e,"output-restricted"):1==f?TB(e,"expired"):TB(e,"internal-error"))}}))}
|
|
NB.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 UB(b,this.l,a);this.i.push(a);return a};NB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};NB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
function SB(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 UB(a,b,c){hb.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 lh;this.keyStatuses=new VB}qa(UB,hb);q=UB.prototype;q.ready=function(){TB(this,"usable");this.g&&this.g.resolve();this.g=null};
|
|
function WB(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Hb(Cc("LOAD_SESSION|"+c));else{var e=Cc("PERSISTENT|");d=Mc(e,b)}else d=Hb(b)}catch(g){return Promise.reject(g)}a.h=new lh;var f=QB("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Zb(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
|
|
function XB(a,b,c){if(a.g)a.g.then(function(){return XB(a,b,c)}).catch(function(){return XB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=yc(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=Jc(e.keys[0].k);e=Jc(e.keys[0].kid)}else d=Hb(c),e=null;var f=QB("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
function TB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return WB(this,b,null)};q.load=function(a){return"persistent-license"==this.l?WB(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new lh;XB(this,b,a);return b};
|
|
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=QB("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 VB(){this.size=0;this.g=void 0}q=VB.prototype;q.tc=function(){return this.g};
|
|
q.forEach=function(a){this.g&&a(this.g,Wb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Wb.value();return this.g&&Gb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var KB="",PB="webkit";EA(JB);function YB(){}function ZB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=$B,Object.defineProperty(a,"disablePictureInPicture",{get:aC,set:bC,enumerable:!0,configurable:!0}),document.exitPictureInPicture=cC,document.addEventListener("webkitpresentationmodechanged",dC,!0))}}
|
|
function dC(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)}
|
|
function $B(){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 cC(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
function aC(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function bC(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}BA.PiPWebkit=YB;YB.install=ZB;EA(ZB);function eC(){}function fC(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=gC))}function gC(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}BA.RandomUUID=eC;eC.install=fC;EA(fC);function hC(){}function iC(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:jC})}function jC(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}BA.Symbol=hC;hC.install=iC;EA(iC);function kC(){}function lC(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}BA.VideoPlayPromise=kC;kC.install=lC;EA(lC);function mC(){}function nC(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||hc()&&38===jc())&&(a.getVideoPlaybackQuality=oC)}}function oC(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}BA.VideoPlaybackQuality=mC;mC.install=nC;EA(nC);function pC(){}function qC(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=rC;else if(6==b)a=sC;else{try{var c=!!rC(1,2,"")}catch(d){c=!1}c&&(a=rC)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function rC(a,b,c){return new window.TextTrackCue(a,b,c)}function sC(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}BA.VTTCue=pC;pC.install=qC;EA(qC);function tC(){}tC.prototype.parseInit=function(){};tC.prototype.setSequenceMode=function(){};tC.prototype.setManifestType=function(){};tC.prototype.parseMedia=function(a,b){var c=null,d=[];a=yc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=uC.exec(e))){var f=vC.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Me(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
P("shaka.text.LrcTextParser",tC);tC.prototype.parseMedia=tC.prototype.parseMedia;tC.prototype.setManifestType=tC.prototype.setManifestType;tC.prototype.setSequenceMode=tC.prototype.setSequenceMode;tC.prototype.parseInit=tC.prototype.parseInit;var uC=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,vC=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Nf["application/x-subtitle-lrc"]=function(){return new tC};function wC(){}wC.prototype.parseInit=function(){};wC.prototype.setSequenceMode=function(){};wC.prototype.setManifestType=function(){};
|
|
wC.prototype.parseMedia=function(a,b,c,d){var e=yc(a);a=[];if(""==e)return a;var f=ee(e,"tt",!0);if(!f)throw new T(2,2,2005,"Failed to parse TTML.");e=qe(f,"body")[0];if(!e)return[];var g=we(f,xC,"frameRate"),h=we(f,xC,"subFrameRate"),k=we(f,xC,"frameRateMultiplier"),l=we(f,xC,"tickRate"),m=we(f,xC,"cellResolution"),n=f.attributes["xml:space"]||"default",p=we(f,yC,"extent");if("default"!=n&&"preserve"!=n)throw new T(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new zC(g,h,k,l);m=AC(m);
|
|
h=qe(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return"\n"!=v});k=qe(f,"style");f=qe(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=BC(u.value,k,p))&&l.push(u);if(le(e,"p").length)throw new T(2,2,2001,"<p> can only be inside <div> in TTML");p=t(le(e,"div"));for(r=p.next();!r.done;r=p.next())if(le(r.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=CC(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"),
|
|
a.push(b);return a};
|
|
function CC(a,b,c,d,e,f,g,h,k,l,m,n,p){var r=l;if(je(a)){if(!m)return null;var u={tagName:"span",children:[me(a)],attributes:{},parent:null}}else u=a;for(var v=null,w=t(DC),z=w.next();!z.done&&!(v=EC(u,"backgroundImage",d,"#",z.value)[0]);z=w.next());w=null;z=we(u,DC,"backgroundImage");var y=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(z&&y.test(z)){w=parseInt(z.split(":").pop(),10)-1;if(w>=p.length)return null;w=p[w]}else n&&z&&!z.startsWith("#")&&(y=new ob(n),z=new ob(z),(z=y.resolve(z).toString())&&
|
|
(w=z));if("p"==a.tagName||v||w)m=!0;a=m;z="default"==(u.attributes["xml:space"]||(h?"default":"preserve"));y=u.children.every(je);h=[];if(!y)for(var B=t(u.children),C=B.next();!C.done;C=B.next())(C=CC(C.value,b,c,d,e,f,g,z,k,u,m,n,p))&&h.push(C);d=null!=l;n=me(u);n=u.children.length&&n&&/\S/.test(n);B=u.attributes.begin||u.attributes.end||u.attributes.dur;if(!(B||n||"br"==u.tagName||0!=h.length||d&&!z))return null;p=FC(u,c);n=p.start;for(p=p.end;r&&r.tagName&&"tt"!=r.tagName;)p=GC(r,c,n,p),n=p.start,
|
|
p=p.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;p=null==p?Infinity:p+b.periodStart;n=Math.max(n,b.segmentStart);p=Math.min(p,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,p=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),p=Math.max(p,c.endTime);if("br"==u.tagName)return e=new Me(n,p,""),e.lineBreak=!0,e;b="";y&&(b=Fc(me(u)||""),z&&(b=b.replace(/\s+/g," ")));b=new Me(n,p,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=EC(u,"region",f,"")[0];if(u.attributes.region&&
|
|
k&&k.attributes["xml:id"]){var D=k.attributes["xml:id"];b.region=g.filter(function(G){return G.id==D})[0]}g=k;l&&d&&!u.attributes.region&&!u.attributes.style&&(g=EC(l,"region",f,"")[0]);HC(b,u,g,v,w,e,a,0==h.length);return b}
|
|
function BC(a,b,c){var d=new Ld,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=IC.exec(c)||JC.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=KC(a,b,"extent");if(g){var h=(f=IC.exec(g))||JC.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Md:0,d.heightUnits=f||null!=e?Md:0)}if(a=KC(a,b,"origin"))if(h=(f=IC.exec(a))||JC.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
|
|
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Md,d.height=100-d.viewportAnchorY,d.heightUnits=Md):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Md:0;return d}function LC(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
|
|
function HC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==MC(b,c,f,"direction",g)&&(a.direction="rtl");h=MC(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Re);(h=MC(b,c,f,"textAlign",!0))?(a.positionAlign=NC[h],a.lineAlign=OC[h],a.textAlign=lf[h.toUpperCase()]):a.textAlign=Pe;if(h=MC(b,c,f,"displayAlign",!0))a.displayAlign=mf[h.toUpperCase()];if(h=MC(b,c,f,"color",g))a.color=LC(h);if(h=MC(b,c,f,"backgroundColor",
|
|
g))a.backgroundColor=LC(h);if(h=MC(b,c,f,"border",g))a.border=h;if(h=MC(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
|
|
k}).join(",")}(h=MC(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=hf);h=MC(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=MC(b,c,f,"lineHeight",g))&&h.match(PC)&&(a.lineHeight=h);(h=MC(b,c,f,"fontSize",g))&&(h.match(PC)||h.match(QC))&&(a.fontSize=h);if(h=MC(b,c,f,"fontStyle",g))a.fontStyle=of[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=me(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
|
|
e);if(d=MC(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(PC)?a.textStrokeColor=a.color:(a.textStrokeColor=LC(d[0]),d.shift()),d[0]&&d[0].match(PC)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=MC(b,c,f,"letterSpacing",g))&&d.match(PC)&&(a.letterSpacing=d);(d=MC(b,c,f,"linePadding",g))&&d.match(PC)&&(a.linePadding=d);if(d=MC(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=KC(c,f,"textDecoration"))&&RC(a,d);(d=SC(b,f,"textDecoration"))&&RC(a,d);if(d=MC(b,c,f,"textCombine",g))a.textCombineUpright=
|
|
d;switch(MC(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
function RC(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(kf)||a.textDecoration.push(kf);break;case "noUnderline":a.textDecoration.includes(kf)&&Pd(a.textDecoration,kf);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Pd(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Pd(a.textDecoration,"overline")}}function MC(a,b,c,d,e){e=void 0===e?!0:e;return(a=SC(a,c,d))?a:e?KC(b,c,d):null}function KC(a,b,c){if(!a)return null;var d=we(a,yC,c);return d?d:TC(a,b,c)}function SC(a,b,c){var d=we(a,yC,c);return d?d:TC(a,b,c)}
|
|
function TC(a,b,c){a=EC(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ve(a[e],"urn:ebu:tt:style",c);f||(f=we(a[e],yC,c));f||(f=SC(a[e],b,c));f&&(d=f)}return d}function EC(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?ve(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
function GC(a,b,c,d){a=FC(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function FC(a,b){var c=UC(a.attributes.begin,b),d=UC(a.attributes.end,b);a=UC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
function UC(a,b){var c=null;if(VC.test(a)){a=VC.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(WC.test(a))c=XC(WC,a);else if(YC.test(a))c=XC(YC,a);else if(ZC.test(a))a=ZC.exec(a),c=Number(a[1])/b.frameRate;else if($C.test(a))a=$C.exec(a),c=Number(a[1])/b.g;else if(aD.test(a))c=XC(aD,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
function XC(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function AC(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Ic:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}P("shaka.text.TtmlTextParser",wC);wC.prototype.parseMedia=wC.prototype.parseMedia;wC.prototype.setManifestType=wC.prototype.setManifestType;wC.prototype.setSequenceMode=wC.prototype.setSequenceMode;wC.prototype.parseInit=wC.prototype.parseInit;
|
|
function zC(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]))}
|
|
var IC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,QC=/^(\d{1,4}(?:\.\d+)?|100)%$/,PC=/^(\d+px|\d+em|\d*\.?\d+c)$/,JC=/^(\d+)px (\d+)px$/,VC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,WC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,YC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,ZC=/^(\d*(?:\.\d*)?)f$/,$C=/^(\d*(?:\.\d*)?)t$/,aD=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),OC={left:Ue,center:"center",right:"end",start:Ue,
|
|
end:"end"},NC={left:"line-left",center:"center",right:"line-right"},xC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],yC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],DC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Nf["application/ttml+xml"]=function(){return new wC};function bD(){this.g=new wC}bD.prototype.parseInit=function(a){var b=!1;(new Th).box("moov",Yh).box("trak",Yh).box("mdia",Yh).box("minf",Yh).box("stbl",Yh).W("stsd",$h).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};bD.prototype.setSequenceMode=function(){};bD.prototype.setManifestType=function(){};
|
|
bD.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[],g=[];(new Th).box("moof",Yh).box("traf",Yh).W("subs",function(h){g=[];for(var k=h.reader,l=k.U(),m=0;m<l;m++){k.U();for(var n=k.Aa(),p=0;p<n;p++)1==h.version?g.push(k.U()):g.push(k.Aa()),k.Z(),k.Z(),k.U()}}).box("mdat",ci(function(h){e=!0;if(g.length){for(var k=Hb(h,0,g[0]),l=[],m=g[0],n=1;n<g.length;n++){var p=Hb(h,m,g[n]);p=Hc(p);l.push("data:image/png;base64,"+p);m+=g[n]}f=f.concat(d.g.parseMedia(k,b,c,l))}else f=f.concat(d.g.parseMedia(h,
|
|
b,c,[]))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};P("shaka.text.Mp4TtmlParser",bD);bD.prototype.parseMedia=bD.prototype.parseMedia;bD.prototype.setManifestType=bD.prototype.setManifestType;bD.prototype.setSequenceMode=bD.prototype.setSequenceMode;bD.prototype.parseInit=bD.prototype.parseInit;Nf['application/mp4; codecs="stpp"']=function(){return new bD};Nf['application/mp4; codecs="stpp.ttml"']=function(){return new bD};Nf['application/mp4; codecs="stpp.ttml.im1i"']=function(){return new bD};
|
|
Nf['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new bD};Nf['application/mp4; codecs="stpp.ttml.im2i"']=function(){return new bD};Nf['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new bD};Nf['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new bD};Nf['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new bD};Nf['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new bD};Nf['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new bD};function cD(){this.g="UNKNOWN"}cD.prototype.parseInit=function(){};cD.prototype.setSequenceMode=function(){};cD.prototype.setManifestType=function(a){this.g=a};
|
|
cD.prototype.parseMedia=function(a,b){a=yc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if("HLS"==this.g)if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=$d(a[1]);if(null==a)throw new T(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,
|
|
d+=8589934592;a=b.periodStart+d/9E4-a}else b.periodStart&&b.vttOffset==b.periodStart&&(a=0);b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Sd(e);var f=new Ld;Xd(e);Td(e);for(var g=Xd(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),
|
|
h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Td(e);g=Xd(e)}b.push(f)}d=new Map;af(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&
|
|
(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Me(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=
|
|
r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=hf;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Xe;break;case "italic":m=!0;l.fontStyle=jf;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,
|
|
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Sd(l[0]),g=Yd(h),n=Vd(h,/[ \t]+--\x3e[ \t]+/g),k=Yd(h),null==g||null==n||null==k)Za("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new Me(g,k,m);Td(h);for(g=Xd(h);g;)dD(l,g,b),Td(h),g=Xd(h);
|
|
$e(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
|
|
function dD(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Pe:a.textAlign=lf[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Oe);else if(d=/^region:(.*)$/.exec(b)){if(b=eD(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=nf[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Te,a.line=Number(c[1]),c[2]&&(a.lineAlign=nf[c[2].toUpperCase()])}
|
|
function eD(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}P("shaka.text.VttTextParser",cD);cD.prototype.parseMedia=cD.prototype.parseMedia;cD.prototype.setManifestType=cD.prototype.setManifestType;cD.prototype.setSequenceMode=cD.prototype.setSequenceMode;cD.prototype.parseInit=cD.prototype.parseInit;Nf["text/vtt"]=function(){return new cD};Nf['text/vtt; codecs="vtt"']=function(){return new cD};Nf['text/vtt; codecs="wvtt"']=function(){return new cD};function fD(){this.g=null}fD.prototype.parseInit=function(a){var b=this,c=!1;(new Th).box("moov",Yh).box("trak",Yh).box("mdia",Yh).W("mdhd",function(d){d=yj(d.reader,d.version);b.g=d.timescale}).box("minf",Yh).box("stbl",Yh).W("stsd",$h).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};fD.prototype.setSequenceMode=function(){};fD.prototype.setManifestType=function(){};
|
|
fD.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Th).box("moof",Yh).box("traf",Yh).W("tfdt",function(B){g=!0;c=xj(B.reader,B.version).baseMediaDecodeTime}).W("tfhd",function(B){l=wj(B.reader,B.flags).Hd}).W("trun",function(B){h=!0;d=zj(B.reader,B.version,B.flags).oi}).box("mdat",ci(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Nh(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
p.value;var r=p.Qg||l,u=p.$e?c+p.$e:a;a=u+(r||0);var v=0;do{var w=m.U();v+=w;var z=m.U(),y=null;"vttc"==Xh(z)?8<w&&(y=m.Rb(w-8)):m.skip(w-8);r&&y&&(w=gD(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(Xf)};function gD(a,b,c){var d,e,f;(new Th).box("payl",ci(function(g){d=yc(g)})).box("iden",ci(function(g){e=yc(g)})).box("sttg",ci(function(g){f=yc(g)})).parse(a);return d?hD(d,e,f,b,c):null}
|
|
function hD(a,b,c,d,e){a=new Me(d,e,a);$e(a);b&&(a.id=b);if(c)for(b=new Sd(c),c=Xd(b);c;)dD(a,c,[]),Td(b),c=Xd(b);return a}P("shaka.text.Mp4VttParser",fD);fD.prototype.parseMedia=fD.prototype.parseMedia;fD.prototype.setManifestType=fD.prototype.setManifestType;fD.prototype.setSequenceMode=fD.prototype.setSequenceMode;fD.prototype.parseInit=fD.prototype.parseInit;Nf['application/mp4; codecs="wvtt"']=function(){return new fD};function iD(){}iD.prototype.parseInit=function(){};iD.prototype.setSequenceMode=function(){};iD.prototype.setManifestType=function(){};iD.prototype.parseMedia=function(a){var b=yc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Sd(c[0]),e=Yd(d),f=Vd(d,/,/g);d=Yd(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Me(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
P("shaka.text.SbvTextParser",iD);iD.prototype.parseMedia=iD.prototype.parseMedia;iD.prototype.setManifestType=iD.prototype.setManifestType;iD.prototype.setSequenceMode=iD.prototype.setSequenceMode;iD.prototype.parseInit=iD.prototype.parseInit;Nf["text/x-subviewer"]=function(){return new iD};function jD(){this.g=new cD}jD.prototype.parseInit=function(){};jD.prototype.setSequenceMode=function(){};jD.prototype.setManifestType=function(){};jD.prototype.parseMedia=function(a,b,c){a=yc(a);a=kD(a);a=Hb(Cc(a));return this.g.parseMedia(a,b,c,[])};
|
|
function kD(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}P("shaka.text.SrtTextParser",jD);jD.srt2webvtt=kD;jD.prototype.parseMedia=jD.prototype.parseMedia;
|
|
jD.prototype.setManifestType=jD.prototype.setManifestType;jD.prototype.setSequenceMode=jD.prototype.setSequenceMode;jD.prototype.parseInit=jD.prototype.parseInit;Nf["text/srt"]=function(){return new jD};function lD(){}lD.prototype.parseInit=function(){};lD.prototype.setSequenceMode=function(){};lD.prototype.setManifestType=function(){};
|
|
lD.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=yc(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=mD.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=nD.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(oD);else if("Style"==a){a=f.split(oD);f={};for(var g=0;g<e.length&&
|
|
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Ei:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=nD.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(oD);else if("Dialogue"==f){g=g.split(oD);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=pD(f.Start);var k=pD(f.End);g=new Me(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Ei=f.Style;(a=d.find(function(l){return function(m){return m.Name==
|
|
l.Ei}}(a)))&&qD(g,a);e.push(g)}return e};
|
|
function qD(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=rD(c))a.color=c;if(c=b.BackColour)if(c=rD(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=hf);b.Italic&&(a.fontStyle=jf);b.Underline&&a.textDecoration.push(kf);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Ve;a.textAlign="start";break;case 2:a.displayAlign=Ve;a.textAlign=Pe;break;case 3:a.displayAlign=Ve;a.textAlign="end";break;case 5:a.displayAlign=
|
|
"before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Pe;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=Pe;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function rD(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 pD(a){a=sD.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",lD);lD.prototype.parseMedia=lD.prototype.parseMedia;lD.prototype.setManifestType=lD.prototype.setManifestType;lD.prototype.setSequenceMode=lD.prototype.setSequenceMode;lD.prototype.parseInit=lD.prototype.parseInit;var mD=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,nD=/^\s*([^:]+):\s*(.*)/,oD=/\s*,\s*/,sD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
|
|
Nf["text/x-ssa"]=function(){return new lD};function tD(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Od:c,qa:a}:null}function uD(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
|
|
function vD(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
function wD(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function xD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=xD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?xd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Jf(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.j};
|
|
q.transmux=function(a,b,c,d){for(var e=Hb(a),f=vj(e),g=f.length;g<e.length&&!vD(e,g);g++);a=1E3*c.endTime;f=uj(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=uD(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=tD(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));var l=k.Od+k.qa;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
k.Od,g+l),size:k.qa,duration:1024,ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ab:[],Fa:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:a,yb:h},stream:b};d=new Ax([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Gx(d),this.g.set(c,b));c=this.i!==b;d=ly(d);this.i=b;this.h++;return c?(b=Mc(b,d),Promise.resolve(b)):
|
|
Promise.resolve(d)};P("shaka.transmuxer.AacTransmuxer",xD);xD.prototype.transmux=xD.prototype.transmux;xD.prototype.getOriginalMimeType=xD.prototype.getOriginalMimeType;xD.prototype.convertCodecs=xD.prototype.convertCodecs;xD.prototype.isSupported=xD.prototype.isSupported;xD.prototype.destroy=xD.prototype.destroy;qf("audio/aac",function(){return new xD("audio/aac")},wf);function yD(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,Fa:a,qa:e}}
|
|
function zD(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function AD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=AD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?xd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.j};
|
|
q.transmux=function(a,b,c,d){a=Hb(a);for(var e=vj(a),f=e.length;f<a.length&&!zD(a,f);f++);var g=1E3*c.endTime;e=uj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=yD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Fa;k.push({data:a.subarray(f,f+l.qa),size:l.qa,duration:1536,
|
|
ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}});f+=l.qa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ab:[],Fa:h,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:a,yb:k},stream:b};d=new Ax([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Gx(d),this.g.set(c,b));c=this.i!==b;d=ly(d);this.i=b;this.h++;return c?(b=Mc(b,d),Promise.resolve(b)):Promise.resolve(d)};P("shaka.transmuxer.Ac3Transmuxer",AD);
|
|
AD.prototype.transmux=AD.prototype.transmux;AD.prototype.getOriginalMimeType=AD.prototype.getOriginalMimeType;AD.prototype.convertCodecs=AD.prototype.convertCodecs;AD.prototype.isSupported=AD.prototype.isSupported;AD.prototype.destroy=AD.prototype.destroy;qf("audio/ac3",function(){return new AD("audio/ac3")},wf);function BD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Fj(a.subarray(b+2));Hj(c,2);Hj(c,3);var d=Ij(c,11)+1<<1,e=Ij(c,2);if(3==e){e=Ij(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Ij(c,2);var g=Ij(c,3),h=Ij(c,1);c=Ij(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,Fa:a,qa:d}};function CD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=CD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?xd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.j};
|
|
q.transmux=function(a,b,c,d){a=Hb(a);for(var e=vj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=uj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=BD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Fa;k.push({data:a.subarray(f,f+l.qa),
|
|
size:l.qa,duration:1536,ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}});f+=l.qa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ab:[],Fa:h,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:a,yb:k},stream:b};d=new Ax([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Gx(d),this.g.set(c,b));c=this.i!==b;d=ly(d);this.i=b;this.h++;return c?(b=Mc(b,d),Promise.resolve(b)):Promise.resolve(d)};
|
|
P("shaka.transmuxer.Ec3Transmuxer",CD);CD.prototype.transmux=CD.prototype.transmux;CD.prototype.getOriginalMimeType=CD.prototype.getOriginalMimeType;CD.prototype.convertCodecs=CD.prototype.convertCodecs;CD.prototype.isSupported=CD.prototype.isSupported;CD.prototype.destroy=CD.prototype.destroy;qf("audio/ec3",function(){return new CD("audio/ec3")},wf);function DD(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new Fj(b.data),d=Nj(c);Nj(c);Nj(c);Kj(c);if(ED.includes(d)&&(d=U(c),3===d&&Hj(c,1),Kj(c),Kj(c),Hj(c,1),Mj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Mj(c)&&(6>e?Oj(c,16):Oj(c,64))}Kj(c);d=U(c);if(0===d)U(c);else if(1===d)for(Hj(c,1),Kj(c),Kj(c),d=U(c),e=0;e<d;e++)Kj(c);Kj(c);Hj(c,1);var f=U(c),g=U(c),h=Ij(c,1);0===h&&Hj(c,1);Hj(c,1);var k=0,l=0,m=0,n=0;
|
|
Mj(c)&&(k=U(c),l=U(c),m=U(c),n=U(c));e=d=1;if(Mj(c)&&Mj(c)){var p=Nj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=Ij(c,16),e=Ij(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,ha(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,ha(a));a=new Uint8Array([1,k[3],k[4],
|
|
k[5],255,225].concat(k,[1],b));return{height:c,width:f,Qa:a,Va:d,Wa:e}}
|
|
function FD(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],v=t(e.nalus),w=v.next();!w.done;w=v.next()){w=w.value;var z=w.fullData.byteLength,y=new Uint8Array(4);y[0]=z>>24&255;y[1]=z>>16&255;y[2]=z>>8&255;y[3]=z&255;u.push(y);u.push(w.fullData)}e.data=Mc.apply(Gc,ha(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;g<a.length;g++){var h=a[g],k=h.nalus,l=!1;e&&k.length&&!f&&(c(),b(h));k=t(h.nalus);
|
|
for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var p=!1;n=!0;var r=m.data;l&&4<r.length&&(r=Pj(new Fj(r)),2===r||4===r||7===r||9===r)&&(p=!0);p&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=p;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
|
|
return d}var ED=[100,110,122,244,44,83,86,118,128,138,139,134];function GD(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=HD(b.fullData);a=ID(c.fullData);var f=JD(d.fullData);b=KD(b.fullData,c.fullData,d.fullData,{Eg:e.Eg,fh:e.fh,hg:a.hg,ig:a.ig,ag:a.ag,gg:a.gg,cg:a.cg,dg:a.dg,eg:a.eg,fg:a.fg,Vf:a.Vf,Wf:a.Wf,Xf:a.Xf,Yf:a.Yf,Zf:a.Zf,$f:a.$f,Of:a.Of,Qe:a.Qe,Mf:a.Mf,If:a.If,Hf:a.Hf,Hg:f.Hg});return{height:a.height,width:a.width,
|
|
Qa:b,Va:a.Ek,Wa:a.Dk}}function HD(a){var b=new Fj(a,!0);Nj(b);Nj(b);Ij(b,4);Ij(b,2);Ij(b,6);a=Ij(b,3);b=Mj(b);return{Eg:a+1,fh:b}}
|
|
function ID(a){a=new Fj(a,!0);Nj(a);Nj(a);var b=0,c=0,d=0,e=0;Ij(a,4);var f=Ij(a,3);Mj(a);for(var g=Ij(a,2),h=Ij(a,1),k=Ij(a,5),l=Nj(a),m=Nj(a),n=Nj(a),p=Nj(a),r=Nj(a),u=Nj(a),v=Nj(a),w=Nj(a),z=Nj(a),y=Nj(a),B=Nj(a),C=[],D=[],G=0;G<f;G++)C.push(Mj(a)),D.push(Mj(a));if(0<f)for(G=f;8>G;G++)Ij(a,2);for(G=0;G<f;G++)C[G]&&Ij(a,88),D[G]&&Nj(a);U(a);C=U(a);3==C&&Ij(a,1);D=U(a);G=U(a);Mj(a)&&(b+=U(a),c+=U(a),d+=U(a),e+=U(a));var A=U(a),E=U(a),F=U(a);if(Mj(a))for(var J=0;J<=f;J++)U(a),U(a),U(a);else U(a),
|
|
U(a),U(a);U(a);U(a);U(a);U(a);U(a);U(a);if(Mj(a)&&Mj(a))for(J=0;4>J;J++)for(var L=0;L<(3===J?2:6);L++)if(Mj(a)){var K=Math.min(64,1<<4+(J<<1));1<J&&Lj(a);for(var O=0;O<K;O++)Lj(a)}else U(a);Mj(a);Mj(a);Mj(a)&&(Nj(a),U(a),U(a),Mj(a));J=U(a);for(K=L=0;K<J;K++)if(O=!1,0!==K&&(O=Mj(a)),O){K===J&&U(a);Mj(a);U(a);for(var M=O=0;M<=L;M++){var N=Mj(a),R=!1;N||(R=Mj(a));(N||R)&&O++}L=O}else{M=U(a);O=U(a);L=M+O;for(N=0;N<M;N++)U(a),Mj(a);for(M=0;M<O;M++)U(a),Mj(a)}if(Mj(a))for(J=U(a),L=0;L<J;L++){for(K=0;K<
|
|
F+4;K++)Ij(a,1);Ij(a,1)}J=F=1;L=0;Mj(a);Mj(a);if(Mj(a)){Mj(a)&&(K=Nj(a),O=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],M=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<K&&16>=K?(F=O[K-1],J=M[K-1]):255===K&&(F=Ij(a,16),J=Ij(a,16)));Mj(a)&&Mj(a);Mj(a)&&(Ij(a,3),Mj(a),Mj(a)&&(Nj(a),Nj(a),Nj(a)));Mj(a)&&(U(a),U(a));Mj(a);Mj(a);Mj(a);if(K=Mj(a))U(a),U(a),U(a),U(a);if(Mj(a)&&(Ij(a,32),Ij(a,32),Mj(a)&&U(a),Mj(a))){M=!1;K=Mj(a);O=Mj(a);if(K||O){if(M=Mj(a))Nj(a),Ij(a,5),Mj(a),Ij(a,5);Ij(a,4);Ij(a,4);M&&
|
|
Ij(a,4);Ij(a,5);Ij(a,5);Ij(a,5)}for(N=0;N<=f;N++){var Q=!0;R=1;Mj(a)||(Q=Mj(a));var Y=!1;Q?U(a):Y=Mj(a);Y||(R=U(a)+1);if(K){for(Q=0;Q<R;Q++)U(a),U(a),M&&(U(a),U(a));Mj(a)}if(O){for(Q=0;Q<R;Q++)U(a),U(a),M&&(U(a),U(a));Mj(a)}}}Mj(a)&&(Mj(a),Mj(a),Mj(a),L=U(a),U(a),U(a),U(a),U(a))}return{ag:B,hg:g,ig:h,gg:k,cg:l,dg:m,eg:n,fg:p,Vf:r,Wf:u,Xf:v,Yf:w,Zf:z,$f:y,Qe:L,Of:0,Mf:C,If:A,Hf:E,width:D-(b+c)*(1===C||2===C?2:1),height:G-(d+e)*(1===C?2:1),Ek:F,Dk:J}}
|
|
function JD(a){var b=new Fj(a,!0);Nj(b);Nj(b);U(b);U(b);Mj(b);Mj(b);Ij(b,3);Mj(b);Mj(b);U(b);U(b);Lj(b);Mj(b);Mj(b);Mj(b)&&U(b);Lj(b);Lj(b);Mj(b);Mj(b);Mj(b);Mj(b);a=Mj(b);b=Mj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Hg:c}}
|
|
function KD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.hg&3)<<6|(d.ig?1:0)<<5|d.gg&31;e[2]=d.cg;e[3]=d.dg;e[4]=d.eg;e[5]=d.fg;e[6]=d.Vf;e[7]=d.Wf;e[8]=d.Xf;e[9]=d.Yf;e[10]=d.Zf;e[11]=d.$f;e[12]=d.ag;e[13]=240|(d.Qe&3840)>>8;e[14]=d.Qe&255;e[15]=252|d.Hg&3;e[16]=252|d.Mf&3;e[17]=248|d.If&7;e[18]=248|d.Hf&7;e[19]=0;e[20]=0;e[21]=(d.Of&3)<<6|(d.Eg&7)<<3|(d.fh?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function LD(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*MD[14*(3===c?3-d:3===d?3:4)+e-1];f=ND[3*(3===c?0:2===c?1:2)+f];c=OD[c][d];var h=PD[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,qa:k,Ck:8*c*h}}return null}
|
|
function QD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function RD(a,b){if(b+1<a.length&&QD(a,b)){var c=LD(a,b),d=4;c&&c.qa&&(d=c.qa);b+=d;return b===a.length||b+1<a.length&&QD(a,b)}return!1}
|
|
var MD=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],ND=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],OD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],PD=[0,1,1,4];function SD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=SD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?xd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.j};
|
|
q.transmux=function(a,b,c,d){for(var e=Hb(a),f=vj(e).length;f<e.length&&!RD(e,f);f++);var g;for(a=[];f<e.length;){var h=LD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));g||(g=h);f+h.qa<=e.length&&a.push({data:e.subarray(f,f+h.qa),size:h.qa,duration:1152,ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}});f+=h.qa}if(!g)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));e=9E4*g.Ck/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
duration:d,Ab:[],Fa:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:e,yb:a},stream:b};d=new Ax([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Gx(d),this.g.set(c,b));c=this.i!==b;d=ly(d);this.i=b;this.h++;return c?(b=Mc(b,d),Promise.resolve(b)):Promise.resolve(d)};P("shaka.transmuxer.Mp3Transmuxer",SD);SD.prototype.transmux=SD.prototype.transmux;SD.prototype.getOriginalMimeType=SD.prototype.getOriginalMimeType;SD.prototype.convertCodecs=SD.prototype.convertCodecs;
|
|
SD.prototype.isSupported=SD.prototype.isSupported;SD.prototype.destroy=SD.prototype.destroy;qf("audio/mpeg",function(){return new SD("audio/mpeg")},wf);function TD(a){this.h=a;this.g=null}q=TD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Jf(a).split(","),c=Rc("audio",b);b=Rc("video",b);return!c||b||"mp3"!=Ff(c)?!1:xd(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
|
|
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Qj;a=Hb(a);a=this.g.parse(a);if("mp3"!=a.Id().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));c=new Uint8Array([]);e=t(a.vb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=LD(a,b))?(b+d.qa<=a.length&&(c=Mc(c,a.subarray(b,b+d.qa))),b+=d.qa):b++;return Promise.resolve(c)};P("shaka.transmuxer.MpegTsTransmuxer",TD);TD.prototype.transmux=TD.prototype.transmux;
|
|
TD.prototype.getOriginalMimeType=TD.prototype.getOriginalMimeType;TD.prototype.convertCodecs=TD.prototype.convertCodecs;TD.prototype.isSupported=TD.prototype.isSupported;TD.prototype.destroy=TD.prototype.destroy;qf("video/mp2t",function(){return new TD("video/mp2t")},vf);/*
|
|
@license
|
|
MSS Transmuxer
|
|
Copyright 2015 Dash Industry Forum
|
|
SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
function UD(a){this.h=a;(this.g=Dv.get("ISOBoxer")())&&VD(this)}
|
|
function VD(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==WD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=UD.prototype;q.destroy=function(){};
|
|
q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return xd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return xd(b)||xd(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
|
|
q.transmux=function(a,b,c){if(!c)return Promise.resolve(Hb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.R()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
|
|
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=XD(u,"traf")+XD(h,"senc")+16);var w=Hb(e.write());return Promise.resolve(w)}catch(z){return z instanceof T?Promise.reject(z):Promise.reject(new T(2,3,3022,c?c.R()[0]:null))}};function XD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}P("shaka.transmuxer.MssTransmuxer",UD);UD.prototype.transmux=UD.prototype.transmux;
|
|
UD.prototype.getOriginalMimeType=UD.prototype.getOriginalMimeType;UD.prototype.convertCodecs=UD.prototype.convertCodecs;UD.prototype.isSupported=UD.prototype.isSupported;UD.prototype.destroy=UD.prototype.destroy;var WD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);qf("mss/audio/mp4",function(){return new UD("mss/audio/mp4")},wf);qf("mss/video/mp4",function(){return new UD("mss/video/mp4")},wf);function YD(a){this.m=a;this.g=0;this.i=new Map;this.l=this.h=this.j=null}q=YD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Jf(c).split(",");c=Rc("audio",d);d=Rc("video",d);if(c&&(c=Ff(c),!ZD.includes(c))||d&&(c=Ff(d),!$D.includes(c)))return!1;if(b)return xd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return xd(b)||xd(a)};
|
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Jf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return tg(c,"audio/mp4")}).map(ug).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.m};
|
|
q.transmux=function(a,b,c,d,e){var f=Hb(a);if("audio"==e&&!Zj(f)){for(var g=vj(f),h=g.length;h<f.length;h++)if(RD(f,h))return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));for(h=g.length;h<f.length;h++)if(vD(f,h))return this.h||(this.h=new xD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.R()[0]:null))}this.j?this.j.clearData():this.j=new Qj;var k=this.j.parse(f),l=[],m=k.Id();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=k.Mc(),v=
|
|
FD(u);if(!v.length)throw new T(2,3,3023,c?c.R()[0]:null);for(var w=0;w<v.length;w++){var z=v[w];null==r&&(r=z.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(z.dts||0):1<v.length?(z.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:z.data,size:z.data.byteLength,duration:y,ub:Math.round((z.pts||0)-(z.dts||0)),flags:{wb:0,ob:0,mb:0,ib:0,jb:z.isKeyframe?2:1,xb:z.isKeyframe?0:1}})}for(var B=[],C=t(u),D=C.next();!D.done;D=C.next())B.push.apply(B,ha(D.value.nalus));var G=DD(B);if(!G||null==
|
|
r)throw new T(2,3,3018,c?c.R()[0]:null);b.height=G.height;b.width=G.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ab:[],Fa:new Uint8Array([]),Qa:G.Qa,Va:G.Va,Wa:G.Wa,data:{Sb:this.g,baseMediaDecodeTime:r,yb:p},stream:b};break;case "hvc":var A=[],E=null,F=[],J=k.Mc();if(!J.length)throw new T(2,3,3023,c?c.R()[0]:null);for(var L=0;L<J.length;L++){var K=J[L],O=K.nalus;F.push.apply(F,ha(O));for(var M=!1,N=[],R=!1,Q=t(O),Y=Q.next();!Y.done;Y=
|
|
Q.next()){var ia=Y.value;switch(ia.type){case 1:case 0:var X=R=!0;break;case 19:case 20:case 21:M=X=R=!0;break;case 32:X=!0;break;case 33:X=!0;break;case 34:X=!0;break;case 35:R=X=!0;break;case 39:case 40:X=!0;break;default:X=!1}if(R&&X){var ja=ia.fullData.byteLength,Pa=new Uint8Array(4);Pa[0]=ja>>24&255;Pa[1]=ja>>16&255;Pa[2]=ja>>8&255;Pa[3]=ja&255;N.push(Pa);N.push(ia.fullData)}}var Ka=N.length?{data:Mc.apply(Gc,ha(N)),isKeyframe:M}:null;if(Ka){null==E&&null!=K.dts&&(E=K.dts);var jb=void 0;jb=L+
|
|
1<J.length?(J[L+1].dts||0)-(K.dts||0):1<J.length?(K.dts||0)-(J[L-1].dts||0):9E4*(c.endTime-c.startTime);A.push({data:Ka.data,size:Ka.data.byteLength,duration:jb,ub:Math.round((K.pts||0)-(K.dts||0)),flags:{wb:0,ob:0,mb:0,ib:0,jb:Ka.isKeyframe?2:1,xb:Ka.isKeyframe?0:1}})}}var ab=GD(F);if(!ab||null==E)throw new T(2,3,3018,c?c.R()[0]:null);b.height=ab.height;b.width=ab.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ab:[],Fa:new Uint8Array([]),
|
|
Qa:ab.Qa,Va:ab.Va,Wa:ab.Wa,data:{Sb:this.g,baseMediaDecodeTime:E,yb:A},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Ia=[],Va,Mb=null,bb=null,Bb=null,Ud=t(k.vb()),Ub=Ud.next();!Ub.done;Ub=Ud.next()){var qd=Ub.value,Vb=qd.data;if(Vb){var Ib=0;if(-1==bb&&Bb)Vb=Mc(Bb,qd.data),bb=null;else if(null!=bb&&Bb){Ib=Math.max(0,bb);var Ch=Mc(Bb,Vb.subarray(0,Ib));Ia.push({data:Ch,size:Ch.byteLength,duration:1024,ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}});bb=Bb=null}Va=uD(Vb,
|
|
Ib);if(!Va)throw new T(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=Va.sampleRate;b.channelsCount=Va.channelCount;null==Mb&&null!==qd.pts&&(Mb=qd.pts);for(;Ib<Vb.length;){var Uc=tD(Vb,Ib);if(!Uc){Bb=Vb.subarray(Ib,Vb.length);bb=-1;break}var Ne=Uc.Od+Uc.qa;bb=Math.max(0,Ib+Ne-Vb.length);0!=bb?Bb=Vb.subarray(Ib+Uc.Od,Ib+Ne):Ib+Ne<=Vb.length&&Ia.push({data:Vb.subarray(Ib+Uc.Od,Ib+Ne),size:Uc.qa,duration:1024,ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}});Ib+=Ne}}}if(!Va||null==Mb){if(!k.Mc().length)throw new T(2,
|
|
3,3018,c?c.R()[0]:null);Mb=9E4*c.startTime;var Rf=Rc("audio",b.codecs.split(","));if(!Rf||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.R()[0]:null);Va={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Rf};var Sf=wD(Rf,b.channelsCount);if(!Sf)throw new T(2,3,3018,c?c.R()[0]:null);for(var Rj=Mb+9E4*(c.endTime-c.startTime),Vc=Mb;Vc<Rj;)Ia.push({data:Sf,size:Sf.byteLength,duration:1024,ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}}),Vc+=1024/Va.sampleRate*9E4}var Qx=Va.sampleRate,
|
|
KH=Mb/9E4*Qx;n={id:b.id,type:"audio",codecs:Va.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Qx,duration:d,Ab:[],Fa:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:KH,yb:Ia},stream:b};break;case "ac3":for(var Rx=[],zk=0,Jo=new Uint8Array([]),Ak=null,Sx=t(k.vb()),Ko=Sx.next();!Ko.done;Ko=Sx.next()){var Lo=Ko.value,Mo=Lo.data;null==Ak&&null!==Lo.pts&&(Ak=Lo.pts);for(var ag=0;ag<Mo.length;){var ne=yD(Mo,ag);ne?(b.audioSamplingRate=ne.sampleRate,b.channelsCount=
|
|
ne.channelCount,zk=ne.sampleRate,Jo=ne.Fa,Rx.push({data:Mo.subarray(ag,ag+ne.qa),size:ne.qa,duration:1536,ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}}),ag+=ne.qa):ag++}}if(0==zk||0==Jo.byteLength||null==Ak)throw new T(2,3,3018,c?c.R()[0]:null);var LH=Ak/9E4*zk;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:zk,duration:d,Ab:[],Fa:Jo,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:LH,yb:Rx},stream:b};break;case "ec3":for(var Tx=[],Bk=0,
|
|
No=new Uint8Array([]),Ck=null,Ux=t(k.vb()),Oo=Ux.next();!Oo.done;Oo=Ux.next()){var Po=Oo.value,Qo=Po.data;null==Ck&&null!==Po.pts&&(Ck=Po.pts);for(var bg=0;bg<Qo.length;){var oe=BD(Qo,bg);oe?(b.audioSamplingRate=oe.sampleRate,b.channelsCount=oe.channelCount,Bk=oe.sampleRate,No=oe.Fa,Tx.push({data:Qo.subarray(bg,bg+oe.qa),size:oe.qa,duration:1536,ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}}),bg+=oe.qa):bg++}}if(0==Bk||0==No.byteLength||null==Ck)throw new T(2,3,3018,c?c.R()[0]:null);var MH=Ck/9E4*Bk;
|
|
n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Bk,duration:d,Ab:[],Fa:No,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:MH,yb:Tx},stream:b};break;case "mp3":for(var Vx=[],Dk,Ek=null,Wx=t(k.vb()),Ro=Wx.next();!Ro.done;Ro=Wx.next()){var So=Ro.value,Oh=So.data;if(Oh){null==Ek&&null!==So.pts&&(Ek=So.pts);for(var Qe=0;Qe<Oh.length;){var cg=LD(Oh,Qe);cg?(Dk||(Dk=cg),Qe+cg.qa<=Oh.length&&Vx.push({data:Oh.subarray(Qe,Qe+cg.qa),size:cg.qa,duration:1152,
|
|
ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}}),Qe+=cg.qa):Qe++}}}if(!Dk||null==Ek)throw new T(2,3,3018,c?c.R()[0]:null);var Xx=Dk.sampleRate,NH=Ek/9E4*Xx;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Xx,duration:d,Ab:[],Fa:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:NH,yb:Vx},stream:b};break;case "opus":var Yx=[],Fk=null,sd=k.H;if(!sd)throw new T(2,3,3018,c?c.R()[0]:null);var Pb=[];switch(sd.$i){case 1:case 2:Pb=
|
|
[0];break;case 0:Pb=[255,1,1,0,1];break;case 128:Pb=[255,2,0,0,1];break;case 3:Pb=[1,2,1,0,2,1];break;case 4:Pb=[1,2,2,0,1,2,3];break;case 5:Pb=[1,3,2,0,4,1,2,3];break;case 6:Pb=[1,4,2,0,4,1,2,3,5];break;case 7:Pb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Pb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Pb=[1,1,2,0,1];break;case 131:Pb=[1,1,3,0,1,2];break;case 132:Pb=[1,1,4,0,1,2,3];break;case 133:Pb=[1,1,5,0,1,2,3,4];break;case 134:Pb=[1,1,6,0,1,2,3,4,5];break;case 135:Pb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Pb=
|
|
[1,1,8,0,1,2,3,4,5,6,7]}var Zx=new Uint8Array([0,sd.channelCount,0,0,sd.sampleRate>>>24&255,sd.sampleRate>>>17&255,sd.sampleRate>>>8&255,sd.sampleRate>>>0&255,0,0].concat(ha(Pb)));for(var $x=sd.sampleRate,ay=t(k.vb()),To=ay.next();!To.done;To=ay.next()){var Uo=To.value,dg=Uo.data;null==Fk&&null!==Uo.pts&&(Fk=Uo.pts);for(var Ph=0;Ph<dg.length;){for(var OH=0!==(dg[Ph+1]&16),PH=0!==(dg[Ph+1]&8),Wd=Ph+2,Gk=0;255===dg[Wd];)Gk+=255,Wd+=1;Gk+=dg[Wd];Wd+=1;Wd+=OH?2:0;Wd+=PH?2:0;var by=dg.slice(Wd,Wd+Gk);
|
|
Yx.push({data:by,size:by.byteLength,duration:960,ub:0,flags:{wb:0,ob:0,mb:0,ib:0,jb:2,xb:0}});Ph=Wd+Gk}}if(0==Zx.byteLength||null==Fk)throw new T(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=sd.sampleRate;b.channelsCount=sd.channelCount;var QH=Fk/9E4*$x;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:$x,duration:d,Ab:[],Fa:Zx,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:QH,yb:Yx},stream:b}}n&&(l.push(n),n=null)}}catch(Vo){return Vo&&
|
|
3023==Vo.code?Promise.resolve(new Uint8Array([])):Promise.reject(Vo)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));var cy=new Ax(l),Wo=b.id+"_"+c.i;if(this.i.has(Wo))var Qh=this.i.get(Wo);else Qh=Gx(cy),this.i.set(Wo,Qh);var RH=this.l!==Qh,dy=ly(cy);this.l=Qh;this.g++;if(RH){var SH=Mc(Qh,dy);return Promise.resolve(SH)}return Promise.resolve(dy)};P("shaka.transmuxer.TsTransmuxer",YD);YD.prototype.transmux=YD.prototype.transmux;YD.prototype.getOriginalMimeType=YD.prototype.getOriginalMimeType;
|
|
YD.prototype.convertCodecs=YD.prototype.convertCodecs;YD.prototype.isSupported=YD.prototype.isSupported;YD.prototype.destroy=YD.prototype.destroy;var ZD=["aac","ac-3","ec-3","mp3","opus"],$D=["avc","hevc"];qf("video/mp2t",function(){return new YD("video/mp2t")},uf);/*
|
|
@license
|
|
EME Encryption Scheme Polyfill
|
|
Copyright 2019 Google LLC
|
|
SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function aE(){}var bE;
|
|
function cE(){bE||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(bE=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=dE,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
function dE(a,b){var c=this,d;return I(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),x(e,bE.call(c,a,b),2);d=e.h;if(eE(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=bE,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=fE;return e.return(fE.call(c,
|
|
a,b))})}
|
|
function fE(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return I(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=gE(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=hE(h.videoCapabilities,d),l=hE(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return x(v,bE.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new iE(p,r,u))})}function hE(a,b){return a?a.filter(function(c){return jE(c.encryptionScheme,b)}):a}P("EmeEncryptionSchemePolyfill",aE);aE.install=cE;function kE(){}var lE;
|
|
function mE(){lE||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(lE=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=nE,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
function nE(a){var b=this,c,d;return I(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),x(e,lE.call(b,a),2);case 2:c=e.h;if(!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&eE(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=lE,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
navigator.mediaCapabilities.decodingInfo=oE;if(d){e.B(3);break}return x(e,pE(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(oE.call(b,a))}})}
|
|
function oE(a){var b=this,c,d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=gE(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},jE(d,g)&&jE(c,g))?x(l,lE.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
new iE(k.keySystemAccess,c,d);l.B(3);break}if(!a.keySystemConfiguration){l.B(3);break}return x(l,pE(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
|
|
function pE(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,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return x(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",kE);kE.install=mE;function iE(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
|
|
iE.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};iE.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
|
|
function gE(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function eE(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 jE(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(qE||rE||sE)return!0;return!1}function tE(){}function KA(){cE();mE()}P("EncryptionSchemePolyfills",tE);tE.install=KA;var sE=navigator.userAgent.includes("CrKey"),qE=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10),uE;var vE=navigator.userAgent||"";if(vE.includes("Web0S")){var wE=vE.match(/Chrome\/(\d+)/);uE=wE?79<=parseInt(wE[1],10):!1}else uE=!1;var rE=uE;
|
|
"undefined"!==typeof module&&module.exports&&(module.exports=tE);/*
|
|
@license
|
|
Copyright 2013 Ali Al Dallal
|
|
|
|
Licensed under the MIT license.
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|
|
*/
|
|
for(var xE={ach:{D:"Lwo",F:"Acholi"},ady:{D:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",F:"Adyghe"},af:{D:"Afrikaans",F:"Afrikaans"},"af-NA":{D:"Afrikaans (Namibia)",F:"Afrikaans (Namibia)"},"af-ZA":{D:"Afrikaans (South Africa)",F:"Afrikaans (South Africa)"},ak:{D:"T\u0255\u0265i",F:"Akan"},ar:{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic"},"ar-AR":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic"},"ar-MA":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic (Morocco)"},
|
|
"ar-SA":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",F:"Arabic (Saudi Arabia)"},"ay-BO":{D:"Aymar aru",F:"Aymara"},az:{D:"Az\u0259rbaycan dili",F:"Azerbaijani"},"az-AZ":{D:"Az\u0259rbaycan dili",F:"Azerbaijani"},"be-BY":{D:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",F:"Belarusian"},bg:{D:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",F:"Bulgarian"},"bg-BG":{D:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
|
|
F:"Bulgarian"},bn:{D:"\u09ac\u09be\u0982\u09b2\u09be",F:"Bengali"},"bn-IN":{D:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",F:"Bengali (India)"},"bn-BD":{D:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",F:"Bengali (Bangladesh)"},"bs-BA":{D:"Bosanski",F:"Bosnian"},ca:{D:"Catal\u00e0",F:"Catalan"},"ca-ES":{D:"Catal\u00e0",F:"Catalan"},cak:{D:"Maya Kaqchikel",F:"Kaqchikel"},"ck-US":{D:"\u13e3\u13b3\u13a9 (tsalagi)",F:"Cherokee"},cs:{D:"\u010ce\u0161tina",
|
|
F:"Czech"},"cs-CZ":{D:"\u010ce\u0161tina",F:"Czech"},cy:{D:"Cymraeg",F:"Welsh"},"cy-GB":{D:"Cymraeg",F:"Welsh"},da:{D:"Dansk",F:"Danish"},"da-DK":{D:"Dansk",F:"Danish"},de:{D:"Deutsch",F:"German"},"de-AT":{D:"Deutsch (\u00d6sterreich)",F:"German (Austria)"},"de-DE":{D:"Deutsch (Deutschland)",F:"German (Germany)"},"de-CH":{D:"Deutsch (Schweiz)",F:"German (Switzerland)"},dsb:{D:"Dolnoserb\u0161\u0107ina",F:"Lower Sorbian"},el:{D:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",F:"Greek"},"el-GR":{D:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
|
|
F:"Greek (Greece)"},en:{D:"English",F:"English"},"en-GB":{D:"English (UK)",F:"English (UK)"},"en-AU":{D:"English (Australia)",F:"English (Australia)"},"en-CA":{D:"English (Canada)",F:"English (Canada)"},"en-IE":{D:"English (Ireland)",F:"English (Ireland)"},"en-IN":{D:"English (India)",F:"English (India)"},"en-PI":{D:"English (Pirate)",F:"English (Pirate)"},"en-UD":{D:"English (Upside Down)",F:"English (Upside Down)"},"en-US":{D:"English (US)",F:"English (US)"},"en-ZA":{D:"English (South Africa)",
|
|
F:"English (South Africa)"},"en@pirate":{D:"English (Pirate)",F:"English (Pirate)"},eo:{D:"Esperanto",F:"Esperanto"},"eo-EO":{D:"Esperanto",F:"Esperanto"},es:{D:"Espa\u00f1ol",F:"Spanish"},"es-AR":{D:"Espa\u00f1ol (Argentine)",F:"Spanish (Argentina)"},"es-419":{D:"Espa\u00f1ol (Latinoam\u00e9rica)",F:"Spanish (Latin America)"},"es-CL":{D:"Espa\u00f1ol (Chile)",F:"Spanish (Chile)"},"es-CO":{D:"Espa\u00f1ol (Colombia)",F:"Spanish (Colombia)"},"es-EC":{D:"Espa\u00f1ol (Ecuador)",F:"Spanish (Ecuador)"},
|
|
"es-ES":{D:"Espa\u00f1ol (Espa\u00f1a)",F:"Spanish (Spain)"},"es-LA":{D:"Espa\u00f1ol (Latinoam\u00e9rica)",F:"Spanish (Latin America)"},"es-NI":{D:"Espa\u00f1ol (Nicaragua)",F:"Spanish (Nicaragua)"},"es-MX":{D:"Espa\u00f1ol (M\u00e9xico)",F:"Spanish (Mexico)"},"es-US":{D:"Espa\u00f1ol (Estados Unidos)",F:"Spanish (United States)"},"es-VE":{D:"Espa\u00f1ol (Venezuela)",F:"Spanish (Venezuela)"},et:{D:"eesti keel",F:"Estonian"},"et-EE":{D:"Eesti (Estonia)",F:"Estonian (Estonia)"},eu:{D:"Euskara",F:"Basque"},
|
|
"eu-ES":{D:"Euskara",F:"Basque"},fa:{D:"\u0641\u0627\u0631\u0633\u06cc",F:"Persian"},"fa-IR":{D:"\u0641\u0627\u0631\u0633\u06cc",F:"Persian"},"fb-LT":{D:"Leet Speak",F:"Leet"},ff:{D:"Fulah",F:"Fulah"},fi:{D:"Suomi",F:"Finnish"},"fi-FI":{D:"Suomi",F:"Finnish"},"fo-FO":{D:"F\u00f8royskt",F:"Faroese"},fr:{D:"Fran\u00e7ais",F:"French"},"fr-CA":{D:"Fran\u00e7ais (Canada)",F:"French (Canada)"},"fr-FR":{D:"Fran\u00e7ais (France)",F:"French (France)"},"fr-BE":{D:"Fran\u00e7ais (Belgique)",F:"French (Belgium)"},
|
|
"fr-CH":{D:"Fran\u00e7ais (Suisse)",F:"French (Switzerland)"},"fy-NL":{D:"Frysk",F:"Frisian (West)"},ga:{D:"Gaeilge",F:"Irish"},"ga-IE":{D:"Gaeilge (Gaelic)",F:"Irish (Gaelic)"},gl:{D:"Galego",F:"Galician"},"gl-ES":{D:"Galego",F:"Galician"},"gn-PY":{D:"Ava\u00f1e'\u1ebd",F:"Guarani"},"gu-IN":{D:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",F:"Gujarati"},"gx-GR":{D:"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",F:"Classical Greek"},he:{D:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",
|
|
F:"Hebrew"},"he-IL":{D:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",F:"Hebrew"},hi:{D:"\u0939\u093f\u0928\u094d\u0926\u0940",F:"Hindi"},"hi-IN":{D:"\u0939\u093f\u0928\u094d\u0926\u0940",F:"Hindi"},hr:{D:"Hrvatski",F:"Croatian"},"hr-HR":{D:"Hrvatski",F:"Croatian"},hsb:{D:"Hornjoserb\u0161\u0107ina",F:"Upper Sorbian"},ht:{D:"Krey\u00f2l",F:"Haitian Creole"},hu:{D:"Magyar",F:"Hungarian"},"hu-HU":{D:"Magyar",F:"Hungarian"},"hy-AM":{D:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",F:"Armenian"},id:{D:"Bahasa Indonesia",
|
|
F:"Indonesian"},"id-ID":{D:"Bahasa Indonesia",F:"Indonesian"},is:{D:"\u00cdslenska",F:"Icelandic"},"is-IS":{D:"\u00cdslenska (Iceland)",F:"Icelandic (Iceland)"},it:{D:"Italiano",F:"Italian"},"it-IT":{D:"Italiano",F:"Italian"},ja:{D:"\u65e5\u672c\u8a9e",F:"Japanese"},"ja-JP":{D:"\u65e5\u672c\u8a9e",F:"Japanese"},"jv-ID":{D:"Basa Jawa",F:"Javanese"},"ka-GE":{D:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",F:"Georgian"},"kk-KZ":{D:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",F:"Kazakh"},km:{D:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",
|
|
F:"Khmer"},"km-KH":{D:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",F:"Khmer"},kab:{D:"Taqbaylit",F:"Kabyle"},kn:{D:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",F:"Kannada"},"kn-IN":{D:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",F:"Kannada (India)"},ko:{D:"\ud55c\uad6d\uc5b4",F:"Korean"},"ko-KR":{D:"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",F:"Korean (Korea)"},ku:{D:"Kurd\u00ee",F:"Kurdish"},"ku-TR":{D:"Kurd\u00ee",F:"Kurdish"},la:{D:"Latin",F:"Latin"},"la-VA":{D:"Latin",F:"Latin"},lb:{D:"L\u00ebtzebuergesch",
|
|
F:"Luxembourgish"},"li-NL":{D:"L\u00e8mb\u00f6rgs",F:"Limburgish"},lt:{D:"Lietuvi\u0173",F:"Lithuanian"},"lt-LT":{D:"Lietuvi\u0173",F:"Lithuanian"},lv:{D:"Latvie\u0161u",F:"Latvian"},"lv-LV":{D:"Latvie\u0161u",F:"Latvian"},mai:{D:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0",F:"Maithili"},"mg-MG":{D:"Malagasy",F:"Malagasy"},mk:{D:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",F:"Macedonian"},"mk-MK":{D:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
|
|
F:"Macedonian (Macedonian)"},ml:{D:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",F:"Malayalam"},"ml-IN":{D:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",F:"Malayalam"},"mn-MN":{D:"\u041c\u043e\u043d\u0433\u043e\u043b",F:"Mongolian"},mr:{D:"\u092e\u0930\u093e\u0920\u0940",F:"Marathi"},"mr-IN":{D:"\u092e\u0930\u093e\u0920\u0940",F:"Marathi"},ms:{D:"Bahasa Melayu",F:"Malay"},"ms-MY":{D:"Bahasa Melayu",F:"Malay"},mt:{D:"Malti",F:"Maltese"},"mt-MT":{D:"Malti",F:"Maltese"},my:{D:"\u1017\u1019\u102c\u1005\u1000\u102c",
|
|
F:"Burmese"},nb:{D:"Norsk (bokm\u00e5l)",F:"Norwegian (bokmal)"},"nb-NO":{D:"Norsk (bokm\u00e5l)",F:"Norwegian (bokmal)"},ne:{D:"\u0928\u0947\u092a\u093e\u0932\u0940",F:"Nepali"},"ne-NP":{D:"\u0928\u0947\u092a\u093e\u0932\u0940",F:"Nepali"},nl:{D:"Nederlands",F:"Dutch"},"nl-BE":{D:"Nederlands (Belgi\u00eb)",F:"Dutch (Belgium)"},"nl-NL":{D:"Nederlands (Nederland)",F:"Dutch (Netherlands)"},"nn-NO":{D:"Norsk (nynorsk)",F:"Norwegian (nynorsk)"},no:{D:"Norsk",F:"Norwegian"},oc:{D:"Occitan",F:"Occitan"},
|
|
"or-IN":{D:"\u0b13\u0b21\u0b3c\u0b3f\u0b06",F:"Oriya"},pa:{D:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",F:"Punjabi"},"pa-IN":{D:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",F:"Punjabi (India)"},pl:{D:"Polski",F:"Polish"},"pl-PL":{D:"Polski",F:"Polish"},"ps-AF":{D:"\u067e\u069a\u062a\u0648",F:"Pashto"},pt:{D:"Portugu\u00eas",F:"Portuguese"},"pt-BR":{D:"Portugu\u00eas (Brasil)",F:"Portuguese (Brazil)"},"pt-PT":{D:"Portugu\u00eas (Portugal)",F:"Portuguese (Portugal)"},
|
|
"qu-PE":{D:"Qhichwa",F:"Quechua"},"rm-CH":{D:"Rumantsch",F:"Romansh"},ro:{D:"Rom\u00e2n\u0103",F:"Romanian"},"ro-RO":{D:"Rom\u00e2n\u0103",F:"Romanian"},ru:{D:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",F:"Russian"},"ru-RU":{D:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",F:"Russian"},"sa-IN":{D:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",F:"Sanskrit"},"se-NO":{D:"Davvis\u00e1megiella",F:"Northern S\u00e1mi"},"si-LK":{D:"\u0db4\u0dc5\u0dcf\u0dad",F:"Sinhala (Sri Lanka)"},sk:{D:"Sloven\u010dina",
|
|
F:"Slovak"},"sk-SK":{D:"Sloven\u010dina (Slovakia)",F:"Slovak (Slovakia)"},sl:{D:"Sloven\u0161\u010dina",F:"Slovenian"},"sl-SI":{D:"Sloven\u0161\u010dina",F:"Slovenian"},"so-SO":{D:"Soomaaliga",F:"Somali"},sq:{D:"Shqip",F:"Albanian"},"sq-AL":{D:"Shqip",F:"Albanian"},sr:{D:"\u0421\u0440\u043f\u0441\u043a\u0438",F:"Serbian"},"sr-RS":{D:"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",F:"Serbian (Serbia)"},su:{D:"Basa Sunda",F:"Sundanese"},sv:{D:"Svenska",F:"Swedish"},"sv-SE":{D:"Svenska",F:"Swedish"},
|
|
sw:{D:"Kiswahili",F:"Swahili"},"sw-KE":{D:"Kiswahili",F:"Swahili (Kenya)"},ta:{D:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",F:"Tamil"},"ta-IN":{D:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",F:"Tamil"},te:{D:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",F:"Telugu"},"te-IN":{D:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",F:"Telugu"},tg:{D:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",F:"Tajik"},"tg-TJ":{D:"\u0442\u043e\u04b7\u0438\u043a\u04e3",F:"Tajik"},th:{D:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
|
|
F:"Thai"},"th-TH":{D:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",F:"Thai (Thailand)"},tl:{D:"Filipino",F:"Filipino"},"tl-PH":{D:"Filipino",F:"Filipino"},tlh:{D:"tlhIngan-Hol",F:"Klingon"},tr:{D:"T\u00fcrk\u00e7e",F:"Turkish"},"tr-TR":{D:"T\u00fcrk\u00e7e",F:"Turkish"},"tt-RU":{D:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",F:"Tatar"},uk:{D:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",F:"Ukrainian"},"uk-UA":{D:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
F:"Ukrainian"},ur:{D:"\u0627\u0631\u062f\u0648",F:"Urdu"},"ur-PK":{D:"\u0627\u0631\u062f\u0648",F:"Urdu"},uz:{D:"O'zbek",F:"Uzbek"},"uz-UZ":{D:"O'zbek",F:"Uzbek"},vi:{D:"Ti\u1ebfng Vi\u1ec7t",F:"Vietnamese"},"vi-VN":{D:"Ti\u1ebfng Vi\u1ec7t",F:"Vietnamese"},"xh-ZA":{D:"isiXhosa",F:"Xhosa"},yi:{D:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",F:"Yiddish"},"yi-DE":{D:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",F:"Yiddish (German)"},zh:{D:"\u4e2d\u6587",F:"Chinese"},"zh-HANS":{D:"\u4e2d\u6587\u7b80\u4f53",
|
|
F:"Chinese Simplified"},"zh-HANT":{D:"\u4e2d\u6587\u7e41\u9ad4",F:"Chinese Traditional"},"zh-CN":{D:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",F:"Chinese Simplified (China)"},"zh-HK":{D:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",F:"Chinese Traditional (Hong Kong)"},"zh-SG":{D:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",F:"Chinese Simplified (Singapore)"},"zh-TW":{D:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",F:"Chinese Traditional (Taiwan)"},"zu-ZA":{D:"isiZulu",F:"Zulu"}},yE=t(Object.keys(xE)),zE=yE.next();!zE.done;zE=
|
|
yE.next()){var AE=zE.value;xE[AE.toLowerCase()]=xE[AE]};function BE(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new rd;this.localization=this.controls.za;this.player=this.controls.kd();this.video=this.controls.vc();this.adManager=this.player.xe();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})}
|
|
BE.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};P("shaka.ui.Element",BE);BE.prototype.release=BE.prototype.release;function CE(a){return DE(a,"shaka-back-to-overflow-button")}function DE(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function EE(a){a&&(a=DE(a,"shaka-chosen-item"))&&a.parentElement.focus()}function FE(){var a=V("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function GE(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
function HE(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function IE(a,b){BE.call(this,a,b);var c=this;this.i=V("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=V("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Zb(function(){if(c.ad.isLinear()){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=HE(e-d,!1)+" / "+HE(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=""))}});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.Sa();c.g.Ba(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Sa(),this.g.Ba(.5))}qa(IE,BE);IE.prototype.release=function(){this.g.stop();this.g=null;BE.prototype.release.call(this)};
|
|
P("shaka.ui.AdCounter",IE);function JE(a,b){BE.call(this,a,b);var c=this;this.g=V("div");this.g.classList.add("shaka-ad-position");GE(this.g,!1);this.parent.appendChild(this.g);this.h=V("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&KE(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&KE(c)});this.eventManager.o(this.adManager,"ad-started",function(){KE(c)});this.eventManager.o(this.adManager,
|
|
"ad-stopped",function(){c.h.textContent="";GE(c.g,!1)});this.ad&&KE(this)}qa(JE,BE);function KE(a){var b=a.ad.getSequenceLength();if(1<b&&a.ad.isLinear()){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));GE(a.g,!0)}}P("shaka.ui.AdPosition",JE);function LE(a,b){BE.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=V("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";GE(c.g,!0)}else GE(c.g,
|
|
!1)});this.eventManager.o(window,"click",function(){GE(c.g,!1)});ME(this)}qa(LE,BE);LE.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];BE.prototype.release.call(this)};function NE(a,b){OE.set(a,b)}function ME(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=OE.get(c);d?a.i.push(d.create(a.g,a.controls)):Za("Unrecognized context menu element:",c)}}P("shaka.ui.ContextMenu",LE);
|
|
LE.registerElement=NE;var OE=new Map;function PE(a,b){BE.call(this,a,b);var c=this;this.button=Hn();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();
|
|
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.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){if(c.ad&&(QE(c.controls),c.ad.isLinear()))return;RE(c.controls)});this.ad&&(this.g(),this.h())}qa(PE,BE);
|
|
PE.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.u.paused&&!a.Y;return a};PE.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.player?this.player.isEnded():!0};PE.prototype.g=function(){};PE.prototype.h=function(){};P("shaka.ui.PlayButton",PE);function SE(a,b){PE.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}qa(SE,PE);SE.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};SE.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};P("shaka.ui.BigPlayButton",SE);function TE(a,b){BE.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Zb(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.lg()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=V("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.Rc()&&(c.controls.Cd()?(d.preventDefault(),c.controls.Nc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
|
|
c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.X(1)):(c.s=!0,c.m=Date.now(),c.j.X(1))))});this.h=V("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=V("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}qa(TE,BE);P("shaka.ui.HiddenSeekButton",TE);function UE(a,b){TE.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}qa(UE,TE);P("shaka.ui.HiddenFastForwardButton",UE);function VE(a,b){TE.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}qa(VE,TE);P("shaka.ui.HiddenRewindButton",VE);function WE(a,b,c,d){BE.call(this,a,b);var e=this;this.container=V("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.h=!1;this.bar=document.createElement("input");this.I=new Zb(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
|
|
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(f){e.controls.Rc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Rc()&&(e.h=!0,XE(e,f),e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(XE(e,f),e.onChange());f.stopPropagation()});this.eventManager.o(this.bar,"touchend",function(f){e.h&&
|
|
(e.h=!1,XE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,XE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"mouseup",function(f){e.h&&(e.h=!1,e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}qa(WE,BE);q=WE.prototype;
|
|
q.release=function(){this.I&&(this.I.stop(),this.I=null);BE.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.h||(this.h=!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.I.X(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
|
|
q.setValue=function(a){this.h||(this.bar.value=a)};function XE(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}P("shaka.ui.RangeElement",WE);WE.prototype.setValue=WE.prototype.setValue;WE.prototype.getValue=WE.prototype.getValue;WE.prototype.changeTo=WE.prototype.changeTo;WE.prototype.onChangeEnd=WE.prototype.onChangeEnd;
|
|
WE.prototype.onChange=WE.prototype.onChange;WE.prototype.onChangeStart=WE.prototype.onChangeStart;WE.prototype.setRange=WE.prototype.setRange;function YE(a,b){WE.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.H=V("div");this.H.classList.add("shaka-ad-markers");this.container.insertBefore(this.H,this.container.childNodes[0]);this.J=this.controls.g;this.u=new Zb(function(){var d=c.getValue();c.player.T()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.C=new Zb(function(){ZE(c)});this.L=!1;this.i=V("div");this.i.id="shaka-player-ui-thumbnail-container";
|
|
this.g=V("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.A=V("div");this.A.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.A);this.container.appendChild(this.i);this.j=V("div");this.j.id="shaka-player-ui-time-container";this.container.appendChild(this.j);this.l=this.m=null;this.K=!1;this.s=new Zb(function(){$E(c)});this.G=[];this.eventManager.o(this.localization,"locale-updated",function(){return aF(c)});this.eventManager.o(this.localization,
|
|
"locale-changed",function(){return aF(c)});this.eventManager.o(this.adManager,"ad-started",function(){bF(c)||GE(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){bF(c)&&GE(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.G=d.cuepoints;cF(c)});this.eventManager.o(this.player,"unloading",function(){c.G=[];cF(c);c.l&&(c.l.abort(),c.l=null);c.m=null;$E(c);dF(c)});this.eventManager.o(this.bar,"mousemove",function(d){var e=c.bar.getBoundingClientRect(),
|
|
f=parseFloat(c.bar.min);d=d.clientX-e.left;e=Math.round(f+(parseFloat(c.bar.max)-f)/e.width*d);c.player.ye().length?(dF(c),eF(c,d,e)):($E(c),f=c.j.clientWidth,c.j.style.width="auto",c.j.style.height="20px",c.j.style.top="-30px",c.j.style.left=Math.min(c.bar.offsetWidth-f,Math.max(0,d-f/2))+"px",c.j.style.right="",c.j.style.visibility="visible",d=c.player.xa(),c.player.T()?(d=d.end-e,1>d?(c.j.textContent=c.localization.resolve("LIVE"),c.j.style.left="",c.j.style.right="0px"):c.j.textContent="-"+fF(d)):
|
|
c.j.textContent=fF(e-d.start))});this.eventManager.o(this.container,"mouseleave",function(){dF(c);c.s.stop();c.s.X(.25)});this.setValue(this.video.currentTime);this.update();aF(this);this.ad&&GE(this.container,!1)}qa(YE,WE);q=YE.prototype;q.release=function(){this.u&&(this.u.stop(),this.u=null,this.C.stop(),this.C=null);WE.prototype.release.call(this)};q.onChangeStart=function(){this.L=!this.video.paused;this.controls.$g(!0);this.video.pause();this.s.stop();this.K=!0};
|
|
q.onChange=function(){if(this.video.duration)if(this.update(),this.u.X(.125),this.player.ye().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());eF(this,(d-a)/((b-a)/c.width),d)}else $E(this)};q.onChangeEnd=function(){this.u.Sa();this.controls.$g(!1);this.L&&this.video.play();this.K&&(this.K=!1,this.s.stop(),this.s.X(.25))};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
q.update=function(){var a=this.J.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.xa(),g=f.end-f.start;this.setRange(f.start,f.end);bF(this)?(GE(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.J.showUnbufferedStart?
|
|
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()+")")):GE(this.container,!1)};
|
|
function ZE(a){if(a.G.length){for(var b=a.player.xa(),c=b.end-b.start,d=["to right"],e=[],f=a.J.seekBarColors.adBreaks,g=!1,h=t(a.G),k=h.next();!k.done;k=h.next())if(k=k.value,-1==k.start&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||"number"==typeof k.end&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,p){return n.start-p.start});b=t(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+
|
|
100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.H.style.background="linear-gradient("+d.join(",")+")"}else a.H.style.background="transparent",a.C.stop()}function cF(a){function b(){ZE(a);var c=a.player.xa();c=c.end-c.start;a.player.T()&&5<c&&a.C.Ba(.25)}a.player.Sh()?b():a.eventManager.sa(a.player,"loaded",b)}
|
|
function bF(a){var b=a.player.xa();b=b.end-b.start;return a.player.T()&&(5>b||!isFinite(b))?!1:null==a.ad||!a.ad.isLinear()}function aF(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
function eF(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;I(function(D){switch(D.g){case 1:d=gF(a);if(!d)return $E(a),D.return();0>c&&(c=0);e=a.player.xa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return x(D,a.player.og(d.id,f),2);case 2:g=D.h;if(!g||!g.uris.length)return $E(a),D.return();a.player.T()?(h=e.end-c,a.A.textContent=1>h?a.localization.resolve("LIVE"):"-"+fF(h)):a.A.textContent=fF(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";p=g.uris[0].split("#xywh=")[0];if(a.m&&p===a.m.uris[0].split("#xywh=")[0]&&g.segment.Kb()==a.m.segment.Kb()&&g.segment.Ib()==a.m.segment.Ib()){D.B(3);break}a.m=g;a.l&&(a.l.abort(),a.l=null);if("mjpg"!=d.codecs&&!p.startsWith("offline:")){D.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ua(D,5);r=Hh;u=bm(g.segment.R(),g.segment.Kb(),g.segment.Ib(),a.player.getConfiguration().streaming.retryParameters);
|
|
a.l=a.player.Jb().request(r,u,{type:1});return x(D,a.l.promise,7);case 7:v=D.h;a.l=null;"mjpg"==d.codecs?(w=(new Th).box("mdat",ci(function(G){p=URL.createObjectURL(new Blob([G],{type:"image/jpeg"}))})),w.parse(v.data,!1)):(z=d.mimeType||"image/jpeg",y=new Blob([v.data],{type:z}),p=URL.createObjectURL(y));wa(D,4);break;case 5:B=xa(D);if(7001==B.code)return D.return();throw B;case 4:try{a.i.removeChild(a.g)}catch(G){}a.g=V("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=p;
|
|
a.g.onload=function(){p.startsWith("blob:")&&URL.revokeObjectURL(p)};a.i.insertBefore(a.g,a.i.firstChild);case 3:C=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+C*g.positionX+"px",a.g.style.top="-"+C*g.positionY+"px",a.g.style.transform="scale("+C+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",H(D)}})}
|
|
function gF(a){var b=a.player.ye();if(!b.length)return null;for(var c=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),d=c.next(),e={};!d.done;e={$h:void 0,estimatedBandwidth:void 0},d=c.next())if(e.$h=d.value,e.estimatedBandwidth=a.player.getStats().estimatedBandwidth,(d=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.$h&&g.bandwidth<.01*f.estimatedBandwidth}}(e)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&d.length)return d[0];return b.find(function(f){return"application/mp4"==
|
|
f.mimeType&&"mjpg"==f.codecs})||b[0]}function $E(a){a.i.style.visibility="hidden";a.A.textContent=""}function dF(a){a.j.style.visibility="hidden"}function fF(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}P("shaka.ui.SeekBar",YE);function hF(){}hF.prototype.create=function(a,b){return new YE(a,b)};YE.Factory=hF;function iF(a,b){BE.call(this,a,b);var c=this;this.j=V("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=V("div");this.h.classList.add("shaka-skip-ad-counter");GE(this.h,!1);this.j.appendChild(this.h);this.g=Hn();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;GE(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);jF(this);this.i=new Zb(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
d:(c.i.stop(),GE(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){jF(c)});this.eventManager.o(this.localization,"locale-changed",function(){jF(c)});this.eventManager.o(this.adManager,"ad-started",function(){kF(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),GE(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;GE(c.g,!1);GE(c.h,!1)});this.eventManager.o(this.g,
|
|
"click",function(){c.ad.skip()});this.ad&&kF(this)}qa(iF,BE);iF.prototype.release=function(){this.i.stop();this.i=null;BE.prototype.release.call(this)};function jF(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function kF(a){a.ad.isSkippable()&&a.ad.needsSkipUI()&&(GE(a.g,!0),GE(a.h,!0),a.h.textContent="",a.i.Sa(),a.i.Ba(.5))}P("shaka.ui.SkipAdButton",iF);/*
|
|
@license
|
|
glMatrix: https://github.com/toji/gl-matrix/
|
|
Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
|
|
SPDX-License-Identifier: MIT
|
|
*/
|
|
function lF(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function mF(a,b,c){b=1/Math.tan(b/2);a[0]=b/c;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[11]=-1;a[12]=0;a[13]=0;a[15]=0;c=1/-99.9;a[10]=100.1*c;a[14]=20*c}
|
|
function nF(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],p=b[9],r=b[10],u=b[11],v=b[12],w=b[13],z=b[14];b=b[15];var y=c[0],B=c[1],C=c[2],D=c[3];a[0]=y*d+B*h+C*n+D*v;a[1]=y*e+B*k+C*p+D*w;a[2]=y*f+B*l+C*r+D*z;a[3]=y*g+B*m+C*u+D*b;y=c[4];B=c[5];C=c[6];D=c[7];a[4]=y*d+B*h+C*n+D*v;a[5]=y*e+B*k+C*p+D*w;a[6]=y*f+B*l+C*r+D*z;a[7]=y*g+B*m+C*u+D*b;y=c[8];B=c[9];C=c[10];D=c[11];a[8]=y*d+B*h+C*n+D*v;a[9]=y*e+B*k+C*p+D*w;a[10]=y*f+B*l+C*r+D*z;a[11]=y*g+B*m+C*u+D*b;y=c[12];B=c[13];
|
|
C=c[14];D=c[15];a[12]=y*d+B*h+C*n+D*v;a[13]=y*e+B*k+C*p+D*w;a[14]=y*f+B*l+C*r+D*z;a[15]=y*g+B*m+C*u+D*b}
|
|
function oF(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;0<m?(b=2*Math.sqrt(m+1),a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k-
|
|
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function pF(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function qF(){var a=new Float32Array(4);a[3]=1;return a}function rF(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function sF(a,b,c,d,e){this.m=a;this.oa=b;this.l=c;this.g=d;this.s=new rd;this.L=qF();this.h=qF();this.ha=this.ka=this.aa=this.j=null;this.G=lF();this.I=lF();this.M=lF();this.Y=lF();this.A=null;this.O=!1;this.J=this.u=null;this.ra=this.Da=0;this.$=this.P=this.S=this.K=null;this.H=0;this.i=75;this.V=0;this.C=e;tF(this)}sF.prototype.release=function(){this.s&&(this.s.release(),this.s=null);this.u&&(this.u.stop(),this.u=null);this.J&&(this.J.stop(),this.J=null)};
|
|
sF.prototype.Bd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.l.width,this.l.height);uF(this,!1)};
|
|
function tF(a){vF(a);wF(a);xF(a);yF(a);zF(a);a.s.sa(a.m,"loadeddata",function(){var b;a.s.o(a.m,"canplaythrough",function(){uF(a)});a.s.o(a.m,"playing",function(){a.u&&a.u.stop();if(!b){var c=a.oa.Lb();c=t(c);for(var d=c.next();!d.done;d=c.next())(d=d.value.frameRate)&&(!b||b<d)&&(b=d)}b||(b=60);uF(a);a.u=(new Zb(function(){uF(a)})).Sa().Ba(1/b)});a.s.o(a.m,"pause",function(){a.u&&a.u.stop();a.u=null;uF(a)});a.s.o(a.m,"seeked",function(){uF(a)});a.s.o(document,"visibilitychange",function(){uF(a)})})}
|
|
function vF(a){var b=a.G,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(1E-6>Math.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?1:0;else{d=f-m;e=g-e;m=c-n;var p=1/Math.sqrt(d*d+e*e+m*m);d*=p;e*=p;m*=p;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(p=Math.sqrt(n*n+l*l+h*h))?(p=1/p,n*=p,l*=p,h*=p):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var u=d*l-e*n;(p=Math.sqrt(k*k+r*r+u*u))?(p=1/p,k*=p,r*=p,u*=p):u=r=k=0;b[0]=n;b[1]=k;b[2]=
|
|
d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}oF(a.L,a.G);a=b=a.Y;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
|
|
function wF(a){AF(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)}
|
|
function xF(a){var b=BF(a,a.g.VERTEX_SHADER),c=BF(a,a.g.FRAGMENT_SHADER);a.j=a.g.createProgram();a.g.attachShader(a.j,b);a.g.attachShader(a.j,c);a.g.linkProgram(a.j);"cubemap"==a.C?(a.S=a.g.getAttribLocation(a.j,"aVertexPosition"),a.P=a.g.getAttribLocation(a.j,"aTextureCoord")):(a.S=a.g.getAttribLocation(a.j,"a_vPosition"),a.g.enableVertexAttribArray(a.S),a.P=a.g.getAttribLocation(a.j,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.P))}
|
|
function BF(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.C?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";
|
|
break;case a.g.FRAGMENT_SHADER:c="cubemap"==a.C?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n texture2D(uSampler, tc);\n gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}";
|
|
break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b}
|
|
function yF(a){if("cubemap"==a.C)var b={Mi:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],Ji:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]};else{b=[];for(var c=[],d=[],
|
|
e=0;100>=e;e++){var f=e/100,g=f*Math.PI,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=k/100,m=l*Math.PI*2;b.push(-1*Math.cos(m)*h,g,Math.sin(m)*h);c.push(l);c.push(f)}}for(e=0;100>e;e++)for(f=0;100>f;f++)h=101*e+f,g=h+1,k=101*(e+1)+f,l=k+1,d.push(h,k,g),d.push(g,k,l);b={Mi:b,Ji:c,indices:d}}a.K=b;a.aa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Mi),a.g.STATIC_DRAW);a.ka=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,
|
|
a.ka);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Ji),a.g.STATIC_DRAW);a.ha=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ha);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.K.indices),a.g.STATIC_DRAW)}
|
|
function zF(a){a.$=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.$);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)}
|
|
function uF(a,b){b=void 0===b?!0:b;var c=a.oa.jd()==Ep;!a.m||2>a.m.readyState||!c&&0==a.m.playbackRate||(mF(a.I,a.i*Math.PI/180,1.5625),"cubemap"==a.C?mF(a.I,a.i*Math.PI/180,2.5):mF(a.I,a.i*Math.PI/180,1.5625),a.g.useProgram(a.j),a.g.clear(a.g.COLOR_BUFFER_BIT),AF(a),b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.$),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.m)),"equirectangular"==a.C&&(nF(a.M,a.G,
|
|
a.Y),nF(a.M,a.I,a.M)),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa),a.g.vertexAttribPointer(a.S,3,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.S),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ka),a.g.vertexAttribPointer(a.P,2,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.P),a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ha),"cubemap"==a.C?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uModelViewMatrix"),!1,a.M)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,
|
|
"u_VPMatrix"),!1,a.M),a.g.uniform1i(a.g.getUniformLocation(a.j,"uSampler"),0),a.O&&a.g.viewport(0,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0),a.O&&(a.g.viewport(a.l.width/2,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0)))}
|
|
function AF(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.Da!==b||a.ra!==c){a.l.width=b;a.l.height=c;a.Da=b;a.ra=c;var d=b/c,e=a.I,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.I=e;a.g.viewport(0,0,b,c)}}
|
|
function CF(a,b,c,d){var e=90*Math.PI/180;var f="cubemap"==a.C?a.M:a.G;var g=Math.sin(b);b=Math.cos(b);var h=f[0],k=f[1],l=f[2],m=f[3],n=f[8],p=f[9],r=f[10],u=f[11];f!==f&&(f[4]=f[4],f[5]=f[5],f[6]=f[6],f[7]=f[7],f[12]=f[12],f[13]=f[13],f[14]=f[14],f[15]=f[15]);f[0]=h*b-n*g;f[1]=k*b-p*g;f[2]=l*b-r*g;f[3]=m*b-u*g;f[8]=h*g+n*b;f[9]=k*g+p*b;f[10]=l*g+r*b;f[11]=m*g+u*b;a.H+=c;a.H<e&&a.H>-e?(e=lF(),g=lF(),b=-1*c,c=Math.sin(b),b=Math.cos(b),h=g[4],k=g[5],l=g[6],m=g[7],n=g[8],p=g[9],r=g[10],u=g[11],g!==
|
|
e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=h*b+n*c,e[5]=k*b+p*c,e[6]=l*b+r*c,e[7]=m*b+u*c,e[8]=n*b-h*c,e[9]=p*b-k*c,e[10]=r*b-l*c,e[11]=u*b-m*c,nF(f,e,f)):a.H-=c;c=lF();e=lF();g=Math.sin(d);d=Math.cos(d);b=e[0];h=e[1];k=e[2];l=e[3];m=e[4];n=e[5];p=e[6];r=e[7];e!==c&&(c[8]=e[8],c[9]=e[9],c[10]=e[10],c[11]=e[11],c[12]=e[12],c[13]=e[13],c[14]=e[14],c[15]=e[15]);c[0]=b*d+m*g;c[1]=h*d+n*g;c[2]=k*d+p*g;c[3]=l*d+r*g;c[4]=m*d-b*g;c[5]=n*d-h*g;c[6]=p*
|
|
d-k*g;c[7]=r*d-l*g;nF(f,c,f);uF(a,!1)}function DF(a,b){if(void 0===b||b)oF(a.h,a.G),a.V=0,a.A=qF(),a.A[0]=(a.h[0]-a.L[0])/20,a.A[1]=(a.h[1]-a.L[1])/20,a.A[2]=(a.h[2]-a.L[2])/20,a.A[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.A[0];a.h[1]-=a.A[1];a.h[2]-=a.A[2];a.h[3]-=a.A[3];b=lF();rF(a.h,a.h);pF(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.V?a.J=(new Zb(function(){DF(a,!1);a.H=0;a.V++;uF(a,!1)})).X(.025):(pF(b,a.L),a.G=b)};function EF(a,b,c,d,e){hb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.s=new rd;this.h=new rd;this.G=FF(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.C=this.A=0;this.l=null;this.s.o(d,"loading",function(){f.g&&DF(f.g);GF(f)});this.s.o(d,"spatialvideoinfo",function(g){switch(g.detail.projection){case "hequ":f.l="equirectangular";break;case "fish":f.l="equirectangular";break;default:f.l=null}GF(f)});this.s.o(d,"nospatialvideoinfo",function(){f.l=null;GF(f)});this.s.o(d,
|
|
"unloading",function(){f.l=null;GF(f)});GF(this)}qa(EF,hb);q=EF.prototype;q.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);hb.prototype.release.call(this)};q.configure=function(a){this.u=a;GF(this)};q.Kf=function(){return!!this.G};q.Mb=function(){return!!this.g};q.Bd=function(){this.g?this.g.Bd():Za("Not playing VR content")};q.sg=function(a){this.g?CF(this.g,a*HF,0,0):Za("Not playing VR content")};
|
|
q.qg=function(a){this.g?CF(this.g,0,a*HF,0):Za("Not playing VR content")};q.rg=function(a){this.g?CF(this.g,0,0,a*HF):Za("Not playing VR content")};
|
|
function GF(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProjectionMode;a.g?a.g.C!=b&&(a.h.Za(),a.g.release(),IF(a,b)):(a.m.style.display="",IF(a,b),a.dispatchEvent(new S("vrstatuschanged",(new Map).set("newStatus",a.Mb()))))}else a.u.displayInVrMode||a.l||!a.g||(a.m.style.display="none",a.h.Za(),a.g.release(),a.g=null,a.dispatchEvent(new S("vrstatuschanged",(new Map).set("newStatus",a.Mb()))))}function IF(a,b){a.G&&a.m&&(a.g=new sF(a.L,a.K,a.m,a.G,b),JF(a))}
|
|
function FF(a){if(!a.m||sc())return null;for(var b=t(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null}
|
|
function JF(a){a.h.o(a.i,"mousedown",function(d){if(!a.j){var e=d.clientX;d=d.clientY;a.j=!0;a.A=e;a.C=d}});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchstart",function(d){if(!a.j){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.j=!0;a.A=e;a.C=d}});a.h.o(a.i,"wheel",function(d){if(!a.j){var e=a.g,f=d.deltaY;f/=50;20<=e.i&&100>=e.i&&(e.i+=f);20>e.i?e.i=20:100<e.i&&(e.i=100);uF(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.j&&KF(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
|
|
a.h.o(a.i,"touchmove",function(d){a.j&&KF(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.o(a.i,"mouseleave",function(){a.j=!1});a.h.o(a.i,"mouseup",function(){a.j=!1});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchend",function(){a.j=!1});var b=!1;if(window.DeviceOrientationEvent)if("function"==typeof DeviceMotionEvent.requestPermission){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){"granted"!==d||b||(b=!0,LF(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Ma(a.i,
|
|
"click",c);a.h.Ma(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Ma(a.i,"touchend",c);"granted"!==d?(a.h.sa(a.i,"click",c),a.h.sa(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.sa(a.i,"touchend",c)):(b=!0,LF(a))}).catch(function(){a.h.Ma(a.i,"click",c);a.h.Ma(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Ma(a.i,"touchend",c);a.h.sa(a.i,"click",c);a.h.sa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.sa(a.i,"touchend",c)})}else b=!0,LF(a)}
|
|
function LF(a){a.h.o(window,"deviceorientation",function(b){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(10<Math.abs(c)||10<Math.abs(d)||5<Math.abs(e))d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;90==b||-90==b?CF(a.g,c*HF*-1,e*HF*-1,0):CF(a.g,c*HF*-1,d*HF,0)})}function KF(a,b,c){var d=-.6*Math.PI/180;CF(a.g,(b-a.A)*d,-1*(c-a.C)*d,0);a.A=b;a.C=c}var HF=Math.PI/180;function Z(a,b,c,d,e){hb.call(this);var f=this;this.$=!0;this.g=e;this.G=new yr(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.ra=!0;this.u=this.G.vc();this.m=c;this.C=this.G.kd();this.aa=a;this.l=b;this.Nb=d;this.oa=this.C.xe();this.s=this.i=null;this.Y=!1;this.K=[];this.bb=[];this.Xa=!1;this.S=new Zb(function(){f.l.classList.add("no-cursor");f.Xa=!1;MF(f)});this.ha=new Zb(function(){f.h.removeAttribute("shown");f.O.X(2)});this.O=new Zb(function(){for(var g=t(f.K),h=g.next();!h.done;h=
|
|
g.next())GE(h.value,!1)});this.Ea=new Zb(function(){f.Rc()&&NF(f)});this.J=null;this.I=[];this.za=OF();this.j=new rd;this.A=null;this.configure(this.g);PF(this);QF(this);this.ka=new Set;RF(this);this.Ea.Ba(this.g.refreshTickInSeconds);this.j.o(this.za,"locale-changed",function(g){f.oa.setLocale(g.locales[0])});this.oa.initInterstitial(this.H,this.aa,this.m)}qa(Z,hb);q=Z.prototype;
|
|
q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.m){b.B(2);break}return x(b,document.exitPictureInPicture(),2);case 2:a.j&&(a.j.release(),a.j=null);a.S&&(a.S.stop(),a.S=null);a.ha&&(a.ha.stop(),a.ha=null);a.O&&(a.O.stop(),a.O=null);a.Ea&&(a.Ea.stop(),a.Ea=null);a.A&&(a.A.release(),a.A=null);SF(a);a.h&&(a.l.removeChild(a.h),a.h=null);if(!a.G){b.B(4);break}return x(b,a.G.destroy(),5);case 5:a.G=null;case 4:a.L&&(a.l.removeChild(a.L),a.L=
|
|
null);a.H&&(a.l.removeChild(a.H),a.H=null);if(!a.aa){b.B(6);break}return x(b,a.aa.destroy(),7);case 7:a.aa=null;case 6:a.C=null,a.m=null,a.u=null,a.za=null,a.ka.clear(),TF(a),hb.prototype.release.call(a),H(b)}})};function SF(a){for(var b=t(a.I),c=b.next();!c.done;c=b.next())c.value.release();a.I=[]}function UF(a,b){VF.set(a,b)}q.Xi=function(a){this.ra=a;RF(this)};q.bk=function(){MF(this)};
|
|
q.configure=function(a){this.g=a;this.G.xh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.s&&(this.s=null);this.Ja&&(this.Ja=null);this.Ia&&(this.Ia=null);this.A&&this.A.configure(a);this.h?(In(this.h),SF(this)):(WF(this),XF(this),this.A=new EF(this.h,this.Nb,this.m,this.C,this.g));this.l.classList.add("shaka-video-container");this.m.classList.add("shaka-video");YF(this);this.g.addBigPlayButton&&ZF(this);this.g.customContextMenu&&(this.Ia=new LE(this.V,this),this.I.push(this.Ia));this.L||
|
|
$F(this);this.g.seekOnTaps&&(aG(this),bG(this));this.Ha=V("div");this.Ha.classList.add("shaka-server-side-ad-container");this.h.appendChild(this.Ha);cG(this);this.K=Array.from(this.l.getElementsByClassName("shaka-settings-menu"));this.K.push.apply(this.K,ha(Array.from(this.l.getElementsByClassName("shaka-overflow-menu"))));dG(this);this.bb=Array.from(this.l.getElementsByClassName("shaka-show-controls-on-mouse-over"));MF(this);a=t(this.l.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.j.o(b,"click",c);this.j.o(b,"dblclick",c)}};q.Wg=function(a){(this.$=a)?(this.l.setAttribute("shaka-controls","true"),this.m.tabIndex=-1,this.m.controls=!1):this.l.removeAttribute("shaka-controls");MF(this)};q.ti=function(a){this.m.controls=a;this.m.tabIndex=a?0:-1;a&&this.Wg(!1)};q.getAd=function(){return this.i};q.hj=function(){return this.G};q.vj=function(){return this.za};q.Nj=function(){return this.l};q.vc=function(){return this.u};
|
|
q.uj=function(){return this.m};q.kd=function(){return this.C};q.tj=function(){return this.aa};q.lj=function(){return this.h};q.Ej=function(){return this.Ha};q.ij=function(){return this.H};q.jj=function(){return this.g};q.Yj=function(){return this.Y};q.$g=function(a){this.Y=a};q.Tj=function(){return this.ra};q.lg=function(){return this.s?this.s.getValue():this.u.currentTime};q.xi=function(a){this.J=a};q.Cd=function(){return this.K.some(function(a){return!a.classList.contains("shaka-hidden")})};
|
|
q.Nc=function(){this.O.Sa()};q.Qd=function(){return document.fullscreenEnabled||this.m.webkitSupportsFullscreen?!0:!1};q.md=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.m;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
function eG(a){var b,c,d;return I(function(e){switch(e.g){case 1:ua(e,2);if(!document.fullscreenEnabled){b=a.m;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!document.pictureInPictureElement){e.B(5);break}return x(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,x(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}ua(e,9);return x(e,screen.orientation.lock("landscape"),11);case 11:wa(e,
|
|
4,2);break;case 9:xa(e,2);case 4:wa(e,0);break;case 2:d=xa(e),a.dispatchEvent(new S("error",(new Map).set("detail",d))),H(e)}})}function fG(a){var b;return I(function(c){if(!document.fullscreenEnabled)return b=a.m,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return x(c,document.exitFullscreen(),0)})}q.jf=function(){var a=this;return I(function(b){return a.md()?x(b,fG(a),0):x(b,eG(a),0)})};
|
|
q.He=function(){return this.G.Ra()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.m.disablePictureInPicture:!1};q.Ie=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
|
|
q.zd=function(){var a=this,b,c;return I(function(d){if(1==d.g)return ua(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?x(d,gG(a),5):document.pictureInPictureElement?x(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.m,x(d,b.requestPictureInPicture(),5));if(2!=d.g)return wa(d,0);c=xa(d);a.dispatchEvent(new S("error",(new Map).set("detail",c)));H(d)})};
|
|
function gG(a){var b,c,d,e,f,g;return I(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.l;c=b.getBoundingClientRect();return x(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;hG(d);e=b.parentNode||document.body;f=a.l.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
|
|
d.document.head.append(g);d.document.body.append(b);a.j.sa(d,"pagehide",function(){f.replaceWith(b)});H(h)})}
|
|
function hG(a){var b=[].concat(ha(document.styleSheets)).map(function(d){try{return[].concat(ha(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}q.Di=function(){GE(this.M,!0);GE(this.H,!0);this.h.setAttribute("ad-active","true")};
|
|
q.Oh=function(){GE(this.M,!1);GE(this.H,!1);this.h.removeAttribute("ad-active")};function RE(a){a.$&&a.u.duration&&(a.u.paused&&!a.Y?(a.C.isEnded()&&(a.u.currentTime=a.C.xa().start),a.u.play()):a.u.pause())}function QE(a){a.i&&a.i.isPaused()?a.i.play():a.i&&a.i.pause()}
|
|
function WF(a){a.h=V("div");a.h.classList.add("shaka-controls-container");a.l.appendChild(a.h);a.l.setAttribute("shaka-controls","true");a.j.o(a.h,"touchstart",function(b){a.u.duration&&(a.Rc()?a.J=Date.now():(iG(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.j.o(a.h,"click",function(){jG(a)});a.j.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.Qd()&&a.jf()})}
|
|
function ZF(a){var b=V("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Ja=new SE(b,a);a.I.push(a.Ja)}function YF(a){var b=V("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function kG(a){a.M=V("div");a.M.classList.add("shaka-ad-controls");var b=null!=a.i&&a.i.isLinear();GE(a.M,b);a.P.appendChild(a.M);b=new JE(a.M,a);a.I.push(b);b=new IE(a.M,a);a.I.push(b);b=new iF(a.M,a);a.I.push(b)}
|
|
function $F(a){a.L=V("div");a.L.classList.add("shaka-spinner-container");a.l.appendChild(a.L);var b=V("div");b.classList.add("shaka-spinner");a.L.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");b.setAttribute("fill",
|
|
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function aG(a){var b=V("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.kb=new UE(b,a);a.I.push(a.kb)}function bG(a){var b=V("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.Db=new VE(b,a);a.I.push(a.Db)}
|
|
function cG(a){a.P=V("div");a.P.classList.add("shaka-bottom-controls");a.P.classList.add("shaka-no-propagation");a.h.appendChild(a.P);a.j.o(a.P,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Nc()});kG(a);a.V=V("div");a.V.classList.add("shaka-controls-button-panel");a.V.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.V.classList.add("shaka-tooltips-on");a.P.appendChild(a.V);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,VF.get(c)?
|
|
(c=VF.get(c).create(a.V,a),a.I.push(c)):Za("Unrecognized control panel element requested:",c)}function dG(a){if(a.g.addSeekBar)a.s=lG.create(a.P,a),a.I.push(a.s);else{a=t(a.K);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function XF(a){a.H=V("div");a.H.classList.add("shaka-client-side-ad-container");GE(a.H,!1);a.j.o(a.H,"click",function(){jG(a)});a.l.appendChild(a.H)}
|
|
function PF(a){a.j.o(a.C,"buffering",function(){mG(a)});mG(a);a.j.o(window,"keydown",function(b){nG(a,b)});a.j.o(window,"click",function(){return a.Nc()});a.j.o(a,"submenuopen",function(){a.Nc()});a.j.o(a.u,"play",function(){MF(a)});a.j.o(a.u,"pause",function(){MF(a)});a.j.o(a.l,"mousemove",function(b){iG(a,b)});a.j.o(a.l,"touchmove",function(b){iG(a,b)},{passive:!0});a.j.o(a.l,"touchend",function(b){iG(a,b)},{passive:!0});a.j.o(a.l,"mouseleave",function(){a.J||a.S.Sa()});a.j.o(a.G,"caststatuschanged",
|
|
function(){RF(a)});a.j.o(a.A,"vrstatuschanged",function(){a.dispatchEvent(new S("vrstatuschanged"))});a.j.o(a.l,"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.h.contains(c)&&iG(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.s&&e&&!d&&0<c&&(b.preventDefault(),oG(a,a.s.getValue()-c));break;
|
|
case "ArrowRight":a.s&&e&&!d&&0<c&&(b.preventDefault(),oG(a,a.s.getValue()+c));break;case "PageDown":a.s&&e&&0<c&&(b.preventDefault(),oG(a,a.s.getValue()-f));break;case "PageUp":a.s&&e&&0<c&&(b.preventDefault(),oG(a,a.s.getValue()+f));break;case "Home":a.s&&oG(a,a.C.xa().start);break;case "End":a.s&&oG(a,a.C.xa().end);break;case "f":a.Qd()&&a.jf();break;case "m":a.i&&a.i.isLinear()?a.i.setMuted(!a.i.isMuted()):a.m.muted=!a.m.muted;break;case "p":a.He()&&a.zd();break;case " ":e&&pG(a)}}});a.j.o(a.l,
|
|
"keyup",function(b){a.ka.delete(b.key)});a.j.o(a.oa,"ad-started",function(b){a.i=b.ad;a.Di();mG(a)});a.j.o(a.oa,"ad-stopped",function(){a.i=null;a.Oh();mG(a)});screen.orientation&&a.j.o(screen.orientation,"change",function(){return I(function(b){return x(b,qG(a),0)})})}
|
|
function QF(a){if(a.g.setupMediaSession&&navigator.mediaSession){var b=function(d,e){try{navigator.mediaSession.setActionHandler(d,function(f){e(f)})}catch(f){}},c=function(d){var e=a.g.keyboardSeekDistance,f=a.C.xa();switch(d.action){case "pause":pG(a);break;case "play":pG(a);break;case "seekbackward":a.i&&a.i.isLinear()||oG(a,a.s.getValue()-(d.seekOffset||e));break;case "seekforward":a.i&&a.i.isLinear()||oG(a,a.s.getValue()+(d.seekOffset||e));break;case "seekto":a.i&&a.i.isLinear()||oG(a,f.start+
|
|
d.seekTime);break;case "stop":a.C.mc();break;case "enterpictureinpicture":a.i&&a.i.isLinear()||a.zd()}};b("pause",c);b("play",c);b("seekbackward",c);b("seekforward",c);b("seekto",c);b("stop",c);("documentPictureInPicture"in window||document.pictureInPictureEnabled)&&b("enterpictureinpicture",c);a.j.o(a.u,"timeupdate",function(){var d=a.C.xa(),e=d.end-d.start;d=parseFloat((a.u.currentTime-d.start).toFixed(2));a.C.T()&&1>Math.abs(e-d)&&(e=Infinity);try{a.i&&a.i.isLinear()?navigator.mediaSession.setPositionState():
|
|
navigator.mediaSession.setPositionState({duration:Math.max(0,e),playbackRate:a.u.playbackRate,position:Math.max(0,d)})}catch(f){}});a.j.o(a.C,"metadata",function(d){if(d=d.payload){var e;"TIT2"==d.key&&d.data&&(e=d.data);var f;"APIC"==d.key&&"--\x3e"==d.mimeType&&(f=d.data);e&&(d={title:e,artwork:[]},navigator.mediaSession.metadata&&(d=navigator.mediaSession.metadata,d.title=e),navigator.mediaSession.metadata=new MediaMetadata(d));f&&(e=a.m,f!=e.poster&&(e.poster=f),e={title:"",artwork:[{src:f}]},
|
|
navigator.mediaSession.metadata&&(e=navigator.mediaSession.metadata,e.artwork=[{src:f}]),navigator.mediaSession.metadata=new MediaMetadata(e))}})}}function TF(a){if(a.g.setupMediaSession&&navigator.mediaSession){try{navigator.mediaSession.setPositionState()}catch(b){}a=function(b){try{navigator.mediaSession.setActionHandler(b,null)}catch(c){}};a("pause");a("play");a("seekbackward");a("seekforward");a("seekto");a("stop");a("enterpictureinpicture")}}
|
|
function qG(a){return I(function(b){return a.u&&0!=a.u.readyState&&!a.G.Ra()&&a.g.enableFullscreenOnRotation&&a.Qd()?screen.orientation.type.includes("landscape")&&!a.md()?x(b,eG(a),0):screen.orientation.type.includes("portrait")&&a.md()?x(b,fG(a),0):b.B(0):b.return()})}
|
|
function iG(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),MF(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.l.classList.remove("no-cursor"),a.Xa=!0,a.O.stop(),a.Rc()||(NF(a),MF(a)),a.S.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.S.X(3))}
|
|
function rG(a){return window.matchMedia("hover: hover").matches?a.bb.some(function(b){return b.matches(":hover")}):!1}function MF(a){var b=a.i?a.i.isPaused():!1,c=a.u.paused&&!a.Y,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.i||!a.i.isLinear())&&c||a.Xa||d||rG(a)?(NF(a),a.h.setAttribute("shown","true"),a.ha.stop()):a.ha.X(a.g.fadeDelay)}function jG(a){a.$&&!a.Mb()&&(a.Cd()?a.O.Sa():a.g.singleClickForPlayAndPause&&pG(a))}function pG(a){if(a.i&&(QE(a),a.i.isLinear()))return;RE(a)}
|
|
function RF(a){var b=a.G.Ra();a.dispatchEvent(new S("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}function mG(a){a.$&&(a.i&&a.i.isClientRendering()&&a.i.isLinear()?GE(a.L,!1):GE(a.L,a.C.Ge()))}q.Rc=function(){return this.$?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function oG(a,b){a.u.currentTime=b;NF(a)}
|
|
function NF(a){if(a.s)if(a.s.setValue(a.u.currentTime),a.s.update(),a.s.isShowing())for(var b=t(a.K),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.K),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new S("timeandseekrangeupdated"))}
|
|
function nG(a,b){a.ka.add(b.key);var c=a.Cd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),MF(a),a.j.o(window,"mousedown",function(){a.j.Ma(window,"mousedown")}));"Escape"==b.key&&a.O.Sa();c&&a.ka.has("Tab")&&sG(a,b)}
|
|
function sG(a,b){var c=a.K.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.ka.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
q.Pk=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});iG(this,a)};q.Sj=function(){this.J||this.S.Sa()};q.Kf=function(){return this.A.Kf()};q.Mb=function(){return this.A.Mb()};
|
|
q.Lj=function(){var a=this.A;if(a.g){a=a.g;oF(a.h,a.G);var b=a.h;a=b[0];var c=b[1],d=b[2];b=b[3];var e=d*d,f=b*b;var g=a*a+c*c+e+f;var h=a*b-c*d;h>.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else Za("Not playing VR content"),a=null;return a};q.Kj=function(){var a=this.A;a.g?a=a.g.i:(Za("Not playing VR content"),a=null);return a};
|
|
q.Ok=function(a){var b=this.A;b.g?(0>a?(Za("Field of view should be greater than 0"),a=0):100<a&&(Za("Field of view should be less than 100"),a=100),b=b.g,b.i=a,uF(b,!1)):Za("Not playing VR content")};q.Bd=function(){this.A.Bd()};q.sg=function(a){this.A.sg(a)};q.qg=function(a){this.A.qg(a)};q.rg=function(a){this.A.rg(a)};
|
|
function OF(){var a=new jd("en");a.Pa("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_STATISTICS","\u0625\u062d\u0635\u0627\u0621\u0627\u062a \u0627\u0644\u0625\u0639\u0644\u0627\u0646\u0627\u062a"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AIRPLAY","AirPlay"],["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..."],["CHAPTERS","\u0627\u0644\u0641\u0635\u0648\u0644"],["DOWNLOAD_VIDEO_FRAME","\u062d\u0641\u0638 \u0625\u0637\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648"],["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"],["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"],["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"],["PLAYBACK_RATE","\u0633\u0631\u0639\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["QUALITY","\u0627\u0644\u062c\u0648\u062f\u0629"],["RECENTER_VR","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0648\u0633\u064a\u0637"],
|
|
["REPLAY","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["RESOLUTION","\u062f\u0631\u062c\u0629 \u0627\u0644\u062f\u0642\u0629"],["REWIND","\u062a\u0631\u062c\u064a\u0639"],["SEEK","\u0627\u0644\u0628\u062d\u062b \u0628\u0627\u0644\u062a\u0645\u0631\u064a\u0631"],["SKIP_AD","\u062a\u062e\u0637\u0651\u064a \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["SKIP_TO_LIVE","\u0627\u0644\u0627\u0646\u062a\u0642\u0627\u0644 \u0625\u0644\u0649 \u0628\u062b \u0645\u0628\u0627\u0634\u0631"],
|
|
["STATISTICS","\u0627\u0644\u0625\u062d\u0635\u0627\u0621\u0627\u062a"],["SUBTITLE_FORCED","\u0639\u0631\u0636 \u0625\u062c\u0628\u0627\u0631\u064a"],["SURROUND","\u0635\u0648\u062a \u0645\u062d\u064a\u0637\u064a"],["TOGGLE_STEREOSCOPIC","\u0625\u064a\u0642\u0627\u0641 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0645\u062c\u0633\u0651\u0645 \u0623\u0648 \u062a\u0641\u0639\u064a\u0644\u0647"],["UNDETERMINED_LANGUAGE","\u063a\u064a\u0631 \u0645\u062d\u062f\u062f"],["UNMUTE","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0635\u0648\u062a"],
|
|
["UNRECOGNIZED_LANGUAGE","\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641"],["VOLUME","\u0645\u0633\u062a\u0648\u0649 \u0627\u0644\u0635\u0648\u062a"]]));a.Pa("de",new Map([["AD_DURATION","Dauer der Werbeanzeige"],["AD_PROGRESS","Werbung\u00a0[AD_ON] von\u00a0[NUM_ADS]"],["AD_STATISTICS","Anzeigenstatistiken"],["AD_TIME","Werbeanzeige: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Zur\u00fcck"],["CAPTIONS","Untertitel"],["CAST","Streamen..."],["CHAPTERS","Kapitel"],["DOWNLOAD_VIDEO_FRAME",
|
|
"Videoframe speichern"],["ENTER_LOOP_MODE","In Endlosschleife spielen"],["ENTER_PICTURE_IN_PICTURE","Bild im Bild aktivieren"],["EXIT_FULL_SCREEN","Vollbildmodus beenden"],["EXIT_LOOP_MODE","Endlosschleife stoppen"],["EXIT_PICTURE_IN_PICTURE","Bild im Bild beenden"],["FAST_FORWARD","Vorspulen"],["FULL_SCREEN","Vollbildmodus"],["LANGUAGE","Sprache"],["LIVE","Live"],["LOOP","Schleife"],["MORE_SETTINGS","Weitere Einstellungen"],["MULTIPLE_LANGUAGES","Mehrere Sprachen"],["MUTE","Stummschalten"],["NOT_APPLICABLE",
|
|
"Nicht zutreffend"],["OFF","Aus"],["ON","Ein"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Bild im Bild"],["PLAY","Wiedergabe"],["PLAYBACK_RATE","Geschwindigkeit"],["QUALITY","Qualit\u00e4t"],["RECENTER_VR","Zentrieren"],["REPLAY","Noch einmal wiedergeben"],["RESOLUTION","Aufl\u00f6sung"],["REWIND","Zur\u00fcckspulen"],["SEEK","Suche"],["SKIP_AD","\u00dcberspringen"],["SKIP_TO_LIVE","Zum Live-Videostream wechseln"],["STATISTICS","Statistiken"],["SUBTITLE_FORCED","Erzwungen"],["SURROUND","Surround"],
|
|
["TOGGLE_STEREOSCOPIC","Einstellung \u201estereoskopisch\u201c ein\u2011/ausschalten"],["UNDETERMINED_LANGUAGE","Unbestimmt"],["UNMUTE","Stummschaltung aufheben"],["UNRECOGNIZED_LANGUAGE","Unbekannt"],["VOLUME","Lautst\u00e4rke"]]));a.Pa("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS",
|
|
"Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter Picture-in-Picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit Picture-in-Picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE",
|
|
"Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recenter"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip Ad"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],
|
|
["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognized"],["VOLUME","Volume"]]));a.Pa("en-GB",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS","Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE",
|
|
"Enter picture-in-picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit picture-in-picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE","Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-picture"],
|
|
["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recentre"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip ad"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognised"],["VOLUME","volume"]]));a.Pa("es",
|
|
new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas del anuncio"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Enviar..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Reproducir en bucle el v\u00eddeo actual"],["ENTER_PICTURE_IN_PICTURE","Activar el modo imagen en imagen"],
|
|
["EXIT_FULL_SCREEN","Salir del modo de pantalla completa"],["EXIT_LOOP_MODE","Dejar de reproducir en bucle el v\u00eddeo actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo imagen en imagen"],["FAST_FORWARD","Avanzar r\u00e1pidamente"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Reproducir en bucle"],["MORE_SETTINGS","M\u00e1s ajustes"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],
|
|
["ON","Activado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Imagen en imagen"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR","Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND","Rebobinar"],["SEEK","Buscar"],["SKIP_AD","Saltar anuncio"],["SKIP_TO_LIVE","Ir al v\u00eddeo en directo"],["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Envolvente"],["TOGGLE_STEREOSCOPIC",
|
|
"Activar/Desactivar estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Activar sonido"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]]));a.Pa("es-419",new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas de anuncios"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Transmitir..."],
|
|
["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Repetir indefinidamente el video actual"],["ENTER_PICTURE_IN_PICTURE","Ingresar al modo de pantalla en pantalla"],["EXIT_FULL_SCREEN","Salir de pantalla completa"],["EXIT_LOOP_MODE","Detener la repetici\u00f3n indefinida del video actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo de pantalla en pantalla"],["FAST_FORWARD","Avanzar"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],
|
|
["LOOP","Repetir indefinidamente"],["MORE_SETTINGS","M\u00e1s opciones de configuraci\u00f3n"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Detener"],["PICTURE_IN_PICTURE","Pantalla en pantalla"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR","Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND",
|
|
"Retroceder"],["SEEK","Buscar"],["SKIP_AD","Omitir anuncio"],["SKIP_TO_LIVE","Adelantar hasta la transmisi\u00f3n en vivo"],["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Sonido envolvente"],["TOGGLE_STEREOSCOPIC","Activar o desactivar el modo estereosc\u00f3pico"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Dejar de silenciar"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]]));a.Pa("fr",new Map([["AD_DURATION","Dur\u00e9e de l'annonce"],["AD_PROGRESS",
|
|
"Annonce\u00a0[AD_ON] sur\u00a0[NUM_ADS]"],["AD_STATISTICS","Statistiques sur les annonces"],["AD_TIME","Annonce\u00a0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatique"],["BACK","Retour"],["CAPTIONS","Sous-titres"],["CAST","Caster\u2026"],["CHAPTERS","Chapitres"],["DOWNLOAD_VIDEO_FRAME","T\u00e9l\u00e9charger l'image de la vid\u00e9o"],["ENTER_LOOP_MODE","Lire en boucle la vid\u00e9o en cours"],["ENTER_PICTURE_IN_PICTURE","Utiliser le mode Picture-in-Picture"],["EXIT_FULL_SCREEN","Quitter le mode plein \u00e9cran"],
|
|
["EXIT_LOOP_MODE","Arr\u00eater la lecture en boucle de la vid\u00e9o en cours"],["EXIT_PICTURE_IN_PICTURE","Quitter le mode\u00a0PIP (Picture-in-picture)"],["FAST_FORWARD","Avance rapide"],["FULL_SCREEN","Plein \u00e9cran"],["LANGUAGE","Langue"],["LIVE","En direct"],["LOOP","R\u00e9p\u00e9ter"],["MORE_SETTINGS","Plus de param\u00e8tres"],["MULTIPLE_LANGUAGES","Plusieurs langues"],["MUTE","Couper le son"],["NOT_APPLICABLE","Non applicable"],["OFF","D\u00e9sactiv\u00e9e"],["ON","Activ\u00e9e"],["PAUSE",
|
|
"Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Visionner"],["PLAYBACK_RATE","Vitesse de lecture"],["QUALITY","Qualit\u00e9"],["RECENTER_VR","Recentrer"],["REPLAY","Revoir"],["RESOLUTION","R\u00e9solution"],["REWIND","Retour arri\u00e8re"],["SEEK","Chercher"],["SKIP_AD","Passer l'annonce"],["SKIP_TO_LIVE","Acc\u00e9der \u00e0 la partie la plus r\u00e9cente du direct"],["STATISTICS","Statistiques"],["SUBTITLE_FORCED","Forc\u00e9"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Activer/D\u00e9sactiver le mode st\u00e9r\u00e9oscopique"],
|
|
["UNDETERMINED_LANGUAGE","Langue ind\u00e9termin\u00e9e"],["UNMUTE","R\u00e9activer le son"],["UNRECOGNIZED_LANGUAGE","Non reconnu"],["VOLUME","Volume"]]));a.Pa("it",new Map([["AD_DURATION","Durata dell'annuncio"],["AD_PROGRESS","Annuncio [AD_ON] di [NUM_ADS]"],["AD_STATISTICS","Statistiche sugli annunci"],["AD_TIME","Annuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatica"],["BACK","Indietro"],["CAPTIONS","Sottotitoli"],["CAST","Trasmetti..."],["CHAPTERS","Capitoli"],["DOWNLOAD_VIDEO_FRAME",
|
|
"Salva fotogramma"],["ENTER_LOOP_MODE","Riproduci in loop il video corrente"],["ENTER_PICTURE_IN_PICTURE","Attiva Picture in picture"],["EXIT_FULL_SCREEN","Esci da schermo intero"],["EXIT_LOOP_MODE","Interrompi riproduzione in loop del video corrente"],["EXIT_PICTURE_IN_PICTURE","Esci da Picture in picture"],["FAST_FORWARD","Avanti veloce"],["FULL_SCREEN","Schermo intero"],["LANGUAGE","Lingua"],["LIVE","Dal vivo"],["LOOP","Riproduci in loop"],["MORE_SETTINGS","Altre impostazioni"],["MULTIPLE_LANGUAGES",
|
|
"Pi\u00f9 lingue"],["MUTE","Disattiva audio"],["NOT_APPLICABLE","Non applicabile"],["OFF","Disattivo"],["ON","Attivo"],["PAUSE","Metti in pausa"],["PICTURE_IN_PICTURE","Picture in picture"],["PLAY","Riproduci"],["PLAYBACK_RATE","Velocit\u00e0 di riproduzione"],["QUALITY","Qualit\u00e0"],["RECENTER_VR","Ricentra"],["REPLAY","Riproduci di nuovo"],["RESOLUTION","Risoluzione"],["REWIND","Riavvolgi"],["SEEK","Cerca"],["SKIP_AD","Salta annuncio"],["SKIP_TO_LIVE","Passa alla trasmissione dal vivo"],["STATISTICS",
|
|
"Statistiche"],["SUBTITLE_FORCED","Forzata"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Pulsante di attivazione/disattivazione stereoscopico"],["UNDETERMINED_LANGUAGE","Indeterminata"],["UNMUTE","Riattiva audio"],["UNRECOGNIZED_LANGUAGE","Non riconosciuto"],["VOLUME","Volume"]]));a.Pa("ja",new Map([["AD_DURATION","\u5e83\u544a\u518d\u751f\u6642\u9593"],["AD_PROGRESS","[AD_ON] \u756a\u76ee\u306e\u5e83\u544a\uff08\u5168 [NUM_ADS] \u500b\uff09"],["AD_STATISTICS","\u5e83\u544a\u306e\u7d71\u8a08\u60c5\u5831"],
|
|
["AD_TIME","\u5e83\u544a: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u623b\u308b"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u30ad\u30e3\u30b9\u30c8..."],["CHAPTERS","\u7ae0"],["DOWNLOAD_VIDEO_FRAME","\u52d5\u753b\u30d5\u30ec\u30fc\u30e0\u3092\u4fdd\u5b58"],["ENTER_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u3092\u30eb\u30fc\u30d7\u518d\u751f"],["ENTER_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u958b\u59cb"],["EXIT_FULL_SCREEN",
|
|
"\u5168\u753b\u9762\u8868\u793a\u3092\u7d42\u4e86"],["EXIT_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u306e\u30eb\u30fc\u30d7\u518d\u751f\u3092\u505c\u6b62"],["EXIT_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u7d42\u4e86"],["FAST_FORWARD","\u65e9\u9001\u308a"],["FULL_SCREEN","\u5168\u753b\u9762\u8868\u793a"],["LANGUAGE","\u8a00\u8a9e"],["LIVE","\u30e9\u30a4\u30d6"],["LOOP","\u30eb\u30fc\u30d7"],["MORE_SETTINGS","\u8a73\u7d30\u8a2d\u5b9a"],
|
|
["MULTIPLE_LANGUAGES","\u591a\u8a00\u8a9e"],["MUTE","\u30df\u30e5\u30fc\u30c8"],["NOT_APPLICABLE","\u8a72\u5f53\u306a\u3057"],["OFF","\u30aa\u30d5"],["ON","\u30aa\u30f3"],["PAUSE","\u4e00\u6642\u505c\u6b62"],["PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc"],["PLAY","\u518d\u751f"],["PLAYBACK_RATE","\u518d\u751f\u901f\u5ea6"],["QUALITY","\u54c1\u8cea"],["RECENTER_VR","\u4e2d\u5fc3\u3092\u518d\u8a2d\u5b9a"],["REPLAY","\u3082\u3046\u4e00\u5ea6\u518d\u751f"],
|
|
["RESOLUTION","\u89e3\u50cf\u5ea6"],["REWIND","\u5dfb\u304d\u623b\u3057"],["SEEK","\u30b7\u30fc\u30af\u518d\u751f"],["SKIP_AD","\u5e83\u544a\u3092\u30b9\u30ad\u30c3\u30d7"],["SKIP_TO_LIVE","\u30e9\u30a4\u30d6\u914d\u4fe1\u307e\u3067\u30b9\u30ad\u30c3\u30d7"],["STATISTICS","\u7d71\u8a08\u60c5\u5831"],["SUBTITLE_FORCED","\u5f37\u5236"],["SURROUND","\u30b5\u30e9\u30a6\u30f3\u30c9"],["TOGGLE_STEREOSCOPIC","\u7acb\u4f53\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],
|
|
["UNMUTE","\u30df\u30e5\u30fc\u30c8\u3092\u89e3\u9664"],["UNRECOGNIZED_LANGUAGE","\u4e0d\u660e"],["VOLUME","\u97f3\u91cf"]]));a.Pa("ko",new Map([["AD_DURATION","\uad11\uace0 \uae30\uac04"],["AD_PROGRESS","\uad11\uace0 [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\uad11\uace0 \ud1b5\uacc4"],["AD_TIME","\uad11\uace0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\uc790\ub3d9"],["BACK","\ub4a4\ub85c"],["CAPTIONS","\uc790\ub9c9"],["CAST","\uc804\uc1a1..."],["CHAPTERS","\uc7a5"],["DOWNLOAD_VIDEO_FRAME",
|
|
"\ub3d9\uc601\uc0c1 \ud504\ub808\uc784 \uc800\uc7a5"],["ENTER_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd"],["ENTER_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc2dc\uc791"],["EXIT_FULL_SCREEN","\uc804\uccb4\ud654\uba74 \ub2eb\uae30"],["EXIT_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd \uc911\uc9c0"],["EXIT_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc885\ub8cc"],["FAST_FORWARD","\ube68\ub9ac \uac10\uae30"],["FULL_SCREEN","\uc804\uccb4\ud654\uba74"],["LANGUAGE",
|
|
"\uc5b8\uc5b4"],["LIVE","\uc2e4\uc2dc\uac04"],["LOOP","\ubc18\ubcf5 \uc7ac\uc0dd"],["MORE_SETTINGS","\uc124\uc815 \ub354\ubcf4\uae30"],["MULTIPLE_LANGUAGES","\uc5ec\ub7ec \uc5b8\uc5b4"],["MUTE","\uc74c\uc18c\uac70"],["NOT_APPLICABLE","\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c"],["OFF","\uc0ac\uc6a9 \uc548\ud568"],["ON","\uc0ac\uc6a9"],["PAUSE","\uc77c\uc2dc\uc911\uc9c0"],["PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc"],["PLAY","\uc7ac\uc0dd"],["PLAYBACK_RATE","\uc7ac\uc0dd \uc18d\ub3c4"],["QUALITY","\ud488\uc9c8"],
|
|
["RECENTER_VR","\uc911\uc2ec \uc7ac\uc124\uc815"],["REPLAY","\ub2e4\uc2dc\ubcf4\uae30"],["RESOLUTION","\ud574\uc0c1\ub3c4"],["REWIND","\ub418\uac10\uae30"],["SEEK","\ucc3e\uae30"],["SKIP_AD","\uad11\uace0 \uac74\ub108\ub6f0\uae30"],["SKIP_TO_LIVE","\ub77c\uc774\ube0c \ub3d9\uc601\uc0c1\uc73c\ub85c \uac74\ub108\ub6f0\uae30"],["STATISTICS","\ud1b5\uacc4"],["SUBTITLE_FORCED","\uac15\uc81c"],["SURROUND","\uc11c\ub77c\uc6b4\ub4dc"],["TOGGLE_STEREOSCOPIC","\uc785\uccb4 \ubcf4\uae30 \uc804\ud658"],["UNDETERMINED_LANGUAGE",
|
|
"\ubbf8\uc815"],["UNMUTE","\uc74c\uc18c\uac70 \ud574\uc81c"],["UNRECOGNIZED_LANGUAGE","\uc54c \uc218 \uc5c6\uc74c"],["VOLUME","\ubcfc\ub968"]]));a.Pa("nl",new Map([["AD_DURATION","Advertentieduur"],["AD_PROGRESS","Advertentie [AD_ON] van [NUM_ADS]"],["AD_STATISTICS","Advertentiestatistieken"],["AD_TIME","Advertentie: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Terug"],["CAPTIONS","Ondertiteling"],["CAST","Casten..."],["CHAPTERS","Hoofdstukken"],["DOWNLOAD_VIDEO_FRAME",
|
|
"Videoframe opslaan"],["ENTER_LOOP_MODE","De huidige video lussen"],["ENTER_PICTURE_IN_PICTURE","Scherm-in-scherm openen"],["EXIT_FULL_SCREEN","Volledig scherm sluiten"],["EXIT_LOOP_MODE","De huidige video niet meer lussen"],["EXIT_PICTURE_IN_PICTURE","Scherm-in-scherm afsluiten"],["FAST_FORWARD","Vooruitspoelen"],["FULL_SCREEN","Volledig scherm"],["LANGUAGE","Taal"],["LIVE","Live"],["LOOP","Lussen"],["MORE_SETTINGS","Meer instellingen"],["MULTIPLE_LANGUAGES","Meerdere talen"],["MUTE","Geluid uitzetten"],
|
|
["NOT_APPLICABLE","Niet van toepassing"],["OFF","Uit"],["ON","Aan"],["PAUSE","Onderbreken"],["PICTURE_IN_PICTURE","Scherm-in-scherm"],["PLAY","Afspelen"],["PLAYBACK_RATE","Afspeelsnelheid"],["QUALITY","Kwaliteit"],["RECENTER_VR","Opnieuw centreren"],["REPLAY","Opnieuw afspelen"],["RESOLUTION","Resolutie"],["REWIND","Terugspoelen"],["SEEK","Zoeken"],["SKIP_AD","Advertentie overslaan"],["SKIP_TO_LIVE","Doorgaan naar live"],["STATISTICS","Statistieken"],["SUBTITLE_FORCED","Afgedwongen"],["SURROUND",
|
|
"Surround"],["TOGGLE_STEREOSCOPIC","Stereoscopisch aan-/uitzetten"],["UNDETERMINED_LANGUAGE","Onbepaald"],["UNMUTE","Geluid aanzetten"],["UNRECOGNIZED_LANGUAGE","Onbekend"],["VOLUME","Volume"]]));a.Pa("pl",new Map([["AD_DURATION","Czas trwania reklamy"],["AD_PROGRESS","Reklama\u00a0[AD_ON] z\u00a0[NUM_ADS]"],["AD_STATISTICS","Statystyki reklam"],["AD_TIME","Reklama: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatycznie"],["BACK","Wstecz"],["CAPTIONS","Napisy"],["CAST","Przesy\u0142aj..."],
|
|
["CHAPTERS","Rozdzia\u0142y"],["DOWNLOAD_VIDEO_FRAME","Zapisz klatk\u0119 filmu"],["ENTER_LOOP_MODE","Odtwarzaj bie\u017c\u0105cy film w\u00a0p\u0119tli"],["ENTER_PICTURE_IN_PICTURE","W\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["EXIT_FULL_SCREEN","Zamknij pe\u0142ny ekran"],["EXIT_LOOP_MODE","Wy\u0142\u0105cz odtwarzanie bie\u017c\u0105cego filmu w\u00a0p\u0119tli"],["EXIT_PICTURE_IN_PICTURE","Wy\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["FAST_FORWARD","Przewi\u0144 do przodu"],["FULL_SCREEN",
|
|
"Pe\u0142ny ekran"],["LANGUAGE","J\u0119zyk"],["LIVE","Na \u017cywo"],["LOOP","Odtwarzaj w\u00a0p\u0119tli"],["MORE_SETTINGS","Wi\u0119cej ustawie\u0144"],["MULTIPLE_LANGUAGES","Wiele j\u0119zyk\u00f3w"],["MUTE","Wycisz"],["NOT_APPLICABLE","Nie dotyczy"],["OFF","Wy\u0142\u0105czone"],["ON","W\u0142\u0105czone"],["PAUSE","Wstrzymaj"],["PICTURE_IN_PICTURE","Obraz w\u00a0obrazie"],["PLAY","Odtw\u00f3rz"],["PLAYBACK_RATE","Szybko\u015b\u0107 odtwarzania"],["QUALITY","Jako\u015b\u0107"],["RECENTER_VR",
|
|
"Wy\u015brodkuj"],["REPLAY","Odtw\u00f3rz ponownie"],["RESOLUTION","Rozdzielczo\u015b\u0107"],["REWIND","Przewi\u0144 do ty\u0142u"],["SEEK","Szukaj"],["SKIP_AD","Pomi\u0144 reklam\u0119"],["SKIP_TO_LIVE","Przejd\u017a do transmisji na \u017cywo"],["STATISTICS","Statystyki"],["SUBTITLE_FORCED","Wymuszone"],["SURROUND","Przestrzenny"],["TOGGLE_STEREOSCOPIC","Prze\u0142\u0105cz tryb stereoskopowy"],["UNDETERMINED_LANGUAGE","Nie okre\u015blono"],["UNMUTE","Wy\u0142\u0105cz wyciszenie"],["UNRECOGNIZED_LANGUAGE",
|
|
"Nierozpoznany"],["VOLUME","G\u0142o\u015bno\u015b\u0107"]]));a.Pa("pt-BR",new Map([["AD_DURATION","Dura\u00e7\u00e3o do an\u00fancio"],["AD_PROGRESS","An\u00fancio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estat\u00edsticas de an\u00fancios"],["AD_TIME","An\u00fancio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tica"],["BACK","Voltar"],["CAPTIONS","Legendas"],["CAST","Transmitir..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Salvar frame do v\u00eddeo"],["ENTER_LOOP_MODE",
|
|
"Repetir o v\u00eddeo atual"],["ENTER_PICTURE_IN_PICTURE","Entrar no modo picture-in-picture"],["EXIT_FULL_SCREEN","Sair do modo tela cheia"],["EXIT_LOOP_MODE","Parar repeti\u00e7\u00e3o do v\u00eddeo atual"],["EXIT_PICTURE_IN_PICTURE","Sair de picture-in-picture"],["FAST_FORWARD","Avan\u00e7ar"],["FULL_SCREEN","Tela cheia"],["LANGUAGE","Idioma"],["LIVE","Ao vivo"],["LOOP","Repetir"],["MORE_SETTINGS","Mais defini\u00e7\u00f5es"],["MULTIPLE_LANGUAGES","V\u00e1rios idiomas"],["MUTE","Desativar som"],
|
|
["NOT_APPLICABLE","N\u00e3o relevante"],["OFF","Desativado"],["ON","Ativado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Reproduzir"],["PLAYBACK_RATE","Velocidade da reprodu\u00e7\u00e3o"],["QUALITY","Qualidade"],["RECENTER_VR","Centralizar"],["REPLAY","Repetir"],["RESOLUTION","Resolu\u00e7\u00e3o"],["REWIND","Voltar"],["SEEK","Procurar"],["SKIP_AD","Pular an\u00fancio"],["SKIP_TO_LIVE","Pular para transmiss\u00e3o ao vivo"],["STATISTICS","Estat\u00edsticas"],["SUBTITLE_FORCED",
|
|
"Exibi\u00e7\u00e3o for\u00e7ada"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Alternar imagem estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Indeterminado"],["UNMUTE","Ativar som"],["UNRECOGNIZED_LANGUAGE","N\u00e3o reconhecido"],["VOLUME","Volume"]]));a.Pa("ru",new Map([["AD_DURATION","\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u044b"],["AD_PROGRESS","\u0420\u0435\u043a\u043b\u0430\u043c\u0430 [AD_ON] \u0438\u0437 [NUM_ADS]"],
|
|
["AD_STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439"],["AD_TIME","\u0420\u0435\u043a\u043b\u0430\u043c\u0430: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0410\u0432\u0442\u043e"],["BACK","\u041d\u0430\u0437\u0430\u0434"],["CAPTIONS","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b"],["CAST","\u0422\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c..."],["CHAPTERS","\u042d\u043f\u0438\u0437\u043e\u0434\u044b"],
|
|
["DOWNLOAD_VIDEO_FRAME","\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u0434\u0440 \u0432\u0438\u0434\u0435\u043e"],["ENTER_LOOP_MODE","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0438\u0434\u0435\u043e"],["ENTER_PICTURE_IN_PICTURE",'\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
|
|
["EXIT_FULL_SCREEN","\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["EXIT_LOOP_MODE","\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043e"],["EXIT_PICTURE_IN_PICTURE",'\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
|
|
["FAST_FORWARD","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430 \u0432\u043f\u0435\u0440\u0435\u0434"],["FULL_SCREEN","\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["LANGUAGE","\u042f\u0437\u044b\u043a"],["LIVE","\u041f\u0440\u044f\u043c\u043e\u0439 \u044d\u0444\u0438\u0440"],["LOOP","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c"],["MORE_SETTINGS","\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438"],
|
|
["MULTIPLE_LANGUAGES","\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0437\u044b\u043a\u043e\u0432"],["MUTE","\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["NOT_APPLICABLE","\u041d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e"],["OFF","\u0412\u044b\u043a\u043b."],["ON","\u0412\u043a\u043b."],["PAUSE","\u041f\u0430\u0443\u0437\u0430"],["PICTURE_IN_PICTURE","\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"],
|
|
["PLAY","\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438"],["PLAYBACK_RATE","\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f"],["QUALITY","\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e"],["RECENTER_VR","\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e"],["REPLAY","\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c"],
|
|
["RESOLUTION","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435"],["REWIND","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0437\u0430\u0434"],["SEEK","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430"],["SKIP_AD","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c"],["SKIP_TO_LIVE","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043f\u0440\u044f\u043c\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438"],
|
|
["STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430"],["SUBTITLE_FORCED","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e"],["SURROUND","\u041e\u0431\u044a\u0435\u043c\u043d\u044b\u0439 \u0437\u0432\u0443\u043a"],["TOGGLE_STEREOSCOPIC","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u0440\u0435\u043e\u0441\u043a\u043e\u043f\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0436\u0438\u043c"],
|
|
["UNDETERMINED_LANGUAGE","\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e"],["UNMUTE","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["UNRECOGNIZED_LANGUAGE","\u041d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043e"],["VOLUME","\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c"]]));a.Pa("th",new Map([["AD_DURATION","\u0e23\u0e30\u0e22\u0e30\u0e40\u0e27\u0e25\u0e32\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_PROGRESS","\u0e42\u0e06\u0e29\u0e13\u0e32 [AD_ON] \u0e08\u0e32\u0e01 [NUM_ADS] \u0e23\u0e32\u0e22\u0e01\u0e32\u0e23"],
|
|
["AD_STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_TIME","\u0e42\u0e06\u0e29\u0e13\u0e32: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34"],["BACK","\u0e01\u0e25\u0e31\u0e1a"],["CAPTIONS","\u0e04\u0e33\u0e1a\u0e23\u0e23\u0e22\u0e32\u0e22\u0e41\u0e17\u0e19\u0e40\u0e2a\u0e35\u0e22\u0e07"],["CAST","\u0e41\u0e04\u0e2a\u0e15\u0e4c..."],["CHAPTERS","\u0e1a\u0e17"],["DOWNLOAD_VIDEO_FRAME","\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e40\u0e1f\u0e23\u0e21\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d"],
|
|
["ENTER_LOOP_MODE","\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["ENTER_PICTURE_IN_PICTURE","\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["EXIT_FULL_SCREEN","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e1a\u0e1a\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["EXIT_LOOP_MODE",
|
|
"\u0e2b\u0e22\u0e38\u0e14\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["EXIT_PICTURE_IN_PICTURE","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["FAST_FORWARD","\u0e01\u0e23\u0e2d\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32"],["FULL_SCREEN","\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["LANGUAGE","\u0e20\u0e32\u0e29\u0e32"],
|
|
["LIVE","\u0e2a\u0e14"],["LOOP","\u0e25\u0e39\u0e1b"],["MORE_SETTINGS","\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21"],["MULTIPLE_LANGUAGES","\u0e2b\u0e25\u0e32\u0e22\u0e20\u0e32\u0e29\u0e32"],["MUTE","\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["NOT_APPLICABLE","\u0e44\u0e21\u0e48\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e02\u0e49\u0e2d\u0e07"],["OFF","\u0e1b\u0e34\u0e14"],["ON","\u0e40\u0e1b\u0e34\u0e14"],["PAUSE","\u0e2b\u0e22\u0e38\u0e14\u0e0a\u0e31\u0e48\u0e27\u0e04\u0e23\u0e32\u0e27"],
|
|
["PICTURE_IN_PICTURE","\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["PLAY","\u0e40\u0e25\u0e48\u0e19"],["PLAYBACK_RATE","\u0e04\u0e27\u0e32\u0e21\u0e40\u0e23\u0e47\u0e27\u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e25\u0e48\u0e19"],["QUALITY","\u0e04\u0e38\u0e13\u0e20\u0e32\u0e1e"],["RECENTER_VR","\u0e08\u0e31\u0e14\u0e01\u0e36\u0e48\u0e07\u0e01\u0e25\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48"],["REPLAY","\u0e40\u0e25\u0e48\u0e19\u0e0b\u0e49\u0e33"],
|
|
["RESOLUTION","\u0e04\u0e27\u0e32\u0e21\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14"],["REWIND","\u0e01\u0e23\u0e2d\u0e01\u0e25\u0e31\u0e1a"],["SEEK","\u0e04\u0e49\u0e19\u0e2b\u0e32"],["SKIP_AD","\u0e02\u0e49\u0e32\u0e21\u0e42\u0e06\u0e29\u0e13\u0e32"],["SKIP_TO_LIVE","\u0e02\u0e49\u0e32\u0e21\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e01\u0e32\u0e23\u0e16\u0e48\u0e32\u0e22\u0e17\u0e2d\u0e14\u0e2a\u0e14"],["STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34"],["SUBTITLE_FORCED","\u0e1a\u0e31\u0e07\u0e04\u0e31\u0e1a"],
|
|
["SURROUND","\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e23\u0e32\u0e27\u0e14\u0e4c"],["TOGGLE_STEREOSCOPIC","\u0e40\u0e1b\u0e34\u0e14/\u0e1b\u0e34\u0e14\u0e1f\u0e35\u0e40\u0e08\u0e2d\u0e23\u0e4c\u0e2a\u0e32\u0e21\u0e21\u0e34\u0e15\u0e34"],["UNDETERMINED_LANGUAGE","\u0e44\u0e21\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14"],["UNMUTE","\u0e40\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["UNRECOGNIZED_LANGUAGE","\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e23\u0e39\u0e49\u0e08\u0e31\u0e01"],["VOLUME","\u0e23\u0e30\u0e14\u0e31\u0e1a\u0e40\u0e2a\u0e35\u0e22\u0e07"]]));
|
|
a.Pa("tr",new Map([["AD_DURATION","Reklam s\u00fcresi"],["AD_PROGRESS","[AD_ON]/[NUM_ADS] reklam"],["AD_STATISTICS","Reklam istatistikleri"],["AD_TIME","Reklam: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Otomatik"],["BACK","Geri"],["CAPTIONS","Altyaz\u0131lar"],["CAST","Yay\u0131nla..."],["CHAPTERS","B\u00f6l\u00fcmler"],["DOWNLOAD_VIDEO_FRAME","Video karesini kaydet"],["ENTER_LOOP_MODE","Mevcut videoyu d\u00f6ng\u00fcye al"],["ENTER_PICTURE_IN_PICTURE","Pencere i\u00e7inde Pencere moduna gir"],
|
|
["EXIT_FULL_SCREEN","Tam ekrandan \u00e7\u0131k"],["EXIT_LOOP_MODE","Mevcut videonun d\u00f6ng\u00fcs\u00fcn\u00fc durdur"],["EXIT_PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencereden \u00c7\u0131k"],["FAST_FORWARD","\u0130leri sar"],["FULL_SCREEN","Tam ekran"],["LANGUAGE","Dil"],["LIVE","Canl\u0131"],["LOOP","D\u00f6ng\u00fc"],["MORE_SETTINGS","Daha fazla ayar"],["MULTIPLE_LANGUAGES","Birden \u00e7ok dil"],["MUTE","Sesi kapat"],["NOT_APPLICABLE","Ge\u00e7erli de\u011fil"],["OFF","Kapal\u0131"],
|
|
["ON","A\u00e7\u0131k"],["PAUSE","Duraklat"],["PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencere"],["PLAY","Oynat"],["PLAYBACK_RATE","\u00c7alma h\u0131z\u0131"],["QUALITY","Kalite"],["RECENTER_VR","Ortala"],["REPLAY","Tekrar Oynat"],["RESOLUTION","\u00c7\u00f6z\u00fcn\u00fcrl\u00fck"],["REWIND","Geri sar"],["SEEK","Ara"],["SKIP_AD","Reklam\u0131 Atla"],["SKIP_TO_LIVE","Canl\u0131 yay\u0131na atla"],["STATISTICS","\u0130statistikler"],["SUBTITLE_FORCED","Zorunlu"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC",
|
|
"Stereoskopik modu a\u00e7/kapat"],["UNDETERMINED_LANGUAGE","Belirsiz"],["UNMUTE","Sesi a\u00e7"],["UNRECOGNIZED_LANGUAGE","Tan\u0131nmayan"],["VOLUME","Ses"]]));a.Pa("zh",new Map([["AD_DURATION","\u5e7f\u544a\u6301\u7eed\u65f6\u95f4"],["AD_PROGRESS","\u5e7f\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5e7f\u544a\u7edf\u8ba1\u4fe1\u606f"],["AD_TIME","\u5e7f\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52a8"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e\u2026"],
|
|
["CHAPTERS","\u7ae0\u8282"],["DOWNLOAD_VIDEO_FRAME","\u4fdd\u5b58\u89c6\u9891\u5e27"],["ENTER_LOOP_MODE","\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["ENTER_PICTURE_IN_PICTURE","\u8fdb\u5165\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["EXIT_PICTURE_IN_PICTURE","\u9000\u51fa\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["FAST_FORWARD","\u5feb\u8fdb"],
|
|
["FULL_SCREEN","\u5168\u5c4f"],["LANGUAGE","\u8bed\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u73af\u64ad\u653e"],["MORE_SETTINGS","\u66f4\u591a\u8bbe\u7f6e"],["MULTIPLE_LANGUAGES","\u591a\u79cd\u8bed\u8a00"],["MUTE","\u9759\u97f3"],["NOT_APPLICABLE","\u4e0d\u9002\u7528"],["OFF","\u5173\u95ed"],["ON","\u5f00\u542f"],["PAUSE","\u6682\u505c"],["PICTURE_IN_PICTURE","\u753b\u4e2d\u753b"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u753b\u8d28"],["RECENTER_VR",
|
|
"\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u653e"],["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"],["STATISTICS","\u7edf\u8ba1\u4fe1\u606f"],["SUBTITLE_FORCED","\u5df2\u5f3a\u5236\u663e\u793a"],["SURROUND","\u73af\u7ed5\u58f0"],["TOGGLE_STEREOSCOPIC","\u5207\u6362\u7acb\u4f53\u58f0"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],
|
|
["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.Pa("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5ee3\u544a\u7d71\u8a08\u8cc7\u6599"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["CHAPTERS","\u7ae0\u7bc0"],["DOWNLOAD_VIDEO_FRAME","\u5132\u5b58\u5f71\u7247\u5f71\u683c"],
|
|
["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\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"],["QUALITY","\u97f3\u8cea"],["RECENTER_VR","\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u64ad"],["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"],["STATISTICS","\u7d71\u8a08\u8cc7\u6599"],["SUBTITLE_FORCED","\u5f37\u5236\u986f\u793a"],["SURROUND","\u74b0\u5834\u97f3\u6548"],["TOGGLE_STEREOSCOPIC","\u5207\u63db\u7acb\u9ad4\u5f71\u50cf"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.wh(navigator.languages||
|
|
[]);return a}P("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.rg;Z.prototype.incrementPitch=Z.prototype.qg;Z.prototype.incrementYaw=Z.prototype.sg;Z.prototype.toggleStereoscopicMode=Z.prototype.Bd;Z.prototype.setVRFieldOfView=Z.prototype.Ok;Z.prototype.getVRFieldOfView=Z.prototype.Kj;Z.prototype.getVRNorth=Z.prototype.Lj;Z.prototype.isPlayingVR=Z.prototype.Mb;Z.prototype.canPlayVR=Z.prototype.Kf;Z.prototype.hideUI=Z.prototype.Sj;Z.prototype.showUI=Z.prototype.Pk;
|
|
Z.prototype.isOpaque=Z.prototype.Rc;Z.prototype.hideAdUI=Z.prototype.Oh;Z.prototype.showAdUI=Z.prototype.Di;Z.prototype.togglePiP=Z.prototype.zd;Z.prototype.isPiPEnabled=Z.prototype.Ie;Z.prototype.isPiPAllowed=Z.prototype.He;Z.prototype.toggleFullScreen=Z.prototype.jf;Z.prototype.isFullScreenEnabled=Z.prototype.md;Z.prototype.isFullScreenSupported=Z.prototype.Qd;Z.prototype.hideSettingsMenus=Z.prototype.Nc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Cd;Z.prototype.setLastTouchEventTime=Z.prototype.xi;
|
|
Z.prototype.getDisplayTime=Z.prototype.lg;Z.prototype.isCastAllowed=Z.prototype.Tj;Z.prototype.setSeeking=Z.prototype.$g;Z.prototype.isSeeking=Z.prototype.Yj;Z.prototype.getConfig=Z.prototype.jj;Z.prototype.getClientSideAdContainer=Z.prototype.ij;Z.prototype.getServerSideAdContainer=Z.prototype.Ej;Z.prototype.getControlsContainer=Z.prototype.lj;Z.prototype.getLocalPlayer=Z.prototype.tj;Z.prototype.getPlayer=Z.prototype.kd;Z.prototype.getLocalVideo=Z.prototype.uj;Z.prototype.getVideo=Z.prototype.vc;
|
|
Z.prototype.getVideoContainer=Z.prototype.Nj;Z.prototype.getLocalization=Z.prototype.vj;Z.prototype.getCastProxy=Z.prototype.hj;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.ti;Z.prototype.setEnabledShakaControls=Z.prototype.Wg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.bk;Z.prototype.allowCast=Z.prototype.Xi;Z.registerSeekBar=function(a){lG=a};Z.registerElement=UF;Z.prototype.destroy=Z.prototype.destroy;
|
|
var VF=new Map,lG=new hF;function tG(a,b){BE.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=Hn();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=V("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");
|
|
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);uG(this);this.eventManager.o(this.localization,"locale-updated",function(){vG(c)});this.eventManager.o(this.localization,"locale-changed",function(){vG(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&GE(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){GE(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){GE(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.xi(Date.now());
|
|
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){wG(c)});vG(this);this.ad&&this.ad.isLinear()&&GE(this.g,!1)}qa(tG,BE);tG.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];BE.prototype.release.call(this)};function xG(a,b){yG.set(a,b)}
|
|
function uG(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,yG.get(c)?(c=yG.get(c),a.i.push(c.create(a.h,a.controls))):Za("Unrecognized overflow menu element requested:",c)}function wG(a){if(a.controls.Cd())a.controls.Nc();else{GE(a.h,!0);MF(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};lb(a.h.childNodes,b)&&mb(a.h.childNodes,b)[0].focus()}}function vG(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
P("shaka.ui.OverflowMenu",tG);tG.registerElement=xG;function zG(){}zG.prototype.create=function(a,b){return new tG(a,b)};UF("overflow_menu",new zG);var yG=new Map;function AG(a,b){function c(e){return d.j[e]}BE.call(this,a,b);var d=this;this.h=Hn();this.h.classList.add("shaka-ad-statistics-button");this.i=V("i");this.i.classList.add("material-icons-round");this.i.textContent="insert_chart_outlined";this.h.appendChild(this.i);a=V("label");a.classList.add("shaka-overflow-button-label");this.u=V("span");a.appendChild(this.u);this.m=V("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.h.appendChild(a);this.parent.appendChild(this.h);
|
|
this.g=V("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-ad-statistics-container");this.g.classList.add("shaka-hidden");this.controls.h.appendChild(this.g);this.C=[];this.j=this.adManager.getStats();this.s={};this.A={loadTimes:function(e){var f=0;e=t(d.j[e]);for(var g=e.next();!g.done;g=e.next())f+=parseFloat(g.value);return f},averageLoadTime:c,started:c,playedCompletely:c,skipped:c,errors:c};this.l=new Zb(function(){d.j=
|
|
d.adManager.getStats();for(var e=t(d.C),f=e.next();!f.done;f=e.next())f=f.value,d.s[f].textContent=d.A[f](f)});BG(this);CG(this);this.eventManager.o(this.localization,"locale-updated",function(){BG(d)});this.eventManager.o(this.localization,"locale-changed",function(){BG(d)});this.eventManager.o(this.h,"click",function(){GE(d.parent,!1);d.g.classList.contains("shaka-hidden")?(d.i.textContent="insert_chart",d.l.Ba(.1),GE(d.g,!0)):(d.i.textContent="insert_chart_outlined",d.l.stop(),GE(d.g,!1));BG(d)});
|
|
this.eventManager.o(this.player,"loading",function(){GE(d.h,!1)});this.eventManager.o(this.adManager,"ad-started",function(){GE(d.h,!0)})}qa(AG,BE);function BG(a){a.u.textContent=a.localization.resolve("AD_STATISTICS");a.h.ariaLabel=a.localization.resolve("AD_STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
|
|
function CG(a){for(var b=t(a.controls.g.adStatisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.j){var d=a.g,e=d.appendChild,f=a,g=V("div"),h=V("label");h.textContent=c+":";g.appendChild(h);h=V("span");h.textContent=f.A[c](c);g.appendChild(h);f.s[c]=h;e.call(d,g);a.C.push(c)}else Za("Unrecognized ad statistic element:",c)}AG.prototype.release=function(){this.l.stop();this.l=null;BE.prototype.release.call(this)};P("shaka.ui.AdStatisticsButton",AG);function DG(){}
|
|
DG.prototype.create=function(a,b){return new AG(a,b)};xG("ad_statistics",new DG);NE("ad_statistics",new DG);function EG(a,b){BE.call(this,a,b);var c=this;this.g=Hn();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=V("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");a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=V("span");a.appendChild(this.j);
|
|
this.i=V("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);FG(this);GG(this);this.eventManager.o(this.localization,"locale-updated",function(){FG(c)});this.eventManager.o(this.localization,"locale-changed",function(){FG(c)});this.eventManager.o(this.g,"click",function(){c.controls.vc().webkitShowPlaybackTargetPicker()});a=this.controls.vc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
c.player.jd()==Pp;GE(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){GG(c)})}qa(EG,BE);function GG(a){var b=a.controls.vc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function FG(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}P("shaka.ui.AirPlayButton",EG);function HG(){}HG.prototype.create=function(a,b){return new EG(a,b)};xG("airplay",new HG);
|
|
UF("airplay",new HG);function IG(a,b,c,d){d=void 0===d?null:d;this.i=a;this.j=b;this.h=JG(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.xg()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);this.configure({});c.controls||a.ah(b);b.ui=this;c.ui=this}q=IG.prototype;q.destroy=function(){var a=this;return I(function(b){if(1==b.g)return a.g?x(b,a.g.destroy(),2):b.B(2);if(4!=b.g)return a.g=null,a.i?x(b,a.i.destroy(),4):b.B(4);a.i=null;H(b)})};
|
|
q.xg=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:kc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=JG(this);Nm(a,this.h,JG(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Om(a,b));Nm(this.h,a,JG(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new S("uiupdated"))};q.kj=function(){return this.g};
|
|
q.Lk=function(a){this.g.Wg(a)};
|
|
function JG(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language chapter picture_in_picture cast playback_rate recenter_vr toggle_stereoscopic".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent manifestSizeBytes bytesDownloaded nonFatalErrorCount manifestPeriodCount manifestGapCount".split(" "),adStatisticsList:"loadTimes averageLoadTime started playedCompletely skipped errors".split(" "),
|
|
contextMenuElements:["loop","picture_in_picture","save_video_frame","statistics","ad_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:"",castAndroidReceiverCompatible:!1,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:KG,textTrackLabelFormat:KG,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:0<navigator.maxTouchPoints,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular",
|
|
setupMediaSession:!0};"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.xg()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));b.overflowMenuButtons.push("save_video_frame");return b}
|
|
function LG(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D;return I(function(G){switch(G.g){case 1:CA();if(!Zo())return MG("shaka-ui-load-failed",NG),G.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){G.B(2);break}if(b.length&&!a.length){e=t(b);for(f=e.next();!f.done;f=e.next())g=f.value,
|
|
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=OG(h,c,d),m=l.Vh,n=l.Pi,PG(h,g,m,n));G.B(2);break}p=t(a);r=p.next();case 4:if(r.done){G.B(2);break}u=r.value;if(u.ui){G.B(5);break}v=null;w=t(b);for(z=w.next();!z.done;z=w.next())if(y=z.value,y.parentElement==u){v=y;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));B=OG(u,c,d);C=B.Vh;D=B.Pi;ua(G,7);return x(G,PG(u,v,C,D),9);case 9:wa(G,5);break;case 7:return xa(G),
|
|
MG("shaka-ui-load-failed",QG),G.return();case 5:r=p.next();G.B(4);break;case 2:MG("shaka-ui-loaded"),H(G)}})}function MG(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
function PG(a,b,c,d){var e,f,g,h,k,l,m,n,p;return I(function(r){switch(r.g){case 1:e=new W;f=new IG(e,a,b,d);e.ph(c);g="";h=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(g=a.dataset.shakaPlayerCastReceiverId,h="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(g=b.dataset.shakaPlayerCastReceiverId,h="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);g.length&&f.configure({castReceiverAppId:g,castAndroidReceiverCompatible:h});
|
|
b.controls&&f.g.ti(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");return x(r,e.$b(b),2);case 2:m=t(b.querySelectorAll("source")),n=m.next();case 3:if(n.done){r.B(0);break}p=n.value;ua(r,6);return x(r,f.g.kd().load(p.getAttribute("src")),8);case 8:r.B(0);break;case 6:xa(r);case 4:n=m.next(),r.B(3)}})}
|
|
function OG(a,b,c){var d=null;b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.parentElement==a){d=e;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));b=null;c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.parentElement==a){b=e;break}b||(b=document.createElement("canvas"),b.classList.add("shaka-vr-canvas-container"),a.appendChild(b));return{Vh:d,Pi:b}}P("shaka.ui.Overlay",IG);IG.prototype.setEnabled=IG.prototype.Lk;
|
|
IG.prototype.getControls=IG.prototype.kj;IG.prototype.configure=IG.prototype.configure;IG.prototype.getConfiguration=IG.prototype.getConfiguration;IG.prototype.isMobile=IG.prototype.xg;IG.prototype.destroy=IG.prototype.destroy;var KG=0;IG.TrackLabelFormat={LANGUAGE:KG,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var NG=0,QG=1;IG.FailReasonCode={NO_BROWSER_SUPPORT:NG,PLAYER_FAILED_TO_LOAD:QG};
|
|
"complete"==document.readyState?I(function(a){if(1==a.g)return x(a,Promise.resolve(),2);LG();H(a)}):window.addEventListener("load",LG);function RG(a,b,c,d,e,f,g,h){function k(L){var K="";L=L.toLowerCase();L.startsWith("mp4a")?K="AAC":"ac-3"===L?K="Dolby":"ec-3"===L?K="DD+":"opus"===L?K="Opus":"flac"===L&&(K="fLaC");return K?" "+K:K}function l(L){var K="";5<=L&&(K=" "+f.resolve("SURROUND"));return K}function m(L,K,O,M,N){K=[L,K];h&&null!=M&&K.push(M);p(L)&&N&&K.push(N);O&&3==g&&K.push(O);return K.join(": ")}function n(L){return"variant"==L.type?L.audioRoles?L.audioRoles.join(", "):void 0:L.roles.join(", ")}function p(L){return u.has(L)&&
|
|
1<u.get(L).size}for(var r=a.find(function(L){return 1==L.active}),u=new Map,v=t(a),w=v.next();!w.done;w=v.next())w=w.value,w.audioCodec&&(u.has(w.language)||u.set(w.language,new Set),u.get(w.language).add(Ff(w.audioCodec)));v=CE(b);In(b);b.appendChild(v);v=new Map;w=t(a);for(var z=w.next();!z.done;z=w.next())z=z.value,v.has(z.language)||v.set(z.language,new Set),v.get(z.language).add(n(z));v=new Set;r=r?m(r.language,n(r),r.label,r.channelsCount,r.audioCodec):"";a=t(a);z=a.next();for(w={};!z.done;w=
|
|
{Zb:void 0},z=a.next()){w.Zb=z.value;z=w.Zb.language;var y=w.Zb.forced,B=f.resolve("SUBTITLE_FORCED"),C=n(w.Zb),D=w.Zb.label,G=w.Zb.channelsCount,A=w.Zb.audioCodec,E=m(z,C,D,G,A);if(!v.has(E)){v.add(E);var F=Hn();F.addEventListener("click",function(L){return function(){c(L.Zb)}}(w));var J=V("span");F.appendChild(J);J.textContent=SG(z,f);switch(g){case KG:p(z)&&(J.textContent+=k(A));h&&(J.textContent+=l(G));y&&(J.textContent+=" ("+B+")");break;case 1:p(z)&&(J.textContent+=k(A));h&&(J.textContent+=
|
|
l(G));C?J.textContent=C:(Za("Track #"+w.Zb.id+" does not have a role, but the UI is configured to only show role."),J.textContent="?");y&&(J.textContent+=" ("+B+")");break;case 2:p(z)&&(J.textContent+=k(A));h&&(J.textContent+=l(G));C&&(J.textContent+=": "+C);y&&(J.textContent+=" ("+B+")");break;case 3:D?J.textContent=D:(Za("Track #"+w.Zb.id+" does not have a label, but the UI is configured to only show labels."),J.textContent="?")}d&&E==r&&(F.appendChild(FE()),J.classList.add("shaka-chosen-item"),
|
|
F.ariaSelected="true",e.textContent=J.textContent);b.appendChild(F)}}}function SG(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=fd(a);return a in xE?xE[a].D:c in xE?xE[c].D+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function TG(a,b,c){BE.call(this,a,b);var d=this;UG(this,c);VG(this);WG(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new S("submenuopen")),GE(d.menu,!0),EE(d.menu)):GE(d.menu,!1)})}qa(TG,BE);
|
|
function UG(a,b){a.button=Hn();a.button.classList.add("shaka-overflow-button");a.icon=V("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=V("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=V("span");b.appendChild(a.nameSpan);a.currentSelection=V("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
|
|
function VG(a){a.menu=V("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=Hn();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Nc()});var b=V("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
V("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function WG(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}GE(a.parent,!0);lb(a.parent.childNodes,b)&&mb(a.parent.childNodes,b)[0].focus();MF(a.controls)}))}P("shaka.ui.SettingsMenu",TG);function XG(a,b){TG.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(){YG(c)});this.eventManager.o(this.localization,"locale-changed",function(){YG(c)});this.eventManager.o(this.player,"loading",function(){ZG(c)});this.eventManager.o(this.player,"trackschanged",function(){ZG(c)});this.eventManager.o(this.player,
|
|
"variantchanged",function(){$G(c)});YG(this);$G(this)}qa(XG,TG);
|
|
function $G(a){var b=a.player.Lb();RG(b,a.menu,function(c){var d=void 0;c.channelsCount&&a.controls.g.showAudioChannelCountVariants&&(d=c.channelsCount);var e=void 0;c.audioCodec&&(e=c.audioCodec);a.player.Rg(c.language,c.roles[0],d,0,e)},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);EE(a.menu);a.controls.dispatchEvent(new S("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);GE(a.button,2<
|
|
a.menu.getElementsByTagName("button").length)}function ZG(a){var b=0<a.player.Lb().length;GE(a.button,b);$G(a)}function YG(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")}P("shaka.ui.AudioLanguageSelection",XG);function aH(){}aH.prototype.create=function(a,b){return new XG(a,b)};xG("language",new aH);UF("language",new aH);function bH(a,b){BE.call(this,a,b);var c=this;this.h=this.controls.G;this.g=Hn();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=V("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=V("span");a.appendChild(this.l);this.j=V("span");this.j.classList.add("shaka-current-selection-span");
|
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);cH(this);dH(this);this.eventManager.o(this.localization,"locale-updated",function(){cH(c)});this.eventManager.o(this.localization,"locale-changed",function(){cH(c)});this.eventManager.o(this.g,"click",function(){eH(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){dH(c)})}qa(bH,BE);
|
|
function eH(a){var b;I(function(c){if(1==c.g){if(a.h.Ra())return a.h.Hi(),c.B(0);ua(c,3);a.g.disabled=!0;return x(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,wa(c,0);b=xa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new S("error",(new Map).set("detail",b)));H(c)})}function dH(a){var b=a.h.Jf()&&a.controls.ra,c=a.h.Ra();GE(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");fH(a)}
|
|
function fH(a){a.j.textContent=a.h.Ra()?a.h.Ye():a.localization.resolve("OFF")}function cH(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");fH(a)}P("shaka.ui.CastButton",bH);function gH(){}gH.prototype.create=function(a,b){return new bH(a,b)};xG("cast",new gH);UF("cast",new gH);function hH(a,b){TG.call(this,a,b,"bookmarks");var c=this;this.button.classList.add("shaka-chapter-button");this.menu.classList.add("shaka-chapters");this.button.classList.add("shaka-tooltip-status");this.g=[];this.h="und";this.eventManager.o(this.localization,"locale-updated",function(){iH(c);jH(c)});this.eventManager.o(this.localization,"locale-changed",function(){iH(c);jH(c)});this.eventManager.o(this.player,"unloading",function(){kH(c);c.h="und";c.g=[]});this.eventManager.o(this.player,"trackschanged",
|
|
function(){jH(c)});iH(this);jH(this)}qa(hH,TG);function iH(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("CHAPTERS");a.nameSpan.textContent=a.localization.resolve("CHAPTERS");a.backSpan.textContent=a.localization.resolve("CHAPTERS")}function kH(a){var b=CE(a.menu);In(a.menu);a.menu.appendChild(b);GE(a.button,!1)}
|
|
function jH(a){function b(h,k){return!h&&!k||h.id===k.id&&h.title===k.title&&h.startTime===k.startTime&&h.endTime===k.endTime}for(var c="und",d=[],e=t(Array.from(a.localization.g)),f=e.next();!f.done&&(c=f.value,d=a.player.kg(c)||[],!d.length);f=e.next());d.length||(c="und",d=a.player.kg(c)||[]);e=c!==a.h;f=a.g.length!==d.length||!a.g.some(function(h,k){k=d.at(k);return b(h,k)||d.some(function(l){return b(h,l)})});a.h=c;a.g=d;if(!d.length)kH(a);else if(e||f){c=t(a.g);f=c.next();for(e={};!f.done;e=
|
|
{Lf:void 0},f=c.next()){e.Lf=f.value;f=Hn();var g=V("span");g.classList.add("shaka-chapter");g.textContent=e.Lf.title;f.appendChild(g);a.eventManager.o(f,"click",function(h){return function(){a.video.currentTime=h.Lf.startTime}}(e));a.menu.appendChild(f)}GE(a.button,!0);EE(a.menu)}}P("shaka.ui.ChapterSelection",hH);function lH(){}lH.prototype.create=function(a,b){return new hH(a,b)};xG("chapter",new lH);UF("chapter",new lH);function mH(a,b){BE.call(this,a,b);var c=this;this.g=Hn();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);nH(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){nH(c)});this.eventManager.o(this.localization,"locale-changed",function(){nH(c)});
|
|
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ua())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.Fc(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(mH,BE);function nH(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}P("shaka.ui.FastForwardButton",mH);function oH(){}oH.prototype.create=function(a,b){return new mH(a,b)};UF("fast_forward",new oH);function pH(a,b){BE.call(this,a,b);var c=this;this.h=this.controls.m;this.g=Hn();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");qH(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);rH(this);this.eventManager.o(this.localization,"locale-updated",function(){rH(c)});this.eventManager.o(this.localization,"locale-changed",function(){rH(c)});this.eventManager.o(this.g,"click",function(){return I(function(d){return x(d,
|
|
c.controls.jf(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.md()?"fullscreen_exit":"fullscreen";rH(c)});this.eventManager.o(this.h,"loadedmetadata",function(){qH(c)});this.eventManager.o(this.h,"loadeddata",function(){qH(c)})}qa(pH,BE);function qH(a){a.controls.Qd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function rH(a){a.g.ariaLabel=a.localization.resolve(a.controls.md()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
P("shaka.ui.FullscreenButton",pH);function sH(){}sH.prototype.create=function(a,b){return new pH(a,b)};UF("fullscreen",new sH);function tH(a,b){BE.call(this,a,b);var c=this;this.g=Hn();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=V("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=V("span");this.l.textContent=this.localization.resolve("LOOP");a.appendChild(this.l);this.j=V("span");this.j.classList.add("shaka-current-selection-span");
|
|
a.appendChild(this.j);this.g.appendChild(a);uH(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){uH(c)});this.eventManager.o(this.localization,"locale-changed",function(){uH(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Sa();c.h.Ba(1)});this.m=this.video.loop;this.h=new Zb(function(){c.m!=c.video.loop&&(uH(c),c.m=c.video.loop)});this.h.Ba(1)}qa(tH,BE);
|
|
tH.prototype.release=function(){this.h.stop();this.h=null;BE.prototype.release.call(this)};function uH(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}P("shaka.ui.LoopButton",tH);function vH(){}vH.prototype.create=function(a,b){return new tH(a,b)};xG("loop",new vH);UF("loop",new vH);NE("loop",new vH);function wH(a,b){BE.call(this,a,b);var c=this;this.g=Hn();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);xH(this);yH(this);this.eventManager.o(this.localization,"locale-updated",function(){xH(c)});this.eventManager.o(this.localization,"locale-changed",function(){xH(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});
|
|
this.eventManager.o(this.video,"volumechange",function(){xH(c);yH(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){xH(c);yH(c)});this.eventManager.o(this.adManager,"ad-muted",function(){xH(c);yH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;xH(c);yH(c)})}qa(wH,BE);function xH(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
function yH(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}P("shaka.ui.MuteButton",wH);function zH(){}zH.prototype.create=function(a,b){return new wH(a,b)};UF("mute",new zH);function AH(a,b){BE.call(this,a,b);var c=this;this.l=this.controls.m;this.g=Hn();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=V("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=V("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
|
|
V("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);BH(this);this.parent.appendChild(this.g);this.controls.He()||GE(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){BH(c)});this.eventManager.o(this.localization,"locale-changed",function(){BH(c)});this.eventManager.o(this.g,"click",function(){c.controls.zd()});this.eventManager.o(this.l,"enterpictureinpicture",function(){CH(c)});this.eventManager.o(this.l,"leavepictureinpicture",
|
|
function(){DH(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){EH(c)});this.eventManager.o(this.player,"trackschanged",function(){EH(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){CH(c);c.eventManager.sa(d.window,"pagehide",function(){DH(c)})})}qa(AH,BE);
|
|
function CH(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function DH(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
|
|
function BH(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Ie();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function EH(a){I(function(b){if(!a.controls.He())return GE(a.g,!1),a.controls.Ie()?x(b,a.controls.zd(),0):b.B(0);if(!a.player||!a.player.Pc())return GE(a.g,!0),b.B(0);GE(a.g,!1);return a.controls.Ie()?x(b,a.controls.zd(),0):b.B(0)})}P("shaka.ui.PipButton",AH);
|
|
function FH(){}FH.prototype.create=function(a,b){return new AH(a,b)};xG("picture_in_picture",new FH);UF("picture_in_picture",new FH);NE("picture_in_picture",new FH);function GH(a,b){TG.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(){HH(c)});this.eventManager.o(this.localization,"locale-changed",function(){HH(c)});this.eventManager.o(this.player,"loaded",function(){IH(c,c.player.Ua())});this.eventManager.o(this.player,"ratechange",function(){IH(c,
|
|
c.player.Ua())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));HH(this);JH(this);IH(this,this.player.Ua())}qa(GH,TG);function HH(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")}
|
|
function IH(a,b){var c=DE(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(FE()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
"x")}function JH(a){for(var b=t(a.g.keys()),c=b.next(),d={};!c.done;d={Lg:void 0},c=b.next()){d.Lg=c.value;c=Hn();var e=V("span");e.textContent=d.Lg;c.appendChild(e);a.eventManager.o(c,"click",function(f){return function(){var g=a.g.get(f.Lg);g==a.video.defaultPlaybackRate?a.player.bd():a.player.Fc(g,!1)}}(d));a.menu.appendChild(c)}EE(a.menu)}P("shaka.ui.PlaybackRateSelection",GH);function TH(){}TH.prototype.create=function(a,b){return new GH(a,b)};xG("playback_rate",new TH);UF("playback_rate",new TH);function UH(a,b){BE.call(this,a,b);var c=this;this.g=Hn();this.g.classList.add("shaka-current-time");VH(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.xa().end)});this.eventManager.o(this.player,"loading",function(){GE(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Y,e=c.controls.lg(),f=c.player.xa(),g=f.end-f.start;isFinite(g)?c.player.T()?(e=Math.max(0,Math.floor(f.end-
|
|
e)),g=3600<=g,1<=e||d?(VH(c,"- "+HE(e,g)),c.g.disabled=!1):(VH(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=g,e=HE(Math.max(0,e-f.start),d),g&&(e+=" / "+HE(g,d)),VH(c,e),c.g.disabled=!0):(VH(c,c.localization.resolve("LIVE")),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.o(this.adManager,"ad-started",function(){GE(c.g,!c.ad.isLinear())});this.eventManager.o(this.adManager,
|
|
"ad-stopped",function(){GE(c.g,!0)})}qa(UH,BE);function VH(a,b){b!=a.g.textContent&&(a.g.textContent=b)}P("shaka.ui.PresentationTimeTracker",UH);function WH(){}WH.prototype.create=function(a,b){return new UH(a,b)};UF("time_and_duration",new WH);function XH(a,b){BE.call(this,a,b);var c=this;this.g=Hn();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=V("span");a.appendChild(this.j);this.i=V("span");this.i.classList.add("shaka-current-selection-span");
|
|
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);YH(this);this.eventManager.o(this.localization,"locale-updated",function(){YH(c)});this.eventManager.o(this.localization,"locale-changed",function(){YH(c)});var d=this.controls.A;this.eventManager.o(this.g,"click",function(){d.g?DF(d.g):Za("Not playing VR content")});this.eventManager.o(d,"vrstatuschanged",function(){GE(c.g,c.controls.Mb())});GE(this.g,this.controls.Mb())}qa(XH,BE);
|
|
function YH(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}P("shaka.ui.RecenterVRButton",XH);function ZH(){}ZH.prototype.create=function(a,b){return new XH(a,b)};xG("recenter_vr",new ZH);UF("recenter_vr",new ZH);function $H(a,b){BE.call(this,a,b);var c=this;this.j=!!pc();this.g=Hn();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=V("i");this.i.classList.add("material-icons-round");this.i.textContent=this.j?"airplay":"cast";this.g.appendChild(this.i);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.m=V("span");a.appendChild(this.m);this.l=V("span");this.l.classList.add("shaka-current-selection-span");
|
|
a.appendChild(this.l);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;aI(this);GE(this.g,!1);this.video.remote?(this.eventManager.o(this.localization,"locale-updated",function(){aI(c)}),this.eventManager.o(this.localization,"locale-changed",function(){aI(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){bI(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,"connect",function(){bI(c);cI(c)}),this.eventManager.o(this.video.remote,
|
|
"connecting",function(){bI(c);cI(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){bI(c);cI(c)}),this.eventManager.o(this.player,"loaded",function(){bI(c)}),bI(this,!0),cI(this)):this.g.classList.add("shaka-hidden")}qa($H,BE);$H.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});BE.prototype.release.call(this)};
|
|
function bI(a,b){b=void 0===b?!1:b;var c,d;I(function(e){switch(e.g){case 1:if(a.controls.G.Jf()&&a.controls.ra){GE(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);e.B(0);break}if("disconnected"==a.video.remote.state||b){c=function(f){if(a.player){var g=a.video.disableRemotePlayback,h=!0;pc()&&a.player.jd()==Ep&&"HLS"!=a.player.Ae()&&(h=!1);GE(a.g,h&&f&&!g)}else GE(a.g,!1)};ua(e,7);if(-1==a.h){e.B(9);break}return x(e,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){e.B(0);
|
|
break}return x(e,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;e.B(0);break;case 10:a.h=-1;case 9:wa(e,8);break;case 7:xa(e);case 8:return ua(e,11),x(e,a.video.remote.watchAvailability(c),13);case 13:d=e.h;a.h=d;wa(e,0);break;case 11:xa(e),c(!0),H(e)}})}function aI(a){var b=a.j?a.localization.resolve("AIRPLAY"):a.localization.resolve("CAST");a.g.ariaLabel=b;a.m.textContent=b}function cI(a){a.j||(a.i.textContent="disconnected"==a.video.remote.state?"cast":"cast_connected")}
|
|
P("shaka.ui.RemoteButton",$H);function dI(){}dI.prototype.create=function(a,b){return new $H(a,b)};xG("remote",new dI);UF("remote",new dI);function eI(a,b){TG.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(){fI(c)});this.eventManager.o(this.localization,"locale-changed",function(){fI(c)});this.eventManager.o(this.player,"loading",function(){gI(c)});this.eventManager.o(this.player,"variantchanged",function(){gI(c)});this.eventManager.o(this.player,
|
|
"trackschanged",function(){gI(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){gI(c)});gI(this)}qa(eI,TG);
|
|
function gI(a){var b=[];a.player.jd()!=Pp&&(b=a.player.Lb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount&&c.channelsCount&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=a.player.Pc()?b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==
|
|
k.bandwidth})==l}):1<[].concat(ha(new Set(b.map(function(k){return k.audioId})))).filter(Xf).length?b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l}):b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.bandwidth==k.bandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l});a.player.Pc()?b.sort(function(k,
|
|
l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height==k.height||null==k.height||null==l.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=CE(a.menu);In(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e=t(b),f=e.next(),g={};!f.done;g={Ec:void 0},f=e.next()){g.Ec=f.value;f=Hn();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(k){return function(){var l=k.Ec;a.player.configure({abr:{enabled:!1}});a.player.df(l,a.controls.g.clearBufferOnQualityChange)}}(g));
|
|
var h=V("span");h.textContent=!a.player.Pc()&&g.Ec.height&&g.Ec.width?hI(g.Ec,b):g.Ec.bandwidth?Math.round(g.Ec.bandwidth/1E3)+" kbits/s":"Unknown";f.appendChild(h);d||g.Ec!=c||(f.ariaSelected="true",f.appendChild(FE()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}e=Hn();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});gI(a)});a.g=V("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(FE()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);EE(a.menu);a.controls.dispatchEvent(new S("resolutionselectionupdated"));fI(a);GE(a.button,1<b.length)}
|
|
function hI(a,b){var c=a.height||0,d=a.width||0,e=c;d/c>16/9&&(e=Math.round(9*d/16));c=e+"p";2160==e&&(c="4K");e=new Set;d=t(b);for(var f=d.next();!f.done;f=d.next())f=f.value,f.frameRate&&e.add(Math.round(f.frameRate));1<e.size&&(e=a.frameRate)&&(50<=e||20>=e)&&(c+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)c+=" (HDR)";"CH-STEREO"==a.videoLayout&&(c+=" (3D)");b.some(function(g){return g!=a&&g.height==a.height})&&(c+=" ("+Math.round((a.videoBandwidth||a.bandwidth)/1E3)+" kbits/s)");return c}
|
|
function fI(a){var b=a.player.Pc()?"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"))}P("shaka.ui.ResolutionSelection",eI);function iI(){}
|
|
iI.prototype.create=function(a,b){return new eI(a,b)};xG("quality",new iI);UF("quality",new iI);function jI(a,b){BE.call(this,a,b);var c=this;this.g=Hn();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);kI(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){kI(c)});this.eventManager.o(this.localization,"locale-changed",function(){kI(c)});
|
|
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ua())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.Fc(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(jI,BE);function kI(a){a.g.ariaLabel=a.localization.resolve("REWIND")}P("shaka.ui.RewindButton",jI);function lI(){}lI.prototype.create=function(a,b){return new jI(a,b)};UF("rewind",new lI);function mI(a,b){BE.call(this,a,b);var c=this;this.g=Hn();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=V("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i);this.j=V("span");this.j.classList.add("shaka-current-selection-span");
|
|
a.appendChild(this.j);this.g.appendChild(a);nI(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){nI(c)});this.eventManager.o(this.localization,"locale-changed",function(){nI(c)});this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.m;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height);d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download=
|
|
"videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.A,"vrstatuschanged",function(){oI(c)});this.eventManager.o(this.adManager,"ad-started",function(){oI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){oI(c)});this.eventManager.o(this.player,"unloading",function(){oI(c)});this.eventManager.o(this.player,"loaded",function(){oI(c)});this.eventManager.o(this.player,"loaded",function(){oI(c)});this.eventManager.o(this.video,"play",function(){oI(c)});
|
|
this.eventManager.o(this.video,"pause",function(){oI(c)});this.eventManager.o(this.video,"seeking",function(){oI(c)});oI(this)}qa(mI,BE);function oI(a){var b=!0;a.controls.Mb()&&(b=!1);if(a.player.drmInfo()||a.player.Pc())b=!1;a.ad&&(b=!1);a.video.remote&&"disconnected"!=a.video.remote.state&&(b=!1);GE(a.g,b)}function nI(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}P("shaka.ui.SaveVideoFrameButton",mI);
|
|
function pI(){}pI.prototype.create=function(a,b){return new mI(a,b)};xG("save_video_frame",new pI);NE("save_video_frame",new pI);function qI(a,b){PE.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(qI,PE);qI.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
|
|
qI.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};P("shaka.ui.SmallPlayButton",qI);function rI(){}rI.prototype.create=function(a,b){return new qI(a,b)};UF("play_pause",new rI);function sI(a,b){BE.call(this,a,b);a=V("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}qa(sI,BE);P("shaka.ui.Spacer",sI);function tI(){}tI.prototype.create=function(a,b){return new sI(a,b)};UF("spacer",new tI);function uI(a,b){function c(m){m=parseInt(l.g[m],10);return 1E6<m?(m/1E6).toFixed(2)+"MB":1E3<m?(m/1E3).toFixed(2)+"KB":m+"B"}function d(m){return l.g[m]+" (gaps)"}function e(m){return HE(l.g[m],!1)+" (m)"}function f(m){return Math.round(l.g[m]/1E3)+" (kbits/s)"}function g(m){return l.g[m].toFixed(2)+" (s)"}function h(m){return l.g[m]+" (frames)"}function k(m){return l.g[m]+" (px)"}BE.call(this,a,b);var l=this;this.i=Hn();this.i.classList.add("shaka-statistics-button");this.j=V("i");this.j.classList.add("material-icons-round");
|
|
this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=V("label");a.classList.add("shaka-overflow-button-label");this.u=V("span");a.appendChild(this.u);this.m=V("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=V("div");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");this.h.classList.add("shaka-statistics-container");this.h.classList.add("shaka-hidden");
|
|
this.controls.h.appendChild(this.h);this.C=[];this.G=["stateHistory","switchHistory"];this.g=this.player.getStats();this.s={};this.A={width:k,height:k,completionPercent:function(m){return l.g[m]+" (%)"},bufferingTime:g,drmTimeSeconds:g,licenseTime:g,liveLatency:g,loadLatency:g,manifestTimeSeconds:g,estimatedBandwidth:f,streamBandwidth:f,maxSegmentDuration:e,pauseTime:e,playTime:e,corruptedFrames:h,decodedFrames:h,droppedFrames:h,stallsDetected:function(m){return l.g[m]+" (stalls)"},gapsJumped:d,manifestSizeBytes:c,
|
|
bytesDownloaded:c,nonFatalErrorCount:function(m){return l.g[m]+" (errors)"},manifestPeriodCount:function(m){return l.g[m]+" (periods)"},manifestGapCount:d};this.l=new Zb(function(){l.g=l.player.getStats();for(var m=t(l.C),n=m.next();!n.done;n=m.next()){n=n.value;var p=l.s[n];p.textContent=l.A[n](n);p&&p.parentElement&&GE(p.parentElement,!isNaN(l.g[n]))}});vI(this);wI(this);this.eventManager.o(this.localization,"locale-updated",function(){vI(l)});this.eventManager.o(this.localization,"locale-changed",
|
|
function(){vI(l)});this.eventManager.o(this.i,"click",function(){GE(l.parent,!1);l.h.classList.contains("shaka-hidden")?(l.j.textContent="insert_chart",l.l.Ba(.1),GE(l.h,!0)):(l.j.textContent="insert_chart_outlined",l.l.stop(),GE(l.h,!1));vI(l)})}qa(uI,BE);function vI(a){a.u.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}
|
|
function wI(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.G.includes(c)){var d=a,e=V("div"),f=V("label");f.textContent=c+":";e.appendChild(f);f=V("span");f.textContent=d.A[c](c);e.appendChild(f);d.s[c]=f;a.h.appendChild(e);a.C.push(c)}else Za("Unrecognized statistic element:",c)}uI.prototype.release=function(){this.l.stop();this.l=null;BE.prototype.release.call(this)};P("shaka.ui.StatisticsButton",uI);function xI(){}
|
|
xI.prototype.create=function(a,b){return new uI(a,b)};xG("statistics",new xI);NE("statistics",new xI);function yI(a,b){TG.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.Sc()?this.button.ariaPressed="true":this.button.ariaPressed="false";zI(this);this.eventManager.o(this.localization,"locale-updated",function(){AI(c);BI(c)});this.eventManager.o(this.localization,"locale-changed",function(){AI(c);BI(c)});this.eventManager.o(this.player,
|
|
"loading",function(){CI(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){DI(c);BI(c)});this.eventManager.o(this.player,"textchanged",function(){BI(c)});this.eventManager.o(this.player,"trackschanged",function(){CI(c)});DI(this);AI(this);BI(this);CI(this)}qa(yI,TG);function zI(a){var b=Hn();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(FE());a.g=V("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
function DI(a){a.player.Sc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new S("captionselectionupdated"))}
|
|
function BI(a){var b=a.player.uc();RG(b,a.menu,function(c){return EI(a,c)},a.player.Sc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=Hn();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.gf(!1);BI(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Sc()||(b.ariaSelected="true",b.appendChild(FE()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
a.button.setAttribute("shaka-status",a.currentSelection.textContent);EE(a.menu);a.controls.dispatchEvent(new S("captionselectionupdated"))}function EI(a,b){return I(function(c){a.player.Tg(b);return x(c,a.player.gf(!0),0)})}
|
|
function AI(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")}function CI(a){var b=0<a.player.uc().length;GE(a.button,b);BI(a)}P("shaka.ui.TextSelection",yI);function FI(){}FI.prototype.create=function(a,b){return new yI(a,b)};xG("captions",new FI);UF("captions",new FI);function GI(a,b){BE.call(this,a,b);var c=this;this.g=Hn();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=V("span");a.appendChild(this.j);this.i=V("span");this.i.classList.add("shaka-current-selection-span");
|
|
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);HI(this);this.eventManager.o(this.localization,"locale-updated",function(){HI(c)});this.eventManager.o(this.localization,"locale-changed",function(){HI(c)});var d=this.controls.A;this.eventManager.o(this.g,"click",function(){d.Bd()});this.eventManager.o(d,"vrstatuschanged",function(){GE(c.g,c.controls.Mb())});GE(this.g,this.controls.Mb())}qa(GI,BE);
|
|
function HI(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}P("shaka.ui.ToggleStereoscopicButton",GI);function II(){}II.prototype.create=function(a,b){return new GI(a,b)};xG("toggle_stereoscopic",new II);UF("toggle_stereoscopic",new II);function JI(a,b){WE.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return KI(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return LI(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return LI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return KI(c)});this.eventManager.o(this.localization,"locale-updated",function(){return MI(c)});
|
|
this.eventManager.o(this.localization,"locale-changed",function(){return MI(c)});KI(this);MI(this);if(this.ad)this.onChange()}qa(JI,WE);JI.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function KI(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);NI(a)}function LI(a){var b=a.ad.getVolume();a.setValue(100*b);NI(a)}
|
|
function NI(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function MI(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}P("shaka.ui.VolumeBar",JI);function OI(){}OI.prototype.create=function(a,b){return new JI(a,b)};UF("volume",new OI);}).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})();
|
|
|
|
//# sourceMappingURL=shaka-player.ui.map
|