shaka-player 4.8.8 → 4.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales.js +32 -32
- package/dist/shaka-player.compiled.debug.js +158 -158
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +298 -298
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +181 -180
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +542 -542
- package/dist/shaka-player.ui.map +2 -2
- package/lib/cea/cea608_data_channel.js +9 -0
- package/lib/cea/cea_decoder.js +6 -2
- package/lib/media/manifest_filterer.js +8 -12
- package/lib/media/preload_manager.js +3 -10
- package/lib/net/networking_engine.js +13 -0
- package/lib/player.js +6 -5
- package/lib/util/object_utils.js +1 -2
- package/package.json +1 -1
- package/ui/audio_language_selection.js +4 -0
- package/ui/resolution_selection.js +4 -0
- package/ui/text_selection.js +4 -0
package/dist/shaka-player.ui.js
CHANGED
|
@@ -15,18 +15,18 @@ ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
15
15
|
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function u(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function x(a){if(!(a instanceof Array)){a=u(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ha="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ia;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ia=Object.setPrototypeOf;else{var ja;a:{var ka={a:!0},la={};try{la.__proto__=ka;ja=la.a;break a}catch(a){}ja=!1}ia=ja?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ma=ia;
|
|
18
|
-
function na(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(ma)ma(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.Bl=b.prototype}function oa(){this.
|
|
18
|
+
function na(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(ma)ma(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.Bl=b.prototype}function oa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function pa(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}oa.prototype.u=function(a){this.h=a};
|
|
19
19
|
function qa(a,b){a.i={lh:b,xh:!0};a.g=a.m||a.j}oa.prototype.return=function(a){this.i={return:a};this.g=this.j};function D(a,b,c){a.g=c;return{value:b}}oa.prototype.B=function(a){this.g=a};function F(a){a.g=0}function ra(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a,b){a.m=0;a.j=b||0}function ta(a,b,c){a.g=b;a.m=c||0}function ua(a,b){a.m=b||0;b=a.i.lh;a.i=null;return b}function va(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function wa(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.xh?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function xa(a){this.g=new oa;this.h=a}function ya(a,b){pa(a.g);var c=a.g.l;if(c)return za(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ba(a)}
|
|
21
|
-
function za(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.
|
|
21
|
+
function za(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,qa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}function Ba(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,qa(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.xh)throw b.lh;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Ca(a){this.next=function(b){pa(a.g);a.g.l?b=za(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Ba(a));return b};this.throw=function(b){pa(a.g);a.g.l?b=za(a,a.g.l["throw"],b,a.g.u):(qa(a.g,b),b=Ba(a));return b};this.return=function(b){return ya(a,b)};this[Symbol.iterator]=function(){return this}}function Ea(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
23
23
|
function L(a){return Ea(new Ca(new xa(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
|
-
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.
|
|
24
|
+
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=
|
|
25
25
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.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)}};
|
|
26
26
|
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.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
|
|
27
|
-
function(){if(this.
|
|
27
|
+
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;
|
|
28
28
|
b.prototype.J=function(g){var h=this.j();g.oe(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(r,p){return"function"==typeof r?function(t){try{l(r(t))}catch(w){m(w)}}:p}var l,m,n=new b(function(r,p){l=r;m=p});this.oe(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.oe=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
29
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.
|
|
29
|
+
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=u(g),m=l.next();!m.done;m=l.next())d(m.value).oe(h,k)})};b.all=function(g){var h=u(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(t){return function(w){r[t]=w;p--;0==p&&l(r)}}var r=[],p=0;do r.push(void 0),p++,d(k.value).oe(n(r.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
31
31
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=u(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(!Ga(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ga(k,
|
|
@@ -121,8 +121,8 @@ q.Da=function(a,b,c){a=Oc(a);void 0===c&&(c=Zc);var d=this.h.get(a)||new Map;b.f
|
|
|
121
121
|
q.Ki=function(){return this.g};
|
|
122
122
|
function Yc(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=u(d),h=g.next();!h.done;f={Oc:f.Oc},h=g.next()){f.Oc=h.value;e.add(f.Oc);e.add(Tc(f.Oc));h=gb(b.keys(),function(l){return function(m){return Sc(m,l.Oc)}}(f));h.sort();var k=u(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=gb(b.keys(),function(l){return function(m){return Tc(m)==l.Oc}}(f));h.sort();k=u(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=u(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
123
123
|
c.reverse();a.i.clear();b=u(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=u(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,ad(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new Q("missing-localizations",d)))}function ad(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}N("shaka.ui.Localization",Xc);Xc.prototype.getCurrentLocales=Xc.prototype.Ki;
|
|
124
|
-
Xc.prototype.resolve=Xc.prototype.resolve;Xc.prototype.resolveDictionary=Xc.prototype.Sj;Xc.prototype.insert=Xc.prototype.Da;Xc.prototype.changeLocale=Xc.prototype.dh;Xc.prototype.release=Xc.prototype.release;var Zc=1;Xc.ConflictResolution={USE_OLD:0,USE_NEW:Zc};Xc.UNKNOWN_LOCALES="unknown-locales";Xc.UNKNOWN_LOCALIZATION="unknown-localization";Xc.MISSING_LOCALIZATIONS="missing-localizations";Xc.LOCALE_CHANGED="locale-changed";Xc.LOCALE_UPDATED="locale-updated";function bd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}bd.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 cd(a){return a.h/(1-Math.pow(a.g,a.i))};function dd(){this.h=new bd(2);this.j=new bd(5);this.g=0;this.i=128E3;this.l=16E3}dd.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)};dd.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)}};dd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(cd(this.h),cd(this.j))};function ed(){this.g=new $a}q=ed.prototype;q.release=function(){this.mb();this.g=null};q.
|
|
125
|
-
q.mb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=u(b);for(b=a.next();!b.done;b=a.next())b.value.Ya();this.g.g={}}};N("shaka.util.EventManager",ed);ed.prototype.removeAll=ed.prototype.mb;ed.prototype.unlisten=ed.prototype.Ya;ed.prototype.listenOnce=ed.prototype.na;ed.prototype.listen=ed.prototype.
|
|
124
|
+
Xc.prototype.resolve=Xc.prototype.resolve;Xc.prototype.resolveDictionary=Xc.prototype.Sj;Xc.prototype.insert=Xc.prototype.Da;Xc.prototype.changeLocale=Xc.prototype.dh;Xc.prototype.release=Xc.prototype.release;var Zc=1;Xc.ConflictResolution={USE_OLD:0,USE_NEW:Zc};Xc.UNKNOWN_LOCALES="unknown-locales";Xc.UNKNOWN_LOCALIZATION="unknown-localization";Xc.MISSING_LOCALIZATIONS="missing-localizations";Xc.LOCALE_CHANGED="locale-changed";Xc.LOCALE_UPDATED="locale-updated";function bd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}bd.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 cd(a){return a.h/(1-Math.pow(a.g,a.i))};function dd(){this.h=new bd(2);this.j=new bd(5);this.g=0;this.i=128E3;this.l=16E3}dd.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)};dd.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)}};dd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(cd(this.h),cd(this.j))};function ed(){this.g=new $a}q=ed.prototype;q.release=function(){this.mb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new fd(a,b,c,d),this.g.push(b,a))};q.na=function(a,b,c,d){function e(g){f.Ya(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.Ya=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ya(),this.g.remove(b,e))}};
|
|
125
|
+
q.mb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=u(b);for(b=a.next();!b.done;b=a.next())b.value.Ya();this.g.g={}}};N("shaka.util.EventManager",ed);ed.prototype.removeAll=ed.prototype.mb;ed.prototype.unlisten=ed.prototype.Ya;ed.prototype.listenOnce=ed.prototype.na;ed.prototype.listen=ed.prototype.o;ed.prototype.release=ed.prototype.release;function fd(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gd(a,d);this.target.addEventListener(b,c,this.g)}
|
|
126
126
|
fd.prototype.Ya=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gd(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 hd(a)?b:b.capture||!1}
|
|
127
127
|
function hd(a){var b=id;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}id=b}return b||!1}var id=void 0;function jd(a){if(kd.has(a))return kd.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);kd.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),kd.set(a,b),b):!1}function ld(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var kd=new Map;function md(a,b){this.g=a;this.h=b}md.prototype.toString=function(){return"v"+this.g+"."+this.h};function nd(a,b){var c=new md(5,0),d=od,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function pd(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function qd(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var od=null;function rd(){}rd.prototype.extract=function(){};rd.prototype.decode=function(){return[]};rd.prototype.clear=function(){};rd.prototype.getStreams=function(){return[]};function sd(){}sd.prototype.init=function(){};sd.prototype.parse=function(){return[]};function td(){}td.prototype.init=function(){};td.prototype.i=function(){};td.prototype.g=function(){};td.prototype.j=function(){};N("shaka.media.IClosedCaptionParser",td);function ud(a){this.l=new sd;if(a=vd[a.toLowerCase()])this.l=a();this.h=new rd;if(a=wd)this.h=a()}ud.prototype.init=function(a,b){void 0!==b&&b||(this.g(),this.l.init(a))};ud.prototype.i=function(a){a=this.l.parse(a);a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Fb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
128
128
|
ud.prototype.g=function(){this.h.clear()};ud.prototype.j=function(){return this.h.getStreams()};N("shaka.media.ClosedCaptionParser",ud);ud.findDecoder=function(){return wd};ud.unregisterDecoder=function(){wd=null};ud.registerDecoder=function(a){wd=a};ud.findParser=function(a){return vd[a]};ud.unregisterParser=function(a){delete vd[a]};ud.registerParser=function(a,b){vd[a]=b};var vd={},wd=null;function xd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Ad(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Bd(a,b,c){c||(c=xd);if(a.length!=b.length)return!1;b=b.slice();var d={};a=u(a);for(var e=a.next();!e.done;d={lf:d.lf},e=a.next()){d.lf=e.value;e=b.findIndex(function(f){return function(g){return c(f.lf,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
@@ -137,12 +137,12 @@ function oe(a,b,c){var d=[b];pe.forEach(function(e,f){var g=a[f];"codecs"==f?le.
|
|
|
137
137
|
function ve(a){var b=we(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"===
|
|
138
138
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function xe(a){var b=[];a=u(a.split(","));for(var c=a.next();!c.done;c=a.next())c=we(c.value),b.push(c[0]);return b.sort().join(",")}function ye(a){return a.split(";")[0]}
|
|
139
139
|
function Ae(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Be(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function we(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}N("shaka.util.MimeUtils",je);je.getFullTypeWithAllCodecs=me;je.getFullType=ke;
|
|
140
|
-
var pe=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),le=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Ce(a){this.i=null;this.j=a;this.F=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.
|
|
140
|
+
var pe=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),le=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Ce(a){this.i=null;this.j=a;this.F=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.s=new Map}function De(a){return Ee[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!wd:!1}Ce.prototype.destroy=function(){this.j=this.i=null;this.s.clear();return Promise.resolve()};
|
|
141
141
|
function Fe(a,b,c,d,e){var f,g,h,k,l,m,n;return L(function(r){if(1==r.g)return D(r,Promise.resolve(),2);if(!a.i||!a.j)return r.return();if(null==c||null==d)return a.i.parseInit(Fb(b)),r.return();f=a.F?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Fb(b),g,e);k=u(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(p){return p.startTime>=a.l&&p.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);F(r)})}
|
|
142
|
-
Ce.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)return D(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));F(d)})};function Ge(a,b,c){a.l=b;a.m=c}function He(a,b,c){a.G=b;if(b=a.
|
|
142
|
+
Ce.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)return D(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));F(d)})};function Ge(a,b,c){a.l=b;a.m=c}function He(a,b,c){a.G=b;if(b=a.s.get(b))for(var d=u(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)}
|
|
143
143
|
function Ie(a,b,c){b.startTime+=c;b.endTime+=c;b=u(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ie(a,d.value,c)}
|
|
144
|
-
function Je(a,b,c,d,e){var f=c+" "+d,g=new Map;b=u(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,[]);Ie(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=u(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.
|
|
145
|
-
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",Ce);Ce.prototype.destroy=Ce.prototype.destroy;Ce.findParser=function(a){return Ee[a]};Ce.unregisterParser=function(a){delete Ee[a]};Ce.registerParser=function(a,b){Ee[a]=b};var Ee={};function Ke(a,b){return a.concat(b)}function Le(){}function Me(a){return null!=a};function Ne(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer
|
|
144
|
+
function Je(a,b,c,d,e){var f=c+" "+d,g=new Map;b=u(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,[]);Ie(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=u(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=u(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,
|
|
145
|
+
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",Ce);Ce.prototype.destroy=Ce.prototype.destroy;Ce.findParser=function(a){return Ee[a]};Ce.unregisterParser=function(a){delete Ee[a]};Ce.registerParser=function(a,b){Ee[a]=b};var Ee={};function Ke(a,b){return a.concat(b)}function Le(){}function Me(a){return null!=a};function Ne(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer instanceof ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Oe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Pe(){}
|
|
146
146
|
function Qe(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Re(e,b,c);if(d.length){b=new $a;c=u(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(t,w){t=0;var y=[],z={};w=u(w);for(var v=w.next();!v.done;z={zd:z.zd},v=w.next())z.zd=v.value,v=d.filter(function(B){return function(A){return B.zd.decodingInfos[0][A]}}(z)).length,v>t?(t=v,y=[z.zd]):v==t&&y.push(z.zd);f.push.apply(f,x(y))});e=f}c=new Set;b=new Set;var g=u(e);for(e=g.next();!e.done;e=
|
|
147
147
|
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(t,w){return t.bandwidth-w.bandwidth});var h=[];e=new Map;c=u(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=ve(m.codecs),r=ve(g.codecs);n==r&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(t,
|
|
148
148
|
w){return t.bandwidth&&w.bandwidth?t.bandwidth-w.bandwidth:t.width-w.width});b=ld();var p=[];e=new Map;c=u(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=ve(m.codecs),r=ve(g.codecs),n!==r))continue;g.width>m.width||g.height>m.height?(l.push(g),p.push(g.id)):g.width==m.width&&g.height==m.height&&(n=ve(m.codecs),r=ve(g.codecs),n==r&&g.bandwidth>m.bandwidth&&(l.push(g),p.push(g.id)))}else l.push(g),
|
|
@@ -180,121 +180,121 @@ function sf(a){var b=a.language;return{id:pf(a),active:!1,type:"",bandwidth:0,la
|
|
|
180
180
|
originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function uf(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function vf(a){return a.filter(function(b){return uf(b)})}
|
|
181
181
|
function wf(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=Wc(Oc(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Oc(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=xf(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(Ke,[]);return a.length?
|
|
182
182
|
xf(e,a[0]):e}function xf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function af(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"}N("shaka.util.StreamUtils",Pe);Pe.meetsRestrictions=Te;
|
|
183
|
-
var ff={},qf=0,jf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),kf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function yf(){var a=this;this.u=null;this.l=!1;this.i=new dd;this.H=new ed;navigator.connection&&navigator.connection.addEventListener&&this.H.
|
|
184
|
-
b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}q=yf.prototype;q.stop=function(){this.u=null;this.l=!1;this.
|
|
185
|
-
q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.m.clientHeight*d);c=Math.min(c,this.m.clientWidth*d)}var e=this.
|
|
186
|
-
this.
|
|
183
|
+
var ff={},qf=0,jf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),kf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function yf(){var a=this;this.u=null;this.l=!1;this.i=new dd;this.H=new ed;navigator.connection&&navigator.connection.addEventListener&&this.H.o(navigator.connection,"change",function(){if(a.l&&a.g.useNetworkInformation){a.i=new dd;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.s=[];this.F=1;this.I=!1;this.h=this.m=this.g=this.A=null;this.G=new Ob(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
184
|
+
b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}q=yf.prototype;q.stop=function(){this.u=null;this.l=!1;this.s=[];this.F=1;this.m=this.A=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop();this.j=null};q.release=function(){this.H.release();this.G=null};q.init=function(a){this.u=a};
|
|
185
|
+
q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.m.clientHeight*d);c=Math.min(c,this.m.clientWidth*d)}var e=this.s.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
|
|
186
|
+
this.s);d=e;a&&e.length!=this.s.length&&(d=this.s.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=zf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Ef(a);a=u(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=zf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=zf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
187
187
|
a[d];for(var f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.A=Date.now();return c};q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};q.segmentDownloaded=function(a,b,c){this.i.sample(a,b);c&&null!=this.A&&this.l&&Ff(this)};
|
|
188
|
-
q.trySuggestStreams=function(){null!=this.A&&this.l&&Ff(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};q.setVariants=function(a){this.
|
|
188
|
+
q.trySuggestStreams=function(){null!=this.A&&this.l&&Ff(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};q.setVariants=function(a){this.s=a};q.playbackRateChanged=function(a){this.F=a};
|
|
189
189
|
q.setMediaElement=function(a){var b=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.V(Gf)}),this.h.observe(this.m))};q.setCmsdManager=function(a){this.j=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
190
190
|
function Ff(a){if(!a.I){var b=a.i;if(!(b.g>=b.i))return;a.I=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function zf(a,b,c,d,e){if(a.j){var f=a.j.qh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Te(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
191
191
|
function Ef(a){var b=[];a=u(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})}N("shaka.abr.SimpleAbrManager",yf);yf.prototype.configure=yf.prototype.configure;yf.prototype.setCmsdManager=yf.prototype.setCmsdManager;yf.prototype.setMediaElement=yf.prototype.setMediaElement;yf.prototype.playbackRateChanged=yf.prototype.playbackRateChanged;yf.prototype.setVariants=yf.prototype.setVariants;
|
|
192
192
|
yf.prototype.getBandwidthEstimate=yf.prototype.getBandwidthEstimate;yf.prototype.trySuggestStreams=yf.prototype.trySuggestStreams;yf.prototype.segmentDownloaded=yf.prototype.segmentDownloaded;yf.prototype.disable=yf.prototype.disable;yf.prototype.enable=yf.prototype.enable;yf.prototype.chooseVariant=yf.prototype.chooseVariant;yf.prototype.init=yf.prototype.init;yf.prototype.release=yf.prototype.release;yf.prototype.stop=yf.prototype.stop;var Gf=1;N("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});N("shaka.config.CodecSwitchingStrategy",{Uk:"reload",gi:"smooth"});function Hf(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=u(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Hf.prototype.add=function(a,b,c){return If(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
193
193
|
function If(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!Jf(e,f)||!Kf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Jf(a,b))&&Kf(a.roles,b.roles)));return d?!1:!0}Hf.prototype.values=function(){return this.g.values()};
|
|
194
194
|
function Jf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return xe(d)});b=b.codecs.split(",").map(function(d){return xe(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 Kf(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=u(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Lf(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Qf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Lf.prototype.create=function(a){var b=this,c="smooth"==this.h&&ld(),d=a.filter(function(e){return If(b.i,e,!c,b.g)});return d.length?new Hf(d[0],d,!c,this.g):this.j.create(a)};
|
|
195
|
-
function Qf(a,b,c,d,e,f,g,h,k,l){this.u=a;this.A=b;this.h=c;this.i=d;this.F=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.
|
|
196
|
-
Qf.prototype.create=function(a){var b=[];b=Rf(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Sf(b,this.A);a.length&&(b=a);this.l&&(a=Tf(b,this.l),a.length&&(b=a));this.i&&(a=Uf(b,this.i),a.length&&(b=a));this.h&&(a=Vf(b,this.h),a.length&&(b=a));this.g&&(a=Wf(b,this.g),a.length&&(b=a));this.j&&(a=Xf(b,this.j),a.length&&(b=a));a=Yf(b,this.F);a.length&&(b=a);return new Hf(b[0],b,!("smooth"==this.m&&ld()),this.
|
|
195
|
+
function Qf(a,b,c,d,e,f,g,h,k,l){this.u=a;this.A=b;this.h=c;this.i=d;this.F=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.s=void 0===l?!1:l}
|
|
196
|
+
Qf.prototype.create=function(a){var b=[];b=Rf(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Sf(b,this.A);a.length&&(b=a);this.l&&(a=Tf(b,this.l),a.length&&(b=a));this.i&&(a=Uf(b,this.i),a.length&&(b=a));this.h&&(a=Vf(b,this.h),a.length&&(b=a));this.g&&(a=Wf(b,this.g),a.length&&(b=a));this.j&&(a=Xf(b,this.j),a.length&&(b=a));a=Yf(b,this.F);a.length&&(b=a);return new Hf(b[0],b,!("smooth"==this.m&&ld()),this.s)};
|
|
197
197
|
function Rf(a,b){b=Oc(b);var c=Wc(b,a.map(function(d){return Vc(d)}));return c?a.filter(function(d){return c==Vc(d)}):[]}function Sf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Wf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Xf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
198
|
-
function Vf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Uf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Tf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Yf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Zf(){this.g=$f;this.i=(new Map).set($f,2).set(ag,1);this.h=0}function bg(a,b,c){a.i.set($f,c).set(ag,b)}var ag=0,$f=1;function cg(a,b){var c=dg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.
|
|
199
|
-
function eg(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new R(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.
|
|
198
|
+
function Vf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Uf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Tf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Yf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Zf(){this.g=$f;this.i=(new Map).set($f,2).set(ag,1);this.h=0}function bg(a,b,c){a.i.set($f,c).set(ag,b)}var ag=0,$f=1;function cg(a,b){var c=dg();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}
|
|
199
|
+
function eg(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new R(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 D(d,new Promise(function(e){(new Ob(e)).V(c/1E3)}),2)}a.h*=a.m;F(d)})}function dg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function fg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}fg.prototype.resolve=function(){};fg.prototype.reject=function(){};function gg(a,b){this.promise=a;this.i=b;this.g=!1}function hg(a){return new gg(Promise.reject(a),function(){return Promise.resolve()})}function ig(){var a=Promise.reject(new R(2,7,7001));a.catch(function(){});return new gg(a,function(){return Promise.resolve()})}function jg(a){return new gg(Promise.resolve(a),function(){return Promise.resolve()})}function kg(a){return new gg(a,function(){return a.catch(function(){})})}gg.prototype.abort=function(){this.g=!0;return this.i()};
|
|
200
200
|
function lg(a){return new gg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}gg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
201
201
|
gg.prototype.Ma=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=mg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new fg,g=new R(2,7,7001);this.promise.then(c(!0),c(!1));return new gg(f,function(){return d()})};
|
|
202
|
-
function mg(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()}}}N("shaka.util.AbortableOperation",gg);gg.prototype.chain=gg.prototype.Ma;gg.prototype["finally"]=gg.prototype.finally;gg.all=lg;gg.prototype.abort=gg.prototype.abort;gg.notAbortable=kg;gg.completed=jg;gg.aborted=ig;gg.failed=hg;function ng(){this.g=[]}function og(a,b){a.g.push(b.finally(function(){Ad(a.g,b)}))}ng.prototype.destroy=function(){for(var a=[],b=u(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 pg(a,b,c,d,e,f){bb.call(this);this.i=!1;this.m=new ng;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.u=c||null;this.A=d||null;this.G=e||null;this.F=f||null;this.
|
|
203
|
-
q.ti=function(){this.h.clear()};function
|
|
204
|
-
q.request=function(a,b,c){var d=this,e=new
|
|
205
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Ma(function(r){var p=Date.now()-m,t=r.response;t.timeMs+=l;t.timeMs+=p;r.kj||!d.l||t.fromCache||"HEAD"==b.method||a!=
|
|
206
|
-
function
|
|
207
|
-
function
|
|
208
|
-
t&&t.V(C/1E3);a.l&&b==
|
|
209
|
-
function(v){p&&p.stop();t&&t.stop();if(a.u){var B=null,A=0;v instanceof R&&(B=v,1001==v.code&&(A=v.data[1]));a.u(c,B,A,w)}if(a.i)return ig();w&&(v=new R(1,1,1003,c.uris[f],b));if(v instanceof R){if(7001==v.code)throw v;if(1010==v.code)throw g;if(1==v.severity)return B=(new Map).set("error",v),B=new Q("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,
|
|
210
|
-
function
|
|
211
|
-
pg.prototype.request=pg.prototype.request;pg.prototype.destroy=pg.prototype.destroy;pg.makeRequest=
|
|
212
|
-
pg.registerScheme=qg;pg.prototype.setForceHTTPS=pg.prototype.Fg;function
|
|
213
|
-
q.Hh=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw
|
|
214
|
-
q.skip=function(a){if(this.g+a>this.h.byteLength)throw
|
|
215
|
-
|
|
216
|
-
q.cd=function(a,b,c,d){var e=b.Na();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.R(),g=b.R(),h=
|
|
217
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Na(),b.getLength()-b.Na()))}};function
|
|
218
|
-
function
|
|
219
|
-
function
|
|
220
|
-
function
|
|
202
|
+
function mg(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()}}}N("shaka.util.AbortableOperation",gg);gg.prototype.chain=gg.prototype.Ma;gg.prototype["finally"]=gg.prototype.finally;gg.all=lg;gg.prototype.abort=gg.prototype.abort;gg.notAbortable=kg;gg.completed=jg;gg.aborted=ig;gg.failed=hg;function ng(){this.g=[]}function og(a,b){a.g.push(b.finally(function(){Ad(a.g,b)}))}ng.prototype.destroy=function(){for(var a=[],b=u(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 pg(a,b,c,d,e,f){bb.call(this);this.i=!1;this.m=new ng;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.u=c||null;this.A=d||null;this.G=e||null;this.F=f||null;this.s=!1}na(pg,bb);q=pg.prototype;q.Fg=function(a){this.s=a};function qg(a,b,c,d){c=c||rg;var e=sg[a];if(!e||c>=e.priority)sg[a]={priority:c,Re:b,Hj:void 0===d?!1:d}}function tg(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=u(a.h);for(d=a.next();!d.done;d=a.next())b.h.add(d.value)}q.Kj=function(a){this.g.add(a)};
|
|
203
|
+
q.jk=function(a){this.g.delete(a)};q.si=function(){this.g.clear()};q.Lj=function(a){this.h.add(a)};q.kk=function(a){this.h.delete(a)};q.ti=function(){this.h.clear()};function ug(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();bb.prototype.release.call(this);return this.m.destroy()};
|
|
204
|
+
q.request=function(a,b,c){var d=this,e=new vg;if(this.i){var f=Promise.reject(new R(2,7,7001));f.catch(function(){});return new wg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ne(b.retryParameters):dg();b.uris=Ne(b.uris);f=xg(this,a,b,c);var g=f.Ma(function(){return yg(d,a,b,c,new cg(b.retryParameters,!1),0,null,e)}),h=g.Ma(function(r){return zg(d,a,r,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
205
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Ma(function(r){var p=Date.now()-m,t=r.response;t.timeMs+=l;t.timeMs+=p;r.kj||!d.l||t.fromCache||"HEAD"==b.method||a!=Ag||d.l(t.timeMs,t.data.byteLength,Bg(c));d.F&&d.F(a,t,c);return t},function(r){r&&(r.severity=2);throw r;});f=new wg(n.promise,function(){return n.abort()},e);og(this.m,f);return f};
|
|
206
|
+
function xg(a,b,c,d){function e(h){f=f.Ma(function(){c.body&&(c.body=Gb(c.body));return h(b,c,d)})}var f=jg(void 0);a.A&&e(a.A);a=u(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Ma(void 0,function(h){if(h instanceof R&&7001==h.code)throw h;throw new R(2,1,1006,h);})}
|
|
207
|
+
function yg(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new ib(c.uris[f]),l=k.Fb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),jb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=sg[l])?l.Re:null;if(!n)return hg(new R(2,1,1E3,k));var r=l.Hj,p=null,t=null,w=!1,y=!1,z;return kg(eg(e)).Ma(function(){if(a.i)return ig();z=Date.now();var v=0;c.requestStartTime=Date.now();var B=n(c.uris[f],c,b,function(E,J,I){p&&p.stop();
|
|
208
|
+
t&&t.V(C/1E3);a.l&&b==Ag&&(v++,c.packetNumber=v,a.l(E,J,Bg(d),c),m=!0,h.g=I)},function(E){a.j&&a.j(E,c,b);y=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!r)return B;var A=c.retryParameters.connectionTimeout;A&&(p=new Ob(function(){w=!0;B.abort()}),p.V(A/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new Ob(function(){w=!0;B.abort()}));return B}).Ma(function(v){p&&p.stop();t&&t.stop();void 0==v.timeMs&&(v.timeMs=Date.now()-z);var B={response:v,kj:m};!y&&a.j&&a.j(v.headers,c,b);return B},
|
|
209
|
+
function(v){p&&p.stop();t&&t.stop();if(a.u){var B=null,A=0;v instanceof R&&(B=v,1001==v.code&&(A=v.data[1]));a.u(c,B,A,w)}if(a.i)return ig();w&&(v=new R(1,1,1003,c.uris[f],b));if(v instanceof R){if(7001==v.code)throw v;if(1010==v.code)throw g;if(1==v.severity)return B=(new Map).set("error",v),B=new Q("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,yg(a,b,c,d,e,f,v,h)}throw v;})}
|
|
210
|
+
function zg(a,b,c,d){var e=jg(void 0),f={};a=u(a.h);for(var g=a.next();!g.done;f={qf:f.qf},g=a.next())f.qf=g.value,e=e.Ma(function(h){return function(){var k=c.response;k.data&&(k.data=Gb(k.data));return h.qf(b,k,d)}}(f));return e.Ma(function(){return c},function(h){var k=2;if(h instanceof R){if(7001==h.code)throw h;k=h.severity}throw new R(k,1,1007,h);})}function Bg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Ud)return!1}return!0}N("shaka.net.NetworkingEngine",pg);
|
|
211
|
+
pg.prototype.request=pg.prototype.request;pg.prototype.destroy=pg.prototype.destroy;pg.makeRequest=ug;pg.defaultRetryParameters=function(){return dg()};pg.prototype.clearAllResponseFilters=pg.prototype.ti;pg.prototype.unregisterResponseFilter=pg.prototype.kk;pg.prototype.registerResponseFilter=pg.prototype.Lj;pg.prototype.clearAllRequestFilters=pg.prototype.si;pg.prototype.unregisterRequestFilter=pg.prototype.jk;pg.prototype.registerRequestFilter=pg.prototype.Kj;pg.unregisterScheme=function(a){delete sg[a]};
|
|
212
|
+
pg.registerScheme=qg;pg.prototype.setForceHTTPS=pg.prototype.Fg;function vg(){this.g=0}pg.NumBytesRemainingClass=vg;function wg(a,b,c){gg.call(this,a,b);this.h=c}na(wg,gg);pg.PendingRequest=wg;var Ag=1;pg.RequestType={MANIFEST:0,SEGMENT:Ag,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};pg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var rg=3;pg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:rg};var sg={};function Cg(a){this.g=!1;this.h=new fg;this.i=a}Cg.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 Dg(a,b){if(a.g){if(b instanceof R&&7003==b.code)throw b;throw new R(2,7,7003,b);}};function Eg(a){for(var b=new Map,c=u(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Fg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Gg(a,b){this.h=Kb(a);this.i=b==Hg;this.g=0}q=Gg.prototype;q.Aa=function(){return this.g<this.h.byteLength};q.Na=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.W=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ig();}};q.Ha=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ig();}};q.R=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};
|
|
213
|
+
q.Hh=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};q.ed=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ig();}if(2097151<b)throw new R(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Pb=function(a){if(this.g+a>this.h.byteLength)throw Ig();var b=Fb(this.h,this.g,a);this.g+=a;return b};
|
|
214
|
+
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};q.Tj=function(a){if(this.g<a)throw Ig();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Ig();this.g=a};q.Ec=function(){for(var a=this.g;this.Aa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Fb(this.h,a,this.g-a);this.g+=1;return nc(a)};function Ig(){return new R(2,3,3E3)}N("shaka.util.DataViewReader",Gg);Gg.prototype.readTerminatedString=Gg.prototype.Ec;Gg.prototype.seek=Gg.prototype.seek;Gg.prototype.rewind=Gg.prototype.Tj;
|
|
215
|
+
Gg.prototype.skip=Gg.prototype.skip;Gg.prototype.readBytes=Gg.prototype.Pb;Gg.prototype.readUint64=Gg.prototype.ed;Gg.prototype.readInt32=Gg.prototype.Hh;Gg.prototype.readUint32=Gg.prototype.R;Gg.prototype.readUint16=Gg.prototype.Ha;Gg.prototype.readUint8=Gg.prototype.W;Gg.prototype.getLength=Gg.prototype.getLength;Gg.prototype.getPosition=Gg.prototype.Na;Gg.prototype.hasMoreData=Gg.prototype.Aa;var Hg=1;Gg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hg};function Jg(){this.i=[];this.h=[];this.g=!1}q=Jg.prototype;q.box=function(a,b){a=Kg(a);this.i[a]=Lg;this.h[a]=b;return this};q.T=function(a,b){a=Kg(a);this.i[a]=Mg;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Gg(a,0);for(this.g=!1;a.Aa()&&!this.g;)this.cd(0,a,b,c)};
|
|
216
|
+
q.cd=function(a,b,c,d){var e=b.Na();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.R(),g=b.R(),h=Ng(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Na()+8>b.getLength()){this.g=!0;return}f=b.ed();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Mg){if(d&&b.Na()+4>b.getLength()){this.g=!0;return}n=b.R();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.Na(),b=0<d?b.Pb(d):new Uint8Array(0),b=new Gg(b,0),l({name:h,parser:this,
|
|
217
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Na(),b.getLength()-b.Na()))}};function Og(a){for(var b=Pg(a);a.reader.Aa()&&!a.parser.g;)a.parser.cd(a.start+b,a.reader,a.partialOkay)}function Qg(a){for(var b=Pg(a),c=a.reader.R(),d=0;d<c&&(a.parser.cd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Rg(a){var b=Pg(a);for(a.reader.skip(78);a.reader.Aa()&&!a.parser.g;)a.parser.cd(a.start+b,a.reader,a.partialOkay)}
|
|
218
|
+
function Sg(a){var b=Pg(a);a.reader.skip(8);var c=a.reader.Ha();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Aa()&&!a.parser.g;)a.parser.cd(a.start+b,a.reader,a.partialOkay)}function Tg(a){return function(b){a(b.reader.Pb(b.reader.getLength()-b.reader.Na()))}}function Kg(a){var b=0;a=u(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Ng(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
219
|
+
function Pg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",Jg);Jg.headerSize=Pg;Jg.typeToString=Ng;Jg.allData=Tg;Jg.audioSampleEntry=Sg;Jg.visualSampleEntry=Rg;Jg.sampleDescription=Qg;Jg.children=Og;Jg.prototype.parseNext=Jg.prototype.cd;Jg.prototype.parse=Jg.prototype.parse;Jg.prototype.stop=Jg.prototype.stop;Jg.prototype.fullBox=Jg.prototype.T;Jg.prototype.box=Jg.prototype.box;var Lg=0,Mg=1;function Ug(a){var b=this;this.g=[];this.h=[];this.data=[];(new Jg).box("moov",Og).box("moof",Og).T("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Ac(c.reader.Pb(16)));if(0<c.version){d=c.reader.R();for(var e=0;e<d;e++){var f=Ac(c.reader.Pb(16));b.h.push(f)}}}}).parse(a)}
|
|
220
|
+
function Vg(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=Kb(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=u(c),c=b.next();!c.done;c=b.next())c=zc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
221
221
|
@license
|
|
222
222
|
tXml
|
|
223
223
|
Copyright 2015 Tobias Nickel
|
|
224
224
|
SPDX-License-Identifier: MIT
|
|
225
225
|
*/
|
|
226
|
-
function
|
|
227
|
-
function
|
|
226
|
+
function Wg(a,b){a=qc(a);return Xg(a,b)}function Xg(a,b){a=Yg(a);return!b&&a.length?a[0]:(a=a.find(function(c){return c.tagName===b}))?a:null}function Zg(a){return $g.has(a)?$g.get(a):""}
|
|
227
|
+
function Yg(a){function b(e,f){f=void 0===f?!1:f;for(var g=[];a[d];)if(60==a.charCodeAt(d)){if(47===a.charCodeAt(d+1)){f=d+2;d=a.indexOf(">",d);f=a.substring(f,d);var h=f.indexOf(e);if(-1==h){var k=e.indexOf(".");0<k&&(h=f.indexOf(e.substring(0,k)))}if(-1==h)throw e=a.substring(0,d).split("\n"),Error("Unexpected close tag\nLine: "+(e.length-1)+"\nColumn: "+(e[e.length-1].length+1)+"\nChar: "+a[d]);d+1&&(d+=1);break}else if(33===a.charCodeAt(d+1)){if(45==a.charCodeAt(d+2)){for(;-1!==d&&(62!==a.charCodeAt(d)||
|
|
228
228
|
45!=a.charCodeAt(d-1)||45!=a.charCodeAt(d-2)||-1==d);)d=a.indexOf(">",d+1);-1===d&&(d=a.length)}else if(91===a.charCodeAt(d+2)&&91===a.charCodeAt(d+8)&&"cdata"===a.substr(d+3,5).toLowerCase()){h=a.indexOf("]]\x3e",d);-1==h?(g.push(a.substr(d+9)),d=a.length):(g.push(a.substring(d+9,h)),d=h+3);continue}d++;continue}a:{k=f;d++;var l=c(),m={};for(h=[];62!==a.charCodeAt(d)&&a[d];){var n=a.charCodeAt(d);if(64<n&&91>n||96<n&&123>n){n=c();for(var r=a.charCodeAt(d);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123>
|
|
229
|
-
r)&&62!==r;)d++,r=a.charCodeAt(d);var p=d+1;d=a.indexOf(a[d],p);p=a.slice(p,d);if(39===r||34===r){if(-1===d){k={tagName:l,attributes:m,children:h,parent:null};for(l=0;l<h.length;l++)"string"!==typeof h[l]&&(h[l].parent=k);h=k;break a}}else p=null,d--;n.startsWith("xmlns:")
|
|
230
|
-
n.parent=k:m==l-1&&"\n"==n&&h.pop();h=k}g.push(h);if("string"===typeof h)break;"?"===h.tagName[0]&&h.children&&(g.push.apply(g,x(h.children)),h.children=[])}else h=d,d=a.indexOf("<",d)-1,-2===d&&(d=a.length),h=a.slice(h,d+1),f?0<h.length&&g.push(h):g.length&&1==h.length&&"\n"==h[0]?g.push(h):0<h.trim().length&&g.push(h),d++;return g}function c(){for(var e=d;-1==="\r\n\t>/= ".indexOf(a[d])&&a[d];)d++;return a.slice(e,d)}var d=0;return b("")}function
|
|
231
|
-
function
|
|
232
|
-
function
|
|
233
|
-
function
|
|
234
|
-
function
|
|
235
|
-
function
|
|
236
|
-
function
|
|
237
|
-
function
|
|
238
|
-
function
|
|
239
|
-
function
|
|
240
|
-
function
|
|
241
|
-
w.next())y=p.value,
|
|
242
|
-
function
|
|
243
|
-
q.Pc=function(a){var b=this;return L(function(c){if(1==c.g){if(!b.u)return b.F.na(a,"encrypted",function(){b.
|
|
244
|
-
b.A.size?D(c,
|
|
245
|
-
function
|
|
246
|
-
ra(g,6);return D(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new R(2,6,6004,f.message);}})}function
|
|
247
|
-
function
|
|
248
|
-
function
|
|
249
|
-
q.Vf=function(){var a=this,b=this.i.keys();b=cb(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.Hd=function(){var a=Infinity,b=this.i.keys();b=u(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.we=function(){return
|
|
250
|
-
function
|
|
251
|
-
f.keySystem;var A=d.get(f.keySystem);var C=[],E=[],J=[],I=[],G=[],H=new Set;
|
|
252
|
-
for(C=A.next();!C.done;C=A.next())C=C.value,C.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(B.persistentStateRequired=C.persistentStateRequired);A=B}else A=f.keySystem,B=b.get(f.keySystem),C=[],E=[],J=[],I=[],G=[],H=new Set,
|
|
253
|
-
sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:I[0],serverCertificateUri:J[0],initData:G,keyIds:H};a.g=A;if(!a.g.licenseServerUri)throw new R(2,6,6012,a.g.keySystem);return D(v,f.createMediaKeys(),6);case 6:t=v.h;
|
|
254
|
-
10);case 10:w=v.h;if("usable"!=w)throw new R(2,6,6018);
|
|
255
|
-
function
|
|
229
|
+
r)&&62!==r;)d++,r=a.charCodeAt(d);var p=d+1;d=a.indexOf(a[d],p);p=a.slice(p,d);if(39===r||34===r){if(-1===d){k={tagName:l,attributes:m,children:h,parent:null};for(l=0;l<h.length;l++)"string"!==typeof h[l]&&(h[l].parent=k);h=k;break a}}else p=null,d--;n.startsWith("xmlns:")&&$g.set(p,n.split(":")[1]);"tt"===l&&"xml:space"===n&&"preserve"===p&&(k=!0);m[n]=p}d++}47!==a.charCodeAt(d-1)?(d++,h=b(l,k)):d++;k={tagName:l,attributes:m,children:h,parent:null};l=h.length;for(m=0;m<l;m++)n=h[m],"string"!==typeof n?
|
|
230
|
+
n.parent=k:m==l-1&&"\n"==n&&h.pop();h=k}g.push(h);if("string"===typeof h)break;"?"===h.tagName[0]&&h.children&&(g.push.apply(g,x(h.children)),h.children=[])}else h=d,d=a.indexOf("<",d)-1,-2===d&&(d=a.length),h=a.slice(h,d+1),f?0<h.length&&g.push(h):g.length&&1==h.length&&"\n"==h[0]?g.push(h):0<h.trim().length&&g.push(h),d++;return g}function c(){for(var e=d;-1==="\r\n\t>/= ".indexOf(a[d])&&a[d];)d++;return a.slice(e,d)}var d=0;return b("")}function bh(a){return"string"===typeof a}
|
|
231
|
+
function ch(a){var b=[];if(!a.children)return[];a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function dh(a,b){var c=[];if(!a.children)return[];a=u(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function eh(a){if("string"===typeof a)return uc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:uc(a)}
|
|
232
|
+
function fh(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=eh(a))&&(a=a.trim());return a}function gh(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=u(a.children);for(var d=a.next();!d.done;d=a.next())gh(d.value,b,c)}return c}function hh(a,b){a=dh(a,b);return 1!=a.length?null:a[0]}function ih(a,b,c){a=jh(a,b,c);return 1!=a.length?null:a[0]}
|
|
233
|
+
function kh(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 lh(a,b,c){b=Zg(b);return a.attributes[b+":"+c]||null}function jh(a,b,c){b=Zg(b);var d=[];if(a.children){a=u(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function mh(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())if(d=lh(a,d.value,c))return d;return null}
|
|
234
|
+
function nh(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 qh(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}
|
|
235
|
+
function rh(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 sh(a){a=Number(a);return 0===a%1?a:null}function th(a){a=Number(a);return 0===a%1&&0<a?a:null}function uh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function vh(a){a=Number(a);return isNaN(a)?null:a}function wh(a){return a?"true"===a.toLowerCase():!1}
|
|
236
|
+
function xh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function yh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&yh(a.parent,!0,!1).appendChild(d);if(c)for(a=u(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=yh(b,!1,!0),d.appendChild(c);return d}var $g=new Map([]);function zh(a){var b=this;this.G=a;this.J=new Set;this.m=this.u=null;this.sa=this.$=!1;this.K=0;this.g=null;this.F=new ed;this.i=new Map;this.A=new Map;this.l=new fg;this.h=null;this.s=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.X=new Map;this.aa=new Map;this.M=new Ob(function(){return Ah(b)});this.P=!1;this.O=[];this.S=!1;this.L=new Ob(function(){Bh(b)});this.l.catch(function(){});this.j=new Cg(function(){return Ch(b)});this.Y=!1;this.H=this.I=null}q=zh.prototype;q.destroy=function(){return this.j.destroy()};
|
|
237
|
+
function Ch(a){return L(function(b){switch(b.g){case 1:return a.F.release(),a.F=null,a.l.reject(),a.L.stop(),a.L=null,a.M.stop(),a.M=null,D(b,Dh(a),2);case 2:if(!a.m){b.B(3);break}ra(b,4);return D(b,a.m.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:ua(b);case 5:a.m=null;case 3:a.g=null,a.J.clear(),a.u=null,a.A=new Map,a.h=null,a.s=function(){},a.G=null,a.Y=!1,a.I=null,F(b)}})}q.configure=function(a){this.h=a;this.L&&this.L.ya(this.h.updateExpirationTime)};
|
|
238
|
+
function Eh(a,b,c){a.sa=!0;a.A=new Map;a.P=c;return Fh(a,b)}function Gh(a,b,c){a.A=new Map;c=u(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=u(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.P=0<a.A.size;return Fh(a,b)}
|
|
239
|
+
function Hh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Ih(a,g,[])}
|
|
240
|
+
function Fh(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v;return L(function(B){if(1==B.g){if(c=Jh(a))for(d=u(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(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});g||(h=Eg(a.h.servers),Kh(b,h));k=new Set;l=u(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Lh(m),r=u(n),p=r.next();!p.done;p=r.next())t=p.value,k.add(t);w=u(k);for(p=w.next();!p.done;p=
|
|
241
|
+
w.next())y=p.value,Mh(y,Eg(a.h.servers),Eg(a.h.advanced||{}),a.h.keySystemsMapping);return D(B,Ze(b,a.P,a.Y,a.h.preferredKeySystems),2)}z=g||Object.keys(a.h.servers).length;if(!z)return a.$=!0,B.return(Promise.resolve());v=Ih(a,void 0,b);return B.return(g?v:v.catch(function(){}))})}
|
|
242
|
+
function Nh(a){var b;return L(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.I){c.B(2);break}return D(c,a.I,3);case 3:return Dg(a.j),c.return();case 2:return ra(c,4),a.I=a.m.setMediaKeys(a.u),D(c,a.I,6);case 6:ta(c,5);break;case 4:b=ua(c),a.s(new R(2,6,6003,b.message));case 5:Dg(a.j),F(c)}})}function Oh(a,b){return L(function(c){if(1==c.g)return D(c,Nh(a),2);Ph(a,b.initDataType,Fb(b.initData));F(c)})}
|
|
243
|
+
q.Pc=function(a){var b=this;return L(function(c){if(1==c.g){if(!b.u)return b.F.na(a,"encrypted",function(){b.s(new R(2,6,6010))}),c.return();b.m=a;b.F.na(b.m,"play",function(){for(var d=u(b.O),e=d.next();!e.done;e=d.next())Qh(b,e.value);b.S=!0;b.O=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.F.o(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Dh(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||
|
|
244
|
+
b.A.size?D(c,Nh(b),2):c.B(2)}Rh(b).catch(function(){});b.H||b.A.size||b.h.parseInbandPsshEnabled||b.F.o(b.m,"encrypted",function(d){return Oh(b,d)});F(c)})};
|
|
245
|
+
function Sh(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=ug([a.g.serverCertificateUri],a.h.retryParameters);ra(g,3);c=a.G.Zb.request(5,b);return D(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);ta(g,4);break;case 3:throw e=ua(g),new R(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();
|
|
246
|
+
ra(g,6);return D(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new R(2,6,6004,f.message);}})}function Th(a,b){var c,d,e;return L(function(f){if(1==f.g)return D(f,Uh(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.zb=new fg,d.push(e.zb);d.push(c.remove());return D(f,Promise.all(d),3)}a.i.delete(c);F(f)})}
|
|
247
|
+
function Rh(a){var b,c,d,e,f;return L(function(g){if(1==g.g){if(!a.A.size)return g.B(2);a.A.forEach(function(h,k){Uh(a,k,h)});return D(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Vh(a))return g.return(a.l);a.l=new fg;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=u(c);for(e=d.next();!e.done;e=d.next())f=e.value,Ph(a,f.initDataType,f.initData);Wh(a)&&a.l.resolve();return g.return(a.l)})}
|
|
248
|
+
function Ph(a,b,c){if(c.length){var d=a.i.values();d=u(d);for(var e=d.next();!e.done;e=d.next())if(Cb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Wh(a)&&(a.l.resolve(),a.l=new fg,a.l.catch(function(){}));Xh(a,b,c,a.g.sessionType)}}function Yh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Zh(a){a=a.i.keys();a=cb(a,function(b){return b.sessionId});return Array.from(a)}
|
|
249
|
+
q.Vf=function(){var a=this,b=this.i.keys();b=cb(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.Hd=function(){var a=Infinity,b=this.i.keys();b=u(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.we=function(){return Fg(this.aa)};
|
|
250
|
+
function Ih(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z;return L(function(v){switch(v.g){case 1:d=new Map;if(c.length){e=$h(a,c,d);v.B(2);break}return D(v,ai(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new R(2,6,6001);Dg(a.j);ra(v,4);a.J.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=u(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.J.add(n.contentType.toLowerCase());r=u(k);for(m=r.next();!m.done;m=r.next())p=m.value,a.J.add(p.contentType.toLowerCase());if(c.length){var B=
|
|
251
|
+
f.keySystem;var A=d.get(f.keySystem);var C=[],E=[],J=[],I=[],G=[],H=new Set;bi(A,C,E,I,J,G,H);var K=a.P?"persistent-license":"temporary";B={keySystem:B,encryptionScheme:C[0],licenseServerUri:E[0],distinctiveIdentifierRequired:A[0].distinctiveIdentifierRequired,persistentStateRequired:A[0].persistentStateRequired,sessionType:A[0].sessionType||K,audioRobustness:A[0].audioRobustness||"",videoRobustness:A[0].videoRobustness||"",serverCertificate:I[0],serverCertificateUri:J[0],initData:G,keyIds:H};A=u(A);
|
|
252
|
+
for(C=A.next();!C.done;C=A.next())C=C.value,C.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(B.persistentStateRequired=C.persistentStateRequired);A=B}else A=f.keySystem,B=b.get(f.keySystem),C=[],E=[],J=[],I=[],G=[],H=new Set,bi(B.drmInfos,C,E,I,J,G,H),A={keySystem:A,encryptionScheme:C[0],licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,
|
|
253
|
+
sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:I[0],serverCertificateUri:J[0],initData:G,keyIds:H};a.g=A;if(!a.g.licenseServerUri)throw new R(2,6,6012,a.g.keySystem);return D(v,f.createMediaKeys(),6);case 6:t=v.h;Dg(a.j);a.u=t;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.u)){v.B(7);break}ra(v,8);return D(v,a.u.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
|
|
254
|
+
10);case 10:w=v.h;if("usable"!=w)throw new R(2,6,6018);Dg(a.j);ta(v,7,4);break;case 8:y=ua(v,4);if(y instanceof R)throw y;throw new R(2,6,6019,y.message);case 7:return a.$=!0,D(v,Sh(a),11);case 11:Dg(a.j);ta(v,0);break;case 4:z=ua(v);Dg(a.j,z);a.g=null;a.J.clear();if(z instanceof R)throw z;throw new R(2,6,6002,z.message);}})}
|
|
255
|
+
function $h(a,b,c){for(var d=u(b),e=d.next();!e.done;e=d.next()){var f=u(Lh(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new R(2,6,6E3);d={};a=u(a.h.preferredKeySystems);for(e=a.next();!e.done;d={pf:d.pf},e=a.next())for(d.pf=e.value,f=u(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
256
256
|
l.pf}}(d)))return e.keySystemAccess;a=u([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=u(b),e=f.next();!e.done;e=f.next()){var g=u(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=u(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
257
|
-
function
|
|
258
|
-
z.h,z.return(c);case 6:ua(z);case 7:
|
|
259
|
-
function
|
|
260
|
-
function
|
|
261
|
-
d.load(b),4);case 4:return g=m.h,
|
|
262
|
-
function
|
|
263
|
-
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.
|
|
264
|
-
function
|
|
265
|
-
oc(g.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){y=
|
|
266
|
-
d&&d.
|
|
267
|
-
function
|
|
268
|
-
|
|
269
|
-
function
|
|
270
|
-
2);if("org.w3.clearkey"===l&&ic())throw Error("Unsupported keySystem");return D(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,r=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Xb()&&(r=!1),f.set(l,{persistentState:r}),D(p,m.createMediaKeys(),5);case 5:ta(p,0);break;case 2:ua(p),f.set(l,null),F(p)}})},h=a.map(function(l){return g(l)}),D(k,Promise.all(h),2)):k.return(
|
|
271
|
-
function
|
|
272
|
-
function
|
|
273
|
-
function
|
|
257
|
+
function ai(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,w,y;return L(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new R(2,6,6E3);d=u(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=u(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){z.B(4);break}k=h.value;if(!b.has(k)){z.B(3);break}l=b.get(k);ra(z,6);return D(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
258
|
+
z.h,z.return(c);case 6:ua(z);case 7:Dg(a.j);case 3:h=g.next();z.B(2);break;case 4:m=u([!0,!1]),n=m.next();case 9:if(n.done){z.B(11);break}r=n.value;p=u(b.keys());h=p.next();case 12:if(h.done){n=m.next();z.B(9);break}t=h.value;w=b.get(t);y=w.drmInfos.some(function(v){return!!v.licenseServerUri});if(y!=r){z.B(13);break}ra(z,15);return D(z,navigator.requestMediaKeySystemAccess(t,[w]),17);case 17:return c=z.h,z.return(c);case 15:ua(z);case 16:Dg(a.j);case 13:h=p.next();z.B(12);break;case 11:return z.return(c)}})}
|
|
259
|
+
function Jh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Ec(a)}function ci(a){Wh(a)&&a.l.resolve()}function di(a,b){(new Ob(function(){b.loaded=!0;ci(a)})).V(ei)}
|
|
260
|
+
function Uh(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:try{d=a.u.createSession("persistent-license")}catch(n){return e=new R(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.F.o(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(n):Qh(a,n)});a.F.o(d,"keystatuseschange",function(n){return fi(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,qg:Infinity,zb:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return D(m,
|
|
261
|
+
d.load(b),4);case 4:return g=m.h,Dg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.s(new R(h,6,6013)),f.loaded=!0),di(a,f),ci(a),m.return(d);case 2:k=ua(m),Dg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.s(new R(l,6,6005,k.message)),f.loaded=!0,ci(a);case 3:return m.return(Promise.resolve())}})}
|
|
262
|
+
function Xh(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.s(new R(2,6,6005,f.message));return}a.F.o(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(f):Qh(a,f)});a.F.o(e,"keystatuseschange",function(f){return fi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,qg:Infinity,zb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof R||(b=new R(2,6,6016,f));a.s(b);return}a.h.logLicenseExchange&&xc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
263
|
+
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.s(new R(2,6,6006,f.message,f,h))}})}
|
|
264
|
+
function Qh(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t;L(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&xc(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=ug([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(Yh(a.g.keySystem)){var y=
|
|
265
|
+
oc(g.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){y=Xg(y,"PlayReadyKeyMessage");var z=gh(y,"HttpHeader");z=u(z);for(var v=z.next();!v.done;v=z.next()){var B=v.value;v=gh(B,"name")[0];B=gh(B,"value")[0];g.headers[eh(v)]=eh(B)}y=gh(y,"Challenge")[0];g.body=yc(eh(y))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ra(w,2);l=a.G.Zb.request(2,g);return D(w,l.promise,4);case 4:k=w.h;ta(w,3);break;case 2:m=ua(w);if(a.j.g)return w.return();n=new R(2,6,6007,m);1==a.i.size?(a.s(n),
|
|
266
|
+
d&&d.zb&&d.zb.reject(n)):(d&&d.zb&&d.zb.reject(n),a.i.delete(c),Wh(a)&&(a.l.resolve(),a.M.V(.1)));return w.return();case 3:if(a.j.g)return w.return();a.K+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&xc(k.data);ra(w,5);return D(w,c.update(k.data),7);case 7:ta(w,6);break;case 5:return r=ua(w),p=new R(2,6,6008,r.message),a.s(p),d&&d.zb&&d.zb.reject(p),w.return();case 6:if(a.j.g)return w.return();t=new Q("drmsessionupdate");a.G.onEvent(t);d&&(d.zb&&d.zb.resolve(),di(a,d));F(w)}})}
|
|
267
|
+
function fi(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(Yh(a.g.keySystem)&&16==g.byteLength&&(Sb()||fc())){h=Kb(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=Ac(g).slice(0,32);a.X.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.zb&&(a.i.delete(b),b.close().catch(function(){}));
|
|
268
|
+
Wh(a)&&(a.l.resolve(),a.M.V(gi))}function Ah(a){var b=a.X,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.s(new R(2,6,6014));a.G.Pe(Fg(c))}
|
|
269
|
+
function hi(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,r;return L(function(p){switch(p.g){case 1:ra(p,
|
|
270
|
+
2);if("org.w3.clearkey"===l&&ic())throw Error("Unsupported keySystem");return D(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,r=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Xb()&&(r=!1),f.set(l,{persistentState:r}),D(p,m.createMediaKeys(),5);case 5:ta(p,0);break;case 2:ua(p),f.set(l,null),F(p)}})},h=a.map(function(l){return g(l)}),D(k,Promise.all(h),2)):k.return(Fg(f))})}
|
|
271
|
+
function ii(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Ob(e)).V(ji)}),ra(c,2),D(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);ua(c);F(c)})}
|
|
272
|
+
function Dh(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return D(c,Promise.all(b.map(function(d){d=u(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return ra(g,2),a.sa||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?D(g,ii(e),5):D(g,e.remove(),5);if(2!=g.g)return ta(g,0);ua(g);F(g)})})),0)})}function ki(a,b){return a.length&&b.length&&a!==b?0<li(a,b).length:!0}
|
|
273
|
+
function li(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=u((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
274
274
|
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}
|
|
275
|
-
function
|
|
276
|
-
function
|
|
277
|
-
function
|
|
275
|
+
function Lh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Bh(a){a.i.forEach(function(b,c){var d=b.qg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.qg=e)})}function Wh(a){a=a.i.values();return db(a,function(b){return b.loaded})}function Vh(a){for(var b=u(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.X.get(c.value))return!1;return!0}
|
|
276
|
+
function Kh(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=u(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)}
|
|
277
|
+
function bi(a,b,c,d,e,f,g){var h=[],k={};a=u(a);for(var l=a.next();!l.done;k={Ba:k.Ba},l=a.next()){k.Ba=l.value;b.includes(k.Ba.encryptionScheme)||b.push(k.Ba.encryptionScheme);"org.w3.clearkey"==k.Ba.keySystem&&k.Ba.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(k.Ba.licenseServerUri)||h.push(k.Ba.licenseServerUri):c.includes(k.Ba.licenseServerUri)||c.push(k.Ba.licenseServerUri);e.includes(k.Ba.serverCertificateUri)||e.push(k.Ba.serverCertificateUri);k.Ba.serverCertificate&&
|
|
278
278
|
(d.some(function(r){return function(p){return Cb(p,r.Ba.serverCertificate)}}(k))||d.push(k.Ba.serverCertificate));if(k.Ba.initData){l={};for(var m=u(k.Ba.initData),n=m.next();!n.done;l={ce:l.ce},n=m.next())l.ce=n.value,f.some(function(r){return function(p){var t=r.ce;return p.keyId&&p.keyId==t.keyId?!0:p.initDataType==t.initDataType&&Cb(p.initData,t.initData)}}(l))||f.push(l.ce)}if(k.Ba.keyIds)for(l=u(k.Ba.keyIds),m=l.next();!m.done;m=l.next())g.add(m.value)}if(1==h.length)c.push(h[0]);else if(0<
|
|
279
279
|
h.length){b=[];h=u(h);for(d=h.next();!d.done;d=h.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));h=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(h))}}
|
|
280
|
-
function
|
|
281
|
-
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
|
|
280
|
+
function Mh(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
281
|
+
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 ji=1,ei=5,gi=.5,mi=new Mb(function(){return Gb(new Uint8Array([0]))});/*
|
|
282
282
|
@license
|
|
283
283
|
Shaka Player
|
|
284
284
|
Copyright 2023 Google LLC
|
|
285
285
|
SPDX-License-Identifier: Apache-2.0
|
|
286
286
|
*/
|
|
287
|
-
function
|
|
288
|
-
function pi(a,b){var c=Ue(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.u)for(var e=u(b.variants),f=e.next();!f.done;f=e.next())f=f.value,qi(a,d.keySystem,f.video),qi(a,d.keySystem,f.audio);ri(a,b)}return c}function qi(a,b,c){if(c){c=u(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=u(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,
|
|
287
|
+
function ni(a,b,c){this.h=a;this.i=b;this.g=c}function oi(a,b){return L(function(c){if(1==c.g)return D(c,Ve(a.g,b,a.h.drm.preferredKeySystems),2);Qe(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(uf))throw new R(2,4,4032);return c.return(pi(a,b))})}
|
|
288
|
+
function pi(a,b){var c=Ue(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.u)for(var e=u(b.variants),f=e.next();!f.done;f=e.next())f=f.value,qi(a,d.keySystem,f.video),qi(a,d.keySystem,f.audio);ri(a,b)}return c}function qi(a,b,c){if(c){c=u(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=u(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Ph(a.g,e.initDataType,e.initData)}}}
|
|
289
289
|
function ri(a,b){a=a.g?a.g.we():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=u(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=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=u(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?si.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
290
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new R(2,4,4012,a);}var si=["output-restricted","internal-error"];function ti(){}function ui(a,b){if(b){var c=vi[b.toLowerCase()];if(c)return c}throw new R(2,4,4E3,a,b);}N("shaka.media.ManifestParser",ti);ti.unregisterParserByMime=function(a){delete vi[a]};ti.registerParserByMime=function(a,b){vi[a]=b};ti.registerParserByExtension=function(){nd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ti.AccessibilityPurpose={ul:"visually impaired",Gk:"hard of hearing"};var vi={};function wi(a){function b(){d=!0}function c(l){f.push(l);
|
|
291
|
-
function(l){g.push({box:l,
|
|
292
|
-
a=xi(a,e,k.box,f,k.
|
|
293
|
-
function xi(a,b,c,d,e){var f=yi.value(),g=a.subarray(c.start,c.start+c.size),h=Kb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Kb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);zi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Ub()?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=u(d);for(d=a.next();!d.done;d=a.next())d=d.value,zi(e,d.start,d.size+k.byteLength);k=Kb(e,b.start);b=
|
|
290
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new R(2,4,4012,a);}var si=["output-restricted","internal-error"];function ti(){}function ui(a,b){if(b){var c=vi[b.toLowerCase()];if(c)return c}throw new R(2,4,4E3,a,b);}N("shaka.media.ManifestParser",ti);ti.unregisterParserByMime=function(a){delete vi[a]};ti.registerParserByMime=function(a,b){vi[a]=b};ti.registerParserByExtension=function(){nd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ti.AccessibilityPurpose={ul:"visually impaired",Gk:"hard of hearing"};var vi={};function wi(a){function b(){d=!0}function c(l){f.push(l);Og(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new Jg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);Qg(l)}).T("encv",b).T("enca",b).T("dvav",function(l){g.push({box:l,wb:1701733238})}).T("dva1",function(l){g.push({box:l,wb:1701733238})}).T("dvh1",function(l){g.push({box:l,wb:1701733238})}).T("dvhe",function(l){g.push({box:l,wb:1701733238})}).T("hev1",function(l){g.push({box:l,wb:1701733238})}).T("hvc1",
|
|
291
|
+
function(l){g.push({box:l,wb:1701733238})}).T("avc1",function(l){g.push({box:l,wb:1701733238})}).T("avc3",function(l){g.push({box:l,wb:1701733238})}).T("ac-3",function(l){g.push({box:l,wb:1701733217})}).T("ec-3",function(l){g.push({box:l,wb:1701733217})}).T("ac-4",function(l){g.push({box:l,wb:1701733217})}).T("mp4a",function(l){g.push({box:l,wb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw Za(Ac(a)),new R(2,3,3019);g.reverse();for(var h=u(g),k=h.next();!k.done;k=h.next())k=k.value,
|
|
292
|
+
a=xi(a,e,k.box,f,k.wb);return a}
|
|
293
|
+
function xi(a,b,c,d,e){var f=yi.value(),g=a.subarray(c.start,c.start+c.size),h=Kb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Kb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);zi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Ub()?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=u(d);for(d=a.next();!d.done;d=a.next())d=d.value,zi(e,d.start,d.size+k.byteLength);k=Kb(e,b.start);b=Pg(b);a=k.getUint32(b);
|
|
294
294
|
k.setUint32(b,a+1);return e}function zi(a,b,c){a=Kb(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 yi=new Mb(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 Ai(a,b,c,d,e,f,g){this.ka=a;this.Ta=b;this.za=c;this.ng=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}Ai.prototype.Mb=function(){return this.Ta};Ai.prototype.Jb=function(){return this.za};Ai.prototype.Kd=function(){return this.g};function Bi(a,b){return a===b?!0:a&&b?a.Mb()==b.Mb()&&a.Jb()==b.Jb()&&Cd(a.ka().sort(),b.ka().sort())&&Cb(a.Kd(),b.Kd()):a==b}N("shaka.media.InitSegmentReference",Ai);
|
|
295
295
|
Ai.prototype.getEndByte=Ai.prototype.Jb;Ai.prototype.getStartByte=Ai.prototype.Mb;
|
|
296
|
-
function Ci(a,b,c,d,e,f,g,h,k,l,m,n,r,p,t,w){l=void 0===l?[]:l;p=void 0===p?Di:p;this.startTime=a;this.i=this.endTime=b;this.G=c;this.Ta=d;this.za=e;this.ua=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===r?null:r;this.status=p;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===t?null:t;this.u=null;this.j=0;this.
|
|
297
|
-
a.next())b.value.Dh();this.
|
|
296
|
+
function Ci(a,b,c,d,e,f,g,h,k,l,m,n,r,p,t,w){l=void 0===l?[]:l;p=void 0===p?Di:p;this.startTime=a;this.i=this.endTime=b;this.G=c;this.Ta=d;this.za=e;this.ua=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===r?null:r;this.status=p;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===t?null:t;this.u=null;this.j=0;this.s=void 0===w?!1:w;this.Fe=this.Ud=!1;a=u(this.g);for(b=a.next();!b.done;b=
|
|
297
|
+
a.next())b.value.Dh();this.s&&this.g.length&&this.g[this.g.length-1].Ch();this.F=this.mimeType=this.codecs=null}q=Ci.prototype;q.ka=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.Mi=function(){return this.endTime};q.Mb=function(){return this.Ta};q.Jb=function(){return this.za};q.dj=function(){return this.tilesLayout};q.cj=function(){return this.A};q.xc=function(){return this.status};q.Aj=function(){this.status=Ei};q.mg=function(){this.preload=!0};q.sj=function(){return this.preload};
|
|
298
298
|
q.He=function(){this.l=!1};q.pj=function(){return this.l};q.Dh=function(){this.Ud=!0};q.rj=function(){return this.Ud};q.Ch=function(){this.Fe=!0};q.qj=function(){return this.Fe};q.Bh=function(){this.m=!0};q.lj=function(){return this.m};q.Sh=function(a){this.u=a};q.bj=function(){return this.u};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
|
|
299
299
|
q.Kg=function(a){null==this.h?Ta("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.fk=function(a){this.F=a};q.Kd=function(){return this.F};function Fi(a,b){a.ua=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())Fi(c.value,b)}N("shaka.media.SegmentReference",Ci);Ci.prototype.getSegmentData=Ci.prototype.Kd;Ci.prototype.setSegmentData=Ci.prototype.fk;Ci.prototype.syncAgainst=Ci.prototype.Kg;Ci.prototype.offset=Ci.prototype.offset;
|
|
300
300
|
Ci.prototype.getThumbnailSprite=Ci.prototype.bj;Ci.prototype.setThumbnailSprite=Ci.prototype.Sh;Ci.prototype.hasByterangeOptimization=Ci.prototype.lj;Ci.prototype.markAsByterangeOptimization=Ci.prototype.Bh;Ci.prototype.isLastPartial=Ci.prototype.qj;Ci.prototype.markAsLastPartial=Ci.prototype.Ch;Ci.prototype.isPartial=Ci.prototype.rj;Ci.prototype.markAsPartial=Ci.prototype.Dh;Ci.prototype.isIndependent=Ci.prototype.pj;Ci.prototype.markAsNonIndependent=Ci.prototype.He;Ci.prototype.isPreload=Ci.prototype.sj;
|
|
@@ -312,7 +312,7 @@ c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7]
|
|
|
312
312
|
function Qi(a){for(var b=0,c=[];Mi(a,b);){var d=Oi(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=Oi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Pi(e))&&c.push(f);b+=e.size+10}Ni(a,b)&&(b+=10)}return c}function Ri(a,b){for(var c=b=void 0===b?0:b,d=0;Mi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Oi(a,b+6),Ni(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}N("shaka.util.Id3Utils",Li);Li.getID3Data=Ri;
|
|
313
313
|
Li.getID3Frames=Qi;function Si(a,b){var c=null,d=null,e=null,f=a.R();b&1&&(e=a.ed());b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:f,jh:c,Ai:d,wl:e}}function Ti(a,b){return 1==b?(b=a.R(),a=a.R(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.R()}}function Ui(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.R();a.skip(4);a=a.Ha();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
314
314
|
function Vi(a,b,c){var d=a.R(),e=[],f=null;c&1&&(f=a.R());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={yg:null,sampleSize:null,We:null};c&256&&(h.yg=a.R());c&512&&(h.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(h.We=0==b?a.R():a.Hh());e.push(h)}return{Al:d,Kh:e,zi:f}}
|
|
315
|
-
function Wi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.R();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ha()+a.Ha()/16;a=a.Ha()+a.Ha()/16;return{trackId:c,width:b,height:a}}function Xi(a){a=a.R();return{ab:
|
|
315
|
+
function Wi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.R();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ha()+a.Ha()/16;a=a.Ha()+a.Ha()/16;return{trackId:c,width:b,height:a}}function Xi(a){a=a.R();return{ab:Ng(a)}}function Yi(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Zi(a){return(10>a?"0":"")+a};/*
|
|
316
316
|
|
|
317
317
|
Copyright Brightcove, Inc.
|
|
318
318
|
|
|
@@ -328,16 +328,16 @@ function Wi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.R();1=
|
|
|
328
328
|
See the License for the specific language governing permissions and
|
|
329
329
|
limitations under the License.
|
|
330
330
|
*/
|
|
331
|
-
function $i(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=Fb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function aj(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
|
|
331
|
+
function $i(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=Fb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function aj(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 Gg(c,0)).R(),a.g=8*d,a.i-=d)}function bj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;aj(a)}a.h<<=b;a.g-=b}
|
|
332
332
|
function cj(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&&aj(a);c=b-c;return 0<c?d<<c|cj(a,c):d}function dj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;aj(a);return b+dj(a)}function ej(a){bj(a,1+dj(a))}function S(a){var b=dj(a);return cj(a,b+1)-1}function ij(a){a=S(a);return 1&a?1+a>>>1:-1*(a>>>1)}function jj(a){return 1===cj(a,1)}function kj(a){return cj(a,8)}
|
|
333
|
-
function lj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=ij(a),d=(c+d+256)%256),c=0===d?c:d}function mj(a){kj(a);S(a);return S(a)}N("shaka.util.ExpGolomb",$i);function nj(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.A=this.F=null;this.i=[];this.h=[];this.G=null;this.l=[];this.H=this.
|
|
333
|
+
function lj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=ij(a),d=(c+d+256)%256),c=0===d?c:d}function mj(a){kj(a);S(a);return S(a)}N("shaka.util.ExpGolomb",$i);function nj(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.A=this.F=null;this.i=[];this.h=[];this.G=null;this.l=[];this.H=this.s=this.u=null}q=nj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
334
334
|
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,oj(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,Ce:-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<
|
|
335
335
|
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,r=m;2<r;){var p=f[n+1]+2;switch(f[n]){case 5:var t=pc(f.subarray(n+2,n+p));-1==g.audio&&"Opus"===t?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===t&&(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&&(t=
|
|
336
336
|
null,128===f[n+2]&&(t=f[n+3]),null!=t&&(this.H={channelCount:0===(t&15)?2:t&15,ri:t,sampleRate:48E3}))}n+=p;r-=p}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.Ce&&(g.Ce=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");
|
|
337
337
|
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.F=f.audio,this.A=f.audioCodec);-1!=f.Ce&&(this.G=f.Ce);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.F: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);
|
|
338
338
|
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};
|
|
339
|
-
function pj(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=qj(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.
|
|
340
|
-
a.
|
|
339
|
+
function pj(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=qj(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=qj(d,
|
|
340
|
+
a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.Gj=function(a){nd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.ug(a)};
|
|
341
341
|
q.ug=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var r=a[n];if(r){if(2<=g&&1==r){b&&!h.length&&-1==k&&(r=n-(3<g?3:g),c&&0!=r&&(r=a.subarray(0,r),b.data=Bc(b.data,r),b.fullData=Bc(b.fullData,r)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Bc(b.data,k),b.fullData=Bc(b.fullData,k)));if(n>=e-f)return h;
|
|
342
342
|
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Bc(b.data,a),b.fullData=Bc(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=Bc.apply(vc,x(c.value)),(c=pj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Qi(c.data),dts:c.dts,pts:c.pts});return a};
|
|
343
343
|
q.fc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=u(this.i),c=b.next();!c.done;c=b.next()){var d=Bc.apply(vc,x(c.value)),e=pj(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=Bc(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};
|
|
@@ -349,116 +349,116 @@ n=0;jj(a)&&(k=S(a),l=S(a),m=S(a),n=S(a));b.height=String((2-h)*(g+1)*16-2*m-2*n)
|
|
|
349
349
|
function rj(a){var b={height:null,width:null,ab:null};a=a.Ae();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new $i(a.fullData,!0);kj(c);kj(c);cj(c,4);var d=cj(c,3);jj(c);var e=cj(c,2),f=cj(c,1),g=cj(c,5),h=cj(c,32);a=kj(c);for(var k=kj(c),l=kj(c),m=kj(c),n=kj(c),r=kj(c),p=kj(c),t=[],w=[],y=0;y<d;y++)t.push(jj(c)),w.push(jj(c));if(0<d)for(y=d;8>y;y++)cj(c,2);for(y=0;y<d;y++)t[y]&&cj(c,88),w[y]&&kj(c);S(c);d=S(c);3==d&&cj(c,1);t=S(c);w=S(c);var z=y=0,v=0,B=0;jj(c)&&
|
|
350
350
|
(y+=S(c),z+=S(c),v+=S(c),B+=S(c));b.width=String(t-(y+z)*(1===d||2===d?2:1));b.height=String(w-(v+B)*(1===d?2:1));c=function(A){for(var C=0,E=0;32>E;E++)C|=(A>>E&1)<<31-E;return C>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;r&&(e+="."+r.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
351
351
|
a.toString(16).toUpperCase());b.ab=e;return b}function qj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function uj(a){return 0>oj(a)?!1:!0}function oj(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}N("shaka.util.TsParser",nj);nj.syncOffset=oj;nj.probe=uj;nj.prototype.getVideoInfo=nj.prototype.ag;nj.prototype.getVideoResolution=nj.prototype.ij;nj.prototype.getVideoNalus=nj.prototype.Ae;
|
|
352
|
-
nj.prototype.getCodecs=nj.prototype.Gd;nj.prototype.getStartTime=nj.prototype.getStartTime;nj.prototype.getVideoData=nj.prototype.Xc;nj.prototype.getAudioData=nj.prototype.fc;nj.prototype.getMetadata=nj.prototype.getMetadata;nj.prototype.parseNalus=nj.prototype.ug;nj.prototype.parseAvcNalus=nj.prototype.Gj;nj.prototype.parse=nj.prototype.parse;nj.prototype.clearData=nj.prototype.clearData;nj.Timescale=9E4;var tj=[100,110,122,244,44,83,86,118,128,138,139,134];function vj(a,b,c){this.g=null;this.
|
|
352
|
+
nj.prototype.getCodecs=nj.prototype.Gd;nj.prototype.getStartTime=nj.prototype.getStartTime;nj.prototype.getVideoData=nj.prototype.Xc;nj.prototype.getAudioData=nj.prototype.fc;nj.prototype.getMetadata=nj.prototype.getMetadata;nj.prototype.parseNalus=nj.prototype.ug;nj.prototype.parseAvcNalus=nj.prototype.Gj;nj.prototype.parse=nj.prototype.parse;nj.prototype.clearData=nj.prototype.clearData;nj.Timescale=9E4;var tj=[100,110,122,244,44,83,86,118,128,138,139,134];function vj(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&&Ua("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,nd("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ua("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ua("Could not find LCEVC Library on this page"),
|
|
353
353
|
a=!1):(this.h.SupportObject.SupportStatus||Ua(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 wj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
354
|
-
vj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function xj(a,b,c){var d=yj,e=zj;switch(b.mimeType){case "video/webm":d=Aj;break;case "video/mp4":d=Bj}switch(c){case "DASH":e=Cj;break;case "HLS":e=Dj}a.g&&(a.
|
|
355
|
-
function Fj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o
|
|
354
|
+
vj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function xj(a,b,c){var d=yj,e=zj;switch(b.mimeType){case "video/webm":d=Aj;break;case "video/mp4":d=Bj}switch(c){case "DASH":e=Cj;break;case "HLS":e=Dj}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}N("shaka.lcevc.Dec",vj);vj.prototype.release=vj.prototype.release;var yj=0,Aj=1,Bj=2,Dj=0,Cj=1,zj=-1;function Ej(a,b,c,d){var e=this;this.i=a;this.A=null;this.H=b;this.h={};this.I={};this.oa={};this.g=null;this.Y=!1;this.ra=c||function(){};this.P=d||null;this.j={};this.s=new ed;this.m={};this.J=null;this.M=new fg;this.O="";this.$=!1;this.l=Fj(this,this.M);this.G=!1;this.K=new Cg(function(){return Gj(e)});this.F=!1;this.X="UNKNOWN";this.ma=this.qa=!1;this.sa=new fg;this.u=!1;this.aa=!0;this.L=this.S=null}
|
|
355
|
+
function Fj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.o(c,"startstreaming",function(){a.aa=!0});a.s.o(c,"endstreaming",function(){a.aa=!1});a.s.na(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.s.na(a.i,"playing",function(){a.$=!0});a.O=Hj(c);a.i.src=a.O;return c}c=new MediaSource;a.s.na(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.s.na(a.i,"playing",function(){a.$=!0});a.O=Hj(c);a.i.src=a.O;return c}
|
|
356
356
|
function Ij(a,b){var c,d,e,f,g,h,k,l,m,n,r;return L(function(p){if(1==p.g)return a.createSegmentIndex?D(p,a.createSegmentIndex(),2):p.B(2);if(!a.segmentIndex)return p.return(!1);if(0==a.segmentIndex.getNumReferences())return p.return(!0);c=Kc;d=new Set;e=u(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.Ca){if(m=ke(h,k),!De(m))return p.return(!1)}else if(b==c.va?k=bf(k):b==c.Z&&(k=cf(k,h)),n=
|
|
357
357
|
oe(a,h,k),r=me(h,k),!jd(n)&&!ee(r))return p.return(!1);return p.return(!0)})}q=Ej.prototype;q.destroy=function(){return this.K.destroy()};
|
|
358
|
-
function Gj(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(Le)),f=u(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new R(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.H&&b.push(a.H.destroy());for(k in a.m)b.push(a.m[k].destroy());return D(l,Promise.all(b),2)}a.
|
|
358
|
+
function Gj(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(Le)),f=u(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new R(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.H&&b.push(a.H.destroy());for(k in a.m)b.push(a.m[k].destroy());return D(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.H=null;a.h={};a.m={};a.J=null;
|
|
359
359
|
a.j={};a.P=null;a.L=null;F(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 L(function(m){switch(m.g){case 1:return f=Kc,D(m,e.M,2);case 2:e.F=b,e.X=c,e.qa=d,e.ma=!e.F&&"HLS"==e.X&&!e.qa,e.L=null,g=u(a.keys()),h=g.next();case 3:if(h.done){m.B(0);break}k=h.value;l=a.get(k);return D(m,Jj(e,k,l,l.codecs),6);case 6:e.u?(e.j[f.Z]=[],e.j[f.va]=[]):e.j[k]=[],h=g.next(),m.B(3)}})};
|
|
360
360
|
function Jj(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,w;return L(function(y){switch(y.g){case 1:return e=Kc,f=Oa,g=Pa,D(y,Ij(c,b),2);case 2:g.call(f,y.h,"Type negotiation should happen before MediaSourceEngine.init!");h=ke(c.mimeType,d);if(b==e.Ca){Kj(a,h,a.F,c.external);y.B(0);break}k=a.A.forceTransmux;if(!jd(h)||!a.F&&le.includes(h))k=!0;l=me(c.mimeType,d);if(!k){y.B(4);break}m=Gc(e.Z,(d||"").split(","));n=Gc(e.va,(d||"").split(","));if(!m||!n){y.B(5);break}a.u=!0;return D(y,Jj(a,e.Z,c,m),6);case 6:return D(y,
|
|
361
|
-
Jj(a,e.va,c,n),7);case 7:return y.return();case 5:if(r=ee(l))p=r(),a.m[b]=p,h=p.convertCodecs(b,l);case 4:t=h+a.A.addExtraFeaturesToSourceBuffer(h);
|
|
361
|
+
Jj(a,e.va,c,n),7);case 7:return y.return();case 5:if(r=ee(l))p=r(),a.m[b]=p,h=p.convertCodecs(b,l);case 4:t=h+a.A.addExtraFeaturesToSourceBuffer(h);Dg(a.K);try{w=a.l.addSourceBuffer(t)}catch(z){throw new R(2,3,3015,z,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");}a.F&&(w.mode=Lj);a.s.o(w,"error",function(){a.j[b][0].p.reject(new R(2,3,3014,a.i.error?a.i.error.code:0))});a.s.o(w,"updateend",function(){return Mj(a,b)});a.h[b]=w;a.I[b]=h;a.oa[b]=!!c.drmInfos.length;F(y)}})}
|
|
362
362
|
q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
363
363
|
function Kj(a,b,c,d){a.g||(a.g=new Ce(a.H),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.Y;a=a.X;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Ee[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):nd("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):nd("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.F=d)}
|
|
364
364
|
function Nj(a){return a.G?!1:a.l?"ended"==a.l.readyState:!0}function Oj(a,b){a.G||!Object.keys(a.h).length?a=null:b==Ic?a=a.g.g:(a=Pj(a,b),a=!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Wj(a,b){return a.G?null:b==Ic?a.g.h:Gi(Pj(a,b))}function Xj(a,b,c){if(a.G)return 0;if(b==Ic)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Pj(a,b);return Ii(a,c)}
|
|
365
365
|
q.Ib=function(){var a={total:this.G?[]:Ji(this.i.buffered),audio:this.G?[]:Ji(Pj(this,"audio")),video:this.G?[]:Ji(Pj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Pj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
366
|
-
function Yj(a,b,c,d,e,f){var g=null,h=Fb(c);if(le.includes(e))f=Qi(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ra([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ua&&d.ua.timescale){var k=d.ua.timescale;if(!isNaN(k)){var l=0,m=!1;(new
|
|
366
|
+
function Yj(a,b,c,d,e,f){var g=null,h=Fb(c);if(le.includes(e))f=Qi(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ra([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ua&&d.ua.timescale){var k=d.ua.timescale;if(!isNaN(k)){var l=0,m=!1;(new Jg).box("moof",Og).box("traf",Og).T("tfdt",function(n){l=Ti(n.reader,
|
|
367
367
|
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!uj(h)||(a.L?a.L.clearData():a.L=new nj,h=a.L.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ra(h,f,d?d.endTime:null));return g}
|
|
368
368
|
function Zj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,r,p,t,w,y,z,v,B,A;return L(function(C){switch(C.g){case 1:m=Kc;if(b!=m.Ca){C.B(2);break}if(!a.F){C.B(3);break}return D(C,a.sa,4);case 4:n=C.h,a.g.u=n;case 3:return D(C,Fe(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.ka()[0]:null),5);case 5:return C.return();case 2:if(l||!a.u){C.B(6);break}return D(C,Zj(a,m.Z,c,d,e,f,g,h,k,!0),7);case 7:return D(C,Zj(a,m.va,c,d,e,f,g,h,k,!0),8);case 8:return C.return();
|
|
369
369
|
case 6:if(!a.h[b])return C.return();r=a.h[b].timestampOffset;p=a.I[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(t=Yj(a,b,c,d,p,r),null!=t&&(w=d.startTime-t,y=Math.abs(r-w),(.001<=y||g||h)&&(!k||0<w||!r)&&(r=w,a.ma&&(ak(a,b,function(){return bk(a,b)}),ak(a,b,function(){return ck(a,b,r)}))),z=b==m.va||!(m.va in a.h),a.F&&z&&a.sa.resolve(r)));f&&b==m.va&&(a.g||Kj(a,"application/cea-608",a.F,!1),a.J||(v=p.split(";",1)[0],a.J=new ud(v)),d?(B=a.J.i(c),B.length&&Je(a.g,B,d.startTime,d.endTime,r)):a.J.init(c,
|
|
370
|
-
h));if(!a.m[b]){C.B(9);break}return D(C,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=C.h;case 9:return c=dk(a,c,d?d.startTime:null,b),d&&a.F&&b!=m.Ca&&(g||h)&&(A=d.startTime,ak(a,b,function(){return bk(a,b)}),ak(a,b,function(){return ck(a,b,A)})),D(C,ak(a,b,function(){var E=c;if("video"==b&&a.P){var J=a.P;J.g&&J.g.appendBuffer(E,"video",J.
|
|
370
|
+
h));if(!a.m[b]){C.B(9);break}return D(C,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=C.h;case 9:return c=dk(a,c,d?d.startTime:null,b),d&&a.F&&b!=m.Ca&&(g||h)&&(A=d.startTime,ak(a,b,function(){return bk(a,b)}),ak(a,b,function(){return ck(a,b,A)})),D(C,ak(a,b,function(){var E=c;if("video"==b&&a.P){var J=a.P;J.g&&J.g.appendBuffer(E,"video",J.s,-r)}a.h[b].appendBuffer(E)}),11);case 11:F(C)}})}function ek(a,b){var c=Wj(a,"video")||0;He(a.g,b,c)}function fk(a){a.g&&He(a.g,"",0)}
|
|
371
371
|
q.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Kc,a==e.Ca?D(f,d.g.remove(b,c),0):D(f,ak(d,a,function(){return gk(d,a,b,c)}),4)):d.u?D(f,ak(d,e.Z,function(){return gk(d,e.Z,b,c)}),0):f.B(0)})};function hk(a,b){var c;return L(function(d){return 1==d.g?(c=Kc,b==c.Ca?a.g?D(d,a.g.remove(0,Infinity),0):d.return():D(d,ak(a,b,function(){return gk(a,b,0,a.l.duration)}),4)):a.u?D(d,ak(a,c.Z,function(){return gk(a,c.Z,0,a.l.duration)}),0):d.B(0)})}
|
|
372
372
|
q.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Kc,a==c.Ca?d.return():D(d,ak(b,a,function(){b.i.currentTime-=.001;Mj(b,a)}),2)):b.u?D(d,ak(b,c.Z,function(){var e=c.Z;b.i.currentTime-=.001;Mj(b,e)}),0):d.B(0)})};
|
|
373
373
|
function ik(a,b,c,d,e,f,g,h,k){var l,m,n;return L(function(r){if(1==r.g){l=Kc;if(b==l.Ca)return f||(a.g.u=c),Ge(a.g,d,e),r.return();m=[];return D(r,jk(a,b,g,h,k),2)}n=r.h;n||(m.push(ak(a,b,function(){return bk(a,b)})),a.u&&m.push(ak(a,l.Z,function(){return bk(a,l.Z)})));f||(m.push(ak(a,b,function(){return ck(a,b,c)})),a.u&&m.push(ak(a,l.Z,function(){return ck(a,l.Z,c)})));m.push(ak(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Mj(a,b)}));a.u&&m.push(ak(a,
|
|
374
374
|
l.Z,function(){var p=l.Z;a.h[p].appendWindowStart=0;a.h[p].appendWindowEnd=e;a.h[p].appendWindowStart=d;Mj(a,p)}));return D(r,Promise.all(m),0)})}function kk(a,b,c){var d;return L(function(e){if(1==e.g){d=Kc;if(b==d.Ca)return e.return();b==d.va&&(a.sa=new fg);ak(a,b,function(){return bk(a,b)});a.u&&ak(a,d.Z,function(){return bk(a,d.Z)});return D(e,ak(a,b,function(){return ck(a,b,c)}),2)}return a.u?D(e,ak(a,d.Z,function(){return ck(a,d.Z,c)}),0):e.B(0)})}
|
|
375
|
-
q.endOfStream=function(a){var b=this;return L(function(c){return D(c,lk(b,function(){Nj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.
|
|
376
|
-
function bk(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Mj(a,b)}function ck(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Mj(a,b)}function Mj(a,b){if(!a.G){var c=a.j[b][0];c&&(c.p.resolve(),mk(a,b))}}function ak(a,b,c){
|
|
377
|
-
function lk(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:
|
|
375
|
+
q.endOfStream=function(a){var b=this;return L(function(c){return D(c,lk(b,function(){Nj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.yb=function(a){var b=this;return L(function(c){return D(c,lk(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new fg};b.j[d].unshift(e)}b.l.duration=a;b.S=a}),0)})};q.getDuration=function(){return this.l.duration};function gk(a,b,c,d){d<=c?Mj(a,b):a.h[b].remove(c,d)}
|
|
376
|
+
function bk(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Mj(a,b)}function ck(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Mj(a,b)}function Mj(a,b){if(!a.G){var c=a.j[b][0];c&&(c.p.resolve(),mk(a,b))}}function ak(a,b,c){Dg(a.K);c={start:c,p:new fg};a.j[b].push(c);1==a.j[b].length&&nk(a,b);return c.p}
|
|
377
|
+
function lk(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:Dg(a.K);c=[];d={};for(e in a.h)d.rd=new fg,f={start:function(m){return function(){return m.rd.resolve()}}(d),p:d.rd},a.j[e].push(f),c.push(d.rd),1==a.j[e].length&&f.start(),d={rd:d.rd};ra(l,2);return D(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=ua(l),g;case 3:return ra(l,5,6),D(l,b(),6);case 6:va(l);for(h in a.h)mk(a,h);wa(l,0);break;case 5:throw k=ua(l),new R(2,3,3015,k,a.i.error||"No error in the media element");
|
|
378
378
|
}})}function mk(a,b){a.j[b].shift();nk(a,b)}function nk(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new R(2,3,3017,b)):c.p.reject(new R(2,3,3015,d,a.i.error||"No error in the media element")),mk(a,b)}}function dk(a,b,c,d){var e=a.oa[d];a.A.insertFakeEncryptionInInit&&null==c&&e&&(Wb()||Ub()||ec())&&"mp4"==qe(a.I[d])&&(b=wi(b));return b}
|
|
379
379
|
function ok(a,b,c,d){return ak(a,b,function(){b!==Ic&&(ld()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.I[b]=c),Mj(a,b))})}
|
|
380
|
-
function pk(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G;return L(function(H){switch(H.g){case 1:c=Kc;a.G=!0;a.u=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.$&&(a.i.autoplay=!1);sa(H,2);a.
|
|
381
|
-
Promise.all(g),4);case 4:return a.m={},a.h={},y=a.l.duration,a.M=new fg,a.l=Fj(a,a.M),D(H,a.M,5);case 5:!isNaN(y)&&y?a.l.duration=y:!isNaN(a.S)&&a.S&&(a.l.duration=a.S),z=new fg,v=a.l.sourceBuffers,B=b.size,A=0,C=function(){A++;A===B&&(z.resolve(),a.
|
|
382
|
-
break;case 2:va(H),a.G=!1,
|
|
380
|
+
function pk(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G;return L(function(H){switch(H.g){case 1:c=Kc;a.G=!0;a.u=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.$&&(a.i.autoplay=!1);sa(H,2);a.s.mb();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(Le)),n=u(l.slice(1)),r=n.next();!r.done;r=n.next())p=r.value,p.p.reject(new R(2,7,7003,void 0));for(t in a.h){w=a.h[t];try{a.l.removeSourceBuffer(w)}catch(K){}}return D(H,
|
|
381
|
+
Promise.all(g),4);case 4:return a.m={},a.h={},y=a.l.duration,a.M=new fg,a.l=Fj(a,a.M),D(H,a.M,5);case 5:!isNaN(y)&&y?a.l.duration=y:!isNaN(a.S)&&a.S&&(a.l.duration=a.S),z=new fg,v=a.l.sourceBuffers,B=b.size,A=0,C=function(){A++;A===B&&(z.resolve(),a.s.Ya(v,"addsourcebuffer",C))},a.s.o(v,"addsourcebuffer",C),E=u(b.keys()),J=E.next();case 6:if(J.done)return a.i.currentTime=d,D(H,z,2);I=J.value;G=b.get(I);return D(H,Jj(a,I,G,G.codecs),9);case 9:a.u?(a.j[c.Z]=[],a.j[c.va]=[]):a.j[I]=[];J=E.next();H.B(6);
|
|
382
|
+
break;case 2:va(H),a.G=!1,Dg(a.K),a.s.na(a.i,"canplaythrough",function(){a.K.g||(a.i.autoplay=e,f||a.i.play())}),wa(H,0)}})}function qk(a,b){return lk(a,function(){return pk(a,b)})}
|
|
383
383
|
function jk(a,b,c,d,e){var f,g,h,k,l,m,n,r,p,t,w,y,z,v,B;return L(function(A){if(1==A.g){f=Kc;if(b==f.Ca)return A.return(!1);g=xe(Ae(a.I[b]));h=ye(a.I[b]);l=!1;m=ke(c,d);n=a.A.forceTransmux;if(!jd(m)||!a.F&&le.includes(m))n=!0;n&&(r=me(c,d),p=ee(r))&&(k=p(),t=Gc(f.Z,(d||"").split(",")),w=Gc(f.va,(d||"").split(",")),t&&w?(l=!0,y=w,b==f.Z&&(y=t),m=k.convertCodecs(b,me(c,y))):m=k.convertCodecs(b,r));z=xe(Ae(m));v=ye(m);if(g===z&&h===v)return A.return(!1);B=!0;if(a.u||l&&k&&!a.m[b])B=!1;if(B&&"smooth"===
|
|
384
|
-
a.A.codecSwitchingStrategy&&ld())return D(A,ok(a,b,m,k),3);k&&k.destroy();return D(A,qk(a,e),3)}return A.return(!0)})}function rk(a,b,c,d){if(b==Ic)var e=!1;else{e=xe(Ae(a.I[b]));var f=ye(a.I[b]),g=ke(c,d),h=a.A.forceTransmux;if(!jd(g)||!a.F&&le.includes(g))h=!0;c=me(c,d);h&&(h=ee(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=xe(Ae(g));g=ye(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ld()||a.u:!1}var Hj=window.URL.createObjectURL,Lj="sequence";function sk(a,b,c){this.i=a;this.u=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.H=!0;this.I=0;this.G=void 0===c?!0:c;this.J=0;this.
|
|
385
|
-
q.Gh=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Me(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.
|
|
386
|
-
q.Td=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Me(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.
|
|
384
|
+
a.A.codecSwitchingStrategy&&ld())return D(A,ok(a,b,m,k),3);k&&k.destroy();return D(A,qk(a,e),3)}return A.return(!0)})}function rk(a,b,c,d){if(b==Ic)var e=!1;else{e=xe(Ae(a.I[b]));var f=ye(a.I[b]),g=ke(c,d),h=a.A.forceTransmux;if(!jd(g)||!a.F&&le.includes(g))h=!0;c=me(c,d);h&&(h=ee(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=xe(Ae(g));g=ye(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ld()||a.u:!1}var Hj=window.URL.createObjectURL,Lj="sequence";function sk(a,b,c){this.i=a;this.u=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.H=!0;this.I=0;this.G=void 0===c?!0:c;this.J=0;this.s=!1;this.F=null}q=sk.prototype;q.getDuration=function(){return this.j};q.Ti=function(){return this.g};q.Rh=function(a){this.i=a};q.yb=function(a){this.j=a};q.Wi=function(){return this.i};q.Nh=function(a){this.A=a};q.gd=function(a){this.H=a};q.$e=function(a){this.m=a};q.ze=function(){return this.m};q.Dg=function(a){this.u=a};q.Li=function(){return this.u};
|
|
385
|
+
q.Gh=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Me(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.s&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
386
|
+
q.Td=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Me(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.s&&(this.i=d-this.h-this.g)}};q.Ge=function(){this.s=!0};q.uj=function(){return this.s};q.Ph=function(a){this.F=a};q.Oi=function(){return this.F};
|
|
387
387
|
q.Me=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.og=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.H};q.Ac=function(){return Infinity!=this.j&&!this.H};q.Lb=function(){return Math.max(this.I,this.ic()-this.m)};q.Uh=function(a){this.I=a};
|
|
388
388
|
q.ic=function(){return this.U()||this.Ac()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.J,this.j):this.h?Math.min(this.h,this.j):this.j};q.Jd=function(a){var b=Math.max(this.l,this.I);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.ic()-this.m+a,this.Kb()))};q.wc=function(){return this.Jd(0)};q.Kb=function(){return Math.max(0,this.ic()-(this.U()||this.Ac()?this.u:0))};q.$h=function(){return null==this.i||null!=this.h&&this.G?!1:!0};
|
|
389
389
|
q.Mh=function(a){this.J=a};N("shaka.media.PresentationTimeline",sk);sk.prototype.setAvailabilityTimeOffset=sk.prototype.Mh;sk.prototype.usingPresentationStartTime=sk.prototype.$h;sk.prototype.getSeekRangeEnd=sk.prototype.Kb;sk.prototype.getSeekRangeStart=sk.prototype.wc;sk.prototype.getSafeSeekRangeStart=sk.prototype.Jd;sk.prototype.getSegmentAvailabilityEnd=sk.prototype.ic;sk.prototype.setUserSeekStart=sk.prototype.Uh;sk.prototype.getSegmentAvailabilityStart=sk.prototype.Lb;
|
|
390
390
|
sk.prototype.isInProgress=sk.prototype.Ac;sk.prototype.isLive=sk.prototype.U;sk.prototype.offset=sk.prototype.offset;sk.prototype.notifyMaxSegmentDuration=sk.prototype.og;sk.prototype.notifyMinSegmentStartTime=sk.prototype.Me;sk.prototype.getInitialProgramDateTime=sk.prototype.Oi;sk.prototype.setInitialProgramDateTime=sk.prototype.Ph;sk.prototype.isStartTimeLocked=sk.prototype.uj;sk.prototype.lockStartTime=sk.prototype.Ge;sk.prototype.notifySegments=sk.prototype.Td;sk.prototype.notifyTimeRange=sk.prototype.Gh;
|
|
391
|
-
sk.prototype.getDelay=sk.prototype.Li;sk.prototype.setDelay=sk.prototype.Dg;sk.prototype.getSegmentAvailabilityDuration=sk.prototype.ze;sk.prototype.setSegmentAvailabilityDuration=sk.prototype.$e;sk.prototype.setStatic=sk.prototype.gd;sk.prototype.setClockOffset=sk.prototype.Nh;sk.prototype.getPresentationStartTime=sk.prototype.Wi;sk.prototype.setDuration=sk.prototype.
|
|
392
|
-
sk.prototype.getDuration=sk.prototype.getDuration;function tk(a,b,c){this.j=c;this.l=a;this.u=uk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.
|
|
393
|
-
function yk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=uk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.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.
|
|
394
|
-
null!=d&&(0!=d||a.
|
|
395
|
-
function Fk(a,b){0<a.g.readyState?Gk(a.i,b):zk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Dk(a,a.j())})}function Dk(a,b){.001>Math.abs(a.g.currentTime-b)?Hk(a):(a.h.na(a.g,"seeking",function(){Hk(a)}),Gk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Hk(a){a.
|
|
391
|
+
sk.prototype.getDelay=sk.prototype.Li;sk.prototype.setDelay=sk.prototype.Dg;sk.prototype.getSegmentAvailabilityDuration=sk.prototype.ze;sk.prototype.setSegmentAvailabilityDuration=sk.prototype.$e;sk.prototype.setStatic=sk.prototype.gd;sk.prototype.setClockOffset=sk.prototype.Nh;sk.prototype.getPresentationStartTime=sk.prototype.Wi;sk.prototype.setDuration=sk.prototype.yb;sk.prototype.setPresentationStartTime=sk.prototype.Rh;sk.prototype.getMaxSegmentDuration=sk.prototype.Ti;
|
|
392
|
+
sk.prototype.getDuration=sk.prototype.getDuration;function tk(a,b,c){this.j=c;this.l=a;this.u=uk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.A=b;this.i=function(){}}tk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function vk(a,b){a.i=b}function wk(a){this.g=a}function uk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=u(Ji(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function xk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.F=b;this.u=c;this.l=new ed;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.s=!1;this.l.o(a,"waiting",function(){return yk(f)});this.m=(new Ob(function(){yk(f)})).ya(this.u.gapJumpTimerTime)}xk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.A=null};xk.prototype.rg=function(){this.s=!0;yk(this)};
|
|
393
|
+
function yk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=uk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.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 Q("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Ki(c,b,a.u.gapDetectionThreshold),
|
|
394
|
+
null!=d&&(0!=d||a.s))){e=c.start(d);if(Tb()||Ub())e=Math.ceil(100*(e+.01))/100;e>=a.F.Kb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.A(new Q("gapjumped")))}}}};function zk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ak.value().get(b),c.na(a,b,d))}var Ak=new Mb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bk(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new ed;this.i=new Ck(a);zk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Dk(e,e.j())})}Bk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Ek(a){return a.s?a.g.currentTime:a.j()}
|
|
395
|
+
function Fk(a,b){0<a.g.readyState?Gk(a.i,b):zk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Dk(a,a.j())})}function Dk(a,b){.001>Math.abs(a.g.currentTime-b)?Hk(a):(a.h.na(a.g,"seeking",function(){Hk(a)}),Gk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Hk(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
|
|
396
396
|
function Ck(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Ob(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ck.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Gk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ya(.1)};function Ik(a){this.g=a;this.j=!1;this.h=null;this.i=new ed}q=Ik.prototype;q.wf=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;zk(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.xf=function(a){this.h=this.j?this.h:a};q.le=function(){return(this.j?this.g.currentTime:this.h)||0};q.Xg=function(){return 0};
|
|
397
397
|
q.Wg=function(){return 0};q.Fh=function(){};
|
|
398
|
-
function Jk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.
|
|
398
|
+
function Jk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.s=Kk(a,c,f);this.j=new xk(a,b.presentationTimeline,c,this.s,f);this.h=new Bk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Ek(g.h);h=Lk(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Fk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
399
399
|
g.g.wc():g.g.Kb():0>h&&(h=g.g.Kb()+h);return Mk(g,Nk(g,h))});this.m=new Ob(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ek(g.h),k=g.g.wc(),l=g.g.Kb();3>l-k&&(k=l-3);h<k&&(h=Lk(g,h),g.i.currentTime=h)}})}q=Jk.prototype;q.wf=function(){this.m.ya(.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.xf=function(a){Fk(this.h,a)};
|
|
400
|
-
q.le=function(){var a=Ek(this.h);return 0<this.i.readyState&&!this.i.paused?Nk(this,a):a};q.Xg=function(){return this.
|
|
400
|
+
q.le=function(){var a=Ek(this.h);return 0<this.i.readyState&&!this.i.paused?Nk(this,a):a};q.Xg=function(){return this.s?this.s.s:0};q.Wg=function(){return this.j.G};q.Fh=function(){this.j.rg()};function Mk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
401
401
|
function Lk(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.wc(),f=a.g.Kb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Jd(c),k=a.g.Jd(d);c=a.g.Jd(c+d);return b>=g?Mk(a,b):b>f?f:b<e?Hi(a.i.buffered,k)?k:c:b>=h||Hi(a.i.buffered,b)?b:c}function Nk(a,b){var c=a.g.wc();if(b<c)return c;a=a.g.Kb();return b>a?a:b}
|
|
402
|
-
function Kk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new tk(new wk(a),b.stallThreshold,c);vk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ok(a){this.g=a;this.m=null;this.j=0;this.
|
|
403
|
-
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.j}return this.g.length&&a<this.g[0].startTime?this.j:null};q.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.
|
|
404
|
-
q.Je=function(a){if(!this.
|
|
405
|
-
q.Sc=function(a,b,c){c=void 0===c?!1:c;if(!this.
|
|
406
|
-
q.ef=function(a,b){var c=this;this.
|
|
402
|
+
function Kk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new tk(new wk(a),b.stallThreshold,c);vk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ok(a){this.g=a;this.m=null;this.j=0;this.s=!1}q=Ok.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.j};q.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.Bj=function(){this.s=!0};q.Tc=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
403
|
+
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.j}return this.g.length&&a<this.g[0].startTime?this.j:null};q.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.s)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
404
|
+
q.Je=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,x(a))}};q.Sd=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.Je(a);this.fb(b)};q.fb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
405
|
+
q.Sc=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.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Ci(a.startTime,b,a.G,a.Ta,a.za,a.ua,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.j=a.j,this.g[this.g.length-1]=b)}};
|
|
406
|
+
q.ef=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new Ob(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.ya(a))};Ok.prototype[Symbol.iterator]=function(){return this.Ub(0)};
|
|
407
407
|
Ok.prototype.Ub=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;d--;var e=this.get(d+1),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 Ta("No independent partial segment found!"),null}d++;f=g-1;break}}return new Pk(this,d,f,c)};function Qk(a,b,c){a=new Ci(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Ok([a])}
|
|
408
408
|
N("shaka.media.SegmentIndex",Ok);Ok.forSingleSegment=Qk;Ok.prototype.getIteratorForTime=Ok.prototype.Ub;Ok.prototype.updateEvery=Ok.prototype.ef;Ok.prototype.fit=Ok.prototype.Sc;Ok.prototype.evict=Ok.prototype.fb;Ok.prototype.mergeAndEvict=Ok.prototype.Sd;Ok.prototype.offset=Ok.prototype.offset;Ok.prototype.get=Ok.prototype.get;Ok.prototype.find=Ok.prototype.find;Ok.prototype.markImmutable=Ok.prototype.Bj;Ok.prototype.release=Ok.prototype.release;Ok.prototype.getNumEvicted=Ok.prototype.getNumEvicted;
|
|
409
|
-
Ok.prototype.getNumReferences=Ok.prototype.getNumReferences;function Pk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Pk.prototype.Ze=function(a){this.reverse=a};Pk.prototype.xi=function(){return this.h};Pk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.
|
|
410
|
-
Pk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.
|
|
409
|
+
Ok.prototype.getNumReferences=Ok.prototype.getNumReferences;function Pk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Pk.prototype.Ze=function(a){this.reverse=a};Pk.prototype.xi=function(){return this.h};Pk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.s&&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};
|
|
410
|
+
Pk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.s&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Pk);Pk.prototype.next=Pk.prototype.next;Pk.prototype.current=Pk.prototype.current;Pk.prototype.currentPosition=Pk.prototype.xi;
|
|
411
411
|
Pk.prototype.setReverse=Pk.prototype.Ze;function Rk(){Ok.call(this,[]);this.h=[]}na(Rk,Ok);q=Rk.prototype;q.clone=function(){var a=new Rk;a.h=this.h.slice();return a};q.release=function(){for(var a=u(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.Tc=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.Tc(a)};q.find=function(a){for(var b=0,c=u(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};
|
|
412
412
|
q.get=function(a){for(var b=0,c=u(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.Je=function(){};q.fb=function(){};q.Sd=function(){};q.Sc=function(){};q.ef=function(){};N("shaka.media.MetaSegmentIndex",Rk);Rk.prototype.updateEvery=Rk.prototype.ef;Rk.prototype.fit=Rk.prototype.Sc;Rk.prototype.mergeAndEvict=Rk.prototype.Sd;Rk.prototype.evict=Rk.prototype.fb;Rk.prototype.merge=Rk.prototype.Je;
|
|
413
|
-
Rk.prototype.offset=Rk.prototype.offset;Rk.prototype.get=Rk.prototype.get;Rk.prototype.find=Rk.prototype.find;Rk.prototype.forEachTopLevelReference=Rk.prototype.Tc;Rk.prototype.release=Rk.prototype.release;function Sk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ye();this.h=new Ob(function(){b.g.Eh(.25*b.i)})}Sk.prototype.release=function(){this.set(this.vc());this.h&&(this.h.stop(),this.h=null);this.g=null};Sk.prototype.set=function(a){this.i=a;Tk(this)};Sk.prototype.vc=function(){return this.g.vc()};function Tk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ye()!=b&&a.g.Gg(b);return}catch(c){}a.h.ya(.25);0!=a.g.ye()&&a.g.Gg(0)};function Uk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Ob(function(){Vk(b,!1)})).ya(.25)}Uk.prototype.release=function(){this.i.stop();for(var a=u(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Vk(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Wk(){this.g=null;this.h=[]}function Xk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Yk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Zk(){this.i=this.h=null;this.g=[]}function $k(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function al(){this.me=this.A=this.F=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.M=this.O=this.J=this.K=this.L=this.l=this.
|
|
413
|
+
Rk.prototype.offset=Rk.prototype.offset;Rk.prototype.get=Rk.prototype.get;Rk.prototype.find=Rk.prototype.find;Rk.prototype.forEachTopLevelReference=Rk.prototype.Tc;Rk.prototype.release=Rk.prototype.release;function Sk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ye();this.h=new Ob(function(){b.g.Eh(.25*b.i)})}Sk.prototype.release=function(){this.set(this.vc());this.h&&(this.h.stop(),this.h=null);this.g=null};Sk.prototype.set=function(a){this.i=a;Tk(this)};Sk.prototype.vc=function(){return this.g.vc()};function Tk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ye()!=b&&a.g.Gg(b);return}catch(c){}a.h.ya(.25);0!=a.g.ye()&&a.g.Gg(0)};function Uk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Ob(function(){Vk(b,!1)})).ya(.25)}Uk.prototype.release=function(){this.i.stop();for(var a=u(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Vk(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Wk(){this.g=null;this.h=[]}function Xk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Yk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Zk(){this.i=this.h=null;this.g=[]}function $k(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function al(){this.me=this.A=this.F=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.M=this.O=this.J=this.K=this.L=this.l=this.s=NaN;this.g=new Wk;this.h=new Zk};function bl(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function cl(a,b){a.j=b;a=u(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
414
414
|
function dl(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.Ub(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.za&&(c=!1);2==d.xc()&&(c=!1);c&&d.ua&&el(a,d.ua);c&&!a.g.has(d)&&(c=new fl(a.j),gl(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.Ud&&d.Fe)break;d=b.next().value}hl(a)}}}
|
|
415
415
|
function el(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return Bi(d,b)})){var c=new fl(a.j);gl(c,b,a.h);a.i.set(b,c)}}function il(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&jl(a,c)}function kl(a){il(a,a.g);il(a,a.i);a.l=0}bl.prototype.fb=function(a,b){b=void 0===b?!1:b;for(var c=u(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&jl(this,d);b&&hl(this)};
|
|
416
416
|
function hl(a){for(var b=Array.from(a.g.keys()),c={},d=u(a.i.keys()),e=d.next();!e.done;c={ee:c.ee},e=d.next())c.ee=e.value,b.some(function(f){return function(g){return Bi(g.ua,f.ee)}}(c))||jl(a,c.ee)}function ll(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&jl(a,d)}hl(a)}function ml(a,b){b&&b!==a.h&&(kl(a),a.h=b)}function jl(a,b){var c=a.g;b instanceof Ai&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function fl(a){this.g=a;this.Qe=this.Jg=null}
|
|
417
417
|
function gl(a,b,c){var d=new Uint8Array(0);a.Qe=a.g(b,c,function(e){return L(function(f){if(1==f.g)return 0<d.byteLength?d=Bc(d,e):d=e,a.Jg?D(f,a.Jg(d),3):f.B(0);d=new Uint8Array(0);F(f)})})}fl.prototype.abort=function(){this.Qe&&this.Qe.abort()};function nl(a){bb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Ob(function(){for(var c=b.i(),d=u(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ya(2)}na(nl,bb);nl.prototype.release=function(){this.g.clear();this.h.stop();bb.prototype.release.call(this)};function ol(a){bb.call(this);this.g=new Map;this.h=a}na(ol,bb);ol.prototype.release=function(){this.g.clear();bb.prototype.release.call(this)};function pl(a,b){var c=a.g.get(b);c||(c={Vd:[],hh:null,contentType:b},a.g.set(b,c));return c}function ql(a,b,c){var d=pl(a,b.contentType);rl(a,d);a={ng:b,position:c};d=d.Vd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
418
418
|
ol.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Vd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.ng;break a}}d=null}if(e=d)e=c.hh,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
419
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.hh=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function rl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Vd;b.Vd=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.Vd=[]};function sl(a,b,c,d,e){a=
|
|
420
|
-
function ul(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=u(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,vl(e),b.push(wl(e));f=u(a.
|
|
421
|
-
q.configure=function(a){this.h=a;this.K=new cg({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.ha&&(kl(b.ha),b.ha=null);b=u(this.
|
|
422
|
-
b.ha&&(kl(b.ha),b.ha=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ha&&(kl(b.ha),b.ha=null);b=u(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ha?(ll(c.ha,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.ha=null)):0<a.segmentPrefetchLimit&&(c.ha=xl(this,c.stream));a.disableAudioPrefetch||yl(this)};q.start=function(a){var b=this;return L(function(c){if(1==c.g)return D(c,zl(b,a||new Map),2);
|
|
419
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.hh=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function rl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Vd;b.Vd=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.Vd=[]};function sl(a,b,c,d,e){a=ug(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function tl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.F=1;this.u=this.j=null;this.J=0;this.H=!1;this.i=new Map;this.G=!1;this.K=null;this.A=!1;this.l=new Cg(function(){return ul(c)});this.L=Date.now()/1E3;this.s=new Map;this.I={projection:null,hfov:null}}q=tl.prototype;q.destroy=function(){return this.l.destroy()};
|
|
420
|
+
function ul(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=u(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,vl(e),b.push(wl(e));f=u(a.s.values());for(g=f.next();!g.done;g=f.next())h=g.value,kl(h);return D(k,Promise.all(b),2)}a.i.clear();a.s.clear();a.g=null;a.m=null;a.h=null;F(k)})}
|
|
421
|
+
q.configure=function(a){this.h=a;this.K=new cg({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.ha&&(kl(b.ha),b.ha=null);b=u(this.s.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,kl(this.s.get(c)),this.s.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Ic))&&
|
|
422
|
+
b.ha&&(kl(b.ha),b.ha=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ha&&(kl(b.ha),b.ha=null);b=u(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ha?(ll(c.ha,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.ha=null)):0<a.segmentPrefetchLimit&&(c.ha=xl(this,c.stream));a.disableAudioPrefetch||yl(this)};q.start=function(a){var b=this;return L(function(c){if(1==c.g)return D(c,zl(b,a||new Map),2);Dg(b.l);b.G=!0;F(c)})};
|
|
423
423
|
function Al(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Kc,a.J++,d=a.J,ra(l,2),D(l,hk(a.g.ea,c.Ca),4);case 4:ta(l,3);break;case 2:if(e=ua(l),a.g)a.g.onError(e);case 3:f=ke(b.mimeType,b.codecs),Kj(a.g.ea,f,a.m.sequenceMode,b.external),g=a.g.ea.H,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.J==d&&(k=Bl(a,b),a.i.set(c.Ca,k),Cl(a,k,0)),F(l)}})}function Dl(a){var b=a.i.get(Ic);b&&(vl(b),wl(b).catch(function(){}),a.i.delete(Ic));a.u=null}
|
|
424
424
|
function El(a,b){var c=0>a.g.Ra(),d=a.i.get("video");d&&d.ia&&d.ia.Ze(c);(d=a.i.get("audio"))&&d.ia&&d.ia.Ze(c);(d=a.i.get(Ic))&&d.ia&&d.ia.Ze(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Gc&&(Fl(a,b,!1,0,!1),c.Gc=d);else if(b=c.Gc)c.Gc=null,Fl(a,b,!0,0,!1)}function Gl(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.G&&(b.video&&Fl(a,b.video,c,d,e,f),b.audio&&Fl(a,b.audio,c,d,e,f))}
|
|
425
425
|
function Hl(a,b){L(function(c){if(1==c.g)return a.u=b,a.G?b.segmentIndex?c.B(2):D(c,b.createSegmentIndex(),2):c.return();Fl(a,b,!0,0,!1);F(c)})}
|
|
426
|
-
function Fl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ic?g&&(g.Gc&&(b.trickModeVideo?(g.Gc=b,b=b.trickModeVideo):g.Gc=null),g.stream!=b||e)&&(a.
|
|
426
|
+
function Fl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ic?g&&(g.Gc&&(b.trickModeVideo?(g.Gc=b,b=b.trickModeVideo):g.Gc=null),g.stream!=b||e)&&(a.s.has(b)?g.ha=a.s.get(b):g.ha&&ml(g.ha,b),b.type==Ic&&(e=ke(b.mimeType,b.codecs),Kj(a.g.ea,e,a.m.sequenceMode,b.external)),a.s.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ia=null,g.Yg=!!f,c&&(g.Cd?g.hf=!0:g.kb?(g.nc=!0,g.re=d,g.hf=!0):(vl(g),Il(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Jl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
427
427
|
Al(a,b)}
|
|
428
|
-
function Jl(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.
|
|
429
|
-
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.
|
|
430
|
-
q.Wd=function(){if(this.g)for(var a=this.g.xe(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.ia&&(e=c.ia.current());if(!e||e.startTime>a||e.endTime<a)c.ia=null;e=this.g.ea;e.G?e=!1:d==Ic?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Pj(e,d),e=Hi(e,a));e||((null!=Wj(this.g.ea,d)||c.kb)&&Kl(this,c),c.
|
|
428
|
+
function Jl(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.xb)return e.return();c=b.stream;d=b.xb;return c.segmentIndex?e.B(2):D(e,c.createSegmentIndex(),2)}if(b.xb!=d||b.stream!=c)return e.return();var f=a.g.xe();var g=Wj(a.g.ea,b.type),h=b.stream.segmentIndex.find(b.ib?b.ib.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.za?k.za-k.Ta:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ua)&&(h+=(k.za?k.za-k.Ta:null)||0),k=a.g.getBandwidthEstimate(),f=
|
|
429
|
+
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.xb.h.g>h?!0:!1):f=!1;f&&b.xb.abort();F(e)})}
|
|
430
|
+
q.Wd=function(){if(this.g)for(var a=this.g.xe(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.ia&&(e=c.ia.current());if(!e||e.startTime>a||e.endTime<a)c.ia=null;e=this.g.ea;e.G?e=!1:d==Ic?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Pj(e,d),e=Hi(e,a));e||((null!=Wj(this.g.ea,d)||c.kb)&&Kl(this,c),c.xb&&(c.xb.abort(),c.xb=null),d===Ic&&(d=this.g.ea,d.J&&d.J.g()),c.Wd=!0)}};
|
|
431
431
|
function Kl(a,b){b.Cd||b.nc||(b.kb?(b.nc=!0,b.re=0):null==Oj(a.g.ea,b.type)?null==b.Qb&&Cl(a,b,0):(vl(b),Il(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
432
|
-
function zl(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(r){if(1==r.g){c=Kc;if(!a.j)throw new R(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.Z,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.va,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Ca,a.u),e.add(a.u));f=a.g.ea;return D(r,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}
|
|
433
|
-
b.get(l.id),cl(n,function(p,t,w){return Ll(p,t,w||null,a.h.retryParameters,a.g.Zb)}),m.ha=n),a.i.set(k,m),Cl(a,m,0));F(r)})}function Bl(a,b){return{stream:b,type:b.type,ia:null,ha:xl(a,b),ib:null,Cc:null,kg:null,ig:null,hg:null,Gc:null,endOfStream:!1,kb:!1,Qb:null,nc:!1,re:0,hf:!1,Cd:!1,Wd:!0,wg:!1,Md:!1,
|
|
434
|
-
function xl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ic&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ic&&a.h.disableTextPrefetch)return null;if(a.
|
|
435
|
-
function yl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=u(a.m.variants),f=e.next();!f.done;d={bb:d.bb},f=e.next())if(d.bb=f.value,d.bb.audio)if(a.
|
|
436
|
-
(d.bb.audio.segmentIndex||d.bb.audio.createSegmentIndex(),a.
|
|
437
|
-
function Ml(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:
|
|
438
|
-
ua(h),D(h,Ol(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.G||!f.every(function(k){return k.endOfStream})){h.B(0);break}return D(h,a.g.ea.endOfStream(),10);case 10:
|
|
439
|
-
function Nl(a,b){if(Pl(b))return ek(a.g.ea,b.stream.originalId||""),null;b.type==Ic&&fk(a.g.ea);if(!a.g.ea.aa&&b.type!=Ic)return a.h.updateIntervalSeconds/2;var c=a.g.xe();if("audio"===b.type)for(var d=u(a.
|
|
440
|
-
!0,"video"==b.type&&(a=a.i.get(Ic))&&Pl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Ql(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=u(g);for(h=g.next();!h.done;h=g.next())h=h.value,Pl(h)||h.ia&&!h.ia.current()||(f=Math.min(f,h.ib?h.ib.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ha&&b.ia&&!a.
|
|
432
|
+
function zl(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(r){if(1==r.g){c=Kc;if(!a.j)throw new R(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.Z,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.va,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Ca,a.u),e.add(a.u));f=a.g.ea;return D(r,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}Dg(a.l);a.updateDuration();g=u(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Bl(a,l),b.has(l.id)&&(n=
|
|
433
|
+
b.get(l.id),cl(n,function(p,t,w){return Ll(p,t,w||null,a.h.retryParameters,a.g.Zb)}),m.ha=n),a.i.set(k,m),Cl(a,m,0));F(r)})}function Bl(a,b){return{stream:b,type:b.type,ia:null,ha:xl(a,b),ib:null,Cc:null,kg:null,ig:null,hg:null,Gc:null,endOfStream:!1,kb:!1,Qb:null,nc:!1,re:0,hf:!1,Cd:!1,Wd:!0,wg:!1,Md:!1,xb:null}}
|
|
434
|
+
function xl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ic&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ic&&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.ha)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new bl(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ll(d,e,f||null,a.h.retryParameters,a.g.Zb)}):null}
|
|
435
|
+
function yl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=u(a.m.variants),f=e.next();!f.done;d={bb:d.bb},f=e.next())if(d.bb=f.value,d.bb.audio)if(a.s.has(d.bb.audio)){if(f=a.s.get(d.bb.audio),ll(f,b),!(0<b&&c.some(function(h){return function(k){return Nc(h.bb.audio.language,k)}}(d)))){var g=a.i.get(d.bb.audio.type);f!==(g&&g.ha)&&kl(f);a.s.delete(d.bb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Nc(h.bb.audio.language,k)}}(d))||!(f=xl(a,d.bb.audio))||
|
|
436
|
+
(d.bb.audio.segmentIndex||d.bb.audio.createSegmentIndex(),a.s.set(d.bb.audio,f))}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.ea.yb(a):this.g.ea.yb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
437
|
+
function Ml(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:Dg(a.l);if(b.kb||null==b.Qb||b.Cd)return h.return();b.Qb=null;if(!b.nc){h.B(2);break}return D(h,Il(a,b,b.hf,b.re),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return D(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.kb||b.Qb||Cl(a,b,0),h.return();case 4:ra(h,6);d=Nl(a,b);null!=d&&(Cl(a,b,d),b.Md=!1);ta(h,7);break;case 6:return e=
|
|
438
|
+
ua(h),D(h,Ol(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.G||!f.every(function(k){return k.endOfStream})){h.B(0);break}return D(h,a.g.ea.endOfStream(),10);case 10:Dg(a.l),g=a.g.ea.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.yb(g),F(h)}})}
|
|
439
|
+
function Nl(a,b){if(Pl(b))return ek(a.g.ea,b.stream.originalId||""),null;b.type==Ic&&fk(a.g.ea);if(!a.g.ea.aa&&b.type!=Ic)return a.h.updateIntervalSeconds/2;var c=a.g.xe();if("audio"===b.type)for(var d=u(a.s.keys()),e=d.next();!e.done;e=d.next())e=a.s.get(e.value),e.fb(c,!0),dl(e,c);d=b.ib?b.ib.endTime:c;e=Xj(a.g.ea,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.F),g=a.m.presentationTimeline.getDuration()-d,h=Wj(a.g.ea,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
440
|
+
!0,"video"==b.type&&(a=a.i.get(Ic))&&Pl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Ql(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=u(g);for(h=g.next();!h.done;h=g.next())h=h.value,Pl(h)||h.ia&&!h.ia.current()||(f=Math.min(f,h.ib?h.ib.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ha&&b.ia&&!a.s.has(b.stream)&&(b.ha.fb(c),dl(b.ha,e.startTime));Rl(a,b,c,e).catch(function(){});
|
|
441
441
|
return null}function Ql(a,b,c,d){if(b.ia)return b.ia.current();if(b.ib||d)return b.ia=b.stream.segmentIndex.Ub(b.ib?b.ib.endTime:d,!1,0>a.g.Ra()),b.ia&&b.ia.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ra();var f=null;d&&(b.ia=b.stream.segmentIndex.Ub(e,!1,a),f=b.ia&&b.ia.next().value);f||(b.ia=b.stream.segmentIndex.Ub(c,!1,a),f=b.ia&&b.ia.next().value);return f}
|
|
442
|
-
function Rl(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B;return L(function(A){switch(A.g){case 1:e=Kc;f=b.stream;g=b.ia;b.kb=!0;ra(A,2);if(2==d.xc())throw new R(1,1,1011);return D(A,Sl(a,b,d),4);case 4:
|
|
443
|
-
ra(H,2);n=Tl(n,C);E=!1;J=0;(new
|
|
444
|
-
return a.A?A.return():b.nc?(b.kb=!1,Cl(a,b,0),A.return()):D(A,Ul(a,b,c,f,d,y),10);case 10:b.ha&&b.ia&&dl(b.ha,d.startTime,!0);case 6:
|
|
442
|
+
function Rl(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B;return L(function(A){switch(A.g){case 1:e=Kc;f=b.stream;g=b.ia;b.kb=!0;ra(A,2);if(2==d.xc())throw new R(1,1,1011);return D(A,Sl(a,b,d),4);case 4:Dg(a.l);if(a.A)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=r=!1,w=function(C){var E,J,I,G;return L(function(H){switch(H.g){case 1:if(r)return H.return();p=!0;Dg(a.l);if(a.A)return H.return();
|
|
443
|
+
ra(H,2);n=Tl(n,C);E=!1;J=0;(new Jg).box("mdat",function(K){J=K.size+K.start;E=!0}).parse(n,!1,!0);if(!E){H.B(4);break}I=n.subarray(0,J);n=n.subarray(J);return D(H,Ul(a,b,c,f,d,I,!0),5);case 5:b.ha&&b.ia&&dl(b.ha,d.startTime,!0);case 4:ta(H,0);break;case 2:t=G=ua(H),F(H)}})},D(A,Vl(a,b,d,w),9);l=Vl(a,b,d);return D(A,l,7);case 7:m=A.h;Dg(a.l);if(a.A)return A.return();Dg(a.l);return b.nc?(b.kb=!1,Cl(a,b,0),A.return()):D(A,Ul(a,b,c,f,d,m),6);case 9:y=A.h;if(t)throw t;if(p){A.B(10);break}r=!0;Dg(a.l);
|
|
444
|
+
return a.A?A.return():b.nc?(b.kb=!1,Cl(a,b,0),A.return()):D(A,Ul(a,b,c,f,d,y),10);case 10:b.ha&&b.ia&&dl(b.ha,d.startTime,!0);case 6:Dg(a.l);if(a.A)return A.return();b.ib=d;g.next();b.kb=!1;b.wg=!1;z=a.g.ea.Ib();v=z[b.type];Ya(JSON.stringify(v));b.nc||a.g.rg(d,b.stream);Cl(a,b,0);ta(A,0);break;case 2:B=ua(A);Dg(a.l,B);if(a.A)return A.return();b.kb=!1;if(7001==B.code)b.kb=!1,vl(b),Cl(a,b,0),A.B(0);else if(b.type==e.Ca&&a.h.ignoreTextStreamFailures)a.i.delete(e.Ca),A.B(0);else if(3017==B.code)Wl(a,
|
|
445
445
|
b,B),A.B(0);else return b.Md=!0,1==B.category&&b.ha&&jl(b.ha,d),B.severity=2,D(A,Ol(a,b,B),0)}})}function Xl(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.B(2):D(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fb(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))})}
|
|
446
446
|
function Tl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Wl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.wg})){if(0<a.h.maxDisabledTime&&a.g.se(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.F);if(20<d)a.F-=.2;else if(4<d)a.F-=.04;else{b.Md=!0;a.A=!0;a.g.onError(c);return}b.wg=!0}Cl(a,b,4)}
|
|
447
447
|
function Sl(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w;return L(function(y){switch(y.g){case 1:d=Kc;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=xe(b.stream.codecs);k=ye(b.stream.mimeType);l=c.timestampOffset;if(l==b.kg&&f==b.ig&&g==b.hg&&h==b.jg&&k==b.yh){y.B(2);break}m=b.jg&&b.yh&&rk(a.g.ea,b.type,k,h);if(!m){y.B(3);break}n=null;b.type===d.va?n=a.i.get(d.Z):b.type===d.Z&&(n=a.i.get(d.va));if(!n){y.B(3);break}return D(y,wl(n).catch(function(){}),5);case 5:n.Cc=null,Kl(a,n);case 3:return r=
|
|
448
448
|
function(){var z,v,B;return L(function(A){if(1==A.g)return z=new Map,a.j.audio&&z.set(d.Z,a.j.audio),a.j.video&&z.set(d.va,a.j.video),ra(A,2),b.ig=f,b.hg=g,b.jg=h,b.yh=k,b.kg=l,v=a.m.sequenceMode||"HLS"==a.m.type,D(A,ik(a.g.ea,b.type,l,f,g,v,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=A.g)return ta(A,0);B=ua(A);b.ig=null;b.hg=null;b.jg=null;b.kg=null;throw B;})},D(y,r(),2);case 2:return Bi(c.ua,b.Cc)||(b.Cc=c.ua,c.l&&c.ua&&(p=Vl(a,b,c.ua),t=function(){var z,v,B,A,C,E,J;return L(function(I){switch(I.g){case 1:return ra(I,
|
|
449
|
-
2),D(I,p,4);case 4:return z=I.h,
|
|
450
|
-
|
|
449
|
+
2),D(I,p,4);case 4:return z=I.h,Dg(a.l),v=null,B=new Map,A={projection:null,hfov:null},C=new Jg,C.box("moov",Og).box("trak",Og).box("mdia",Og).T("mdhd",function(G){v=Ui(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);switch(G.Ec()){case "soun":B.set(d.Z,v);break;case "vide":B.set(d.va,v)}v=null}).box("minf",Og).box("stbl",Og).T("stsd",Qg).box("encv",Rg).box("avc1",Rg).box("avc3",Rg).box("hev1",Rg).box("hvc1",Rg).box("dvav",Rg).box("dva1",Rg).box("dvh1",Rg).box("dvhe",Rg).box("vexu",
|
|
450
|
+
Og).box("proj",Og).T("prji",function(G){G=G.reader.Ec();A.projection=G}).box("hfov",function(G){G=G.reader.R()/1E3;A.hfov=G}).parse(z),Yl(a,A),B.has(b.type)?c.ua.timescale=B.get(b.type):null!=v&&(c.ua.timescale=v),E=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,D(I,a.g.ah(b.type,z),5);case 5:return D(I,Zj(a.g.ea,b.type,z,null,b.stream,E),6);case 6:ta(I,0);break;case 2:throw J=ua(I),b.Cc=null,J;}})},a.g.Dj(c.startTime,c.ua),e.push(t()))),a.m.sequenceMode&&(w=b.ib?b.ib.j:null,c.j!=w&&e.push(kk(a.g.ea,
|
|
451
451
|
b.type,c.startTime))),D(y,Promise.all(e),0)}})}
|
|
452
|
-
function Ul(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.H;if(l||m)k=new
|
|
452
|
+
function Ul(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.H;if(l||m)k=new Jg;l&&k.T("emsg",function(t){var w=d.emsgSchemeIdUris;if(0===t.version){var y=t.reader.Ec();var z=t.reader.Ec();var v=t.reader.R();var B=t.reader.R();var A=t.reader.R();var C=t.reader.R();var E=e.startTime+B/v}else v=t.reader.R(),E=t.reader.ed()/
|
|
453
453
|
v+e.timestampOffset,B=E-e.startTime,A=t.reader.R(),C=t.reader.R(),y=t.reader.Ec(),z=t.reader.Ec();t=t.reader.Pb(t.reader.getLength()-t.reader.Na());if(w&&w.includes(y)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.Ej():(w=(new Map).set("detail",{startTime:E,endTime:E+A/v,schemeIdUri:y,value:z,timescale:v,presentationTimeDelta:B,eventDuration:A,id:C,messageData:t}),w=new Q("emsg",w),w.cancelable=!0,a.g.onEvent(w),w.defaultPrevented||"https://aomedia.org/emsg/ID3"!=y&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
454
454
|
y||(y=Qi(t),y.length&&e&&a.g.Fj([{cueTime:e.startTime,data:t,frames:y,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.T("prft",function(t){if(!a.H&&e.ua.timescale){var w=t.reader,y=t.version;w.R();t=w.R();var z=w.R();t=1E3*t+z/Math.pow(2,32)*1E3;0===y?w=w.R():(y=w.R(),w=w.R(),w=y*Math.pow(2,32)+w);t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+t)).getTime();w=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-w/e.ua.timescale*1E3)});w=new Q("prft",w);a.g.onEvent(w);
|
|
455
|
-
a.H=!0}});(l||m)&&k.parse(f);return D(p,Zl(a,b,c),2);case 2:return
|
|
455
|
+
a.H=!0}});(l||m)&&k.parse(f);return D(p,Zl(a,b,c),2);case 2:return Dg(a.l),n=b.Wd,b.Wd=!1,r=b.Yg,b.Yg=!1,D(p,a.g.ah(b.type,f),3);case 3:return D(p,Zj(a.g.ea,b.type,f,e,d,h,n,r,g),4);case 4:Dg(a.l),F(p)}})}function Zl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Oj(a.g.ea,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():D(h,a.g.ea.remove(b.type,e,e+g),2)}Dg(a.l);F(h)})}
|
|
456
456
|
function Pl(a){return a&&a.type==Ic&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
457
|
-
function Vl(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.Kd())return l.return(e);f=null;if(b.ha){var m=b.ha,n=m.g;c instanceof Ai&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Jg=d),f=m.Qe):f=null}f||(f=Ll(c,b.stream,d||null,a.h.retryParameters,a.g.Zb));g=0;b.ia&&(g=b.ia.h);b.
|
|
458
|
-
function Ll(a,b,c,d,e){var f=a instanceof Ci?a:void 0,g=f?1:0;a=sl(a.ka(),a.Ta,a.za,d,c);a.contentType=b.type;return e.request(
|
|
459
|
-
function Il(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.nc=!1,b.hf=!1,b.re=0,b.Cd=!0,b.ib=null,b.Cc=null,b.ia=null,b.ha&&!a.
|
|
460
|
-
function Cl(a,b,c){var d=b.type;if(d!=Ic||a.i.has(d))b.Qb=(new Nb(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),D(f,Ml(a,b),4);if(2!=f.g)return ta(f,0);e=ua(f);if(a.g)a.g.onError(e);F(f)})})).V(c)}function vl(a){null!=a.Qb&&(a.Qb.stop(),a.Qb=null)}function wl(a){return L(function(b){return a.
|
|
461
|
-
function Ol(a,b,c){var d;return L(function(e){if(1==e.g)return D(e,eg(a.K),2);
|
|
457
|
+
function Vl(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.Kd())return l.return(e);f=null;if(b.ha){var m=b.ha,n=m.g;c instanceof Ai&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Jg=d),f=m.Qe):f=null}f||(f=Ll(c,b.stream,d||null,a.h.retryParameters,a.g.Zb));g=0;b.ia&&(g=b.ia.h);b.xb=f;return D(l,f.promise,2);case 2:h=l.h;b.xb=null;k=h.data;if(!c.aesKey){l.B(3);break}return D(l,Xl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
458
|
+
function Ll(a,b,c,d,e){var f=a instanceof Ci?a:void 0,g=f?1:0;a=sl(a.ka(),a.Ta,a.za,d,c);a.contentType=b.type;return e.request(Ag,a,{type:g,stream:b,segment:f})}
|
|
459
|
+
function Il(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.nc=!1,b.hf=!1,b.re=0,b.Cd=!0,b.ib=null,b.Cc=null,b.ia=null,b.ha&&!a.s.has(b.stream)&&kl(b.ha),d?(e=a.g.xe(),f=a.g.ea.getDuration(),D(g,a.g.ea.remove(b.type,e+d,f),3)):D(g,hk(a.g.ea,b.type),4);if(3!=g.g)return Dg(a.l),c?D(g,a.g.ea.flush(b.type),3):g.B(3);Dg(a.l);b.Cd=!1;b.endOfStream=!1;b.kb||b.Qb||Cl(a,b,0);F(g)})}
|
|
460
|
+
function Cl(a,b,c){var d=b.type;if(d!=Ic||a.i.has(d))b.Qb=(new Nb(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),D(f,Ml(a,b),4);if(2!=f.g)return ta(f,0);e=ua(f);if(a.g)a.g.onError(e);F(f)})})).V(c)}function vl(a){null!=a.Qb&&(a.Qb.stop(),a.Qb=null)}function wl(a){return L(function(b){return a.xb?D(b,a.xb.abort(),0):b.B(0)})}
|
|
461
|
+
function Ol(a,b,c){var d;return L(function(e){if(1==e.g)return D(e,eg(a.K),2);Dg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.se(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
|
|
462
462
|
function $l(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.L<c)return h.return(!1);a.L=b;d=Kc;if(e=a.i.get(d.Z))e.Cc=null,Kl(a,e),wl(e).catch(function(){});if(f=a.i.get(d.va))f.Cc=null,Kl(a,f),wl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.Z,a.j.audio);a.j.video&&g.set(d.va,a.j.video);return D(h,qk(a.g.ea,g),2)}return h.return(!0)})}
|
|
463
463
|
function Yl(a,b){if(a.I.projection!=b.projection||a.I.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new Q("spatialvideoinfo",c)}else c=new Q("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.I=b}};function am(){}
|
|
464
464
|
function bm(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ne(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ne(l)),k=bm(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
|
|
@@ -481,20 +481,20 @@ preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",
|
|
|
481
481
|
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:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(nm(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
|
|
482
482
|
function om(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:""}};return bm(a,b,c||km(),d,"")}
|
|
483
483
|
function nm(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Wc(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Oc(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-
|
|
484
|
-
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=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ic&&"image"!=c.type||b.push(c);return b}function lm(a){return dm([a],a)}function mm(a){return dm([a],a)}N("shaka.util.PlayerConfiguration",jm);jm.mergeConfigObjects=om;jm.createDefault=km;function pm(a,b,c,d,e){bb.call(this);this.L=a;this.S=b;this.Ua=e.networkingEngine;this.X=d;this.
|
|
484
|
+
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=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ic&&"image"!=c.type||b.push(c);return b}function lm(a){return dm([a],a)}function mm(a){return dm([a],a)}N("shaka.util.PlayerConfiguration",jm);jm.mergeConfigObjects=om;jm.createDefault=km;function pm(a,b,c,d,e){bb.call(this);this.L=a;this.S=b;this.Ua=e.networkingEngine;this.X=d;this.s=null;this.Xb=c;this.Ka=0;this.Vb=e.Rc;this.u=e.yj;this.Wb=e.zj;this.g=e.config;this.j=this.F=this.h=null;this.qa=!1;this.G=e.Jj;this.Fa=!1;this.l=null;this.aa=!1;this.i=this.A=null;this.$=!1;this.K=new Map;this.Ja=!1;this.Za=e.Ij;this.Y=new al;this.oa=new fg;this.ma=new fg;this.M=new fg;this.H=new fg;this.H.catch(function(){});this.O=null;this.m=!1;this.Gb=e.pi;this.ra=null;this.$a=e.oi;this.P=!1;this.J=
|
|
485
485
|
[];this.I=[]}na(pm,bb);function qm(a,b,c){(a=b?a.I:a.J)?a.push(c):c()}function rm(a){if(a.I)for(var b=u(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function sm(a,b){a.O=b;a.P=!0;if(a.J){b=u(a.J);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.J=null}q=pm.prototype;q.getStartTime=function(){return this.X};q.Fd=function(){return this.L};q.Xf=function(){return this.h};function tm(a){a.$=!0;return a.i}function um(a){a.qa=!0;return a.j}function vm(a){a.Fa=!0;return a.G}q.getStats=function(){return this.Y};
|
|
486
486
|
function wm(a){a.aa=!0;return a.l}function xm(a){a.Ja=!0;return a.K}
|
|
487
|
-
q.start=function(){var a=this,b;return L(function(c){switch(c.g){case 1:return D(c,Promise.resolve(),2);case 2:return ra(c,3),D(c,ym(a),5);case 5:if(a.m)return c.return();a.oa.resolve();return D(c,zm(a),6);case 6:if(a.m)return c.return();a.ma.resolve();a.
|
|
488
|
-
a.g.manifest.dash.enableAudioGroups)
|
|
489
|
-
|
|
487
|
+
q.start=function(){var a=this,b;return L(function(c){switch(c.g){case 1:return D(c,Promise.resolve(),2);case 2:return ra(c,3),D(c,ym(a),5);case 5:if(a.m)return c.return();a.oa.resolve();return D(c,zm(a),6);case 6:if(a.m)return c.return();a.ma.resolve();a.s||(a.s=new Qf(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,
|
|
488
|
+
a.g.manifest.dash.enableAudioGroups));if(a.$a){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Gb){d=a.h.presentationTimeline.U();var e=vf(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(!0))a.ra=e,e.video&&Am(a,e.video,d),e.audio&&Am(a,e.audio,d)}return D(c,void 0,7);case 7:if(a.m)return c.return();a.M.resolve();ta(c,0);break;case 3:throw b=ua(c),a.H.reject(b),b;}})};
|
|
489
|
+
q.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):bb.prototype.dispatchEvent.call(this,a)};q.onError=function(a){2===a.severity&&(this.H.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new Q("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Bm(a,b){a.dispatchEvent(new Q("onstatechange",(new Map).set("state",b)))}
|
|
490
490
|
function ym(a){var b,c,d,e,f;return L(function(g){if(1==g.g){Bm(a,"manifest-parser");a.j||(a.F=ui(a.L,a.S),a.j=a.F(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Bm(a,"manifest");if(a.h)return g.B(2);c=a;return D(g,a.j.start(a.L,a.Wb),3)}2!=g.g&&(c.h=g.h);d=new Q("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new R(2,4,4036);Cm(a.h);e=Date.now()/1E3;f=e-b;a.Y.H=f;F(g)})}
|
|
491
|
-
function zm(a){var b,c,d,e,f;return L(function(
|
|
492
|
-
|
|
491
|
+
function zm(a){var b,c,d,e,f,g;return L(function(h){switch(h.g){case 1:Bm(a,"drm-engine");a.Ka=Date.now()/1E3;a.l=a.Vb();a.u.g=a.l;a.l.configure(a.g.drm);var k=a.u;b=Ue(a.h.variants,k.h.restrictions,k.i);return D(h,oi(a.u,a.h),2);case 2:c=h.h;if(!b&&!c){h.B(3);break}d=new Q("trackschanged",void 0);return D(h,Promise.resolve(),4);case 4:a.dispatchEvent(d);case 3:return e=vf(a.h.variants),D(h,Gh(a.l,e,a.h.offlineSessionIds),5);case 5:return D(h,oi(a.u,a.h),6);case 6:f=h.h;if(!f){h.B(0);break}g=new Q("trackschanged",
|
|
492
|
+
void 0);return D(h,Promise.resolve(),8);case 8:a.dispatchEvent(g),F(h)}})}q.configure=function(a,b){a=cm(a,b);om(this.g,a)};q.getConfiguration=function(){return Ne(this.g)};
|
|
493
493
|
function Am(a,b,c){var d,e,f,g,h;L(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new bl(d,b,function(l,m,n){return Ll(l,m,n||null,a.g.streaming.retryParameters,a.Ua)}),a.K.set(b.id,e),D(k,b.createSegmentIndex(),2);f=a.X||0;(h=(g=b.segmentIndex.Ub(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ua&&el(e,h.ua):dl(e,h.startTime));F(k)})}q.pk=function(){return Promise.race([this.M,this.H])};
|
|
494
494
|
q.destroy=function(){var a=this,b,c,d;return L(function(e){switch(e.g){case 1:a.m=!0;if(!a.j||a.qa){e.B(2);break}return D(e,a.j.stop(),2);case 2:if(!a.i||a.$){e.B(4);break}return D(e,a.i.stop(),4);case 4:a.G&&!a.Fa&&a.G.release();if(!a.l||a.aa){e.B(6);break}return D(e,a.l.destroy(),6);case 6:if(0<a.K.size&&!a.Ja)for(b=u(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,kl(d);F(e)}})};
|
|
495
|
-
function Cm(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))}N("shaka.media.PreloadManager",pm);pm.prototype.destroy=pm.prototype.destroy;pm.prototype.waitForFinish=pm.prototype.pk;function Dm(a,b){bb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Lc:null,Kc:Em,zc:function(d,e){return Fm(c,"enter",d,e)}},{Lc:Gm,Kc:Em,zc:function(d,e){return Fm(c,"enter",d,e)}},{Lc:Hm,Kc:Em,zc:function(d,e){return Fm(c,"enter",d,e)}},{Lc:Em,Kc:Gm,zc:function(d,e){return Fm(c,"exit",d,e)}},{Lc:Em,Kc:Hm,zc:function(d,e){return Fm(c,"exit",d,e)}},{Lc:Gm,Kc:Hm,zc:function(d,e){return Fm(c,"skip",d,e)}},{Lc:Hm,Kc:Gm,zc:function(d,e){return Fm(c,"skip",d,e)}}];this.h=new ed;this.h.
|
|
495
|
+
function Cm(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))}N("shaka.media.PreloadManager",pm);pm.prototype.destroy=pm.prototype.destroy;pm.prototype.waitForFinish=pm.prototype.pk;function Dm(a,b){bb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Lc:null,Kc:Em,zc:function(d,e){return Fm(c,"enter",d,e)}},{Lc:Gm,Kc:Em,zc:function(d,e){return Fm(c,"enter",d,e)}},{Lc:Hm,Kc:Em,zc:function(d,e){return Fm(c,"enter",d,e)}},{Lc:Em,Kc:Gm,zc:function(d,e){return Fm(c,"exit",d,e)}},{Lc:Em,Kc:Hm,zc:function(d,e){return Fm(c,"exit",d,e)}},{Lc:Gm,Kc:Hm,zc:function(d,e){return Fm(c,"skip",d,e)}},{Lc:Hm,Kc:Gm,zc:function(d,e){return Fm(c,"skip",d,e)}}];this.h=new ed;this.h.o(this.i,
|
|
496
496
|
"regionremove",function(d){c.g.delete(d.region)})}na(Dm,bb);Dm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;bb.prototype.release.call(this)};Dm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=u(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Gm:a>d.endTime?Hm:Em;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Lc==e&&h.Kc==f&&h.zc(d,b)}}};
|
|
497
|
-
function Fm(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Gm=1,Em=2,Hm=3;function Im(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:var n=(new ib(a)).jb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Jm[d])return m.return(e);f=0;g=
|
|
497
|
+
function Fm(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Gm=1,Em=2,Hm=3;function Im(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:var n=(new ib(a)).jb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Jm[d])return m.return(e);f=0;g=ug([a],c);ra(m,2);g.method="HEAD";return D(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=ua(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return D(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
498
498
|
e.toLowerCase().split(";").shift():"")}})}
|
|
499
499
|
var Jm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Km(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Km(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Lm(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Lm(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value;k=k.next().value;
|
|
500
500
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
@@ -504,8 +504,8 @@ q.append=function(a){var b=Mm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];v
|
|
|
504
504
|
c.indexOf(g)});a=u(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(Om(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
505
505
|
function Pm(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
506
506
|
function Om(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=u(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}N("shaka.text.SimpleTextDisplayer",Nm);Nm.prototype.setTextVisibility=Nm.prototype.setTextVisibility;Nm.prototype.isTextVisible=Nm.prototype.isTextVisible;Nm.prototype.destroy=Nm.prototype.destroy;Nm.prototype.append=Nm.prototype.append;Nm.prototype.remove=Nm.prototype.remove;Nm.prototype.configure=Nm.prototype.configure;function Qm(){}q=Qm.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};N("shaka.text.StubTextDisplayer",Qm);Qm.prototype.setTextVisibility=Qm.prototype.setTextVisibility;Qm.prototype.isTextVisible=Qm.prototype.isTextVisible;Qm.prototype.destroy=Qm.prototype.destroy;Qm.prototype.append=Qm.prototype.append;Qm.prototype.remove=Qm.prototype.remove;Qm.prototype.configure=Qm.prototype.configure;function Rm(){}function T(a){return document.createElement(a)}function Sm(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Tm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",Rm);Rm.removeAllChildren=Tm;function Um(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.u=b;this.l=null;this.g=T("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);c&&c.captionsUpdatePeriod||nd("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.G=(new Ob(function(){d.A.paused||Vm(d)})).ya(c&&
|
|
507
|
-
c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new ed;this.j.
|
|
508
|
-
q.append=function(a){var b=[].concat(x(this.h)),c={};a=u(a);for(var d=a.next();!d.done;c={be:c.be},d=a.next())c.be=d.value,b.some(function(e){return function(f){return Rd(f,e.be)}}(c))||this.h.push(c.be);Vm(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.
|
|
507
|
+
c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new ed;this.j.o(document,"fullscreenchange",function(){Vm(d,!0)});this.j.o(this.A,"seeking",function(){Vm(d,!0)});this.j.o(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){Vm(d,!0)}),this.s.observe(this.g));this.F=new Map}q=Um.prototype;q.configure=function(a){this.G&&this.G.ya(a.captionsUpdatePeriod)};
|
|
508
|
+
q.append=function(a){var b=[].concat(x(this.h)),c={};a=u(a);for(var d=a.next();!d.done;c={be:c.be},d=a.next())c.be=d.value,b.some(function(e){return function(f){return Rd(f,e.be)}}(c))||this.h.push(c.be);Vm(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()};
|
|
509
509
|
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});Vm(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function Wm(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
510
510
|
function Xm(a,b,c,d,e){var f=!1,g=[],h=[];b=u(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.di:null;l&&(g.push(l.Ff),l.Fc&&g.push(l.Fc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Wm(a,n)||(f=!0):(Ym(a,k,e),l=a.i.get(k),n=l.di,f=!0));0<k.nestedCues.length&&n&&Xm(a,k.nestedCues,n,d,e);e.pop()}if(f){d=u(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(r,p){return r.startTime!=
|
|
511
511
|
p.startTime?r.startTime-p.startTime:r.endTime-p.endTime});h=u(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.Fc?(d.Fc.contains(c)&&d.Fc.removeChild(c),c.appendChild(d.Fc),d.Fc.appendChild(d.Ff)):c.appendChild(d.Ff)}}function Vm(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=u(a.F.values());for(var d=b.next();!d.done;d=b.next())Tm(d.value);Tm(a.g);a.i.clear();a.F.clear()}a.m&&Xm(a,a.h,a.g,c,[])}}
|
|
@@ -525,88 +525,88 @@ function en(a,b,c){try{if(!a.g.enabled)return b;var d=fn(a);a:{switch(c.toLowerC
|
|
|
525
525
|
!0;var f=kn(d);return ln(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function fn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
526
526
|
function mn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,fn(a));c.pr=a.h.Ra();var e=c.ot===nn||c.ot===hn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=on(a,c);if(d)d=pn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=kn(a);f&&(b.uris=b.uris.map(function(g){return ln(g,f)}))}}}function on(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}
|
|
527
527
|
function qn(a){if(0===a.type)return rn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?hn:nn;if("audio"==b)return gn;if("text"==b)return"application/mp4"===a.mimeType?sn:tn}}function un(a,b){b=a.h.Ib()[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}
|
|
528
|
-
function vn(a,b){b=a.h.Ib()[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 wn(a,b){var c=a.h.
|
|
528
|
+
function vn(a,b){b=a.h.Ib()[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 wn(a,b){var c=a.h.sb();if(!c.length)return NaN;a=c[0];c=u(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 nn:return a.videoBandwidth||NaN;case gn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
529
529
|
function kn(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=u(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"===
|
|
530
530
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function pn(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=u(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=kn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
531
531
|
function ln(a,b){if(!b||a.includes("offline:"))return a;a=new ib(a);a.g.set("CMCD",b);return a.toString()}var jn="m",gn="a",nn="v",hn="av",rn="i",tn="c",sn="tt";N("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",gi:"s",OTHER:"o"});function xn(a){this.h=a;this.g=null}q=xn.prototype;q.configure=function(a){this.h=a};q.qh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(yn)?1E3*this.g.get(yn):null};q.ph=function(){return this.h.enabled&&this.g&&this.g.has(zn)?1E3*this.g.get(zn):null};q.Xi=function(){return this.h.enabled&&this.g&&this.g.has(An)?this.g.get(An):null};q.Yi=function(){return this.h.enabled&&this.g&&this.g.has(Bn)?this.g.get(Bn):null};
|
|
532
532
|
q.getBandwidthEstimate=function(a){var b=this.ph();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Cn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}N("shaka.util.CmsdManager",xn);xn.prototype.getBandwidthEstimate=xn.prototype.getBandwidthEstimate;xn.prototype.getRoundTripTime=xn.prototype.Yi;xn.prototype.getResponseDelay=xn.prototype.Xi;xn.prototype.getEstimatedThroughput=xn.prototype.ph;
|
|
533
|
-
xn.prototype.getMaxBitrate=xn.prototype.qh;var zn="etp",yn="mb",An="rd",Bn="rtt";function
|
|
534
|
-
null;this.qa=new Qf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ja=this.h.preferredTextLanguage;this.Xb=this.h.preferredTextRole;this.Wb=this.h.preferForcedSubs;this.Vb=[];b&&b(this);this.P=Un(this);this.X=new xn(this.h.cmsd);this.
|
|
535
|
-
Vn(this);this.
|
|
536
|
-
function $n(a,b){if(b.lcevc.enabled){var c=a.
|
|
537
|
-
q.destroy=function(){var a=this,b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(a.l==bo)return g.return();Zn(a);b=a.detach();a.l=bo;return D(g,b,2);case 2:c=[];d=u(a.Sg);for(e=d.next();!e.done;e=d.next())f=e.value,f.m||c.push(f.destroy());a.Sg=[];return D(g,Promise.all(c),3);case 3:a.df&&(a.df.release(),a.df=null);a.Gb&&(a.Gb.release(),a.Gb=null);a.m&&(a.m.release(),a.m=null);a.ra&&(a.ra.release(),a.ra=null);a.ma=null;a.h=null;a.u=null;a.Oe=null;a.P=null;a.X=null;if(!a.
|
|
538
|
-
a.
|
|
533
|
+
xn.prototype.getMaxBitrate=xn.prototype.qh;var zn="etp",yn="mb",An="rd",Bn="rtt";function Dn(){this.g=null;this.h=[]}function Rn(a,b){return L(function(c){if(1==c.g)return a.g?D(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;F(c)})}Dn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function V(a,b){bb.call(this);var c=this;this.l=Sn;this.Oe=this.g=null;this.$=!1;this.df=new ed;this.Gb=new ed;this.m=new ed;this.ra=new ed;this.G=this.H=this.F=this.I=null;this.gf=0;this.S=new Dn;this.aa=this.Rg=this.oa=this.i=this.Fa=this.K=this.j=this.Za=this.L=this.Vg=this.X=this.P=this.$a=this.M=this.Se=this.J=this.Ua=null;this.Ka=!1;this.ma=this.s=null;this.Ug=1E9;this.Rd=[];this.O=NaN;this.h=Tn(this);this.Y={width:Infinity,height:Infinity};this.Le=new ni(this.h,this.Y,null);this.Sg=[];this.u=
|
|
534
|
+
null;this.qa=new Qf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ja=this.h.preferredTextLanguage;this.Xb=this.h.preferredTextRole;this.Wb=this.h.preferForcedSubs;this.Vb=[];b&&b(this);this.P=Un(this);this.X=new xn(this.h.cmsd);this.I=
|
|
535
|
+
Vn(this);this.I.Fg(this.h.streaming.forceHTTPS);this.A=null;Wn&&(this.A=Wn(),this.A.configure(this.h.ads));this.df.o(window,"online",function(){Xn(c);c.xg()});this.Te=new Ob(function(){return Yn(c)});a&&(nd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Pc(a,!0))}na(V,bb);function Zn(a){null!=a.L&&(wj(a.L),a.L.release(),a.L=null)}
|
|
536
|
+
function $n(a,b){if(b.lcevc.enabled){var c=a.sb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Sb()||Tb())&&(b.mediaSource.forceTransmux||Ua("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Zn(a);null==a.L&&(a.L=new vj(a.g,a.Vg,b.lcevc),a.H&&(a.H.P=a.L))}else Zn(a)}function ao(a,b){return new Q(a,b)}q=V.prototype;
|
|
537
|
+
q.destroy=function(){var a=this,b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(a.l==bo)return g.return();Zn(a);b=a.detach();a.l=bo;return D(g,b,2);case 2:c=[];d=u(a.Sg);for(e=d.next();!e.done;e=d.next())f=e.value,f.m||c.push(f.destroy());a.Sg=[];return D(g,Promise.all(c),3);case 3:a.df&&(a.df.release(),a.df=null);a.Gb&&(a.Gb.release(),a.Gb=null);a.m&&(a.m.release(),a.m=null);a.ra&&(a.ra.release(),a.ra=null);a.ma=null;a.h=null;a.u=null;a.Oe=null;a.P=null;a.X=null;if(!a.I){g.B(4);break}return D(g,
|
|
538
|
+
a.I.destroy(),5);case 5:a.I=null;case 4:a.s&&(a.s.release(),a.s=null),bb.prototype.release.call(a),F(g)}})};
|
|
539
539
|
function co(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Vb("Trident/"))return!1;var a=ic();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Pb()?!0:Qb("application/x-mpegurl")}function eo(a,b){a.dispatchEvent(ao("onstatechange",(new Map).set("state",b)))}
|
|
540
|
-
q.Pc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==bo)throw new R(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.B(2);break}return D(g,c.detach(),2);case 2:return D(g,fo(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(eo(c,"attach"),e=function(){var h=go(c);h&&ho(c,h)},c.Gb.
|
|
540
|
+
q.Pc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==bo)throw new R(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.B(2);break}return D(g,c.detach(),2);case 2:return D(g,fo(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(eo(c,"attach"),e=function(){var h=go(c);h&&ho(c,h)},c.Gb.o(a,"error",e),c.g=a);if(!b||!Pb()||c.H){g.B(6);break}return D(g,io(c),6);case 6:va(g);c.S.release();wa(g,0);break;case 5:return f=ua(g),D(g,c.detach(),10);case 10:throw f;
|
|
541
541
|
}})};q.Zg=function(a){this.Vg=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==bo)throw new R(2,7,7E3);return D(c,b.Ic(!1,a),2)}if(3!=c.g)return D(c,fo(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Gb.mb(),b.g=null),eo(b,"detach"),b.A&&!a&&b.A.release()}finally{b.S.release()}F(c)})};function fo(a,b){var c;return L(function(d){return 1==d.g?(c=++a.gf,D(d,Rn(a.S,b),2)):c!=a.gf?(a.S.release(),d.return(!0)):d.return(!1)})}
|
|
542
542
|
q.Ic=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return L(function(r){switch(r.g){case 1:return c.l!=bo&&(c.l=Sn),D(r,fo(c,"unload"),2);case 2:if(r.h)return r.return();sa(r,3);c.Ka=!1;eo(c,"unload");a&&!Pb()&&(a=!1);Zn(c);d=c.Vb.map(function(p){return p()});c.Vb=[];return D(r,Promise.all(d),5);case 5:c.dispatchEvent(ao("unloading"));c.$a&&(c.$a.release(),c.$a=null);c.g&&(c.m.mb(),c.ra.mb());c.Te.stop();c.Ua&&(c.Ua.release(),c.Ua=null);c.Se&&(c.Se.stop(),c.Se=null);
|
|
543
|
-
if(!c.K){r.B(6);break}return D(r,c.K.stop(),7);case 7:c.K=null,c.Fa=null;case 6:if(!c.
|
|
543
|
+
if(!c.K){r.B(6);break}return D(r,c.K.stop(),7);case 7:c.K=null,c.Fa=null;case 6:if(!c.s){r.B(8);break}return D(r,c.s.stop(),8);case 8:if(!c.j){r.B(10);break}return D(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.J&&(c.J.release(),c.J=null);c.G&&(c.G.release(),c.G=null);if(!c.H){r.B(12);break}return D(r,c.H.destroy(),13);case 13:c.H=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.X&&(c.X.g=null);c.g&&Tm(c.g);if(!c.g||!c.g.src){r.B(14);break}return D(r,new Promise(function(p){return(new Ob(p)).V(.1)}),
|
|
544
544
|
15);case 15:c.g.removeAttribute("src"),c.g.load();case 14:if(!c.F){r.B(16);break}return D(r,c.F.destroy(),17);case 17:c.F=null;case 16:c.oa=null;c.Rg=null;c.M=null;if(c.i){e=u(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=u([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=u(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new al;c.Tg=null;c.Rd=[];c.O=NaN;jo(c);
|
|
545
545
|
case 3:va(r);c.S.release();wa(r,4);break;case 4:if(a&&Pb()&&!c.H)return D(r,io(c),0);r.B(0)}})};q.nk=function(a){this.aa=a};
|
|
546
546
|
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,r,p,t,w,y;return L(function(z){switch(z.g){case 1:if(d.l==bo)throw new R(2,7,7E3);e=null;f="";a instanceof pm?(e=a,f=e.Fd()||""):f=a||"";return D(z,Rn(d.S,"load"),2);case 2:d.S.release();if(!d.g)throw new R(2,7,7002);if(!d.oa){z.B(3);break}return D(z,d.Ic(!1),3);case 3:g=++d.gf;h=function(){return L(function(v){if(1==v.g)return d.gf==g?v.B(0):e?D(v,e.destroy(),3):v.B(3);throw new R(2,7,7E3);})};k=function(v,B){return L(function(A){switch(A.g){case 1:return sa(A,
|
|
547
547
|
2),D(A,Rn(d.S,B),4);case 4:return D(A,h(),5);case 5:return D(A,v(),6);case 6:return D(A,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:va(A),d.S.release(),wa(A,0)}})};ra(z,5,6);null==b&&e&&(b=e.getStartTime());d.aa=b;d.Ka=!1;d.dispatchEvent(ao("loading"));if(e){c=e.S;z.B(8);break}if(c){z.B(8);break}return D(z,k(function(){return L(function(v){if(1==v.g)return D(v,ko(d,f),2);c=v.h;F(v)})},"guessMimeType_"),8);case 8:l=!!e;if(e){sm(e,d);d.u=e.getStats();z.B(11);break}return D(z,lo(d,f,b,c,!0),12);case 12:e=
|
|
548
548
|
z.h;if(!e){d.u=new al;z.B(11);break}sm(e,d);d.u=e.getStats();return D(z,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Xb:Date.now()/1E3;d.u=e?e.getStats():new al;d.oa=f;d.Rg=c||null;if(m)return D(z,k(function(){return L(function(v){return D(v,mo(d,c),0)})},"initializeSrcEqualsDrmInner_"),24);if(d.H){z.B(17);break}return D(z,k(function(){return L(function(v){return D(v,io(d),0)})},"initializeMediaSourceEngineInner_"),17);case 17:return D(z,k(function(){return e.oa},"waitForManifest"),
|
|
549
|
-
19);case 19:d.h=e.getConfiguration();d.Le=e.
|
|
550
|
-
"function"!=typeof d.
|
|
549
|
+
19);case 19:d.h=e.getConfiguration();d.Le=e.u;d.Fa=e.F;d.K=um(e);d.$a=vm(e);d.Za=e.Za;d.i=e.Xf();if(r=e.s)d.qa=r;l&&d.g&&"AUDIO"===d.g.nodeName&&(no(d),d.configure("manifest.disableVideo",!0));return D(z,k(function(){return e.ma},"waitForDrm"),20);case 20:return d.F=wm(e),D(z,k(function(){return L(function(v){return D(v,d.F.Pc(d.g),0)})},"drmEngine_.attach"),21);case 21:return D(z,k(function(){return e.M},"waitForChooseInitialVariant"),22);case 22:return!(p=e.A)||d.ma&&d.ma==p||(d.s=tm(e),d.ma=e.A,
|
|
550
|
+
"function"!=typeof d.s.setMediaElement&&(nd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(nd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(nd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),
|
|
551
551
|
t=xm(e),w=e.ra,D(z,k(function(){return L(function(v){return D(v,oo(d,n,w,t),0)})},"loadInner_"),23);case 23:rm(e);z.B(16);break;case 24:return D(z,k(function(){return L(function(v){return D(v,po(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(ao("loaded"));case 6:va(z);if(!e){z.B(26);break}return D(z,e.destroy(),26);case 26:wa(z,0);break;case 5:y=ua(z);if(7E3==y.code){z.B(28);break}return D(z,d.Ic(!1),28);case 28:throw y;}})};
|
|
552
552
|
function no(a){for(var b=u(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})}
|
|
553
|
-
q.ik=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.K&&c.Fa&&c.oa)){g.B(2);break}e=c.g.currentTime;c.U()&&(e=null);f=Date.now()/1E3;return D(g,qo(c,c.oa,e,c.Rg,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.K,l=c.Fa;h.h=c.i;h.j=k;h.F=l;h=d;k=c.ma;h.i=c.
|
|
553
|
+
q.ik=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.K&&c.Fa&&c.oa)){g.B(2);break}e=c.g.currentTime;c.U()&&(e=null);f=Date.now()/1E3;return D(g,qo(c,c.oa,e,c.Rg,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.K,l=c.Fa;h.h=c.i;h.j=k;h.F=l;h=d;k=c.ma;h.i=c.s;h.A=k;d.s=c.qa;d.start();c.i=null;c.K=null;c.Fa=null;c.s=null;c.ma=null;case 2:return D(g,c.Ic(a,b),4);case 4:return g.return(d)}})};
|
|
554
554
|
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return L(function(f){if(1==f.g)return D(f,lo(d,a,b,c),2);(e=f.h)?e.start().catch(function(){}):ho(d,new R(2,7,7005));return f.return(e)})};
|
|
555
|
-
function lo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return L(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.B(2):D(l,ko(a,b),3);2!=l.g&&(d=l.h);if(g=ro(a,d))return l.return(null);h=!1;k=!0;e&&(a.
|
|
556
|
-
function qo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,r,p,t,w,y,z,v,B,A,C,E;return L(function(J){if(1==J.g)return k=null,l=Ne(a.h),g&&(l.manifest.disableVideo=!0),m=function(){return k.P&&k.m?null:k},n=function(){return m()?m().getConfiguration():a.h},r=function(I,G){m()?k.configure(I,G):a.configure(I,G)},Infinity!=a.Y.width||Infinity!=a.Y.height?J.B(2):D(J,lc(),3);2!=J.g&&(p=J.h,a.Y.width=p.width,a.Y.height=p.height);t=new
|
|
557
|
-
filter:function(I){var G,H;return L(function(K){if(1==K.g)return D(K,
|
|
555
|
+
function lo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return L(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.B(2):D(l,ko(a,b),3);2!=l.g&&(d=l.h);if(g=ro(a,d))return l.return(null);h=!1;k=!0;e&&(a.s&&a.ma==a.h.abrFactory&&(k=!1),a.g&&"AUDIO"===a.g.nodeName&&(h=!0));return l.return(qo(a,b,c,d||null,f,!e,h,k))})}
|
|
556
|
+
function qo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,r,p,t,w,y,z,v,B,A,C,E;return L(function(J){if(1==J.g)return k=null,l=Ne(a.h),g&&(l.manifest.disableVideo=!0),m=function(){return k.P&&k.m?null:k},n=function(){return m()?m().getConfiguration():a.h},r=function(I,G){m()?k.configure(I,G):a.configure(I,G)},Infinity!=a.Y.width||Infinity!=a.Y.height?J.B(2):D(J,lc(),3);2!=J.g&&(p=J.h,a.Y.width=p.width,a.Y.height=p.height);t=new ni(l,a.Y,null);w={networkingEngine:a.I,
|
|
557
|
+
filter:function(I){var G,H;return L(function(K){if(1==K.g)return D(K,oi(t,I),2);if(4!=K.g){G=K.h;if(!G)return K.B(0);H=ao("trackschanged");return D(K,Promise.resolve(),4)}k.dispatchEvent(H);F(K)})},makeTextStreamsForClosedCaptions:function(I){return so(a,I)},onTimelineRegionAdded:function(I){var G=k.G;a:{var H=u(G.g);for(var K=H.next();!K.done;K=H.next())if(K=K.value,K.schemeIdUri==I.schemeIdUri&&K.id==I.id&&K.startTime==I.startTime&&K.endTime==I.endTime){H=K;break a}H=null}null==H&&(G.g.add(I),I=
|
|
558
558
|
new Q("regionadd",new Map([["region",I]])),G.dispatchEvent(I))},onEvent:function(I){return k.dispatchEvent(I)},onError:function(I){return k.onError(I)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){r("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.P&&a.j.updateDuration()},newDrmInfo:function(I){var G=k.l,H=G?G.g:null;H&&G.u&&qi(t,H.keySystem,I)},onManifestUpdated:function(){var I=
|
|
559
|
-
(new Map).set("isLive",a.U());k.dispatchEvent(ao("manifestupdated",I));qm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.
|
|
560
|
-
I.quality;I=I.position;G=(new Map).set("mediaQuality",{bandwidth:G.bandwidth,audioSamplingRate:G.audioSamplingRate,codecs:G.codecs,contentType:G.contentType,frameRate:G.frameRate,height:G.height,mimeType:G.mimeType,channelsCount:G.channelsCount,pixelAspectRatio:G.pixelAspectRatio,width:G.width}).set("position",I);a.dispatchEvent(ao("mediaqualitychanged",G))}));v=!0;B={Zb:a.
|
|
559
|
+
(new Map).set("isLive",a.U());k.dispatchEvent(ao("manifestupdated",I));qm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}};y=new nl(function(){return a.Pa()});y.addEventListener("regionadd",function(I){var G=I.region;to(a,"timelineregionadded",G,k);qm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(G)})});z=null;l.streaming.observeQualityChanges&&(z=new ol(function(){return a.Ib()}),z.addEventListener("qualitychange",function(I){var G=
|
|
560
|
+
I.quality;I=I.position;G=(new Map).set("mediaQuality",{bandwidth:G.bandwidth,audioSamplingRate:G.audioSamplingRate,codecs:G.codecs,contentType:G.contentType,frameRate:G.frameRate,height:G.height,mimeType:G.mimeType,channelsCount:G.channelsCount,pixelAspectRatio:G.pixelAspectRatio,width:G.width}).set("position",I);a.dispatchEvent(ao("mediaqualitychanged",G))}));v=!0;B={Zb:a.I,onError:function(I){return k.onError(I)},Pe:function(I){qm(k,!0,function(){a:{var G=ao("keystatuschanged");a.dispatchEvent(G);
|
|
561
561
|
var H=Object.keys(I);G=1==H.length&&"00"==H[0];var K=!1;if(H.length){H=u(a.i.variants);for(var M=H.next();!M.done;M=H.next()){M=M.value;var P=[];M.audio&&P.push(M.audio);M.video&&P.push(M.video);P=u(P);for(var O=P.next();!O.done;O=P.next()){var U=O.value;O=M.allowedByKeySystem;if(U.keyIds.size){M.allowedByKeySystem=!0;U=u(U.keyIds);for(var X=U.next();!X.done;X=U.next())if(X=X.value,(X=I[G?"00":X])||a.F.H)M.allowedByKeySystem=M.allowedByKeySystem&&!!X&&!si.includes(X)}O!=M.allowedByKeySystem&&(K=!0)}}}if(K&&
|
|
562
|
-
(uo(a),!vo(a)))break a;(G=a.j.j)&&!G.allowedByKeySystem&&wo(a)}})},onExpirationUpdated:function(I,G){var H=ao("expirationupdated");k.dispatchEvent(H);if((H=k.j)&&H.onExpirationUpdated)H.onExpirationUpdated(I,G)},onEvent:function(I){k.dispatchEvent(I);"drmsessionupdate"==I.type&&v&&(v=!1,I=Date.now()/1E3-k.Ka,(a.u||k.getStats()).j=I,a.L&&wj(a.L))}};A=Vn(a,m);C=function(){return a.Rc(B)};E={config:l,zj:w,Jj:y,Ij:z,Rc:C,yj:t,networkingEngine:A,pi:f,oi:h};k=new pm(b,d,e,c,E);a.Sg.push(k);return J.return(k)})}
|
|
563
|
-
function ko(a,b){var c,d;return L(function(e){if(1==e.g)return c=a.h.manifest.retryParameters,D(e,Im(b,a.
|
|
562
|
+
(uo(a),!vo(a)))break a;(G=a.j.j)&&!G.allowedByKeySystem&&wo(a)}})},onExpirationUpdated:function(I,G){var H=ao("expirationupdated");k.dispatchEvent(H);if((H=k.j)&&H.onExpirationUpdated)H.onExpirationUpdated(I,G)},onEvent:function(I){k.dispatchEvent(I);"drmsessionupdate"==I.type&&v&&(v=!1,I=Date.now()/1E3-k.Ka,(a.u||k.getStats()).j=I,a.L&&wj(a.L))}};A=Vn(a,m);tg(a.I,A);C=function(){return a.Rc(B)};E={config:l,zj:w,Jj:y,Ij:z,Rc:C,yj:t,networkingEngine:A,pi:f,oi:h};k=new pm(b,d,e,c,E);a.Sg.push(k);return J.return(k)})}
|
|
563
|
+
function ko(a,b){var c,d;return L(function(e){if(1==e.g)return c=a.h.manifest.retryParameters,D(e,Im(b,a.I,c),2);d=e.h;"application/x-mpegurl"==d&&dc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
564
564
|
function ro(a,b){if(!Pb())return!0;if(b){if(""==(a.g||Rb()).canPlayType(b))return!1;if(!(Pb()&&b in vi))return!0;if(Be(b)){if(a.h.streaming.preferNativeHls)return!0;if(dc()&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"]))return a.h.streaming.useNativeHlsForFairPlay;if(dc())return a.h.streaming.useNativeHlsOnSafari}}return!1}
|
|
565
565
|
function io(a){var b,c,d,e,f;return L(function(g){if(1==g.g)return eo(a,"media-source"),b=a.h.textDisplayFactory,c=b(),c.configure?c.configure(a.h.textDisplayer):nd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Tg=b,d=xo(a.g,c,function(h,k,l){yo(a,h,k,l)},a.L),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.Y=f,D(g,d.M,2);a.H=d;F(g)})}
|
|
566
|
-
function oo(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I;return L(function(G){switch(G.g){case 1:eo(a,"load");e=a.g;a.
|
|
567
|
-
Bo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.
|
|
568
|
-
r.value)&&!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){G.B(2);break}return D(G,Promise.all(l),2);case 2:if(a.K&&a.K.onInitialVariantChosen)a.K.onInitialVariantChosen(m);Bo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);t=function(H){a.G=Ho(a,H);a.Ua=Io(a,
|
|
569
|
-
y=a.aa||a.g.currentTime;z=w.wc();v=w.Kb();y<z?y=z:y>v&&(y=v);return D(G,Ko(h,y),6);case 6:B=G.h,t(B);case 5:Co(a,h,!0,!1,0);case 4:return a.G.wf(),A=a.jc().find(function(H){return H.active}),A||((C=wf(a.i.textStreams,a.Ja,a.Xb,a.Wb)[0]||null)&&$k(a.u.h,C,!0),h&&(C?(h.audio&&Lo(a,h.audio,C)&&(a.$=!0),a.$&&a.H.H.setTextVisibility(!0),Mo(a)):a.$=!1),C&&(a.h.streaming.alwaysStreamText||a.Bc())&&Hl(a.j,C)),D(G,a.j.start(d),7);case 7:a.h.abr.enabled&&(a.
|
|
570
|
-
if((E=a.U())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)J=function(){return Oo(a)},a.m.
|
|
571
|
-
function mo(a,b){var c,d,e,f,g;return L(function(h){return 1==h.g?(c=Kc,d=Date.now()/1E3,e=!0,a.F=a.Rc({Zb:a.
|
|
566
|
+
function oo(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I;return L(function(G){switch(G.g){case 1:eo(a,"load");e=a.g;a.J=new Sk({ye:function(){return e.playbackRate},vc:function(){return e.defaultPlaybackRate},Gg:function(H){e.playbackRate=H},Eh:function(H){e.currentTime+=H}});f=function(){return zo(a)};g=function(){return Ao(a)};a.m.o(e,"playing",f);a.m.o(e,"pause",f);a.m.o(e,"ended",f);a.m.o(e,"ratechange",g);$n(a,a.h);a.Ja=a.h.preferredTextLanguage;a.Xb=a.h.preferredTextRole;a.Wb=a.h.preferForcedSubs;
|
|
567
|
+
Bo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(H,K,M){a.i&&a.j&&H!=a.j.j&&Co(a,H,!0,void 0===K?!1:K,void 0===M?0:M)});a.s.setMediaElement(e);a.s.setCmsdManager(a.X);a.j=Do(a);a.j.configure(a.h.streaming);a.l=Eo;e.textTracks&&a.m.o(e.textTracks,"addtrack",function(H){if(H.track)switch(H=H.track,H.kind){case "chapters":Fo(a,H)}});a.dispatchEvent(ao("streaming"));h=c;(k=a.j.j)||h||(h=Go(a,!0));l=[];m=k||h;n=u([m.video,m.audio]);for(r=n.next();!r.done;r=n.next())(p=
|
|
568
|
+
r.value)&&!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){G.B(2);break}return D(G,Promise.all(l),2);case 2:if(a.K&&a.K.onInitialVariantChosen)a.K.onInitialVariantChosen(m);Bo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);t=function(H){a.G=Ho(a,H);a.Ua=Io(a,H);Jo(a,e,Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal))};a.h.streaming.startAtSegmentBoundary||t(a.aa);if(k){G.B(4);break}if(!a.h.streaming.startAtSegmentBoundary){G.B(5);break}w=a.i.presentationTimeline;
|
|
569
|
+
y=a.aa||a.g.currentTime;z=w.wc();v=w.Kb();y<z?y=z:y>v&&(y=v);return D(G,Ko(h,y),6);case 6:B=G.h,t(B);case 5:Co(a,h,!0,!1,0);case 4:return a.G.wf(),A=a.jc().find(function(H){return H.active}),A||((C=wf(a.i.textStreams,a.Ja,a.Xb,a.Wb)[0]||null)&&$k(a.u.h,C,!0),h&&(C?(h.audio&&Lo(a,h.audio,C)&&(a.$=!0),a.$&&a.H.H.setTextVisibility(!0),Mo(a)):a.$=!1),C&&(a.h.streaming.alwaysStreamText||a.Bc())&&Hl(a.j,C)),D(G,a.j.start(d),7);case 7:a.h.abr.enabled&&(a.s.enable(),No(a));uo(a);vo(a);a.i.variants.some(function(H){return H.primary});
|
|
570
|
+
if((E=a.U())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)J=function(){return Oo(a)},a.m.o(e,"timeupdate",J);E||(I=function(){return Po(a)},a.m.o(e,"timeupdate",I),Po(a));if(a.A)a.A.onManifestUpdated(E);a.Ka=!0;a.m.na(e,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});F(G)}})}
|
|
571
|
+
function mo(a,b){var c,d,e,f,g;return L(function(h){return 1==h.g?(c=Kc,d=Date.now()/1E3,e=!0,a.F=a.Rc({Zb:a.I,onError:function(k){ho(a,k)},Pe:function(){},onExpirationUpdated:function(){var k=ao("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.u.j=Date.now()/1E3-d)}}),a.F.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
572
572
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?ye(b):"",codecs:b?Ae(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.va,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(ke(g.mimeType,
|
|
573
|
-
g.codecs)),b.startsWith("audio/")?(g.type=c.Z,f.audio=g):f.video=g,a.F.Y=!0,D(h,
|
|
574
|
-
function po(a,b,c){var d,e,f,g,h,k,l,m,n,r,p;return L(function(t){if(1==t.g)return eo(a,"src-equals"),d=a.g,a.G=new Ik(d),e=!1,a.Vb.push(function(){e=!0}),null!=a.aa&&a.G.xf(a.aa),a.
|
|
575
|
-
"ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.
|
|
576
|
-
a.m.
|
|
573
|
+
g.codecs)),b.startsWith("audio/")?(g.type=c.Z,f.audio=g):f.video=g,a.F.Y=!0,D(h,Gh(a.F,[f],[]),2)):D(h,a.F.Pc(a.g),0)})}
|
|
574
|
+
function po(a,b,c){var d,e,f,g,h,k,l,m,n,r,p;return L(function(t){if(1==t.g)return eo(a,"src-equals"),d=a.g,a.G=new Ik(d),e=!1,a.Vb.push(function(){e=!0}),null!=a.aa&&a.G.xf(a.aa),a.J=new Sk({ye:function(){return d.playbackRate},vc:function(){return d.defaultPlaybackRate},Gg:function(w){d.playbackRate=w},Eh:function(w){d.currentTime+=w}}),f=a.h.streaming.rebufferingGoal,Jo(a,d,f),g=function(){return zo(a)},h=function(){return Ao(a)},a.m.o(d,"playing",g),a.m.o(d,"pause",g),a.m.o(d,"ended",g),a.m.o(d,
|
|
575
|
+
"ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.o(d.audioTracks,"addtrack",function(){return uo(a)}),a.m.o(d.audioTracks,"removetrack",function(){return uo(a)}),a.m.o(d.audioTracks,"change",function(){return uo(a)})),d.textTracks&&(a.m.o(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Qo(a,w);break;case "chapters":Fo(a,w);break;default:uo(a)}}),a.m.o(d.textTracks,"removetrack",function(){return uo(a)}),
|
|
576
|
+
a.m.o(d.textTracks,"change",function(){return uo(a)})),d.src=en(a.P,a.oa,c),(Wb()||Zb())&&d.load(),"none"!=d.preload&&!d.autoplay&&Be(c)&&ic()&&d.load(),a.l=Ro,a.dispatchEvent(ao("streaming")),k=new fg,zk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.G.wf();k.resolve()}),zk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return L(function(y){if(1==y.g)return So(a),w=To(a),w.find(function(z){return"disabled"!=z.mode})?(0<w.length&&(a.$=!0),y.B(2)):D(y,new Promise(function(z){a.m.na(d.textTracks,
|
|
577
577
|
"change",z);(new Ob(z)).V(1)}),2);if(e)return y.return();Uo(a);F(y)})}),d.error?k.reject(go(a)):"none"==d.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.na(d,"error",function(){k.reject(go(a))}),l=new Promise(function(w,y){(new Ob(y)).V(a.h.streaming.loadTimeout)}),D(t,Promise.race([k,
|
|
578
|
-
l]),2);if((m=a.U())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)n=function(){return Oo(a)},a.m.
|
|
578
|
+
l]),2);if((m=a.U())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)n=function(){return Oo(a)},a.m.o(d,"timeupdate",n);m||(r=function(){return Po(a)},a.m.o(d,"timeupdate",r),Po(a));a.A&&(a.A.onManifestUpdated(m),m&&(p=a.Pa().end,a.m.o(d,"progress",function(){var w=a.Pa().end;p!=w&&(a.A.onManifestUpdated(a.U()),p=w)})));a.Ka=!0;F(t)})}function So(a){var b=a.h.preferredAudioLanguage;""!=b&&a.Xe(b,a.h.preferredVariantRole)}
|
|
579
579
|
function Uo(a){var b=a.h.preferredTextLanguage;""!=b&&a.Ag(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
|
|
580
|
-
function Qo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.
|
|
580
|
+
function Qo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.o(b,"cuechange",function(){if(b.activeCues)for(var d=u(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Vo(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Ob(function(){var d=Wo(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ia().V(.5);a.Vb.push(function(){c.stop()})}}
|
|
581
581
|
function yo(a,b,c,d){b=u(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=u(e.frames),k=h.next();!k.done;k=h.next())Vo(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Vo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(ao("metadata",b))}
|
|
582
|
-
function Fo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ob(function(){b.mode="hidden"})).Ia().V(.5);a.Vb.push(function(){c.stop()})}}q.Nj=function(){for(var a=this.S;a.g;)a.release()};q.Rc=function(a){return new
|
|
583
|
-
function Vn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?qm(b(),!0,e):e()}b||(b=function(){return null});return new pg(function(e,f,g,h){var k=b()?b().i:a.
|
|
582
|
+
function Fo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ob(function(){b.mode="hidden"})).Ia().V(.5);a.Vb.push(function(){c.stop()})}}q.Nj=function(){for(var a=this.S;a.g;)a.release()};q.Rc=function(a){return new zh(a)};
|
|
583
|
+
function Vn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?qm(b(),!0,e):e()}b||(b=function(){return null});return new pg(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(ao("downloadheadersreceived",f));d(function(){if(a.X){var h=a.X;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],
|
|
584
584
|
Cn(n[1]))}}catch(y){}if(l=e["cmsd-dynamic"]){try{var r=new Map,p=l.split(";");for(l=1;l<p.length;l++){var t=p[l].split("=");r.set(t[0],Cn(t[1]))}var w=r}catch(y){w=null}w&&(h.g=w)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(ao("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)mn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
585
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}mn(h,f,{ot:jn,su:!h.i})}}catch(O){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",O)}break;case
|
|
585
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}mn(h,f,{ot:jn,su:!h.i})}}catch(O){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",O)}break;case Ag:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=qn(k);var r=n.ot===nn||n.ot===gn||n.ot===hn||n.ot===sn,p=k.stream;if(p){var t=h.h.Ra();if(r&&(n.bl=un(h,p.type),n.ot!==sn)){var w=vn(h,p.type);n.dl=t?w/Math.abs(t):w}p.bandwidth&&(n.br=p.bandwidth/1E3);
|
|
586
586
|
if(p.segmentIndex&&m){var y=p.segmentIndex.Ub(m.endTime,!0,0>t);if(y){var z=y.next().value;if(z&&z!=m){if(!Cd(m.ka(),z.ka())){var v=z.ka()[0],B=f.uris[0],A=new URL(v),C=new URL(B);if(A.origin!==C.origin)var E=v;else{for(var J=A.pathname.split("/").slice(1),I=C.pathname.split("/").slice(1,-1);J[0]===I[0];)J.shift(),I.shift();for(;I.length;)I.shift(),J.unshift("..");E=J.join("/")}n.nor=E}if((z.Ta||z.za)&&(m.Ta!=z.Ta||m.za!=z.za)){var G=z.Ta+"-";z.za&&(G+=z.za);n.nrr=G}}}var H=h.h.Ra()||1,K=vn(h,p.type)||
|
|
587
587
|
500,M=p.bandwidth;var P=M?M*(m.endTime-m.startTime)/1E3/(K/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(P)||(n.rtp=P)}}r&&n.ot!==sn&&(n.tb=wn(h,n.ot)/1E3);mn(h,f,n)}}catch(O){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",O)}break;case 2:case 5:case 6:mn(h,f,{ot:"k"});break;case 4:mn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.K)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.u)&&(f.me=isNaN(f.me)?e:f.me+e)})}
|
|
588
588
|
function Ho(a,b){return new Jk(a.g,a.i,a.h.streaming,b,function(){a.Ua&&Vk(a.Ua,!0);a.j&&a.j.Wd();a.M&&Xo(a)},function(c){return a.dispatchEvent(c)})}
|
|
589
589
|
function Io(a,b){b=new Dm(a.$a,a.U()||0<b);b.addEventListener("enter",function(d){to(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){to(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(to(a,"timelineregionenter",e),to(a,"timelineregionexit",e))});var c=new Uk(a.g);c.g.add(b);a.Za&&c.g.add(a.Za);return c}
|
|
590
|
-
function Jo(a,b,c){a.M=new Zf;a.M.g=ag;bg(a.M,c,Math.min(.5,c/2));jo(a);a.Se=(new Ob(function(){Xo(a)})).ya(.25);a.m.
|
|
590
|
+
function Jo(a,b,c){a.M=new Zf;a.M.g=ag;bg(a.M,c,Math.min(.5,c/2));jo(a);a.Se=(new Ob(function(){Xo(a)})).ya(.25);a.m.o(b,"waiting",function(){return Xo(a)});a.m.o(b,"stalled",function(){return Xo(a)});a.m.o(b,"canplaythrough",function(){return Xo(a)});a.m.o(b,"progress",function(){return Xo(a)})}
|
|
591
591
|
function Xo(a){switch(a.l){case Ro:if(a.g.ended)var b=!0;else{var c=Gi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Eo:a:if(a.g.ended||Nj(a.H))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.ic();var d=Gi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ii(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?$f:ag;c.g=d;(b=b!=d)&&d===$f&&(c.h=Date.now());b&&jo(a)}function xo(a,b,c,d){return new Ej(a,b,c,d)}
|
|
592
|
-
function Un(a){return new dn({getBandwidthEstimate:function(){return a.
|
|
593
|
-
function Do(a){return new tl(a.i,{xe:function(){return a.G?a.G.le():0},getBandwidthEstimate:function(){return a.
|
|
594
|
-
f);a.dispatchEvent(ao("segmentappended",d));a.
|
|
592
|
+
function Un(a){return new dn({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Ib:function(){return a.Ib()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ra:function(){return a.Ra()},hc:function(){return a.hc()},sb:function(){return a.sb()},U:function(){return a.U()}},a.h.cmcd)}
|
|
593
|
+
function Do(a){return new tl(a.i,{xe:function(){return a.G?a.G.le():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Ra:function(){return a.Ra()},ea:a.H,Zb:a.I,onError:function(b){return ho(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ej:function(){a.K&&a.K.update&&a.K.update()},rg:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.G){a.G.Fh();var g=Oj(a.H,f);!a.U()&&a.g.paused&&null!=g&&0<g&&a.G.le()<g&&a.G.xf(g)}Xo(a);d=(new Map).set("start",d).set("end",e).set("contentType",
|
|
594
|
+
f);a.dispatchEvent(ao("segmentappended",d));a.s&&c.fastSwitching&&b.Ud&&b.Fe&&a.s.trySuggestStreams()},Dj:function(b,c){(c=c.ng)&&a.Za&&ql(a.Za,c,b)},ah:function(b,c){var d=a.F;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new Ug(Fb(c));var e=0,f=u(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=u(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Ph(d,"cenc",e);d=d.l}}else d=Promise.resolve();
|
|
595
595
|
return d},Fj:function(b,c,d){yo(a,b,c,d)},se:function(b,c){return a.se(b,c)}})}
|
|
596
596
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(nd("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(nd("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
597
597
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&nd("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){nd("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
|
|
598
598
|
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.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=
|
|
599
599
|
100),void 0==a.manifest&&(a.manifest={}),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));var d=om(this.h,a,Tn(this));Yo(this);return d};
|
|
600
|
-
function Yo(a){a.Le=new
|
|
601
|
-
c.configure(a.h.textDisplayer):nd("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.H,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Tg=b;a.j&&(b=a.j,(c=b.i.get(Ic))&&Fl(b,c.stream,!0,0,!0))}else b=a.H.H,b.configure&&b.configure(a.h.textDisplayer);a.
|
|
600
|
+
function Yo(a){a.Le=new ni(a.h,a.Y,a.F);if(a.K){var b=Ne(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.F&&a.F.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{a.l!=bo&&pi(a.Le,a.i)&&uo(a)}catch(f){ho(a,f)}a.s&&vo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||wo(a)}a.I&&a.I.Fg(a.h.streaming.forceHTTPS);if(a.H)if(a.H.configure(a.h.mediaSource),a.H.Y=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Tg!=b){var c=b();c.configure?
|
|
601
|
+
c.configure(a.h.textDisplayer):nd("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.H,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Tg=b;a.j&&(b=a.j,(c=b.i.get(Ic))&&Fl(b,c.stream,!0,0,!0))}else b=a.H.H,b.configure&&b.configure(a.h.textDisplayer);a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),No(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),bg(a.M,b,Math.min(.5,
|
|
602
602
|
b/2)));a.i&&Bo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.P&&a.P.configure(a.h.cmcd);a.X&&a.X.configure(a.h.cmsd)}q.getConfiguration=function(){var a=Tn(this);om(a,this.h,Tn(this));return a};
|
|
603
603
|
q.nh=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Pa().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Rj=function(){for(var a in this.h)delete this.h[a];om(this.h,Tn(this),Tn(this));Yo(this)};q.Id=function(){return this.l};q.Yf=function(){return this.i?this.i.type:null};q.Ui=function(){return this.g};
|
|
604
|
-
q.hc=function(){return this.
|
|
604
|
+
q.hc=function(){return this.I};q.Fd=function(){return this.oa};q.ue=function(){return this.A?this.A:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Ac=function(){return this.i?this.i.presentationTimeline.Ac():!1};q.Yc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
605
605
|
q.Pa=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.wc(),end:a.Kb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.jj=function(){this.U()&&(this.g.currentTime=this.Pa().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.F?this.F.g:null};q.Hd=function(){return this.F?this.F.Hd():Infinity};
|
|
606
|
-
q.Vf=function(){return this.F?this.F.Vf():[]};q.we=function(){return this.F?this.F.we():{}};q.Od=function(){return this.M?this.M.g==ag:!1};q.Ra=function(){return this.g?this.
|
|
607
|
-
q.Hc=function(a){var b=this;0==a?Ua("A trick play rate of 0 is unsupported!"):(this.ra.mb(),this.g.paused&&this.g.play(),this.
|
|
608
|
-
q.Qc=function(){var a=this.
|
|
609
|
-
q.
|
|
606
|
+
q.Vf=function(){return this.F?this.F.Vf():[]};q.we=function(){return this.F?this.F.we():{}};q.Od=function(){return this.M?this.M.g==ag:!1};q.Ra=function(){return this.g?this.J?this.J.i:1:0};
|
|
607
|
+
q.Hc=function(a){var b=this;0==a?Ua("A trick play rate of 0 is unsupported!"):(this.ra.mb(),this.g.paused&&this.g.play(),this.J.set(a),this.l==Eo&&(this.s.playbackRateChanged(a),El(this.j,1<Math.abs(a))),this.U()&&this.ra.o(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Pa(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Qc():Math.floor(c)<=Math.floor(d.start+e)&&b.Qc()}))};
|
|
608
|
+
q.Qc=function(){var a=this.J.vc();this.l==Ro&&this.J.set(a);this.l==Eo&&(this.J.set(a),this.s.playbackRateChanged(a),El(this.j,!1));this.ra.mb()};
|
|
609
|
+
q.sb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=u(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,uf(e)){var f=mf(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return tf(g)}):[]};
|
|
610
610
|
q.jc=function(){if(this.i){for(var a=this.j?this.j.u:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=nf(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?To(this).map(function(f){return rf(f)}):[]};q.ve=function(){var a=this.Rd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return of(b)})};
|
|
611
611
|
q.Bi=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=Eo&&b.l!=Ro)return g.return(null);c=b.Rd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Tc(function(h){var k=Zo(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.tc;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.$f(a,h.startTime+l*m/k))}}),D(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
612
612
|
function Zo(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{tc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
@@ -614,9 +614,9 @@ q.$f=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A;return L(funct
|
|
|
614
614
|
t=g.A||p/r;w=g.startTime;z=y=0;1<r&&(v=Math.floor((b-g.startTime)/t),w=g.startTime+v*t,y=v%h.tc*m,z=Math.floor(v/h.tc)*n);B=!1;if(A=g.u)B=!0,n=A.height,y=A.positionX,z=A.positionY,m=A.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:y,positionY:z,startTime:w,duration:t,uris:g.ka(),width:m,sprite:B})})};
|
|
615
615
|
q.Bg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.u&&($k(this.u.h,b,!1),Hl(this.j,b),$o(this),this.Ja=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=To(this);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,pf(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";$o(this)}};
|
|
616
616
|
q.Ye=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&uf(d)&&(Co(this,d,!1,b,c),this.qa=new Lf(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),vo(this))}else if(this.g&&this.g.audioTracks)for(b=
|
|
617
|
-
Array.from(this.g.audioTracks),b=u(b),c=b.next();!c.done;c=b.next())if(c=c.value,pf(c)==a.id){ap(this,c);break}};q.Di=function(){return bp(this.
|
|
617
|
+
Array.from(this.g.audioTracks),b=u(b),c=b.next();!c.done;c=b.next())if(c=c.value,pf(c)==a.id){ap(this,c);break}};q.Di=function(){return bp(this.sb())};q.aj=function(){return bp(this.jc())};q.Ci=function(){return Array.from(cp(this.sb()))};q.$i=function(){return Array.from(cp(this.jc()))};
|
|
618
618
|
q.Xe=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.G){this.qa=new Qf(a,b||"",c,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.qa.create(this.i.variants);c=null;e=u(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
619
|
-
b))c=f;c?(a=mf(c),this.Ye(a,!0,d)):wo(this)}else this.g&&this.g.audioTracks&&(d=wf(this.
|
|
619
|
+
b))c=f;c?(a=mf(c),this.Ye(a,!0,d)):wo(this)}else this.g&&this.g.audioTracks&&(d=wf(this.sb(),a,b||"",!1)[0])&&this.Ye(d)};q.Ag=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ja=a,this.Xb=b||"",this.Wb=c,(a=wf(this.i.textStreams,this.Ja,this.Xb,this.Wb)[0]||null)&&a!=this.j.u&&($k(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.Bc()))Hl(this.j,a),$o(this)}else(a=wf(this.jc(),a,b||"",c)[0])&&this.Bg(a)};
|
|
620
620
|
q.Yj=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G){for(var d=null,e=u(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.qa=new Qf(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),wo(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=u(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&ap(this,b)}};
|
|
621
621
|
q.Bc=function(){var a=this.$;return this.H&&this.l==Eo?this.H.H.isTextVisible():this.g&&this.g.src&&this.g.textTracks?To(this).some(function(b){return"showing"==b.mode}):a};q.oh=function(){return this.g&&this.g.src&&this.g.textTracks?dp(this).map(function(a){return rf(a)}):[]};
|
|
622
622
|
q.Fi=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=Oc(a),c=dp(this).filter(function(h){return Oc(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=u(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=u(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};
|
|
@@ -625,34 +625,34 @@ q.bf=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Eo)this.H.H.setTextVisi
|
|
|
625
625
|
q.Vi=function(){if(this.G)var a=this.G.le();else{if(null==this.aa)return new Date;a=this.aa}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.F||b.i)+a))}return this.g&&this.g.getStartDate?(b=this.g.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.rh=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.F||a.i))}return this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
626
626
|
q.ze=function(){return this.U()?this.i?this.i.presentationTimeline.ze():null:null};q.Ib=function(){if(this.l==Eo)return this.H.Ib();var a={total:[],audio:[],video:[],text:[]};this.l==Ro&&(a.total=Ji(this.g.buffered));return a};
|
|
627
627
|
q.getStats=function(){if(this.l!=Eo&&this.l!=Ro)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};zo(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
|
|
628
|
-
this.u;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.u.M=this.G.Wg(),this.u.O=this.G.Xg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.u.J=Number(c.corruptedVideoFrames)}this.F?(c=this.F,c=c.K?c.K:NaN):c=NaN;this.u.u=c;if(this.l==Eo){c=this.j.j;b=this.j.u;if(c){d=this.
|
|
629
|
-
NaN,b.
|
|
628
|
+
this.u;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.u.M=this.G.Wg(),this.u.O=this.G.Xg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.u.J=Number(c.corruptedVideoFrames)}this.F?(c=this.F,c=c.K?c.K:NaN):c=NaN;this.u.u=c;if(this.l==Eo){c=this.j.j;b=this.j.u;if(c){d=this.J?this.J.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.u.F=e}c&&c.video&&(b=this.u,d=c.video.height||
|
|
629
|
+
NaN,b.s=c.video.width||NaN,b.l=d);this.U()&&(c=this.rh().valueOf()+1E3*a.currentTime,this.u.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.I=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.u.A=c}this.l==Ro&&(c=this.u,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var f=this.u;a=f.s;c=f.l;b=f.F;d=f.K;e=f.L;var g=f.J,h=f.O,k=f.M,l=f.A,m=f.i,n=f.m,r=f.H,p=f.j,t=Xk(f.g,"playing"),w=Xk(f.g,"paused"),y=Xk(f.g,"buffering"),z=f.u,v=f.G,B=f.I,A=f.me,C=Yk(f.g),E=[];
|
|
630
630
|
f=u(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,E.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.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:r,drmTimeSeconds:p,playTime:t,pauseTime:w,bufferingTime:y,licenseTime:z,liveLatency:v,maxSegmentDuration:B,bytesDownloaded:A,stateHistory:C,
|
|
631
631
|
switchHistory:E}};
|
|
632
632
|
q.ki=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,p,t,w,y,z,v,B;return L(function(A){switch(A.g){case 1:if(h.l!=Eo&&h.l!=Ro)throw new R(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ua("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.B(2);break}return D(A,ep(h,a),3);case 3:d=A.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Ro){A.B(4);break}g&&(c="forced");return D(A,fp(h,a,b,c,d,f||"",k),5);case 5:l=Oc(b);m=h.jc();if(n=m.find(function(C){return Oc(C.language)==
|
|
633
|
-
l&&C.label==(f||"")&&C.kind==c}))return uo(h),A.return(n);throw new R(1,2,2012);case 4:r=Kc;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new R(1,4,4033);if(!k.length){A.B(6);break}return D(A,gp(h,a,h.
|
|
633
|
+
l&&C.label==(f||"")&&C.kind==c}))return uo(h),A.return(n);throw new R(1,2,2012);case 4:r=Kc;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new R(1,4,4033);if(!k.length){A.B(6);break}return D(A,gp(h,a,h.I,h.h.streaming.retryParameters),7);case 7:t=A.h,w=hp(h,t,d,k),y=new Blob([w],{type:"text/vtt"}),a=Hj(y),d="text/vtt";case 6:z={id:h.Ug++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Qk(0,p,[a]),mimeType:d||"",
|
|
634
634
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:r.Ca,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([ke(d||"",e||"")])};v=ke(z.mimeType,z.codecs);B=De(v);if(!B)throw new R(2,2,2014,d);h.i.textStreams.push(z);uo(h);return A.return(nf(z))}})};
|
|
635
|
-
q.li=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v;return L(function(B){switch(B.g){case 1:if(c.l!=Eo&&c.l!=Ro)throw new R(1,7,7004);if(b){B.B(2);break}return D(B,ep(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new R(1,2,2017,a);d=Kc;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new R(1,4,4045);return D(B,gp(c,a,c.
|
|
635
|
+
q.li=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v;return L(function(B){switch(B.g){case 1:if(c.l!=Eo&&c.l!=Ro)throw new R(1,7,7004);if(b){B.B(2);break}return D(B,ep(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new R(1,2,2017,a);d=Kc;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new R(1,4,4045);return D(B,gp(c,a,c.I,c.h.streaming.retryParameters),4);case 4:f=B.h;g=Ee[b];if(!g)throw new R(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
636
636
|
vttOffset:0};l=Fb(f);m=h.parseMedia(l,k,a);n=[];r={};p=u(m);for(t=p.next();!t.done;r={wd:r.wd,qc:r.qc},t=p.next())r.qc=t.value,r.wd=null,w=function(A){return function(){null==A.wd&&(A.wd=Cc([a],[A.qc.payload]));return A.wd||[]}}(r),y=new Ci(r.qc.startTime,r.qc.endTime,w,0,null,null,0,0,Infinity),r.qc.payload.includes("#xywh")&&(z=r.qc.payload.split("#xywh=")[1].split(","),4===z.length&&y.Sh({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
|
|
637
637
|
n.push(y);v={id:c.Ug++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ok(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.vf,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([ke(b||
|
|
638
638
|
"","")])};c.l==Ro?c.Rd.push(v):c.i.imageStreams.push(v);uo(c);return B.return(of(v))}})};
|
|
639
639
|
q.ji=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=Eo&&d.l!=Ro)throw new R(1,7,7004);if(c){k.B(2);break}return D(k,ep(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),D(k,fp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.oh();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return D(k,new Promise(function(l,m){d.m.na(f,"load",l);d.m.na(f,"error",function(){m(new R(1,2,2015))})}),6);case 6:return uo(d),k.return(h);case 5:throw new R(1,
|
|
640
|
-
2,2012);}})};function ep(a,b){var c;return L(function(d){switch(d.g){case 1:return ra(d,2),D(d,Im(b,a.
|
|
641
|
-
function fp(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?D(n,gp(a,b,a.
|
|
642
|
-
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function gp(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=
|
|
640
|
+
2,2012);}})};function ep(a,b){var c;return L(function(d){switch(d.g){case 1:return ra(d,2),D(d,Im(b,a.I,a.h.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:ua(d);case 3:if(c)return d.return(c);throw new R(1,2,2011,b);}})}
|
|
641
|
+
function fp(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?D(n,gp(a,b,a.I,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=hp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Hj(l),e="text/vtt");m=document.createElement("track");var r=a.P,p=b;try{if(r.g.enabled){var t=fn(r);t.ot=tn;t.su=!0;var w=kn(t);var y=ln(p,w)}else y=p}catch(z){Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),y=p}m.src=y;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
642
|
+
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function gp(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=Ag;f=ug([b],d);f.method="GET";var k=a.P;try{k.g.enabled&&mn(k,f,{ot:tn,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return D(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
643
643
|
function hp(a,b,c,d){var e=Ee[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fb(b),b=c.parseMedia(b,a,null),cn(b,d);throw new R(2,2,2014,c);}q.ek=function(a,b){this.Y.width=a;this.Y.height=b};q.xg=function(a){if(this.l==Eo){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=u(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Md||d.kb||d.Qb||(d.Md=!1,Cl(b,d,a));b=!0}}else b=!1;return b};
|
|
644
644
|
q.Xf=function(){Ua("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.Si=function(){return this.Fa};
|
|
645
645
|
function Tn(a){var b=km();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.xg(d))}};b.textDisplayFactory=function(){if(a.Oe){var c=a.getConfiguration();return new Um(a.g,a.Oe,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Nm(a.g,"Shaka Player TextTrack"):new Qm};return b}q.Ig=function(a){this.Oe=a};
|
|
646
646
|
function so(a,b){for(var c=new Set,d=u(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=u(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=u(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Rk,l=e.closedCaptions.get(g);h={id:a.Ug++,originalId:g,groupId:null,
|
|
647
647
|
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:Ic,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([ke(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
648
648
|
function Ko(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,r;return L(function(p){if(1==p.g)return k?D(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.Ub(l))?m.next().value:null;if(!n)return p.return(null);r=n.startTime;return p.return(r)})},D(h,e(c,b),2);if(3!=h.g)return f=h.h,D(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)})}
|
|
649
|
-
function jo(a){var b=a.Od();if(a.u&&a.M&&a.G){var c=a.
|
|
649
|
+
function jo(a){var b=a.Od();if(a.u&&a.M&&a.G){var c=a.J;c.j=b;Tk(c);a.P&&(c=a.P,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);zo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(ao("buffering",b))}function Ao(a){var b=a.g.playbackRate;0!=b&&(a.J&&a.J.set(b),b=ao("ratechange"),a.dispatchEvent(b))}
|
|
650
650
|
function zo(a){if(a.u&&a.M){var b=a.u.g,c="playing";a.M.g==ag?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(ao("statechanged",c)))}}
|
|
651
|
-
function Oo(a){var b=a.g.playbackRate,c=a.U();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.nh();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Hc(d):1==e&&b!==a.
|
|
651
|
+
function Oo(a){var b=a.g.playbackRate,c=a.U();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.nh();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Hc(d):1==e&&b!==a.J.vc()&&a.Qc()}if(c&&(e=a.Pa(),Number.isFinite(e.end)&&!(a.g.currentTime<e.start))){if(a.h.streaming.liveSync){var f=a.h.streaming.liveSyncMaxLatency;var g=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,
|
|
652
652
|
g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==Ro){var l=a.g.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.h.streaming.liveSyncPanicMode;
|
|
653
|
-
l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.M.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.Hc(k):f&&g&&c-d>f?b!=g&&a.Hc(g):h&&k&&c-d<h?b!=k&&a.Hc(k):b!==a.
|
|
654
|
-
function Po(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.O)?(a.O=c,b=!0):(c=Math.max(a.O,c),a.O!=c&&(a.O=c,b=!0)));if(b){var d;0==a.O?d=ao("started"):25==a.O?d=ao("firstquartile"):50==a.O?d=ao("midpoint"):75==a.O?d=ao("thirdquartile"):100==a.O&&(d=ao("complete"));d&&a.dispatchEvent(d)}}}function vo(a){try{ri(a.Le,a.i)}catch(c){return ho(a,c),!1}var b=vf(a.i.variants);b=a.qa.create(b);a.
|
|
655
|
-
function Go(a,b){b=void 0===b?!1:b;return vo(a)?a.
|
|
653
|
+
l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.M.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.Hc(k):f&&g&&c-d>f?b!=g&&a.Hc(g):h&&k&&c-d<h?b!=k&&a.Hc(k):b!==a.J.vc()&&a.Qc()}}
|
|
654
|
+
function Po(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.O)?(a.O=c,b=!0):(c=Math.max(a.O,c),a.O!=c&&(a.O=c,b=!0)));if(b){var d;0==a.O?d=ao("started"):25==a.O?d=ao("firstquartile"):50==a.O?d=ao("midpoint"):75==a.O?d=ao("thirdquartile"):100==a.O&&(d=ao("complete"));d&&a.dispatchEvent(d)}}}function vo(a){try{ri(a.Le,a.i)}catch(c){return ho(a,c),!1}var b=vf(a.i.variants);b=a.qa.create(b);a.s.setVariants(Array.from(b.values()));return!0}
|
|
655
|
+
function Go(a,b){b=void 0===b?!1:b;return vo(a)?a.s.chooseVariant(b):null}
|
|
656
656
|
function Yn(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=u(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,Za("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Te.stop();d&&wo(a,!0,void 0,!1,!1)}
|
|
657
657
|
function wo(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=Go(a);f&&Co(a,f,e,b,c,d)}function Co(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Gl(a.j,b,d,e,!0);else{var h=a.u.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Gl(a.j,b,d,e,f,c);d=null;g&&(d=mf(g));b=mf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&xj(a.L,b,a.Yf()),c=ao("adaptation",c),ip(a,c)):jp(a,d,b)}}
|
|
658
658
|
function ap(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=tf(c);b=tf(b);jp(a,c,b)}function Lo(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=Oc(a.h.preferredTextLanguage);c=Oc(c.language);if(2==a.h.autoShowText)return Nc(c,d);if(3==a.h.autoShowText)return a=Oc(b.language),Nc(c,d)&&!Nc(a,c);Ua("Invalid autoShowText setting!");return!1}function uo(a){var b=ao("trackschanged");ip(a,b)}
|
|
@@ -660,76 +660,76 @@ function jp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&xj(a.L,c
|
|
|
660
660
|
q.se=function(a,b){if(!this.h.abr.enabled||this.l===bo||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=u(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.Te.ya(1);b=this.Ib().video.reduce(function(f,g){return f+g.end-g.start},0);wo(this,!0,b,!0,!1);return!0}return!1};
|
|
661
661
|
function ho(a,b){var c,d,e;return L(function(f){switch(f.g){case 1:if(a.l==bo)return f.return();c=!0;if(!(a.Ka&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.B(2);break}ra(f,3);return D(f,$l(a.j),5);case 5:d=f.h;c=!d;ta(f,2);break;case 3:ua(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&Xn(a,!1);e=ao("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);F(f)}})}
|
|
662
662
|
function to(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(ao(b,a))}function go(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new R(2,3,3016,b,c,a.g.error.message)}
|
|
663
|
-
function Bo(a,b,c){0<b&&(a.U()||a.Uh(b));b=a.getDuration();c<b&&(a.U()||a.
|
|
663
|
+
function Bo(a,b,c){0<b&&(a.U()||a.Uh(b));b=a.getDuration();c<b&&(a.U()||a.yb(c))}function ip(a,b){L(function(c){if(1==c.g)return D(c,Promise.resolve(),2);a.l!=bo&&a.dispatchEvent(b);F(c)})}function cp(a){var b=new Set;a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Oc(c.language)):b.add("und");return b}
|
|
664
664
|
function bp(a){var b=new Map,c=new Map;a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Oc(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=u(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=u(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));
|
|
665
665
|
h.push({language:l,role:m,label:n})}});return h}N("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.Ig;V.prototype.getManifestParserFactory=V.prototype.Si;V.prototype.getManifest=V.prototype.Xf;V.prototype.retryStreaming=V.prototype.xg;V.prototype.setMaxHardwareResolution=V.prototype.ek;V.prototype.addChaptersTrack=V.prototype.ji;V.prototype.addThumbnailsTrack=V.prototype.li;V.prototype.addTextTrackAsync=V.prototype.ki;V.prototype.getStats=V.prototype.getStats;
|
|
666
666
|
V.prototype.getBufferedInfo=V.prototype.Ib;V.prototype.getSegmentAvailabilityDuration=V.prototype.ze;V.prototype.getPresentationStartTimeAsDate=V.prototype.rh;V.prototype.getPlayheadTimeAsDate=V.prototype.Vi;V.prototype.setTextTrackVisibility=V.prototype.bf;V.prototype.getChapters=V.prototype.Fi;V.prototype.getChaptersTracks=V.prototype.oh;V.prototype.isTextTrackVisible=V.prototype.Bc;V.prototype.selectVariantsByLabel=V.prototype.Yj;V.prototype.selectTextLanguage=V.prototype.Ag;
|
|
667
667
|
V.prototype.selectAudioLanguage=V.prototype.Xe;V.prototype.getTextLanguages=V.prototype.$i;V.prototype.getAudioLanguages=V.prototype.Ci;V.prototype.getTextLanguagesAndRoles=V.prototype.aj;V.prototype.getAudioLanguagesAndRoles=V.prototype.Di;V.prototype.selectVariantTrack=V.prototype.Ye;V.prototype.selectTextTrack=V.prototype.Bg;V.prototype.getThumbnails=V.prototype.$f;V.prototype.getAllThumbnails=V.prototype.Bi;V.prototype.getImageTracks=V.prototype.ve;V.prototype.getTextTracks=V.prototype.jc;
|
|
668
|
-
V.prototype.getVariantTracks=V.prototype.
|
|
668
|
+
V.prototype.getVariantTracks=V.prototype.sb;V.prototype.cancelTrickPlay=V.prototype.Qc;V.prototype.trickPlay=V.prototype.Hc;V.prototype.getPlaybackRate=V.prototype.Ra;V.prototype.isBuffering=V.prototype.Od;V.prototype.getKeyStatuses=V.prototype.we;V.prototype.getActiveSessionsMetadata=V.prototype.Vf;V.prototype.getExpiration=V.prototype.Hd;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.jj;V.prototype.seekRange=V.prototype.Pa;
|
|
669
669
|
V.prototype.isAudioOnly=V.prototype.Yc;V.prototype.isInProgress=V.prototype.Ac;V.prototype.isLive=V.prototype.U;V.prototype.getAdManager=V.prototype.ue;V.prototype.getAssetUri=V.prototype.Fd;V.prototype.getNetworkingEngine=V.prototype.hc;V.prototype.getMediaElement=V.prototype.Ui;V.prototype.getManifestType=V.prototype.Yf;V.prototype.getLoadMode=V.prototype.Id;V.prototype.resetConfiguration=V.prototype.Rj;V.prototype.getBufferFullness=V.prototype.nh;V.prototype.getConfiguration=V.prototype.getConfiguration;
|
|
670
670
|
V.prototype.configure=V.prototype.configure;V.prototype.releaseAllMutexes=V.prototype.Nj;V.prototype.preload=V.prototype.preload;V.prototype.unloadAndSavePreload=V.prototype.ik;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.nk;V.prototype.unload=V.prototype.Ic;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.Zg;V.prototype.attach=V.prototype.Pc;
|
|
671
|
-
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?D(h,
|
|
672
|
-
k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=De(m)?!0:Pb()?jd(m)||(ee(m)?!0:!1):Qb(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=kp;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=co;V.setAdManagerFactory=function(a){Wn=a};V.registerSupportPlugin=function(a,b){kp[a]=b};V.prototype.destroy=V.prototype.destroy;var bo=0,Sn=1,Eo=2,Ro=3;V.LoadMode={DESTROYED:bo,NOT_LOADED:Sn,MEDIA_SOURCE:Eo,SRC_EQUALS:Ro};V.version="v4.8.
|
|
673
|
-
od=new function(a){this.g=a;this.i=pd;this.h=qd}(new md(Number(lp[0]),Number(lp[1])));var kp={},Wn=null;function mp(){this.h=[];this.j=this.i=this.g=0};function np(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 ed;this.m.
|
|
671
|
+
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?D(h,hi(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(Pb())for(var l in vi)k[l]=!0;l=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Pb()?!!vi[m]:Qb(m);c=k;l='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",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(le));
|
|
672
|
+
k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=De(m)?!0:Pb()?jd(m)||(ee(m)?!0:!1):Qb(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=kp;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=co;V.setAdManagerFactory=function(a){Wn=a};V.registerSupportPlugin=function(a,b){kp[a]=b};V.prototype.destroy=V.prototype.destroy;var bo=0,Sn=1,Eo=2,Ro=3;V.LoadMode={DESTROYED:bo,NOT_LOADED:Sn,MEDIA_SOURCE:Eo,SRC_EQUALS:Ro};V.version="v4.8.10";
|
|
673
|
+
var lp=["4","8"];od=new function(a){this.g=a;this.i=pd;this.h=qd}(new md(Number(lp[0]),Number(lp[1])));var kp={},Wn=null;function mp(){this.h=[];this.j=this.i=this.g=0};function np(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 ed;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=np.prototype;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};
|
|
674
674
|
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)};
|
|
675
675
|
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)};
|
|
676
676
|
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()};
|
|
677
677
|
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};N("shaka.ads.ClientSideAd",np);np.prototype.release=np.prototype.release;
|
|
678
678
|
np.prototype.getPodIndex=np.prototype.getPodIndex;np.prototype.getTimeOffset=np.prototype.getTimeOffset;np.prototype.getMediaUrl=np.prototype.getMediaUrl;np.prototype.getAdvertiserName=np.prototype.getAdvertiserName;np.prototype.getCreativeAdId=np.prototype.getCreativeAdId;np.prototype.getAdId=np.prototype.getAdId;np.prototype.getVastMediaWidth=np.prototype.getVastMediaWidth;np.prototype.getVastMediaHeight=np.prototype.getVastMediaHeight;np.prototype.getVastMediaBitrate=np.prototype.getVastMediaBitrate;
|
|
679
679
|
np.prototype.getDescription=np.prototype.getDescription;np.prototype.getTitle=np.prototype.getTitle;np.prototype.getPositionInSequence=np.prototype.getPositionInSequence;np.prototype.getSequenceLength=np.prototype.getSequenceLength;np.prototype.setMuted=np.prototype.setMuted;np.prototype.resize=np.prototype.resize;np.prototype.isLinear=np.prototype.isLinear;np.prototype.isMuted=np.prototype.isMuted;np.prototype.setVolume=np.prototype.setVolume;np.prototype.getVolume=np.prototype.getVolume;
|
|
680
|
-
np.prototype.play=np.prototype.play;np.prototype.pause=np.prototype.pause;np.prototype.skip=np.prototype.skip;np.prototype.canSkipNow=np.prototype.canSkipNow;np.prototype.getTimeUntilSkippable=np.prototype.getTimeUntilSkippable;np.prototype.isSkippable=np.prototype.isSkippable;np.prototype.isPaused=np.prototype.isPaused;np.prototype.getRemainingTime=np.prototype.getRemainingTime;np.prototype.getMinSuggestedDuration=np.prototype.getMinSuggestedDuration;np.prototype.getDuration=np.prototype.getDuration;function op(a,b,c,d,e){var f=this;this.
|
|
681
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){pp(f,g)});this.h.
|
|
680
|
+
np.prototype.play=np.prototype.play;np.prototype.pause=np.prototype.pause;np.prototype.skip=np.prototype.skip;np.prototype.canSkipNow=np.prototype.canSkipNow;np.prototype.getTimeUntilSkippable=np.prototype.getTimeUntilSkippable;np.prototype.isSkippable=np.prototype.isSkippable;np.prototype.isPaused=np.prototype.isPaused;np.prototype.getRemainingTime=np.prototype.getRemainingTime;np.prototype.getMinSuggestedDuration=np.prototype.getMinSuggestedDuration;np.prototype.getDuration=np.prototype.getDuration;function op(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new ed;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.s,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.10");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,
|
|
681
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){pp(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){qp(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.H=!0})}op.prototype.configure=function(a){this.u=a};op.prototype.stop=function(){this.g&&this.g.stop();this.s&&Tm(this.s)};
|
|
682
682
|
op.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.G.destroy()};function qp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new Q("ad-error",b));rp(a,null);a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
683
|
-
function pp(a,b){a.m(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.
|
|
684
|
-
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",b)))}sp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,tp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.
|
|
685
|
-
a.i.offsetHeight,tp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.
|
|
683
|
+
function pp(a,b){a.m(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);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.F);a.m(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
684
|
+
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",b)))}sp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,tp(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,tp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
685
|
+
a.i.offsetHeight,tp(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,tp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.u.skipPlayDetection?a.g.start():a.h.na(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){rp(a,null)}}
|
|
686
686
|
function tp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
687
|
-
function sp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new Q(d,c))}a.h.
|
|
688
|
-
function(c){b(c,"ad-third-quartile")});a.h.
|
|
689
|
-
a.h.
|
|
690
|
-
a.h.
|
|
691
|
-
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.
|
|
692
|
-
function up(a,b){var c=b.getAd();c?(a.j=new np(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new Q("ad-started",b)),a.j.isLinear()&&(a.
|
|
693
|
-
function rp(a,b){a.m(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.
|
|
687
|
+
function sp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new Q(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){qp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){up(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){up(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,
|
|
688
|
+
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){rp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){rp(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")});
|
|
689
|
+
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")});
|
|
690
|
+
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,
|
|
691
|
+
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")})}
|
|
692
|
+
function up(a,b){var c=b.getAd();c?(a.j=new np(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new Q("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.u.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))):Ua("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
693
|
+
function rp(a,b){a.m(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.u.customPlayheadTracker||a.i.ended||a.i.play())};function vp(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.l=d}q=vp.prototype;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 this.h.skipOffset?!0:!1};
|
|
694
694
|
q.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var a=this.getRemainingTime()-this.h.skipOffset;return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};
|
|
695
695
|
q.isLinear=function(){return this.l};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.j?this.j: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};
|
|
696
696
|
q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.j=this.i=this.g=this.h=null};N("shaka.ads.MediaTailorAd",vp);vp.prototype.release=vp.prototype.release;vp.prototype.getPodIndex=vp.prototype.getPodIndex;vp.prototype.getTimeOffset=vp.prototype.getTimeOffset;vp.prototype.getMediaUrl=vp.prototype.getMediaUrl;vp.prototype.getAdvertiserName=vp.prototype.getAdvertiserName;
|
|
697
697
|
vp.prototype.getCreativeAdId=vp.prototype.getCreativeAdId;vp.prototype.getAdId=vp.prototype.getAdId;vp.prototype.getVastMediaWidth=vp.prototype.getVastMediaWidth;vp.prototype.getVastMediaHeight=vp.prototype.getVastMediaHeight;vp.prototype.getVastMediaBitrate=vp.prototype.getVastMediaBitrate;vp.prototype.getDescription=vp.prototype.getDescription;vp.prototype.getTitle=vp.prototype.getTitle;vp.prototype.getPositionInSequence=vp.prototype.getPositionInSequence;vp.prototype.getSequenceLength=vp.prototype.getSequenceLength;
|
|
698
698
|
vp.prototype.setMuted=vp.prototype.setMuted;vp.prototype.resize=vp.prototype.resize;vp.prototype.isLinear=vp.prototype.isLinear;vp.prototype.isMuted=vp.prototype.isMuted;vp.prototype.setVolume=vp.prototype.setVolume;vp.prototype.getVolume=vp.prototype.getVolume;vp.prototype.play=vp.prototype.play;vp.prototype.pause=vp.prototype.pause;vp.prototype.skip=vp.prototype.skip;vp.prototype.canSkipNow=vp.prototype.canSkipNow;vp.prototype.getTimeUntilSkippable=vp.prototype.getTimeUntilSkippable;
|
|
699
|
-
vp.prototype.isSkippable=vp.prototype.isSkippable;vp.prototype.isPaused=vp.prototype.isPaused;vp.prototype.getRemainingTime=vp.prototype.getRemainingTime;vp.prototype.getMinSuggestedDuration=vp.prototype.getMinSuggestedDuration;vp.prototype.getDuration=vp.prototype.getDuration;function wp(a,b,c,d){this.F=a;this.L=b;this.g=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.h=null;this.H=new Map;this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.
|
|
700
|
-
wp.prototype.release=function(){this.stop();this.
|
|
701
|
-
function zp(a,b,c){var d,e,f,g,h,k,l,m,n,r,p;L(function(t){if(1==t.g)return d=
|
|
699
|
+
vp.prototype.isSkippable=vp.prototype.isSkippable;vp.prototype.isPaused=vp.prototype.isPaused;vp.prototype.getRemainingTime=vp.prototype.getRemainingTime;vp.prototype.getMinSuggestedDuration=vp.prototype.getMinSuggestedDuration;vp.prototype.getDuration=vp.prototype.getDuration;function wp(a,b,c,d){this.F=a;this.L=b;this.g=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.h=null;this.H=new Map;this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.s=new ed}wp.prototype.stop=function(){for(var a=u(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.Ya(b.target,b.type,b.listener);xp(this);this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.A=null;this.j=[];this.O=[];this.H.clear()};
|
|
700
|
+
wp.prototype.release=function(){this.stop();this.s&&this.s.release()};wp.prototype.onManifestUpdated=function(a){this.K=a;""!=this.I&&(yp(this,this.I,this.P),this.P=!1)};wp.prototype.getCuePoints=function(){for(var a=[],b=u(this.j),c=b.next();!c.done;c=b.next()){c=u(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};
|
|
701
|
+
function zp(a,b,c){var d,e,f,g,h,k,l,m,n,r,p;L(function(t){if(1==t.g)return d=ug([b],dg()),d.method="POST",c&&(e=JSON.stringify(c),d.body=rc(e)),f=a.L.request(7,d),ra(t,2),D(t,f.promise,4);if(2!=t.g){g=t.h;h=nc(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new ib(b),m=new ib(k.trackingUrl),a.I=l.resolve(m).toString(),n=Date.now()/1E3,r=n-a.S,a.i(new Q("ads-loaded",(new Map).set("loadTime",r))),p=new ib(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
702
702
|
return ta(t,0)}ua(t);if(!a.J.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,t.return();a.l.resolve(a.J);a.l=null;F(t)})}
|
|
703
|
-
function yp(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z;L(function(v){if(1==v.g)return d=
|
|
703
|
+
function yp(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z;L(function(v){if(1==v.g)return d=ug([b],dg()),e=a.L.request(7,d),ra(v,2),D(v,e.promise,4);if(2!=v.g){f=v.h;g=[];h=nc(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=u(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,r=u(n.nonLinearAdsList),p=r.next();!p.done;p=r.next())for(t=p.value,w=u(t.nonLinearAdList),y=w.next();!y.done;y=w.next())z=y.value,Ap(a,z);g=a.getCuePoints();a.i(new Q("ad-cue-points-changed",
|
|
704
704
|
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",g))),xp(a),a.j=[];c&&(a.K||0<g.length)&&Bp(a);return ta(v,0)}ua(v);F(v)})}
|
|
705
|
-
function Ap(a,b){var c,d,e,f,g,h,k,l;L(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Cp(b);if(d=a.H.get(c))return m.return();e=
|
|
706
|
-
function Cp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Bp(a){Dp(a);a.K||(Ep(a),a.o
|
|
705
|
+
function Ap(a,b){var c,d,e,f,g,h,k,l;L(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Cp(b);if(d=a.H.get(c))return m.return();e=ug([b.staticResource],dg());f=a.L.request(7,e);ra(m,2);a.H.set(c,[]);return D(m,f.promise,4)}if(2!=m.g)return g=m.h,h=nc(g.data),k=JSON.parse(h),l=k.apps,a.H.set(c,l),ta(m,0);ua(m);a.H.delete(c);F(m)})}
|
|
706
|
+
function Cp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Bp(a){Dp(a);a.K||(Ep(a),a.s.o(a.g,"seeked",function(){Ep(a)}),a.s.o(a.g,"ended",function(){xp(a)}));a.s.o(a.g,"timeupdate",function(){Dp(a)})}
|
|
707
707
|
function Ep(a){var b=a.g.currentTime;if(0!=b&&null==a.A){for(var c,d,e=u(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=u(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.g.currentTime=c.startTimeInSeconds)}}
|
|
708
708
|
function Dp(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if(a.h){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"),Fp(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),Fp(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),Fp(a,"thirdQuartile"));d=a.h.getRemainingTime();
|
|
709
709
|
e=a.h.getDuration();0<e&&(0>=d||d>e)&&xp(a)}if(!a.h||!a.h.isLinear()){a:for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.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.g.ended)continue;a.g.currentTime=h;break a}xp(a);a.M=e;a.h=new vp(g,f+1,e.ads.length,!0,a.g);a.G=g;0===f&&Fp(a,"breakStart");Gp(a);break}}}if(!a.h)for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
|
|
710
710
|
if(a.h)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(Cp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){xp(a);h=a;k=u(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||
|
|
711
711
|
0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.F.appendChild(m)}a.M=e;a.h=new vp(g,f+1,e.ads.length,!1,a.g);a.G=g;0===f&&Fp(a,"breakStart");Gp(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.A&&a.A>b&&(a.g.currentTime=a.A),a.A=null)}}}
|
|
712
|
-
function xp(a){if(a.h){for(;a.F.lastChild;)a.F.removeChild(a.F.firstChild);a.K||a.O.push(a.G.adId);Fp(a,"complete");for(var b=u(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.
|
|
713
|
-
function Gp(a){var b=!1;a.g.paused?b=!0:(Fp(a,"impression"),Fp(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&Fp(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||Fp(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(Fp(a,"impression"),Fp(a,"start"),b=!1):Fp(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){Fp(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o
|
|
712
|
+
function xp(a){if(a.h){for(;a.F.lastChild;)a.F.removeChild(a.F.firstChild);a.K||a.O.push(a.G.adId);Fp(a,"complete");for(var b=u(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.s.Ya(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&Fp(a,"breakEnd");a.h=null;a.G=null;a.M=null}}
|
|
713
|
+
function Gp(a){var b=!1;a.g.paused?b=!0:(Fp(a,"impression"),Fp(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&Fp(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||Fp(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(Fp(a,"impression"),Fp(a,"start"),b=!1):Fp(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){Fp(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target,
|
|
714
714
|
d.type,d.listener)}
|
|
715
|
-
function Fp(a,b){var c=a.G.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=u(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=
|
|
715
|
+
function Fp(a,b){var c=a.G.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=u(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=ug([d],dg()),d.method="POST",a.L.request(7,d))}switch(b){case "impression":a.i(new Q("ad-impression"));break;case "start":a.i(new Q("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new Q("ad-muted"));break;case "unmute":a.i(new Q("ad-volume-changed"));break;
|
|
716
716
|
case "resume":a.i(new Q("ad-resumed"));break;case "pause":a.i(new Q("ad-paused"));break;case "firstQuartile":a.i(new Q("ad-first-quartile"));break;case "midpoint":a.i(new Q("ad-midpoint"));break;case "thirdQuartile":a.i(new Q("ad-third-quartile"));break;case "complete":a.i(new Q("ad-complete"));a.i(new Q("ad-stopped"));break;case "breakStart":a.F.setAttribute("ad-active","true");break;case "breakEnd":a.F.removeAttribute("ad-active")}};function Hp(a,b){this.g=a;this.i=null;this.h=b}q=Hp.prototype;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)};
|
|
717
717
|
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};
|
|
718
718
|
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()};
|
|
719
719
|
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};N("shaka.ads.ServerSideAd",Hp);Hp.prototype.release=Hp.prototype.release;Hp.prototype.getPodIndex=Hp.prototype.getPodIndex;
|
|
720
720
|
Hp.prototype.getTimeOffset=Hp.prototype.getTimeOffset;Hp.prototype.getMediaUrl=Hp.prototype.getMediaUrl;Hp.prototype.getAdvertiserName=Hp.prototype.getAdvertiserName;Hp.prototype.getCreativeAdId=Hp.prototype.getCreativeAdId;Hp.prototype.getAdId=Hp.prototype.getAdId;Hp.prototype.getVastMediaWidth=Hp.prototype.getVastMediaWidth;Hp.prototype.getVastMediaHeight=Hp.prototype.getVastMediaHeight;Hp.prototype.getVastMediaBitrate=Hp.prototype.getVastMediaBitrate;Hp.prototype.getDescription=Hp.prototype.getDescription;
|
|
721
721
|
Hp.prototype.getTitle=Hp.prototype.getTitle;Hp.prototype.getPositionInSequence=Hp.prototype.getPositionInSequence;Hp.prototype.getSequenceLength=Hp.prototype.getSequenceLength;Hp.prototype.setMuted=Hp.prototype.setMuted;Hp.prototype.resize=Hp.prototype.resize;Hp.prototype.isLinear=Hp.prototype.isLinear;Hp.prototype.isMuted=Hp.prototype.isMuted;Hp.prototype.setVolume=Hp.prototype.setVolume;Hp.prototype.getVolume=Hp.prototype.getVolume;Hp.prototype.play=Hp.prototype.play;Hp.prototype.pause=Hp.prototype.pause;
|
|
722
|
-
Hp.prototype.skip=Hp.prototype.skip;Hp.prototype.canSkipNow=Hp.prototype.canSkipNow;Hp.prototype.getTimeUntilSkippable=Hp.prototype.getTimeUntilSkippable;Hp.prototype.isSkippable=Hp.prototype.isSkippable;Hp.prototype.isPaused=Hp.prototype.isPaused;Hp.prototype.getRemainingTime=Hp.prototype.getRemainingTime;Hp.prototype.getMinSuggestedDuration=Hp.prototype.getMinSuggestedDuration;Hp.prototype.getDuration=Hp.prototype.getDuration;function Ip(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.
|
|
723
|
-
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.
|
|
724
|
-
var f=e.l.currentTime;e.
|
|
725
|
-
this.h.
|
|
726
|
-
f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=Ip.prototype;q.configure=function(){};q.stop=function(){this.F="";this.
|
|
727
|
-
function Jp(a,b){a.i(new Q("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.
|
|
722
|
+
Hp.prototype.skip=Hp.prototype.skip;Hp.prototype.canSkipNow=Hp.prototype.canSkipNow;Hp.prototype.getTimeUntilSkippable=Hp.prototype.getTimeUntilSkippable;Hp.prototype.isSkippable=Hp.prototype.isSkippable;Hp.prototype.isPaused=Hp.prototype.isPaused;Hp.prototype.getRemainingTime=Hp.prototype.getRemainingTime;Hp.prototype.getMinSuggestedDuration=Hp.prototype.getMinSuggestedDuration;Hp.prototype.getDuration=Hp.prototype.getDuration;function Ip(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.F="";this.G=[];this.h=new ed;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 Q("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Jp(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
|
|
723
|
+
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Hp(f,e.l);e.A&&(e.m.i=e.A);e.i(new Q("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");
|
|
724
|
+
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 Q("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new Q("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new Q("ad-third-quartile"))});
|
|
725
|
+
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new Q("ad-complete"));e.i(new Q("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 Q("ad-skipped"));e.i(new Q("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=u(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=
|
|
726
|
+
f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=Ip.prototype;q.configure=function(){};q.stop=function(){this.F="";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};
|
|
727
|
+
function Jp(a,b){a.i(new Q("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 Kp(){bb.call(this);this.g=this.h=this.i=null;this.j=new mp;this.m=navigator.language;this.l=null}na(Kp,bb);q=Kp.prototype;q.setLocale=function(a){this.m=a};q.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new R(2,10,1E4);this.i&&this.i.release();this.i=new op(a,b,this.m,c,function(e){return Lp(d,e)});this.i.configure(this.l)};
|
|
728
728
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);bb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new mp};q.requestClientSideAds=function(a){if(!this.i)throw new R(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.I=Date.now()/1E3;b.l.requestAds(a)};
|
|
729
729
|
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new R(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new wp(a,b,c,function(e){return Lp(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new R(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new R(1,10,10004)):(d.l=new fg,zp(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
730
730
|
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new R(1,10,10005);var b=this.h;b.I=a;b.i(new Q("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 R(2,10,10002);this.g&&this.g.release();this.g=new Ip(a,b,this.m,function(d){return Lp(c,d)});this.g.configure(this.l)};
|
|
731
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.8.
|
|
732
|
-
(c.I=!0),c.j=new fg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new R(1,10,10003);(a.mpt||a.mpv)&&Ua('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.8.
|
|
731
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.8.10";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
732
|
+
(c.I=!0),c.j=new fg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new R(1,10,10003);(a.mpt||a.mpv)&&Ua('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.8.10";this.g.g.replaceAdTagParameters(a)};
|
|
733
733
|
q.getServerSideCuePoints=function(){nd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
734
734
|
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)};
|
|
735
735
|
function Lp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}N("shaka.ads.AdManager",Kp);Kp.prototype.onCueMetadataChange=Kp.prototype.onCueMetadataChange;Kp.prototype.onHlsTimedMetadata=Kp.prototype.onHlsTimedMetadata;Kp.prototype.onDashTimedMetadata=Kp.prototype.onDashTimedMetadata;Kp.prototype.onManifestUpdated=Kp.prototype.onManifestUpdated;
|
|
@@ -743,36 +743,36 @@ function Np(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("
|
|
|
743
743
|
function Op(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
744
744
|
var Pp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Qp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Rp=["loop","playbackRate"],Sp=["pause","play"],Tp={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
745
745
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Up={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Vp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Wp=[["getConfiguration","configure"]],Xp=[["isTextTrackVisible","setTextTrackVisibility"]],Yp="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
746
|
-
Zp=["attach","attachCanvas","detach","load","unload"];function $p(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new Ob(b);this.M=c;this.u=!1;this.A=d;this.H=e;this.O=f;this.h=this.m=!1;this.K="";this.
|
|
747
|
-
r.code);for(m in r)n[m]=r[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;bq.add(this)}q=$p.prototype;q.destroy=function(){bq.delete(this);cq(this);dq&&eq(this);this.l&&(this.l.stop(),this.l=null);this.H=this.A=null;this.h=this.m=!1;this.G=this.F=this.j=this.i=this.g=this.
|
|
746
|
+
Zp=["attach","attachCanvas","detach","load","unload"];function $p(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new Ob(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.F=function(){return aq(h)};this.G=function(k,l){k=Np(l);switch(k.type){case "event":var m=k.targetName,n=Qa(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var r in m[n])k[r]=m[n][r]}h.u&&(h.M(),h.u=!1);break;case "asyncComplete":if(n=k.id,r=k.error,k=h.i[n],delete h.i[n],k)if(r){n=new R(r.severity,r.category,
|
|
747
|
+
r.code);for(m in r)n[m]=r[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;bq.add(this)}q=$p.prototype;q.destroy=function(){bq.delete(this);cq(this);dq&&eq(this);this.l&&(this.l.stop(),this.l=null);this.H=this.A=null;this.h=this.m=!1;this.G=this.F=this.j=this.i=this.g=this.s=null;return Promise.resolve()};q.Ga=function(){return this.h};q.Ue=function(){return this.K};
|
|
748
748
|
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ia();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(bq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new fg;d.u=!0;fq(d,e)}},function(b){for(var c=u(bq),d=c.next();!d.done;d=c.next())d=d.value,gq="available"==b,d.l.Ia()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});gq&&this.l.V(hq);(a=dq)&&
|
|
749
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new fg,this.u=!0,fq(this,a)):dq=null}else window.__onGCastApiAvailable!==iq&&(jq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=iq)};q.Cg=function(a){this.
|
|
749
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new fg,this.u=!0,fq(this,a)):dq=null}else window.__onGCastApiAvailable!==iq&&(jq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=iq)};q.Cg=function(a){this.s=a;this.h&&kq(this,{type:"appData",appData:this.s})};
|
|
750
750
|
q.cast=function(){var a=this;return L(function(b){if(!a.m)throw new R(1,8,8E3);if(!gq)throw new R(1,8,8001);if(a.h)throw new R(1,8,8002);a.j=new fg;chrome.cast.requestSession(function(c){return fq(a,c)},function(c){return lq(a,c)});return D(b,a.j,0)})};function mq(a){a.h&&chrome.cast.requestSession(function(b){return fq(a,b)},function(b){return lq(a,b)})}q.Uc=function(){if(this.h){cq(this);if(dq){eq(this);try{dq.stop(function(){},function(){})}catch(a){}dq=null}aq(this)}};
|
|
751
751
|
q.get=function(a,b){var c=this;if("video"==a){if(Sp.includes(b))return function(){return c.Jh.apply(c,[a,b].concat(x(Fa.apply(0,arguments))))}}else if("player"==a){if(Vp[b]&&!this.get("player","isLive")())return function(){};if(Yp.includes(b))return function(){return c.Jh.apply(c,[a,b].concat(x(Fa.apply(0,arguments))))};if(Zp.includes(b))return function(){return c.Oj.apply(c,[a,b].concat(x(Fa.apply(0,arguments))))};if(Tp[b]||Up[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
752
|
-
q.set=function(a,b,c){this.g[a][b]=c;kq(this,{type:"set",targetName:a,property:b,value:c})};function fq(a,b){var c=a.O();dq=b;b.addUpdateListener(a.F);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);aq(a);kq(a,{type:"init",initState:c,appData:a.
|
|
752
|
+
q.set=function(a,b,c){this.g[a][b]=c;kq(this,{type:"set",targetName:a,property:b,value:c})};function fq(a,b){var c=a.O();dq=b;b.addUpdateListener(a.F);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);aq(a);kq(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function lq(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 R(2,8,c,b))}
|
|
753
753
|
q.Jh=function(a,b){kq(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Oj=function(a,b){var c=Fa.apply(2,arguments),d=new fg,e=this.J.toString();this.J++;this.i[e]=d;try{kq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function eq(a){var b=dq;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
754
754
|
function aq(a){var b=dq?"connected"==dq.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};cq(a)}a.h=b;a.K=b?dq.receiver.friendlyName:"";a.l.Ia()}function cq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new R(1,7,7E3))}}function kq(a,b){b=Mp(b);var c=dq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Xa)}catch(d){throw b=new R(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.A("player",c),a.Uc(),b;}}var hq=.02,gq=!1,dq=null,jq=null,bq=new Set;
|
|
755
|
-
function iq(a){jq?window.__onGCastApiAvailable=jq:delete window.__onGCastApiAvailable;jq=null;if(a)for(var b=u(bq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function nq(a,b,c,d){d=void 0===d?!1:d;bb.call(this);var e=this;this.i=a;this.h=b;this.m=this.
|
|
755
|
+
function iq(a){jq?window.__onGCastApiAvailable=jq:delete window.__onGCastApiAvailable;jq=null;if(a)for(var b=u(bq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function nq(a,b,c,d){d=void 0===d?!1:d;bb.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.F=d;this.A=new Map;this.g=new $p(c,function(){return oq(e)},function(){return pq(e)},function(f,g){return qq(e,f,g)},function(){return rq(e)},function(){return sq(e)},d);tq(this)}na(nq,bb);q=nq.prototype;
|
|
756
756
|
q.destroy=function(a){a&&this.g.Uc();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;bb.prototype.release.call(this);return Promise.all(a)};q.kc=function(){return this.l};q.Wc=function(){return this.u};q.Bf=function(){return this.g.m&&gq};q.Ga=function(){return this.g.Ga()};q.Ue=function(){return this.g.Ue()};
|
|
757
757
|
q.cast=function(){var a=this;return L(function(b){return 1==b.g?D(b,a.g.cast(),2):a.h?D(b,a.h.Ic(),0):b.return()})};q.Cg=function(a){this.g.Cg(a)};q.Wh=function(){mq(this.g)};q.Uc=function(){this.g.Uc()};
|
|
758
758
|
q.eh=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.Uc();return D(d,c.g.destroy(),2)}c.g=null;c.g=new $p(a,function(){return oq(c)},function(){return pq(c)},function(e,f){return qq(c,e,f)},function(){return rq(c)},function(){return sq(c)},b);c.g.init();F(d)})};
|
|
759
|
-
function tq(a){a.g.init();a.m=new ed;for(var b=u(Pp),c=b.next();!c.done;c=b.next())a.m.
|
|
760
|
-
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return wq(a,f)}})});xq(a);a.j=new bb;a.j.Ve=a.l;a.
|
|
759
|
+
function tq(a){a.g.init();a.m=new ed;for(var b=u(Pp),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ga()||(f=Qa(f),a.j.dispatchEvent(f))});for(var d in Ra)a.m.o(a.h,Ra[d],function(f){a.g.Ga()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.od=e,Object.defineProperty(a.l,b.od,{configurable:!1,enumerable:!0,get:function(f){return function(){return uq(a,f.od)}}(b),set:function(f){return function(g){var h=f.od;a.g.Ga()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={od:b.od};a.u={};vq(a,
|
|
760
|
+
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return wq(a,f)}})});xq(a);a.j=new bb;a.j.Ve=a.l;a.s=new bb;a.s.Ve=a.u}function xq(a){var b=new Map;vq(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)})}
|
|
761
761
|
function vq(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=u(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)}}
|
|
762
762
|
function sq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Fd(),startTime:null};a.i.pause();for(var c=u(Rp),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=u(Wp);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=u(Xp);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 oq(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
|
|
763
763
|
function pq(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
764
764
|
function rq(a){for(var b=u(Wp),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=u(Rp);for(d=c.next();!d.done;d=c.next())d=
|
|
765
765
|
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=u(Rp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=u(Xp);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.bf(h);g&&a.h.Ag(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new Q("error",l);a.h.dispatchEvent(l)})}
|
|
766
766
|
function uq(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.Ga()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ga()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
767
|
-
function wq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.
|
|
767
|
+
function wq(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.hc()};if("getDrmEngine"==b)return function(){return a.h.F};if("getAdManager"==b)return function(){return a.h.ue()};
|
|
768
768
|
if("setVideoContainer"==b)return function(c){return a.h.Ig(c)};if(a.g.Ga()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ga()&&0==Object.keys(a.g.g.video).length&&(Tp[b]||Up[b])||!a.g.Ga()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
769
|
-
function qq(a,b,c){a.g.Ga()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.
|
|
770
|
-
nq.prototype.getVideo=nq.prototype.kc;nq.prototype.destroy=nq.prototype.destroy;function yq(a,b,c,d){bb.call(this);var e=this;this.g=a;this.h=b;this.j=new ed;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.
|
|
769
|
+
function qq(a,b,c){a.g.Ga()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}N("shaka.cast.CastProxy",nq);nq.prototype.changeReceiverId=nq.prototype.eh;nq.prototype.forceDisconnect=nq.prototype.Uc;nq.prototype.suggestDisconnect=nq.prototype.Wh;nq.prototype.setAppData=nq.prototype.Cg;nq.prototype.cast=nq.prototype.cast;nq.prototype.receiverName=nq.prototype.Ue;nq.prototype.isCasting=nq.prototype.Ga;nq.prototype.canCast=nq.prototype.Bf;nq.prototype.getPlayer=nq.prototype.Wc;
|
|
770
|
+
nq.prototype.getVideo=nq.prototype.kc;nq.prototype.destroy=nq.prototype.destroy;function yq(a,b,c,d){bb.call(this);var e=this;this.g=a;this.h=b;this.j=new ed;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.F=!1;this.A=!0;this.u=this.l=null;this.I=new Ob(function(){zq(e)});Aq(this)}na(yq,bb);q=yq.prototype;q.isConnected=function(){return this.H};q.oj=function(){return this.s};q.bk=function(a){this.i=a};q.wi=function(){this.i=null};
|
|
771
771
|
q.ck=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.$j=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Zj=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
772
|
-
q.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.
|
|
772
|
+
q.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.s=!0,a.l=null,a.u=null,bb.prototype.release.call(a),D(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
773
773
|
function Aq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Bq(a)};b.onSenderDisconnected=function(){return Bq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Cq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Cq(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 Dq(a,
|
|
774
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Eq(a,e)};b.start();b=u(Pp);for(var c=b.next();!c.done;c=b.next())a.j.
|
|
775
|
-
a.j.
|
|
774
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Eq(a,e)};b.start();b=u(Pp);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Fq(a,"video",e)});for(var d in Ra)a.j.o(a.h,Ra[d],function(e){return Fq(a,"player",e)});a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.s=!1;Gq(a)});a.j.o(a.g,"playing",function(){a.s=!1;Gq(a)});a.j.o(a.g,"pause",function(){Gq(a)});a.j.o(a.h,"unloading",function(){a.s=!0;Gq(a)});
|
|
775
|
+
a.j.o(a.g,"ended",function(){(new Ob(function(){a.g&&a.g.ended&&(a.s=!0,Gq(a))})).V(Hq)})}function Bq(a){a.m=0;a.A=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Gq(a)}function Gq(a){var b;L(function(c){if(1==c.g)return D(c,Promise.resolve(),2);if(!a.h)return c.return();b=new Q("caststatuschanged");a.dispatchEvent(b);Iq(a)||Jq(a);F(c)})}
|
|
776
776
|
function Kq(a,b,c){var d,e,f,g,h,k,l,m,n,r;L(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(p,5),D(p,a.h.load(b.manifest,b.startTime),7)):D(p,Promise.resolve(),3);case 7:ta(p,3);break;case 5:return g=ua(p),h=(new Map).set("detail",g),k=new Q("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)r=b.playerAfterLoad[n],a.h[n](r);
|
|
777
777
|
a.g.autoplay=f;b.manifest&&(a.g.play(),Jq(a));F(p)}})}function Fq(a,b,c){a.h&&(zq(a),Cq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
778
778
|
function zq(a){a.I.V(Lq);for(var b={video:{},player:{}},c=u(Qp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in Vp)0==a.m%Vp[e]&&(b.player[e]=a.h[e]());for(var f in Tp)0==a.m%Tp[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Cq(a,{type:"update",update:b},a.l);for(var g in Up)0==a.m%Up[g]&&(b={player:{}},b.player[g]=a.h[g](),Cq(a,{type:"update",update:b},a.l));a.F&&(a.m+=
|
|
@@ -781,91 +781,91 @@ function Eq(a,b){var c=Np(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.A=!0
|
|
|
781
781
|
"player"==d&&"load"==e&&(a.m=0,a.F=!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 Nq(a,g,f,null)},function(h){return Nq(a,g,f,h)})}}
|
|
782
782
|
function Dq(a,b){var c=Np(b.data);switch(c.type){case "PLAY":a.g.play();Jq(a);break;case "PAUSE":a.g.pause();Jq(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(),Jq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Jq(a));break;case "STOP":a.h.Ic().then(function(){a.h&&Jq(a)});break;case "GET_STATUS":Mq(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));
|
|
783
783
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Jq(a);break;case "LOAD":a.m=0;a.F=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Mq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Cq(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:Cq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
784
|
-
function Nq(a,b,c,d){a.h&&Cq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Cq(a,b,c,d){a.H&&(a=Mp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Jq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.
|
|
784
|
+
function Nq(a,b,c,d){a.h&&Cq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Cq(a,b,c,d){a.H&&(a=Mp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Jq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?Oq:a.h.Od()?Pq:a.g.paused?Qq:Rq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Cq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
785
785
|
N("shaka.cast.CastReceiver",yq);yq.prototype.destroy=yq.prototype.destroy;yq.prototype.setContentArtist=yq.prototype.Zj;yq.prototype.setContentImage=yq.prototype.$j;yq.prototype.setContentTitle=yq.prototype.ck;yq.prototype.clearContentMetadata=yq.prototype.wi;yq.prototype.setContentMetadata=yq.prototype.bk;yq.prototype.isIdle=yq.prototype.oj;yq.prototype.isConnected=yq.prototype.isConnected;var Lq=.5,Hq=5,Oq="IDLE",Rq="PLAYING",Pq="BUFFERING",Qq="PAUSED";function Sq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Tq(d,e,h,k,l,m);f<=g;f++){for(var r=c[f],p=-1,t=-1,w=0;w<r.length;w++)if(null!=r[w]&&""!==r[w].g.trim()){p=w;break}for(w=r.length-1;0<=w;w--)if(null!=r[w]&&""!==r[w].g.trim()){t=w;break}if(-1===
|
|
786
786
|
p||-1===t)r=Uq(d,e),a.nestedCues.push(r);else{for(;p<=t;p++)if(w=r[p]){var y=w.l,z=w.i,v=w.j,B=w.h;if(y!=h||z!=k||v!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Tq(d,e,y,z,v,B),h=y,k=z,l=v,m=B;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Uq(d,e),a.nestedCues.push(n));n=Tq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
787
|
-
function Tq(a,b,c,d,e,f){a=new Dd(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Uq(a,b){a=new Dd(a,b,"");a.lineBreak=!0;return a}function Vq(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Wq(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.u=b;this.j=this.m=!1;this.l="white";this.
|
|
788
|
-
function ar(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case br:d=cr.has(c)?cr.get(c):String.fromCharCode(c);break;case dr:d=er.get(c);break;case fr:a.i[a.g].pop();d=gr.get(c);break;case hr:a.i[a.g].pop(),d=ir.get(c)}d&&a.i[a.g].push(new Vq(d,a.m,a.j,a.
|
|
787
|
+
function Tq(a,b,c,d,e,f){a=new Dd(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Uq(a,b){a=new Dd(a,b,"");a.lineBreak=!0;return a}function Vq(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Wq(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.u=b;this.j=this.m=!1;this.l="white";this.s="black";Xq(this)}function Yq(a,b,c){var d="CC"+((a.A<<1|a.u)+1),e=new Dd(b,c,"");e.lineInterpretation=1;var f=Zq.get(a.g);f&&(e.line=f);return Sq(e,d,a.i,b,c)}function Xq(a){$q(a,0,15);a.g=1}
|
|
788
|
+
function ar(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case br:d=cr.has(c)?cr.get(c):String.fromCharCode(c);break;case dr:d=er.get(c);break;case fr:a.i[a.g].pop();d=gr.get(c);break;case hr:a.i[a.g].pop(),d=ir.get(c)}d&&a.i[a.g].push(new Vq(d,a.m,a.j,a.s,a.l))}}function jr(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 $q(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
789
789
|
var br=0,dr=1,fr=2,hr=3,cr=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"]]),er=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"]]),gr=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
|
|
790
790
|
"\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"]]),ir=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
791
|
-
[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"]]),Zq=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 kr(a,b){this.h=lr;this.
|
|
792
|
-
var lr=0,qr=1,nr=3,or=4,sr="black green blue cyan red yellow magenta black".split(" "),tr="white green blue cyan red yellow magenta white_italics".split(" ");function ur(a,b){this.K=b;this.O=a;this.L=this.l=!1;this.m=this.
|
|
793
|
-
function Ar(a,b,c){var d=new Dd(a.j,b,"");d.textAlign=a.H===Br?"left":a.H===Cr?"right":Gd;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.
|
|
791
|
+
[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"]]),Zq=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 kr(a,b){this.h=lr;this.s=new Wq(a,b);this.i=new Wq(a,b);this.g=this.j=new Wq(a,b);this.l=0;this.m=null}function mr(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==nr&&a.h!==or&&(e=Yq(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,$q(c,0,15),c=a.j,c.g=0<c.h?c.h:0,$q(c,0,15),d.g=15);a.h=nr;d.h=b;return e}function pr(a){a.h=qr;a.g=a.j;a.g.h=0}function rr(a){Va("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=or}
|
|
792
|
+
var lr=0,qr=1,nr=3,or=4,sr="black green blue cyan red yellow magenta black".split(" "),tr="white green blue cyan red yellow magenta white_italics".split(" ");function ur(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=vr;this.i=[];this.g=this.h=this.j=0;this.G=this.A=!1;this.F="white";this.u="black";wr(this)}function wr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(xr())}function xr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function yr(a,b){zr(a)&&(a.i[a.h][a.g]=new Vq(b,a.G,a.A,a.u,a.F),a.g++)}function zr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.s&&0<=a.h&&b}ur.prototype.isVisible=function(){return this.l};
|
|
793
|
+
function Ar(a,b,c){var d=new Dd(a.j,b,"");d.textAlign=a.H===Br?"left":a.H===Cr?"right":Gd;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?$d:2;switch(a.I){case Dr:e.regionAnchorX=0;e.regionAnchorY=0;break;case Er:e.regionAnchorX=50;e.regionAnchorY=0;break;case Fr:e.regionAnchorX=100;e.regionAnchorY=0;break;case Gr:e.regionAnchorX=0;e.regionAnchorY=50;break;case Hr:e.regionAnchorX=
|
|
794
794
|
50;e.regionAnchorY=50;break;case Ir:e.regionAnchorX=100;e.regionAnchorY=50;break;case Jr:e.regionAnchorX=0;e.regionAnchorY=100;break;case Kr:e.regionAnchorX=50;e.regionAnchorY=100;break;case Lr:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Sq(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Br=0,Cr=1,vr=2,Dr=0,Er=1,Fr=2,Gr=3,Hr=4,Ir=5,Jr=6,Kr=7,Lr=8;function Mr(){this.i=[];this.h=null;this.g=0}function Nr(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 Or(a.h)),a.h=null,a.g=0))}function Or(a){this.g=0;this.h=a}Or.prototype.Aa=function(){return this.g<this.h.length};Or.prototype.Na=function(){return this.g};function Pr(a){if(!a.Aa())throw new R(2,2,3E3);return a.h[a.g++]}Or.prototype.skip=function(a){if(this.g+a>this.h.length)throw new R(2,2,3E3);this.g+=a};function Qr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
795
795
|
function Rr(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=Pr(b).value;b=null;c=u(Sr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ar(e,d,a.i)),wr(e);return b}if(137===c)for(b=Pr(b).value,b=u(Sr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Pr(b).value;b=null;c=u(Sr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ar(e,d,a.i)),e.l=!1;return b}if(139===c){c=Pr(b).value;
|
|
796
796
|
b=null;c=u(Sr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Ar(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Pr(b).value,Tr(a,b,d);if(143===c)return d=Tr(a,255,d),Ur(a),d;if(144===c)b.skip(1),d=Pr(b).value,a.g&&(a.g.A=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=Pr(b).value,c=Pr(b).value,b.skip(1),a.g&&(b=Vr((c&48)>>4,(c&12)>>2,c&3),a.g.F=Vr((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=Pr(b).value,b=Pr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
797
|
-
b.skip(1),d=Pr(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 ur(c,a.i);f.j=d;a.h[c]=f}d=Pr(b).value;f=Pr(b).value;var g=Pr(b).value,h=Pr(b).value,k=Pr(b).value;b=Pr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.A=!1,b.F="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.
|
|
797
|
+
b.skip(1),d=Pr(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 ur(c,a.i);f.j=d;a.h[c]=f}d=Pr(b).value;f=Pr(b).value;var g=Pr(b).value,h=Pr(b).value,k=Pr(b).value;b=Pr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.A=!1,b.F="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}
|
|
798
798
|
function Sr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Tr(a,b,c){var d=null;b=u(Sr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Ar(f,c,a.i));a.h[e]=null}return d}function Ur(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Vr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Wr[a<<2|b<<1|c]}
|
|
799
|
-
var Xr=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"]]),Wr="black blue green cyan red magenta yellow white".split(" ");function Yr(){this.h=[];this.g=[];this.i=new Mr;this.l=0;this.m=new Map([["CC1",new kr(0,0)],["CC2",new kr(0,1)],["CC3",new kr(1,0)],["CC4",new kr(1,1)]]);this.u=this.
|
|
800
|
-
function Zr(a){a.
|
|
801
|
-
Yr.prototype.extract=function(a,b){if(this.F){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.F=!1}a=new
|
|
799
|
+
var Xr=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"]]),Wr="black blue green cyan red magenta yellow white".split(" ");function Yr(){this.h=[];this.g=[];this.i=new Mr;this.l=0;this.m=new Map([["CC1",new kr(0,0)],["CC2",new kr(0,1)],["CC3",new kr(1,0)],["CC4",new kr(1,1)]]);this.u=this.s=0;this.j=new Map;this.F=!0;this.A=new Set;Zr(this)}Yr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Zr(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())Ur(b.value)};
|
|
800
|
+
function Zr(a){a.s=0;a.u=0;for(var b=u(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=lr,c.g=c.j,c.m=null,Xq(c.i),Xq(c.j),Xq(c.s);a.F=!0}
|
|
801
|
+
Yr.prototype.extract=function(a,b){if(this.F){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.F=!1}a=new Gg(a,0);if(!(8>a.getLength())&&181===a.W()&&49===a.Ha()&&1195456820===a.R()&&3===a.W()&&(c=a.W(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.W(),f=(e&4)>>2,g=a.W(),h=a.W();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,qb:g,Sb: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})))}};
|
|
802
802
|
Yr.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=u(this.h),d=c.next();!d.done;d=c.next())(d=$r(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())Nr(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=as(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
803
|
-
function $r(a,b){var c=b.type;if(16===(b.
|
|
804
|
-
tr[
|
|
805
|
-
(d&246)&&32===(a&224))ar(c.g,d&1?hr:fr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Sb){case 32:pr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=mr(c,2,a);break;case 38:d=mr(c,3,a);break;case 39:d=mr(c,4,a);break;case 40:ar(c.g,br,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Xq(c.
|
|
806
|
-
|
|
807
|
-
function as(a,b){var c=[];try{for(;b.Aa();){var d=Pr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Pr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Qr(e));for(var g=a.j.get(e),h=b.Na();b.Na()-h<f;){e=b;var k=Pr(e),l=k.value,m=k.pts;if(16===l){var n=Pr(e);l=l<<16|n.value}if(0<=l&&31>=l){var r=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!zr(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=Ar(p,r,g.i));if(p.h+1>=p.
|
|
803
|
+
function $r(a,b){var c=b.type;if(16===(b.qb&112)){var d=b.qb>>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.qb&&255===b.Sb||!b.qb&&!b.Sb||!bs(b.qb)||!bs(b.Sb))return 45<=++a.l&&Zr(a),null;a.l=0;b.qb&=127;b.Sb&=127;var e=b.qb;if(1<=e&&15>=e||!b.qb&&!b.Sb)return null;e=null;if(16===(b.qb&112))a:{a.A.add(d),d=b.qb;a=b.Sb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
804
|
+
"white";e=!1;7>f?d=tr[f]:7===f&&(e=!0);a=1===(a&1);c.h!==or&&(f=c.g,c.h===nr&&b!==f.g&&(c=1+b-f.h,jr(f,c,1+f.g-f.h,f.h),$q(f,0,c-1),$q(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ar(c.g,br,32),d=!1,b=tr[(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=sr[(a&14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))ar(c.g,
|
|
805
|
+
dr,a);else if(18===(d&246)&&32===(a&224))ar(c.g,d&1?hr:fr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Sb){case 32:pr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=mr(c,2,a);break;case 38:d=mr(c,3,a);break;case 39:d=mr(c,4,a);break;case 40:ar(c.g,br,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Xq(c.s);rr(c);break;case 43:rr(c);break;case 44:b=c.i;d=null;c.h!==or&&(d=Yq(b,c.l,a));$q(b,0,15);break;case 45:b=c.g;c.h!==nr?d=null:(d=Yq(b,c.l,a),e=b.g-b.h+1,jr(b,
|
|
806
|
+
e-1,e,b.h),$q(b,0,e-1),$q(b,b.g,15-b.g),c.l=a);break;case 46:$q(c.j,0,15);break;case 47:b=null,c.h!==or&&(b=Yq(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,pr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.Sb,ar(c.g,br,b.qb),ar(c.g,br,a);return e}
|
|
807
|
+
function as(a,b){var c=[];try{for(;b.Aa();){var d=Pr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Pr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Qr(e));for(var g=a.j.get(e),h=b.Na();b.Na()-h<f;){e=b;var k=Pr(e),l=k.value,m=k.pts;if(16===l){var n=Pr(e);l=l<<16|n.value}if(0<=l&&31>=l){var r=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!zr(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=Ar(p,r,g.i));if(p.h+1>=p.s){r=p;for(var t=
|
|
808
808
|
0,w=1;16>w;w++,t++)r.i[t]=r.i[w];for(w=0;1>w;w++,t++)r.i[t]=xr()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=Ar(p,r,g.i));p.i[p.h]=xr();p.g=0;break;case 12:p.isVisible()&&(e=Ar(p,r,g.i)),wr(p),r=p,r.h=0,r.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=Rr(g,e,l,m);else{if(4096<=l&&4127>=l)r=l&255,8<=r&&15>=r?e.skip(1):16<=r&&23>=r?e.skip(2):24<=r&&31>=r&&e.skip(3);else if(4224<=l&&4255>=l)r=l&255,128<=r&&135>=r?e.skip(4):136<=r&&143>=r&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?yr(g.g,
|
|
809
809
|
"\u266a"):yr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&yr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Xr.has(e)){var z=Xr.get(e);yr(g.g,z)}else yr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?yr(g.g,"_"):yr(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(v){if(v instanceof R&&3E3===v.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw v;}return c}function bs(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
810
810
|
Yr.prototype.getStreams=function(){return Array.from(this.A)};N("shaka.cea.CeaDecoder",Yr);wd=function(){return new Yr};function cs(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function ds(){this.j=new Map;this.i=this.h=0;this.g=es}
|
|
811
|
-
ds.prototype.init=function(a){function b(f){f=f.name;f in fs&&(c.g=fs[f])}var c=this,d=[],e=[];(new
|
|
812
|
-
b).box("dvh1",b).box("dvhe",b).box("encv",
|
|
813
|
-
ds.prototype.parse=function(a){var b=this;if(this.g==es)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new
|
|
811
|
+
ds.prototype.init=function(a){function b(f){f=f.name;f in fs&&(c.g=fs[f])}var c=this,d=[],e=[];(new Jg).box("moov",Og).box("mvex",Og).T("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.R();g=g.R();c.h=f;c.i=g}).box("trak",Og).T("tkhd",function(f){f=Wi(f.reader,f.version);d.push(f.trackId)}).box("mdia",Og).T("mdhd",function(f){f=Ui(f.reader,f.version);e.push(f.timescale)}).box("minf",Og).box("stbl",Og).T("stsd",Qg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
|
|
812
|
+
b).box("dvh1",b).box("dvhe",b).box("encv",Rg).box("sinf",Og).box("frma",function(f){f=Xi(f.reader).ab;f in fs&&(c.g=fs[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new R(2,2,2010);this.g==es&&Ua("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
813
|
+
ds.prototype.parse=function(a){var b=this;if(this.g==es)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Jg).box("moof",function(l){f=l.start;g=[];Og(l)}).box("traf",Og).T("trun",function(l){l=Vi(l.reader,l.version,l.flags);g.push(l)}).T("tfhd",function(l){l=Si(l.reader,l.flags);d=l.jh||b.h;e=l.Ai||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).T("tfdt",function(l){h=Ti(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Ua("Unable to find base media decode time for CEA captions!"),
|
|
814
814
|
new R(2,2,2010);gs(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
815
815
|
function gs(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(t){return t.Kh});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].zi);b.Aa();){g=b.R();var r=b.W(),p=null;p=!1;h=1;switch(a.g){case hs:p=r&31;p=6==p;break;case is:h=2;b.skip(1);p=r>>1&63;p=39==p||40==p;break;default:return}if(p)for(r=0,l<n.length&&(r=n[l].We||0),r=(c+r)/d,h=u(cs(b.Pb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:r});else try{b.skip(g-h)}catch(t){break}m-=g+4;0==m&&(c=l<n.length?
|
|
816
816
|
c+(n[l].yg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}N("shaka.cea.Mp4CeaParser",ds);var es=0,hs=1,is=2,fs={avc1:hs,avc3:hs,hev1:is,hvc1:is,dvav:hs,dva1:hs,dvh1:is,dvhe:is};vd["video/mp4"]=function(){return new ds};function js(){this.g=null}js.prototype.init=function(){};js.prototype.parse=function(a){this.g?this.g.clearData():this.g=new nj;var b=[];a=Fb(a);if(!uj(a))return b;a=this.g.parse(a);var c=a.Gd(),d=a.Ae();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=u(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=u(cs(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
817
817
|
N("shaka.cea.TsCeaParser",js);vd["video/mp2t"]=function(){return new js};function ks(a,b,c){var d=ls(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 R(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.fd});if(1<f.length)throw new R(2,4,4050);f.length&&(g=ms(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.fd}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.fd?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
818
818
|
l.fd});f.length&&(a=ns(e,k,f,c,h),0==a.length&&(a=[Dc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=u(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Dc(c,k,e));if(h=Array.from(h)[0]||null)for(k=u(a),b=k.next();!b.done;b=k.next())for(b=u(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{ih:h,xl:e,drmInfos:a,yf:g,mh:!0}}
|
|
819
819
|
function os(a,b,c,d){var e=ks(a,c,d);if(b.mh){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.mh=!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 R(2,4,4008);return e.ih||b.ih}
|
|
820
|
-
function ps(a){var b=0,c=Kb(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function qs(a){a=u(
|
|
821
|
-
function rs(a){var b=
|
|
822
|
-
function ns(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.fd];if(h){var k;if((k=
|
|
823
|
-
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:
|
|
824
|
-
function us(a){var b=a.attributes.schemeIdUri,c=
|
|
825
|
-
function ms(a){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new R(2,4,4042);var b=
|
|
820
|
+
function ps(a){var b=0,c=Kb(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function qs(a){a=u(gh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=u(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return eh(c)}return""}
|
|
821
|
+
function rs(a){var b=ih(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=eh(b)))return b;a=ih(a.node,"urn:microsoft:playready","pro");if(!a||!eh(a))return"";a=eh(a);a=yc(a);a=ps(a).filter(function(c){return c.type===ss})[0];if(!a)return"";a=oc(a.value,!0);return(a=Xg(a,"WRMHEADER"))?qs(a):""}
|
|
822
|
+
function ns(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.fd];if(h){var k;if((k=ih(g.node,"urn:microsoft:playready","pro"))&&eh(k)){k=eh(k);k=yc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Vg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.fd)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
|
|
823
|
+
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Vg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Dc(h,b,g.init||a||k||l);if(h=ts.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function ls(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=us(c.value))&&b.push(c);return b}
|
|
824
|
+
function us(a){var b=a.attributes.schemeIdUri,c=lh(a,"urn:mpeg:cenc:2013","default_KID"),d=jh(a,"urn:mpeg:cenc:2013","pssh").map(fh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new R(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:yc(g),keyId:null}})}catch(g){throw new R(2,4,4007);}return{node:a,fd:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
825
|
+
function ms(a){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new R(2,4,4042);var b=ih(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new R(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new R(2,4,4051);b=ih(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new R(2,4,4051);a=b.attributes.IV;b=uc(b.attributes.keyUriTemplate);
|
|
826
826
|
if(!a||!b)throw new R(2,4,4051);a=zc(a.substr(2));if(16!=a.byteLength)throw new R(2,4,4048);return{vj:b,iv:a}}
|
|
827
|
-
var ss=1,ts=(new Map).set("com.widevine.alpha",function(a){var b=
|
|
828
|
-
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=
|
|
827
|
+
var ss=1,ts=(new Map).set("com.widevine.alpha",function(a){var b=ih(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=eh(b))?b:(a=ih(a.node,"urn:microsoft","laurl"))?uc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",rs).set("com.microsoft.playready.recommendation",rs).set("com.microsoft.playready.software",rs).set("com.microsoft.playready.hardware",rs).set("org.w3.clearkey",function(a){var b=ih(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=eh(b))?b:(a=ih(a.node,"http://dashif.org/guidelines/clearKey",
|
|
828
|
+
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=eh(a))?a:""});function vs(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))&&Ua("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();
|
|
829
829
|
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})}
|
|
830
|
-
function ws(a,b){var c=xs(a,b,"timescale"),d=1;c&&(d=
|
|
831
|
-
|
|
832
|
-
function ys(a,b,c){b=zs(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=
|
|
833
|
-
function As(a,b,c,d,e,f){for(var g=
|
|
830
|
+
function ws(a,b){var c=xs(a,b,"timescale"),d=1;c&&(d=th(c)||1);c=xs(a,b,"duration");(c=th(c||""))&&(c/=d);var e=xs(a,b,"startNumber"),f=Number(xs(a,b,"presentationTimeOffset"))||0,g=uh(e||"");if(null==e||null==g)g=1;var h=ys(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.xa.duration||Infinity;e=g;h=dh(h,"S");for(var k=[],l=-f,m=0;m<h.length;++m){var n=h[m],r=h[m+1],p=kh(n,"t",uh),t=kh(n,"d",uh),w=kh(n,"r",sh);n=kh(n,"k",sh)||0;null!=p&&(p-=f);if(!t)break;p=null!=p?p:l;w=w||0;if(0>w)if(r){r=kh(r,"t",
|
|
831
|
+
uh);if(null==r)break;else if(p>=r)break;w=Math.ceil((r-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;w=Math.ceil((a*b-p)/t)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(r=0;r<=w;++r)l=p+t,k.push({start:p/b,end:l/b,Pg:p,Ob:n,Xj:k.length+e}),p=l}b=k}return{timescale:d,Xa:c,Zd:g,ac:f/d||0,Og:f,timeline:b}}function zs(a,b){return[b(a.N),b(a.La),b(a.Sa)].filter(Me)}function xs(a,b,c){b=zs(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
832
|
+
function ys(a,b,c){b=zs(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=hh(d.value,c));d=b.next());return a}
|
|
833
|
+
function As(a,b,c,d,e,f){for(var g=lh(a,"http://www.w3.org/1999/xlink","href"),h=lh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=u(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Zg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return hg(new R(2,4,4028));if("onLoad"!=h)return hg(new R(2,4,4027));var r=Cc([d],[g]);return e.request(0,ug(r,b)).Ma(function(p){p=Wg(p.data,a.tagName);if(!p)return hg(new R(2,4,4001,g));for(a.children=
|
|
834
834
|
[];p.children.length;){var t=p.children.shift();t.tagName&&(t.parent=a);a.children.push(t)}t=u(Object.keys(p.attributes));for(var w=t.next();!w.done;w=t.next())w=w.value,a.attributes[w]=p.attributes[w];return Bs(a,b,c,r[0],e,f+1)})}
|
|
835
|
-
function Bs(a,b,c,d,e,f){f=void 0===f?0:f;if(
|
|
836
|
-
;function Cs(a,b,c,d,e,f,g){var h,k=(new
|
|
837
|
-
function Ds(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new R(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.ed(),m=g.reader.ed();g.reader.skip(2);var n=g.reader.Ha();a=a+g.size+m;for(m=0;m<n;m++){var r=g.reader.R(),p=(r&2147483648)>>>31;r&=2147483647;var t=g.reader.R();g.reader.skip(4);if(1==p)throw new R(2,3,3006);h.push(new Ci(l/k+c,(l+t)/k+c,function(){return f},a,a+r-1,b,c,d,e));l+=t;a+=r}g.parser.stop();return h};function Es(a){this.h=Kb(a);this.g=new
|
|
835
|
+
function Bs(a,b,c,d,e,f){f=void 0===f?0:f;if(lh(a,"http://www.w3.org/1999/xlink","href")){var g=As(a,b,c,d,e,f);c&&(g=g.Ma(void 0,function(){return Bs(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=u(ch(a)),l=k.next();!l.done;h={Mc:h.Mc},l=k.next())h.Mc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==lh(h.Mc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Mc}}(h)):"SegmentTimeline"!=h.Mc.tagName&&g.push(Bs(h.Mc,b,c,d,e,f));return lg(g).Ma(function(){return a})}
|
|
836
|
+
;function Cs(a,b,c,d,e,f,g){var h,k=(new Jg).T("sidx",function(l){h=Ds(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new R(2,3,3004);}
|
|
837
|
+
function Ds(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new R(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.ed(),m=g.reader.ed();g.reader.skip(2);var n=g.reader.Ha();a=a+g.size+m;for(m=0;m<n;m++){var r=g.reader.R(),p=(r&2147483648)>>>31;r&=2147483647;var t=g.reader.R();g.reader.skip(4);if(1==p)throw new R(2,3,3006);h.push(new Ci(l/k+c,(l+t)/k+c,function(){return f},a,a+r-1,b,c,d,e));l+=t;a+=r}g.parser.stop();return h};function Es(a){this.h=Kb(a);this.g=new Gg(this.h,0)}Es.prototype.Aa=function(){return this.g.Aa()};
|
|
838
838
|
function Fs(a){var b=Gs(a);if(7<b.length)throw new R(2,3,3002);var c=0;b=u(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Gs(a);a:{d=u(Hs);for(var e=d.next();!e.done;e=d.next())if(Cb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Na();else{if(8==b.length&&b[1]&224)throw new R(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.Na()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Na();d=Kb(a.h,a.g.Na(),b);a.g.skip(b);return new Is(c,
|
|
839
839
|
d)}function Gs(a){var b=a.g.Na(),c=a.g.W();if(0==c)throw new R(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Hs=[[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 Is(a,b){this.id=a;this.g=b}
|
|
840
840
|
function Js(a){if(8<a.g.byteLength)throw new R(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new R(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 Ks(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Es(a.g);for(var n=null,r=null;a.Aa();){var p=Fs(a);if(187==p.id){var t=Ls(p);t&&(p=c*t.lk,t=b+t.Mj,null!=n&&m.push(new Ci(n+g,p+g,l,r,t-1,f,g,h,k)),n=p,r=t)}}null!=n&&m.push(new Ci(n+g,d+g,l,r,null,f,g,h,k));return m}
|
|
841
|
-
function Ls(a){var b=new Es(a.g);a=Fs(b);if(179!=a.id)throw new R(2,3,3013);a=Js(a);b=Fs(b);if(183!=b.id)throw new R(2,3,3012);b=new Es(b.g);for(var c=0;b.Aa();){var d=Fs(b);if(241==d.id){c=Js(d);break}}return{lk:a,Mj:c}};function Ms(a,b,c){b=ys(a,b,"Initialization");if(!b)return null;var d=a.N.Hb(),e=b.attributes.sourceURL;e&&(d=Cc(d,[uc(e)]));e=0;var f=null;if(b=
|
|
842
|
-
function Os(a,b,c){var d=Number(xs(a,Ps,"presentationTimeOffset"))||0,e=xs(a,Ps,"timescale"),f=1;e&&(f=
|
|
841
|
+
function Ls(a){var b=new Es(a.g);a=Fs(b);if(179!=a.id)throw new R(2,3,3013);a=Js(a);b=Fs(b);if(183!=b.id)throw new R(2,3,3012);b=new Es(b.g);for(var c=0;b.Aa();){var d=Fs(b);if(241==d.id){c=Js(d);break}}return{lk:a,Mj:c}};function Ms(a,b,c){b=ys(a,b,"Initialization");if(!b)return null;var d=a.N.Hb(),e=b.attributes.sourceURL;e&&(d=Cc(d,[uc(e)]));e=0;var f=null;if(b=kh(b,"range",rh))e=b.start,f=b.end;c=new Ai(function(){return d},e,f,Ns(a),null,null,c);c.codecs=a.N.codecs;c.mimeType=a.N.mimeType;return c}
|
|
842
|
+
function Os(a,b,c){var d=Number(xs(a,Ps,"presentationTimeOffset"))||0,e=xs(a,Ps,"timescale"),f=1;e&&(f=th(e)||1);var g=d/f||0,h=Ms(a,Ps,c);Qs(a,h);var k=Oe(a);return{Vc:function(){var l=ys(k,Ps,"RepresentationIndex");var m=k.N.Hb();l&&(l=uc(l.attributes.sourceURL))&&(m=Cc(m,[l]));l=Rs(k);return Ss(k,b,h,m,l.start,l.end,g)}}}
|
|
843
843
|
function Ss(a,b,c,d,e,f,g){var h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.ec||!a.xa.fg,l=a.xa.start,m=a.xa.duration,n=a.N.mimeType.split("/")[1],r=b,p=null,t=[r(d,e,f,!1),"webm"==n?r(c.ka(),c.Ta,c.za,!0):null],r=null,D(G,Promise.all(t),2);w=G.h;y=w[0];z=w[1]||null;v=null;B=l-g;A=l;C=m?l+m:Infinity;if("mp4"==n)var H=Cs(y,e,d,c,B,A,C);else{H=new Es(z);if(440786851!=Fs(H).id)throw new R(2,3,3008);var K=Fs(H);if(408125543!=K.id)throw new R(2,
|
|
844
844
|
3,3009);H=K.g.byteOffset;K=new Es(K.g);for(var M=null;K.Aa();){var P=Fs(K);if(357149030==P.id){M=P;break}}if(!M)throw new R(2,3,3010);M=new Es(M.g);P=1E6;for(K=null;M.Aa();){var O=Fs(M);if(2807729==O.id)P=Js(O);else if(17545==O.id)if(4==O.g.byteLength)K=O.g.getFloat32(0);else if(8==O.g.byteLength)K=O.g.getFloat64(0);else throw new R(2,3,3003);}if(null==K)throw new R(2,3,3011);M=P/1E9;K*=M;P=Fs(new Es(y));if(475249515!=P.id)throw new R(2,3,3007);H=Ks(P,H,M,K,d,c,B,A,C)}v=H;E=u(v);for(J=E.next();!J.done;J=
|
|
845
|
-
E.next())I=J.value,I.codecs=a.N.codecs,I.mimeType=a.N.mimeType;h.Td(v);p=new Ok(v);k&&p.Sc(A,C,!0);return G.return(p)})}function Ps(a){return a.Xd}function Rs(a){var b=ys(a,Ps,"RepresentationIndex");a=xs(a,Ps,"indexRange");a=
|
|
845
|
+
E.next())I=J.value,I.codecs=a.N.codecs,I.mimeType=a.N.mimeType;h.Td(v);p=new Ok(v);k&&p.Sc(A,C,!0);return G.return(p)})}function Ps(a){return a.Xd}function Rs(a){var b=ys(a,Ps,"RepresentationIndex");a=xs(a,Ps,"indexRange");a=rh(a||"");b&&(a=kh(b,"range",rh,a));return a}function Qs(a,b){Ts(a,b);if(!Rs(a))throw new R(2,4,4002);}function Ts(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Ic&&"mp4"!=c&&"webm"!=c)throw new R(2,4,4006);if("webm"==c&&!b)throw new R(2,4,4005);}
|
|
846
846
|
function Ns(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.Ne,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Us(a,b,c){var d=Ms(a,Vs,c),e=Ws(a);if(!e.Xa&&!e.timeline&&1<e.$c.length)throw new R(2,4,4002);if(!e.Xa&&!a.xa.duration&&!e.timeline&&1==e.$c.length)throw new R(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new R(2,4,4002);var f=null,g=null;a.Sa.id&&a.N.id&&(g=b[a.Sa.id+","+a.N.id])&&(f=g.segmentIndex);var h=Xs(a.xa.start,a.xa.duration,a.N.Hb,e,d,c,a.N.mimeType,a.N.codecs);b=!f;f?f.Sd(h,a.presentationTimeline.Lb()):f=new Ok(h);a.presentationTimeline.Td(h);a.ec&&a.xa.fg||f.Sc(a.xa.start,
|
|
847
847
|
a.xa.duration?a.xa.start+a.xa.duration:Infinity,b);g&&(g.segmentIndex=f);return{Vc:function(){f&&0!=f.getNumReferences()||f.Je(h);return Promise.resolve(f)}}}function Vs(a){return a.mc}function Ws(a){var b=Ys(a);a=ws(a,Vs);var c=a.Zd;0==c&&(c=1);var d=0;a.Xa?d=a.Xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Xa:a.Xa,startTime:d,Zd:c,ac:a.ac,timeline:a.timeline,$c:b}}
|
|
848
848
|
function Xs(a,b,c,d,e,f,g,h){var k=d.$c.length;d.timeline&&d.timeline.length!=d.$c.length&&(k=Math.min(d.timeline.length,d.$c.length));for(var l=a-d.ac,m=b?a+b:Infinity,n=[],r=d.startTime,p={},t=0;t<k;p={xd:p.xd,td:p.td},t++){p.td=d.$c[t];var w=r;r=void 0;r=null!=d.Xa?w+d.Xa:d.timeline?d.timeline[t].end:w+b;p.xd=null;w=new Ci(a+w,a+r,function(y){return function(){null==y.xd&&(y.xd=Cc(c(),[y.td.Cj]));return y.xd}}(p),p.td.start,p.td.end,e,l,a,m,[],"",null,null,Di,f);w.codecs=h;w.mimeType=g;n.push(w)}return n}
|
|
849
|
-
function Ys(a){return[a.N.mc,a.La.mc,a.Sa.mc].filter(Me).map(function(b){return
|
|
849
|
+
function Ys(a){return[a.N.mc,a.La.mc,a.Sa.mc].filter(Me).map(function(b){return dh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.wh&&(a.wh=!0);var c=uc(b.attributes.media);b=kh(b,"mediaRange",rh,{start:0,end:null});return{Cj:c,start:b.start,end:b.end}})};function Zs(a,b,c,d,e,f,g,h){var k=$s(a,g),l=at(a);bt(l);var m=Oe(a);if(l.Nd)return Ts(a,k),{Vc:function(){var w=vs(l.Nd,m.N.id,null,null,m.bandwidth||null,null);w=Cc(m.N.Hb(),[w]);return Ss(m,b,k,w,0,null,l.ac)}};if(l.Xa)return d||"image"===a.La.contentType||(a.presentationTimeline.og(l.Xa),a.presentationTimeline.Me(a.xa.start)),{Vc:function(){return ct(m,l,e,k,f,g,h)}};var n=null;d=d=null;a.Sa.id&&a.N.id&&(d=a.Sa.id+","+a.N.id,d=c[d])&&(n=d.segmentIndex);var r=a.xa.start,p=a.xa.duration?r+a.xa.duration:
|
|
850
850
|
Infinity,t=!(a.ec&&a.xa.fg);n?(c=n,dt(c,l,r,p,t,k),c.fb(a.presentationTimeline.Lb())):n=new et(l,a.N.id,a.bandwidth,a.N.Hb,r,p,k,t,g,a.N.zg);l.timeline&&"image"!==a.La.contentType&&a.presentationTimeline.Gh(l.timeline,r);d&&a.ec&&(d.segmentIndex=n);return{Vc:function(){n instanceof et&&0==n.getNumReferences()&&dt(n,l,r,p,t,k);return Promise.resolve(n)}}}function ft(a){return a.Yd}
|
|
851
851
|
function at(a){var b=ws(a,ft),c=xs(a,ft,"media"),d=xs(a,ft,"index");return{Xa:b.Xa,timescale:b.timescale,Zd:b.Zd,ac:b.ac,Og:b.Og,timeline:b.timeline,bd:c&&uc(c),Nd:d,mimeType:a.N.mimeType,codecs:a.N.codecs}}function bt(a){var b=a.Nd?1:0;b+=a.timeline?1:0;b+=a.Xa?1:0;if(0==b)throw new R(2,4,4002);1!=b&&(a.Nd&&(a.timeline=null),a.Xa=null);if(!a.Nd&&!a.bd)throw new R(2,4,4002);}
|
|
852
852
|
function ct(a,b,c,d,e,f,g){function h(K){var M=(K-w)*t,P=M+b.ac,O=M+n;M=O+t;var U=Math.min(M,l());O=new Ci(O,U,function(){var X=P*y;"BigInt"in window&&X>Number.MAX_SAFE_INTEGER&&(X=BigInt(P)*BigInt(y));X=vs(z,B,K,null,v,X);return Cc(A(),[X])},0,null,d,C,n,l(),[],"",null,null,Di,f);O.codecs=a.N.codecs;O.mimeType=a.N.mimeType;O.i=M;return O}function k(){var K=[Math.max(m.Lb(),n),Math.min(m.ic(),l())].map(function(M){return M-n});K=[Math.ceil(K[0]/t),Math.ceil(K[1]/t)-1];a.N.dc&&K[1]++;return K.map(function(M){return M+
|
|
853
853
|
w})}function l(){var K=null!=r&&e[r]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.xa.start,r=a.Sa.id,p=a.xa.duration,t=b.Xa,w=b.Zd,y=b.timescale,z=b.bd,v=a.bandwidth||null,B=a.N.id,A=a.N.Hb,C=n-b.ac,E=k();c=a.ec?Math.max(E[0],E[1]-c+1):E[0];g=g||E[1];E=[];for(var J=c;J<=g;++J){var I=h(J);E.push(I)}var G=new Ok(E);E=m.ic()<l();J=m.U();if(E||J){var H=Math.max(c,g+1);c=t;a.N.dc&&(c=.1);G.ef(c,function(){var K=m.Lb();G.fb(K);var M=u(k());M.next();M=M.next().value;for(var P=[];H<=M;){var O=
|
|
854
854
|
h(H);P.push(O);H++}return K>l()&&!P.length?null:P})}return Promise.resolve(G)}function $s(a,b){var c=xs(a,ft,"initialization");if(!c)return null;c=uc(c);var d=a.N.id,e=a.bandwidth||null,f=a.N.Hb;b=new Ai(function(){var g=vs(c,d,null,null,e,null);return Cc(f(),[g])},0,null,Ns(a),null,null,b);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;return b}function et(a,b,c,d,e,f,g,h,k,l){Ok.call(this,[]);this.h=a;this.H=b;this.F=c;this.G=d;this.i=e;this.l=f;this.u=g;this.A=k;this.I=l;h&>(this)}na(et,Ok);q=et.prototype;
|
|
855
855
|
q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){Ok.prototype.release.call(this);this.h=null};q.fb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.getNumReferences()&&this.release())}};
|
|
856
|
-
function dt(a,b,c,d,e,f){ht(a,f);if(a.h){c=a.h.timeline;a.h.bd=b.bd;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&>(a)}function ht(a,b){if(a.u!==b){a.u=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Fi(c,b)}}function gt(a){if(!a.
|
|
856
|
+
function dt(a,b,c,d,e,f){ht(a,f);if(a.h){c=a.h.timeline;a.h.bd=b.bd;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&>(a)}function ht(a,b){if(a.u!==b){a.u=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Fi(c,b)}}function gt(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.fb(a.i)}}
|
|
857
857
|
q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
|
|
858
858
|
q.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.bd,e=this.h.timeline[a],f=e.Xj,g=this.h.Og+e.Pg;c=this.i-this.h.ac;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],r=(e.end-e.start)/e.Ob,p={},t=0;t<e.Ob;p={yd:p.yd,tf:p.tf},t++){var w=e.start+r*t,y=w+r;p.tf=t+1;p.yd=null;w=new Ci(this.i+w,this.i+y,function(z){return function(){if(!b.h)return[];
|
|
859
859
|
null==z.yd&&(z.yd=it(b.h.bd,b.H,f,b.F,g,z.tf,b.G));return z.yd}}(p),0,null,this.u,c,this.i,this.l,[],"",null,null,Di,this.A);w.codecs=l;w.mimeType=m;0==this.I?0<t&&w.He():0!=t%this.I&&w.He();n.push(w)}c=new Ci(this.i+e.start,k,function(){return 0<e.Ob?[]:it(d,b.H,f,b.F,g,null,b.G)},0,null,this.u,c,this.i,this.l,n,"",null,null,Di,this.A,0<e.Ob);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
|
|
860
|
-
function it(a,b,c,d,e,f,g){a=vs(a,b,c,f,d||null,e);return Cc(g(),[a]).map(function(h){return h.toString()})};function jt(a){this.
|
|
861
|
-
function kt(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Cc(a.i,[lt(a,b)]),d=
|
|
860
|
+
function it(a,b,c,d,e,f,g){a=vs(a,b,c,f,d||null,e);return Cc(g(),[a]).map(function(h){return h.toString()})};function jt(a){this.s=null;this.A=a;this.I=new ng;this.i=[];this.h=null;this.m=[];this.F=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}jt.prototype.configure=function(a){this.s=a};jt.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()};jt.prototype.setManifestType=function(a){this.u=a};
|
|
861
|
+
function kt(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Cc(a.i,[lt(a,b)]),d=ug(c,a.s.retryParameters),e=a.A.networkingEngine.request(8,d),og(a.I,e),ra(l,2),D(l,e.promise,4);if(2!=l.g)return f=l.h,g=nc(f.data),h=JSON.parse(g),1==h.VERSION&&mt(a,h,f.uri),ta(l,0);if((k=ua(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Ob(function(){kt(a,b)});a.g.V(a.G);F(l)})}
|
|
862
862
|
function lt(a,b){if(!a.m.length)return b;b=new ib(b);var c=a.F||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)));Ab(e)&&nb(b,e);return b.toString()}function mt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Ob(function(){kt(a,d)});if(c=b.TTL)a.G=c;a.g.V(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
863
863
|
function nt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}jt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
864
864
|
function ot(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=u(a.m),g=f.next();!g.done;e={sc:e.sc},g=f.next())if(e.sc=g.value,g=b.get(e.sc))d.push({vg:e.sc,location:g});else if(g=a.H.find(function(k){return function(l){return l.Hk==k.sc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].ei?(h=new ib(h),kb(h,g["URI-REPLACEMENT"].ei),d.push({vg:e.sc,location:h.toString()})):d.push({vg:e.sc,location:h}))}e=Date.now();f=u(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
865
|
-
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new ib(k.location)).Tb))return!1;return!0});d.length&&(a.F=d[0].vg);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.F=a.h,d.push(f);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Cc(a.i,d)};function pt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.
|
|
865
|
+
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new ib(k.location)).Tb))return!1;return!0});d.length&&(a.F=d[0].vg);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.F=a.h,d.push(f);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Cc(a.i,d)};function pt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.m=!1;this.u=new Set}q=pt.prototype;q.release=function(){for(var a=u(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};q.gj=function(){return this.j};q.Zf=function(){return this.l.slice()};q.Ni=function(){return this.i};
|
|
866
866
|
function qt(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[rt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[st(n),n]})),l=new Map(h.textStreams.map(function(n){return[tt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[ut(n),n]}));if(b){var m=vt(Ic);l.set(tt(m),m);m=vt("image");h.set(ut(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{$g:c,bi:d,Xh:e,vh:f}}
|
|
867
867
|
q.fh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G,H,K,M,P,O,U;return L(function(X){if(1==X.g){d=Kc;if(!b&&1==a.length)return e=qt(a,!1),f=e.$g,g=e.bi,h=e.Xh,k=e.vh,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),X.B(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.u.has(n.id)||(c.u.add(n.id),-1==l&&(l=m));if(-1==l)return X.return();r=qt(a,!0);p=r.$g;t=r.bi;w=r.Xh;y=r.vh;return D(X,Promise.all([wt(c,c.h,p,l,xt,
|
|
868
|
-
yt),wt(c,c.g,t,l,xt,yt),wt(c,c.l,w,l,xt,yt),wt(c,c.i,y,l,xt,yt)]),2)}z=0;v=[];if(c.g.length&&c.h.length)for(I=u(c.h),G=I.next();!G.done;G=I.next())for(H=G.value,K=u(c.g),M=K.next();!M.done;M=K.next())P=M.value,O=
|
|
868
|
+
yt),wt(c,c.g,t,l,xt,yt),wt(c,c.l,w,l,xt,yt),wt(c,c.i,y,l,xt,yt)]),2)}z=0;v=[];if(c.g.length&&c.h.length)for(I=u(c.h),G=I.next();!G.done;G=I.next())for(H=G.value,K=u(c.g),M=K.next();!M.done;M=K.next())P=M.value,O=li(H.drmInfos,P.drmInfos),H.drmInfos.length&&P.drmInfos.length&&!O.length||(U=z++,v.push({id:U,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H,video:P,bandwidth:(H.bandwidth||0)+(P.bandwidth||0),drmInfos:O,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
|
|
869
869
|
else for(B=c.g.length?c.g:c.h,A=u(B),C=A.next();!C.done;C=A.next())E=C.value,J=z++,v.push({id:J,language:E.language,disabledUntilTime:0,primary:E.primary,audio:E.type==d.Z?E:null,video:E.type==d.va?E:null,bandwidth:E.bandwidth||0,drmInfos:E.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=v;F(X)})};
|
|
870
870
|
function zt(a){var b,c,d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G,H,K,M,P,O;return L(function(U){switch(U.g){case 1:b=Kc;if(1==a.length)return U.return(a[0]);c=a.map(function(X){return new Map(X.filter(function(Y){return Y.type===b.Z}).map(function(Y){return[rt(Y),Y]}))});d=a.map(function(X){return new Map(X.filter(function(Y){return Y.type===b.va}).map(function(Y){return[st(Y),Y]}))});e=a.map(function(X){return new Map(X.filter(function(Y){return Y.type===b.Ca}).map(function(Y){return[tt(Y),Y]}))});
|
|
871
871
|
f=a.map(function(X){return new Map(X.filter(function(Y){return Y.type===b.vf}).map(function(Y){return[ut(Y),Y]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=At(b.Ca),k.set(tt(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())r=n.value,p=At(b.vf),r.set(ut(p),p);t=new pt;return D(U,wt(t,[],c,0,Bt,Ct),2);case 2:return w=U.h,D(U,wt(t,[],d,0,Bt,Ct),3);case 3:return y=U.h,D(U,wt(t,[],e,0,Bt,Ct),4);case 4:return z=U.h,D(U,wt(t,[],f,0,Bt,Ct),5);case 5:v=U.h;B=0;if(y.length&&w.length)for(I=u(w),G=
|
|
@@ -877,12 +877,12 @@ function Et(a,b,c,d,e,f){if(Ft(b))return null;var g=d(b);Ht(a,c,g);g.createSegme
|
|
|
877
877
|
function Jt(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==Uc(a.language,f.language)&&(g=!1);if(g&&(d[b].delete(f),f.fullMimeTypes))for(f=u(f.fullMimeTypes.values()),g=f.next();!g.done;g=f.next())a.fullMimeTypes.add(g.value)}}
|
|
878
878
|
function xt(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=u(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
879
879
|
function Bt(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
880
|
-
function yt(a,b){function c(g,h){g||(g=[]);h=u(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=u(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=
|
|
880
|
+
function yt(a,b){function c(g,h){g||(g=[]);h=u(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=u(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=li(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new R(2,4,4038);a.drmInfos=
|
|
881
881
|
d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=u(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=xt(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),yt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&yt(a.trickModeVideo,
|
|
882
882
|
b)}function Ct(a,b){var c=a.roles;c||(c=[]);for(var d=u(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=u(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=u(b.closedCaptions),c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
883
883
|
function Ht(a,b,c){var d=[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=Kt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
884
|
-
function Kt(a,b,c){var d={audio:rt,video:st,text:tt,image:ut}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return Gt(a,l,m)},video:function(l,m){return Gt(a,l,m)},text:Lt,image:Mt}[c.type];for(var g={audio:Nt,video:Ot,text:Pt,image:Qt}[c.type],h=u(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.
|
|
885
|
-
function Rt(a,b){function c(d){if(!St.has(d)){var e=ve(d);St.set(d,e)}return St.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}q.Lh=function(a){this.m=a};q.Th=function(a){this.
|
|
884
|
+
function Kt(a,b,c){var d={audio:rt,video:st,text:tt,image:ut}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return Gt(a,l,m)},video:function(l,m){return Gt(a,l,m)},text:Lt,image:Mt}[c.type];for(var g={audio:Nt,video:Ot,text:Pt,image:Qt}[c.type],h=u(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!Ft(e)&&b.delete(d(e));return e}
|
|
885
|
+
function Rt(a,b){function c(d){if(!St.has(d)){var e=ve(d);St.set(d,e)}return St.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}q.Lh=function(a){this.m=a};q.Th=function(a){this.s=a};function Gt(a,b,c){return!Rt(b,c)&&!a.m||b.drmInfos&&!ki(b.drmInfos,c.drmInfos)?!1:!0}function Lt(a,b){return b.language?a.forced!==b.forced||0==Uc(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Mt(){return!0}
|
|
886
886
|
function Nt(a,b,c){var d=Rt(a,b),e=Rt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Uc(a.language,b.language);e=Uc(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
|
|
887
887
|
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Tt(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Ut)return!0;if(d==Vt)return!1;d=Tt(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Ut?!0:d==Vt?!1:a.bandwidth&&Wt(a.bandwidth,b.bandwidth,c.bandwidth)==Ut?!0:!1}
|
|
888
888
|
function Ot(a,b,c){var d=Rt(a,b),e=Rt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Tt(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Ut)return!0;if(d==Vt)return!1;if(a.frameRate){d=Tt(a.frameRate,b.frameRate,c.frameRate);if(d==Ut)return!0;if(d==Vt)return!1}return a.bandwidth&&Wt(a.bandwidth,b.bandwidth,c.bandwidth)==Ut?!0:!1}
|
|
@@ -893,52 +893,52 @@ function vt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:functio
|
|
|
893
893
|
function Tt(a,b,c){if(b==a&&a!=c)return Vt;if(c==a&&a!=b)return Ut;if(b>a){if(c<=a||c-a<b-a)return Ut;if(c-a>b-a)return Vt}else{if(c>a)return Vt;if(a-c<a-b)return Ut;if(a-c>a-b)return Vt}return Xt}function Wt(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ut:b<a?Vt:Xt}function Ft(a){switch(a.type){case Ic:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
894
894
|
function st(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function rt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function tt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
895
895
|
function ut(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}N("shaka.util.PeriodCombiner",pt);pt.prototype.setUseStreamOnce=pt.prototype.Th;pt.prototype.setAllowMultiTypeVariants=pt.prototype.Lh;pt.prototype.combinePeriods=pt.prototype.fh;pt.prototype.getImageStreams=pt.prototype.Ni;pt.prototype.getTextStreams=pt.prototype.Zf;pt.prototype.getVariants=pt.prototype.gj;var Ut=1,Xt=0,Vt=-1,St=new Map;function Yt(a,b){var c=new DOMParser,d=Zt.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 $t(a,b){try{var c=qc(a);return Yt(c,b)}catch(d){return null}}
|
|
896
|
-
var Zt=new Mb(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 au(){var a=this;this.i=this.g=null;this.
|
|
897
|
-
q.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.U()&&this.A.Ia();this.h&&this.h.configure(this.g);this.l&&(this.l.Lh(this.g.dash.multiTypeVariantsAllowed&&ld()),this.l.Th(this.g.dash.useStreamOnceInPeriodFlattening))};q.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.u=b.isLowLatencyMode(),c.
|
|
898
|
-
q.stop=function(){for(var a=u(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.
|
|
896
|
+
var Zt=new Mb(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 au(){var a=this;this.i=this.g=null;this.s=[];this.j=null;this.K=1;this.m={};this.M={};this.l=new pt;this.I=0;this.J=new bd(5);this.A=new Ob(function(){bu(a)});this.H=new ng;this.F=null;this.L=[];this.G=Infinity;this.u=!1;this.h=null}q=au.prototype;
|
|
897
|
+
q.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.U()&&this.A.Ia();this.h&&this.h.configure(this.g);this.l&&(this.l.Lh(this.g.dash.multiTypeVariantsAllowed&&ld()),this.l.Th(this.g.dash.useStreamOnceInPeriodFlattening))};q.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.u=b.isLowLatencyMode(),c.s=[a],c.i=b,D(e,cu(c),2);d=e.h;c.i&&du(c,d);if(!c.i)throw new R(2,7,7001);return e.return(c.j)})};
|
|
898
|
+
q.stop=function(){for(var a=u(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.s=[];this.j=null;this.m={};this.l=null;null!=this.A&&(this.A.stop(),this.A=null);this.h&&this.h.destroy();return this.H.destroy()};q.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),D(c,cu(a),4);if(2!=c.g)return ta(c,0);b=ua(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};
|
|
899
899
|
q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.ic();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.I=b.endTime-a,du(this,0))}}};q.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
900
|
-
function cu(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.
|
|
901
|
-
function fu(a,b,c){var d,e,f,g,h,k,l,m,n,r,p;return L(function(t){if(1==t.g){d=b;e=a.g.dash.manifestPreprocessor;f=lm;if(e!=f){nd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=$t(d,"MPD");if(!g)throw new R(2,4,4001,c);e(g);d=rc(g.outerHTML)}h=
|
|
900
|
+
function cu(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.s,1<a.s.length&&a.h&&(c=ot(a.h,"Location",!0),c.length&&(b=c)),d=ug(b,a.g.retryParameters),e=Date.now(),D(k,eu(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.s.includes(f.uri)&&a.s.unshift(f.uri);return D(k,fu(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.J.sample(1,h);return k.return(h)})}
|
|
901
|
+
function fu(a,b,c){var d,e,f,g,h,k,l,m,n,r,p;return L(function(t){if(1==t.g){d=b;e=a.g.dash.manifestPreprocessor;f=lm;if(e!=f){nd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=$t(d,"MPD");if(!g)throw new R(2,4,4001,c);e(g);d=rc(g.outerHTML)}h=Wg(d,"MPD");if(!h)throw new R(2,4,4001,c);k=a.g.dash.manifestPreprocessorTXml;l=mm;k!=l&&k(h);if(m=a.g.dash.disableXlinkProcessing)return t.return(gu(a,h,c));n=a.g.dash.xlinkFailGracefully;
|
|
902
902
|
r=Bs(h,a.g.retryParameters,n,c,a.i.networkingEngine);og(a.H,r);return D(t,r.promise,2)}p=t.h;return t.return(gu(a,p,c))})}
|
|
903
|
-
function gu(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G,H,K,M,P,O,U,X,Y,Da,Ja,lb,La,ab,Aa,tb,Jb,qb,eb,Af,Od,re,yd,Lc,se,Bf,te,Pd,fj
|
|
904
|
-
if((w=
|
|
905
|
-
(U=J.map(
|
|
903
|
+
function gu(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G,H,K,M,P,O,U,X,Y,Da,Ja,lb,La,ab,Aa,tb,Jb,qb,eb,Af,Od,re,yd,Lc,se,Bf,te,Pd,fj,ah,gj,hj,Cf,ue,Df;return L(function(ac){switch(ac.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=dh(b,"Location");h=u(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=fh(l))r=Cc(d,[n])[0],m&&(a.h?nt(a.h,"Location",m,r):f.set(m,r)),e.push(r);a.h?(p=ot(a.h,"Location",!0),0<p.length&&(d=a.s=p)):e.length&&(d=a.s=e);t=Promise.resolve();
|
|
904
|
+
if((w=hh(b,"ContentSteering"))&&a.i){y=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=y;else if(a.h=new jt(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=y,z=fh(w))(v=kh(w,"queryBeforeStart",wh,!1))?t=kt(a.h,z):kt(a.h,z);B=u(f.keys());for(A=B.next();!A.done;A=B.next())C=A.value,E=f.get(C),nt(a.h,"Location",C,E)}J=dh(b,"BaseURL");G=!1;if(a.h)for(H=u(J),K=H.next();!K.done;K=H.next())M=K.value,P=M.attributes.serviceLocation,O=fh(M),P&&O&&(nt(a.h,"BaseURL",P,O),G=!0);G&&a.h||
|
|
905
|
+
(U=J.map(fh),I=Cc(d,U));X=function(){return a.h&&G?ot(a.h,"BaseURL"):I?I:[]};Y=0;J&&J.length&&(Y=kh(J[0],"availabilityTimeOffset",vh)||0);Da=a.g.dash.ignoreMinBufferTime;Ja=0;Da||(Ja=kh(b,"minBufferTime",qh)||0);a.I=kh(b,"minimumUpdatePeriod",qh,-1);lb=kh(b,"availabilityStartTime",nh);La=kh(b,"timeShiftBufferDepth",qh);ab=a.g.dash.ignoreSuggestedPresentationDelay;Aa=null;ab||(Aa=kh(b,"suggestedPresentationDelay",qh));tb=a.g.dash.ignoreMaxSegmentDuration;Jb=null;tb||(Jb=kh(b,"maxSegmentDuration",qh));
|
|
906
906
|
qb=b.attributes.type||"static";if(a.j)for(eb=a.j.presentationTimeline,Af=u(Object.values(a.m)),Od=Af.next();!Od.done;Od=Af.next())re=Od.value,re.segmentIndex&&re.segmentIndex.fb(eb.Lb());else yd=a.g.defaultPresentationDelay||1.5*Ja,Lc=null!=Aa?Aa:yd,eb=new sk(lb,Lc,a.g.dash.autoCorrectDrift);eb.gd("static"==qb);(se=eb.U())&&!isNaN(a.g.availabilityWindowOverride)&&(La=a.g.availabilityWindowOverride);null==La&&(La=Infinity);eb.$e(La);Bf=b.attributes.profiles||"";te={ec:"static"!=qb,presentationTimeline:eb,
|
|
907
|
-
Sa:null,xa:null,La:null,N:null,bandwidth:0,wh:!1,dc:Y,profiles:Bf.split(",")};Pd=hu(a,te,X,b);fj=Pd.duration
|
|
908
|
-
return D(ac,a.l.fh(
|
|
909
|
-
break}ue=
|
|
910
|
-
function iu(a){var b=
|
|
911
|
-
function hu(a,b,c,d){var e=
|
|
907
|
+
Sa:null,xa:null,La:null,N:null,bandwidth:0,wh:!1,dc:Y,profiles:Bf.split(",")};Pd=hu(a,te,X,b);fj=Pd.duration;ah=Pd.periods;"static"!=qb&&Pd.kh||eb.yb(fj||Infinity);a.G&&!a.u&&(gj=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.u=a.i.isLowLatencyMode());a.u?eb.Mh(a.G):a.G&&Ua("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");eb.og(Jb||1);
|
|
908
|
+
return D(ac,a.l.fh(ah,te.ec),2);case 2:return D(ac,t,3);case 3:a.u&&(Ja=0,hj=null!=Aa?Aa:a.g.defaultPresentationDelay,eb.Dg(hj));if(a.j){a.j.variants=a.l.j;Cf=a.l.Zf();0<Cf.length&&(a.j.textStreams=Cf);a.j.imageStreams=a.l.i;a.i.filter(a.j);ac.B(4);break}a.j={presentationTimeline:eb,variants:a.l.j,textStreams:a.l.Zf(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Ja||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:iu(b)};if(!eb.$h()){ac.B(5);
|
|
909
|
+
break}ue=dh(b,"UTCTiming");return D(ac,ju(a,X,ue),6);case 6:Df=ac.h;if(!a.i)return ac.return();eb.Nh(Df);case 5:eb.Ge();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),F(ac)}})}
|
|
910
|
+
function iu(a){var b=hh(a,"ServiceDescription");if(!b)return null;a=hh(b,"Latency");b=hh(b,"PlaybackRate");return a&&a.attributes.max||b?{maxLatency:a&&a.attributes.max?parseInt(a.attributes.max,10)/1E3:null,maxPlaybackRate:b?parseFloat(b.attributes.max):null,minLatency:a&&a.attributes.min?parseInt(a.attributes.min,10)/1E3:null,minPlaybackRate:b?parseFloat(b.attributes.min):null}:null}
|
|
911
|
+
function hu(a,b,c,d){var e=kh(d,"mediaPresentationDuration",qh),f=[],g=0;d=dh(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=kh(k,"start",qh,g),n=k.attributes.id,r=kh(k,"duration",qh),p=null;if(l){var t=kh(l,"start",qh);null!=t&&(p=t-m)}else null!=e&&(p=e-m);null==p&&(p=r);if(!(null!==a.F&&null!==n&&null!==m&&m<a.F)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.F||m>a.F)&&(a.F=m);g=ku(a,b,c,{start:m,duration:p,node:k,fg:null==p||!l});f.push(g);b.Sa.id&&p&&(a.M[b.Sa.id]=p);if(null==
|
|
912
912
|
p){g=null;break}g=m+p}}a.L=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,kh:!1}:{periods:f,duration:g,kh:!0}}
|
|
913
|
-
function ku(a,b,c,d){b.Sa=lu(a,d.node,null,c);b.xa=d;b.Sa.dc=b.dc;b.Sa.id||(b.Sa.id="__shaka_period_"+d.start);var e=
|
|
913
|
+
function ku(a,b,c,d){b.Sa=lu(a,d.node,null,c);b.xa=d;b.Sa.dc=b.dc;b.Sa.id||(b.Sa.id="__shaka_period_"+d.start);var e=dh(d.node,"EventStream");c=b.presentationTimeline.Lb();e=u(e);for(var f=e.next();!f.done;f=e.next())mu(a,d.start,d.duration,f.value,c);c=dh(d.node,"AdaptationSet").map(function(m){return nu(a,b,m)}).filter(Me);if(b.ec){d=[];e=u(c);for(f=e.next();!f.done;f=e.next()){f=u(f.value.Qj);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new R(2,4,4018);
|
|
914
914
|
}d=c.filter(function(m){return!m.Ng});c=c.filter(function(m){return m.Ng});c=u(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ng.split(" ");g=u(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=u(k.streams);for(var l=k.next();!l.done;h={ke:h.ke},l=k.next())h.ke=l.value,h.ke.trickModeVideo=e.streams.find(function(m){return function(n){return ve(m.ke.codecs)==ve(n.codecs)}}(h))}}}c=ou(a.g.disableAudio,d,"audio");e=ou(a.g.disableVideo,d,"video");f=ou(a.g.disableText,
|
|
915
915
|
d,Ic);d=ou(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new R(2,4,4004);return{id:b.Sa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function ou(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
916
|
-
function nu(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.La=lu(a,c,b.Sa,null);var e=!1,f=
|
|
917
|
-
l}}var n;m=
|
|
918
|
-
p.value,t=p.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==t?w=parseInt(p.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t&&(n=d(parseInt(p.attributes.value,10)));m=
|
|
916
|
+
function nu(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.La=lu(a,c,b.Sa,null);var e=!1,f=dh(c,"Role"),g=f.map(function(G){return G.attributes.value}).filter(Me),h=void 0,k=b.La.contentType==Ic;k&&(h="subtitle");f=u(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.attributes.schemeIdUri;if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.attributes.value,l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
917
|
+
l}}var n;m=dh(c,"EssentialProperty");f=null;var r=!1;l=!1;m=u(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==t?f=p.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&("urn:mpeg:dash:ssr:2023"==t?r=!0:l=!0)}var w=null;m=dh(c,"SupplementalProperty");m=u(m);for(p=m.next();!p.done;p=m.next())p=
|
|
918
|
+
p.value,t=p.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==t?w=parseInt(p.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t&&(n=d(parseInt(p.attributes.value,10)));m=dh(c,"Accessibility");var y=new Map,z;m=u(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.attributes.schemeIdUri,t=t.attributes.value,"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var v=u(t),B=v.next();!B.done;B=v.next()){var A=B.value,C=B=void 0;A.includes("=")?
|
|
919
919
|
(A=A.split("="),B=A[0].startsWith("CC")?A[0]:"CC"+A[0],C=A[1]||"und"):(B="CC"+p,2==t.length?p+=2:p++,C=A);y.set(B,Oc(C))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=t)for(t=u(t.split(";")),B=t.next();!B.done;B=t.next())B=B.value,A=v=void 0,B.includes("=")?(B=B.split("="),v="svc"+B[0],A=B[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,A=B),y.set(v,Oc(A));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=t&&(g.push(t),"captions"==t&&(h="caption")):
|
|
920
|
-
"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==t?z="visually impaired":"2"==t&&(z="hard of hearing"));if(l)return null;l=
|
|
920
|
+
"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==t?z="visually impaired":"2"==t&&(z="hard of hearing"));if(l)return null;l=dh(c,"ContentProtection");var E=ks(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=Oc(b.La.language||"und"),I=c.attributes.label;(l=dh(c,"Label"))&&l.length&&(l=eh(l[0]))&&(I=l);l=dh(c,"Representation");c=l.map(function(G){if(G=pu(a,b,E,h,J,I,e,g,y,G,z,w))G.hdr=G.hdr||n,G.fastSwitching=r;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.La.contentType;
|
|
921
921
|
if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new R(2,4,4003);}if(!b.La.contentType||"application"==b.La.contentType)for(b.La.contentType=qu(c[0].mimeType,c[0].codecs),k=u(c),p=k.next();!p.done;p=k.next())p.value.type=b.La.contentType;k=b.La.id||"__fake__"+a.K++;m=u(c);for(p=m.next();!p.done;p=m.next()){p=p.value;t=u(E.drmInfos);for(v=t.next();!v.done;v=t.next())v=v.value,v.keyIds=v.keyIds&&p.keyIds?new Set([].concat(x(v.keyIds),x(p.keyIds))):v.keyIds||p.keyIds;a.g.dash.enableAudioGroups&&
|
|
922
922
|
(p.groupId=k)}l=l.map(function(G){return G.attributes.id}).filter(Me);return{id:k,contentType:b.La.contentType,language:J,yl:e,streams:c,drmInfos:E.drmInfos,Ng:f,Qj:l}}
|
|
923
|
-
function pu(a,b,c,d,e,f,g,h,k,l,m,n){b.N=lu(a,l,b.La,null);a.G=Math.min(a.G,b.N.dc);if(!ru(b.N))return null;var r=b.xa.start;b.bandwidth=
|
|
923
|
+
function pu(a,b,c,d,e,f,g,h,k,l,m,n){b.N=lu(a,l,b.La,null);a.G=Math.min(a.G,b.N.dc);if(!ru(b.N))return null;var r=b.xa.start;b.bandwidth=kh(l,"bandwidth",th)||0;var p=b.N.contentType,t=p==Ic||"application"==p;p="image"==p;try{var w=void 0;if(c.yf){var y=b.N.Hb,z=Cc(y(),[c.yf.vj]),v=ug(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.yf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var G,H,K;return L(function(M){if(1==M.g)return D(M,eu(a,v,6),2);if(3!=M.g){G=M.h;if(!G.data||16!=
|
|
924
924
|
G.data.byteLength)throw new R(2,4,4049);H={name:"AES-CBC"};K=w;return D(M,window.crypto.subtle.importKey("raw",G.data,H,!0,["decrypt"]),3)}K.cryptoKey=M.h;w.fetchKey=void 0;F(M)})}}}y=function(G,H,K,M){return su(a,G,H,K,M)};if(b.N.Xd)var B=Os(b,y,w);else if(b.N.mc)B=Us(b,a.m,w);else if(b.N.Yd)B=Zs(b,y,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.M,w,n);else{var A=b.xa.duration||0,C=b.N.Hb;B={Vc:function(){var G=Qk(r,A,C());G.Tc(function(H){H.mimeType=b.N.mimeType;H.codecs=b.N.codecs});return Promise.resolve(G)}}}}catch(G){if((t||
|
|
925
|
-
p)&&4002==G.code)return null;throw G;}n=
|
|
925
|
+
p)&&4002==G.code)return null;throw G;}n=dh(l,"ContentProtection");n=os(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);y=!1;dh(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.attributes.schemeIdUri&&"JOC"==G.attributes.value})&&(y=!0);z=!1;t&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var E;if(p&&((l=dh(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.attributes.schemeIdUri)}))&&
|
|
926
926
|
(E=l.attributes.value),!E))return null;var J;l=b.N.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");t=b.N.id?b.Sa.id+","+b.N.id:"";var I=t&&a.m[t]?a.m[t]:{id:a.K++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){I.segmentIndex&&(I.segmentIndex.release(),I.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:l,
|
|
927
927
|
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:n,language:e,originalLanguage:b.La.language,label:f,type:b.La.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.N.Ne,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:E,accessibilityPurpose:m,external:!1,
|
|
928
928
|
fastSwitching:!1,fullMimeTypes:new Set([ke(b.N.mimeType,b.N.codecs)])};I.createSegmentIndex=function(){var G;return L(function(H){if(1==H.g){if(I.segmentIndex)return H.B(0);G=I;return D(H,B.Vc(),3)}G.segmentIndex=H.h;F(H)})};t&&b.ec&&!a.m[t]&&(a.m[t]=I);return I}
|
|
929
929
|
function bu(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),D(d,cu(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=ua(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();du(a,b);F(d)}})}function du(a,b){if(!(0>a.I)){var c=a.I;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.V(Math.max(c-b,cd(a.J)))}}
|
|
930
|
-
function lu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ne:null,audioSamplingRate:null,dc:0,zg:0};d=d||c.Hb;var e=b.attributes.id,f=
|
|
931
|
-
|
|
932
|
-
|
|
930
|
+
function lu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ne:null,audioSamplingRate:null,dc:0,zg:0};d=d||c.Hb;var e=b.attributes.id,f=dh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=u(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=fh(m);l&&m&&(nt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(fh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=b.attributes.codecs||c.codecs;var n=kh(b,"frameRate",
|
|
931
|
+
xh)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,p=tu(dh(b,"InbandEventStream"),c.emsgSchemeIdUris),t=dh(b,"AudioChannelConfiguration");t=uu(t)||c.Ne;var w=kh(b,"audioSamplingRate",uh)||c.audioSamplingRate;k||(k=qu(l,m));var y=hh(b,"SegmentBase"),z=hh(b,"SegmentTemplate"),v=y?kh(y,"availabilityTimeOffset",vh)||0:0,B=z?kh(z,"availabilityTimeOffset",vh)||0:0,A=f&&f.length?kh(f[0],"availabilityTimeOffset",vh)||0:0;v=c.dc+A+v+B;B=null;(A=hh(b,"SegmentSequenceProperties"))&&(A=hh(A,"SAP"))&&(B=
|
|
932
|
+
kh(A,"cadence",sh));return{Hb:function(){return Cc(d(),f.length?a.h&&h?ot(a.h,e):g?g:[]:[])},Xd:y||c.Xd,mc:hh(b,"SegmentList")||c.mc,Yd:z||c.Yd,width:kh(b,"width",uh)||c.width,height:kh(b,"height",uh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,Ne:t,audioSamplingRate:w,dc:v,zg:B||c.zg}}
|
|
933
933
|
function tu(a,b){b=b.slice();a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
934
934
|
function uu(a){a=u(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
935
935
|
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function ru(a){var b=a.Xd?1:0;b+=a.mc?1:0;b+=a.Yd?1:0;if(0==b)return a.contentType==Ic||"application"==a.contentType?!0:!1;1!=b&&(a.Xd&&(a.mc=null),a.Yd=null);return!0}
|
|
936
|
-
function vu(a,b,c,d){var e,f,g,h,k,l,m;return L(function(n){if(1==n.g)return e=[uc(c)],f=Cc(b(),e),g=
|
|
936
|
+
function vu(a,b,c,d){var e,f,g,h,k,l,m;return L(function(n){if(1==n.g)return e=[uc(c)],f=Cc(b(),e),g=ug(f,a.g.retryParameters),g.method=d,h=a.i.networkingEngine.request(4,g),og(a.H,h),D(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=nc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
937
937
|
function ju(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(r){return{scheme:r.attributes.schemeIdUri,value:r.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=u(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;ra(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);
|
|
938
938
|
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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return D(n,vu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return D(n,vu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
|
|
939
939
|
3);break;case 5:ua(n);case 3:g=f.next();n.B(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
940
|
-
function mu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=
|
|
941
|
-
function su(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g)return f=
|
|
940
|
+
function mu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=kh(d,"timescale",uh)||1;d=u(dh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=kh(k,"presentationTime",uh)||0,m=kh(k,"duration",uh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:yh(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
|
|
941
|
+
function su(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g)return f=Ag,g=e?0:1,h=sl(b,c,d,a.g.retryParameters),D(l,eu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function qu(a,b){b=ke(a,b);return De(b)?Ic:a.split("/")[0]}function eu(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);og(a.H,b);return b.promise}N("shaka.dash.DashParser",au);vi["application/dash+xml"]=function(){return new au};vi["video/vnd.mpeg.dash.mpd"]=function(){return new au};function wu(){}N("shaka.dependencies",wu);wu.has=function(a){return xu.has(a)};wu.add=function(a,b){if(!yu[a])throw Error(a+" is not supported");a==zu?nd("mux.js","mux.js is no longer used in Shaka Player."):xu.set(a,function(){return b})};var zu="muxjs",yu={zl:zu,ISOBoxer:"ISOBoxer"};wu.Allowed=yu;var xu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Au(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Bu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Bu.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};
|
|
942
942
|
function Cu(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Du(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function W(a,b,c){return(a=Du(a,b))?a.value:c||null}function Eu(a,b){a=Du(a,b);if(!a)throw new R(2,4,4023,b);return a.value}function Fu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Ob=c}function Gu(a,b){this.name=a;this.value=b};function Hu(a,b){return a.filter(function(c){return c.name==b})}function Iu(a,b){return a.filter(function(c){return Eu(c,"TYPE")==b})}function Ju(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Ku(a,b,c){c=void 0===c?0:c;return(a=Ju(a,b))?Number(a.value):c}function Lu(a,b,c){return b?Mu(a,[b],c):[]}
|
|
943
943
|
function Mu(a,b,c){if(!b.length)return[];b=Cc(a,b);a=[];b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=u(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new R(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Nu(a){this.h=a||"";this.g=0}function Ou(a){Pu(a,/[ \t]+/gm)}function Pu(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 Qu(a){return a.g==a.h.length?null:(a=Pu(a,/[^ \t\n]*/gm))?a[0]:null};function Ru(){this.g=0}
|
|
944
944
|
function Su(a,b){b=nc(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 R(2,4,4015);b=0;for(var d=!0,e=u(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Tu(a,f),--a.g,Uu.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=Tu(a,g);if(Vu.includes(g.name)){if(1!=b)throw new R(2,4,4017);g=
|
|
@@ -947,17 +947,17 @@ g.name&&(g.attributes.push(new Gu("URI",h)),d=!0)}}return new Au(b,e)}function T
|
|
|
947
947
|
var Uu="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Vu="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Wu(){}function Xu(a){try{var b=Yu(a);return jg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return hg(c)}}
|
|
948
948
|
function Yu(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new R(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new R(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=yc(a):e=rc(a);return{data:e,contentType:c}}N("shaka.net.DataUriPlugin",Wu);Wu.parse=Xu;qg("data",Xu);function Zu(a){var b=ye(a),c=b.split("/")[0];a=Ae(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Qg:null}}
|
|
949
949
|
function $u(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":f.push(v+".42E01E");h=!0;break;case "hev1":case "hvc1":f.push(v+".1.6.L93.90");h=!0;break;case "dvh1":case "dvhe":f.push(v+".05.04");h=!0;break;case "vp09":f.push(v+".00.10.08");h=!0;break;case "av01":f.push(v+".0.01M.08");h=!0;break;case "mp4a":e.push("mp4a.40.2");g=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),g=!0}}var e=[],f=[],g=!1,h=!1,k=null,l=null,m=null,n=
|
|
950
|
-
null,r=null,p=null,t;(new
|
|
951
|
-
v.W();E&128;)E=v.W();if(3==A)v.Ha(),E=v.W(),E&128&&v.Ha(),E&64&&v.skip(v.W()),E&32&&v.Ha();else if(4==A)C=v.W(),v.skip(12);else if(5==A)break}C&&(B+="."+Yi(C),5==A&&v.Aa()&&(A=v.W(),C=(A&248)>>3,31===C&&v.Aa()&&(C=32+((A&7)<<3)+((v.W()&224)>>5)),B+="."+C));e.push(B);g=!0}).box("ac-3",c).box("ec-3",c).box("opus",c).box("Opus",c).box("fLaC",c).box("avc1",function(v){t=v.name;
|
|
952
|
-
function(v){t=v.name;
|
|
950
|
+
null,r=null,p=null,t;(new Jg).box("moov",Og).box("trak",Og).T("tkhd",function(v){v=Wi(v.reader,v.version);l=String(v.height);m=String(v.width)}).box("mdia",Og).T("mdhd",function(v){k=Ui(v.reader,v.version).language}).box("minf",Og).box("stbl",Og).T("stsd",Qg).box("mp4a",function(v){var B=v.reader;B.skip(6);B.skip(2);B.skip(8);var A=B.Ha();B.skip(2);B.skip(2);B.skip(2);B=B.Ha()+B.Ha()/65536;n=A;r=B;v.reader.Aa()?Og(v):c(v)}).box("esds",function(v){v=v.reader;for(var B="mp4a",A,C;v.Aa();){A=v.W();for(var E=
|
|
951
|
+
v.W();E&128;)E=v.W();if(3==A)v.Ha(),E=v.W(),E&128&&v.Ha(),E&64&&v.skip(v.W()),E&32&&v.Ha();else if(4==A)C=v.W(),v.skip(12);else if(5==A)break}C&&(B+="."+Yi(C),5==A&&v.Aa()&&(A=v.W(),C=(A&248)>>3,31===C&&v.Aa()&&(C=32+((A&7)<<3)+((v.W()&224)>>5)),B+="."+C));e.push(B);g=!0}).box("ac-3",c).box("ec-3",c).box("opus",c).box("Opus",c).box("fLaC",c).box("avc1",function(v){t=v.name;Rg(v)}).box("avc3",function(v){t=v.name;Rg(v)}).box("hev1",function(v){t=v.name;Rg(v)}).box("hvc1",function(v){t=v.name;Rg(v)}).box("dva1",
|
|
952
|
+
function(v){t=v.name;Rg(v)}).box("dvav",function(v){t=v.name;Rg(v)}).box("dvh1",function(v){t=v.name;Rg(v)}).box("dvhe",function(v){t=v.name;Rg(v)}).box("vp09",function(v){t=v.name;Rg(v)}).box("av01",function(v){t=v.name;Rg(v)}).box("avcC",function(v){var B=t||"";switch(t){case "dvav":B="avc3";break;case "dva1":B="avc1"}v=v.reader;v.skip(1);v=B+"."+Yi(v.W())+Yi(v.W())+Yi(v.W());f.push(v);h=!0}).box("hvcC",function(v){var B=t||"";switch(t){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var A=v.reader;
|
|
953
953
|
A.skip(1);v=A.W();var C=["","A","B","C"][v>>6],E=v&31,J=A.R(),I=(v&32)>>5?"H":"L";v=[A.W(),A.W(),A.W(),A.W(),A.W(),A.W()];A=A.W();for(var G=0,H=0;32>H;H++){G|=J&1;if(31==H)break;G<<=1;J>>=1}B=B+("."+C+E)+("."+Yi(G,!0));B+="."+I+A;C="";for(E=v.length;E--;)if((I=v[E])||C)C="."+I.toString(16).toUpperCase()+C;B+=C;f.push(B);h=!0}).box("dvcC",function(v){var B=t||"";switch(t){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var A=v.reader;A.skip(2);
|
|
954
|
-
v=A.W();A=A.W();f.push(B+"."+Zi(v>>1&127)+"."+Zi(v<<5&32|A>>3&31));h=!0}).T("vpcC",function(v){var B=t||"",A=v.reader;v=A.W();var C=A.W();A=A.W()>>4&15;f.push(B+"."+Zi(v)+"."+Zi(C)+"."+Zi(A));h=!0}).box("av1C",function(v){var B=t||"",A=v.reader;A.skip(1);v=A.W();A=A.W();var C=v>>>5,E=(A&64)>>6;f.push(B+"."+C+"."+Zi(v&31)+(A>>>7?"H":"M")+"."+Zi(2===C&&E?(A&32)>>5?12:10:E?10:8)+"."+((A&16)>>4)+"."+((A&8)>>3)+((A&4)>>2)+(A&3)+"."+Zi(1)+"."+Zi(1)+"."+Zi(1)+".0");h=!0}).box("enca",
|
|
955
|
-
|
|
954
|
+
v=A.W();A=A.W();f.push(B+"."+Zi(v>>1&127)+"."+Zi(v<<5&32|A>>3&31));h=!0}).T("vpcC",function(v){var B=t||"",A=v.reader;v=A.W();var C=A.W();A=A.W()>>4&15;f.push(B+"."+Zi(v)+"."+Zi(C)+"."+Zi(A));h=!0}).box("av1C",function(v){var B=t||"",A=v.reader;A.skip(1);v=A.W();A=A.W();var C=v>>>5,E=(A&64)>>6;f.push(B+"."+C+"."+Zi(v&31)+(A>>>7?"H":"M")+"."+Zi(2===C&&E?(A&32)>>5?12:10:E?10:8)+"."+((A&16)>>4)+"."+((A&8)>>3)+((A&4)>>2)+(A&3)+"."+Zi(1)+"."+Zi(1)+"."+Zi(1)+".0");h=!0}).box("enca",Sg).box("encv",Rg).box("sinf",
|
|
955
|
+
Og).box("frma",function(v){v=Xi(v.reader).ab;d(v)}).box("colr",function(v){v=v.reader;var B=null,A=v.Pb(4);var C=String.fromCharCode(A[0]);C+=String.fromCharCode(A[1]);C+=String.fromCharCode(A[2]);C+=String.fromCharCode(A[3]);if("nclx"===C)switch(v.Ha(),A=v.Ha(),v.Ha(),A){case 1:case 6:case 13:case 14:case 15:B="SDR";break;case 16:B="PQ";break;case 18:B="HLG"}p=B}).parse(a||b,!0);if(!e.length&&!f.length)return null;var w=g&&!h,y=new Map;if(h){var z=new ud("video/mp4");a&&z.init(a);z.i(b);a=u(z.j());
|
|
956
956
|
for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);z.g()}return{type:w?"audio":"video",mimeType:w?"audio/mp4":"video/mp4",codecs:av(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:r,closedCaptions:y,Qg:p}}function av(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=xe(d);b.has(e)||(c.push(d),b.add(e))}b=Jc("audio",c);d=Jc("video",c);a=Jc(Ic,c);d=bv(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
957
|
-
function bv(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?jd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function cv(a){var b=null;(new
|
|
957
|
+
function bv(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?jd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function cv(a){var b=null;(new Jg).box("moov",Og).box("trak",Og).box("mdia",Og).box("minf",Og).box("stbl",Og).T("stsd",Qg).box("encv",Rg).box("enca",Sg).box("sinf",Og).box("schi",Og).T("tenc",function(c){c=c.reader;c.W();c.W();c.W();c.W();b=Ac(c.Pb(16))}).parse(a,!0);return b};function dv(){var a=this;this.g=this.i=null;this.A=1;this.s=new Map;this.J=new Map;this.L=new Map;this.L.set("video",new Map);this.L.set("audio",new Map);this.L.set(Ic,new Map);this.L.set("image",new Map);this.Ka=new Set;this.h=new Map;this.l=null;this.X="";this.Fa=new Ru;this.K=-1;this.P=Infinity;this.aa=this.$a=!1;this.u=new Ob(function(){ev(a)});this.oa=fv;this.G=null;this.Ja=0;this.m=Infinity;this.ra=this.qa=this.M=0;this.O=new ng;this.H=new Map;this.I=new Map;this.S=new Map;this.Y=new Map;this.$=
|
|
958
958
|
new Map;this.sa=new Map;this.ma=new Map;this.Za=this.F=!1;this.Ua=new bd(5);this.j=null}q=dv.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};q.start=function(a,b){var c=this,d;return L(function(e){return 1==e.g?(c.i=b,c.F=b.isLowLatencyMode(),D(e,gv(c,[a]),2)):3!=e.g?(d=e.h,c.X=d.uri,D(e,hv(c,d.data,a),3)):e.return(c.G)})};
|
|
959
|
-
q.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.O&&(a.push(this.O.destroy()),this.O=null);this.g=this.i=null;this.Ka.clear();this.G=null;this.h.clear();this.J.clear();this.I.clear();this.
|
|
960
|
-
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!iv(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(jv(a,g));return D(m,Promise.all(b),2)}kv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Ld});d.length&&!h&&(k=lv,mv(a,k.ii),l=d.map(function(n){return n.Yb}),a.l.
|
|
959
|
+
q.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.O&&(a.push(this.O.destroy()),this.O=null);this.g=this.i=null;this.Ka.clear();this.G=null;this.h.clear();this.J.clear();this.I.clear();this.s.clear();this.S.clear();this.Y.clear();this.$.clear();this.sa.clear();this.ma.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
960
|
+
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!iv(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(jv(a,g));return D(m,Promise.all(b),2)}kv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Ld});d.length&&!h&&(k=lv,mv(a,k.ii),l=d.map(function(n){return n.Yb}),a.l.yb(Math.min.apply(Math,x(l))),a.i.updateDuration());
|
|
961
961
|
h&&nv(a);F(m)})};function ov(a,b){return iv(a)?a.L.get(b.type):b.Ie}
|
|
962
962
|
function jv(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G,H,K,M,P,O,U;return L(function(X){if(1==X.g){c=[];d=u(b.ka());for(e=d.next();!e.done;e=d.next())f=e.value,g=new ib(f),h=g.g,b.pe&&(0<=b.Bb&&h.add("_HLS_msn",String(b.Bb)),0<=b.Cb&&h.add("_HLS_part",String(b.Cb))),b.qe&&h.add("_HLS_skip","YES"),Ab(h)&&nb(g,h),c.push(g.toString());return D(X,gv(a,c,!0),2)}if(3!=X.g){k=X.h;if(!b.stream.segmentIndex)return X.return();l=Su(a.Fa,k.data);if(1!=l.type)throw new R(2,4,4017);m=k.uri;m==k.originalUri||
|
|
963
963
|
b.ka().includes(m)||b.Ih.push(m);n=Hu(l.g,"EXT-X-DEFINE");r=pv(a,n,m);p=b.stream;t=ov(a,b);return D(X,qv(a,l,p.mimeType,b.ka,r),3)}w=X.h;y=w.keyIds;z=w.drmInfos;v=function(Y,Da){return Y.size===Da.size&&[].concat(x(Y)).every(function(Ja){return Da.has(Ja)})};v(p.keyIds,y)||(p.keyIds=y,p.drmInfos=z,a.i.newDrmInfo(p));B=rv(a,l,p,t,r,b.ka,b.type);A=B.segments;if(C=B.bandwidth)p.bandwidth=C;p.segmentIndex.Sd(A,a.l.Lb());A.length&&(E=Ku(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(J=Ju(l.g,"EXT-X-SKIP"))?Number(W(J,
|
|
@@ -967,19 +967,19 @@ c,d)}
|
|
|
967
967
|
function xv(a,b){if(Infinity==a.P){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.P=Math.min(a.P,d.h))}}b=a.P;if(Infinity!=b)for(d=u(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!vv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.ka(),"Expect AV sync issues!");else for(wv(a,c,f.h-b-f.startTime),c=u(e),e=c.next();!e.done;e=c.next())e.value.Kg(b)}}}
|
|
968
968
|
function wv(a,b,c){b.Dc+=c;b.Yb+=c;a=ov(a,b);for(var d=u(a),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.ka()}
|
|
969
969
|
function hv(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G,H,K,M,P,O,U,X,Y,Da,Ja,lb,La,ab;return L(function(Aa){switch(Aa.g){case 1:d=Su(a.Fa,b);e=Hu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new sk(null,0);a.l.gd(!0);k=function(){return[c]};if(1==d.type)return D(Aa,yv(a,d,k),7);zv(a,e);l=Hu(d.g,"EXT-X-MEDIA");m=Hu(d.g,"EXT-X-STREAM-INF");n=Hu(d.g,"EXT-X-IMAGE-STREAM-INF");r=Hu(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Hu(d.g,"EXT-X-SESSION-KEY");t=Hu(d.g,"EXT-X-SESSION-DATA");w=Hu(d.g,"EXT-X-CONTENT-STEERING");
|
|
970
|
-
Av(a,t);return D(Aa,Bv(a,w),4);case 4:return Cv(a,m),Dv(a,l),D(Aa,Ev(a,m,p,l,k,a.
|
|
970
|
+
Av(a,t);return D(Aa,Bv(a,w),4);case 4:return Cv(a,m),Dv(a,l),D(Aa,Ev(a,m,p,l,k,a.s),5);case 5:return f=Aa.h,g=Fv(a,l),D(Aa,Gv(a,n,r),6);case 6:h=Aa.h;Aa.B(3);break;case 7:return y=Aa.h,z=y.type,v=y.mimeType,B=y.codecs,A=y.language,C=y.height,E=y.width,J=y.channelCount,I=y.sampleRate,G=y.closedCaptions,H=y.Qg,D(Aa,Hv(a,a.A++,d,k,c,B,z,A,!0,"Media Playlist",J,G,null,!1,I,!1,v),8);case 8:K=Aa.h,a.h.set(c,K),"video"==z&&Iv(K.stream,E,C,null,H,null),f.push({id:0,language:Oc(A||"und"),disabledUntilTime:0,
|
|
971
971
|
primary:!0,audio:"audio"==z?K.stream:null,video:"video"==z?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new R(2,7,7001);1==d.type&&(iv(a)&&(Jv(a,d),M=a.m,a.u.V(M)),P=Array.from(a.h.values()),Kv(a,P),nv(a));a.G={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
972
972
|
type:"HLS",serviceDescription:null};if(a.aa||!a.g.hls.disableCodecGuessing){Aa.B(9);break}O=[];U=u(a.G.variants);for(X=U.next();!X.done;X=U.next())Y=X.value,Y.audio&&""===Y.audio.codecs&&O.push(Y.audio.createSegmentIndex()),Y.video&&""===Y.video.codecs&&O.push(Y.video.createSegmentIndex());return D(Aa,Promise.all(O),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.G);if(1==f.length){Da=[];Ja=f[0];lb=u([Ja.video,Ja.audio]);for(La=lb.next();!La.done;La=lb.next())(ab=La.value)&&!ab.segmentIndex&&Da.push(ab.createSegmentIndex());
|
|
973
973
|
if(0<Da.length)return D(Aa,Promise.all(Da),0)}Aa.B(0)}})}
|
|
974
|
-
function yv(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J;return L(function(I){switch(I.g){case 1:d=Zu(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return I.return(d);e=b.segments[0];f=Lu(c(),e.h);g=f[0];h=new ib(g);k=h.jb.split(".").pop();if(l=Lv[k])return I.return(Zu(l));m=
|
|
974
|
+
function yv(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J;return L(function(I){switch(I.g){case 1:d=Zu(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return I.return(d);e=b.segments[0];f=Lu(c(),e.h);g=f[0];h=new ib(g);k=h.jb.split(".").pop();if(l=Lv[k])return I.return(Zu(l));m=Ag;n=null;r=Mv(a,b,e.g,c);a.S.clear();if(!r){I.B(2);break}p=sl(r.ka(),r.Mb(),r.Jb(),a.g.retryParameters);return D(I,Nv(a,p,m,{type:0}),3);case 3:t=I.h,n=t.data;case 2:w=0;y=null;if(z=Ju(e.g,"EXT-X-BYTERANGE"))v=
|
|
975
975
|
u(Ov(null,z.value)),w=v.next().value,y=v.next().value;B=sl(f,w,y,a.g.retryParameters);return D(I,Nv(a,B,m,{type:1}),4);case 4:A=I.h;(C=A.headers["content-type"])&&(C=C.split(";")[0].toLowerCase());if("ts"==k||"video/mp2t"==C){var G=A.data;var H=Fb(G);H=(new nj).parse(H);var K=H.Gd();H=H.ag();var M=[],P=!1,O=!1;switch(K.audio){case "aac":case "aac-loas":M.push("mp4a.40.2");P=!0;break;case "mp3":M.push("mp4a.40.34");P=!0;break;case "ac3":M.push("ac-3");P=!0;break;case "ec3":M.push("ec-3");P=!0;break;
|
|
976
976
|
case "opus":M.push("opus"),P=!0}switch(K.video){case "avc":H.ab?M.push(H.ab):M.push("avc1.42E01E");O=!0;break;case "hvc":H.ab?M.push(H.ab):M.push("hvc1.1.6.L93.90");O=!0;break;case "av1":M.push("av01.0.01M.08"),O=!0}if(M.length){K=P&&!O;P=new Map;if(O){O=new ud("video/mp2t");O.i(G);G=u(O.j());for(var U=G.next();!U.done;U=G.next())U=U.value,P.set(U,U);O.g()}H={type:K?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,
|
|
977
977
|
closedCaptions:P,Qg:null}}else H=null;if(E=H)return I.return(E)}else if("mp4"==k||"cmfv"==k||"m4s"==k||"fmp4"==k||"video/mp4"==C||"audio/mp4"==C||"video/iso.segment"==C)if(J=$u(n,A.data))return I.return(J);return I.return(d)}})}
|
|
978
|
-
function nv(a){if(iv(a)){if(a.oa==Pv){for(var b,c=b=Infinity,d=u(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Yb),c=Math.min(c,e.Dc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.u);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.$e(b)}}else a.l.
|
|
979
|
-
c.h&&a.l.Ph(c.h);a.l.Ge()}function zv(a,b){var c=(new ib(a.X)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"QUERYPARAM");d&&f&&(a.
|
|
980
|
-
function pv(a,b,c){c=(new ib(c)).g;var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=W(f,"NAME"),h=W(f,"VALUE");e=W(f,"QUERYPARAM");f=W(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.
|
|
978
|
+
function nv(a){if(iv(a)){if(a.oa==Pv){for(var b,c=b=Infinity,d=u(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Yb),c=Math.min(c,e.Dc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.u);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.$e(b)}}else a.l.yb(Qv(a));if(!a.l.s)for(b=u(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
979
|
+
c.h&&a.l.Ph(c.h);a.l.Ge()}function zv(a,b){var c=(new ib(a.X)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
980
|
+
function pv(a,b,c){c=(new ib(c)).g;var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=W(f,"NAME"),h=W(f,"VALUE");e=W(f,"QUERYPARAM");f=W(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
|
|
981
981
|
function Cv(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"AUDIO");c=W(d,"VIDEO");var f=W(d,"SUBTITLES");d=Rv(a,d);if(f){var g=Gc(Ic,d);a.I.set(f,g);Ad(d,g)}e&&(f=Gc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=Gc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}}
|
|
982
|
-
function Av(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"DATA-ID");c=W(d,"URI");var f=W(d,"LANGUAGE");d=W(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Lu([a.X],c,a.
|
|
982
|
+
function Av(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"DATA-ID");c=W(d,"URI");var f=W(d,"LANGUAGE");d=W(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Lu([a.X],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new Q("sessiondata",e);if(a.i)a.i.onEvent(c)}}
|
|
983
983
|
function Bv(a,b){var c,d,e,f,g,h;return L(function(k){if(!a.i||!a.g)return k.return();d=u(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=W(f,"PATHWAY-ID"),h=W(f,"SERVER-URI"),g&&h){a.j=new jt(a.i);a.j.configure(a.g);a.j.i=[a.X];a.j.setManifestType("HLS");a.j.h=g;c=kt(a.j,h);break}return D(k,c,0)})}
|
|
984
984
|
function Fv(a,b){var c=Iu(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Sv(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=u(c);for(var d=c.next();!d.done;d=c.next()){var e=Eu(d.value,"GROUP-ID");if(d=a.I.get(e))if(e=a.J.get(e)){e=u(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Tv(Ic,d)||Uv(Ic),Vv(f.stream)}}return b.filter(function(g){return g})}
|
|
985
985
|
function Vv(a){a.fullMimeTypes=new Set([ke(a.mimeType,a.codecs)])}
|
|
@@ -995,7 +995,7 @@ r=W(c,"NAME"),p=dw(c),ew(c),n=W(c,"CHARACTERISTICS"),w=fw(c));a=gw(a,b,h,k,m,r,p
|
|
|
995
995
|
function Rv(a,b){var c=W(b,"CODECS")||"";b=W(b,"SUPPLEMENTAL-CODECS");a.aa=0<c.length;a.aa||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return av(a)}function dw(a){return(a=W(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
996
996
|
function fw(a){return(a=W(a,"SAMPLE-RATE"))?parseInt(a,10):null}function ew(a){return(a=W(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
997
997
|
function cw(a,b,c,d,e,f,g,h,k,l,m){for(var n=u(c),r=n.next();!r.done;r=n.next())Iv(r.value.stream,e,f,g,h,k);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=u(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=u(c),h=g.next();!h.done;h=g.next()){var p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;r=p?p.stream.drmInfos:null;p=p?p.ka().sort().join(","):"";var t=f?f.ka().sort().join(","):
|
|
998
|
-
"";p=p+" - "+t;h&&k&&!
|
|
998
|
+
"";p=p+" - "+t;h&&k&&!ki(n,r)||a.Ka.has(p)||(h={id:a.A++,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.Ka.add(p))}return e}
|
|
999
999
|
function Dv(a,b){b=Iu(b,"CLOSED-CAPTIONS");b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"LANGUAGE");c=Oc(e||"und");e||(e=W(d,"NAME"))&&(c=e);e=Eu(d,"GROUP-ID");d=Eu(d,"INSTREAM-ID").replace("SERVICE","svc");a.H.get(e)||a.H.set(e,new Map);a.H.get(e).set(d,c)}}
|
|
1000
1000
|
function Sv(a,b,c){for(var d=[],e=[],f=new Map,g=u(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Eu(k,"URI");k=Eu(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Eu(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Ic);if(k==Ic)b=W(h,"CODECS")||"";else{e=u(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.h.has(e))return a.h.get(e);l=a.A++;if(a.j){f=u(f);for(var m=f.next();!m.done;m=f.next()){var n=u(m.value);
|
|
1001
1001
|
m=n.next().value;n=n.next().value;(m=c.get(m))&&nt(a.j,l,m,n)}}c=W(h,"LANGUAGE");f=W(h,"NAME");m="YES"==W(h,"DEFAULT");n="audio"==k?dw(h):null;var r="audio"==k?ew(h):!1,p=W(h,"CHARACTERISTICS"),t="YES"==W(h,"FORCED");h="audio"==k?fw(h):null;d=Xv(a,l,d,b,k,c,m,f,n,null,p,t,h,r);d.stream&&(d.stream.groupId=g);a.J.has(g)?a.J.get(g).push(d):a.J.set(g,[d]);a.h.set(e,d);return d}
|
|
@@ -1004,7 +1004,7 @@ Number(m.split("x")[1]));if(n=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.
|
|
|
1004
1004
|
function gw(a,b,c,d,e,f,g,h,k){for(var l=a.A++,m=[],n=u(b),r=n.next();!r.done;r=n.next()){var p=r.value;r=Eu(p,"URI");p=W(p,"PATHWAY-ID");a.j&&p&&nt(a.j,l,p,r);m.push(r)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=W(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.H.get(b);break a}if(!b&&a.H.size)for(b=u(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=Fc(d,c);d=Xv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
|
|
1005
1005
|
function Xv(a,b,c,d,e,f,g,h,k,l,m,n,r,p){function t(C){var E,J,I,G,H,K,M,P,O,U,X,Y,Da,Ja,lb,La,ab;return L(function(Aa){switch(Aa.g){case 1:return E=v.ka(),D(Aa,gv(a,v.ka(),!0),2);case 2:J=Aa.h;if(C.aborted)return Aa.return();I=J.uri;I==J.originalUri||E.includes(I)||z.push(I);G=Su(a.Fa,J.data);H=void 0;if(a.aa||!a.g.hls.disableCodecGuessing){Aa.B(3);break}return D(Aa,yv(a,G,w),4);case 4:K=Aa.h,H=K.mimeType,d=K.codecs;case 3:return M=iv(a),D(Aa,Hv(a,0,G,w,I,d,e,f,g,h,k,l,m,n,r,p,H),5);case 5:P=Aa.h;
|
|
1006
1006
|
if(C.aborted)return Aa.return();O=P.stream;iv(a)&&!M&&Jv(a,G);v.Dc=P.Dc;v.Yb=P.Yb;v.qe=P.qe;v.pe=P.pe;v.Ld=P.Ld;v.Ie=P.Ie;v.Bb=P.Bb;v.Cb=P.Cb;v.lg=!0;y.segmentIndex=O.segmentIndex;y.encrypted=O.encrypted;y.drmInfos=O.drmInfos;y.keyIds=O.keyIds;y.mimeType=O.mimeType;y.bandwidth=y.bandwidth||O.bandwidth;y.codecs=y.codecs||O.codecs;Vv(y);y.drmInfos.length&&a.i.newDrmInfo(y);U=Kc;if(e==U.va||e==U.Z)for(X=u(a.h.values()),Y=X.next();!Y.done;Y=X.next())Da=Y.value,Da.lg||Da.type!=e||(Da.stream.mimeType=O.mimeType,
|
|
1007
|
-
Vv(Da.stream));e==U.Ca&&(Ja=O.segmentIndex.get(0))&&Ja.ua&&(y.mimeType="application/mp4",Vv(y));hw(a)&&(a.$a?Kv(a,[v]):(a.$a=!0,lb=Array.from(a.h.values()),La=lb.filter(function(tb){return tb.stream.segmentIndex}),Kv(a,La),nv(a),ab=a.m,0<ab&&a.u.V(ab)));F(Aa)}})}function w(){return a.j&&1<c.length?ot(a.j,b):z.concat(Mu([a.X],c,a.
|
|
1007
|
+
Vv(Da.stream));e==U.Ca&&(Ja=O.segmentIndex.get(0))&&Ja.ua&&(y.mimeType="application/mp4",Vv(y));hw(a)&&(a.$a?Kv(a,[v]):(a.$a=!0,lb=Array.from(a.h.values()),La=lb.filter(function(tb){return tb.stream.segmentIndex}),Kv(a,La),nv(a),ab=a.m,0<ab&&a.u.V(ab)));F(Aa)}})}function w(){return a.j&&1<c.length?ot(a.j,b):z.concat(Mu([a.X],c,a.s))}var y=iw(a,d,e,f,g,h,k,l,m,n,r,p),z=[],v={stream:y,type:e,Ih:z,ka:w,Dc:0,Yb:0,Ie:new Map,qe:!1,pe:!1,Ld:!1,Gf:-1,Bb:-1,Cb:-1,lg:!1},B=null,A=new AbortController;y.createSegmentIndex=
|
|
1008
1008
|
function(){if(B)return B;A=new AbortController;return B=new Promise(function(C){C(t(A.signal))})};y.closeSegmentIndex=function(){B&&!y.segmentIndex&&A.abort();y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null);B=null};return v}function Qv(a){var b=Infinity;a=u(a.h.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.Yb));return b}
|
|
1009
1009
|
function kv(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Tc(function(e){c.push(e)});a.l.Td(c)}function Kv(a,b){if(!iv(a))for(var c=Qv(a),d=u(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Sc(0,c);kv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?uv(a,b):(xv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&uv(a,b))}
|
|
1010
1010
|
function vv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function hw(a){if(!a.G)return!1;var b=[],c=[];a=u(a.G.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}
|
|
@@ -1017,13 +1017,13 @@ Vv(a);return a}
|
|
|
1017
1017
|
function qv(a,b,c,d,e){var f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G,H,K,M,P,O,U,X;return L(function(Y){switch(Y.g){case 1:f=new Map;if(b.segments)for(g=u(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Hu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Mv(a,b,k.g,d,e),n=u(l),r=n.next();!r.done;r=n.next())p=r.value,f.set(p,m);w=t=!1;y=[];z=new Set;v=u(f);B=v.next();case 2:if(B.done){Y.B(4);break}A=B.value;C=u(A);E=C.next().value;J=C.next().value;I=E;G=J;H=Eu(I,"METHOD");if("NONE"==H){Y.B(3);break}t=
|
|
1018
1018
|
!0;K=W(I,"KEYFORMAT")||"identity";M=null;if(Zv(H)){w=!0;Y.B(3);break}if("identity"!=K){M=(P=$v[K])?P(I,c):null;Y.B(6);break}return D(Y,aw(a,I,c,d,G,e),8);case 8:M=Y.h;case 6:if(M){if(M.keyIds)for(O=u(M.keyIds),U=O.next();!U.done;U=O.next())X=U.value,z.add(X);y.push(M)}case 3:B=v.next();Y.B(2);break;case 4:return Y.return({drmInfos:y,keyIds:z,encrypted:t,mi:w})}})}
|
|
1019
1019
|
function lw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new R(2,4,4042);var f=0,g=W(b,"IV","");if(g){var h=zc(g.substr(2));if(16!=h.byteLength)throw new R(2,4,4048);}else f=Ku(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.Y.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Eu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1020
|
-
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,r,p,t,w;return L(function(y){if(1==y.g)return l=Lu(d(),Eu(b,"URI"),e),m=l.sort().join(""),a.$.has(m)||(n=
|
|
1020
|
+
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,r,p,t,w;return L(function(y){if(1==y.g)return l=Lu(d(),Eu(b,"URI"),e),m=l.sort().join(""),a.$.has(m)||(n=ug(l,a.g.retryParameters),r=Nv(a,n,6),a.$.set(m,r)),D(y,a.$.get(m),2);if(3!=y.g){p=y.h;if(!p.data||p.data.byteLength!=k.bitsKey/8)throw new R(2,4,4049);t={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};w=k;return D(y,window.crypto.subtle.importKey("raw",p.data,t,!0,["decrypt"]),3)}w.cryptoKey=y.h;k.fetchKey=void 0;
|
|
1021
1021
|
F(y)})};a.Y.set(c,k)}return a.Y.get(c)}
|
|
1022
1022
|
function tv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Ju(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Ju(b.g,"EXT-X-TARGETDURATION");if(!d)throw new R(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Ju(b.g,"EXT-X-PART-INF"))a.M=Number(Eu(e,"PART-TARGET"));b=Ju(b.g,"EXT-X-SERVER-CONTROL");a.F&&a.M?(a.m=a.Za?5*a.M<=c?Math.min(a.M,a.m):Math.min(c,a.m):Math.min(a.M,a.m),a.ra=b?Number(Eu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1023
1023
|
Du(b,"HOLD-BACK"):null,a.qa=c?Number(c.value):0);a.Ja=Math.max(d,a.Ja)}function Jv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ra)b=a.ra;else if(a.qa)b=a.qa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Ja*c}a.l.Rh(0);a.l.Dg(b);a.l.gd(!1)}
|
|
1024
1024
|
function Mv(a,b,c,d,e){var f=Ju(c,"EXT-X-MAP");if(!f)return null;var g=Eu(f,"URI"),h=Lu(d(),g,e);g=[h.toString(),W(f,"BYTERANGE","")].join("-");if(!a.S.has(g)){var k=void 0,l=null;c=u(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Zv(Eu(m,"METHOD"))&&m.id<f.id&&(k=lw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=mw(h,f,l,k);a.S.set(g,b)}return a.S.get(g)}
|
|
1025
1025
|
function mw(a,b,c,d){var e=0,f=null;b=W(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 Ai(function(){return a},e,f,null,null,null,d)}
|
|
1026
|
-
function nw(a,b,c,d,e,f,g,h,k){var l=d.g,m=Ju(l,"EXTINF"),n=0,r=0,p=null;d.Ob.length&&!a.F&&Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var t=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Ju(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(t=
|
|
1026
|
+
function nw(a,b,c,d,e,f,g,h,k){var l=d.g,m=Ju(l,"EXTINF"),n=0,r=0,p=null;d.Ob.length&&!a.F&&Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var t=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Ju(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(t=nh(w.value))}var y=Di;Ju(l,"EXT-X-GAP")&&(y=2);if(!m){if(0==d.Ob.length)throw new R(2,4,4024,"EXTINF");
|
|
1027
1027
|
if(!a.F)return null}var z=[];w=!1;var v=null,B=!1,A=!1;if(a.F&&d.Ob.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=t,E={},J=0;J<d.Ob.length;E={vd:E.vd,ge:E.ge},J++){var I=d.Ob[J],G=0==J?c:z[z.length-1],H=0==J?e:G.endTime,K=Number(W(I,"DURATION"))||a.M;if(K){var M=H+K,P=0,O=null;"EXT-X-PRELOAD-HINT"==I.name?(P=(P=W(I,"BYTERANGE-START"))?Number(P):0,(G=W(I,"BYTERANGE-LENGTH"))?O=P+Number(G)-1:P&&(O=Number.MAX_SAFE_INTEGER)):
|
|
1028
1028
|
(P=W(I,"BYTERANGE"),O=u(Ov(G,P)),P=O.next().value,O=O.next().value);E.ge=W(I,"URI");if(E.ge){G=Di;"YES"==W(I,"GAP")&&(G=2,B=!0);E.vd=null;var U=function(Y){return function(){null==Y.vd&&(Y.vd=Lu(h(),Y.ge,f));return Y.vd}}(E);n&&0<=P&&null!=O&&(v=U,w=!0);H=new Ci(H,M,U,P,O,b,0,0,Infinity,[],"",null,C,G,k);"EXT-X-PRELOAD-HINT"==I.name&&(H.mg(),A=!0);"YES"!=W(I,"INDEPENDENT")&&0<J&&H.He();z.push(H);C&&(C+=K)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
|
|
1029
1029
|
1].endTime;else return null;w&&(B||0!=z[0].Ta?(w=!1,v=null):z=[]);(m=Ju(l,"EXT-X-BYTERANGE"))?(p=u(Ov(c,m.value)),r=p.next().value,p=p.next().value):z.length&&(r=z[0].Ta,p=z[z.length-1].za);c="";m=null;"image"==g.type&&(c="1x1",g=Ju(l,"EXT-X-TILES"))&&(c=Eu(g,"LAYOUT"),(g=W(g,"DURATION"))&&(m=Number(g)));var X=null;b=new Ci(e,n,function(){if(v)return v();null==X&&(X=Lu(h(),d.h,f));return X||[]},r,p,b,0,0,Infinity,z,c,m,t,y,k,0<z.length&&!!d.h);w&&(a.Za=!0,b.Bh(),A&&b.mg());return b}
|
|
@@ -1033,17 +1033,17 @@ k=lw(a,C,b,f,e):k=void 0);d.set(p,B);A=Mv(a,b,v.g,f,e);!a.F&&a.i.isAutoLowLatenc
|
|
|
1033
1033
|
b*1E3));if(n=w.some(function(E){return null!=E.h}))for(c={},d=0;d<w.length;c={nd:c.nd,md:c.md,ae:c.ae,bc:c.bc,jd:c.jd},d++)if(c.bc=w[d],null==c.bc.h)for(c.md=0,c.nd=d,e=function(E){return function(){var J=w[E.nd];if(J){if(null!=J.h)return J.h+E.md;E.md-=J.endTime-J.startTime;E.nd+=1}return null}}(c),c.jd=0,c.ae=d,f=function(E){return function(){var J=w[E.ae];if(J){J!=E.bc&&(E.jd+=J.endTime-J.startTime);if(null!=J.h)return J.h+E.jd;--E.ae}return null}}(c);null==c.bc.h;)c.bc.h=f(),null==c.bc.h&&(c.bc.h=
|
|
1034
1034
|
e());if(n)for(c=u(w),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=u(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.P;if(n&&Infinity!=c&&!vv(a,g))for(a=u(w),d=a.next();!d.done;d=a.next())d.value.Kg(c);return{segments:w,bandwidth:b}}function Tv(a,b){if(a==Ic){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"}
|
|
1035
1035
|
function Uv(a){return a==Ic?"text/vtt":ow[a].mp4}
|
|
1036
|
-
function kw(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,w,y,z,v;return L(function(B){switch(B.g){case 1:g=
|
|
1037
|
-
Nv(a,w,g,{type:t}),6);case 6:v=B.h,p=v.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(Uv(b))}})}function Iv(a,b,c,d,e,f){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)}function gv(a,b,c){return Nv(a,
|
|
1036
|
+
function kw(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,w,y,z,v;return L(function(B){switch(B.g){case 1:g=Ag;h=Math.trunc((d.segments.length-1)/2);k=Lu(f(),d.segments[h].h,e);l=new ib(k[0]);m=l.jb.split(".").pop();n=ow[b];if((r=n[m])||(r=Lv[m])||(r=Tv(b,c)))return B.return(r);t=1;w=ug(k,a.g.retryParameters);ra(B,2);w.method="HEAD";return D(B,Nv(a,w,g,{type:t}),4);case 4:y=B.h;p=y.headers["content-type"];ta(B,3);break;case 2:z=ua(B);if(!z||1002!=z.code&&1001!=z.code){B.B(3);break}w.method="GET";return D(B,
|
|
1037
|
+
Nv(a,w,g,{type:t}),6);case 6:v=B.h,p=v.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(Uv(b))}})}function Iv(a,b,c,d,e,f){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)}function gv(a,b,c){return Nv(a,ug(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1038
1038
|
function ev(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return D(h,a.update(),4);case 4:c=Date.now();iv(a)&&(d=(c-b)/1E3,a.Ua.sample(1,d),e=a.m,f=Math.max(0,e-cd(a.Ua)),a.u.V(f));ta(h,3);break;case 2:g=ua(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.u.V(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();F(h)}})}
|
|
1039
1039
|
function iv(a){return a.oa!=fv}function mv(a,b){a.oa=b;a.l&&a.l.gd(!iv(a));iv(a)||a.u.stop()}function Nv(a,b,c,d){if(!a.O)throw new R(2,7,7001);b=a.i.networkingEngine.request(c,b,d);og(a.O,b);return b.promise}function Zv(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1040
|
-
function aw(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,w,y,z,v,B,A;return L(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new R(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new R(2,4,4041);g=Eu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=Lu(d(),Eu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ac(yc(k[0].split("data:text/plain;base64,").pop()));C.B(2);break}m=k.sort().join("");a.sa.has(m)||(n=
|
|
1041
|
-
r));return D(C,a.sa.get(m),3);case 3:p=C.h,l=Ac(p.data);case 2:t="00000000000000000000000000000000";if(!e){C.B(4);break}if(a.ma.has(e)){w=a.ma.get(e);C.B(5);break}y=sl(e.ka(),e.Mb(),e.Jb(),a.g.retryParameters);z=
|
|
1040
|
+
function aw(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,w,y,z,v,B,A;return L(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new R(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new R(2,4,4041);g=Eu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=Lu(d(),Eu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ac(yc(k[0].split("data:text/plain;base64,").pop()));C.B(2);break}m=k.sort().join("");a.sa.has(m)||(n=ug(k,a.g.retryParameters),r=Nv(a,n,6),a.sa.set(m,
|
|
1041
|
+
r));return D(C,a.sa.get(m),3);case 3:p=C.h,l=Ac(p.data);case 2:t="00000000000000000000000000000000";if(!e){C.B(4);break}if(a.ma.has(e)){w=a.ma.get(e);C.B(5);break}y=sl(e.ka(),e.Mb(),e.Jb(),a.g.retryParameters);z=Ag;return D(C,Nv(a,y,z,{type:0}),6);case 6:v=C.h,w=cv(v.data),a.ma.set(e,w);case 5:w&&(t=w);case 4:return B=new Map,B.set(t,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),C.return(Ec(B,A))}})}N("shaka.hls.HlsParser",dv);
|
|
1042
1042
|
var Lv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},ow={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",
|
|
1043
1043
|
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"}},$v={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new R(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new R(2,4,4041);a=Eu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Dc("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
|
|
1044
1044
|
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Eu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Eu(a,"URI");b=Yu(b);b=Fb(b.data);c=Dc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Eu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
|
|
1045
|
-
b&&(c="cbcs");a=Eu(a,"URI");a=Yu(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=
|
|
1046
|
-
function rw(a){a=yc(
|
|
1045
|
+
b&&(c="cbcs");a=Eu(a,"URI");a=Yu(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vg(a,b,new Set,0);return Dc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},fv="VOD",jw="EVENT",Pv="LIVE",lv={ii:fv,Bk:jw,Jk:Pv};vi["application/x-mpegurl"]=function(){return new dv};vi["application/vnd.apple.mpegurl"]=function(){return new dv};function pw(a){var b=0,c=Kb(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function qw(a){if(a=rw(a))a:{a=u(gh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=hh(b.value,"LA_URL")){a=eh(b);break a}a=""}else a="";return a}
|
|
1046
|
+
function rw(a){a=yc(eh(a));a=pw(a).filter(function(b){return b.type===sw})[0];if(!a)return null;a=oc(a.value,!0);return(a=Xg(a,"WRMHEADER"))?a:null}var sw=1,tw=(new Map).set("com.microsoft.playready",qw).set("com.microsoft.playready.recommendation",qw).set("com.microsoft.playready.software",qw).set("com.microsoft.playready.hardware",qw);function uw(a){if(!Hw){Hw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Iw=Jw("ftyp",b,d,b,c);b=Jw("dref",Kw);Lw=Jw("dinf",b)}this.g=a}
|
|
1047
1047
|
function Mw(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Jw;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/(Nw+1));m=Math.floor(m%(Nw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Ow(h,4)),[0,0,0,0],x(Ow(n,4)),x(Ow(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Ow(k,2)),[0,0],x(Ow(l,
|
|
1048
1048
|
2)),[0,0]));h=Jw("tkhd",h);k=Jw;n=g.duration*g.timescale;l=Math.floor(n/(Nw+1));n=Math.floor(n%(Nw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Ow(g.timescale,4)),x(Ow(l,4)),x(Ow(n,4)),x(Ow(m,2)),[0,0]));l=Jw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Pw;break;case "audio":m=Qw}n=Jw("hdlr",m);a:{switch(g.type){case "video":g=Jw("minf",Jw("vmhd",Rw),Lw,Sw(g));break a;
|
|
1049
1049
|
case "audio":g=Jw("minf",Jw("smhd",Tw),Lw,Sw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Bc.apply(vc,x(b));f=a.g[0];c=Jw;d=f.duration*f.timescale;e=Math.floor(d/(Nw+1));d=Math.floor(d%(Nw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Ow(f.timescale,4)),x(Ow(e,4)),x(Ow(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,
|
|
@@ -1058,39 +1058,39 @@ a=Jw(d,Xw(a),c,e)}c=a}a=Jw("stsd",Yw,c);return b("stbl",a,Jw("stts",Zw),Jw("stsc
|
|
|
1058
1058
|
function Ww(a){var b=Jw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(Ow(d,4))));c=Jw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Jw("schm",d);e=Jw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=u(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=u(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Uw(h.value)}a=new Uint8Array([0,
|
|
1059
1059
|
0,0,0,0,0,1,8]);f=Jw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1060
1060
|
function cx(a){var b=[];a=u(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Jw;var g=new Uint8Array([0,0,0,0].concat(x(Ow(c.data?c.data.Db:0,4))));g=Jw("mfhd",g);var h;var k=c.data?c.data.ob:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.eb<<4|m.hb<<2|m.gb}k=Jw("sdtp",l);var n=k.length+92;l=Jw;h=new Uint8Array([0,0,0,58].concat(x(Ow(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Jw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1061
|
-
0;var r=Math.floor(m%(Nw+1));m=new Uint8Array([1,0,0,0].concat(x(Ow(Math.floor(m/(Nw+1)),4)),x(Ow(r,4))));m=Jw("tfdt",m);var p=n;n=c.data?c.data.ob:[];r=n.length;var t=12+16*r,w=new Uint8Array(t);p+=8+t;w.set(["video"===c.type?1:0,0,15,1].concat(x(Ow(r,4)),x(Ow(p,4))),0);for(p=0;p<r;p++){var y=n[p];t=Ow(y.duration,4);var z=Ow(y.size,4),v=y.flags;y=Ow(y.
|
|
1061
|
+
0;var r=Math.floor(m%(Nw+1));m=new Uint8Array([1,0,0,0].concat(x(Ow(Math.floor(m/(Nw+1)),4)),x(Ow(r,4))));m=Jw("tfdt",m);var p=n;n=c.data?c.data.ob:[];r=n.length;var t=12+16*r,w=new Uint8Array(t);p+=8+t;w.set(["video"===c.type?1:0,0,15,1].concat(x(Ow(r,4)),x(Ow(p,4))),0);for(p=0;p<r;p++){var y=n[p];t=Ow(y.duration,4);var z=Ow(y.size,4),v=y.flags;y=Ow(y.rb,4);w.set([].concat(x(t),x(z),[v.ub<<2|v.eb,v.hb<<6|v.gb<<4|v.vb,v.cb&61440,v.cb&15],x(y)),12+16*p)}n=Jw("trun",w);k=l("traf",h,m,n,k);f=f("moof",
|
|
1062
1062
|
g,k);e.call(d,b,[f,dx(c)])}return Bc.apply(vc,x(b))}function dx(a){a=(a.data?a.data.ob:[]).map(function(b){return b.data});a=Bc.apply(vc,x(a));return Jw("mdat",a)}function Ow(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Uw(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}
|
|
1063
1063
|
function Jw(a){var b=Fa.apply(1,arguments),c=ex[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],ex[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}
|
|
1064
1064
|
var Hw=!1,Nw=Math.pow(2,32)-1,ex={},Pw=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]),Qw=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]),Zw=new Uint8Array([0,0,0,0,0,0,0,0]),$w=new Uint8Array([0,0,0,0,0,0,0,0]),bx=new Uint8Array([0,0,0,0,0,0,0,0]),ax=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Rw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Tw=new Uint8Array([0,
|
|
1065
|
-
0,0,0,0,0,0,0]),Yw=new Uint8Array([0,0,0,0,0,0,0,1]),Iw=new Uint8Array([]),Kw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Lw=new Uint8Array([]);function fx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.F=new bd(5);this.
|
|
1066
|
-
function gx(a){var b;L(function(c){switch(c.g){case 1:return ra(c,2),D(c,hx(a),4);case 4:ta(c,3);break;case 2:b=ua(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();F(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.
|
|
1065
|
+
0,0,0,0,0,0,0]),Yw=new Uint8Array([0,0,0,0,0,0,0,1]),Iw=new Uint8Array([]),Kw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Lw=new Uint8Array([]);function fx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.F=new bd(5);this.s=new Ob(function(){gx(a)});this.A=new ng;this.m=new Map}q=fx.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return L(function(d){if(1==d.g)return c.l=[a],c.h=b,D(d,hx(c),2);if(!c.h)throw new R(2,7,7001);return d.return(c.j)})};
|
|
1066
|
+
function gx(a){var b;L(function(c){switch(c.g){case 1:return ra(c,2),D(c,hx(a),4);case 4:ta(c,3);break;case 2:b=ua(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();F(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.A.destroy()};
|
|
1067
1067
|
q.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),D(c,hx(a),4);if(2!=c.g)return ta(c,0);b=ua(c);if(!a.h||!b)return c.return();a.h.onError(b);F(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};
|
|
1068
|
-
function hx(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=
|
|
1069
|
-
l);n(m);m=rc(m.outerHTML)}var r=
|
|
1070
|
-
"Duration",
|
|
1071
|
-
v[4],v[7],v[6]].concat(x(v.slice(8))));v=Ac(v);break a}v=null}else v=null;B=yc(
|
|
1072
|
-
|
|
1068
|
+
function hx(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=ug(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),og(a.A,e),D(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!=lm){nd("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=$t(m,"SmoothStreamingMedia");if(!m)throw new R(2,4,4046,
|
|
1069
|
+
l);n(m);m=rc(m.outerHTML)}var r=Wg(m,"SmoothStreamingMedia");if(!r)throw new R(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=mm&&l(r);a.i||(a.i=new sk(null,0));if(l=kh(r,"IsLive",wh,!1))throw new R(2,4,4047);a.i.gd(!l);n=kh(r,"TimeScale",uh,1E7);m=kh(r,"DVRWindowLength",uh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=kh(r,"CanSeek",wh,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.$e(p);m=kh(r,
|
|
1070
|
+
"Duration",uh,Infinity);l||a.i.yb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=dh(r,"Protection");var t;n=a.g.mss.keySystemsBySystemId;m=[];p=u(p);for(t=p.next();!t.done;t=p.next())m=m.concat(dh(t.value,"ProtectionHeader"));if(m.length){p=[];for(t=0;t<m.length;t++){var w=m[t],y=w.attributes.SystemID.toLowerCase(),z=n[y];if(z){var v=rw(w);if(v)a:{v=u(gh(v,"DATA"));for(var B=v.next();!B.done;B=v.next())if(B=hh(B.value,"KID")){v=yc(eh(B));v=new Uint8Array([v[3],v[2],v[1],v[0],v[5],
|
|
1071
|
+
v[4],v[7],v[6]].concat(x(v.slice(8))));v=Ac(v);break a}v=null}else v=null;B=yc(eh(w));y=zc(y.replace(/-/g,""));y=[{initData:Vg(B,y,new Set,0),initDataType:"cenc",keyId:v}];y=Dc(z,"cenc",y);v&&y.keyIds.add(v);if(z=tw.get(z))y.licenseServerUri=z(w);p.push(y)}}n=p}else n=[];t=n;p=[];n=[];m=[];r=dh(r,"StreamIndex");r=u(r);for(w=r.next();!w.done;w=r.next()){w=w.value;z=dh(w,"QualityLevel");y=l.timescale;v=l.duration;B=dh(w,"c");for(var A=[],C=0,E=0;E<B.length;++E){var J=B[E],I=B[E+1],G=kh(J,"t",uh),H=
|
|
1072
|
+
kh(J,"d",uh);J=kh(J,"r",sh);if(!H)break;G=null!=G?G:C;J=J||0;if(0>J)if(I){I=kh(I,"t",uh);if(null==I)break;else if(G>=I)break;J=Math.ceil((I-G)/H)-1}else{if(Infinity==v)break;else if(G/y>=v)break;J=Math.ceil((v*y-G)/H)-1}for(I=0;I<=J;++I)C=G+H,A.push({start:G/y,end:C/y,Pg:G}),G=C}y=A;z=u(z);for(v=z.next();!v.done;v=z.next())(v=ix(a,w,v.value,y,t,l))&&("audio"!=v.type||a.g.disableAudio?"video"!=v.type||a.g.disableVideo?v.type!=Ic||a.g.disableText||m.push(v):n.push(v):p.push(v))}r=[];p=u(0<p.length?
|
|
1073
1073
|
p:[null]);for(t=p.next();!t.done;t=p.next())for(t=t.value,w=u(0<n.length?n:[null]),v=w.next();!v.done;v=w.next())z=r,y=z.push,v=v.value,B=0,t&&t.bandwidth&&0<t.bandwidth&&(B+=t.bandwidth),v&&v.bandwidth&&0<v.bandwidth&&(B+=v.bandwidth),v={id:a.u++,language:t?t.language:"und",disabledUntilTime:0,primary:!!t&&t.primary||!!v&&v.primary,audio:t,video:v,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},y.call(z,v);l.variants=r;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
|
|
1074
1074
|
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},a.i.Ge());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.F.sample(1,h);F(k)})}
|
|
1075
|
-
function ix(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Ua("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=
|
|
1075
|
+
function ix(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Ua("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=kh(c,"Bitrate",th),m=kh(c,"MaxWidth",th),n=kh(c,"MaxHeight",th),r=kh(c,"Channels",th),p=kh(c,"SamplingRate",th),t=f.duration;d.length&&(t=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.yb(Math.min(t,w));var y={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1076
1076
|
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:Oc(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:r,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],
|
|
1077
1077
|
mssPrivateData:{duration:t,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=jx[e])&&y.roles.push(e),"main"===e&&(y.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 Ua('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!kx.includes(e.toUpperCase()))return Ua("Codec not supported:",
|
|
1078
1078
|
e),null;c=lx(c,g,e,y);y.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;y.type="audio";y.mimeType="mss/audio/mp4";y.codecs=mx(e,c);break;case "video":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;y.type="video";y.mimeType="mss/video/mp4";y.codecs=nx(c);break;case "text":if(y.type=Ic,y.mimeType="application/mp4","TTML"===e||"DFXP"===e)y.codecs="stpp"}y.fullMimeTypes.add(ke(y.mimeType,y.codecs));
|
|
1079
|
-
y.createSegmentIndex=function(){if(y.segmentIndex)return Promise.resolve();if(a.m.has(y.id))var z=a.m.get(y.id);else z=[],"video"==y.type&&(z=y.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:y.id,type:y.type,codecs:y.codecs,encrypted:y.encrypted,timescale:y.mssPrivateData.timescale,duration:y.mssPrivateData.duration,pb:z,wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:null,stream:y},z=Mw(new
|
|
1079
|
+
y.createSegmentIndex=function(){if(y.segmentIndex)return Promise.resolve();if(a.m.has(y.id))var z=a.m.get(y.id);else z=[],"video"==y.type&&(z=y.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:y.id,type:y.type,codecs:y.codecs,encrypted:y.encrypted,timescale:y.mssPrivateData.timescale,duration:y.mssPrivateData.duration,pb:z,wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:null,stream:y},z=Mw(new uw([z])),a.m.set(y.id,z);z=ox(a,new Ai(function(){return[]},0,null,null,void 0,
|
|
1080
1080
|
z),y,b,d);y.segmentIndex=new Ok(z);return Promise.resolve()};y.closeSegmentIndex=function(){y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null)};return y}
|
|
1081
1081
|
function lx(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;
|
|
1082
1082
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function mx(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 nx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1083
1083
|
function ox(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=u(e);for(var h=e.next();!h.done;g={ud:g.ud},h=e.next())g.ud=h.value,d.push(new Ci(g.ud.start,g.ud.end,function(k){return function(){return Cc(a.l,[f.replace("{start time}",String(k.ud.Pg))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}N("shaka.mss.MssParser",fx);var kx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),jx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1084
|
-
vi["application/vnd.ms-sstr+xml"]=function(){return new fx};function px(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"]};e=null;try{e=qc(b)}catch(g){}throw new R(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function qx(){}function rx(a,b,c,d,e){var f=new sx;
|
|
1084
|
+
vi["application/vnd.ms-sstr+xml"]=function(){return new fx};function px(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"]};e=null;try{e=qc(b)}catch(g){}throw new R(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function qx(){}function rx(a,b,c,d,e){var f=new sx;Eg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new tx,h={bh:!1,Zh:!1};a=ux(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new gg(a,function(){h.bh=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Ob(function(){h.Zh=!0;g.abort()});k.V(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1085
1085
|
function ux(a,b,c,d,e,f,g){var h,k,l,m,n,r,p,t,w,y,z,v,B;return L(function(A){switch(A.g){case 1:return h=vx,k=wx,r=n=0,p=Date.now(),ra(A,2),D(A,h(a,c),4);case 4:l=A.h;f(xx(l.headers));if("HEAD"==c.method){A.B(5);break}t=l.clone().body.getReader();y=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;z=function(C){function E(){var J,I,G;return L(function(H){switch(H.g){case 1:return ra(H,2),D(H,t.read(),4);case 4:J=H.h;ta(H,3);break;case 2:return ua(H),H.return();case 3:if(J.done){H.B(5);break}n+=
|
|
1086
1086
|
J.value.byteLength;if(!g){H.B(5);break}return D(H,g(J.value),5);case 5:I=Date.now();if(100<I-p||J.done)G=J.done?0:y-n,e(I-p,n-r,G),r=n,p=I;J.done?C.close():(C.enqueue(J.value),E());F(H)}})}E()};new k({start:z});return D(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ta(A,3);break;case 2:v=ua(A);if(d.bh)throw new R(1,1,7001,a,b);if(d.Zh)throw new R(1,1,1003,a,b);throw new R(1,1,1002,a,v,b);case 3:return B=xx(l.headers),A.return(px(B,m,l.status,a,l.url,b))}})}
|
|
1087
1087
|
function xx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function yx(){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||!window.AbortController)}N("shaka.net.HttpFetchPlugin",qx);qx.isSupported=yx;qx.parse=rx;var vx=window.fetch,tx=window.AbortController,wx=window.ReadableStream,sx=window.Headers;
|
|
1088
1088
|
yx()&&(qg("http",rx,2,!0),qg("https",rx,2,!0),qg("blob",rx,2,!0));function zx(){}
|
|
1089
1089
|
function Ax(a,b,c,d,e){var f=new Bx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new R(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=Cx(f);e(p);n=!0}};f.onload=function(p){var t=Cx(f),w=f.response;try{d(Date.now()-g,p.loaded-h,0);var y=px(t,w,f.status,a,f.responseURL,c);l(y)}catch(z){m(z)}};f.onerror=function(p){m(new R(1,
|
|
1090
1090
|
1,1002,a,p,c))};f.ontimeout=function(){m(new R(1,1,1003,a,c))};f.onprogress=function(p){var t=Date.now();if(100<t-g||p.lengthComputable&&p.loaded==p.total)d(t-g,p.loaded-h,4==f.readyState?0:p.total-p.loaded),h=p.loaded,g=t};for(var r in b.headers)f.setRequestHeader(r.toLowerCase(),b.headers[r]);f.send(b.body)});return new gg(k,function(){f.abort();return Promise.resolve()})}
|
|
1091
|
-
function Cx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=u(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}N("shaka.net.HttpXHRPlugin",zx);zx.parse=Ax;var Bx=window.XMLHttpRequest;qg("http",Ax,1,!0);qg("https",Ax,1,!0);qg("blob",Ax,1,!0);function Dx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ex(a){return a.ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ta+":"+a.za}function Fx(a,b){return sl(a.g.ka(),a.g.Ta,a.g.za,b.streaming.retryParameters)};function Gx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Hx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Gx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function Ix(a){var b=this;this.
|
|
1092
|
-
function Lx(a,b,c,d,e,f){
|
|
1093
|
-
function Mx(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=
|
|
1091
|
+
function Cx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=u(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}N("shaka.net.HttpXHRPlugin",zx);zx.parse=Ax;var Bx=window.XMLHttpRequest;qg("http",Ax,1,!0);qg("https",Ax,1,!0);qg("blob",Ax,1,!0);function Dx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ex(a){return a.ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ta+":"+a.za}function Fx(a,b){return sl(a.g.ka(),a.g.Ta,a.g.za,b.streaming.retryParameters)};function Gx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Hx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Gx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function Ix(a){var b=this;this.s=a;this.j=new Map;this.i=new Cg(function(){return Jx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Gx}Ix.prototype.destroy=function(){return this.i.destroy()};function Kx(a,b,c){a.m=b;a.l=c}function Jx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1092
|
+
function Lx(a,b,c,d,e,f){Dg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,r,p;return L(function(t){if(1==t.g)return D(t,Mx(a,c),2);h=t.h;if(a.i.g)throw new R(2,9,7001);if(e)for(m in k=Fb(h),l=new Ug(k),l.data)n=Number(m),r=l.data[n],p=l.g[n],a.l(r,p);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return t.return(f(h))})});a.j.set(b,g)}function Nx(a){return L(function(b){return 1==b.g?D(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1093
|
+
function Mx(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=Ag,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),D(g,d.promise,2);f=g.h;Ad(a.h,e);return g.return(f.data)})};function Ox(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new fg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Ox.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ra(b,2);return D(b,a.g,4)}if(2!=b.g)return ta(b,0);ua(b);F(b)})};
|
|
1094
1094
|
function Px(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return D(g,b(f.key,f.value,f),2)}f.continue();F(g)})}})}Ox.prototype.store=function(){return this.h};Ox.prototype.promise=function(){return this.g};function Qx(a){this.h=a;this.g=[]}Qx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Rx(a,b){return Sx(a,b,"readwrite")}function Sx(a,b,c){c=a.h.transaction([b],c);var d=new Ox(c,b);a.g.push(d);d.promise().then(function(){Ad(a.g,d)},function(){Ad(a.g,d)});return d};function Tx(a,b,c){this.h=new Qx(a);this.i=b;this.g=c}q=Tx.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Ux(this.i)};q.removeSegments=function(a,b){return Vx(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return D(d,Wx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.gh(e)}))})};q.addManifests=function(){return Ux(this.g)};
|
|
1095
1095
|
q.updateManifest=function(){return Promise.reject(new R(2,9,9016,"Cannot modify values in "+this.g))};function Xx(a,b,c){a=Rx(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=Rx(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 Vx(this,this.g,a,b)};
|
|
1096
1096
|
q.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return D(d,Wx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Dd(e)})))})};q.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Sx(a.h,a.g,"readonly"),c=new Map,D(d,Px(b,function(e,f){var g;return L(function(h){if(1==h.g)return D(h,a.Dd(f),2);g=h.h;c.set(e,g);F(h)})}),2)):3!=d.g?D(d,b.promise(),3):d.return(c)})};q.gh=function(a){return a};q.Dd=function(a){return Promise.resolve(a)};
|
|
@@ -1119,7 +1119,7 @@ q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2
|
|
|
1119
1119
|
q.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return D(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return D(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return D(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return D(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),D(b,qy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,D(b,a.init(),0)}})};
|
|
1120
1120
|
function qy(){var a=new fg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new R(2,9,9001,b.error));c.preventDefault()};return a}gy("idb",function(){return cc()||Ub()||!window.indexedDB?null:new py});function ry(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}ry.prototype.Ab=function(){return this.i};ry.prototype.Va=function(){return this.h};ry.prototype.key=function(){return this.l};ry.prototype.toString=function(){return this.j};
|
|
1121
1121
|
function sy(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 ry(b,c,d,Number(a[4])):null};function ty(a,b){this.h=a;this.g=b}
|
|
1122
|
-
function uy(a,b){var c=new sk(null,0);c.
|
|
1122
|
+
function uy(a,b){var c=new sk(null,0);c.yb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=vy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ic}).map(function(l){return wy(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return wy(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=u(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
1123
1123
|
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}}
|
|
1124
1124
|
function vy(a,b,c,d){for(var e=new Set,f=u(b),g=f.next();!g.done;g=f.next()){var h=u(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=u(c);for(g=f.next();!g.done;g=f.next())for(h=u(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=u(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=u(b);for(e=b.next();!e.done;e=
|
|
1125
1125
|
b.next())for(e=e.value,g=wy(a,e,d),h=u(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=u(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=wy(a,e,d),g=u(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
@@ -1131,9 +1131,9 @@ q.update=function(){};
|
|
|
1131
1131
|
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new Zx,ra(m,2,3),D(m,e.init(),5);case 5:return D(m,cy(e,d.Ab(),d.Va()),6);case 6:return f=m.h,D(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 D(m,f.updateManifestExpiration(d.key(),b),3);case 3:return va(m),D(m,e.destroy(),10);case 10:wa(m,0);break;case 2:ua(m),m.B(3)}})};
|
|
1132
1132
|
q.onInitialVariantChosen=function(){};q.banLocation=function(){};vi["application/x-offline-manifest"]=function(){return new zy};function Ay(){}function By(a){var b=sy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=jg(a)):a=b&&"segment"==b.g?Cy(b.key(),b):hg(new R(2,1,9004,a));return a}
|
|
1133
1133
|
function Cy(a,b){var c=new Zx;return jg(void 0).Ma(function(){return c.init()}).Ma(function(){return cy(c,b.Ab(),b.Va())}).Ma(function(d){return d.getSegments([b.key()])}).Ma(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}N("shaka.offline.OfflineScheme",Ay);Ay.plugin=By;qg("offline",By);function Dy(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),r=n.next();!r.done;r=n.next()){r=r.value;for(var p=!1,t=u(m),w=t.next();!w.done;w=t.next())if(w=w.value,Ey(w.info,r)){w.sessionIds.push(r.sessionId);p=!0;break}p||m.push({info:r,sessionIds:[r.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Fy(a,b,g);return D(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)}})}
|
|
1134
|
-
function Fy(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new
|
|
1135
|
-
h.g)return ra(h,2),D(h,
|
|
1136
|
-
function Hy(a){var b=[],c=vf(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(mf(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(nf(c.value));return b};function Jy(){this.g={}}function Ky(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 Ly(a,b){a.g[b.id]=b.bandwidth||2048}function My(a,b){a=a.g[b];null==a&&(a=0);return a};function Ny(a){var b=this;if(a&&a.constructor!=V)throw new R(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.hc()):(this.h=km(),this.g=new pg);this.i=[];this.j=[];var c=!a;this.l=new
|
|
1134
|
+
function Fy(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new zh({Zb:b,onError:function(){},Pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),D(f,Hh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return ua(f),D(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],D(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==
|
|
1135
|
+
h.g)return ra(h,2),D(h,Th(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);ua(h);F(h)})})),6);case 6:return D(f,d.destroy(),7);case 7:return f.return(e)}})}function Ey(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Bd(a.audioCapabilities,b.audioCapabilities,c)&&Bd(a.videoCapabilities,b.videoCapabilities,c)};function Gy(a,b,c){var d=b.presentationTimeline.getDuration();b=Hy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Iy(a,b){var c=uy(new ty(a.Ab(),a.Va()),b),d=b.appMetadata||{};c=Hy(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}}
|
|
1136
|
+
function Hy(a){var b=[],c=vf(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(mf(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(nf(c.value));return b};function Jy(){this.g={}}function Ky(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 Ly(a,b){a.g[b.id]=b.bandwidth||2048}function My(a,b){a=a.g[b];null==a&&(a=0);return a};function Ny(a){var b=this;if(a&&a.constructor!=V)throw new R(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.hc()):(this.h=km(),this.g=new pg);this.i=[];this.j=[];var c=!a;this.l=new Cg(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return D(k,Promise.all(b.j.map(function(l){return Jx(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return D(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return D(k,b.g.destroy(),4);
|
|
1137
1137
|
case 4:b.h=null,b.g=null,F(k)}})})}function Oy(){if(Pb())a:{var a=u($x.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=Ny.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cm(a,b));return om(this.h,a)};q.getConfiguration=function(){var a=km();om(a,this.h,km());return a};q.hc=function(){return this.g};
|
|
1138
1138
|
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Ix(this.g);this.j.push(f);b=Py(this,a,b||{},function(){var g;return L(function(h){if(1==h.g)return c?h.B(2):D(h,Im(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=ui(a,c||null);return h.return(g())})},e,f);b=new gg(b,function(){return Jx(f)});b.finally(function(){Ad(d.j,f)});return Qy(this,b)};
|
|
1139
1139
|
function Py(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,w,y,z,v,B;return L(function(A){switch(A.g){case 1:return Ry(),h=g=null,k=new Zx,n=m=l=null,ra(A,2,3),D(A,d(),5);case 5:return g=A.h,D(A,Sy(a,b,g,e),6);case 6:r=A.h;Ty(a);p=!r.presentationTimeline.U()&&!r.presentationTimeline.Ac();if(!p)throw new R(2,9,9005,b);return D(A,a.Rc(r,function(C){n=n||C},e),7);case 7:h=A.h;Ty(a);if(n)throw n;return D(A,Uy(r,h,e),8);case 8:return D(A,k.init(),9);case 9:return Ty(a),D(A,ay(k),10);case 10:return l=A.h,Ty(a),t=Vy(h,
|
|
@@ -1147,16 +1147,16 @@ function az(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,t,w,y;return L(function(z){switch(z
|
|
|
1147
1147
|
function Uy(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A,C,E,J,I,G,H,K,M,P,O;return L(function(U){switch(U.g){case 1:return d={width:Infinity,height:Infinity},Se(a,c.restrictions,d),D(U,We(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Qe(a,g,h,f);k=u(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(mf(m));n=u(a.textStreams);for(r=n.next();!r.done;r=n.next())p=r.value,e.push(nf(p));
|
|
1148
1148
|
t=u(a.imageStreams);for(w=t.next();!w.done;w=t.next())y=w.value,e.push(of(y));return D(U,c.offline.trackSelectionCallback(e),3);case 3:z=U.h;v=a.presentationTimeline.getDuration();B=0;A=u(z);for(C=A.next();!C.done;C=A.next())E=C.value,J=E.bandwidth*v/8,B+=J;ra(U,4);return D(U,c.offline.downloadSizeCallback(B),6);case 6:I=U.h;if(!I)throw new R(2,9,9014);ta(U,5);break;case 4:G=ua(U);if(G instanceof R)throw G;throw new R(2,9,9015);case 5:H=new Set;K=new Set;M=new Set;P=u(z);for(C=P.next();!C.done;C=
|
|
1149
1149
|
P.next())O=C.value,"variant"==O.type&&H.add(O.id),"text"==O.type&&K.add(O.id),"image"==O.type&&M.add(O.id);a.variants=a.variants.filter(function(X){return H.has(X.id)});a.textStreams=a.textStreams.filter(function(X){return K.has(X.id)});a.imageStreams=a.imageStreams.filter(function(X){return M.has(X.id)});bz(a);F(U)}})}
|
|
1150
|
-
function Vy(a,b,c,d,e,f){var g=Gy(c,b,d),h=e.offline.progressCallback;Kx(f,function(p,t){g.size=t;h(g,p)},function(p,t){k&&e.offline.usePersistentLicense&&l==t&&
|
|
1151
|
-
r&&n&&(r.initData=[]);return{xj:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hd(),streams:f,sessionIds:n?
|
|
1152
|
-
function $y(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 Xy(a,b,c,d){b.expiration=c.Hd();c=
|
|
1150
|
+
function Vy(a,b,c,d,e,f){var g=Gy(c,b,d),h=e.offline.progressCallback;Kx(f,function(p,t){g.size=t;h(g,p)},function(p,t){k&&e.offline.usePersistentLicense&&l==t&&Ph(a,"cenc",p)});var k=Zy(b)&&!$y(b),l=null;k&&(l=cz.get(a.g.keySystem));for(var m=new Jy,n=u(b.textStreams),r=n.next();!r.done;r=n.next())m.g[r.value.id]=52;n=u(b.imageStreams);for(r=n.next();!r.done;r=n.next())Ly(m,r.value);r=u(b.variants);for(n=r.next();!n.done;n=r.next())Ky(m,n.value);m=dz(f,m,b,e);f=m.streams;m=m.Mg;r=a.g;n=e.offline.usePersistentLicense;
|
|
1151
|
+
r&&n&&(r.initData=[]);return{xj:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hd(),streams:f,sessionIds:n?Zh(a):[],drmInfo:r,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Mg:m}}function Zy(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1152
|
+
function $y(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 Xy(a,b,c,d){b.expiration=c.Hd();c=Zh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Zy(a)&&d.offline.usePersistentLicense&&!c.length)throw new R(2,9,9007);}q.remove=function(a){return ez(this,fz(this,a))};
|
|
1153
1153
|
function fz(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:Ry();c=sy(b);if(null==c||"manifest"!=c.g)throw new R(2,9,9004,b);d=c;e=new Zx;sa(k,2);return D(k,e.init(),4);case 4:return D(k,cy(e,d.Ab(),d.Va()),5);case 5:return f=k.h,D(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],D(k,Promise.all([gz(a,h,e),hz(f,d,h)]),2);case 2:return va(k),D(k,e.destroy(),8);case 8:wa(k,0)}})}
|
|
1154
1154
|
function iz(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:ke(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ke(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function gz(a,b,c){return L(function(d){return D(d,jz(a.g,a.h.drm,c,b),0)})}
|
|
1155
1155
|
function hz(a,b,c){function d(){}var e=kz(c);Iy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Pj=function(){return ez(this,lz(this))};
|
|
1156
1156
|
function lz(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return Ry(),b=a.g,c=a.h.drm,d=new Zx,e=!1,sa(n,2),D(n,d.init(),4);case 4:f=[],dy(d,function(r){return f.push(r)}),g=u(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return D(n,k.getAll(),8);case 8:return l=n.h,D(n,Dy(c,b,l),9);case 9:return m=n.h,D(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return va(n),D(n,d.destroy(),11);case 11:wa(n,3);break;case 3:return n.return(!e)}})}
|
|
1157
1157
|
q.list=function(){return ez(this,mz())};function mz(){var a,b,c;return L(function(d){switch(d.g){case 1:return Ry(),a=[],b=new Zx,sa(d,2),D(d,b.init(),4);case 4:return c=Promise.resolve(),by(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return D(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Iy(new ry("manifest",e.Ab,e.Va,l),k);a.push(k)});F(h)})})}),D(d,c,2);case 2:return va(d),D(d,b.destroy(),6);case 6:wa(d,3);break;case 3:return d.return(a)}})}
|
|
1158
1158
|
function Sy(a,b,c,d){var e,f,g,h,k;return L(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}},
|
|
1159
|
-
c.configure(d.manifest),Ty(a),D(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ty(a),k=nz(h),D(l,Promise.all(cb(k,function(m){return m.createSegmentIndex()})),3);Ty(a);if(e)throw e;return l.return(h)})}q.Rc=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=new
|
|
1159
|
+
c.configure(d.manifest),Ty(a),D(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ty(a),k=nz(h),D(l,Promise.all(cb(k,function(m){return m.createSegmentIndex()})),3);Ty(a);if(e)throw e;return l.return(h)})}q.Rc=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=new zh({Zb:d.g,onError:b,Pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),D(f,Eh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?D(f,Rh(e),3):f.return(e)})};
|
|
1160
1160
|
function dz(a,b,c,d){var e=new Map,f=nz(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=oz(a,b,c,h,d,e);g.set(h.id,k)}a=u(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()),Mg:Array.from(e.values())}}
|
|
1161
1161
|
function oz(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,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,
|
|
1162
1162
|
spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;pz(d,c.presentationTimeline.Lb(),function(l){var m=Ex(l),n=void 0;if(!f.has(m)){var r=l.endTime-l.startTime;r=My(b,d.id)*r;r=Hx(a.g,r);f.set(m,new Dx(l,r,k,!1))}l.ua&&(n=Ex(l.ua),f.has(n)||(r=.5*My(b,d.id),r=Hx(a.g,r),f.set(n,new Dx(l.ua,r,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
|
|
@@ -1192,11 +1192,11 @@ hA;window.shakaMediaKeysPolyfill=!0}};
|
|
|
1192
1192
|
function iA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(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=u(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1193
1193
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=u(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1194
1194
|
iA.prototype.createMediaKeys=function(){var a=new mA(this.keySystem);return Promise.resolve(a)};iA.prototype.getConfiguration=function(){return this.g};function mA(a){this.h=new WebKitMediaKeys(a);this.g=new ed}mA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new nA(this.h,a)};mA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1195
|
-
function kA(a,b){a.g.mb();if(!b)return Promise.resolve();a.g.
|
|
1196
|
-
q.generateRequest=function(a,b){var c=this;this.h=new fg;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.
|
|
1195
|
+
function kA(a,b){a.g.mb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",lA);try{return zk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}mA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function nA(a){bb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new ed;this.sessionId="";this.expiration=NaN;this.closed=new fg;this.keyStatuses=new oA}na(nA,bb);q=nA.prototype;
|
|
1196
|
+
q.generateRequest=function(a,b){var c=this;this.h=new fg;try{var d=this.l.createSession("video/mp4",Fb(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.xc()?"license-request":"license-renewal").set("message",Gb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(pA(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
|
|
1197
1197
|
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:pA(c,"output-not-allowed");break;default:pA(c,"internal-error")}});pA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1198
1198
|
q.update=function(a){this.g=new fg;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.mb()}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 pA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
|
|
1199
|
-
function oA(){this.size=0;this.g=void 0}q=oA.prototype;q.xc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,
|
|
1199
|
+
function oA(){this.size=0;this.g=void 0}q=oA.prototype;q.xc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,mi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=mi.value();return this.g&&Cb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function qA(){}function rA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Xb()||Vb("Tizen 4")||Vb("Tizen 5.0")||$b())&&(MediaKeys.prototype.setServerCertificate=sA)}function sA(){return Promise.resolve(!1)}qz.PatchedMediaKeysCert=qA;qA.install=rA;tz(rA);function tA(){}function uA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=vA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=wA,window.MediaKeys=xA,window.MediaKeySystemAccess=yA,window.shakaMediaKeysPolyfill=!0)}function vA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1200
1200
|
function wA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}qz.PatchedMediaKeysNop=tA;tA.install=uA;function xA(){throw new TypeError("Illegal constructor.");}xA.prototype.createSession=function(){};xA.prototype.setServerCertificate=function(){};xA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function yA(){this.keySystem="";throw new TypeError("Illegal constructor.");}yA.prototype.getConfiguration=function(){};
|
|
1201
1201
|
yA.prototype.createMediaKeys=function(){};tz(uA,-10);function zA(){}
|
|
1202
1202
|
function AA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)BA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=CA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=DA;window.MediaKeys=EA;window.MediaKeySystemAccess=FA;window.shakaMediaKeysPolyfill=!0}}
|
|
@@ -1204,42 +1204,42 @@ function GA(a){var b=BA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}functi
|
|
|
1204
1204
|
function FA(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=u(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=u(f.audioCapabilities),
|
|
1205
1205
|
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=u(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"]):
|
|
1206
1206
|
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;}FA.prototype.createMediaKeys=function(){var a=new EA(this.g);return Promise.resolve(a)};FA.prototype.getConfiguration=function(){return this.h};function EA(a){this.l=a;this.h=null;this.g=new ed;this.i=[];this.j=new Map}
|
|
1207
|
-
function HA(a,b){a.h=b;a.g.mb();var c=BA;b&&(a.g.
|
|
1208
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.
|
|
1207
|
+
function HA(a,b){a.h=b;a.g.mb();var c=BA;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=IA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.xc()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=IA(a,d.sessionId))JA(d,"usable"),
|
|
1208
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=IA(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?JA(e,"output-restricted"):1==f?JA(e,"expired"):JA(e,"internal-error"))}}))}
|
|
1209
1209
|
EA.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 KA(b,this.l,a);this.i.push(a);return a};EA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};EA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1210
1210
|
function IA(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 KA(a,b,c){bb.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 fg;this.keyStatuses=new LA}na(KA,bb);
|
|
1211
1211
|
function MA(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=Fb(rc("LOAD_SESSION|"+c));else{var e=rc("PERSISTENT|");d=Bc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new fg;var f=GA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Ob(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).V(.01)}return a.h}
|
|
1212
1212
|
function NA(a,b,c){if(a.g)a.g.then(function(){return NA(a,b,c)}).catch(function(){return NA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=nc(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=yc(e.keys[0].k);e=yc(e.keys[0].kid)}else d=Fb(c),e=null;var f=GA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1213
1213
|
function JA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}q=KA.prototype;q.generateRequest=function(a,b){return MA(this,b,null)};q.load=function(a){return"persistent-license"==this.l?MA(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new fg;NA(this,b,a);return b};
|
|
1214
1214
|
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=GA("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 LA(){this.size=0;this.g=void 0}q=LA.prototype;q.xc=function(){return this.g};
|
|
1215
|
-
q.forEach=function(a){this.g&&a(this.g,
|
|
1215
|
+
q.forEach=function(a){this.g&&a(this.g,mi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=mi.value();return this.g&&Cb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var BA="";tz(AA);function OA(){}function PA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=QA,Object.defineProperty(a,"disablePictureInPicture",{get:RA,set:SA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=TA,document.addEventListener("webkitpresentationmodechanged",UA,!0))}}
|
|
1216
1216
|
function UA(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)}
|
|
1217
1217
|
function QA(){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 TA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1218
1218
|
function RA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function SA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}qz.PiPWebkit=OA;OA.install=PA;tz(PA);function VA(){}function WA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=XA))}function XA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}qz.RandomUUID=VA;VA.install=WA;tz(WA);function YA(){}function ZA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:$A})}function $A(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}qz.Symbol=YA;YA.install=ZA;tz(ZA);function aB(){}function bB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}qz.VideoPlayPromise=aB;aB.install=bB;tz(bB);function cB(){}function dB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||$b())&&(a.getVideoPlaybackQuality=eB)}}function eB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}qz.VideoPlaybackQuality=cB;cB.install=dB;tz(dB);function fB(){}function gB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=hB;else if(6==b)a=iB;else{try{var c=!!hB(1,2,"")}catch(d){c=!1}c&&(a=hB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function hB(a,b,c){return new window.TextTrackCue(a,b,c)}function iB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}qz.VTTCue=fB;fB.install=gB;tz(gB);function jB(){}jB.prototype.parseInit=function(){};jB.prototype.setSequenceMode=function(){};jB.prototype.setManifestType=function(){};jB.prototype.parseMedia=function(a,b){var c=null,d=[];a=nc(a).split(/\r?\n/);a=u(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=kB.exec(e))){var f=lB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Dd(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1219
1219
|
N("shaka.text.LrcTextParser",jB);jB.prototype.parseMedia=jB.prototype.parseMedia;jB.prototype.setManifestType=jB.prototype.setManifestType;jB.prototype.setSequenceMode=jB.prototype.setSequenceMode;jB.prototype.parseInit=jB.prototype.parseInit;var kB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,lB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Ee["application/x-subtitle-lrc"]=function(){return new jB};function mB(){}mB.prototype.parseInit=function(){};mB.prototype.setSequenceMode=function(){};mB.prototype.setManifestType=function(){};
|
|
1220
|
-
mB.prototype.parseMedia=function(a,b,c){var d=nc(a);a=[];if(""==d)return a;var e=
|
|
1221
|
-
{tc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=
|
|
1222
|
-
100*p.height/y)),p.widthUnits=z||null!=w?$d:0,p.heightUnits=z||null!=y?$d:0)}if(t=sB(t,h,"origin"))if(B=(z=qB.exec(t))||rB.exec(t),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?v||(p.width=100-p.viewportAnchorX,p.widthUnits=$d,p.height=100-p.viewportAnchorY,p.heightUnits=$d):(null!=y&&(p.viewportAnchorY=100*p.viewportAnchorY/y),null!=w&&(p.viewportAnchorX=100*p.viewportAnchorX/w)),p.viewportAnchorUnits=z||null!=w?$d:0}else p=null;p&&k.push(p)}if(
|
|
1223
|
-
2,2001,"<p> can only be inside <div> in TTML");n=u(
|
|
1224
|
-
function tB(a,b,c,d,e,f,g,h,k,l,m,n){var r=l;if(
|
|
1225
|
-
[];if(!z)for(var v=u(p.children),B=v.next();!B.done;B=v.next())(B=tB(B.value,b,c,d,e,f,g,y,k,p,m,n))&&h.push(B);d=null!=l;n=
|
|
1226
|
-
if(!B&&0<h.length)for(n=Infinity,v=0,b=u(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new Dd(n,v,""),e.lineBreak=!0,e;b="";z&&(b=uc(
|
|
1220
|
+
mB.prototype.parseMedia=function(a,b,c){var d=nc(a);a=[];if(""==d)return a;var e=Xg(d,"tt");if(!e)throw new R(2,2,2005,"Failed to parse TTML.");d=gh(e,"body")[0];if(!d)return[];var f=mh(e,nB,"frameRate"),g=mh(e,nB,"subFrameRate"),h=mh(e,nB,"frameRateMultiplier"),k=mh(e,nB,"tickRate"),l=mh(e,nB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=mh(e,oB,"extent");if("default"!=m&&"preserve"!=m)throw new R(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new pB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
|
|
1221
|
+
{tc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=gh(e,"metadata")[0])?g.children:[];h=gh(e,"style");e=gh(e,"region");k=[];for(var r=u(e),p=r.next();!p.done;p=r.next()){var t=p.value;p=new Ed;var w=t.attributes["xml:id"];if(w){p.id=w;var y=null;n&&(y=qB.exec(n)||rB.exec(n));w=y?Number(y[1]):null;y=y?Number(y[2]):null;var z,v=sB(t,h,"extent");if(v){var B=(z=qB.exec(v))||rB.exec(v);null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=w&&(p.width=100*p.width/w),null!=y&&(p.height=
|
|
1222
|
+
100*p.height/y)),p.widthUnits=z||null!=w?$d:0,p.heightUnits=z||null!=y?$d:0)}if(t=sB(t,h,"origin"))if(B=(z=qB.exec(t))||rB.exec(t),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?v||(p.width=100-p.viewportAnchorX,p.widthUnits=$d,p.height=100-p.viewportAnchorY,p.heightUnits=$d):(null!=y&&(p.viewportAnchorY=100*p.viewportAnchorY/y),null!=w&&(p.viewportAnchorX=100*p.viewportAnchorX/w)),p.viewportAnchorUnits=z||null!=w?$d:0}else p=null;p&&k.push(p)}if(dh(d,"p").length)throw new R(2,
|
|
1223
|
+
2,2001,"<p> can only be inside <div> in TTML");n=u(dh(d,"div"));for(r=n.next();!r.done;r=n.next())if(dh(r.value,"span").length)throw new R(2,2,2001,"<span> can only be inside <p> in TTML");if(b=tB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1224
|
+
function tB(a,b,c,d,e,f,g,h,k,l,m,n){var r=l;if(bh(a)){if(!m)return null;var p={tagName:"span",children:[eh(a)],attributes:{},parent:null}}else p=a;for(var t=null,w=u(uB),y=w.next();!y.done&&!(t=vB(p,"backgroundImage",d,"#",y.value)[0]);y=w.next());w=null;var z=mh(p,uB,"backgroundImage");n&&z&&!z.startsWith("#")&&(y=new ib(n),z=new ib(z),(y=y.resolve(z).toString())&&(w=y));if("p"==a.tagName||t||w)m=!0;a=m;y="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));z=p.children.every(bh);h=
|
|
1225
|
+
[];if(!z)for(var v=u(p.children),B=v.next();!B.done;B=v.next())(B=tB(B.value,b,c,d,e,f,g,y,k,p,m,n))&&h.push(B);d=null!=l;n=eh(p);n=p.children.length&&n&&/\S/.test(n);B=p.attributes.begin||p.attributes.end||p.attributes.dur;if(!(B||n||"br"==p.tagName||0!=h.length||d&&!y))return null;v=wB(p,c);n=v.start;for(v=v.end;r&&r.tagName&&"tt"!=r.tagName;)v=xB(r,c,n,v),n=v.start,v=v.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;v=null==v?Infinity:v+b.periodStart;n=Math.max(n,b.segmentStart);v=Math.min(v,b.segmentEnd);
|
|
1226
|
+
if(!B&&0<h.length)for(n=Infinity,v=0,b=u(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new Dd(n,v,""),e.lineBreak=!0,e;b="";z&&(b=uc(eh(p)||""),y&&(b=b.replace(/\s+/g," ")));b=new Dd(n,v,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=vB(p,"region",f,"")[0];if(p.attributes.region&&k&&k.attributes["xml:id"]){var A=k.attributes["xml:id"];b.region=g.filter(function(C){return C.id==A})[0]}g=k;l&&d&&!p.attributes.region&&
|
|
1227
1227
|
!p.attributes.style&&(g=vB(l,"region",f,"")[0]);yB(b,p,g,t,w,e,a,0==h.length);return b}
|
|
1228
1228
|
function yB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==zB(b,c,f,"direction",g)&&(a.direction="rtl");h=zB(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=Hd);(h=zB(b,c,f,"textAlign",!0))?(a.positionAlign=AB[h],a.lineAlign=BB[h],a.textAlign=Sd[h.toUpperCase()]):a.textAlign=Gd;if(h=zB(b,c,f,"displayAlign",!0))a.displayAlign=Td[h.toUpperCase()];if(h=zB(b,c,f,"color",g))a.color=h;if(h=zB(b,c,f,"backgroundColor",
|
|
1229
1229
|
g))a.backgroundColor=h;if(h=zB(b,c,f,"border",g))a.border=h;if(h=zB(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}(h=zB(b,c,f,"fontWeight",g))&&
|
|
1230
|
-
"bold"==h&&(a.fontWeight=700);h=zB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=zB(b,c,f,"lineHeight",g))&&h.match(CB)&&(a.lineHeight=h);(h=zB(b,c,f,"fontSize",g))&&(h.match(CB)||h.match(DB))&&(a.fontSize=h);if(h=zB(b,c,f,"fontStyle",g))a.fontStyle=Zd[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=
|
|
1230
|
+
"bold"==h&&(a.fontWeight=700);h=zB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=zB(b,c,f,"lineHeight",g))&&h.match(CB)&&(a.lineHeight=h);(h=zB(b,c,f,"fontSize",g))&&(h.match(CB)||h.match(DB))&&(a.fontSize=h);if(h=zB(b,c,f,"fontStyle",g))a.fontStyle=Zd[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=eh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=zB(b,c,f,"textOutline",g))d=
|
|
1231
1231
|
d.split(" "),d[0].match(CB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(CB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=zB(b,c,f,"letterSpacing",g))&&d.match(CB)&&(a.letterSpacing=d);(d=zB(b,c,f,"linePadding",g))&&d.match(CB)&&(a.linePadding=d);if(d=zB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=sB(c,f,"textDecoration"))&&EB(a,d);(d=FB(b,f,"textDecoration"))&&EB(a,d);if(d=zB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(zB(b,c,f,"ruby",g)){case "container":a.rubyTag=
|
|
1232
1232
|
"ruby";break;case "text":a.rubyTag="rt"}}
|
|
1233
1233
|
function EB(a,b){b=u(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Ad(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Ad(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1234
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ad(a.textDecoration,"overline")}}function zB(a,b,c,d,e){e=void 0===e?!0:e;return(a=FB(a,c,d))?a:e?sB(b,c,d):null}function sB(a,b,c){if(!a)return null;var d=
|
|
1235
|
-
function GB(a,b,c){a=vB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=
|
|
1234
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ad(a.textDecoration,"overline")}}function zB(a,b,c,d,e){e=void 0===e?!0:e;return(a=FB(a,c,d))?a:e?sB(b,c,d):null}function sB(a,b,c){if(!a)return null;var d=mh(a,oB,c);return d?d:GB(a,b,c)}function FB(a,b,c){var d=mh(a,oB,c);return d?d:GB(a,b,c)}
|
|
1235
|
+
function GB(a,b,c){a=vB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=lh(a[e],"urn:ebu:tt:style",c);f||(f=mh(a[e],oB,c));f||(f=FB(a[e],b,c));f&&(d=f)}return d}function vB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?lh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=u(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=u(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}
|
|
1236
1236
|
function xB(a,b,c,d){a=wB(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 wB(a,b){var c=HB(a.attributes.begin,b),d=HB(a.attributes.end,b);a=HB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1237
1237
|
function HB(a,b){var c=null;if(IB.test(a)){a=IB.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(JB.test(a))c=KB(JB,a);else if(LB.test(a))c=KB(LB,a);else if(MB.test(a))a=MB.exec(a),c=Number(a[1])/b.frameRate;else if(NB.test(a))a=NB.exec(a),c=Number(a[1])/b.g;else if(OB.test(a))c=KB(OB,a);else if(a)throw new R(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1238
1238
|
function KB(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)}N("shaka.text.TtmlTextParser",mB);mB.prototype.parseMedia=mB.prototype.parseMedia;mB.prototype.setManifestType=mB.prototype.setManifestType;mB.prototype.setSequenceMode=mB.prototype.setSequenceMode;mB.prototype.parseInit=mB.prototype.parseInit;
|
|
1239
1239
|
function pB(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]))}
|
|
1240
1240
|
var qB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,DB=/^(\d{1,2}(?:\.\d+)?|100)%$/,CB=/^(\d+px|\d+em|\d*\.?\d+c)$/,rB=/^(\d+)px (\d+)px$/,IB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,JB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,LB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,MB=/^(\d*(?:\.\d*)?)f$/,NB=/^(\d*(?:\.\d*)?)t$/,OB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),BB={left:Kd,center:"center",right:"end",start:Kd,
|
|
1241
|
-
end:"end"},AB={left:"line-left",center:"center",right:"line-right"},nB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],oB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],uB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Ee["application/ttml+xml"]=function(){return new mB};function PB(){this.g=new mB}PB.prototype.parseInit=function(a){var b=!1;(new
|
|
1242
|
-
PB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new
|
|
1241
|
+
end:"end"},AB={left:"line-left",center:"center",right:"line-right"},nB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],oB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],uB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Ee["application/ttml+xml"]=function(){return new mB};function PB(){this.g=new mB}PB.prototype.parseInit=function(a){var b=!1;(new Jg).box("moov",Og).box("trak",Og).box("mdia",Og).box("minf",Og).box("stbl",Og).T("stsd",Qg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new R(2,2,2007);};PB.prototype.setSequenceMode=function(){};PB.prototype.setManifestType=function(){};
|
|
1242
|
+
PB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Jg).box("mdat",Tg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new R(2,2,2007);return f};N("shaka.text.Mp4TtmlParser",PB);PB.prototype.parseMedia=PB.prototype.parseMedia;PB.prototype.setManifestType=PB.prototype.setManifestType;PB.prototype.setSequenceMode=PB.prototype.setSequenceMode;PB.prototype.parseInit=PB.prototype.parseInit;Ee['application/mp4; codecs="stpp"']=function(){return new PB};
|
|
1243
1243
|
Ee['application/mp4; codecs="stpp.ttml"']=function(){return new PB};Ee['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new PB};Ee['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new PB};function QB(){this.h=!1;this.g="UNKNOWN"}QB.prototype.parseInit=function(){};QB.prototype.setSequenceMode=function(a){this.h=a};QB.prototype.setManifestType=function(a){this.g=a};
|
|
1244
1244
|
QB.prototype.parseMedia=function(a,b){a=nc(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 R(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new R(2,2,2E3);a=RB(new Nu(a[1]));if(null==a)throw new R(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=u(c[0].split("\n"));
|
|
1245
1245
|
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Nu(e);var f=new Ed;Qu(e);Ou(e);for(var g=Qu(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]),
|
|
@@ -1249,17 +1249,17 @@ l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";")
|
|
|
1249
1249
|
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Nu(f[0]),k=RB(g),n=Pu(g,/[ \t]+--\x3e[ \t]+/g),l=RB(g),null==k||null==n||null==l)Ua("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Dd(k,l,"");Ou(g);for(k=Qu(g);k;)TB(m,k,b),Ou(g),k=Qu(g);UB(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
|
|
1250
1250
|
function SB(a){for(var b=u(Object.entries(Xd)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new Dd(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(Yd));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new Dd(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1251
1251
|
function UB(a,b,c){if(a.includes("<")){0===c.size&&SB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(VB)&&a.push(e),e=-1);a=u(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
|
|
1252
|
-
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=u(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=WB(a);try{var m=
|
|
1252
|
+
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=u(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=WB(a);try{var m=Xg("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=u(m),a=m.next();!a.done;a=
|
|
1253
1253
|
m.next())XB(a.value,b,c);else b.payload=uc(a);else b.payload=uc(a)}else b.payload=uc(a)}function WB(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 YB(a,b){return a&&0<a.length?a:b}
|
|
1254
1254
|
function XB(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ed;d.position=null;d.size=0;if(a.tagName)for(var e=u(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=YB(g.backgroundColor,d.backgroundColor),d.color=YB(g.color,d.color),d.fontFamily=YB(g.fontFamily,d.fontFamily),d.fontSize=
|
|
1255
1255
|
YB(g.fontSize,d.fontSize),d.textShadow=YB(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Qd(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
|
|
1256
|
-
if(!f)break;if(f=RB(new Nu(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(
|
|
1256
|
+
if(!f)break;if(f=RB(new Nu(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(bh(a)||1==e.length&&bh(e[0]))for(c=eh(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Qd(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=uc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=u(e),a=b.next();!a.done;a=b.next())XB(a.value,d,c)}
|
|
1257
1257
|
function TB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Gd:a.textAlign=Sd[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"==
|
|
1258
1258
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Fd);else if(d=/^region:(.*)$/.exec(b)){if(b=ZB(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=Wd[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Jd,a.line=Number(c[1]),c[2]&&(a.lineAlign=Wd[c[2].toUpperCase()])}
|
|
1259
1259
|
function ZB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function RB(a){a=Pu(a,VB);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.VttTextParser",QB);QB.prototype.parseMedia=QB.prototype.parseMedia;QB.prototype.setManifestType=QB.prototype.setManifestType;QB.prototype.setSequenceMode=QB.prototype.setSequenceMode;QB.prototype.parseInit=QB.prototype.parseInit;var VB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1260
|
-
Ee["text/vtt"]=function(){return new QB};Ee['text/vtt; codecs="vtt"']=function(){return new QB};Ee['text/vtt; codecs="wvtt"']=function(){return new QB};function $B(){this.g=null}$B.prototype.parseInit=function(a){var b=this,c=!1;(new
|
|
1261
|
-
$B.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new R(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new
|
|
1262
|
-
r.value;var p=r.yg||l,t=r.We?c+r.We:a;a=t+(p||0);var w=0;do{var y=m.R();w+=y;var z=m.R(),v=null;"vttc"==
|
|
1260
|
+
Ee["text/vtt"]=function(){return new QB};Ee['text/vtt; codecs="vtt"']=function(){return new QB};Ee['text/vtt; codecs="wvtt"']=function(){return new QB};function $B(){this.g=null}$B.prototype.parseInit=function(a){var b=this,c=!1;(new Jg).box("moov",Og).box("trak",Og).box("mdia",Og).T("mdhd",function(d){d=Ui(d.reader,d.version);b.g=d.timescale}).box("minf",Og).box("stbl",Og).T("stsd",Qg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new R(2,2,2008);if(!c)throw new R(2,2,2008);};$B.prototype.setSequenceMode=function(){};$B.prototype.setManifestType=function(){};
|
|
1261
|
+
$B.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new R(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Jg).box("moof",Og).box("traf",Og).T("tfdt",function(B){g=!0;c=Ti(B.reader,B.version).baseMediaDecodeTime}).T("tfhd",function(B){l=Si(B.reader,B.flags).jh}).T("trun",function(B){h=!0;d=Vi(B.reader,B.version,B.flags).Kh}).box("mdat",Tg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new R(2,2,2008);a=c;for(var m=new Gg(e,0),n=u(d),r=n.next();!r.done;r=n.next()){r=
|
|
1262
|
+
r.value;var p=r.yg||l,t=r.We?c+r.We:a;a=t+(p||0);var w=0;do{var y=m.R();w+=y;var z=m.R(),v=null;"vttc"==Ng(z)?8<y&&(v=m.Pb(y-8)):m.skip(y-8);p&&v&&(y=aC(v,b.periodStart+t/this.g,b.periodStart+a/this.g),f.push(y))}while(r.sampleSize&&w<r.sampleSize)}return f.filter(Me)};function aC(a,b,c){var d,e,f;(new Jg).box("payl",Tg(function(g){d=nc(g)})).box("iden",Tg(function(g){e=nc(g)})).box("sttg",Tg(function(g){f=nc(g)})).parse(a);return d?bC(d,e,f,b,c):null}
|
|
1263
1263
|
function bC(a,b,c,d,e){d=new Dd(d,e,"");UB(a,d,new Map);b&&(d.id=b);if(c)for(a=new Nu(c),b=Qu(a);b;)TB(d,b,[]),Ou(a),b=Qu(a);return d}N("shaka.text.Mp4VttParser",$B);$B.prototype.parseMedia=$B.prototype.parseMedia;$B.prototype.setManifestType=$B.prototype.setManifestType;$B.prototype.setSequenceMode=$B.prototype.setSequenceMode;$B.prototype.parseInit=$B.prototype.parseInit;Ee['application/mp4; codecs="wvtt"']=function(){return new $B};function cC(){}cC.prototype.parseInit=function(){};cC.prototype.setSequenceMode=function(){};cC.prototype.setManifestType=function(){};cC.prototype.parseMedia=function(a){var b=nc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=u(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Nu(c[0]),e=dC(d),f=Pu(d,/,/g);d=dC(d);if(null==e||null==f||null==d)throw new R(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Dd(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1264
1264
|
function dC(a){a=Pu(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.SbvTextParser",cC);cC.prototype.parseMedia=cC.prototype.parseMedia;cC.prototype.setManifestType=cC.prototype.setManifestType;cC.prototype.setSequenceMode=cC.prototype.setSequenceMode;cC.prototype.parseInit=cC.prototype.parseInit;Ee["text/x-subviewer"]=function(){return new cC};function eC(){this.g=new QB}eC.prototype.parseInit=function(){};eC.prototype.setSequenceMode=function(){};eC.prototype.setManifestType=function(){};eC.prototype.parseMedia=function(a,b,c){a=nc(a);a=fC(a);a=Fb(rc(a));return this.g.parseMedia(a,b,c)};
|
|
1265
1265
|
function fC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=u(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}N("shaka.text.SrtTextParser",eC);eC.srt2webvtt=fC;eC.prototype.parseMedia=eC.prototype.parseMedia;
|
|
@@ -1274,15 +1274,15 @@ function qC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1
|
|
|
1274
1274
|
function rC(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,
|
|
1275
1275
|
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 sC(a){this.i=a;this.h=0;this.g=new Map}q=sC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?jd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Ae(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1276
1276
|
q.transmux=function(a,b,c,d){for(var e=Fb(a),f=Ri(e),g=f.length;g<e.length&&!qC(e,g);g++);a=1E3*c.endTime;f=Qi(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=pC(e,g);if(!c)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=oC(e,g);if(!h)return Promise.reject(new R(2,3,3018));var k=h.Be+h.ba;g+k<=e.length&&f.push({data:e.subarray(g+h.Be,g+k),size:h.ba,
|
|
1277
|
-
duration:1024,
|
|
1277
|
+
duration:1024,rb:0,flags:{ub:0,hb:0,gb:0,cb:0,eb:2,vb:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ab,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,pb:[],wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.h,baseMediaDecodeTime:a,ob:f},stream:b};a=new uw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Mw(a),this.g.set(b.id,d));b=cx(a);this.h++;b=Bc(d,b);return Promise.resolve(b)};N("shaka.transmuxer.AacTransmuxer",sC);
|
|
1278
1278
|
sC.prototype.transmux=sC.prototype.transmux;sC.prototype.getOriginalMimeType=sC.prototype.getOriginalMimeType;sC.prototype.convertCodecs=sC.prototype.convertCodecs;sC.prototype.isSupported=sC.prototype.isSupported;sC.prototype.destroy=sC.prototype.destroy;ce("audio/aac",function(){return new sC("audio/aac")},ie);function tC(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,
|
|
1279
1279
|
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,wa:a,ba:e}}
|
|
1280
1280
|
function uC(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 vC(a){this.i=a;this.h=0;this.g=new Map}q=vC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?jd(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.i};
|
|
1281
|
-
q.transmux=function(a,b,c,d){a=Fb(a);for(var e=Ri(a),f=e.length;f<a.length&&!uC(a,f);f++);var g=1E3*c.endTime;e=Qi(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=tC(a,f);if(!k)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.wa;h.push({data:a.subarray(f,f+k.ba),size:k.ba,duration:1536,
|
|
1282
|
-
hb:0,gb:0,cb:0,eb:2,
|
|
1281
|
+
q.transmux=function(a,b,c,d){a=Fb(a);for(var e=Ri(a),f=e.length;f<a.length&&!uC(a,f);f++);var g=1E3*c.endTime;e=Qi(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=tC(a,f);if(!k)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.wa;h.push({data:a.subarray(f,f+k.ba),size:k.ba,duration:1536,rb:0,flags:{ub:0,
|
|
1282
|
+
hb:0,gb:0,cb:0,eb:2,vb:0}});f+=k.ba}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,pb:[],wa:e,Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.h,baseMediaDecodeTime:a,ob:h},stream:b};a=new uw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Mw(a),this.g.set(b.id,d));b=cx(a);this.h++;b=Bc(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ac3Transmuxer",vC);vC.prototype.transmux=vC.prototype.transmux;
|
|
1283
1283
|
vC.prototype.getOriginalMimeType=vC.prototype.getOriginalMimeType;vC.prototype.convertCodecs=vC.prototype.convertCodecs;vC.prototype.isSupported=vC.prototype.isSupported;vC.prototype.destroy=vC.prototype.destroy;ce("audio/ac3",function(){return new vC("audio/ac3")},ie);function wC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new $i(a.subarray(b+2));bj(c,2);bj(c,3);var d=cj(c,11)+1<<1,e=cj(c,2);if(3==e){e=cj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=cj(c,2);var g=cj(c,3),h=cj(c,1);c=cj(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,wa:a,ba:d}};function xC(a){this.i=a;this.h=0;this.g=new Map}q=xC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?jd(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.i};
|
|
1284
1284
|
q.transmux=function(a,b,c,d){a=Fb(a);for(var e=Ri(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Qi(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=wC(a,f);if(!k)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.wa;h.push({data:a.subarray(f,f+k.ba),size:k.ba,duration:1536,
|
|
1285
|
-
|
|
1285
|
+
rb:0,flags:{ub:0,hb:0,gb:0,cb:0,eb:2,vb:0}});f+=k.ba}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,pb:[],wa:e,Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.h,baseMediaDecodeTime:a,ob:h},stream:b};a=new uw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Mw(a),this.g.set(b.id,d));b=cx(a);this.h++;b=Bc(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ec3Transmuxer",xC);xC.prototype.transmux=xC.prototype.transmux;
|
|
1286
1286
|
xC.prototype.getOriginalMimeType=xC.prototype.getOriginalMimeType;xC.prototype.convertCodecs=xC.prototype.convertCodecs;xC.prototype.isSupported=xC.prototype.isSupported;xC.prototype.destroy=xC.prototype.destroy;ce("audio/ec3",function(){return new xC("audio/ec3")},ie);function yC(a){if(!a.length)return null;var b=a.find(function(w){return 7==w.type});a=a.find(function(w){return 8==w.type});if(!b||!a)return null;var c=new $i(b.data),d=kj(c);kj(c);kj(c);ej(c);if(zC.includes(d)&&(d=S(c),3===d&&bj(c,1),ej(c),ej(c),bj(c,1),jj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)jj(c)&&(6>e?lj(c,16):lj(c,64))}ej(c);d=S(c);if(0===d)S(c);else if(1===d)for(bj(c,1),ej(c),ej(c),d=S(c),e=0;e<d;e++)ej(c);ej(c);bj(c,1);var f=S(c),g=S(c),h=cj(c,1);0===h&&bj(c,1);bj(c,1);var k=0,l=0,m=0,n=0;
|
|
1287
1287
|
jj(c)&&(k=S(c),l=S(c),m=S(c),n=S(c));e=d=1;if(jj(c)&&jj(c)){var r=kj(c),p=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],t=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<r&&16>=r?(d=p[r-1],e=t[r-1]):255===r&&(d=cj(c,16),e=cj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],
|
|
1288
1288
|
k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ea:a,Oa:d,Qa:e}}
|
|
@@ -1298,8 +1298,8 @@ function FC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(
|
|
|
1298
1298
|
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 GC(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*HC[14*(3===c?3-d:3===d?3:4)+e-1];f=IC[3*(3===c?0:2===c?1:2)+f];c=JC[c][d];var h=KC[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,ba:k,Uj:8*c*h}}return null}
|
|
1299
1299
|
function LC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function MC(a,b){if(b+1<a.length&&LC(a,b)){var c=GC(a,b),d=4;c&&c.ba&&(d=c.ba);b+=d;return b===a.length||b+1<a.length&&LC(a,b)}return!1}
|
|
1300
1300
|
var HC=[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],IC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],JC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],KC=[0,1,1,4];function NC(a){this.i=a;this.h=0;this.g=new Map}q=NC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?jd(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.i};
|
|
1301
|
-
q.transmux=function(a,b,c,d){c=Fb(a);for(var e=Ri(c).length;e<c.length&&!MC(c,e);e++);var f;for(a=[];e<c.length;){var g=GC(c,e);if(!g)return Promise.reject(new R(2,3,3018));f||(f=g);e+g.ba<=c.length&&a.push({data:c.subarray(e,e+g.ba),size:g.ba,duration:1152,
|
|
1302
|
-
pb:[],wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.h,baseMediaDecodeTime:c,ob:a},stream:b};f=new
|
|
1301
|
+
q.transmux=function(a,b,c,d){c=Fb(a);for(var e=Ri(c).length;e<c.length&&!MC(c,e);e++);var f;for(a=[];e<c.length;){var g=GC(c,e);if(!g)return Promise.reject(new R(2,3,3018));f||(f=g);e+g.ba<=c.length&&a.push({data:c.subarray(e,e+g.ba),size:g.ba,duration:1152,rb:0,flags:{ub:0,hb:0,gb:0,cb:0,eb:2,vb:0}});e+=g.ba}if(!f)return Promise.reject(new R(2,3,3018));c=9E4*f.Uj/f.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:f.sampleRate,duration:d,
|
|
1302
|
+
pb:[],wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.h,baseMediaDecodeTime:c,ob:a},stream:b};f=new uw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Mw(f),this.g.set(b.id,d));b=cx(f);this.h++;b=Bc(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Mp3Transmuxer",NC);NC.prototype.transmux=NC.prototype.transmux;NC.prototype.getOriginalMimeType=NC.prototype.getOriginalMimeType;NC.prototype.convertCodecs=NC.prototype.convertCodecs;NC.prototype.isSupported=NC.prototype.isSupported;
|
|
1303
1303
|
NC.prototype.destroy=NC.prototype.destroy;ce("audio/mpeg",function(){return new NC("audio/mpeg")},ie);function OC(a){this.h=a;this.g=null}q=OC.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Ae(a).split(","),c=Gc("audio",b);b=Gc("video",b);return!c||b||"mp3"!=ve(c)?!1:jd(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};
|
|
1304
1304
|
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new nj;a=Fb(a);a=this.g.parse(a);if("mp3"!=a.Gd().audio||"audio"!=e)return Promise.reject(new R(2,3,3018));e=new Uint8Array([]);a=u(a.fc());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=GC(b,c))?(c+d.ba<=b.length&&(e=Bc(e,b.subarray(c,c+d.ba))),c+=d.ba):c++;return Promise.resolve(e)};N("shaka.transmuxer.MpegTsTransmuxer",OC);OC.prototype.transmux=OC.prototype.transmux;OC.prototype.getOriginalMimeType=OC.prototype.getOriginalMimeType;
|
|
1305
1305
|
OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;ce("video/mp2t",function(){return new OC("video/mp2t")},he);/*
|
|
@@ -1320,21 +1320,21 @@ PC.prototype.convertCodecs=PC.prototype.convertCodecs;PC.prototype.isSupported=P
|
|
|
1320
1320
|
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=Ae(c).split(",");c=Gc("audio",d);d=Gc("video",d);if(c&&(c=ve(c),!UC.includes(c))||d&&(c=ve(d),!VC.includes(c)))return!1;if(b)return jd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return jd(b)||jd(a)};
|
|
1321
1321
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Ae(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return cf(c,"audio/mp4")}).map(bf).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1322
1322
|
q.transmux=function(a,b,c,d,e){var f=Fb(a);if("audio"==e&&!uj(f)){for(var g=Ri(f),h=g.length;h<f.length;h++)if(MC(f,h))return Promise.reject(new R(2,3,3018));for(h=g.length;h<f.length;h++)if(qC(f,h))return this.h||(this.h=new sC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new R(2,3,3018))}this.j?this.j.clearData():this.j=new nj;var k=this.j.parse(f),l=[],m=k.Gd();try{var n=null;if("video"==e){switch(m.video){case "avc":var r=[],p=null,t=[],w=k.Xc();if(!w.length)throw new R(2,3,
|
|
1323
|
-
3023);for(var y=0;y<w.length;y++){var z=w[y],v=z.nalus;t.push.apply(t,x(v));var B=AC(v);if(B){null==p&&(p=z.dts);var A=void 0;A=y+1<w.length?(w[y+1].dts||0)-(z.dts||0):1<w.length?(z.dts||0)-(w[y-1].dts||0):9E4*(c.endTime-c.startTime);r.push({data:B.data,size:B.data.byteLength,duration:A,
|
|
1323
|
+
3023);for(var y=0;y<w.length;y++){var z=w[y],v=z.nalus;t.push.apply(t,x(v));var B=AC(v);if(B){null==p&&(p=z.dts);var A=void 0;A=y+1<w.length?(w[y+1].dts||0)-(z.dts||0):1<w.length?(z.dts||0)-(w[y-1].dts||0):9E4*(c.endTime-c.startTime);r.push({data:B.data,size:B.data.byteLength,duration:A,rb:Math.round((z.pts||0)-(z.dts||0)),flags:{ub:0,hb:0,gb:0,cb:0,eb:B.Qd?2:1,vb:B.Qd?0:1}})}}var C=yC(t);if(!C||null==p)throw new R(2,3,3018);b.height=C.height;b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",
|
|
1324
1324
|
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,pb:[],wa:new Uint8Array([]),Ea:C.Ea,Oa:C.Oa,Qa:C.Qa,data:{Db:this.g,baseMediaDecodeTime:p,ob:r},stream:b};break;case "hvc":var E=[],J=null,I=[],G=k.Xc();if(!G.length)throw new R(2,3,3023);for(var H=0;H<G.length;H++){var K=G[H],M=K.nalus;I.push.apply(I,x(M));for(var P=!1,O=[],U=!1,X=u(M),Y=X.next();!Y.done;Y=X.next()){var Da=Y.value;switch(Da.type){case 1:case 0:var Ja=U=!0;break;case 19:case 20:case 21:P=Ja=U=!0;break;case 32:Ja=
|
|
1325
1325
|
!0;break;case 33:Ja=!0;break;case 34:Ja=!0;break;case 35:U=Ja=!0;break;case 39:case 40:Ja=!0;break;default:Ja=!1}if(U&&Ja){var lb=Da.fullData.byteLength,La=new Uint8Array(4);La[0]=lb>>24&255;La[1]=lb>>16&255;La[2]=lb>>8&255;La[3]=lb&255;O.push(La);O.push(Da.fullData)}}var ab=O.length?{data:Bc.apply(vc,x(O)),Qd:P}:null;if(ab){null==J&&null!=K.dts&&(J=K.dts);var Aa=void 0;Aa=H+1<G.length?(G[H+1].dts||0)-(K.dts||0):1<G.length?(K.dts||0)-(G[H-1].dts||0):9E4*(c.endTime-c.startTime);E.push({data:ab.data,
|
|
1326
|
-
size:ab.data.byteLength,duration:Aa,
|
|
1327
|
-
[],qb,eb=null,Af=u(k.fc()),Od=Af.next();!Od.done;Od=Af.next()){var re=Od.value,yd=re.data;if(yd){var Lc=0;qb=pC(yd,Lc);if(!qb)throw new R(2,3,3018);b.audioSamplingRate=qb.sampleRate;b.channelsCount=qb.channelCount;null==eb&&null!==re.pts&&(eb=re.pts);for(;Lc<yd.length;){var se=oC(yd,Lc);if(se){var Bf=se.Be+se.ba;Lc+Bf<=yd.length&&Jb.push({data:yd.subarray(Lc+se.Be,Lc+Bf),size:se.ba,duration:1024,
|
|
1328
|
-
3,3018);eb=9E4*c.startTime;var te=Gc("audio",b.codecs.split(","));if(!te||!b.channelsCount||!b.audioSamplingRate)throw new R(2,3,3018);qb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ab:te};var Pd=rC(te,b.channelsCount);if(!Pd)throw new R(2,3,3018);for(var fj=eb+9E4*(c.endTime-c.startTime)
|
|
1329
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:gj,duration:d,pb:[],wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:hj,ob:Jb},stream:b};break;case "ac3":for(var Cf=[],ue=0,Df=new Uint8Array([]),ac=null,
|
|
1330
|
-
Cf.push({data:
|
|
1331
|
-
|
|
1332
|
-
duration:d,pb:[],wa:
|
|
1333
|
-
3,3018);var
|
|
1334
|
-
break;case 5:Eb=[1,3,2,0,4,1,2,3];break;case 6:Eb=[1,4,2,0,4,1,2,3,5];break;case 7:Eb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Eb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Eb=[1,1,2,0,1];break;case 131:Eb=[1,1,3,0,1,2];break;case 132:Eb=[1,1,4,0,1,2,3];break;case 133:Eb=[1,1,5,0,1,2,3,4];break;case 134:Eb=[1,1,6,0,1,2,3,4,5];break;case 135:Eb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Eb=[1,1,8,0,1,2,3,4,5,6,7]}var
|
|
1335
|
-
8&255,$c.sampleRate>>>0&255,0,0].concat(x(Eb)));for(var
|
|
1336
|
-
3,3018);b.audioSamplingRate=$c.sampleRate;b.channelsCount=$c.channelCount;var
|
|
1337
|
-
this.i.get(b.id);else
|
|
1326
|
+
size:ab.data.byteLength,duration:Aa,rb:Math.round((K.pts||0)-(K.dts||0)),flags:{ub:0,hb:0,gb:0,cb:0,eb:ab.Qd?2:1,vb:ab.Qd?0:1}})}}var tb=BC(I);if(!tb||null==J)throw new R(2,3,3018);b.height=tb.height;b.width=tb.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,pb:[],wa:new Uint8Array([]),Ea:tb.Ea,Oa:tb.Oa,Qa:tb.Qa,data:{Db:this.g,baseMediaDecodeTime:J,ob:E},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Jb=
|
|
1327
|
+
[],qb,eb=null,Af=u(k.fc()),Od=Af.next();!Od.done;Od=Af.next()){var re=Od.value,yd=re.data;if(yd){var Lc=0;qb=pC(yd,Lc);if(!qb)throw new R(2,3,3018);b.audioSamplingRate=qb.sampleRate;b.channelsCount=qb.channelCount;null==eb&&null!==re.pts&&(eb=re.pts);for(;Lc<yd.length;){var se=oC(yd,Lc);if(se){var Bf=se.Be+se.ba;Lc+Bf<=yd.length&&Jb.push({data:yd.subarray(Lc+se.Be,Lc+Bf),size:se.ba,duration:1024,rb:0,flags:{ub:0,hb:0,gb:0,cb:0,eb:2,vb:0}});Lc+=Bf}else Lc++}}}if(!qb||null==eb){if(!k.Xc().length)throw new R(2,
|
|
1328
|
+
3,3018);eb=9E4*c.startTime;var te=Gc("audio",b.codecs.split(","));if(!te||!b.channelsCount||!b.audioSamplingRate)throw new R(2,3,3018);qb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ab:te};var Pd=rC(te,b.channelsCount);if(!Pd)throw new R(2,3,3018);for(var fj=eb+9E4*(c.endTime-c.startTime),ah=eb;ah<fj;)Jb.push({data:Pd,size:Pd.byteLength,duration:1024,rb:0,flags:{ub:0,hb:0,gb:0,cb:0,eb:2,vb:0}}),ah+=1024/qb.sampleRate*9E4}var gj=qb.sampleRate,hj=eb/9E4*gj;n={id:b.id,type:"audio",codecs:qb.ab,
|
|
1329
|
+
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:gj,duration:d,pb:[],wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:hj,ob:Jb},stream:b};break;case "ac3":for(var Cf=[],ue=0,Df=new Uint8Array([]),ac=null,vw=u(k.fc()),En=vw.next();!En.done;En=vw.next()){var Fn=En.value,Gn=Fn.data;null==ac&&null!==Fn.pts&&(ac=Fn.pts);for(var Mf=0;Mf<Gn.length;){var Ud=tC(Gn,Mf);Ud?(b.audioSamplingRate=Ud.sampleRate,b.channelsCount=Ud.channelCount,ue=Ud.sampleRate,Df=Ud.wa,
|
|
1330
|
+
Cf.push({data:Gn.subarray(Mf,Mf+Ud.ba),size:Ud.ba,duration:1536,rb:0,flags:{ub:0,hb:0,gb:0,cb:0,eb:2,vb:0}}),Mf+=Ud.ba):Mf++}}if(0==ue||0==Df.byteLength||null==ac)throw new R(2,3,3018);var mG=ac/9E4*ue;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ue,duration:d,pb:[],wa:Df,Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:mG,ob:Cf},stream:b};break;case "ec3":for(var ww=[],Qj=0,Hn=new Uint8Array([]),Rj=null,xw=u(k.fc()),In=xw.next();!In.done;In=
|
|
1331
|
+
xw.next()){var Jn=In.value,Kn=Jn.data;null==Rj&&null!==Jn.pts&&(Rj=Jn.pts);for(var Nf=0;Nf<Kn.length;){var Vd=wC(Kn,Nf);Vd?(b.audioSamplingRate=Vd.sampleRate,b.channelsCount=Vd.channelCount,Qj=Vd.sampleRate,Hn=Vd.wa,ww.push({data:Kn.subarray(Nf,Nf+Vd.ba),size:Vd.ba,duration:1536,rb:0,flags:{ub:0,hb:0,gb:0,cb:0,eb:2,vb:0}}),Nf+=Vd.ba):Nf++}}if(0==Qj||0==Hn.byteLength||null==Rj)throw new R(2,3,3018);var nG=Rj/9E4*Qj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Qj,
|
|
1332
|
+
duration:d,pb:[],wa:Hn,Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:nG,ob:ww},stream:b};break;case "mp3":for(var yw=[],Sj,Tj=null,zw=u(k.fc()),Ln=zw.next();!Ln.done;Ln=zw.next()){var Mn=Ln.value,oh=Mn.data;if(oh){null==Tj&&null!==Mn.pts&&(Tj=Mn.pts);for(var ze=0;ze<oh.length;){var Of=GC(oh,ze);Of?(Sj||(Sj=Of),ze+Of.ba<=oh.length&&yw.push({data:oh.subarray(ze,ze+Of.ba),size:Of.ba,duration:1152,rb:0,flags:{ub:0,hb:0,gb:0,cb:0,eb:2,vb:0}}),ze+=Of.ba):ze++}}}if(!Sj||null==Tj)throw new R(2,
|
|
1333
|
+
3,3018);var Aw=Sj.sampleRate,oG=Tj/9E4*Aw;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aw,duration:d,pb:[],wa:new Uint8Array([]),Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:oG,ob:yw},stream:b};break;case "opus":var Bw=[],Uj=null,$c=k.H;if(!$c)throw new R(2,3,3018);var Eb=[];switch($c.ri){case 1:case 2:Eb=[0];break;case 0:Eb=[255,1,1,0,1];break;case 128:Eb=[255,2,0,0,1];break;case 3:Eb=[1,2,1,0,2,1];break;case 4:Eb=[1,2,2,0,1,2,3];
|
|
1334
|
+
break;case 5:Eb=[1,3,2,0,4,1,2,3];break;case 6:Eb=[1,4,2,0,4,1,2,3,5];break;case 7:Eb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Eb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Eb=[1,1,2,0,1];break;case 131:Eb=[1,1,3,0,1,2];break;case 132:Eb=[1,1,4,0,1,2,3];break;case 133:Eb=[1,1,5,0,1,2,3,4];break;case 134:Eb=[1,1,6,0,1,2,3,4,5];break;case 135:Eb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Eb=[1,1,8,0,1,2,3,4,5,6,7]}var Cw=new Uint8Array([0,$c.channelCount,0,0,$c.sampleRate>>>24&255,$c.sampleRate>>>17&255,$c.sampleRate>>>
|
|
1335
|
+
8&255,$c.sampleRate>>>0&255,0,0].concat(x(Eb)));for(var Dw=$c.sampleRate,Ew=u(k.fc()),Nn=Ew.next();!Nn.done;Nn=Ew.next()){var On=Nn.value,Pf=On.data;null==Uj&&null!==On.pts&&(Uj=On.pts);for(var ph=0;ph<Pf.length;){for(var pG=0!==(Pf[ph+1]&16),qG=0!==(Pf[ph+1]&8),zd=ph+2,Vj=0;255===Pf[zd];)Vj+=255,zd+=1;Vj+=Pf[zd];zd+=1;zd+=pG?2:0;zd+=qG?2:0;var Fw=Pf.slice(zd,zd+Vj);Bw.push({data:Fw,size:Fw.byteLength,duration:960,rb:0,flags:{ub:0,hb:0,gb:0,cb:0,eb:2,vb:0}});ph=zd+Vj}}if(0==Cw.byteLength||null==Uj)throw new R(2,
|
|
1336
|
+
3,3018);b.audioSamplingRate=$c.sampleRate;b.channelsCount=$c.channelCount;var rG=Uj/9E4*Dw;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Dw,duration:d,pb:[],wa:Cw,Ea:new Uint8Array([]),Oa:0,Qa:0,data:{Db:this.g,baseMediaDecodeTime:rG,ob:Bw},stream:b}}n&&(l.push(n),n=null)}}catch(Pn){return Pn&&3023==Pn.code?Promise.resolve(new Uint8Array([])):Promise.reject(Pn)}if(!l.length)return Promise.reject(new R(2,3,3018));var Gw=new uw(l);if(this.i.has(b.id))var Qn=
|
|
1337
|
+
this.i.get(b.id);else Qn=Mw(Gw),this.i.set(b.id,Qn);var sG=cx(Gw);this.g++;var tG=Bc(Qn,sG);return Promise.resolve(tG)};N("shaka.transmuxer.TsTransmuxer",TC);TC.prototype.transmux=TC.prototype.transmux;TC.prototype.getOriginalMimeType=TC.prototype.getOriginalMimeType;TC.prototype.convertCodecs=TC.prototype.convertCodecs;TC.prototype.isSupported=TC.prototype.isSupported;TC.prototype.destroy=TC.prototype.destroy;var UC=["aac","ac-3","ec-3","mp3","opus"],VC=["avc","hevc"];
|
|
1338
1338
|
ce("video/mp2t",function(){return new TC("video/mp2t")},ge);/*
|
|
1339
1339
|
@license
|
|
1340
1340
|
EME Encryption Scheme Polyfill
|
|
@@ -1401,32 +1401,32 @@ sw:{C:"Kiswahili",D:"Swahili"},"sw-KE":{C:"Kiswahili",D:"Swahili (Kenya)"},ta:{C
|
|
|
1401
1401
|
D:"Thai"},"th-TH":{C:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",D:"Thai (Thailand)"},tl:{C:"Filipino",D:"Filipino"},"tl-PH":{C:"Filipino",D:"Filipino"},tlh:{C:"tlhIngan-Hol",D:"Klingon"},tr:{C:"T\u00fcrk\u00e7e",D:"Turkish"},"tr-TR":{C:"T\u00fcrk\u00e7e",D:"Turkish"},"tt-RU":{C:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",D:"Tatar"},uk:{C:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",D:"Ukrainian"},"uk-UA":{C:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
1402
1402
|
D:"Ukrainian"},ur:{C:"\u0627\u0631\u062f\u0648",D:"Urdu"},"ur-PK":{C:"\u0627\u0631\u062f\u0648",D:"Urdu"},uz:{C:"O'zbek",D:"Uzbek"},"uz-UZ":{C:"O'zbek",D:"Uzbek"},vi:{C:"Ti\u1ebfng Vi\u1ec7t",D:"Vietnamese"},"vi-VN":{C:"Ti\u1ebfng Vi\u1ec7t",D:"Vietnamese"},"xh-ZA":{C:"isiXhosa",D:"Xhosa"},yi:{C:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",D:"Yiddish"},"yi-DE":{C:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",D:"Yiddish (German)"},zh:{C:"\u4e2d\u6587",D:"Chinese"},"zh-HANS":{C:"\u4e2d\u6587\u7b80\u4f53",
|
|
1403
1403
|
D:"Chinese Simplified"},"zh-HANT":{C:"\u4e2d\u6587\u7e41\u9ad4",D:"Chinese Traditional"},"zh-CN":{C:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",D:"Chinese Simplified (China)"},"zh-HK":{C:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",D:"Chinese Traditional (Hong Kong)"},"zh-SG":{C:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",D:"Chinese Simplified (Singapore)"},"zh-TW":{C:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",D:"Chinese Traditional (Taiwan)"},"zu-ZA":{C:"isiZulu",D:"Zulu"}},mD=u(Object.keys(lD)),nD=mD.next();!nD.done;nD=
|
|
1404
|
-
mD.next()){var oD=nD.value;lD[oD.toLowerCase()]=lD[oD]};function pD(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new ed;this.localization=this.controls.ra;this.player=this.controls.Wc();this.video=this.controls.kc();this.adManager=this.player.ue();this.ad=b.getAd();this.eventManager.
|
|
1404
|
+
mD.next()){var oD=nD.value;lD[oD.toLowerCase()]=lD[oD]};function pD(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new ed;this.localization=this.controls.ra;this.player=this.controls.Wc();this.video=this.controls.kc();this.adManager=this.player.ue();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})}
|
|
1405
1405
|
pD.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};N("shaka.ui.Element",pD);pD.prototype.release=pD.prototype.release;function qD(a){return rD(a,"shaka-back-to-overflow-button")}function rD(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function sD(a){a&&(a=rD(a,"shaka-chosen-item"))&&a.parentElement.focus()}function tD(){var a=T("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function uD(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
1406
1406
|
function vD(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 wD(a,b){pD.call(this,a,b);var c=this;this.i=T("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=T("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Ob(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=vD(e-d,!1)+" / "+vD(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=
|
|
1407
|
-
""))});this.eventManager.
|
|
1408
|
-
"ad-stopped",function(){c.h.textContent="";uD(c.g,!1)});this.ad&&yD(this)}na(xD,pD);function yD(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));uD(a.g,!0)}}N("shaka.ui.AdPosition",xD);function zD(a,b){pD.call(this,a,b);var c=this;this.button=Sm();this.parent.appendChild(this.button);this.eventManager.
|
|
1409
|
-
c.h()});this.eventManager.
|
|
1410
|
-
zD.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};zD.prototype.g=function(){};zD.prototype.h=function(){};N("shaka.ui.PlayButton",zD);function CD(a,b){zD.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}na(CD,zD);CD.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};CD.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",CD);function DD(a,b){pD.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=T("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.
|
|
1411
|
-
!1)});this.eventManager.
|
|
1412
|
-
DD.registerElement=FD;var GD=new Map;function HD(a,b){pD.call(this,a,b);var c=this;this.m=null;this.
|
|
1413
|
-
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.V(1)):(c.
|
|
1414
|
-
this.parent.appendChild(this.container);this.eventManager.
|
|
1415
|
-
(e.h=!1,LD(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.
|
|
1407
|
+
""))});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.Ia();c.g.ya(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Ia(),this.g.ya(.5))}na(wD,pD);wD.prototype.release=function(){this.g.stop();this.g=null;pD.prototype.release.call(this)};N("shaka.ui.AdCounter",wD);function xD(a,b){pD.call(this,a,b);var c=this;this.g=T("div");this.g.classList.add("shaka-ad-position");uD(this.g,!1);this.parent.appendChild(this.g);this.h=T("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&yD(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&yD(c)});this.eventManager.o(this.adManager,"ad-started",function(){yD(c)});this.eventManager.o(this.adManager,
|
|
1408
|
+
"ad-stopped",function(){c.h.textContent="";uD(c.g,!1)});this.ad&&yD(this)}na(xD,pD);function yD(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));uD(a.g,!0)}}N("shaka.ui.AdPosition",xD);function zD(a,b){pD.call(this,a,b);var c=this;this.button=Sm();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();
|
|
1409
|
+
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(){c.ad&&c.ad.isLinear()?AD(c.controls):BD(c.controls)});this.ad&&(this.g(),this.h())}na(zD,pD);zD.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.Y;return a};
|
|
1410
|
+
zD.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};zD.prototype.g=function(){};zD.prototype.h=function(){};N("shaka.ui.PlayButton",zD);function CD(a,b){zD.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}na(CD,zD);CD.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};CD.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",CD);function DD(a,b){pD.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=T("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";uD(c.g,!0)}else uD(c.g,
|
|
1411
|
+
!1)});this.eventManager.o(window,"click",function(){uD(c.g,!1)});ED(this)}na(DD,pD);DD.prototype.release=function(){this.h=null;for(var a=u(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];pD.prototype.release.call(this)};function FD(a,b){GD.set(a,b)}function ED(a){for(var b=u(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=GD.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}N("shaka.ui.ContextMenu",DD);
|
|
1412
|
+
DD.registerElement=FD;var GD=new Map;function HD(a,b){pD.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Ob(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.Wf()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=T("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.lc()&&(c.controls.Bd()?(d.preventDefault(),c.controls.yc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
|
|
1413
|
+
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.V(1)):(c.s=!0,c.m=Date.now(),c.j.V(1))))});this.h=T("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=T("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}na(HD,pD);N("shaka.ui.HiddenSeekButton",HD);function ID(a,b){HD.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}na(ID,HD);N("shaka.ui.HiddenFastForwardButton",ID);function JD(a,b){HD.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}na(JD,HD);N("shaka.ui.HiddenRewindButton",JD);function KD(a,b,c,d){pD.call(this,a,b);var e=this;this.container=T("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.h=!1;this.bar=document.createElement("input");this.G=new Ob(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(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);
|
|
1414
|
+
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(f){e.controls.lc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.lc()&&(e.h=!0,LD(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&&(LD(e,f),e.onChange());f.stopPropagation()});this.eventManager.o(this.bar,"touchend",function(f){e.h&&
|
|
1415
|
+
(e.h=!1,LD(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,LD(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()})}na(KD,pD);q=KD.prototype;
|
|
1416
1416
|
q.release=function(){this.G&&(this.G.stop(),this.G=null);pD.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.G.V(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
|
|
1417
1417
|
q.setValue=function(a){this.h||(this.bar.value=a)};function LD(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}N("shaka.ui.RangeElement",KD);KD.prototype.setValue=KD.prototype.setValue;KD.prototype.getValue=KD.prototype.getValue;KD.prototype.changeTo=KD.prototype.changeTo;KD.prototype.onChangeEnd=KD.prototype.onChangeEnd;
|
|
1418
|
-
KD.prototype.onChange=KD.prototype.onChange;KD.prototype.onChangeStart=KD.prototype.onChangeStart;KD.prototype.setRange=KD.prototype.setRange;function MD(a,b){KD.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.F=T("div");this.F.classList.add("shaka-ad-markers");this.container.insertBefore(this.F,this.container.childNodes[0]);this.H=this.controls.g;this.
|
|
1419
|
-
this.g=T("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.u=T("div");this.u.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.u);this.container.appendChild(this.i);this.j=this.l=null;this.J=!1;this.m=new Ob(function(){OD(c)});this.A=[];this.eventManager.
|
|
1420
|
-
function(){QD(c)||uD(c.container,!1)});this.eventManager.
|
|
1421
|
-
(parseFloat(c.bar.max)-f)/e.width*d))}else OD(c)});this.eventManager.
|
|
1422
|
-
q.onChange=function(){if(this.video.duration)if(this.update(),this.
|
|
1418
|
+
KD.prototype.onChange=KD.prototype.onChange;KD.prototype.onChangeStart=KD.prototype.onChangeStart;KD.prototype.setRange=KD.prototype.setRange;function MD(a,b){KD.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.F=T("div");this.F.classList.add("shaka-ad-markers");this.container.insertBefore(this.F,this.container.childNodes[0]);this.H=this.controls.g;this.s=new Ob(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.I=new Ob(function(){ND(c)});this.K=!1;this.i=T("div");this.i.id="shaka-player-ui-thumbnail-container";
|
|
1419
|
+
this.g=T("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.u=T("div");this.u.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.u);this.container.appendChild(this.i);this.j=this.l=null;this.J=!1;this.m=new Ob(function(){OD(c)});this.A=[];this.eventManager.o(this.localization,"locale-updated",function(){return PD(c)});this.eventManager.o(this.localization,"locale-changed",function(){return PD(c)});this.eventManager.o(this.adManager,"ad-started",
|
|
1420
|
+
function(){QD(c)||uD(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){QD(c)&&uD(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.A=d.cuepoints;RD(c)});this.eventManager.o(this.player,"unloading",function(){c.A=[];RD(c);c.j&&(c.j.abort(),c.j=null);c.l=null;OD(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.player.ve().length){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;SD(c,d,Math.round(f+
|
|
1421
|
+
(parseFloat(c.bar.max)-f)/e.width*d))}else OD(c)});this.eventManager.o(this.container,"mouseleave",function(){c.m.stop();c.m.V(.25)});this.setValue(this.video.currentTime);this.update();PD(this);this.ad&&uD(this.container,!1)}na(MD,KD);q=MD.prototype;q.release=function(){this.s&&(this.s.stop(),this.s=null,this.I.stop(),this.I=null);KD.prototype.release.call(this)};q.onChangeStart=function(){this.K=!this.video.paused;this.controls.Hg(!0);this.video.pause();this.m.stop();this.J=!0};
|
|
1422
|
+
q.onChange=function(){if(this.video.duration)if(this.update(),this.s.V(.125),this.player.ve().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());SD(this,(d-a)/((b-a)/c.width),d)}else OD(this)};q.onChangeEnd=function(){this.s.Ia();this.controls.Hg(!1);this.K&&this.video.play();this.J&&(this.J=!1,this.m.stop(),this.m.V(.25))};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1423
1423
|
q.update=function(){var a=this.H.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.Pa(),g=f.end-f.start;this.setRange(f.start,f.end);QD(this)?(uD(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.H.showUnbufferedStart?
|
|
1424
1424
|
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()+")")):uD(this.container,!1)};
|
|
1425
1425
|
function ND(a){if(a.A.length){for(var b=a.player.Pa(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=u(a.A),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=u(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
1426
1426
|
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent"}function RD(a){ND(a);var b=a.player.Pa();b=b.end-b.start;a.player.U()&&5<b&&a.I.ya(1)}function QD(a){var b=a.player.Pa();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function PD(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1427
1427
|
function SD(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,t,w,y,z,v,B,A;L(function(C){switch(C.g){case 1:d=TD(a);if(!d)return OD(a),C.return();0>c&&(c=0);e=a.player.Pa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return D(C,a.player.$f(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return OD(a),C.return();a.player.U()?(h=e.end-c,a.u.textContent=1>h?a.localization.resolve("LIVE"):"-"+UD(h)):a.u.textContent=UD(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1428
|
-
-(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";r=g.uris[0].split("#xywh=")[0];if(a.l&&r===a.l.uris[0].split("#xywh=")[0]&&g.segment.Mb()==a.l.segment.Mb()&&g.segment.Jb()==a.l.segment.Jb()){C.B(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!r.startsWith("offline:")){C.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ra(C,5);p=
|
|
1429
|
-
a.j=a.player.hc().request(p,t,{type:1});return D(C,a.j.promise,7);case 7:w=C.h;a.j=null;"mjpg"==d.codecs?(y=(new
|
|
1428
|
+
-(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";r=g.uris[0].split("#xywh=")[0];if(a.l&&r===a.l.uris[0].split("#xywh=")[0]&&g.segment.Mb()==a.l.segment.Mb()&&g.segment.Jb()==a.l.segment.Jb()){C.B(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!r.startsWith("offline:")){C.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ra(C,5);p=Ag;t=sl(g.segment.ka(),g.segment.Mb(),g.segment.Jb(),a.player.getConfiguration().streaming.retryParameters);
|
|
1429
|
+
a.j=a.player.hc().request(p,t,{type:1});return D(C,a.j.promise,7);case 7:w=C.h;a.j=null;"mjpg"==d.codecs?(y=(new Jg).box("mdat",Tg(function(E){r=URL.createObjectURL(new Blob([E],{type:"image/jpeg"}))})),y.parse(w.data,!1)):(z=d.mimeType||"image/jpeg",v=new Blob([w.data],{type:z}),r=URL.createObjectURL(v));ta(C,4);break;case 5:B=ua(C);if(7001==B.code)return C.return();throw B;case 4:try{a.i.removeChild(a.g)}catch(E){}a.g=T("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=r;
|
|
1430
1430
|
a.g.onload=function(){r.startsWith("blob:")&&URL.revokeObjectURL(r)};a.i.insertBefore(a.g,a.i.firstChild);case 3:A=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="-"+A*g.positionX+"px",a.g.style.top="-"+A*g.positionY+"px",a.g.style.transform="scale("+A+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
1431
1431
|
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",F(C)}})}
|
|
1432
1432
|
function TD(a){var b=a.player.ve();if(!b.length)return null;for(var c={},d=u(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={mf:c.mf,kf:c.kf},e=d.next())if(c.mf=e.value,c.kf=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.mf&&g.bandwidth<.01*f.kf}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b.find(function(f){return"application/mp4"==f.mimeType&&
|
|
@@ -1440,9 +1440,9 @@ function WD(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}
|
|
|
1440
1440
|
function YD(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],r=b[9],p=b[10],t=b[11],w=b[12],y=b[13],z=b[14];b=b[15];var v=c[0],B=c[1],A=c[2],C=c[3];a[0]=v*d+B*h+A*n+C*w;a[1]=v*e+B*k+A*r+C*y;a[2]=v*f+B*l+A*p+C*z;a[3]=v*g+B*m+A*t+C*b;v=c[4];B=c[5];A=c[6];C=c[7];a[4]=v*d+B*h+A*n+C*w;a[5]=v*e+B*k+A*r+C*y;a[6]=v*f+B*l+A*p+C*z;a[7]=v*g+B*m+A*t+C*b;v=c[8];B=c[9];A=c[10];C=c[11];a[8]=v*d+B*h+A*n+C*w;a[9]=v*e+B*k+A*r+C*y;a[10]=v*f+B*l+A*p+C*z;a[11]=v*g+B*m+A*t+C*b;v=c[12];B=c[13];
|
|
1441
1441
|
A=c[14];C=c[15];a[12]=v*d+B*h+A*n+C*w;a[13]=v*e+B*k+A*r+C*y;a[14]=v*f+B*l+A*p+C*z;a[15]=v*g+B*m+A*t+C*b}
|
|
1442
1442
|
function ZD(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-
|
|
1443
|
-
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 $D(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 aE(){var a=new Float32Array(4);a[3]=1;return a}function bE(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 cE(a,b,c,d,e){this.m=a;this.oa=b;this.l=c;this.g=d;this.
|
|
1443
|
+
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 $D(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 aE(){var a=new Float32Array(4);a[3]=1;return a}function bE(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 cE(a,b,c,d,e){this.m=a;this.oa=b;this.l=c;this.g=d;this.s=new ed;this.L=aE();this.h=aE();this.sa=this.ma=this.aa=this.j=null;this.G=WD();this.I=WD();this.M=WD();this.Y=WD();this.A=null;this.O=!1;this.J=this.u=null;this.qa=this.ra=0;this.$=this.P=this.S=this.K=null;this.H=0;this.i=75;this.X=0;this.F=e;dE(this)}cE.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)};
|
|
1444
1444
|
cE.prototype.hd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.l.width,this.l.height);eE(this,!1)};
|
|
1445
|
-
function dE(a){fE(a);gE(a);hE(a);iE(a);jE(a);a.
|
|
1445
|
+
function dE(a){fE(a);gE(a);hE(a);iE(a);jE(a);a.s.na(a.m,"loadeddata",function(){var b;a.s.o(a.m,"canplaythrough",function(){eE(a)});a.s.o(a.m,"playing",function(){a.u&&a.u.stop();if(!b){var c=a.oa.sb();c=u(c);for(var d=c.next();!d.done;d=c.next())(d=d.value.frameRate)&&(!b||b<d)&&(b=d)}b||(b=60);eE(a);a.u=(new Ob(function(){eE(a)})).Ia().ya(1/b)});a.s.o(a.m,"pause",function(){a.u&&a.u.stop();a.u=null;eE(a)});a.s.o(a.m,"seeked",function(){eE(a)});a.s.o(document,"visibilitychange",function(){eE(a)})})}
|
|
1446
1446
|
function fE(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 r=1/Math.sqrt(d*d+e*e+m*m);d*=r;e*=r;m*=r;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(r=Math.sqrt(n*n+l*l+h*h))?(r=1/r,n*=r,l*=r,h*=r):h=l=n=0;k=e*h-m*l;var p=m*n-d*h;var t=d*l-e*n;(r=Math.sqrt(k*k+p*p+t*t))?(r=1/r,k*=r,p*=r,t*=r):t=p=k=0;b[0]=n;b[1]=k;b[2]=
|
|
1447
1447
|
d;b[3]=0;b[4]=l;b[5]=p;b[6]=e;b[7]=0;b[8]=h;b[9]=t;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+p*g+t*c);b[14]=-(d*f+e*g+m*c);b[15]=1}ZD(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]}
|
|
1448
1448
|
function gE(a){kE(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)}
|
|
@@ -1460,47 +1460,47 @@ a.Y),YD(a.M,a.I,a.M)),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa),a.g.vertexAttribPoin
|
|
|
1460
1460
|
function kE(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.ra!==b||a.qa!==c){a.l.width=b;a.l.height=c;a.ra=b;a.qa=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)}}
|
|
1461
1461
|
function mE(a,b,c,d){var e=90*Math.PI/180;var f="cubemap"==a.F?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],r=f[9],p=f[10],t=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-r*g;f[2]=l*b-p*g;f[3]=m*b-t*g;f[8]=h*g+n*b;f[9]=k*g+r*b;f[10]=l*g+p*b;f[11]=m*g+t*b;a.H+=c;a.H<e&&a.H>-e?(e=WD(),g=WD(),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],r=g[9],p=g[10],t=g[11],g!==
|
|
1462
1462
|
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+r*c,e[6]=l*b+p*c,e[7]=m*b+t*c,e[8]=n*b-h*c,e[9]=r*b-k*c,e[10]=p*b-l*c,e[11]=t*b-m*c,YD(f,e,f)):a.H-=c;c=WD();e=WD();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];r=e[6];p=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+r*g;c[3]=l*d+p*g;c[4]=m*d-b*g;c[5]=n*d-h*g;c[6]=r*
|
|
1463
|
-
d-k*g;c[7]=p*d-l*g;YD(f,c,f);eE(a,!1)}function nE(a,b){if(void 0===b||b)ZD(a.h,a.G),a.X=0,a.A=aE(),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=WD();bE(a.h,a.h);$D(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.X?a.J=(new Ob(function(){nE(a,!1);a.H=0;a.X++;eE(a,!1)})).V(.025):($D(b,a.L),a.G=b)};function oE(a,b,c,d,e){bb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.
|
|
1464
|
-
"unloading",function(){f.l=null;qE(f)});qE(this)}na(oE,bb);q=oE.prototype;q.release=function(){this.
|
|
1463
|
+
d-k*g;c[7]=p*d-l*g;YD(f,c,f);eE(a,!1)}function nE(a,b){if(void 0===b||b)ZD(a.h,a.G),a.X=0,a.A=aE(),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=WD();bE(a.h,a.h);$D(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.X?a.J=(new Ob(function(){nE(a,!1);a.H=0;a.X++;eE(a,!1)})).V(.025):($D(b,a.L),a.G=b)};function oE(a,b,c,d,e){bb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.s=new ed;this.h=new ed;this.G=pE(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.F=this.A=0;this.l=null;this.s.o(d,"loading",function(){f.g&&nE(f.g);qE(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}qE(f)});this.s.o(d,"nospatialvideoinfo",function(){f.l=null;qE(f)});this.s.o(d,
|
|
1464
|
+
"unloading",function(){f.l=null;qE(f)});qE(this)}na(oE,bb);q=oE.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);bb.prototype.release.call(this)};q.configure=function(a){this.u=a;qE(this)};q.Cf=function(){return!!this.G};q.Nb=function(){return!!this.g};q.hd=function(){this.g?this.g.hd():Ua("Not playing VR content")};q.eg=function(a){this.g?mE(this.g,a*rE,0,0):Ua("Not playing VR content")};
|
|
1465
1465
|
q.cg=function(a){this.g?mE(this.g,0,a*rE,0):Ua("Not playing VR content")};q.dg=function(a){this.g?mE(this.g,0,0,a*rE):Ua("Not playing VR content")};
|
|
1466
1466
|
function qE(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProjectionMode;a.g?a.g.F!=b&&(a.h.mb(),a.g.release(),sE(a,b)):(a.m.style.display="",sE(a,b),a.dispatchEvent(new Q("vrstatuschanged",(new Map).set("newStatus",a.Nb()))))}else a.u.displayInVrMode||a.l||!a.g||(a.m.style.display="none",a.h.mb(),a.g.release(),a.g=null,a.dispatchEvent(new Q("vrstatuschanged",(new Map).set("newStatus",a.Nb()))))}function sE(a,b){a.G&&a.m&&(a.g=new cE(a.L,a.K,a.m,a.G,b),tE(a))}
|
|
1467
1467
|
function pE(a){if(!a.m||Wb()||Zb()||Ub()||fc()||gc()||Vb("AFT")||Vb("PC=EOS")||Vb("PC=APL")||Vb("VirginMedia")||ec()||Vb("WPE")||cc()||hc())return null;for(var b=u(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null}
|
|
1468
|
-
function tE(a){a.h.
|
|
1469
|
-
a.h.
|
|
1468
|
+
function tE(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.F=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.F=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);eE(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.j&&uE(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
|
|
1469
|
+
a.h.o(a.i,"touchmove",function(d){a.j&&uE(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,vE(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Ya(a.i,
|
|
1470
1470
|
"click",c);a.h.Ya(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Ya(a.i,"touchend",c);"granted"!==d?(a.h.na(a.i,"click",c),a.h.na(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.na(a.i,"touchend",c)):(b=!0,vE(a))}).catch(function(){a.h.Ya(a.i,"click",c);a.h.Ya(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Ya(a.i,"touchend",c);a.h.na(a.i,"click",c);a.h.na(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.na(a.i,"touchend",c)})}else b=!0,vE(a)}
|
|
1471
|
-
function vE(a){a.h.
|
|
1472
|
-
g.next())uD(h.value,!1)});this.Fa=new Ob(function(){f.lc()&&xE(f)});this.I=null;this.H=[];this.ra=yE();this.i=new ed;this.u=null;this.configure(this.g);zE(this);this.ma=new Set;AE(this);this.Fa.ya(this.g.refreshTickInSeconds);this.i.
|
|
1473
|
-
q.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.
|
|
1474
|
-
a.oa.destroy(),7);case 7:a.oa=null;case 6:a.G=null,a.
|
|
1475
|
-
q.configure=function(a){this.g=a;this.F.eh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Za&&(this.Za=null);this.Ka&&(this.Ka=null);this.u&&this.u.configure(a);this.h?(Tm(this.h),BE(this)):(EE(this),FE(this),this.u=new oE(this.h,this.Xb,this.
|
|
1471
|
+
function vE(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?mE(a.g,c*rE*-1,e*rE*-1,0):mE(a.g,c*rE*-1,d*rE,0)})}function uE(a,b,c){var d=-.6*Math.PI/180;mE(a.g,(b-a.A)*d,-1*(c-a.F)*d,0);a.A=b;a.F=c}var rE=Math.PI/180;function Z(a,b,c,d,e){bb.call(this);var f=this;this.S=!0;this.g=e;this.F=new nq(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.qa=!0;this.A=this.F.kc();this.s=c;this.G=this.F.Wc();this.oa=a;this.j=b;this.Xb=d;this.Ja=this.G.ue();this.l=this.m=null;this.Y=!1;this.J=[];this.Gb=[];this.$a=!1;this.P=new Ob(function(){f.j.style.cursor="none";f.$a=!1;wE(f)});this.aa=new Ob(function(){f.h.removeAttribute("shown");f.K.V(2)});this.K=new Ob(function(){for(var g=u(f.J),h=g.next();!h.done;h=
|
|
1472
|
+
g.next())uD(h.value,!1)});this.Fa=new Ob(function(){f.lc()&&xE(f)});this.I=null;this.H=[];this.ra=yE();this.i=new ed;this.u=null;this.configure(this.g);zE(this);this.ma=new Set;AE(this);this.Fa.ya(this.g.refreshTickInSeconds);this.i.o(this.ra,"locale-changed",function(g){f.Ja.setLocale(g.locales[0])})}na(Z,bb);q=Z.prototype;
|
|
1473
|
+
q.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.s){b.B(2);break}return D(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.P&&(a.P.stop(),a.P=null);a.aa&&(a.aa.stop(),a.aa=null);a.K&&(a.K.stop(),a.K=null);a.Fa&&(a.Fa.stop(),a.Fa=null);a.u&&(a.u.release(),a.u=null);BE(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.F){b.B(4);break}return D(b,a.F.destroy(),5);case 5:a.F=null;case 4:if(!a.oa){b.B(6);break}return D(b,
|
|
1474
|
+
a.oa.destroy(),7);case 7:a.oa=null;case 6:a.G=null,a.s=null,a.A=null,a.ra=null,a.ma.clear(),bb.prototype.release.call(a),F(b)}})};function BE(a){for(var b=u(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function CE(a,b){DE.set(a,b)}q.ni=function(a){this.qa=a;AE(this)};q.wj=function(){wE(this)};
|
|
1475
|
+
q.configure=function(a){this.g=a;this.F.eh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Za&&(this.Za=null);this.Ka&&(this.Ka=null);this.u&&this.u.configure(a);this.h?(Tm(this.h),BE(this)):(EE(this),FE(this),this.u=new oE(this.h,this.Xb,this.s,this.G,this.g));this.j.classList.add("shaka-video-container");this.s.classList.add("shaka-video");GE(this);this.g.addBigPlayButton&&HE(this);this.g.customContextMenu&&(this.Ka=new DD(this.X,this),this.H.push(this.Ka));this.$||
|
|
1476
1476
|
IE(this);this.g.seekOnTaps&&(JE(this),KE(this));this.Ua=T("div");this.Ua.classList.add("shaka-server-side-ad-container");this.h.appendChild(this.Ua);LE(this);this.J=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.J.push.apply(this.J,x(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));ME(this);this.Gb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));wE(this);a=u(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=
|
|
1477
|
-
a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.
|
|
1478
|
-
q.Qi=function(){return this.
|
|
1479
|
-
q.yc=function(){this.K.Ia()};q.Pd=function(){return document.fullscreenEnabled||this.
|
|
1480
|
-
function NE(a){var b,c,d;return L(function(e){switch(e.g){case 1:ra(e,2);if(!document.fullscreenEnabled){b=a.
|
|
1481
|
-
4,2);break;case 9:ua(e,2);case 4:ta(e,0);break;case 2:d=ua(e),a.dispatchEvent(new Q("error",(new Map).set("detail",d))),F(e)}})}function OE(a){var b;return L(function(c){if(!document.fullscreenEnabled)return b=a.
|
|
1482
|
-
q.De=function(){return this.F.Ga()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.
|
|
1483
|
-
q.$d=function(){var a=this,b,c;return L(function(d){if(1==d.g)return ra(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?D(d,PE(a),5):document.pictureInPictureElement?D(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.
|
|
1477
|
+
a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.o(b,"click",c);this.i.o(b,"dblclick",c)}};q.Eg=function(a){(this.S=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");wE(this)};q.Oh=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.Eg(!1)};q.getAd=function(){return this.m};q.Ei=function(){return this.F};q.Ri=function(){return this.ra};q.hj=function(){return this.j};q.kc=function(){return this.A};
|
|
1478
|
+
q.Qi=function(){return this.s};q.Wc=function(){return this.G};q.Pi=function(){return this.oa};q.Ji=function(){return this.h};q.Zi=function(){return this.Ua};q.Gi=function(){return this.O};q.Hi=function(){return this.g};q.tj=function(){return this.Y};q.Hg=function(a){this.Y=a};q.nj=function(){return this.qa};q.Wf=function(){return this.l?this.l.getValue():this.A.currentTime};q.Qh=function(a){this.I=a};q.Bd=function(){return this.J.some(function(a){return!a.classList.contains("shaka-hidden")})};
|
|
1479
|
+
q.yc=function(){this.K.Ia()};q.Pd=function(){return document.fullscreenEnabled||this.s.webkitSupportsFullscreen?!0:!1};q.Zc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.s;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1480
|
+
function NE(a){var b,c,d;return L(function(e){switch(e.g){case 1:ra(e,2);if(!document.fullscreenEnabled){b=a.s;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!document.pictureInPictureElement){e.B(5);break}return D(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,D(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}ra(e,9);return D(e,screen.orientation.lock("landscape"),11);case 11:ta(e,
|
|
1481
|
+
4,2);break;case 9:ua(e,2);case 4:ta(e,0);break;case 2:d=ua(e),a.dispatchEvent(new Q("error",(new Map).set("detail",d))),F(e)}})}function OE(a){var b;return L(function(c){if(!document.fullscreenEnabled)return b=a.s,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return D(c,document.exitFullscreen(),0)})}q.cf=function(){var a=this;return L(function(b){return a.Zc()?D(b,OE(a),0):D(b,NE(a),0)})};
|
|
1482
|
+
q.De=function(){return this.F.Ga()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.s.disablePictureInPicture:!1};q.Ee=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
|
|
1483
|
+
q.$d=function(){var a=this,b,c;return L(function(d){if(1==d.g)return ra(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?D(d,PE(a),5):document.pictureInPictureElement?D(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.s,D(d,b.requestPictureInPicture(),5));if(2!=d.g)return ta(d,0);c=ua(d);a.dispatchEvent(new Q("error",(new Map).set("detail",c)));F(d)})};
|
|
1484
1484
|
function PE(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.j;c=b.getBoundingClientRect();return D(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;QE(d);e=b.parentNode||document.body;f=a.j.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%}");
|
|
1485
1485
|
d.document.head.append(g);d.document.body.append(b);a.i.na(d,"pagehide",function(){f.replaceWith(b)});F(h)})}
|
|
1486
1486
|
function QE(a){var b=[].concat(x(document.styleSheets)).map(function(d){try{return[].concat(x(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.Vh=function(){uD(this.L,!0);uD(this.O,!0);this.h.setAttribute("ad-active","true")};
|
|
1487
1487
|
q.sh=function(){uD(this.L,!1);uD(this.O,!1);this.h.removeAttribute("ad-active")};function BD(a){a.S&&a.A.duration&&(a.G.Qc(),a.A.paused&&!a.Y?a.A.play():a.A.pause())}function AD(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
1488
|
-
function EE(a){a.h=T("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.
|
|
1488
|
+
function EE(a){a.h=T("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.A.duration&&(a.lc()?a.I=Date.now():(RE(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){SE(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.Pd()&&a.cf()})}
|
|
1489
1489
|
function HE(a){var b=T("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Za=new CD(b,a);a.H.push(a.Za)}function GE(a){var b=T("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function TE(a){a.L=T("div");a.L.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();uD(a.L,b);a.M.appendChild(a.L);b=new xD(a.L,a);a.H.push(b);b=new wD(a.L,a);a.H.push(b)}
|
|
1490
1490
|
function IE(a){a.$=T("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=T("div");b.classList.add("shaka-spinner");a.$.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",
|
|
1491
1491
|
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function JE(a){var b=T("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.Vb=new ID(b,a);a.H.push(a.Vb)}function KE(a){var b=T("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.Wb=new JD(b,a);a.H.push(a.Wb)}
|
|
1492
|
-
function LE(a){a.M=T("div");a.M.classList.add("shaka-bottom-controls");a.M.classList.add("shaka-no-propagation");a.h.appendChild(a.M);a.i.
|
|
1493
|
-
(c=DE.get(c).create(a.X,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function ME(a){if(a.g.addSeekBar)a.l=UE.create(a.M,a),a.H.push(a.l);else{a=u(a.J);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function FE(a){a.O=T("div");a.O.classList.add("shaka-client-side-ad-container");uD(a.O,!1);a.i.
|
|
1494
|
-
function zE(a){a.i.
|
|
1495
|
-
a.i.
|
|
1496
|
-
WE(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&e&&!d&&0<c&&(b.preventDefault(),WE(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),WE(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),WE(a,a.l.getValue()+f));break;case "Home":a.l&&WE(a,a.G.Pa().start);break;case "End":a.l&&WE(a,a.G.Pa().end);break;case "f":a.Pd()&&a.cf();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.
|
|
1497
|
-
case " ":e&&XE(a)}}});a.i.
|
|
1492
|
+
function LE(a){a.M=T("div");a.M.classList.add("shaka-bottom-controls");a.M.classList.add("shaka-no-propagation");a.h.appendChild(a.M);a.i.o(a.M,"click",function(d){d.target.closest(".shaka-overflow-button")||a.yc()});TE(a);a.X=T("div");a.X.classList.add("shaka-controls-button-panel");a.X.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.X.classList.add("shaka-tooltips-on");a.M.appendChild(a.X);for(var b=u(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,DE.get(c)?
|
|
1493
|
+
(c=DE.get(c).create(a.X,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function ME(a){if(a.g.addSeekBar)a.l=UE.create(a.M,a),a.H.push(a.l);else{a=u(a.J);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function FE(a){a.O=T("div");a.O.classList.add("shaka-client-side-ad-container");uD(a.O,!1);a.i.o(a.O,"click",function(){SE(a)});a.j.appendChild(a.O)}
|
|
1494
|
+
function zE(a){a.i.o(a.G,"buffering",function(){a.S&&uD(a.$,a.G.Od())});a.S&&uD(a.$,a.G.Od());a.i.o(window,"keydown",function(b){VE(a,b)});a.i.o(window,"click",function(){return a.yc()});a.i.o(a,"submenuopen",function(){a.yc()});a.i.o(a.A,"play",function(){wE(a)});a.i.o(a.A,"pause",function(){wE(a)});a.i.o(a.j,"mousemove",function(b){RE(a,b)});a.i.o(a.j,"touchmove",function(b){RE(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){RE(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.I||a.P.Ia()});
|
|
1495
|
+
a.i.o(a.F,"caststatuschanged",function(){AE(a)});a.i.o(a.u,"vrstatuschanged",function(){a.dispatchEvent(new Q("vrstatuschanged"))});a.i.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&RE(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&e&&!d&&0<c&&(b.preventDefault(),
|
|
1496
|
+
WE(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&e&&!d&&0<c&&(b.preventDefault(),WE(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),WE(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),WE(a,a.l.getValue()+f));break;case "Home":a.l&&WE(a,a.G.Pa().start);break;case "End":a.l&&WE(a,a.G.Pa().end);break;case "f":a.Pd()&&a.cf();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.s.muted=!a.s.muted;break;case "p":a.De()&&a.$d();break;
|
|
1497
|
+
case " ":e&&XE(a)}}});a.i.o(a.j,"keyup",function(b){a.ma.delete(b.key)});a.i.o(a.Ja,"ad-started",function(b){a.m=b.ad;a.Vh()});a.i.o(a.Ja,"ad-stopped",function(){a.m=null;a.sh()});screen.orientation&&a.i.o(screen.orientation,"change",function(){return L(function(b){return D(b,YE(a),0)})})}
|
|
1498
1498
|
function YE(a){return L(function(b){return a.A&&0!=a.A.readyState&&!a.F.Ga()&&a.g.enableFullscreenOnRotation&&a.Pd()?screen.orientation.type.includes("landscape")&&!a.Zc()?D(b,NE(a),0):screen.orientation.type.includes("portrait")&&a.Zc()?D(b,OE(a),0):b.B(0):b.return()})}
|
|
1499
1499
|
function RE(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),wE(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.I=Date.now():a.I+1E3<Date.now()&&(a.I=null);a.I&&"mousemove"==b.type||(a.j.style.cursor="",a.$a=!0,a.K.stop(),a.lc()||(xE(a),wE(a)),a.P.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.I||a.P.V(3))}function ZE(a){return window.matchMedia("hover: hover").matches?a.Gb.some(function(b){return b.matches(":hover")}):!1}
|
|
1500
1500
|
function wE(a){var b=a.m?a.m.isPaused():!1,c=a.A.paused&&!a.Y,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.$a||d||ZE(a)?(xE(a),a.h.setAttribute("shown","true"),a.aa.stop()):a.aa.V(a.g.fadeDelay)}function SE(a){a.S&&!a.Nb()&&(a.Bd()?a.K.Ia():a.g.singleClickForPlayAndPause&&XE(a))}function XE(a){a.m&&a.m.isLinear()?AD(a):BD(a)}
|
|
1501
1501
|
function AE(a){var b=a.F.Ga();a.dispatchEvent(new Q("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}q.lc=function(){return this.S?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function WE(a,b){a.l.changeTo(b);a.lc()&&xE(a)}
|
|
1502
1502
|
function xE(a){if(a.l)if(a.l.setValue(a.A.currentTime),a.l.update(),a.l.isShowing())for(var b=u(a.J),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=u(a.J),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new Q("timeandseekrangeupdated"))}
|
|
1503
|
-
function VE(a,b){a.ma.add(b.key);var c=a.Bd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),wE(a),a.i.
|
|
1503
|
+
function VE(a,b){a.ma.add(b.key);var c=a.Bd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),wE(a),a.i.o(window,"mousedown",function(){a.i.Ya(window,"mousedown")}));"Escape"==b.key&&a.K.Ia();c&&a.ma.has("Tab")&&$E(a,b)}
|
|
1504
1504
|
function $E(a,b){var c=a.J.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ma.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
1505
1505
|
q.hk=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});RE(this,a)};q.mj=function(){this.I||this.P.Ia()};q.Cf=function(){return this.u.Cf()};q.Nb=function(){return this.u.Nb()};
|
|
1506
1506
|
q.fj=function(){var a=this.u;if(a.g){a=a.g;ZD(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 Ua("Not playing VR content"),a=null;return a};q.ej=function(){var a=this.u;a.g?a=a.g.i:(Ua("Not playing VR content"),a=null);return a};
|
|
@@ -1569,12 +1569,12 @@ Z.prototype.toggleStereoscopicMode=Z.prototype.hd;Z.prototype.setVRFieldOfView=Z
|
|
|
1569
1569
|
Z.prototype.isPiPAllowed=Z.prototype.De;Z.prototype.toggleFullScreen=Z.prototype.cf;Z.prototype.isFullScreenEnabled=Z.prototype.Zc;Z.prototype.isFullScreenSupported=Z.prototype.Pd;Z.prototype.hideSettingsMenus=Z.prototype.yc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Bd;Z.prototype.setLastTouchEventTime=Z.prototype.Qh;Z.prototype.getDisplayTime=Z.prototype.Wf;Z.prototype.isCastAllowed=Z.prototype.nj;Z.prototype.setSeeking=Z.prototype.Hg;Z.prototype.isSeeking=Z.prototype.tj;
|
|
1570
1570
|
Z.prototype.getConfig=Z.prototype.Hi;Z.prototype.getClientSideAdContainer=Z.prototype.Gi;Z.prototype.getServerSideAdContainer=Z.prototype.Zi;Z.prototype.getControlsContainer=Z.prototype.Ji;Z.prototype.getLocalPlayer=Z.prototype.Pi;Z.prototype.getPlayer=Z.prototype.Wc;Z.prototype.getLocalVideo=Z.prototype.Qi;Z.prototype.getVideo=Z.prototype.kc;Z.prototype.getVideoContainer=Z.prototype.hj;Z.prototype.getLocalization=Z.prototype.Ri;Z.prototype.getCastProxy=Z.prototype.Ei;Z.prototype.getAd=Z.prototype.getAd;
|
|
1571
1571
|
Z.prototype.setEnabledNativeControls=Z.prototype.Oh;Z.prototype.setEnabledShakaControls=Z.prototype.Eg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.wj;Z.prototype.allowCast=Z.prototype.ni;Z.registerSeekBar=function(a){UE=a};Z.registerElement=CE;Z.prototype.destroy=Z.prototype.destroy;var DE=new Map,UE=new VD;function aF(a,b){pD.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=Sm();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=T("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");
|
|
1572
|
-
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);bF(this);this.eventManager.
|
|
1573
|
-
d.stopPropagation()});this.eventManager.
|
|
1572
|
+
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);bF(this);this.eventManager.o(this.localization,"locale-updated",function(){cF(c)});this.eventManager.o(this.localization,"locale-changed",function(){cF(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&uD(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){uD(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){uD(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Qh(Date.now());
|
|
1573
|
+
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){dF(c)});cF(this);this.ad&&this.ad.isLinear()&&uD(this.g,!1)}na(aF,pD);aF.prototype.release=function(){this.j=null;for(var a=u(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];pD.prototype.release.call(this)};function eF(a,b){fF.set(a,b)}
|
|
1574
1574
|
function bF(a){for(var b=u(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,fF.get(c)?(c=fF.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function dF(a){if(a.controls.Bd())a.controls.yc();else{uD(a.h,!0);wE(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.h.childNodes,b)&&gb(a.h.childNodes,b)[0].focus()}}function cF(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1575
1575
|
N("shaka.ui.OverflowMenu",aF);aF.registerElement=eF;function gF(){}gF.prototype.create=function(a,b){return new aF(a,b)};CE("overflow_menu",new gF);var fF=new Map;function hF(a,b){pD.call(this,a,b);var c=this;this.g=Sm();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=T("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=T("span");a.appendChild(this.j);
|
|
1576
|
-
this.i=T("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);iF(this);jF(this);this.eventManager.
|
|
1577
|
-
c.player.Id()==Ro;uD(c.g,"available"==d.availability&&e)});this.eventManager.
|
|
1576
|
+
this.i=T("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);iF(this);jF(this);this.eventManager.o(this.localization,"locale-updated",function(){iF(c)});this.eventManager.o(this.localization,"locale-changed",function(){iF(c)});this.eventManager.o(this.g,"click",function(){c.controls.kc().webkitShowPlaybackTargetPicker()});a=this.controls.kc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1577
|
+
c.player.Id()==Ro;uD(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){jF(c)})}na(hF,pD);function jF(a){var b=a.controls.kc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function iF(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}N("shaka.ui.AirPlayButton",hF);function kF(){}kF.prototype.create=function(a,b){return new hF(a,b)};eF("airplay",new kF);
|
|
1578
1578
|
CE("airplay",new kF);function lF(a,b,c,d){d=void 0===d?null:d;this.i=a;this.j=b;this.h=mF(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.gg()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);this.configure({});c.controls||a.Ig(b);b.ui=this;c.ui=this}q=lF.prototype;q.destroy=function(){var a=this;return L(function(b){if(1==b.g)return a.g?D(b,a.g.destroy(),2):b.B(2);if(4!=b.g)return a.g=null,a.i?D(b,a.i.destroy(),4):b.B(4);a.i=null;F(b)})};
|
|
1579
1579
|
q.gg=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:dc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=mF(this);bm(a,this.h,mF(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cm(a,b));bm(this.h,a,mF(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new Q("uiupdated"))};q.Ii=function(){return this.g};
|
|
1580
1580
|
q.dk=function(a){this.g.Eg(a)};
|
|
@@ -1592,64 +1592,64 @@ lF.prototype.getControls=lF.prototype.Ii;lF.prototype.configure=lF.prototype.con
|
|
|
1592
1592
|
"complete"==document.readyState?L(function(a){if(1==a.g)return D(a,Promise.resolve(),2);oF();F(a)}):window.addEventListener("load",oF);function uF(a,b,c,d,e,f,g,h){function k(J){var I="";5<=J&&(I=" "+f.resolve("SURROUND"));return I}function l(J,I,G,H){J=[J,I];h&&null!=H&&J.push(H);G&&3==g&&J.push(G);return J.join(": ")}function m(J){return"variant"==J.type?J.audioRoles?J.audioRoles.join(", "):void 0:J.roles.join(", ")}var n=a.find(function(J){return 1==J.active}),r=qD(b);Tm(b);b.appendChild(r);r=new Map;for(var p=u(a),t=p.next();!t.done;t=p.next())t=t.value,r.has(t.language)||r.set(t.language,new Set),r.get(t.language).add(m(t));
|
|
1593
1593
|
r=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";p={};a=u(a);for(t=a.next();!t.done;p={Eb:p.Eb},t=a.next()){p.Eb=t.value;t=p.Eb.language;var w=p.Eb.forced,y=f.resolve("SUBTITLE_FORCED"),z=m(p.Eb),v=p.Eb.label,B=p.Eb.channelsCount,A=l(t,z,v,B);if(!r.has(A)){r.add(A);var C=Sm();C.addEventListener("click",function(J){return function(){c(J.Eb)}}(p));var E=T("span");C.appendChild(E);E.textContent=vF(t,f);switch(g){case nF:h&&(E.textContent+=k(B));w&&(E.textContent+=" ("+y+")");break;case 1:h&&
|
|
1594
1594
|
(E.textContent+=k(B));z?E.textContent=z:(Ua("Track #"+p.Eb.id+" does not have a role, but the UI is configured to only show role."),E.textContent="?");w&&(E.textContent+=" ("+y+")");break;case 2:h&&(E.textContent+=k(B));z&&(E.textContent+=": "+z);w&&(E.textContent+=" ("+y+")");break;case 3:v?E.textContent=v:(Ua("Track #"+p.Eb.id+" does not have a label, but the UI is configured to only show labels."),E.textContent="?")}d&&A==n&&(C.appendChild(tD()),E.classList.add("shaka-chosen-item"),C.ariaSelected=
|
|
1595
|
-
"true",e.textContent=E.textContent);b.appendChild(C)}}}function vF(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=Tc(a);return a in lD?lD[a].C:c in lD?lD[c].C+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function wF(a,b,c){pD.call(this,a,b);var d=this;xF(this,c);yF(this);zF(this);this.eventManager.
|
|
1595
|
+
"true",e.textContent=E.textContent);b.appendChild(C)}}}function vF(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=Tc(a);return a in lD?lD[a].C:c in lD?lD[c].C+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function wF(a,b,c){pD.call(this,a,b);var d=this;xF(this,c);yF(this);zF(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new Q("submenuopen")),uD(d.menu,!0),sD(d.menu)):uD(d.menu,!1)})}na(wF,pD);
|
|
1596
1596
|
function xF(a,b){a.button=Sm();a.button.classList.add("shaka-overflow-button");a.icon=T("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=T("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=T("span");b.appendChild(a.nameSpan);a.currentSelection=T("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
|
|
1597
|
-
function yF(a){a.menu=T("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Sm();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.
|
|
1598
|
-
T("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function zF(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.
|
|
1599
|
-
function(){
|
|
1600
|
-
function
|
|
1601
|
-
function BF(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")}N("shaka.ui.AudioLanguageSelection",AF);function
|
|
1602
|
-
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1603
|
-
function
|
|
1604
|
-
function
|
|
1605
|
-
this.eventManager.
|
|
1606
|
-
c.controls.cf(),0)})});this.eventManager.
|
|
1607
|
-
N("shaka.ui.FullscreenButton",
|
|
1608
|
-
a.appendChild(this.l);this.g.appendChild(a);
|
|
1609
|
-
|
|
1610
|
-
this.eventManager.
|
|
1611
|
-
function
|
|
1612
|
-
T("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a)
|
|
1613
|
-
function(){
|
|
1614
|
-
function
|
|
1615
|
-
function
|
|
1616
|
-
function
|
|
1617
|
-
c.player.Ra())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));
|
|
1618
|
-
function
|
|
1619
|
-
"x")}function
|
|
1620
|
-
c.g.disabled=!0)):(d=3600<=g,e=vD(Math.max(0,e-f.start),d),g&&(e+=" / "+vD(g,d)),
|
|
1621
|
-
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1622
|
-
function
|
|
1623
|
-
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;
|
|
1624
|
-
"connect",function(){
|
|
1625
|
-
function
|
|
1626
|
-
case 9:ta(d,8);break;case 7:ua(d);case 8:return ra(d,11),D(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;ta(d,0);break;case 11:ua(d),b(!0),F(d)}})}function
|
|
1627
|
-
"abrstatuschanged",function(){
|
|
1628
|
-
function
|
|
1629
|
-
k.height&&n.videoBandwidth==k.videoBandwidth&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.Yc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=qD(a.menu);Tm(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=u(b),g=f.next();!g.done;e={Rb:e.Rb},g=f.next()){e.Rb=g.value;g=Sm();g.classList.add("explicit-resolution");a.eventManager.
|
|
1630
|
-
k.Rb;a.player.configure({abr:{enabled:!1}});a.player.Ye(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=T("span");h.textContent=a.player.Yc()&&e.Rb.bandwidth?Math.round(e.Rb.bandwidth/1E3)+" kbits/s":e.Rb.height&&e.Rb.width?
|
|
1631
|
-
function(){a.player.configure({abr:{enabled:!0}});
|
|
1632
|
-
|
|
1633
|
-
function
|
|
1634
|
-
|
|
1635
|
-
this.eventManager.
|
|
1636
|
-
d:(c.i.stop(),uD(c.h,!1))});this.eventManager.
|
|
1637
|
-
"click",function(){c.ad.skip()});this.ad&&
|
|
1638
|
-
|
|
1639
|
-
this.
|
|
1597
|
+
function yF(a){a.menu=T("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Sm();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.yc()});var b=T("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1598
|
+
T("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function zF(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")}uD(a.parent,!0);fb(a.parent.childNodes,b)&&gb(a.parent.childNodes,b)[0].focus();wE(a.controls)}))}N("shaka.ui.SettingsMenu",wF);function AF(a,b){wF.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(){BF(c)});this.eventManager.o(this.localization,"locale-changed",function(){BF(c)});this.eventManager.o(this.player,"loading",function(){CF(c)});this.eventManager.o(this.player,"trackschanged",function(){CF(c)});this.eventManager.o(this.player,
|
|
1599
|
+
"variantchanged",function(){DF(c)});BF(this);DF(this)}na(AF,wF);
|
|
1600
|
+
function DF(a){var b=a.player.sb();uF(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.Xe(c.language,c.roles[0],c.channelsCount):a.player.Xe(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);sD(a.menu);a.controls.dispatchEvent(new Q("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);uD(a.button,2<a.menu.getElementsByTagName("button").length)}
|
|
1601
|
+
function CF(a){var b=0<a.player.sb().length;uD(a.button,b);DF(a)}function BF(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")}N("shaka.ui.AudioLanguageSelection",AF);function EF(){}EF.prototype.create=function(a,b){return new AF(a,b)};eF("language",new EF);CE("language",new EF);function FF(a,b){pD.call(this,a,b);var c=this;this.h=this.controls.F;this.g=Sm();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=T("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=T("span");a.appendChild(this.l);this.j=T("span");this.j.classList.add("shaka-current-selection-span");
|
|
1602
|
+
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);GF(this);HF(this);this.eventManager.o(this.localization,"locale-updated",function(){GF(c)});this.eventManager.o(this.localization,"locale-changed",function(){GF(c)});this.eventManager.o(this.g,"click",function(){IF(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){HF(c)})}na(FF,pD);
|
|
1603
|
+
function IF(a){var b;L(function(c){if(1==c.g){if(a.h.Ga())return a.h.Wh(),c.B(0);ra(c,3);a.g.disabled=!0;return D(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ta(c,0);b=ua(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new Q("error",(new Map).set("detail",b)));F(c)})}function HF(a){var b=a.h.Bf()&&a.controls.qa,c=a.h.Ga();uD(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");JF(a)}
|
|
1604
|
+
function JF(a){a.j.textContent=a.h.Ga()?a.h.Ue():a.localization.resolve("OFF")}function GF(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");JF(a)}N("shaka.ui.CastButton",FF);function KF(){}KF.prototype.create=function(a,b){return new FF(a,b)};eF("cast",new KF);CE("cast",new KF);function LF(a,b){pD.call(this,a,b);var c=this;this.g=Sm();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);MF(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){MF(c)});this.eventManager.o(this.localization,"locale-changed",function(){MF(c)});
|
|
1605
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Hc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(LF,pD);function MF(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",LF);function NF(){}NF.prototype.create=function(a,b){return new LF(a,b)};CE("fast_forward",new NF);function OF(a,b){pD.call(this,a,b);var c=this;this.h=this.controls.s;this.g=Sm();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");PF(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);QF(this);this.eventManager.o(this.localization,"locale-updated",function(){QF(c)});this.eventManager.o(this.localization,"locale-changed",function(){QF(c)});this.eventManager.o(this.g,"click",function(){return L(function(d){return D(d,
|
|
1606
|
+
c.controls.cf(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Zc()?"fullscreen_exit":"fullscreen";QF(c)});this.eventManager.o(this.h,"loadedmetadata",function(){PF(c)});this.eventManager.o(this.h,"loadeddata",function(){PF(c)})}na(OF,pD);function PF(a){a.controls.Pd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function QF(a){a.g.ariaLabel=a.localization.resolve(a.controls.Zc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1607
|
+
N("shaka.ui.FullscreenButton",OF);function RF(){}RF.prototype.create=function(a,b){return new OF(a,b)};CE("fullscreen",new RF);function SF(a,b){pD.call(this,a,b);var c=this;this.g=Sm();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=T("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=T("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=T("span");this.l.classList.add("shaka-current-selection-span");
|
|
1608
|
+
a.appendChild(this.l);this.g.appendChild(a);TF(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){TF(c)});this.eventManager.o(this.localization,"locale-changed",function(){TF(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Ia();c.h.ya(1)});this.m=this.video.loop;this.h=new Ob(function(){c.m!=c.video.loop&&(TF(c),c.m=c.video.loop)});this.h.ya(1)}na(SF,pD);
|
|
1609
|
+
SF.prototype.release=function(){this.h.stop();this.h=null;pD.prototype.release.call(this)};function TF(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}N("shaka.ui.LoopButton",SF);function UF(){}UF.prototype.create=function(a,b){return new SF(a,b)};eF("loop",new UF);CE("loop",new UF);FD("loop",new UF);function VF(a,b){pD.call(this,a,b);var c=this;this.g=Sm();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);WF(this);XF(this);this.eventManager.o(this.localization,"locale-updated",function(){WF(c)});this.eventManager.o(this.localization,"locale-changed",function(){WF(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});
|
|
1610
|
+
this.eventManager.o(this.video,"volumechange",function(){WF(c);XF(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){WF(c);XF(c)});this.eventManager.o(this.adManager,"ad-muted",function(){WF(c);XF(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;WF(c);XF(c)})}na(VF,pD);function WF(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1611
|
+
function XF(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}N("shaka.ui.MuteButton",VF);function YF(){}YF.prototype.create=function(a,b){return new VF(a,b)};CE("mute",new YF);function ZF(a,b){pD.call(this,a,b);var c=this;this.l=this.controls.s;this.g=Sm();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=T("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=T("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
|
|
1612
|
+
T("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);$F(this);this.parent.appendChild(this.g);this.controls.De()||uD(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){$F(c)});this.eventManager.o(this.localization,"locale-changed",function(){$F(c)});this.eventManager.o(this.g,"click",function(){c.controls.$d()});this.eventManager.o(this.l,"enterpictureinpicture",function(){aG(c)});this.eventManager.o(this.l,"leavepictureinpicture",
|
|
1613
|
+
function(){bG(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){cG(c)});this.eventManager.o(this.player,"trackschanged",function(){cG(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){aG(c);c.eventManager.na(d.window,"pagehide",function(){bG(c)})})}na(ZF,pD);
|
|
1614
|
+
function aG(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function bG(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")}
|
|
1615
|
+
function $F(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Ee();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 cG(a){L(function(b){if(!a.controls.De())return uD(a.g,!1),a.controls.Ee()?D(b,a.controls.$d(),0):b.B(0);if(!a.player||!a.player.Yc())return uD(a.g,!0),b.B(0);uD(a.g,!1);return a.controls.Ee()?D(b,a.controls.$d(),0):b.B(0)})}N("shaka.ui.PipButton",ZF);
|
|
1616
|
+
function dG(){}dG.prototype.create=function(a,b){return new ZF(a,b)};eF("picture_in_picture",new dG);CE("picture_in_picture",new dG);FD("picture_in_picture",new dG);function eG(a,b){wF.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(){fG(c)});this.eventManager.o(this.localization,"locale-changed",function(){fG(c)});this.eventManager.o(this.player,"loaded",function(){gG(c,c.player.Ra())});this.eventManager.o(this.player,"ratechange",function(){gG(c,
|
|
1617
|
+
c.player.Ra())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));fG(this);hG(this);gG(this,this.player.Ra())}na(eG,wF);function fG(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")}
|
|
1618
|
+
function gG(a,b){var c=rD(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(tD()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1619
|
+
"x")}function hG(a){for(var b={},c=u(a.g.keys()),d=c.next();!d.done;b={qd:b.qd},d=c.next()){b.qd=d.value;d=Sm();var e=T("span");e.textContent=b.qd;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.qd);a.video.defaultPlaybackRate=a.g.get(f.qd)}}(b));a.menu.appendChild(d)}sD(a.menu)}N("shaka.ui.PlaybackRateSelection",eG);function iG(){}iG.prototype.create=function(a,b){return new eG(a,b)};eF("playback_rate",new iG);CE("playback_rate",new iG);function jG(a,b){pD.call(this,a,b);var c=this;this.g=Sm();this.g.classList.add("shaka-current-time");kG(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Pa().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Y,e=c.controls.Wf(),f=c.player.Pa(),g=f.end-f.start;c.player.U()?(e=Math.max(0,Math.floor(f.end-e)),g=3600<=g,1<=e||d?(kG(c,"- "+vD(e,g)),c.g.disabled=!1):(kG(c,c.localization.resolve("LIVE")),
|
|
1620
|
+
c.g.disabled=!0)):(d=3600<=g,e=vD(Math.max(0,e-f.start),d),g&&(e+=" / "+vD(g,d)),kG(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}na(jG,pD);function kG(a,b){b!=a.g.textContent&&(a.g.textContent=b)}N("shaka.ui.PresentationTimeTracker",jG);function lG(){}lG.prototype.create=function(a,b){return new jG(a,b)};CE("time_and_duration",new lG);function uG(a,b){pD.call(this,a,b);var c=this;this.g=Sm();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=T("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=T("span");a.appendChild(this.j);this.i=T("span");this.i.classList.add("shaka-current-selection-span");
|
|
1621
|
+
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);vG(this);this.eventManager.o(this.localization,"locale-updated",function(){vG(c)});this.eventManager.o(this.localization,"locale-changed",function(){vG(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.g?nE(d.g):Ua("Not playing VR content")});this.eventManager.o(d,"vrstatuschanged",function(){uD(c.g,c.controls.Nb())});uD(this.g,this.controls.Nb())}na(uG,pD);
|
|
1622
|
+
function vG(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}N("shaka.ui.RecenterVRButton",uG);function wG(){}wG.prototype.create=function(a,b){return new uG(a,b)};eF("recenter_vr",new wG);CE("recenter_vr",new wG);function xG(a,b){pD.call(this,a,b);var c=this;this.g=Sm();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=T("i");this.i.classList.add("material-icons-round");a="cast";(b=ic())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=T("span");a.appendChild(this.l);this.j=T("span");this.j.classList.add("shaka-current-selection-span");
|
|
1623
|
+
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;yG(this);uD(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.o(this.localization,"locale-updated",function(){yG(c)}),this.eventManager.o(this.localization,"locale-changed",function(){yG(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){zG(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,
|
|
1624
|
+
"connect",function(){zG(c)}),this.eventManager.o(this.video.remote,"connecting",function(){zG(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){zG(c)}),this.eventManager.o(this.player,"loaded",function(){zG(c)}),zG(this))}na(xG,pD);xG.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});pD.prototype.release.call(this)};
|
|
1625
|
+
function zG(a){var b,c;L(function(d){switch(d.g){case 1:if(a.controls.F.Bf()&&a.controls.qa){uD(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.B(0);break}if("disconnected"==a.video.remote.state){b=function(e){a.player?uD(a.g,a.player.Id()==Ro&&e):uD(a.g,!1)};ra(d,7);if(-1==a.h){d.B(9);break}return D(d,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){d.B(0);break}return D(d,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;d.B(0);break;case 10:a.h=-1;
|
|
1626
|
+
case 9:ta(d,8);break;case 7:ua(d);case 8:return ra(d,11),D(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;ta(d,0);break;case 11:ua(d),b(!0),F(d)}})}function yG(a){var b=a.localization.resolve("CAST"),c=ic();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}N("shaka.ui.RemoteButton",xG);function AG(){}AG.prototype.create=function(a,b){return new xG(a,b)};eF("remote",new AG);CE("remote",new AG);function BG(a,b){wF.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(){CG(c)});this.eventManager.o(this.localization,"locale-changed",function(){CG(c)});this.eventManager.o(this.player,"loading",function(){DG(c)});this.eventManager.o(this.player,"variantchanged",function(){DG(c)});this.eventManager.o(this.player,
|
|
1627
|
+
"trackschanged",function(){DG(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){DG(c)});DG(this)}na(BG,wF);
|
|
1628
|
+
function DG(a){var b=[];a.player.Id()!=Ro&&(b=a.player.sb());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)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=b.filter(function(k,l){var m=-1;m=a.player.Yc()?b.findIndex(function(n){return n.bandwidth==k.bandwidth}):b.findIndex(function(n){return n.height==
|
|
1629
|
+
k.height&&n.videoBandwidth==k.videoBandwidth&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.Yc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=qD(a.menu);Tm(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=u(b),g=f.next();!g.done;e={Rb:e.Rb},g=f.next()){e.Rb=g.value;g=Sm();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=
|
|
1630
|
+
k.Rb;a.player.configure({abr:{enabled:!1}});a.player.Ye(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=T("span");h.textContent=a.player.Yc()&&e.Rb.bandwidth?Math.round(e.Rb.bandwidth/1E3)+" kbits/s":e.Rb.height&&e.Rb.width?EG(e.Rb):"Unknown";g.appendChild(h);d||e.Rb!=c||(g.ariaSelected="true",g.appendChild(tD()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Sm();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",
|
|
1631
|
+
function(){a.player.configure({abr:{enabled:!0}});DG(a)});a.g=T("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(tD()),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);sD(a.menu);a.controls.dispatchEvent(new Q("resolutionselectionupdated"));
|
|
1632
|
+
CG(a);uD(a.button,1<b.length)}function EG(a){var b=a.height||0,c=a.width||0,d=b;c/b>16/9&&(d=Math.round(9*c/16));b=d+"p";2160==d&&(b="4K");(d=a.frameRate)&&(50<=d||20>=d)&&(b+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)b+=" (HDR)";"CH-STEREO"==a.videoLayout&&(b+=" (3D)");return b}
|
|
1633
|
+
function CG(a){var b=a.player.Yc()?"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"))}N("shaka.ui.ResolutionSelection",BG);function FG(){}
|
|
1634
|
+
FG.prototype.create=function(a,b){return new BG(a,b)};eF("quality",new FG);CE("quality",new FG);function GG(a,b){pD.call(this,a,b);var c=this;this.g=Sm();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);HG(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){HG(c)});this.eventManager.o(this.localization,"locale-changed",function(){HG(c)});
|
|
1635
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Hc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(GG,pD);function HG(a){a.g.ariaLabel=a.localization.resolve("REWIND")}N("shaka.ui.RewindButton",GG);function IG(){}IG.prototype.create=function(a,b){return new GG(a,b)};CE("rewind",new IG);function JG(a,b){pD.call(this,a,b);var c=this;this.j=T("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=T("div");this.h.classList.add("shaka-skip-ad-counter");uD(this.h,!1);this.j.appendChild(this.h);this.g=Sm();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;uD(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);KG(this);this.i=new Ob(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1636
|
+
d:(c.i.stop(),uD(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){KG(c)});this.eventManager.o(this.localization,"locale-changed",function(){KG(c)});this.eventManager.o(this.adManager,"ad-started",function(){LG(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),uD(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;uD(c.g,!1);uD(c.h,!1)});this.eventManager.o(this.g,
|
|
1637
|
+
"click",function(){c.ad.skip()});this.ad&&LG(this)}na(JG,pD);JG.prototype.release=function(){this.i.stop();this.i=null;pD.prototype.release.call(this)};function KG(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function LG(a){a.ad.isSkippable()&&(uD(a.g,!0),uD(a.h,!0),a.h.textContent="",a.i.Ia(),a.i.ya(.5))}N("shaka.ui.SkipAdButton",JG);function MG(a,b){zD.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()}na(MG,zD);MG.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
|
|
1638
|
+
MG.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)}};N("shaka.ui.SmallPlayButton",MG);function NG(){}NG.prototype.create=function(a,b){return new MG(a,b)};CE("play_pause",new NG);function OG(a,b){pD.call(this,a,b);a=T("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}na(OG,pD);N("shaka.ui.Spacer",OG);function PG(){}PG.prototype.create=function(a,b){return new OG(a,b)};CE("spacer",new PG);function QG(a,b){function c(k){return vD(h.g[k],!1)+" (m)"}function d(k){return Math.round(h.g[k]/1E3)+" (kbits/s)"}function e(k){return h.g[k].toFixed(2)+" (s)"}function f(k){return h.g[k]+" (frames)"}function g(k){return h.g[k]+" (px)"}pD.call(this,a,b);var h=this;this.i=Sm();this.i.classList.add("shaka-statistics-button");this.j=T("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=T("label");a.classList.add("shaka-overflow-button-label");
|
|
1639
|
+
this.s=T("span");a.appendChild(this.s);this.m=T("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=T("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.F=[];this.G=["stateHistory","switchHistory"];this.g=this.player.getStats();
|
|
1640
1640
|
this.u={};this.A={width:g,height:g,completionPercent:function(k){return h.g[k]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f,stallsDetected:function(k){return h.g[k]+" (stalls)"},gapsJumped:function(k){return h.g[k]+" (gaps)"},bytesDownloaded:function(k){k=parseInt(h.g[k],10);return 1E6<k?(k/1E6).toFixed(2)+
|
|
1641
|
-
"MB":1E3<k?(k/1E3).toFixed(2)+"KB":k+"B"}};this.l=new Ob(function(){h.g=h.player.getStats();for(var k=u(h.F),l=k.next();!l.done;l=k.next())l=l.value,h.u[l].textContent=h.A[l](l)});
|
|
1642
|
-
(h.j.textContent="insert_chart_outlined",h.l.stop(),uD(h.h,!1));
|
|
1643
|
-
function
|
|
1644
|
-
|
|
1645
|
-
"texttrackvisibility",function(){
|
|
1646
|
-
function
|
|
1647
|
-
function
|
|
1648
|
-
a.button.setAttribute("shaka-status",a.currentSelection.textContent);sD(a.menu);a.controls.dispatchEvent(new Q("captionselectionupdated"))}function
|
|
1649
|
-
function
|
|
1650
|
-
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1651
|
-
function
|
|
1652
|
-
this.eventManager.
|
|
1653
|
-
function
|
|
1641
|
+
"MB":1E3<k?(k/1E3).toFixed(2)+"KB":k+"B"}};this.l=new Ob(function(){h.g=h.player.getStats();for(var k=u(h.F),l=k.next();!l.done;l=k.next())l=l.value,h.u[l].textContent=h.A[l](l)});RG(this);SG(this);this.eventManager.o(this.localization,"locale-updated",function(){RG(h)});this.eventManager.o(this.localization,"locale-changed",function(){RG(h)});this.eventManager.o(this.i,"click",function(){uD(h.parent,!1);h.h.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ya(.1),uD(h.h,!0)):
|
|
1642
|
+
(h.j.textContent="insert_chart_outlined",h.l.stop(),uD(h.h,!1));RG(h)})}na(QG,pD);function RG(a){a.s.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")}
|
|
1643
|
+
function SG(a){for(var b=u(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.h,e=d.appendChild,f=a,g=T("div"),h=T("label");h.textContent=c+":";g.appendChild(h);h=T("span");h.textContent=f.A[c](c);g.appendChild(h);f.u[c]=h;e.call(d,g);a.F.push(c)}else Ua("Unrecognized statistic element:",c)}QG.prototype.release=function(){this.l.stop();this.l=null;pD.prototype.release.call(this)};N("shaka.ui.StatisticsButton",QG);function TG(){}
|
|
1644
|
+
TG.prototype.create=function(a,b){return new QG(a,b)};eF("statistics",new TG);FD("statistics",new TG);function UG(a,b){wF.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.Bc()?this.button.ariaPressed="true":this.button.ariaPressed="false";VG(this);this.eventManager.o(this.localization,"locale-updated",function(){WG(c);XG(c)});this.eventManager.o(this.localization,"locale-changed",function(){WG(c);XG(c)});this.eventManager.o(this.player,
|
|
1645
|
+
"loading",function(){YG(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){ZG(c);XG(c)});this.eventManager.o(this.player,"textchanged",function(){XG(c)});this.eventManager.o(this.player,"trackschanged",function(){YG(c)});ZG(this);WG(this);XG(this);YG(this)}na(UG,wF);function VG(a){var b=Sm();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(tD());a.g=T("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1646
|
+
function ZG(a){a.player.Bc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new Q("captionselectionupdated"))}
|
|
1647
|
+
function XG(a){var b=a.player.jc();uF(b,a.menu,function(c){return $G(a,c)},a.player.Bc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=Sm();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.bf(!1);XG(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Bc()||(b.ariaSelected="true",b.appendChild(tD()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1648
|
+
a.button.setAttribute("shaka-status",a.currentSelection.textContent);sD(a.menu);a.controls.dispatchEvent(new Q("captionselectionupdated"))}function $G(a,b){return L(function(c){a.player.Bg(b);return D(c,a.player.bf(!0),0)})}
|
|
1649
|
+
function WG(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 YG(a){var b=0<a.player.jc().length;uD(a.button,b);XG(a)}N("shaka.ui.TextSelection",UG);function aH(){}aH.prototype.create=function(a,b){return new UG(a,b)};eF("captions",new aH);CE("captions",new aH);function bH(a,b){pD.call(this,a,b);var c=this;this.g=Sm();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=T("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=T("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=T("span");a.appendChild(this.j);this.i=T("span");this.i.classList.add("shaka-current-selection-span");
|
|
1650
|
+
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);cH(this);this.eventManager.o(this.localization,"locale-updated",function(){cH(c)});this.eventManager.o(this.localization,"locale-changed",function(){cH(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.hd()});this.eventManager.o(d,"vrstatuschanged",function(){uD(c.g,c.controls.Nb())});uD(this.g,this.controls.Nb())}na(bH,pD);
|
|
1651
|
+
function cH(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}N("shaka.ui.ToggleStereoscopicButton",bH);function dH(){}dH.prototype.create=function(a,b){return new bH(a,b)};eF("toggle_stereoscopic",new dH);CE("toggle_stereoscopic",new dH);function eH(a,b){KD.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 fH(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return gH(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return gH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return fH(c)});this.eventManager.o(this.localization,"locale-updated",function(){return hH(c)});
|
|
1652
|
+
this.eventManager.o(this.localization,"locale-changed",function(){return hH(c)});fH(this);hH(this);if(this.ad)this.onChange()}na(eH,KD);eH.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 fH(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);iH(a)}function gH(a){var b=a.ad.getVolume();a.setValue(100*b);iH(a)}
|
|
1653
|
+
function iH(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 hH(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}N("shaka.ui.VolumeBar",eH);function jH(){}jH.prototype.create=function(a,b){return new eH(a,b)};CE("volume",new jH);}).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})();
|
|
1654
1654
|
|
|
1655
1655
|
//# sourceMappingURL=shaka-player.ui.map
|